summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2012-01-21 00:58:48 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-01-23 13:03:36 +0000
commit4ad1652522aff11f53edc45bf29531225979935a (patch)
tree879d9724047563cd1c7ea4d8c7597432d32afca2 /writerfilter
parent8a449369b50db65423d709000891fec25d9dba54 (diff)
fdo#44983 Fix RTF import of \paperh and \paperw
These keywords should not only set the *default* paper height/width but also set the current values. (cherry picked from commit c39e891d4dc963d2cac9843b426494e4dc490278)
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 62445de5d121..18643afa1034 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2357,18 +2357,16 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
pIntValue));
}
break;
- case RTF_PAPERH:
+ case RTF_PAPERH: // fall through: set the default + current value
lcl_putNestedAttribute(m_aDefaultState.aSectionSprms,
NS_ooxml::LN_EG_SectPrContents_pgSz, NS_ooxml::LN_CT_PageSz_h, pIntValue, true);
- break;
- case RTF_PAPERW:
- lcl_putNestedAttribute(m_aDefaultState.aSectionSprms,
- NS_ooxml::LN_EG_SectPrContents_pgSz, NS_ooxml::LN_CT_PageSz_w, pIntValue, true);
- break;
case RTF_PGHSXN:
lcl_putNestedAttribute(m_aStates.top().aSectionSprms,
NS_ooxml::LN_EG_SectPrContents_pgSz, NS_ooxml::LN_CT_PageSz_h, pIntValue, true);
break;
+ case RTF_PAPERW: // fall through: set the default + current value
+ lcl_putNestedAttribute(m_aDefaultState.aSectionSprms,
+ NS_ooxml::LN_EG_SectPrContents_pgSz, NS_ooxml::LN_CT_PageSz_w, pIntValue, true);
case RTF_PGWSXN:
lcl_putNestedAttribute(m_aStates.top().aSectionSprms,
NS_ooxml::LN_EG_SectPrContents_pgSz, NS_ooxml::LN_CT_PageSz_w, pIntValue, true);