diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-02-13 12:52:21 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-02-14 16:06:57 +0100 |
commit | b88db173e610da5058099d5524e8fa7db2fc733d (patch) | |
tree | a609f92b63f9057fe7e4d7eef440c0507d10960a | |
parent | f3f925c8a4784cf578d2ab2d1b3f593f582bcdbc (diff) |
n#695479 fix RTF import of text frames with exact height
(cherry picked from commit e0328096dc21ce12d15db2045074e7860872570f)
Signed-off-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index f0aa5138c4a7..df60ff790f17 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -3375,6 +3375,7 @@ RTFSprms RTFFrame::getSprms() { NS_ooxml::LN_CT_FramePr_x, 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_PDxaWidth, NS_sprm::LN_PDxaFromText, @@ -3385,8 +3386,7 @@ RTFSprms RTFFrame::getSprms() NS_ooxml::LN_CT_FramePr_yAlign, NS_sprm::LN_PWr, NS_ooxml::LN_CT_FramePr_dropCap, - NS_ooxml::LN_CT_FramePr_lines, - NS_ooxml::LN_CT_FramePr_hRule + NS_ooxml::LN_CT_FramePr_lines }; for ( int i = 0, len = sizeof( pNames ) / sizeof( Id ); i < len; ++i ) @@ -3438,7 +3438,10 @@ RTFSprms RTFFrame::getSprms() { sal_Int32 nHRule = NS_ooxml::LN_Value_wordprocessingml_ST_HeightRule_auto; if ( nH < 0 ) + { nHRule = NS_ooxml::LN_Value_wordprocessingml_ST_HeightRule_exact; + nH = -nH; // The negative value just sets nHRule + } else if ( nH > 0 ) nHRule = NS_ooxml::LN_Value_wordprocessingml_ST_HeightRule_atLeast; pValue.reset(new RTFValue(nHRule)); |