From 1b67d91b0065c46ca7b36db0836c9159ca8b50cf Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 18 Dec 2012 11:17:06 +0100 Subject: 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. --- sw/source/core/layout/pagechg.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sw') 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 ); } -- cgit