summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2015-10-05 09:51:14 +0200
committerOliver Specht <oliver.specht@cib.de>2015-10-05 11:08:26 +0000
commit8d65149d252b9daf6f4ee40aa94d0d150dab4948 (patch)
tree15da4d2b29f796395f9e7beb9e83e9ef6bcd6488
parentc501c6545369da7936fd4a0d52b6cc01f5663860 (diff)
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@cib.de> Tested-by: Oliver Specht <oliver.specht@cib.de>
-rw-r--r--sw/source/uibase/app/appenv.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx
index ef1033097175..9336c4478c50 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