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

Oliver-Rainer Wittmann orw at apache.org
Tue Feb 25 08:19:20 PST 2014


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

New commits:
commit f8366d188f2d7cfe17ec802cbdff603b111eacd5
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)
    
    Conflicts:
    	writerfilter/source/dmapper/DomainMapper.cxx
    
    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 6ed6ddf..4b6ed8e 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1614,7 +1614,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
     SectionPropertyMap * pSectionContext = m_pImpl->GetSectionContext();
     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)
@@ -1641,7 +1641,10 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
         rContext->Insert(PROP_PARA_KEEP_TOGETHER, uno::makeAny( nIntValue ? true : false) );
         break;
     case NS_sprm::LN_PFPageBreakBefore:
-        rContext->Insert(PROP_BREAK_TYPE, uno::makeAny( com::sun::star::style::BreakType_PAGE_BEFORE ) );
+        if ( nIntValue == 1 )
+        {
+            rContext->Insert(PROP_BREAK_TYPE, 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