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:05:55 +0100 |
commit | 1b67d91b0065c46ca7b36db0836c9159ca8b50cf (patch) | |
tree | d7a46ed70e6b1b4d1b22fe8cba89496f3a6c0f7f | |
parent | 4dd309ed472f4860ed60ccdd38226c3fcbdfb59d (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.
-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..2c9a4b7aa654 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->GetRightFmt(); + if (!pFmtWish) + pFmtWish = bOdd ? pDesc->GetLeftFmt() : pDesc->GetRightFmt(); if ( pPage->GetFmt() != pFmtWish ) pPage->SetFrmFmt( pFmtWish ); } |