diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-07-05 17:44:09 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-07-05 17:44:51 +0200 |
commit | 224746a40f1e9f2fb90c0b4ad767a503979014f3 (patch) | |
tree | 684c982b51c6bea10f7a9f8bc7baabd3dbbc42a8 /sw | |
parent | fa2b7eff2d40b6455970b521306c5961e4e3cec4 (diff) |
sw: InsertNewPage() should fall back from first to left/right as well
Change-Id: I87715dcf843b025b8291a76bdfdd3a06d2ffac23
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/layout/frmtool.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 1f8576d0368a..1a61f726aaa1 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -2702,7 +2702,12 @@ SwPageFrm * InsertNewPage( SwPageDesc &rDesc, SwFrm *pUpper, SwDoc *pDoc = ((SwLayoutFrm*)pUpper)->GetFmt()->GetDoc(); SwFrmFmt *pFmt = 0; if (bFirst) + { pFmt = rDesc.GetFirstFmt(); + // If there is no first format, use what is relevant anyway. + if (!pFmt) + pFmt = bOdd ? rDesc.GetRightFmt() : rDesc.GetLeftFmt(); + } else pFmt = bOdd ? rDesc.GetRightFmt() : rDesc.GetLeftFmt(); //Wenn ich kein FrmFmt fuer die Seite gefunden habe, muss ich eben |