diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-12 11:34:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-12 11:41:36 +0200 |
commit | cbd4266beff52cf210f1532b50f8bab74cb8ba8c (patch) | |
tree | 4f0b2c67f1cacfa67b8626b1060e488891e48564 /sw/source | |
parent | 8ee31c5aac07a28a8208b4c2ca62025f3dafbb35 (diff) |
convert PD_ constants to typed_flags
Change-Id: Ia651dfae33cb1e901f124541a1e12f240d4a7458
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/doc/DocumentStylePoolManager.cxx | 16 | ||||
-rw-r--r-- | sw/source/core/doc/docdesc.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/docnode/node.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/edit/autofmt.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/layout/pagedesc.cxx | 14 | ||||
-rw-r--r-- | sw/source/core/unocore/unostyle.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxexport.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfexport.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8sty.cxx | 24 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 10 | ||||
-rw-r--r-- | sw/source/ui/chrdlg/break.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/app/appenv.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/app/applab.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewmdi.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewtab.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/utlui/uitool.cxx | 30 |
16 files changed, 63 insertions, 63 deletions
diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx index cffded83b77e..5e1f71b6c446 100644 --- a/sw/source/core/doc/DocumentStylePoolManager.cxx +++ b/sw/source/core/doc/DocumentStylePoolManager.cxx @@ -1428,7 +1428,7 @@ SwPageDesc* DocumentStylePoolManager::GetPageDescFromPool( sal_uInt16 nId, bool { aSet.Put( aLR ); aSet.Put( aUL ); - pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL | nsUseOnPage::PD_FIRSTSHARE ); + pNewPgDsc->SetUseOn( UseOnPage::All | UseOnPage::FirstShare ); } break; @@ -1438,7 +1438,7 @@ SwPageDesc* DocumentStylePoolManager::GetPageDescFromPool( sal_uInt16 nId, bool lcl_PutStdPageSizeIntoItemSet( &m_rDoc, aSet ); aSet.Put( aLR ); aSet.Put( aUL ); - pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL ); + pNewPgDsc->SetUseOn( UseOnPage::All ); if( RES_POOLPAGE_FIRST == nId ) pNewPgDsc->SetFollow( GetPageDescFromPool( RES_POOLPAGE_STANDARD )); } @@ -1450,7 +1450,7 @@ SwPageDesc* DocumentStylePoolManager::GetPageDescFromPool( sal_uInt16 nId, bool aSet.Put( aLR ); aSet.Put( aUL ); bSetLeft = false; - pNewPgDsc->SetUseOn( nsUseOnPage::PD_LEFT ); + pNewPgDsc->SetUseOn( UseOnPage::Left ); // this relies on GetPageDescFromPool() not going into infinite recursion // (by this point RES_POOLPAGE_LEFT will not reach this place again) pNewPgDsc->SetFollow( GetPageDescFromPool( RES_POOLPAGE_RIGHT )); @@ -1462,7 +1462,7 @@ SwPageDesc* DocumentStylePoolManager::GetPageDescFromPool( sal_uInt16 nId, bool aSet.Put( aLR ); aSet.Put( aUL ); bSetLeft = false; - pNewPgDsc->SetUseOn( nsUseOnPage::PD_RIGHT ); + pNewPgDsc->SetUseOn( UseOnPage::Right ); pNewPgDsc->SetFollow( GetPageDescFromPool( RES_POOLPAGE_LEFT )); } break; @@ -1477,7 +1477,7 @@ SwPageDesc* DocumentStylePoolManager::GetPageDescFromPool( sal_uInt16 nId, bool aSet.Put( aLR ); aSet.Put( aUL ); - pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL ); + pNewPgDsc->SetUseOn( UseOnPage::All ); pNewPgDsc->SetLandscape( true ); } break; @@ -1491,7 +1491,7 @@ SwPageDesc* DocumentStylePoolManager::GetPageDescFromPool( sal_uInt16 nId, bool aSet.Put( aLR ); aSet.Put( aUL ); - pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL ); + pNewPgDsc->SetUseOn( UseOnPage::All ); } break; @@ -1501,7 +1501,7 @@ SwPageDesc* DocumentStylePoolManager::GetPageDescFromPool( sal_uInt16 nId, bool lcl_PutStdPageSizeIntoItemSet( &m_rDoc, aSet ); aSet.Put( aLR ); aSet.Put( aUL ); - pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL ); + pNewPgDsc->SetUseOn( UseOnPage::All ); SwPageFootnoteInfo aInf( pNewPgDsc->GetFootnoteInfo() ); aInf.SetLineWidth( 0 ); aInf.SetTopDist( 0 ); @@ -1523,7 +1523,7 @@ SwPageDesc* DocumentStylePoolManager::GetPageDescFromPool( sal_uInt16 nId, bool aSet.Put( aFrameSz ); aSet.Put( aLR ); aSet.Put( aUL ); - pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL ); + pNewPgDsc->SetUseOn( UseOnPage::All ); pNewPgDsc->SetLandscape( true ); } break; diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx index aebf76989a6f..7d3d6fb29c0e 100644 --- a/sw/source/core/doc/docdesc.cxx +++ b/sw/source/core/doc/docdesc.cxx @@ -391,7 +391,7 @@ void SwDoc::ChgPageDesc( size_t i, const SwPageDesc &rChged ) ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo()); // Mirror at first if needed. - if ( rChged.GetUseOn() == nsUseOnPage::PD_MIRROR ) + if ( rChged.GetUseOn() == UseOnPage::Mirror ) const_cast<SwPageDesc&>(rChged).Mirror(); else { diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index c9bdc8bd17c1..8ab388cc3a63 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -592,12 +592,12 @@ const SwPageDesc* SwNode::FindPageDesc( size_t* pPgDescNdIdx ) const if( SwHeaderStartNode == pSttNd->GetStartNodeType()) { nId = RES_HEADER; - eAskUse = nsUseOnPage::PD_HEADERSHARE; + eAskUse = UseOnPage::HeaderShare; } else { nId = RES_FOOTER; - eAskUse = nsUseOnPage::PD_FOOTERSHARE; + eAskUse = UseOnPage::FooterShare; } for( size_t n = pDoc->GetPageDescCnt(); n && !pPgDesc; ) diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index 08c350a5c98d..1109e5da80fa 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -1057,7 +1057,7 @@ bool SwAutoFormat::HasBreakAttr( const SwTextNode& rTextNd ) if( SfxItemState::SET == pSet->GetItemState( RES_PAGEDESC, false, &pItem ) && static_cast<const SwFormatPageDesc*>(pItem)->GetPageDesc() - && nsUseOnPage::PD_NONE != static_cast<const SwFormatPageDesc*>(pItem)->GetPageDesc()->GetUseOn() ) + && UseOnPage::NONE != static_cast<const SwFormatPageDesc*>(pItem)->GetPageDesc()->GetUseOn() ) return true; return false; } diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx index c5dce205be03..62784e021393 100644 --- a/sw/source/core/layout/pagedesc.cxx +++ b/sw/source/core/layout/pagedesc.cxx @@ -48,7 +48,7 @@ SwPageDesc::SwPageDesc(const OUString& rName, SwFrameFormat *pFormat, SwDoc *con , m_nRegHeight( 0 ) , m_nRegAscent( 0 ) , m_nVerticalAdjustment( drawing::TextVerticalAdjust_TOP ) - , m_eUse( (UseOnPage)(nsUseOnPage::PD_ALL | nsUseOnPage::PD_HEADERSHARE | nsUseOnPage::PD_FOOTERSHARE | nsUseOnPage::PD_FIRSTSHARE) ) + , m_eUse( UseOnPage::All | UseOnPage::HeaderShare | UseOnPage::FooterShare | UseOnPage::FirstShare ) , m_IsLandscape( false ) , m_IsHidden( false ) , m_pdList( nullptr ) @@ -324,29 +324,29 @@ bool SwPageDesc::IsFollowNextPageOfNode( const SwNode& rNd ) const SwFrameFormat *SwPageDesc::GetLeftFormat(bool const bFirst) { - return (nsUseOnPage::PD_LEFT & m_eUse) + return (UseOnPage::Left & m_eUse) ? ((bFirst) ? &m_FirstLeft : &m_Left) : nullptr; } SwFrameFormat *SwPageDesc::GetRightFormat(bool const bFirst) { - return (nsUseOnPage::PD_RIGHT & m_eUse) - ? ((bFirst) ? &m_FirstMaster : &m_Master) + return (UseOnPage::Right & m_eUse) + ? (bFirst ? &m_FirstMaster : &m_Master) : nullptr; } bool SwPageDesc::IsFirstShared() const { - return (m_eUse & nsUseOnPage::PD_FIRSTSHARE) != 0; + return bool(m_eUse & UseOnPage::FirstShare); } void SwPageDesc::ChgFirstShare( bool bNew ) { if ( bNew ) - m_eUse = (UseOnPage) (m_eUse | nsUseOnPage::PD_FIRSTSHARE); + m_eUse |= UseOnPage::FirstShare; else - m_eUse = (UseOnPage) (m_eUse & nsUseOnPage::PD_NOFIRSTSHARE); + m_eUse &= UseOnPage::NoFirstShare; } SwPageDesc* SwPageDesc::GetByName(SwDoc& rDoc, const OUString& rName) diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 9ac1673f5d58..382255ec854c 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -2655,7 +2655,7 @@ void SAL_CALL SwXStyle::setAllPropertiesToDefault() if(pDesc) { pPageFormat = &pDesc->GetMaster(); - pDesc->SetUseOn(nsUseOnPage::PD_ALL); + pDesc->SetUseOn(UseOnPage::All); } else pPageFormat = lcl_GetFormatForStyle(m_pDoc, xStyle, m_rEntry.m_eFamily); diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 8373fef89194..c36139ca31ac 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -1312,7 +1312,7 @@ void DocxExport::WriteEmbeddings() bool DocxExport::isMirroredMargin() { bool bMirroredMargins = false; - if ( nsUseOnPage::PD_MIRROR == (nsUseOnPage::PD_MIRROR & m_pDoc->GetPageDesc(0).ReadUseOn()) ) + if ( UseOnPage::Mirror == (UseOnPage::Mirror & m_pDoc->GetPageDesc(0).ReadUseOn()) ) { bMirroredMargins = true; } diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index a885d8e1d1ff..850b0d7f9f05 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -543,7 +543,7 @@ void RtfExport::WritePageDescTable() Strm().WriteCharPtr(SAL_NEWLINE_STRING).WriteChar('{').WriteCharPtr(OOO_STRING_SVTOOLS_RTF_PGDSC); OutULong(n).WriteCharPtr(OOO_STRING_SVTOOLS_RTF_PGDSCUSE); - OutULong(rPageDesc.ReadUseOn()); + OutULong((sal_uLong)rPageDesc.ReadUseOn()); OutPageDescription(rPageDesc, false, false); @@ -613,7 +613,7 @@ void RtfExport::ExportDocument_Impl() if (RedlineFlags::On & m_nOrigRedlineFlags) Strm().WriteCharPtr(OOO_STRING_SVTOOLS_RTF_REVISIONS); // Mirror margins? - if ((nsUseOnPage::PD_MIRROR & m_pDoc->GetPageDesc(0).ReadUseOn()) == nsUseOnPage::PD_MIRROR) + if ((UseOnPage::Mirror & m_pDoc->GetPageDesc(0).ReadUseOn()) == UseOnPage::Mirror) Strm().WriteCharPtr(OOO_STRING_SVTOOLS_RTF_MARGMIRROR); // Init sections m_pSections = new MSWordSections(*this); diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 7479d3ec5080..8386c037eccb 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -1276,10 +1276,10 @@ void MSWordSections::CheckForFacinPg( WW8Export& rWrt ) const else if( !( 1 & nEnde ) && pPd->GetFollow() && pPd != pPd->GetFollow() && pPd->GetFollow()->GetFollow() == pPd && - (( nsUseOnPage::PD_LEFT == ( nsUseOnPage::PD_ALL & pPd->ReadUseOn() ) && - nsUseOnPage::PD_RIGHT == ( nsUseOnPage::PD_ALL & pPd->GetFollow()->ReadUseOn() )) || - ( nsUseOnPage::PD_RIGHT == ( nsUseOnPage::PD_ALL & pPd->ReadUseOn() ) && - nsUseOnPage::PD_LEFT == ( nsUseOnPage::PD_ALL & pPd->GetFollow()->ReadUseOn() )) )) + (( UseOnPage::Left == ( UseOnPage::All & pPd->ReadUseOn() ) && + UseOnPage::Right == ( UseOnPage::All & pPd->GetFollow()->ReadUseOn() )) || + ( UseOnPage::Right == ( UseOnPage::All & pPd->ReadUseOn() ) && + UseOnPage::Left == ( UseOnPage::All & pPd->GetFollow()->ReadUseOn() )) )) { rWrt.pDop->fFacingPages = rWrt.pDop->fMirrorMargins = true; nEnde |= 1; @@ -1292,7 +1292,7 @@ void MSWordSections::CheckForFacinPg( WW8Export& rWrt ) const nEnde |= 1; } if( !( 2 & nEnde ) && - nsUseOnPage::PD_MIRROR == ( nsUseOnPage::PD_MIRROR & pPd->ReadUseOn() )) + UseOnPage::Mirror == ( UseOnPage::Mirror & pPd->ReadUseOn() )) { rWrt.pDop->fSwapBordersFacingPgs = rWrt.pDop->fMirrorMargins = true; @@ -1657,16 +1657,16 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt // left-/right chain of pagedescs ? if ( pPd->GetFollow() && pPd != pPd->GetFollow() && pPd->GetFollow()->GetFollow() == pPd && - (( nsUseOnPage::PD_LEFT == ( nsUseOnPage::PD_ALL & pPd->ReadUseOn() ) && - nsUseOnPage::PD_RIGHT == ( nsUseOnPage::PD_ALL & pPd->GetFollow()->ReadUseOn() )) || - ( nsUseOnPage::PD_RIGHT == ( nsUseOnPage::PD_ALL & pPd->ReadUseOn() ) && - nsUseOnPage::PD_LEFT == ( nsUseOnPage::PD_ALL & pPd->GetFollow()->ReadUseOn() )) )) + (( UseOnPage::Left == ( UseOnPage::All & pPd->ReadUseOn() ) && + UseOnPage::Right == ( UseOnPage::All & pPd->GetFollow()->ReadUseOn() )) || + ( UseOnPage::Right == ( UseOnPage::All & pPd->ReadUseOn() ) && + UseOnPage::Left == ( UseOnPage::All & pPd->GetFollow()->ReadUseOn() )) )) { bLeftRightPgChain = true; // which is the reference point? (left or right?) // assume it is on the right side! - if ( nsUseOnPage::PD_LEFT == ( nsUseOnPage::PD_ALL & pPd->ReadUseOn() ) ) + if ( UseOnPage::Left == ( UseOnPage::All & pPd->ReadUseOn() ) ) { nBreakCode = 3; pPd = pPd->GetFollow(); @@ -1688,9 +1688,9 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt // werden es nur linke oder nur rechte Seiten? if ( 2 == nBreakCode ) { - if ( nsUseOnPage::PD_LEFT == ( nsUseOnPage::PD_ALL & pPd->ReadUseOn() ) ) + if ( UseOnPage::Left == ( UseOnPage::All & pPd->ReadUseOn() ) ) nBreakCode = 3; - else if ( nsUseOnPage::PD_RIGHT == ( nsUseOnPage::PD_ALL & pPd->ReadUseOn() ) ) + else if ( UseOnPage::Right == ( UseOnPage::All & pPd->ReadUseOn() ) ) nBreakCode = 4; } } diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 0d67089799ca..1bb031e8b3cc 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -4355,12 +4355,12 @@ void wwSectionManager::SetUseOn(wwSection &rSection) bool bMirror = mrReader.m_pWDop->fMirrorMargins || mrReader.m_pWDop->doptypography.f2on1; - UseOnPage eUseBase = bMirror ? nsUseOnPage::PD_MIRROR : nsUseOnPage::PD_ALL; + UseOnPage eUseBase = bMirror ? UseOnPage::Mirror : UseOnPage::All; UseOnPage eUse = eUseBase; if (!mrReader.m_pWDop->fFacingPages) - eUse = (UseOnPage)(eUse | nsUseOnPage::PD_HEADERSHARE | nsUseOnPage::PD_FOOTERSHARE); + eUse |= UseOnPage::HeaderShare | UseOnPage::FooterShare; if (!rSection.HasTitlePage()) - eUse = (UseOnPage)(eUse | nsUseOnPage::PD_FIRSTSHARE); + eUse |= UseOnPage::FirstShare; OSL_ENSURE(rSection.mpPage, "Makes no sense to call me with no pages to set"); if (rSection.mpPage) @@ -4533,9 +4533,9 @@ void wwSectionManager::InsertSegments() *aIter = aTmpSection; // Handle the section break - UseOnPage eUseOnPage = nsUseOnPage::PD_LEFT; + UseOnPage eUseOnPage = UseOnPage::Left; if ( aIter->maSep.bkc == 4 ) // Odd ( right ) Section break - eUseOnPage = nsUseOnPage::PD_RIGHT; + eUseOnPage = UseOnPage::Right; // Keep the share flags. aDesc.GetPageDesc()->SetUseOn( eUseOnPage ); diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx index 5eb010c3d202..46641a942f78 100644 --- a/sw/source/ui/chrdlg/break.cxx +++ b/sw/source/ui/chrdlg/break.cxx @@ -107,10 +107,10 @@ IMPL_LINK_NOARG(SwBreakDlg, OkHdl, Button*, void) bool bOk = true; switch(pPageDesc->GetUseOn()) { - case nsUseOnPage::PD_MIRROR: - case nsUseOnPage::PD_ALL: break; - case nsUseOnPage::PD_LEFT: bOk = 0 == nUserPage % 2; break; - case nsUseOnPage::PD_RIGHT: bOk = 1 == nUserPage % 2; break; + case UseOnPage::Mirror: + case UseOnPage::All: break; + case UseOnPage::Left: bOk = 0 == nUserPage % 2; break; + case UseOnPage::Right: bOk = 1 == nUserPage % 2; break; default:; //prevent warning } if(!bOk) { diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx index eef978327342..53eaa8742879 100644 --- a/sw/source/uibase/app/appenv.cxx +++ b/sw/source/uibase/app/appenv.cxx @@ -386,7 +386,7 @@ void SwModule::InsertEnv( SfxRequest& rReq ) pDesc->ChgFooterShare(false); // Page numbering - pDesc->SetUseOn(nsUseOnPage::PD_ALL); + pDesc->SetUseOn(UseOnPage::All); // Page size rFormat.SetFormatAttr(SwFormatFrameSize(ATT_FIX_SIZE, diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx index 6cf5c41718fd..0da222366914 100644 --- a/sw/source/uibase/app/applab.cxx +++ b/sw/source/uibase/app/applab.cxx @@ -256,7 +256,7 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel) rFormat.SetFormatAttr(SwFormatFooter(false)); aDesc.ChgFooterShare(false); - aDesc.SetUseOn(nsUseOnPage::PD_ALL); // Site numbering + aDesc.SetUseOn(UseOnPage::All); // Site numbering // Set page size long lPgWidth, lPgHeight; diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx index c416a6631bcb..27985eb84a94 100644 --- a/sw/source/uibase/uiview/viewmdi.cxx +++ b/sw/source/uibase/uiview/viewmdi.cxx @@ -105,7 +105,7 @@ void SwView::SetZoom_( const Size &rEditSize, SvxZoomType eZoomType, const MapMode aTmpMap( MapUnit::MapTwip ); const Size aWindowSize( GetEditWin().PixelToLogic( rEditSize, aTmpMap ) ); - if( nsUseOnPage::PD_MIRROR == rDesc.GetUseOn() ) // mirrored pages + if( UseOnPage::Mirror == rDesc.GetUseOn() ) // mirrored pages { const SvxLRSpaceItem &rLeftLRSpace = rDesc.GetLeft().GetLRSpace(); aPageSize.Width() += std::abs( long(rLeftLRSpace.GetLeft()) - long(rLRSpace.GetLeft()) ); diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx index 799a6d8ce1a8..84eaceb7ef29 100644 --- a/sw/source/uibase/uiview/viewtab.cxx +++ b/sw/source/uibase/uiview/viewtab.cxx @@ -168,7 +168,7 @@ void SwView::SwapPageMargin(const SwPageDesc& rDesc, SvxLRSpaceItem& rLRSpace) sal_uInt16 nPhyPage, nVirPage; GetWrtShell().GetPageNum( nPhyPage, nVirPage ); - if ( rDesc.GetUseOn() == nsUseOnPage::PD_MIRROR && (nPhyPage % 2) == 0 ) + if ( rDesc.GetUseOn() == UseOnPage::Mirror && (nPhyPage % 2) == 0 ) { long nTmp = rLRSpace.GetRight(); rLRSpace.SetRight( rLRSpace.GetLeft() ); diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx index 173fa4ffd309..571b0ba394f1 100644 --- a/sw/source/uibase/utlui/uitool.cxx +++ b/sw/source/uibase/utlui/uitool.cxx @@ -232,32 +232,32 @@ void FillHdFt(SwFrameFormat* pFormat, const SfxItemSet& rSet) } /// Convert from UseOnPage to SvxPageUsage. -UseOnPage lcl_convertUseToSvx(UseOnPage nUse) +SvxPageUsage lcl_convertUseToSvx(UseOnPage nUse) { - UseOnPage nRet = nsUseOnPage::PD_NONE; - if ((nUse & nsUseOnPage::PD_LEFT) == nsUseOnPage::PD_LEFT) + int nRet = 0; + if (nUse & UseOnPage::Left) nRet |= SVX_PAGE_LEFT; - if ((nUse & nsUseOnPage::PD_RIGHT) == nsUseOnPage::PD_RIGHT) + if (nUse & UseOnPage::Right) nRet |= SVX_PAGE_RIGHT; - if ((nUse & nsUseOnPage::PD_ALL) == nsUseOnPage::PD_ALL) + if ((nUse & UseOnPage::All) == UseOnPage::All) nRet |= SVX_PAGE_ALL; - if ((nUse & nsUseOnPage::PD_MIRROR) == nsUseOnPage::PD_MIRROR) + if ((nUse & UseOnPage::Mirror) == UseOnPage::Mirror) nRet |= SVX_PAGE_MIRROR; - return nRet; + return (SvxPageUsage)nRet; } /// Convert from SvxPageUsage to UseOnPage. -UseOnPage lcl_convertUseFromSvx(UseOnPage nUse) +UseOnPage lcl_convertUseFromSvx(SvxPageUsage nUse) { - UseOnPage nRet = nsUseOnPage::PD_NONE; + UseOnPage nRet = UseOnPage::NONE; if ((nUse & SVX_PAGE_LEFT) == SVX_PAGE_LEFT) - nRet |= nsUseOnPage::PD_LEFT; + nRet |= UseOnPage::Left; if ((nUse & SVX_PAGE_RIGHT) == SVX_PAGE_RIGHT) - nRet |= nsUseOnPage::PD_RIGHT; + nRet |= UseOnPage::Right; if ((nUse & SVX_PAGE_ALL) == SVX_PAGE_ALL) - nRet |= nsUseOnPage::PD_ALL; + nRet |= UseOnPage::All; if ((nUse & SVX_PAGE_MIRROR) == SVX_PAGE_MIRROR) - nRet |= nsUseOnPage::PD_MIRROR; + nRet |= UseOnPage::Mirror; return nRet; } @@ -276,9 +276,9 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) { const SvxPageItem& rPageItem = static_cast<const SvxPageItem&>(rSet.Get(SID_ATTR_PAGE)); - const sal_uInt16 nUse = rPageItem.GetPageUsage(); + const SvxPageUsage nUse = (SvxPageUsage)rPageItem.GetPageUsage(); if(nUse) - rPageDesc.SetUseOn( lcl_convertUseFromSvx((UseOnPage) nUse) ); + rPageDesc.SetUseOn( lcl_convertUseFromSvx(nUse) ); rPageDesc.SetLandscape(rPageItem.IsLandscape()); SvxNumberType aNumType; aNumType.SetNumberingType( static_cast< sal_Int16 >(rPageItem.GetNumType()) ); |