[Libreoffice-commits] .: writerfilter/source

Miklos Vajna vmiklos at kemper.freedesktop.org
Fri Jan 20 16:02:02 PST 2012


 writerfilter/source/rtftok/rtfdocumentimpl.cxx |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

New commits:
commit c39e891d4dc963d2cac9843b426494e4dc490278
Author: Miklos Vajna <vmiklos at frugalware.org>
Date:   Sat Jan 21 00:58:48 2012 +0100

    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.

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 0a1fafb..aab8952 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2366,18 +2366,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);


More information about the Libreoffice-commits mailing list