[Libreoffice-commits] .: Branch 'libreoffice-3-5' - writerfilter/source

Caolán McNamara caolan at kemper.freedesktop.org
Mon Jan 23 05:03:57 PST 2012


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

New commits:
commit 4ad1652522aff11f53edc45bf29531225979935a
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.
    (cherry picked from commit c39e891d4dc963d2cac9843b426494e4dc490278)

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 62445de..18643af 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);


More information about the Libreoffice-commits mailing list