From eee2786a37a1f23f454512c3fcf7e282705f7845 Mon Sep 17 00:00:00 2001 From: Werner Koerner Date: Wed, 19 Dec 2012 11:26:30 +0100 Subject: [PATCH] fdo#57881 synchronize namespace nsUseOnPage to SvxPageUsage Synchronize constants in svx/inc/svx/pageitem.hxx (enum SvxPageUsage) and sw/inc/pagedesc.hxx (namespace nsUseOnPage). Change-Id: I9bcb7a32cd1e2156a73db98f4ad98d09ac4bfd68 --- sw/inc/pagedesc.hxx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx index b6c40a8..5a300a3 100644 --- a/sw/inc/pagedesc.hxx +++ b/sw/inc/pagedesc.hxx @@ -112,15 +112,17 @@ public: * document (contents are created or removed according to SHARE-information). */ +// this needs to be synchronized with enum SvxPageUsage in file +// svx/inc/svx/pageitem.hxx. Do not use 0x0008 here because +// enum SvxPageUsage is used with a fixed mask 0f 0x000F in many places. typedef sal_uInt16 UseOnPage; namespace nsUseOnPage { const UseOnPage PD_NONE = 0x0000; ///< For internal use only. const UseOnPage PD_LEFT = 0x0001; const UseOnPage PD_RIGHT = 0x0002; - const UseOnPage PD_FIRST = 0x0004; - const UseOnPage PD_ALL = 0x0007; - const UseOnPage PD_MIRROR = 0x000F; + const UseOnPage PD_ALL = 0x0003; + const UseOnPage PD_MIRROR = 0x0007; const UseOnPage PD_HEADERSHARE = 0x0040; const UseOnPage PD_FOOTERSHARE = 0x0080; const UseOnPage PD_NOHEADERSHARE = 0xFFBF; ///< For internal use only. @@ -323,11 +325,13 @@ inline const SwFrmFmt *SwPageDesc::GetLeftFmt() const } inline SwFrmFmt *SwPageDesc::GetFirstFmt() { - return nsUseOnPage::PD_FIRST & eUse ? &aFirst : 0; +// return nsUseOnPage::PD_FIRST & eUse ? &aFirst : 0; + return nsUseOnPage::PD_FIRSTSHARE & eUse ? 0 : &aFirst; } inline const SwFrmFmt *SwPageDesc::GetFirstFmt() const { - return nsUseOnPage::PD_FIRST & eUse ? &aFirst : 0; +// return nsUseOnPage::PD_FIRST & eUse ? &aFirst : 0; + return nsUseOnPage::PD_FIRSTSHARE & eUse ? 0 : &aFirst; } class SwPageDescExt -- 1.7.10.4