[Libreoffice-commits] .: Branch 'libreoffice-4-0' - sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Dec 18 03:50:52 PST 2012
sw/source/core/layout/pagechg.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 1c717cbc41174c2e86f649f1045c1d023e9d19a7
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Tue Dec 18 11:17:06 2012 +0100
fdo#58376 SwFrm::CheckPageDescs: fix crash on fallback
The problem was that fallback worked like this: if we have no page
style, then right falls back to left, and left falls back to right.
This is no longer enough when 'first' is missing: for odd 'first' pages,
first we should fall back to right.
(cherry picked from commits 1b67d91b0065c46ca7b36db0836c9159ca8b50cf and
5b7810581c573c4406a0e4529193dd3a7871a56c)
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 8509a40..54b2f22 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -1194,7 +1194,10 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, sal_Bool bNotifyFields )
else if ( !pFmtWish ) //6.
{
//Format mit verdrehter Logic besorgen.
- pFmtWish = bOdd ? pDesc->GetLeftFmt() : pDesc->GetRightFmt();
+ if (bFirst)
+ pFmtWish = bOdd ? pDesc->GetRightFmt() : pDesc->GetLeftFmt();
+ if (!pFmtWish)
+ pFmtWish = bOdd ? pDesc->GetLeftFmt() : pDesc->GetRightFmt();
if ( pPage->GetFmt() != pFmtWish )
pPage->SetFrmFmt( pFmtWish );
}
More information about the Libreoffice-commits
mailing list