summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/shells/frmsh.cxx8
-rw-r--r--sw/source/uibase/shells/grfsh.cxx12
-rw-r--r--sw/source/uibase/shells/tabsh.cxx2
-rw-r--r--sw/source/uibase/shells/textsh.cxx6
-rw-r--r--sw/source/uibase/uiview/swcli.cxx6
-rw-r--r--sw/source/uibase/uiview/view2.cxx4
-rw-r--r--sw/source/uibase/uiview/viewmdi.cxx6
-rw-r--r--sw/source/uibase/uiview/viewport.cxx2
-rw-r--r--sw/source/uibase/uiview/viewtab.cxx74
-rw-r--r--sw/source/uibase/utlui/uitool.cxx4
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx14
11 files changed, 69 insertions, 69 deletions
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index 4631e6cd6b6b..68c1e15a4fb7 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -430,12 +430,12 @@ void SwFrameShell::Execute(SfxRequest &rReq)
aSet.Put( SfxStringItem( FN_SET_FRM_ALT_NAME, rSh.GetObjTitle() ) );
}
- const SwRect &rPg = rSh.GetAnyCurRect(RECT_PAGE);
+ const SwRect &rPg = rSh.GetAnyCurRect(CurRectType::Page);
SwFormatFrameSize aFrameSize(ATT_VAR_SIZE, rPg.Width(), rPg.Height());
aFrameSize.SetWhich(GetPool().GetWhich(SID_ATTR_PAGE_SIZE));
aSet.Put(aFrameSize);
- const SwRect &rPr = rSh.GetAnyCurRect(RECT_PAGE_PRT);
+ const SwRect &rPr = rSh.GetAnyCurRect(CurRectType::PagePrt);
SwFormatFrameSize aPrtSize(ATT_VAR_SIZE, rPr.Width(), rPr.Height());
aPrtSize.SetWhich(GetPool().GetWhich(FN_GET_PRINT_AREA));
aSet.Put(aPrtSize);
@@ -446,9 +446,9 @@ void SwFrameShell::Execute(SfxRequest &rReq)
// On % values initialize size
SwFormatFrameSize& rSize = const_cast<SwFormatFrameSize&>(static_cast<const SwFormatFrameSize&>(aSet.Get(RES_FRM_SIZE)));
if (rSize.GetWidthPercent() && rSize.GetWidthPercent() != SwFormatFrameSize::SYNCED)
- rSize.SetWidth(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Width());
+ rSize.SetWidth(rSh.GetAnyCurRect(CurRectType::FlyEmbedded).Width());
if (rSize.GetHeightPercent() && rSize.GetHeightPercent() != SwFormatFrameSize::SYNCED)
- rSize.SetHeight(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Height());
+ rSize.SetHeight(rSh.GetAnyCurRect(CurRectType::FlyEmbedded).Height());
// disable vertical positioning for Math Objects anchored 'as char' if baseline alignment is activated
aSet.Put( SfxBoolItem( FN_MATH_BASELINE_ALIGNMENT,
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index ecbf5075b296..5a21c5ea6af2 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -149,8 +149,8 @@ void SwGrfShell::Execute(SfxRequest &rReq)
if( pGraphic )
{
Size aSize (
- convertTwipToMm100(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Width()),
- convertTwipToMm100(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Height()));
+ convertTwipToMm100(rSh.GetAnyCurRect(CurRectType::FlyEmbedded).Width()),
+ convertTwipToMm100(rSh.GetAnyCurRect(CurRectType::FlyEmbedded).Height()));
SfxItemSet aSet( rSh.GetAttrPool(), RES_GRFATR_MIRRORGRF, RES_GRFATR_CROPGRF );
rSh.GetCurAttr( aSet );
@@ -262,7 +262,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
FieldUnit eMetric = ::GetDfltMetric((0 != (nHtmlMode&HTMLMODE_ON)));
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
- const SwRect* pRect = &rSh.GetAnyCurRect(RECT_PAGE);
+ const SwRect* pRect = &rSh.GetAnyCurRect(CurRectType::Page);
SwFormatFrameSize aFrameSize( ATT_VAR_SIZE, pRect->Width(), pRect->Height());
aFrameSize.SetWhich( GetPool().GetWhich( SID_ATTR_PAGE_SIZE ) );
aSet.Put( aFrameSize );
@@ -274,7 +274,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
aSet.Put( SfxStringItem( FN_SET_FRM_ALT_NAME, rSh.GetObjTitle() ) );
}
- pRect = &rSh.GetAnyCurRect(RECT_PAGE_PRT);
+ pRect = &rSh.GetAnyCurRect(CurRectType::PagePrt);
aFrameSize.SetWidth( pRect->Width() );
aFrameSize.SetHeight( pRect->Height() );
aFrameSize.SetWhich( GetPool().GetWhich(FN_GET_PRINT_AREA) );
@@ -286,9 +286,9 @@ void SwGrfShell::Execute(SfxRequest &rReq)
// At percentage values initialize size
SwFormatFrameSize aSizeCopy = static_cast<const SwFormatFrameSize&>(aSet.Get(RES_FRM_SIZE));
if (aSizeCopy.GetWidthPercent() && aSizeCopy.GetWidthPercent() != SwFormatFrameSize::SYNCED)
- aSizeCopy.SetWidth(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Width());
+ aSizeCopy.SetWidth(rSh.GetAnyCurRect(CurRectType::FlyEmbedded).Width());
if (aSizeCopy.GetHeightPercent() && aSizeCopy.GetHeightPercent() != SwFormatFrameSize::SYNCED)
- aSizeCopy.SetHeight(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Height());
+ aSizeCopy.SetHeight(rSh.GetAnyCurRect(CurRectType::FlyEmbedded).Height());
// and now set the size for "external" tabpages
{
SvxSizeItem aSzItm( SID_ATTR_GRAF_FRMSIZE, aSizeCopy.GetSize() );
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index 383546787103..01083d12c01a 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -984,7 +984,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if( pFact )
{
- const long nMaxVert = rSh.GetAnyCurRect( RECT_FRM ).Width() / MINLAY;
+ const long nMaxVert = rSh.GetAnyCurRect( CurRectType::Frame ).Width() / MINLAY;
ScopedVclPtr<SvxAbstractSplittTableDialog> pDlg(pFact->CreateSvxSplittTableDialog( GetView().GetWindow(), rSh.IsTableVertical(), nMaxVert ));
if( pDlg && (pDlg->Execute() == RET_OK) )
{
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index d12e0c68fcec..d7b7dc123d17 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -442,7 +442,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
if(pArgs)
{
Size aSize(aMgr.GetSize());
- aSize.Width() = GetShell().GetAnyCurRect(RECT_PAGE_PRT).Width();
+ aSize.Width() = GetShell().GetAnyCurRect(CurRectType::PagePrt).Width();
Point aPos = aMgr.GetPos();
RndStdIds eAnchor = FLY_AT_PARA;
if(pArgs->GetItemState(nSlot, false, &pItem) == SfxItemState::SET)
@@ -861,12 +861,12 @@ SfxItemSet SwTextShell::CreateInsertFrameItemSet(SwFlyFrameAttrMgr& rMgr)
// For the Area tab page.
GetShell().GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()->PutAreaListItems(aSet);
- const SwRect &rPg = GetShell().GetAnyCurRect(RECT_PAGE);
+ const SwRect &rPg = GetShell().GetAnyCurRect(CurRectType::Page);
SwFormatFrameSize aFrameSize(ATT_VAR_SIZE, rPg.Width(), rPg.Height());
aFrameSize.SetWhich(GetPool().GetWhich(SID_ATTR_PAGE_SIZE));
aSet.Put(aFrameSize);
- const SwRect &rPr = GetShell().GetAnyCurRect(RECT_PAGE_PRT);
+ const SwRect &rPr = GetShell().GetAnyCurRect(CurRectType::PagePrt);
SwFormatFrameSize aPrtSize(ATT_VAR_SIZE, rPr.Width(), rPr.Height());
aPrtSize.SetWhich(GetPool().GetWhich(FN_GET_PRINT_AREA));
aSet.Put(aPrtSize);
diff --git a/sw/source/uibase/uiview/swcli.cxx b/sw/source/uibase/uiview/swcli.cxx
index f5f8f174e544..61f26823cc91 100644
--- a/sw/source/uibase/uiview/swcli.cxx
+++ b/sw/source/uibase/uiview/swcli.cxx
@@ -78,8 +78,8 @@ void SwOleClient::RequestNewObjectArea( Rectangle& aLogRect )
rSh.EndAllAction();
- SwRect aFrame( rSh.GetAnyCurRect( RECT_FLY_EMBEDDED, nullptr, GetObject() )),
- aPrt( rSh.GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, nullptr, GetObject() ));
+ SwRect aFrame( rSh.GetAnyCurRect( CurRectType::FlyEmbedded, nullptr, GetObject() )),
+ aPrt( rSh.GetAnyCurRect( CurRectType::FlyEmbeddedPrt, nullptr, GetObject() ));
aLogRect.SetPos( aPrt.Pos() + aFrame.Pos() );
aLogRect.SetSize( aPrt.SSize() );
}
@@ -87,7 +87,7 @@ void SwOleClient::RequestNewObjectArea( Rectangle& aLogRect )
void SwOleClient::ObjectAreaChanged()
{
SwWrtShell &rSh = static_cast<SwView*>(GetViewShell())->GetWrtShell();
- SwRect aFrame( rSh.GetAnyCurRect( RECT_FLY_EMBEDDED, nullptr, GetObject() ));
+ SwRect aFrame( rSh.GetAnyCurRect( CurRectType::FlyEmbedded, nullptr, GetObject() ));
if ( !aFrame.IsOver( rSh.VisArea() ) )
rSh.MakeVisible( aFrame );
}
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index f66b7d0bee7b..af44ff794712 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -1430,8 +1430,8 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
// automatic mode: 1 Page, 2 Pages, 100%
// n Columns mode: n Pages, 100%
// n Columns book mode: nPages without gaps, 100%
- const SwRect aPageRect( m_pWrtShell->GetAnyCurRect( RECT_PAGE_CALC ) );
- const SwRect aRootRect( m_pWrtShell->GetAnyCurRect( RECT_PAGES_AREA ) ); // width of columns
+ const SwRect aPageRect( m_pWrtShell->GetAnyCurRect( CurRectType::PageCalc ) );
+ const SwRect aRootRect( m_pWrtShell->GetAnyCurRect( CurRectType::PagesArea ) ); // width of columns
Size aPageSize( aPageRect.SSize() );
aPageSize.Width() += pMgr->HasNotes() && pMgr->ShowNotes() ?
pMgr->GetSidebarWidth() + pMgr->GetSidebarBorderWidth() :
diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx
index eef998e77d0b..059683e331de 100644
--- a/sw/source/uibase/uiview/viewmdi.cxx
+++ b/sw/source/uibase/uiview/viewmdi.cxx
@@ -92,8 +92,8 @@ void SwView::SetZoom_( const Size &rEditSize, SvxZoomType eZoomType,
{
const bool bAutomaticViewLayout = 0 == pOpt->GetViewLayoutColumns();
- const SwRect aPageRect( m_pWrtShell->GetAnyCurRect( RECT_PAGE_CALC ) );
- const SwRect aRootRect( m_pWrtShell->GetAnyCurRect( RECT_PAGES_AREA ) );
+ const SwRect aPageRect( m_pWrtShell->GetAnyCurRect( CurRectType::PageCalc ) );
+ const SwRect aRootRect( m_pWrtShell->GetAnyCurRect( CurRectType::PagesArea ) );
Size aPageSize( aPageRect.SSize() );
Size aRootSize( aRootRect.SSize() );
@@ -166,7 +166,7 @@ void SwView::SetZoom_( const Size &rEditSize, SvxZoomType eZoomType,
Point aPos;
if ( eZoomType == SvxZoomType::WHOLEPAGE )
- aPos.Y() = m_pWrtShell->GetAnyCurRect(RECT_PAGE).Top() - DOCUMENTBORDER;
+ aPos.Y() = m_pWrtShell->GetAnyCurRect(CurRectType::Page).Top() - DOCUMENTBORDER;
else
{
// Make sure that the cursor is in the visible range, so that
diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx
index 108df3dce08f..0c8e7dff8f65 100644
--- a/sw/source/uibase/uiview/viewport.cxx
+++ b/sw/source/uibase/uiview/viewport.cxx
@@ -75,7 +75,7 @@ bool SwView::IsDocumentBorder()
inline long GetLeftMargin( SwView &rView )
{
SvxZoomType eType = (SvxZoomType)rView.GetWrtShell().GetViewOptions()->GetZoomType();
- long lRet = rView.GetWrtShell().GetAnyCurRect(RECT_PAGE_PRT).Left();
+ long lRet = rView.GetWrtShell().GetAnyCurRect(CurRectType::PagePrt).Left();
return eType == SvxZoomType::PERCENT ? lRet + DOCUMENTBORDER :
eType == SvxZoomType::PAGEWIDTH || eType == SvxZoomType::PAGEWIDTH_NOBORDER ? 0 :
lRet + DOCUMENTBORDER + nLeftOfst;
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index 609646879e8e..9423c5990ae0 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -248,7 +248,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
const SwFormatFrameSize &rFrameSize = rDesc.GetMaster().GetFrameSize();
- const SwRect& rPageRect = rSh.GetAnyCurRect(RECT_PAGE);
+ const SwRect& rPageRect = rSh.GetAnyCurRect(CurRectType::Page);
const long nPageWidth = bBrowse ? rPageRect.Width() : rFrameSize.GetWidth();
const long nPageHeight = bBrowse ? rPageRect.Height() : rFrameSize.GetHeight();
@@ -267,7 +267,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
if ( !bSect && (bFrameSelection || nFrameType & FrameTypeFlags::FLY_ANY) )
{
SwFrameFormat* pFormat = rSh.GetFlyFrameFormat();
- const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED);
+ const SwRect &rRect = rSh.GetAnyCurRect(CurRectType::FlyEmbedded);
bool bVerticalFrame(false);
{
@@ -363,8 +363,8 @@ void SwView::ExecTabWin( SfxRequest& rReq )
{
//change the section indents and the columns if available
//at first determine the changes
- SwRect aSectRect = rSh.GetAnyCurRect(RECT_SECTION_PRT);
- const SwRect aTmpRect = rSh.GetAnyCurRect(RECT_SECTION);
+ SwRect aSectRect = rSh.GetAnyCurRect(CurRectType::SectionPrt);
+ const SwRect aTmpRect = rSh.GetAnyCurRect(CurRectType::Section);
aSectRect.Pos() += aTmpRect.Pos();
long nLeftDiff = aLongLR.GetLeft() - (long)(aSectRect.Left() - rPageRect.Left() );
long nRightDiff = aLongLR.GetRight() - (long)( rPageRect.Right() - aSectRect.Right());
@@ -426,7 +426,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
if( bFrameSelection || nFrameType & FrameTypeFlags::FLY_ANY )
{
SwFrameFormat* pFormat = rSh.GetFlyFrameFormat();
- const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED);
+ const SwRect &rRect = rSh.GetAnyCurRect(CurRectType::FlyEmbedded);
const long nDeltaY = rPageRect.Top() + aLongULSpace.GetUpper() - rRect.Top();
const long nHeight = nPageHeight - (aLongULSpace.GetUpper() + aLongULSpace.GetLower());
@@ -476,8 +476,8 @@ void SwView::ExecTabWin( SfxRequest& rReq )
{
//change the section indents and the columns if available
//at first determine the changes
- SwRect aSectRect = rSh.GetAnyCurRect(RECT_SECTION_PRT);
- const SwRect aTmpRect = rSh.GetAnyCurRect(RECT_SECTION);
+ SwRect aSectRect = rSh.GetAnyCurRect(CurRectType::SectionPrt);
+ const SwRect aTmpRect = rSh.GetAnyCurRect(CurRectType::Section);
aSectRect.Pos() += aTmpRect.Pos();
const long nLeftDiff = aLongULSpace.GetUpper() - (long)(aSectRect.Top() - rPageRect.Top());
const long nRightDiff = aLongULSpace.GetLower() - (long)(nPageHeight - aSectRect.Bottom() + rPageRect.Top());
@@ -879,7 +879,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
bSect ?
pSectFormat->GetCol() :
static_cast<const SwFormatCol&>(aSet.Get( RES_COL, false )));
- SwRect aCurRect = rSh.GetAnyCurRect(bSect ? RECT_SECTION_PRT : RECT_FLY_PRT_EMBEDDED);
+ SwRect aCurRect = rSh.GetAnyCurRect(bSect ? CurRectType::SectionPrt : CurRectType::FlyEmbeddedPrt);
const long lWidth = bVerticalWriting ? aCurRect.Height() : aCurRect.Width();
::lcl_ConvertToCols( aColItem, lWidth, aCols );
aSet.Put( aCols );
@@ -903,7 +903,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
else
{
SwFormatCol aCols( rDesc.GetMaster().GetCol() );
- const SwRect aPrtRect = rSh.GetAnyCurRect(RECT_PAGE_PRT);
+ const SwRect aPrtRect = rSh.GetAnyCurRect(CurRectType::PagePrt);
::lcl_ConvertToCols( aColItem,
bVerticalWriting ? aPrtRect.Height() : aPrtRect.Width(),
aCols );
@@ -1177,8 +1177,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
const bool bFrameSelection = rSh.IsFrameSelected();
const bool bBrowse = rSh.GetViewOptions()->getBrowseMode();
// PageOffset/limiter
- const SwRect& rPageRect = rSh.GetAnyCurRect( RECT_PAGE, pPt );
- const SwRect& rPagePrtRect = rSh.GetAnyCurRect( RECT_PAGE_PRT, pPt );
+ const SwRect& rPageRect = rSh.GetAnyCurRect( CurRectType::Page, pPt );
+ const SwRect& rPagePrtRect = rSh.GetAnyCurRect( CurRectType::PagePrt, pPt );
const long nPageWidth = rPageRect.Width();
const long nPageHeight = rPageRect.Height();
@@ -1275,8 +1275,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
rDesc.GetMaster().GetFooter().GetFooterFormat());
if( pFormat )// #i80890# if rDesc is not the one belonging to the current page is might crash
{
- SwRect aRect( rSh.GetAnyCurRect( RECT_HEADERFOOTER, pPt));
- aRect.Pos() -= rSh.GetAnyCurRect( RECT_PAGE, pPt ).Pos();
+ SwRect aRect( rSh.GetAnyCurRect( CurRectType::HeaderFooter, pPt));
+ aRect.Pos() -= rSh.GetAnyCurRect( CurRectType::Page, pPt ).Pos();
const SvxLRSpaceItem& aLR = pFormat->GetLRSpace();
aLongLR.SetLeft ( (long)aLR.GetLeft() + (long)aRect.Left() );
aLongLR.SetRight( (nPageWidth -
@@ -1288,13 +1288,13 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SwRect aRect;
if( !bFrameSelection && ((nFrameType & FrameTypeFlags::COLSECT) || rSh.IsDirectlyInSection()) )
{
- aRect = rSh.GetAnyCurRect(RECT_SECTION_PRT, pPt);
- const SwRect aTmpRect = rSh.GetAnyCurRect(RECT_SECTION, pPt);
+ aRect = rSh.GetAnyCurRect(CurRectType::SectionPrt, pPt);
+ const SwRect aTmpRect = rSh.GetAnyCurRect(CurRectType::Section, pPt);
aRect.Pos() += aTmpRect.Pos();
}
else if ( bFrameSelection || nFrameType & FrameTypeFlags::FLY_ANY )
- aRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED, pPt);
+ aRect = rSh.GetAnyCurRect(CurRectType::FlyEmbedded, pPt);
else if( nFrameType & FrameTypeFlags::DRAWOBJ)
aRect = rSh.GetObjRect();
@@ -1341,14 +1341,14 @@ void SwView::StateTabWin(SfxItemSet& rSet)
if ( bFrameSelection || nFrameType & FrameTypeFlags::FLY_ANY )
{
// Convert document coordinates into page coordinates.
- const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED, pPt);
+ const SwRect &rRect = rSh.GetAnyCurRect(CurRectType::FlyEmbedded, pPt);
aLongUL.SetUpper(rRect.Top() - rPageRect.Top());
aLongUL.SetLower(rPageRect.Bottom() - rRect.Bottom());
}
else if ( nFrameType & FrameTypeFlags::HEADER || nFrameType & FrameTypeFlags::FOOTER )
{
- SwRect aRect( rSh.GetAnyCurRect( RECT_HEADERFOOTER, pPt));
- aRect.Pos() -= rSh.GetAnyCurRect( RECT_PAGE, pPt ).Pos();
+ SwRect aRect( rSh.GetAnyCurRect( CurRectType::HeaderFooter, pPt));
+ aRect.Pos() -= rSh.GetAnyCurRect( CurRectType::Page, pPt ).Pos();
aLongUL.SetUpper( aRect.Top() );
aLongUL.SetLower( nPageHeight - aRect.Bottom() );
}
@@ -1504,7 +1504,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
{
if( IsTabColFromDoc() )
{
- const SwRect& rFlyPrtRect = rSh.GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, pPt );
+ const SwRect& rFlyPrtRect = rSh.GetAnyCurRect( CurRectType::FlyEmbeddedPrt, pPt );
aDistLR.SetLeft(rFlyPrtRect.Left());
aDistLR.SetRight(rFlyPrtRect.Left());
}
@@ -1739,8 +1739,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
else
--nNum;
SvxColumnItem aColItem(nNum);
- SwRect aRect = rSh.GetAnyCurRect(RECT_SECTION_PRT, pPt);
- const SwRect aTmpRect = rSh.GetAnyCurRect(RECT_SECTION, pPt);
+ SwRect aRect = rSh.GetAnyCurRect(CurRectType::SectionPrt, pPt);
+ const SwRect aTmpRect = rSh.GetAnyCurRect(CurRectType::Section, pPt);
::lcl_FillSvxColumn(rCol, bVerticalWriting ? aRect.Height() : aRect.Width(), aColItem, 0);
@@ -1778,11 +1778,11 @@ void SwView::StateTabWin(SfxItemSet& rSet)
else
nNum--;
SvxColumnItem aColItem(nNum);
- const SwRect &rSizeRect = rSh.GetAnyCurRect(RECT_FLY_PRT_EMBEDDED, pPt);
+ const SwRect &rSizeRect = rSh.GetAnyCurRect(CurRectType::FlyEmbeddedPrt, pPt);
bool bUseVertical = bFrameHasVerticalColumns || (!bFrameSelection && bVerticalWriting);
const long lWidth = bUseVertical ? rSizeRect.Height() : rSizeRect.Width();
- const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED, pPt);
+ const SwRect &rRect = rSh.GetAnyCurRect(CurRectType::FlyEmbedded, pPt);
long nDist2 = ((bUseVertical ? rRect.Height() : rRect.Width()) - lWidth) /2;
::lcl_FillSvxColumn(rCol, lWidth, aColItem, nDist2);
@@ -1818,7 +1818,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
nNum--;
SvxColumnItem aColItem(nNum);
- const SwRect aPrtRect = rSh.GetAnyCurRect(RECT_PAGE_PRT, pPt);
+ const SwRect aPrtRect = rSh.GetAnyCurRect(CurRectType::PagePrt, pPt);
const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>(rMaster.GetFormatAttr(RES_BOX));
long nDist = rBox.GetSmallestDistance();
@@ -1999,11 +1999,11 @@ void SwView::StateTabWin(SfxItemSet& rSet)
sal_uInt16 nNum = rSh.GetCurOutColNum();
const sal_uInt16 nCount = std::min(sal_uInt16(nNum + 1), sal_uInt16(rCols.size()));
const SwRect aRect( rSh.GetAnyCurRect( pFormat
- ? RECT_FLY_PRT_EMBEDDED
- : RECT_PAGE_PRT, pPt ));
+ ? CurRectType::FlyEmbeddedPrt
+ : CurRectType::PagePrt, pPt ));
const SwRect aAbsRect( rSh.GetAnyCurRect( pFormat
- ? RECT_FLY_EMBEDDED
- : RECT_PAGE, pPt ));
+ ? CurRectType::FlyEmbedded
+ : CurRectType::Page, pPt ));
// The width of the frame or within the page margins.
const sal_uInt16 nTotalWidth = (sal_uInt16)aRect.Width();
@@ -2064,8 +2064,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
if( nFrameType & FrameTypeFlags::FLY_ANY && IsTabColFromDoc() )
{
SwRect aRect( rSh.GetAnyCurRect(
- RECT_FLY_PRT_EMBEDDED, pPt ) );
- aRect.Pos() += rSh.GetAnyCurRect( RECT_FLY_EMBEDDED,
+ CurRectType::FlyEmbeddedPrt, pPt ) );
+ aRect.Pos() += rSh.GetAnyCurRect( CurRectType::FlyEmbedded,
pPt ).Pos();
aRectangle.Left() = aRect.Left() - rPageRect.Left();
@@ -2091,15 +2091,15 @@ void SwView::StateTabWin(SfxItemSet& rSet)
: FrameTypeFlags::COLSECT )
);
//So you can also drag with the mouse, without being in the table.
- CurRectType eRecType = RECT_PAGE_PRT;
+ CurRectType eRecType = CurRectType::PagePrt;
size_t nNum = IsTabColFromDoc() ?
rSh.GetCurMouseColNum( m_aTabColFromDocPos ):
rSh.GetCurOutColNum();
const SwFrameFormat* pFormat = nullptr;
if( bColSct )
{
- eRecType = bSectOutTable ? RECT_OUTTABSECTION
- : RECT_SECTION;
+ eRecType = bSectOutTable ? CurRectType::SectionOutsideTable
+ : CurRectType::Section;
const SwSection *pSect = rSh.GetAnySection( bSectOutTable, pPt );
OSL_ENSURE( pSect, "Which section?");
pFormat = pSect->GetFormat();
@@ -2107,7 +2107,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
else if( bFrame )
{
pFormat = rSh.GetFlyFrameFormat();
- eRecType = RECT_FLY_PRT_EMBEDDED;
+ eRecType = CurRectType::FlyEmbeddedPrt;
}
const SwFormatCol* pCols = pFormat ? &pFormat->GetCol():
@@ -2121,8 +2121,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
// the absolute position must be added here
SwRect aRect( rSh.GetAnyCurRect( eRecType, pPt ) );
- if(RECT_FLY_PRT_EMBEDDED == eRecType)
- aRect.Pos() += rSh.GetAnyCurRect( RECT_FLY_EMBEDDED,
+ if(CurRectType::FlyEmbeddedPrt == eRecType)
+ aRect.Pos() += rSh.GetAnyCurRect( CurRectType::FlyEmbedded,
pPt ).Pos();
const sal_uInt16 nTotalWidth = (sal_uInt16)aRect.Width();
diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx
index d40e71ce6fa7..4efd976b1bda 100644
--- a/sw/source/uibase/utlui/uitool.cxx
+++ b/sw/source/uibase/utlui/uitool.cxx
@@ -763,11 +763,11 @@ SwTwips GetTableWidth( SwFrameFormat* pFormat, SwTabCols& rCols, sal_uInt16 *pPe
{
if ( nullptr == pSh->GetFlyFrameFormat() )
{
- nWidth = pSh->GetAnyCurRect(RECT_PAGE_PRT).Width();
+ nWidth = pSh->GetAnyCurRect(CurRectType::PagePrt).Width();
}
else
{
- nWidth = pSh->GetAnyCurRect(RECT_FLY_PRT_EMBEDDED).Width();
+ nWidth = pSh->GetAnyCurRect(CurRectType::FlyEmbeddedPrt).Width();
}
}
else
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 67e4ad51fd8a..fb208b93a56d 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -410,8 +410,8 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
if ( xObj.GetViewAspect() == embed::Aspects::MSOLE_ICON )
{
- SwRect aArea = GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, nullptr, xObj.GetObject() );
- aArea.Pos() += GetAnyCurRect( RECT_FLY_EMBEDDED, nullptr, xObj.GetObject() ).Pos();
+ SwRect aArea = GetAnyCurRect( CurRectType::FlyEmbeddedPrt, nullptr, xObj.GetObject() );
+ aArea.Pos() += GetAnyCurRect( CurRectType::FlyEmbedded, nullptr, xObj.GetObject() ).Pos();
MapMode aMapMode( MapUnit::MapTwip );
Size aSize = xObj.GetSize( &aMapMode );
aArea.Width( aSize.Width() );
@@ -640,7 +640,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
{
// TODO/MBA: testing
SwRect aRect( pFlyPrtRect ? *pFlyPrtRect
- : GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, nullptr, xObj.GetObject() ));
+ : GetAnyCurRect( CurRectType::FlyEmbeddedPrt, nullptr, xObj.GetObject() ));
if( !aRect.IsEmpty() )
{
// TODO/LEAN: getMapUnit can switch object to running state
@@ -761,7 +761,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
if ( pFlyPrtRect )
aObjArea = pFlyPrtRect->SSize();
else
- aObjArea = GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, nullptr, xObj.GetObject() ).SSize();
+ aObjArea = GetAnyCurRect( CurRectType::FlyEmbeddedPrt, nullptr, xObj.GetObject() ).SSize();
// differ the aObjArea and _aVisArea by 1 Pixel then set new VisArea
long nX, nY;
@@ -795,8 +795,8 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
}
else
{
- aArea = GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, nullptr, xObj.GetObject() );
- aArea.Pos() += GetAnyCurRect( RECT_FLY_EMBEDDED, nullptr, xObj.GetObject() ).Pos();
+ aArea = GetAnyCurRect( CurRectType::FlyEmbeddedPrt, nullptr, xObj.GetObject() );
+ aArea.Pos() += GetAnyCurRect( CurRectType::FlyEmbedded, nullptr, xObj.GetObject() ).Pos();
}
if ( bUseObjectSize )
@@ -808,7 +808,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
{
const Point &rPoint = pFlyFrameFormat->GetLastFlyFramePrtRectPos();
SwRect aRect( pFlyPrtRect ? *pFlyPrtRect
- : GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, nullptr, xObj.GetObject() ));
+ : GetAnyCurRect( CurRectType::FlyEmbeddedPrt, nullptr, xObj.GetObject() ));
aArea += rPoint - aRect.Pos(); // adjust area by diff of printing area position in order to keep baseline alignment correct.
}
aArea.Width ( _aVisArea.Width() );