diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-03-15 22:25:17 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-03-18 09:01:01 +0000 |
commit | 75d6eec4be88194126d31fc0f235cd3a303936bd (patch) | |
tree | 2cbc17a210d0ed03b6cb4733ddcda73ac04b28f1 /sw/source/ui/docvw/HeaderFooterWin.cxx | |
parent | 2a2ada8fcfeb18b91599a8fb09f3c2081e66abe6 (diff) |
fdo#61952: sw: fix left/right-only page styles and first-page
- remove PD_FIRST and GetFirstFmt:
This flag makes no sense at all, since there are no "first-only"
page styles (while there are left-only/right-only).
- instead add a parameter to GetLeftFmt/GetRightFmt to request a
first page format, if such exists and is not shared
(regression from 02a934d03b101ce463a232f9cbb7b43e684de37e
and fa0f42bafbf24e9141ddee728b160b5ab47077f2)
Change-Id: I4d50c2c0cc4f3cf231eacba891df22d0bcf6c4df
(cherry picked from commit 4dc78aee9bcdb6ea5e9dc47ebb4a4b9e590c725a)
Reviewed-on: https://gerrit.libreoffice.org/2764
Tested-by: Miklos Vajna <vmiklos@suse.cz>
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Diffstat (limited to 'sw/source/ui/docvw/HeaderFooterWin.cxx')
-rw-r--r-- | sw/source/ui/docvw/HeaderFooterWin.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sw/source/ui/docvw/HeaderFooterWin.cxx b/sw/source/ui/docvw/HeaderFooterWin.cxx index 25e291384ed9..03f3b95c1931 100644 --- a/sw/source/ui/docvw/HeaderFooterWin.cxx +++ b/sw/source/ui/docvw/HeaderFooterWin.cxx @@ -394,11 +394,10 @@ bool SwHeaderFooterWin::IsEmptyHeaderFooter( ) // Actually check it const SwPageDesc* pDesc = GetPageFrame()->GetPageDesc(); - const SwFrmFmt* pFmt = pDesc->GetLeftFmt(); - if ( GetPageFrame()->OnRightPage() ) - pFmt = pDesc->GetRightFmt(); - if ( GetPageFrame()->OnFirstPage() ) - pFmt = pDesc->GetFirstFmt(); + bool const bFirst(GetPageFrame()->OnFirstPage()); + const SwFrmFmt *const pFmt = (GetPageFrame()->OnRightPage()) + ? pDesc->GetRightFmt(bFirst) + : pDesc->GetLeftFmt(bFirst); if ( pFmt ) { |