diff options
author | Noel Grandin <noel@peralex.com> | 2015-01-09 10:04:38 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-01-09 10:06:17 +0200 |
commit | 901e5c3a21a1299d10c44bc844246fe8c329bb82 (patch) | |
tree | 358ff817974d0eb5c047aa28fe83a2c1871f756b /sw/source/uibase/uiview | |
parent | cd9e2ecba38c31eb30e05d3ee2c9f4629dd89d40 (diff) |
fdo#84938: convert FRMTYPE_ #defines to 'enum class'
and consequently fix bug in SwPageFrm::PreparePage where it was
comparing against the wrong #define's
Change-Id: I681f7e9f3f9bbe1ddf2613814ed36cfe0955825f
Diffstat (limited to 'sw/source/uibase/uiview')
-rw-r--r-- | sw/source/uibase/uiview/view.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewling.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewport.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewstat.cxx | 10 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewtab.cxx | 102 |
5 files changed, 63 insertions, 63 deletions
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index d9c8990d9c0f..9838bc9f3c48 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -1103,7 +1103,7 @@ void SwView::WriteUserData( OUString &rUserData, bool bBrowse ) rUserData += OUString::number( (sal_uInt16)m_pWrtShell->GetViewOptions()->GetZoomType());//eZoom; rUserData += ";"; - rUserData += FRMTYPE_NONE == m_pWrtShell->GetSelFrmType() ? OUString("0") : OUString("1"); + rUserData += FrmTypeFlags::NONE == m_pWrtShell->GetSelFrmType() ? OUString("0") : OUString("1"); } // Set CursorPos @@ -1261,7 +1261,7 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue > bool bViewLayoutBookMode = pVOpt->IsViewLayoutBookMode(); sal_Int16 nViewLayoutColumns = pVOpt->GetViewLayoutColumns(); - bool bSelectedFrame = ( m_pWrtShell->GetSelFrmType() != FRMTYPE_NONE ), + bool bSelectedFrame = ( m_pWrtShell->GetSelFrmType() != FrmTypeFlags::NONE ), bGotVisibleLeft = false, bGotVisibleTop = false, bGotVisibleRight = false, bGotVisibleBottom = false, bGotZoomType = false, @@ -1516,7 +1516,7 @@ void SwView::WriteUserDataSequence ( uno::Sequence < beans::PropertyValue >& rSe pValue++;nIndex++; pValue->Name = "IsSelectedFrame"; - pValue->Value <<= FRMTYPE_NONE != m_pWrtShell->GetSelFrmType(); + pValue->Value <<= FrmTypeFlags::NONE != m_pWrtShell->GetSelFrmType(); nIndex++; assert(nIndex == NUM_VIEW_SETTINGS); diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx index 17cb15b06cbc..9003e424d298 100644 --- a/sw/source/uibase/uiview/viewling.cxx +++ b/sw/source/uibase/uiview/viewling.cxx @@ -246,7 +246,7 @@ void SwView::StartTextConversion( m_pWrtShell->GetCrsr() != m_pWrtShell->GetCrsr()->GetNext(); const bool bStart = bSelection || m_pWrtShell->IsStartOfDoc(); - const bool bOther = !bSelection && !(m_pWrtShell->GetFrmType(0,true) & FRMTYPE_BODY); + const bool bOther = !bSelection && !(m_pWrtShell->GetFrmType(0,true) & FrmTypeFlags::BODY); { const uno::Reference< uno::XComponentContext > xContext( @@ -455,7 +455,7 @@ void SwView::HyphenateDocument() bool bOther = m_pWrtShell->HasOtherCnt() && bHyphSpecial && !bSelection; bool bStart = bSelection || ( !bOther && m_pWrtShell->IsStartOfDoc() ); bool bStop = false; - if( !bOther && !(m_pWrtShell->GetFrmType(0,true) & FRMTYPE_BODY) && !bSelection ) + if( !bOther && !(m_pWrtShell->GetFrmType(0,true) & FrmTypeFlags::BODY) && !bSelection ) // turned on no special area { // I want also in special areas hyphenation diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx index 4280ad80b6ce..868072865ad3 100644 --- a/sw/source/uibase/uiview/viewport.cxx +++ b/sw/source/uibase/uiview/viewport.cxx @@ -623,8 +623,8 @@ long SwView::PageUpCrsr( bool bSelect ) { if ( !bSelect ) { - const sal_uInt16 eType = m_pWrtShell->GetFrmType(0,true); - if ( eType & FRMTYPE_FOOTNOTE ) + const FrmTypeFlags eType = m_pWrtShell->GetFrmType(0,true); + if ( eType & FrmTypeFlags::FOOTNOTE ) { m_pWrtShell->MoveCrsr(); m_pWrtShell->GotoFtnAnchor(); diff --git a/sw/source/uibase/uiview/viewstat.cxx b/sw/source/uibase/uiview/viewstat.cxx index 161892a276aa..875b7b473858 100644 --- a/sw/source/uibase/uiview/viewstat.cxx +++ b/sw/source/uibase/uiview/viewstat.cxx @@ -68,7 +68,7 @@ void SwView::GetState(SfxItemSet &rSet) { SfxWhichIter aIter(rSet); sal_uInt16 nWhich = aIter.FirstWhich(); - sal_uInt16 eFrmType = FRMTYPE_NONE; + FrmTypeFlags eFrmType = FrmTypeFlags::NONE; bool bGetFrmType = false; bool bWeb = 0 != PTR_CAST(SwWebView, this); @@ -101,7 +101,7 @@ void SwView::GetState(SfxItemSet &rSet) eFrmType = m_pWrtShell->GetFrmType(0, true); bGetFrmType = true; } - if (! ( ((eFrmType & FRMTYPE_FLY_ANY) && m_nSelectionType != nsSelectionType::SEL_DRW_TXT)|| + if (! ( ((eFrmType & FrmTypeFlags::FLY_ANY) && m_nSelectionType != nsSelectionType::SEL_DRW_TXT)|| m_nSelectionType & nsSelectionType::SEL_TBL || m_nSelectionType & nsSelectionType::SEL_DRW) ) { @@ -130,9 +130,9 @@ void SwView::GetState(SfxItemSet &rSet) case FN_CHANGE_PAGENUM: { - sal_uInt16 nType = m_pWrtShell->GetFrmType(0,true); - if( ( FRMTYPE_FLY_ANY | FRMTYPE_HEADER | FRMTYPE_FOOTER | - FRMTYPE_FOOTNOTE | FRMTYPE_DRAWOBJ ) & nType ) + FrmTypeFlags nType = m_pWrtShell->GetFrmType(0,true); + if( ( FrmTypeFlags::FLY_ANY | FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER | + FrmTypeFlags::FOOTNOTE | FrmTypeFlags::DRAWOBJ ) & nType ) rSet.DisableItem(nWhich); else rSet.Put(SfxUInt16Item(nWhich, m_pWrtShell->GetPageOffset())); diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx index e8d99b1d6c7f..0d75a1a149eb 100644 --- a/sw/source/uibase/uiview/viewtab.cxx +++ b/sw/source/uibase/uiview/viewtab.cxx @@ -223,8 +223,8 @@ void ResizeFrameCols(SwFmtCol& rCol, void SwView::ExecTabWin( SfxRequest& rReq ) { SwWrtShell &rSh = GetWrtShell(); - const sal_uInt16 nFrmType = rSh.IsObjSelected() ? - FRMTYPE_DRAWOBJ : + const FrmTypeFlags nFrmType = rSh.IsObjSelected() ? + FrmTypeFlags::DRAWOBJ : rSh.GetFrmType(0,true); const bool bFrmSelection = rSh.IsFrmSelected(); const bool bBrowse = rSh.GetViewOptions()->getBrowseMode(); @@ -249,7 +249,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) bool bUnlockView = false; rSh.StartAllAction(); - bool bSect = 0 != (nFrmType & FRMTYPE_COLSECT); + bool bSect = bool(nFrmType & FrmTypeFlags::COLSECT); switch (nSlot) { @@ -259,7 +259,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) SvxLongLRSpaceItem aLongLR( static_cast<const SvxLongLRSpaceItem&>(pReqArgs-> Get( SID_ATTR_LONG_LRSPACE )) ); SvxLRSpaceItem aLR(RES_LR_SPACE); - if ( !bSect && (bFrmSelection || nFrmType & FRMTYPE_FLY_ANY) ) + if ( !bSect && (bFrmSelection || nFrmType & FrmTypeFlags::FLY_ANY) ) { SwFrmFmt* pFmt = static_cast<SwFrmFmt*>(rSh.GetFlyFrmFmt()); const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED); @@ -309,7 +309,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) aSize.SetWidth( nPageWidth - (aLongLR.GetLeft() + aLongLR.GetRight())); - if( nFrmType & FRMTYPE_COLUMN ) + if( nFrmType & FrmTypeFlags::COLUMN ) { SwFmtCol aCol(pFmt->GetCol()); @@ -331,7 +331,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) rSh.Pop(); rSh.EndAction(); } - else if ( nFrmType & ( FRMTYPE_HEADER | FRMTYPE_FOOTER )) + else if ( nFrmType & ( FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER )) { // Subtract out page margins long nOld = rDesc.GetMaster().GetLRSpace().GetLeft(); @@ -342,12 +342,12 @@ void SwView::ExecTabWin( SfxRequest& rReq ) aLR.SetLeft(aLongLR.GetLeft()); aLR.SetRight(aLongLR.GetRight()); - if ( nFrmType & FRMTYPE_HEADER && pHeaderFmt ) + if ( nFrmType & FrmTypeFlags::HEADER && pHeaderFmt ) pHeaderFmt->SetFmtAttr( aLR ); - else if( nFrmType & FRMTYPE_FOOTER && pFooterFmt ) + else if( nFrmType & FrmTypeFlags::FOOTER && pFooterFmt ) pFooterFmt->SetFmtAttr( aLR ); } - else if( nFrmType == FRMTYPE_DRAWOBJ) + else if( nFrmType == FrmTypeFlags::DRAWOBJ) { SwRect aRect( rSh.GetObjRect() ); aRect.Left( aLongLR.GetLeft() + rPageRect.Left() ); @@ -418,7 +418,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) SvxLongULSpaceItem aLongULSpace( static_cast<const SvxLongULSpaceItem&>(pReqArgs-> Get( SID_ATTR_LONG_ULSPACE ))); - if( bFrmSelection || nFrmType & FRMTYPE_FLY_ANY ) + if( bFrmSelection || nFrmType & FrmTypeFlags::FLY_ANY ) { SwFrmFmt* pFmt = static_cast<SwFrmFmt*>(rSh.GetFlyFrmFmt()); const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED); @@ -460,7 +460,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) aSet.Put( aSize ); rSh.SetFlyFrmAttr( aSet ); } - else if( nFrmType == FRMTYPE_DRAWOBJ ) + else if( nFrmType == FrmTypeFlags::DRAWOBJ ) { SwRect aRect( rSh.GetObjRect() ); aRect.Top( aLongULSpace.GetUpper() + rPageRect.Top() ); @@ -498,10 +498,10 @@ void SwView::ExecTabWin( SfxRequest& rReq ) else { SwPageDesc aDesc( rDesc ); - if ( nFrmType & ( FRMTYPE_HEADER | FRMTYPE_FOOTER )) + if ( nFrmType & ( FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER )) { - const bool bHead = nFrmType & FRMTYPE_HEADER; + const bool bHead = bool(nFrmType & FrmTypeFlags::HEADER); SvxULSpaceItem aUL( rDesc.GetMaster().GetULSpace() ); if ( bHead ) aUL.SetUpper( (sal_uInt16)aLongULSpace.GetUpper() ); @@ -856,7 +856,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) } else { - if ( bFrmSelection || nFrmType & FRMTYPE_FLY_ANY || bSect) + if ( bFrmSelection || nFrmType & FrmTypeFlags::FLY_ANY || bSect) { SwSectionFmt *pSectFmt = 0; SfxItemSet aSet( GetPool(), RES_COL, RES_COL ); @@ -996,8 +996,8 @@ void SwView::StateTabWin(SfxItemSet& rSet) SwWrtShell &rSh = GetWrtShell(); const Point* pPt = IsTabColFromDoc() || IsTabRowFromDoc() ? &m_aTabColFromDocPos : 0; - const sal_uInt16 nFrmType = rSh.IsObjSelected() - ? FRMTYPE_DRAWOBJ + const FrmTypeFlags nFrmType = rSh.IsObjSelected() + ? FrmTypeFlags::DRAWOBJ : rSh.GetFrmType( pPt, true ); const bool bFrmSelection = rSh.IsFrmSelected(); @@ -1092,10 +1092,10 @@ void SwView::StateTabWin(SfxItemSet& rSet) aLongLR.SetLeft(rPagePrtRect.Left()); aLongLR.SetRight(nPageWidth - rPagePrtRect.Right()); } - if ( ( nFrmType & FRMTYPE_HEADER || nFrmType & FRMTYPE_FOOTER ) && - !(nFrmType & FRMTYPE_COLSECT) ) + if ( ( nFrmType & FrmTypeFlags::HEADER || nFrmType & FrmTypeFlags::FOOTER ) && + !(nFrmType & FrmTypeFlags::COLSECT) ) { - SwFrmFmt *pFmt = (SwFrmFmt*) (nFrmType & FRMTYPE_HEADER ? + SwFrmFmt *pFmt = (SwFrmFmt*) (nFrmType & FrmTypeFlags::HEADER ? rDesc.GetMaster().GetHeader().GetHeaderFmt() : rDesc.GetMaster().GetFooter().GetFooterFmt()); if( pFmt )// #i80890# if rDesc is not the one belonging to the current page is might crash @@ -1111,16 +1111,16 @@ void SwView::StateTabWin(SfxItemSet& rSet) else { SwRect aRect; - if( !bFrmSelection && ((nFrmType & FRMTYPE_COLSECT) || rSh.IsDirectlyInSection()) ) + if( !bFrmSelection && ((nFrmType & FrmTypeFlags::COLSECT) || rSh.IsDirectlyInSection()) ) { aRect = rSh.GetAnyCurRect(RECT_SECTION_PRT, pPt); const SwRect aTmpRect = rSh.GetAnyCurRect(RECT_SECTION, pPt); aRect.Pos() += aTmpRect.Pos(); } - else if ( bFrmSelection || nFrmType & FRMTYPE_FLY_ANY ) + else if ( bFrmSelection || nFrmType & FrmTypeFlags::FLY_ANY ) aRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED, pPt); - else if( nFrmType & FRMTYPE_DRAWOBJ) + else if( nFrmType & FrmTypeFlags::DRAWOBJ) aRect = rSh.GetObjRect(); if( aRect.Width() ) @@ -1163,21 +1163,21 @@ void SwView::StateTabWin(SfxItemSet& rSet) (long)aUL.GetLower(), SID_ATTR_LONG_ULSPACE); - if ( bFrmSelection || nFrmType & FRMTYPE_FLY_ANY ) + if ( bFrmSelection || nFrmType & FrmTypeFlags::FLY_ANY ) { // Convert document coordinates into page coordinates. const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED, pPt); aLongUL.SetUpper(rRect.Top() - rPageRect.Top()); aLongUL.SetLower(rPageRect.Bottom() - rRect.Bottom()); } - else if ( nFrmType & FRMTYPE_HEADER || nFrmType & FRMTYPE_FOOTER ) + else if ( nFrmType & FrmTypeFlags::HEADER || nFrmType & FrmTypeFlags::FOOTER ) { SwRect aRect( rSh.GetAnyCurRect( RECT_HEADERFOOTER, pPt)); aRect.Pos() -= rSh.GetAnyCurRect( RECT_PAGE, pPt ).Pos(); aLongUL.SetUpper( aRect.Top() ); aLongUL.SetLower( nPageHeight - aRect.Bottom() ); } - else if( nFrmType & FRMTYPE_DRAWOBJ) + else if( nFrmType & FrmTypeFlags::DRAWOBJ) { const SwRect &rRect = rSh.GetObjRect(); aLongUL.SetUpper((rRect.Top() - rPageRect.Top())); @@ -1251,7 +1251,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) if ( nSelType & nsSelectionType::SEL_GRF || nSelType & nsSelectionType::SEL_FRM || nSelType & nsSelectionType::SEL_OLE || - nFrmType == FRMTYPE_DRAWOBJ || + nFrmType == FrmTypeFlags::DRAWOBJ || (!bVerticalWriting && (SID_ATTR_PARA_LRSPACE_VERTICAL == nWhich)) || ( bVerticalWriting && (SID_ATTR_PARA_LRSPACE == nWhich)) ) @@ -1319,12 +1319,12 @@ void SwView::StateTabWin(SfxItemSet& rSet) if ( nSelType & nsSelectionType::SEL_GRF || nSelType & nsSelectionType::SEL_FRM || nSelType & nsSelectionType::SEL_OLE || - nFrmType == FRMTYPE_DRAWOBJ ) + nFrmType == FrmTypeFlags::DRAWOBJ ) rSet.DisableItem(SID_RULER_BORDER_DISTANCE); else { SvxLRSpaceItem aDistLR(SID_RULER_BORDER_DISTANCE); - if(nFrmType & FRMTYPE_FLY_ANY) + if(nFrmType & FrmTypeFlags::FLY_ANY) { if( IsTabColFromDoc() ) { @@ -1359,7 +1359,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) } else if ( IsTabColFromDoc() || ( rSh.GetTableFmt() && !bFrmSelection && - !(nFrmType & FRMTYPE_COLSECT ) ) ) + !(nFrmType & FrmTypeFlags::COLSECT ) ) ) { SfxItemSet aCoreSet2( GetPool(), RES_BOX, RES_BOX, @@ -1392,7 +1392,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) aDistLR.SetRight(rBox.GetDistance(BOX_LINE_RIGHT)); const SvxBoxItem* pBox = 0; - if(nFrmType & FRMTYPE_HEADER) + if(nFrmType & FrmTypeFlags::HEADER) { rMaster.GetHeader(); const SwFmtHeader& rHeaderFmt = rMaster.GetHeader(); @@ -1400,7 +1400,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) if( pHeaderFmt )// #i80890# if rDesc is not the one belonging to the current page is might crash pBox = & (const SvxBoxItem&)pHeaderFmt->GetBox(); } - else if(nFrmType & FRMTYPE_FOOTER ) + else if(nFrmType & FrmTypeFlags::FOOTER ) { const SwFmtFooter& rFooterFmt = rMaster.GetFooter(); SwFrmFmt *pFooterFmt = (SwFrmFmt*)rFooterFmt.GetFooterFmt(); @@ -1434,7 +1434,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) if ( nSelType & nsSelectionType::SEL_GRF || nSelType & nsSelectionType::SEL_FRM || nSelType & nsSelectionType::SEL_OLE || - nFrmType == FRMTYPE_DRAWOBJ) + nFrmType == FrmTypeFlags::DRAWOBJ) rSet.DisableItem(nWhich); else { @@ -1456,7 +1456,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) } bool bHasTable = ( IsTabColFromDoc() || ( rSh.GetTableFmt() && !bFrmSelection && - !(nFrmType & FRMTYPE_COLSECT ) ) ); + !(nFrmType & FrmTypeFlags::COLSECT ) ) ); bool bTableVertical = bHasTable && rSh.IsTableVertical(); @@ -1538,7 +1538,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) } rSet.Put(aColItem, nWhich); } - else if ( bFrmSelection || nFrmType & ( FRMTYPE_COLUMN | FRMTYPE_COLSECT ) ) + else if ( bFrmSelection || nFrmType & ( FrmTypeFlags::COLUMN | FrmTypeFlags::COLSECT ) ) { // Out of frame or page? sal_uInt16 nNum = 0; @@ -1552,10 +1552,10 @@ void SwView::StateTabWin(SfxItemSet& rSet) nNum = rSh.GetCurColNum(); if( - // For that matter FRMTYPE_COLSECT should not be included + // For that matter FrmTypeFlags::COLSECT should not be included // if the border is selected! !bFrmSelection && - nFrmType & FRMTYPE_COLSECT ) + nFrmType & FrmTypeFlags::COLSECT ) { const SwSection *pSect = rSh.GetAnySection(false, pPt); OSL_ENSURE( pSect, "Which section?"); @@ -1593,7 +1593,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) rSet.Put(aColItem, nWhich); } } - else if( bFrmSelection || nFrmType & FRMTYPE_FLY_ANY ) + else if( bFrmSelection || nFrmType & FrmTypeFlags::FLY_ANY ) { // Columns in frame if ( nNum ) @@ -1709,7 +1709,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) rSet.DisableItem(nWhich); else if ( IsTabRowFromDoc() || ( rSh.GetTableFmt() && !bFrmSelection && - !(nFrmType & FRMTYPE_COLSECT ) ) ) + !(nFrmType & FrmTypeFlags::COLSECT ) ) ) { SwTabCols aTabCols; if ( ( m_bSetTabRowFromDoc = IsTabRowFromDoc() ) ) @@ -1790,10 +1790,10 @@ void SwView::StateTabWin(SfxItemSet& rSet) case SID_RULER_LR_MIN_MAX: { Rectangle aRectangle; - if( ( nFrmType & FRMTYPE_COLSECT ) && !IsTabColFromDoc() && - ( nFrmType & ( FRMTYPE_TABLE|FRMTYPE_COLUMN ) ) ) + if( ( nFrmType & FrmTypeFlags::COLSECT ) && !IsTabColFromDoc() && + ( nFrmType & ( FrmTypeFlags::TABLE|FrmTypeFlags::COLUMN ) ) ) { - if( nFrmType & FRMTYPE_TABLE ) + if( nFrmType & FrmTypeFlags::TABLE ) { const size_t nNum = rSh.GetCurTabColNum(); SwTabCols aTabCols; @@ -1879,18 +1879,18 @@ void SwView::StateTabWin(SfxItemSet& rSet) } } - else if ( ((nFrmType & FRMTYPE_TABLE) || IsTabColFromDoc()) && + else if ( ((nFrmType & FrmTypeFlags::TABLE) || IsTabColFromDoc()) && !bFrmSelection ) { bool bColumn; if ( IsTabColFromDoc() ) bColumn = rSh.GetCurMouseColNum( m_aTabColFromDocPos ) != 0; else - bColumn = (nFrmType & (FRMTYPE_COLUMN|FRMTYPE_FLY_ANY|FRMTYPE_COLSECTOUTTAB)) != 0; + bColumn = bool(nFrmType & (FrmTypeFlags::COLUMN|FrmTypeFlags::FLY_ANY|FrmTypeFlags::COLSECTOUTTAB)); if ( !bColumn ) { - if( nFrmType & FRMTYPE_FLY_ANY && IsTabColFromDoc() ) + if( nFrmType & FrmTypeFlags::FLY_ANY && IsTabColFromDoc() ) { SwRect aRect( rSh.GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, pPt ) ); @@ -1913,11 +1913,11 @@ void SwView::StateTabWin(SfxItemSet& rSet) } else { // Here only for table in multi-column pages and borders. - bool bSectOutTbl = (nFrmType & FRMTYPE_TABLE) != 0; - bool bFrame = (nFrmType & FRMTYPE_FLY_ANY); - bool bColSct = (nFrmType & ( bSectOutTbl - ? FRMTYPE_COLSECTOUTTAB - : FRMTYPE_COLSECT ) + bool bSectOutTbl = bool(nFrmType & FrmTypeFlags::TABLE); + bool bFrame = bool(nFrmType & FrmTypeFlags::FLY_ANY); + bool bColSct = bool(nFrmType & ( bSectOutTbl + ? FrmTypeFlags::COLSECTOUTTAB + : FrmTypeFlags::COLSECT ) ); //So you can also drag with the mouse, without being in the table. CurRectType eRecType = RECT_PAGE_PRT; @@ -1995,7 +1995,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) } } } - else if ( nFrmType & ( FRMTYPE_HEADER | FRMTYPE_FOOTER )) + else if ( nFrmType & ( FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER )) { aRectangle.Left() = aPageLRSpace.GetLeft(); aRectangle.Right() = aPageLRSpace.GetRight(); @@ -2023,7 +2023,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) else { SvxProtectItem aProtect(SID_RULER_PROTECT); - if(bBrowse && !(nFrmType & (FRMTYPE_DRAWOBJ|FRMTYPE_COLUMN)) && !rSh.GetTableFmt()) + if(bBrowse && !(nFrmType & (FrmTypeFlags::DRAWOBJ|FrmTypeFlags::COLUMN)) && !rSh.GetTableFmt()) { aProtect.SetSizeProtect(true); aProtect.SetPosProtect(true); |