n#695479 fix RTF import of text frames with exact height
This commit is contained in:
committed by
Miklos Vajna
parent
af54a1b8b1
commit
e0328096dc
@@ -3385,6 +3385,7 @@ RTFSprms RTFFrame::getSprms()
|
|||||||
{
|
{
|
||||||
NS_ooxml::LN_CT_FramePr_x,
|
NS_ooxml::LN_CT_FramePr_x,
|
||||||
NS_ooxml::LN_CT_FramePr_y,
|
NS_ooxml::LN_CT_FramePr_y,
|
||||||
|
NS_ooxml::LN_CT_FramePr_hRule, // Make sure nHRule is processed before nH
|
||||||
NS_sprm::LN_PWHeightAbs,
|
NS_sprm::LN_PWHeightAbs,
|
||||||
NS_sprm::LN_PDxaWidth,
|
NS_sprm::LN_PDxaWidth,
|
||||||
NS_sprm::LN_PDxaFromText,
|
NS_sprm::LN_PDxaFromText,
|
||||||
@@ -3395,8 +3396,7 @@ RTFSprms RTFFrame::getSprms()
|
|||||||
NS_ooxml::LN_CT_FramePr_yAlign,
|
NS_ooxml::LN_CT_FramePr_yAlign,
|
||||||
NS_sprm::LN_PWr,
|
NS_sprm::LN_PWr,
|
||||||
NS_ooxml::LN_CT_FramePr_dropCap,
|
NS_ooxml::LN_CT_FramePr_dropCap,
|
||||||
NS_ooxml::LN_CT_FramePr_lines,
|
NS_ooxml::LN_CT_FramePr_lines
|
||||||
NS_ooxml::LN_CT_FramePr_hRule
|
|
||||||
};
|
};
|
||||||
|
|
||||||
for ( int i = 0, len = sizeof( pNames ) / sizeof( Id ); i < len; ++i )
|
for ( int i = 0, len = sizeof( pNames ) / sizeof( Id ); i < len; ++i )
|
||||||
@@ -3448,7 +3448,10 @@ RTFSprms RTFFrame::getSprms()
|
|||||||
{
|
{
|
||||||
sal_Int32 nHRule = NS_ooxml::LN_Value_wordprocessingml_ST_HeightRule_auto;
|
sal_Int32 nHRule = NS_ooxml::LN_Value_wordprocessingml_ST_HeightRule_auto;
|
||||||
if ( nH < 0 )
|
if ( nH < 0 )
|
||||||
|
{
|
||||||
nHRule = NS_ooxml::LN_Value_wordprocessingml_ST_HeightRule_exact;
|
nHRule = NS_ooxml::LN_Value_wordprocessingml_ST_HeightRule_exact;
|
||||||
|
nH = -nH; // The negative value just sets nHRule
|
||||||
|
}
|
||||||
else if ( nH > 0 )
|
else if ( nH > 0 )
|
||||||
nHRule = NS_ooxml::LN_Value_wordprocessingml_ST_HeightRule_atLeast;
|
nHRule = NS_ooxml::LN_Value_wordprocessingml_ST_HeightRule_atLeast;
|
||||||
pValue.reset(new RTFValue(nHRule));
|
pValue.reset(new RTFValue(nHRule));
|
||||||
|
Reference in New Issue
Block a user