diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-12-18 11:17:06 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-12-18 12:50:42 +0100 |
commit | 1c717cbc41174c2e86f649f1045c1d023e9d19a7 (patch) | |
tree | dbbc501c5e39024dcbdc4818640ca1e81e2991b2 | |
parent | 0ec4ca54bd11752f3bc91b6e785053287c3618d9 (diff) |
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)
-rw-r--r-- | sw/source/core/layout/pagechg.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 8509a40f3fe8..54b2f223f1b9 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 ); } |