[Libreoffice-commits] core.git: sw/source

Oliver Specht oliver.specht at cib.de
Mon Oct 5 04:08:51 PDT 2015


 sw/source/uibase/app/appenv.cxx |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 8d65149d252b9daf6f4ee40aa94d0d150dab4948
Author: Oliver Specht <oliver.specht at cib.de>
Date:   Mon Oct 5 09:51:14 2015 +0200

    tdf#94386 set page style at page breaks behind evelopes
    
    insert page descriptor attribute instead of simple break after envelope page
    to enable .docx roundtrip
    
    Change-Id: I05d45daa3043d42df22509faafcfc4dcb2ec8946
    Reviewed-on: https://gerrit.libreoffice.org/19146
    Reviewed-by: Oliver Specht <oliver.specht at cib.de>
    Tested-by: Oliver Specht <oliver.specht at cib.de>

diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx
index ef10330..9336c44 100644
--- a/sw/source/uibase/app/appenv.cxx
+++ b/sw/source/uibase/app/appenv.cxx
@@ -59,6 +59,7 @@
 #include <expfld.hxx>
 #include <SwStyleNameMapper.hxx>
 #include <crsskip.hxx>
+#include <fmtpdsc.hxx>
 
 #include <cmdid.h>
 #include <globals.hrc>
@@ -302,12 +303,15 @@ void SwModule::InsertEnv( SfxRequest& rReq )
             {
                 pSh->SplitNode();
                 pSh->Right( CRSR_SKIP_CHARS, false, 1, false );
-                SfxItemSet aBreakSet( pSh->GetAttrPool(), RES_BREAK, RES_BREAK, 0 );
-                aBreakSet.Put( SvxFormatBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK) );
+                SfxItemSet aBreakSet( pSh->GetAttrPool(), RES_PAGEDESC, RES_PAGEDESC, 0 );
+                aBreakSet.Put( SwFormatPageDesc( pFollow ) );
                 pSh->SetTableAttr( aBreakSet );
             }
             else
-                pSh->InsertPageBreak(0, boost::none);
+            {
+                OUString sFollowName(pFollow->GetName());
+                pSh->InsertPageBreak(&sFollowName, boost::none);
+            }
             pSh->SttEndDoc(true);
         }
         else


More information about the Libreoffice-commits mailing list