[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - writerfilter/source

Oliver-Rainer Wittmann orw at apache.org
Tue Mar 11 07:50:21 PDT 2014


 writerfilter/source/dmapper/DomainMapper.cxx |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 5d534ad732a8500466f495a527ab63322361f47a
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date:   Tue Feb 25 13:16:12 2014 +0000

    Related: #i124106# correct handling of page break attributes
    
    i.e. those which are providing the default value explicitly
    
    (cherry picked from commit 5a15ef3da683566d7bd443f96eeec3a9a3f70aeb)
    
    Conflicts:
    	writerfilter/source/dmapper/DomainMapper.cxx
    	writerfilter/source/dmapper/PropertyMap.cxx
    
    (cherry picked from commit c30fb7d7269b5bdd1853ac22120f57aa2bfd13a5)
    
    Change-Id: Ib8721f2fce060d26ee75b0515b3bf62a603fd40c
    Signed-off-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index dfcf3a7..a9474a6 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1517,7 +1517,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
     bool bExchangeLeftRight = false;
     Value::Pointer_t pValue = rSprm.getValue();
     sal_Int32 nIntValue = pValue->getInt();
-    OUString sStringValue = pValue->getString();
+    const OUString sStringValue = pValue->getString();
     PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
 
     switch(nSprmId)
@@ -1544,7 +1544,10 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
         rContext->Insert(PROP_PARA_KEEP_TOGETHER, true, uno::makeAny( nIntValue ? true : false) );
         break;
     case NS_sprm::LN_PFPageBreakBefore:
-        rContext->Insert(PROP_BREAK_TYPE, true, uno::makeAny( com::sun::star::style::BreakType_PAGE_BEFORE ) );
+        if ( nIntValue == 1 )
+        {
+            rContext->Insert(PROP_BREAK_TYPE, true, uno::makeAny( com::sun::star::style::BreakType_PAGE_BEFORE ) );
+        }
     break;  // sprmPFPageBreakBefore
     case NS_sprm::LN_PBrcl:
         break;  // sprmPBrcl


More information about the Libreoffice-commits mailing list