diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-07-04 10:43:56 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-07-04 10:54:20 +0200 |
commit | 37a5afbe98b8dad909f3a6dc7e815100835631ec (patch) | |
tree | 44e2b9260c876e75fbd49eca4909a5b043e117e6 /sw/source/core/layout/frmtool.cxx | |
parent | 5f4302c14772009a675d4b5b333f11c87c2e65c3 (diff) |
sw: tell InsertNewPage() if that'll be a first page
And in that case we can unconditionally call GetFirstFmt(), as the
SwPageDesc copying methods take care of the "shared first/right" setting
already. With this, the layout handles HeaderIsSharedFirst and
FooterIsSharedFirst correctly when the first page is the first physical
page.
Change-Id: Ib6d922aebaa1384856f79f2501dfbe087a74a20f
Diffstat (limited to 'sw/source/core/layout/frmtool.cxx')
-rw-r--r-- | sw/source/core/layout/frmtool.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 2c330680eb63..1f8576d0368a 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -2695,12 +2695,16 @@ sal_uLong SqRt( BigInt nX ) /*************************************************************************/ SwPageFrm * InsertNewPage( SwPageDesc &rDesc, SwFrm *pUpper, - sal_Bool bOdd, sal_Bool bInsertEmpty, sal_Bool bFtn, + sal_Bool bOdd, bool bFirst, sal_Bool bInsertEmpty, sal_Bool bFtn, SwFrm *pSibling ) { SwPageFrm *pRet; SwDoc *pDoc = ((SwLayoutFrm*)pUpper)->GetFmt()->GetDoc(); - SwFrmFmt *pFmt = bOdd ? rDesc.GetRightFmt() : rDesc.GetLeftFmt(); + SwFrmFmt *pFmt = 0; + if (bFirst) + pFmt = rDesc.GetFirstFmt(); + else + pFmt = bOdd ? rDesc.GetRightFmt() : rDesc.GetLeftFmt(); //Wenn ich kein FrmFmt fuer die Seite gefunden habe, muss ich eben //eine Leerseite einfuegen. if ( !pFmt ) |