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

Caolán McNamara caolan at kemper.freedesktop.org
Fri May 11 08:36:12 PDT 2012


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

New commits:
commit 71669deb856bcadba38f135837537ee8bd465f29
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Wed May 9 11:30:13 2012 +0200

    fdo#49501 RTF_MARGL/R/T/B should also set the current margin
    
    Change-Id: I I69b92d0cd07c9f08f14affb447b55b26b2556186
    
    Signed-off-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 330bc25..1d45cb3 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2628,34 +2628,30 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
             lcl_putNestedAttribute(m_aStates.top().aSectionSprms,
                     NS_ooxml::LN_EG_SectPrContents_pgSz, NS_ooxml::LN_CT_PageSz_w, pIntValue, true);
             break;
-        case RTF_MARGL:
+        case RTF_MARGL: // fall through: set the default + current value
             lcl_putNestedAttribute(m_aDefaultState.aSectionSprms,
                     NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_left, pIntValue, true);
-            break;
-        case RTF_MARGR:
-            lcl_putNestedAttribute(m_aDefaultState.aSectionSprms,
-                    NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_right, pIntValue, true);
-            break;
-        case RTF_MARGT:
-            lcl_putNestedAttribute(m_aDefaultState.aSectionSprms,
-                    NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_top, pIntValue, true);
-            break;
-        case RTF_MARGB:
-            lcl_putNestedAttribute(m_aDefaultState.aSectionSprms,
-                    NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_bottom, pIntValue, true);
-            break;
         case RTF_MARGLSXN:
             lcl_putNestedAttribute(m_aStates.top().aSectionSprms,
                     NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_left, pIntValue, true);
             break;
+        case RTF_MARGR: // fall through: set the default + current value
+            lcl_putNestedAttribute(m_aDefaultState.aSectionSprms,
+                    NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_right, pIntValue, true);
         case RTF_MARGRSXN:
             lcl_putNestedAttribute(m_aStates.top().aSectionSprms,
                     NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_right, pIntValue, true);
             break;
+        case RTF_MARGT: // fall through: set the default + current value
+            lcl_putNestedAttribute(m_aDefaultState.aSectionSprms,
+                    NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_top, pIntValue, true);
         case RTF_MARGTSXN:
             lcl_putNestedAttribute(m_aStates.top().aSectionSprms,
                     NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_top, pIntValue, true);
             break;
+        case RTF_MARGB: // fall through: set the default + current value
+            lcl_putNestedAttribute(m_aDefaultState.aSectionSprms,
+                    NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_bottom, pIntValue, true);
         case RTF_MARGBSXN:
             lcl_putNestedAttribute(m_aStates.top().aSectionSprms,
                     NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_bottom, pIntValue, true);


More information about the Libreoffice-commits mailing list