diff options
Diffstat (limited to 'svtools/source/contnr')
-rw-r--r-- | svtools/source/contnr/iconview.cxx | 6 | ||||
-rw-r--r-- | svtools/source/contnr/iconviewimpl.cxx | 14 | ||||
-rw-r--r-- | svtools/source/contnr/imivctl.hxx | 54 | ||||
-rw-r--r-- | svtools/source/contnr/imivctl1.cxx | 146 | ||||
-rw-r--r-- | svtools/source/contnr/imivctl2.cxx | 24 | ||||
-rw-r--r-- | svtools/source/contnr/ivctrl.cxx | 16 | ||||
-rw-r--r-- | svtools/source/contnr/simptabl.cxx | 6 | ||||
-rw-r--r-- | svtools/source/contnr/svimpbox.cxx | 42 | ||||
-rw-r--r-- | svtools/source/contnr/svlbitm.cxx | 8 | ||||
-rw-r--r-- | svtools/source/contnr/svtabbx.cxx | 26 | ||||
-rw-r--r-- | svtools/source/contnr/treelistbox.cxx | 24 | ||||
-rw-r--r-- | svtools/source/contnr/viewdataentry.cxx | 4 |
12 files changed, 185 insertions, 185 deletions
diff --git a/svtools/source/contnr/iconview.cxx b/svtools/source/contnr/iconview.cxx index 9681fa95e1ab..13921219101b 100644 --- a/svtools/source/contnr/iconview.cxx +++ b/svtools/source/contnr/iconview.cxx @@ -47,7 +47,7 @@ void IconView::Resize() SvTreeListBox::Resize(); } -Rectangle IconView::GetFocusRect( SvTreeListEntry*, long nEntryPos ) +tools::Rectangle IconView::GetFocusRect( SvTreeListEntry*, long nEntryPos ) { Size aSize; aSize.Height() = nEntryHeight; @@ -57,7 +57,7 @@ Rectangle IconView::GetFocusRect( SvTreeListEntry*, long nEntryPos ) aPos.X() = 0; aPos.Y() = 0; - Rectangle aRect; + tools::Rectangle aRect; short nCols = GetColumnsCount(); @@ -85,7 +85,7 @@ void IconView::PaintEntry(SvTreeListEntry& rEntry, long nX, long nY, vcl::RenderContext& rRenderContext) { - Rectangle aRect; // multi purpose + tools::Rectangle aRect; // multi purpose PreparePaint(rRenderContext, rEntry); diff --git a/svtools/source/contnr/iconviewimpl.cxx b/svtools/source/contnr/iconviewimpl.cxx index 5328d50156cc..5b90ca87b795 100644 --- a/svtools/source/contnr/iconviewimpl.cxx +++ b/svtools/source/contnr/iconviewimpl.cxx @@ -43,7 +43,7 @@ void IconViewImpl::CursorUp() ShowCursor( false ); pView->Update(); pStartEntry = pPrevFirstToDraw; - Rectangle aArea( GetVisibleArea() ); + tools::Rectangle aArea( GetVisibleArea() ); aArea.Bottom() -= nEntryHeight; pView->Scroll( 0, nEntryHeight, aArea, ScrollFlags::NoChildren ); pView->Update(); @@ -68,7 +68,7 @@ void IconViewImpl::CursorDown() ShowCursor( false ); pView->Update(); pStartEntry = pNextFirstToDraw; - Rectangle aArea( GetVisibleArea() ); + tools::Rectangle aArea( GetVisibleArea() ); pView->Scroll( 0, -(pView->GetEntryHeight()), aArea, ScrollFlags::NoChildren ); pView->Update(); ShowCursor( true ); @@ -103,7 +103,7 @@ void IconViewImpl::PageDown( sal_uInt16 nDelta ) } else { - Rectangle aArea( GetVisibleArea() ); + tools::Rectangle aArea( GetVisibleArea() ); long nScroll = pView->GetEntryHeight() * static_cast<long>(nRealDelta); nScroll = -nScroll; pView->Update(); @@ -141,7 +141,7 @@ void IconViewImpl::PageUp( sal_uInt16 nDelta ) else { long nEntryHeight = pView->GetEntryHeight(); - Rectangle aArea( GetVisibleArea() ); + tools::Rectangle aArea( GetVisibleArea() ); pView->Update(); pView->Scroll( 0, nEntryHeight*nRealDelta, aArea, ScrollFlags::NoChildren ); pView->Update(); @@ -300,7 +300,7 @@ void IconViewImpl::AdjustScrollBars( Size& rSize ) // adapt Range, VisibleRange etc. // refresh output size, in case we have to scroll - Rectangle aRect; + tools::Rectangle aRect; aRect.SetSize( aOSize ); aSelEng.SetVisibleArea( aRect ); @@ -367,7 +367,7 @@ void IconViewImpl::UpdateAll( bool bInvalidateCompleteView ) pView->Invalidate( GetVisibleArea() ); } -void IconViewImpl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void IconViewImpl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { if (!pView->GetVisibleCount()) return; @@ -445,7 +445,7 @@ void IconViewImpl::InvalidateEntry( long nId ) const { if( !(nFlags & LBoxFlags::InPaint )) { - Rectangle aRect( GetVisibleArea() ); + tools::Rectangle aRect( GetVisibleArea() ); long nMaxBottom = aRect.Bottom(); aRect.Top() = nId / pView->GetColumnsCount() * pView->GetEntryHeight(); aRect.Bottom() = aRect.Top(); aRect.Bottom() += pView->GetEntryHeight(); diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx index b9c17dd5e991..3b35978460b4 100644 --- a/svtools/source/contnr/imivctl.hxx +++ b/svtools/source/contnr/imivctl.hxx @@ -94,7 +94,7 @@ enum class IcnViewFieldType struct LocalFocus { bool bOn; - Rectangle aRect; + tools::Rectangle aRect; Color aPenColor; LocalFocus() { bOn = false; } @@ -159,8 +159,8 @@ class SvxIconChoiceCtrl_Impl VclPtr<ScrollBar> aVerSBar; VclPtr<ScrollBar> aHorSBar; VclPtr<ScrollBarBox> aScrBarBox; - Rectangle aCurSelectionRect; - std::vector<Rectangle*> aSelectedRectList; + tools::Rectangle aCurSelectionRect; + std::vector<tools::Rectangle*> aSelectedRectList; Idle aEditIdle; // for editing in place Idle aAutoArrangeIdle; Idle aDocRectChangedIdle; @@ -212,7 +212,7 @@ class SvxIconChoiceCtrl_Impl void ShowCursor( bool bShow ); void ImpArrange( bool bKeepPredecessors ); - void AdjustVirtSize( const Rectangle& ); + void AdjustVirtSize( const tools::Rectangle& ); void ResetVirtSize(); void CheckScrollBars(); @@ -251,7 +251,7 @@ class SvxIconChoiceCtrl_Impl SvxIconChoiceCtrlEntry* pEntry1, SvxIconChoiceCtrlEntry* pEntry2, bool bAdd, - std::vector<Rectangle*>* pOtherRects + std::vector<tools::Rectangle*>* pOtherRects ); void SelectRange( @@ -260,7 +260,7 @@ class SvxIconChoiceCtrl_Impl bool bAdd ); - void AddSelectedRect( const Rectangle& ); + void AddSelectedRect( const tools::Rectangle& ); void AddSelectedRect( SvxIconChoiceCtrlEntry* pEntry1, SvxIconChoiceCtrlEntry* pEntry2 @@ -268,9 +268,9 @@ class SvxIconChoiceCtrl_Impl void ClearSelectedRectList(); void ClearColumnList(); - Rectangle CalcMaxTextRect( const SvxIconChoiceCtrlEntry* pEntry ) const; + tools::Rectangle CalcMaxTextRect( const SvxIconChoiceCtrlEntry* pEntry ) const; - void ClipAtVirtOutRect( Rectangle& rRect ) const; + void ClipAtVirtOutRect( tools::Rectangle& rRect ) const; sal_uLong GetPredecessorGrid( const Point& rDocPos) const; void InitPredecessors(); @@ -297,7 +297,7 @@ class SvxIconChoiceCtrl_Impl DECL_LINK(TextEditEndedHdl, LinkParamNone*, void); - void ShowFocus ( Rectangle& rRect ); + void ShowFocus ( tools::Rectangle& rRect ); void DrawFocusRect(vcl::RenderContext& rRenderContext); bool IsMnemonicChar( sal_Unicode cChar, sal_uLong& rPos ) const; @@ -330,7 +330,7 @@ public: bool bAddToSelection = false, bool bSyncPaint = false ); - void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect); + void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect); bool MouseButtonDown( const MouseEvent& ); bool MouseButtonUp( const MouseEvent& ); bool MouseMove( const MouseEvent&); @@ -372,9 +372,9 @@ public: long nSetMaxVirtHeight ); - Rectangle CalcFocusRect( SvxIconChoiceCtrlEntry* ); - Rectangle CalcBmpRect( SvxIconChoiceCtrlEntry*, const Point* pPos = nullptr ); - Rectangle CalcTextRect( + tools::Rectangle CalcFocusRect( SvxIconChoiceCtrlEntry* ); + tools::Rectangle CalcBmpRect( SvxIconChoiceCtrlEntry*, const Point* pPos = nullptr ); + tools::Rectangle CalcTextRect( SvxIconChoiceCtrlEntry*, const Point* pPos = nullptr, bool bForInplaceEdit = false, @@ -392,18 +392,18 @@ public: ); // recalculates all invalid BoundRects void RecalcAllBoundingRectsSmart(); - const Rectangle& GetEntryBoundRect( SvxIconChoiceCtrlEntry* ); - void InvalidateBoundingRect( Rectangle& rRect ) + const tools::Rectangle& GetEntryBoundRect( SvxIconChoiceCtrlEntry* ); + void InvalidateBoundingRect( tools::Rectangle& rRect ) { rRect.Right() = LONG_MAX; bBoundRectsDirty = true; } - static bool IsBoundingRectValid( const Rectangle& rRect ) { return ( rRect.Right() != LONG_MAX ); } + static bool IsBoundingRectValid( const tools::Rectangle& rRect ) { return ( rRect.Right() != LONG_MAX ); } - void PaintEmphasis(const Rectangle& rRect1, bool bSelected, + void PaintEmphasis(const tools::Rectangle& rRect1, bool bSelected, bool bDropTarget, bool bCursored, vcl::RenderContext& rRenderContext ); - void PaintItem(const Rectangle& rRect, IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry, + void PaintItem(const tools::Rectangle& rRect, IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry, sal_uInt16 nPaintFlags, vcl::RenderContext& rRenderContext); // recalculates all BoundingRects if bMustRecalcBoundingRects == true @@ -420,19 +420,19 @@ public: void HideDDIcon(); static bool IsOver( - std::vector<Rectangle*>* pSelectedRectList, - const Rectangle& rEntryBoundRect + std::vector<tools::Rectangle*>* pSelectedRectList, + const tools::Rectangle& rEntryBoundRect ); void SelectRect( - const Rectangle&, + const tools::Rectangle&, bool bAdd, - std::vector<Rectangle*>* pOtherRects + std::vector<tools::Rectangle*>* pOtherRects ); bool IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos ); void MakeVisible( - const Rectangle& rDocPos, + const tools::Rectangle& rDocPos, bool bInScrollBarEvent=false ); @@ -458,7 +458,7 @@ public: void SetSelectionMode( SelectionMode eMode ) { eSelectionMode=eMode; } sal_Int32 GetEntryListPos( SvxIconChoiceCtrlEntry* ) const; void InitSettings(); - Rectangle GetOutputRect() const; + tools::Rectangle GetOutputRect() const; void SetEntryPredecessor(SvxIconChoiceCtrlEntry* pEntry,SvxIconChoiceCtrlEntry* pPredecessor); // only delivers valid results when in AutoArrange mode! @@ -473,7 +473,7 @@ public: SvxIconChoiceCtrlEntry* pEntry, bool bKeepHighlightFlags ); - void DrawHighlightFrame(vcl::RenderContext& rRenderContext, const Rectangle& rBmpRect); + void DrawHighlightFrame(vcl::RenderContext& rRenderContext, const tools::Rectangle& rBmpRect); void CallEventListeners( VclEventId nEvent, void* pData ); @@ -537,7 +537,7 @@ typedef sal_uLong GridId; class IcnGridMap_Impl { - Rectangle _aLastOccupiedGrid; + tools::Rectangle _aLastOccupiedGrid; SvxIconChoiceCtrl_Impl* _pView; bool * _pGridMap; sal_uInt16 _nGridCols, _nGridRows; @@ -566,7 +566,7 @@ public: _pGridMap[ nId ] = true; } - Rectangle GetGridRect( GridId ); + tools::Rectangle GetGridRect( GridId ); void GetGridCoord( GridId, sal_uInt16& rGridX, sal_uInt16& rGridY ); static sal_uLong GetGridCount( const Size& rSizePixel, diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index 2452e91c5431..8e728c707fd8 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -295,7 +295,7 @@ void SvxIconChoiceCtrl_Impl::InsertEntry( SvxIconChoiceCtrlEntry* pEntry, size_t if( bUpdateMode ) { FindBoundingRect( pEntry ); - Rectangle aOutputArea( GetOutputRect() ); + tools::Rectangle aOutputArea( GetOutputRect() ); pGridMap->OccupyGrids( pEntry ); if( !aOutputArea.IsOver( pEntry->aRect ) ) return; // is invisible @@ -337,11 +337,11 @@ void SvxIconChoiceCtrl_Impl::CreateAutoMnemonics( MnemonicGenerator* _pGenerator } } -Rectangle SvxIconChoiceCtrl_Impl::GetOutputRect() const +tools::Rectangle SvxIconChoiceCtrl_Impl::GetOutputRect() const { Point aOrigin( pView->GetMapMode().GetOrigin() ); aOrigin *= -1; - return Rectangle( aOrigin, aOutputSize ); + return tools::Rectangle( aOrigin, aOutputSize ); } void SvxIconChoiceCtrl_Impl::SetListPositions() @@ -471,7 +471,7 @@ void SvxIconChoiceCtrl_Impl::ResetVirtSize() VisRectChanged(); } -void SvxIconChoiceCtrl_Impl::AdjustVirtSize( const Rectangle& rRect ) +void SvxIconChoiceCtrl_Impl::AdjustVirtSize( const tools::Rectangle& rRect ) { long nHeightOffs = 0; long nWidthOffs = 0; @@ -563,7 +563,7 @@ void SvxIconChoiceCtrl_Impl::ImpArrange( bool bKeepPredecessors ) static Point aEmptyPoint; bool bOldUpdate = bUpdateMode; - Rectangle aCurOutputArea( GetOutputRect() ); + tools::Rectangle aCurOutputArea( GetOutputRect() ); if( (nWinBits & WB_SMART_ARRANGE) && aCurOutputArea.TopLeft() != aEmptyPoint ) bUpdateMode = false; aAutoArrangeIdle.Stop(); @@ -589,7 +589,7 @@ void SvxIconChoiceCtrl_Impl::ImpArrange( bool bKeepPredecessors ) ShowCursor( true ); } -void SvxIconChoiceCtrl_Impl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SvxIconChoiceCtrl_Impl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { bEndScrollInvalidate = false; @@ -667,7 +667,7 @@ void SvxIconChoiceCtrl_Impl::Paint(vcl::RenderContext& rRenderContext, const Rec while(nCount) { SvxIconChoiceCtrlEntry* pEntry = (*pZOrderList)[nPos]; - const Rectangle& rBoundRect = GetEntryBoundRect(pEntry); + const tools::Rectangle& rBoundRect = GetEntryBoundRect(pEntry); if (rRect.IsOver(rBoundRect)) { PaintEntry(pEntry, rBoundRect.TopLeft(), rRenderContext); @@ -699,13 +699,13 @@ void SvxIconChoiceCtrl_Impl::RepaintSelectedEntries() if (!nCount) return; - Rectangle aOutRect(GetOutputRect()); + tools::Rectangle aOutRect(GetOutputRect()); for (size_t nCur = 0; nCur < nCount; nCur++) { SvxIconChoiceCtrlEntry* pEntry = (*pZOrderList)[nCur]; if (pEntry->GetFlags() & SvxIconViewFlags::SELECTED) { - const Rectangle& rBoundRect = GetEntryBoundRect(pEntry); + const tools::Rectangle& rBoundRect = GetEntryBoundRect(pEntry); if (aOutRect.IsOver(rBoundRect)) pView->Invalidate(rBoundRect); } @@ -751,12 +751,12 @@ bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt) if( rMEvt.IsShift() ) { - Rectangle aRect( GetEntryBoundRect( pAnchor )); + tools::Rectangle aRect( GetEntryBoundRect( pAnchor )); if( pEntry ) aRect.Union( GetEntryBoundRect( pEntry ) ); else { - Rectangle aTempRect( aDocPos, Size(1,1)); + tools::Rectangle aTempRect( aDocPos, Size(1,1)); aRect.Union( aTempRect ); } aCurSelectionRect = aRect; @@ -1039,7 +1039,7 @@ bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, true ); if( !pNewCursor ) { - Rectangle aRect( GetEntryBoundRect( pCursor ) ); + tools::Rectangle aRect( GetEntryBoundRect( pCursor ) ); if( aRect.Top()) { aRect.Bottom() -= aRect.Top(); @@ -1094,7 +1094,7 @@ bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, true ); if( !pNewCursor ) { - Rectangle aRect( GetEntryBoundRect(pCursor)); + tools::Rectangle aRect( GetEntryBoundRect(pCursor)); if( aRect.Left() ) { aRect.Right() -= aRect.Left(); @@ -1508,7 +1508,7 @@ void SvxIconChoiceCtrl_Impl::SetUpdateMode( bool bUpdate ) } // priorities of the emphasis: bDropTarget => bCursored => bSelected -void SvxIconChoiceCtrl_Impl::PaintEmphasis(const Rectangle& rTextRect, bool bSelected, +void SvxIconChoiceCtrl_Impl::PaintEmphasis(const tools::Rectangle& rTextRect, bool bSelected, bool bDropTarget, bool bCursored, vcl::RenderContext& rRenderContext) { static Color aTransparent(COL_TRANSPARENT); @@ -1552,7 +1552,7 @@ void SvxIconChoiceCtrl_Impl::PaintEmphasis(const Rectangle& rTextRect, bool bSel } -void SvxIconChoiceCtrl_Impl::PaintItem(const Rectangle& rRect, +void SvxIconChoiceCtrl_Impl::PaintItem(const tools::Rectangle& rRect, IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry, sal_uInt16 nPaintFlags, vcl::RenderContext& rRenderContext ) { @@ -1564,7 +1564,7 @@ void SvxIconChoiceCtrl_Impl::PaintItem(const Rectangle& rRect, if (pEntry->IsFocused()) { - Rectangle aRect (CalcFocusRect(pEntry)); + tools::Rectangle aRect (CalcFocusRect(pEntry)); ShowFocus(aRect); DrawFocusRect(rRenderContext); } @@ -1594,8 +1594,8 @@ void SvxIconChoiceCtrl_Impl::PaintEntry(SvxIconChoiceCtrlEntry* pEntry, const Po rRenderContext.Push(PushFlags::FONT | PushFlags::TEXTCOLOR); OUString aEntryText(SvtIconChoiceCtrl::GetEntryText(pEntry, false)); - Rectangle aTextRect(CalcTextRect(pEntry, &rPos, false, &aEntryText)); - Rectangle aBmpRect(CalcBmpRect(pEntry, &rPos)); + tools::Rectangle aTextRect(CalcTextRect(pEntry, &rPos, false, &aEntryText)); + tools::Rectangle aBmpRect(CalcBmpRect(pEntry, &rPos)); bool bShowSelection = ((bSelected && !bCursored) && !bNoEmphasis && (eSelectionMode != SelectionMode::NONE)); @@ -1629,7 +1629,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry(SvxIconChoiceCtrlEntry* pEntry, const Po bool bResetClipRegion = false; if (!rRenderContext.IsClipRegion() && (aVerSBar->IsVisible() || aHorSBar->IsVisible())) { - Rectangle aOutputArea(GetOutputRect()); + tools::Rectangle aOutputArea(GetOutputRect()); if (aOutputArea.IsOver(aTextRect) || aOutputArea.IsOver(aBmpRect)) { rRenderContext.SetClipRegion(vcl::Region(aOutputArea)); @@ -1667,7 +1667,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry(SvxIconChoiceCtrlEntry* pEntry, const Po void SvxIconChoiceCtrl_Impl::SetEntryPos( SvxIconChoiceCtrlEntry* pEntry, const Point& rPos ) { ShowCursor( false ); - Rectangle aBoundRect( GetEntryBoundRect( pEntry )); + tools::Rectangle aBoundRect( GetEntryBoundRect( pEntry )); pView->Invalidate( aBoundRect ); ToTop( pEntry ); if( !IsAutoArrange() ) @@ -1723,7 +1723,7 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetEntry( const Point& rDocPos, { if( bHit ) { - Rectangle aRect = CalcBmpRect( pEntry ); + tools::Rectangle aRect = CalcBmpRect( pEntry ); aRect.Top() -= 3; aRect.Bottom() += 3; aRect.Left() -= 3; @@ -1745,12 +1745,12 @@ void SvxIconChoiceCtrl_Impl::MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, b { if ( bBound ) { - const Rectangle& rRect = GetEntryBoundRect( pEntry ); + const tools::Rectangle& rRect = GetEntryBoundRect( pEntry ); MakeVisible( rRect ); } else { - Rectangle aRect = CalcBmpRect( pEntry ); + tools::Rectangle aRect = CalcBmpRect( pEntry ); aRect.Union( CalcTextRect( pEntry ) ); aRect.Top() += TBOFFS_BOUND; aRect.Bottom() += TBOFFS_BOUND; @@ -1760,16 +1760,16 @@ void SvxIconChoiceCtrl_Impl::MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, b } } -const Rectangle& SvxIconChoiceCtrl_Impl::GetEntryBoundRect( SvxIconChoiceCtrlEntry* pEntry ) +const tools::Rectangle& SvxIconChoiceCtrl_Impl::GetEntryBoundRect( SvxIconChoiceCtrlEntry* pEntry ) { if( !IsBoundingRectValid( pEntry->aRect )) FindBoundingRect( pEntry ); return pEntry->aRect; } -Rectangle SvxIconChoiceCtrl_Impl::CalcBmpRect( SvxIconChoiceCtrlEntry* pEntry, const Point* pPos ) +tools::Rectangle SvxIconChoiceCtrl_Impl::CalcBmpRect( SvxIconChoiceCtrlEntry* pEntry, const Point* pPos ) { - Rectangle aBound = GetEntryBoundRect( pEntry ); + tools::Rectangle aBound = GetEntryBoundRect( pEntry ); if( pPos ) aBound.SetPos( *pPos ); Point aPos( aBound.TopLeft() ); @@ -1779,14 +1779,14 @@ Rectangle SvxIconChoiceCtrl_Impl::CalcBmpRect( SvxIconChoiceCtrlEntry* pEntry, c case WB_ICON: { aPos.X() += ( aBound.GetWidth() - aImageSize.Width() ) / 2; - return Rectangle( aPos, aImageSize ); + return tools::Rectangle( aPos, aImageSize ); } case WB_SMALLICON: case WB_DETAILS: aPos.Y() += ( aBound.GetHeight() - aImageSize.Height() ) / 2; //TODO: determine horizontal distance to bounding rectangle - return Rectangle( aPos, aImageSize ); + return tools::Rectangle( aPos, aImageSize ); default: OSL_FAIL("IconView: Viewmode not set"); @@ -1794,7 +1794,7 @@ Rectangle SvxIconChoiceCtrl_Impl::CalcBmpRect( SvxIconChoiceCtrlEntry* pEntry, c } } -Rectangle SvxIconChoiceCtrl_Impl::CalcTextRect( SvxIconChoiceCtrlEntry* pEntry, +tools::Rectangle SvxIconChoiceCtrl_Impl::CalcTextRect( SvxIconChoiceCtrlEntry* pEntry, const Point* pEntryPos, bool bEdit, const OUString* pStr ) { OUString aEntryText; @@ -1803,12 +1803,12 @@ Rectangle SvxIconChoiceCtrl_Impl::CalcTextRect( SvxIconChoiceCtrlEntry* pEntry, else aEntryText = *pStr; - const Rectangle aMaxTextRect( CalcMaxTextRect( pEntry ) ); - Rectangle aBound( GetEntryBoundRect( pEntry ) ); + const tools::Rectangle aMaxTextRect( CalcMaxTextRect( pEntry ) ); + tools::Rectangle aBound( GetEntryBoundRect( pEntry ) ); if( pEntryPos ) aBound.SetPos( *pEntryPos ); - Rectangle aTextRect( aMaxTextRect ); + tools::Rectangle aTextRect( aMaxTextRect ); if( !bEdit ) aTextRect = pView->GetTextRect( aTextRect, aEntryText, nCurTextDrawFlags ); @@ -1850,7 +1850,7 @@ Rectangle SvxIconChoiceCtrl_Impl::CalcTextRect( SvxIconChoiceCtrlEntry* pEntry, aPos.Y() += (nBoundHeight - aTextSize.Height()) / 2; break; } - return Rectangle( aPos, aTextSize ); + return tools::Rectangle( aPos, aTextSize ); } @@ -1972,7 +1972,7 @@ void SvxIconChoiceCtrl_Impl::FindBoundingRect( SvxIconChoiceCtrlEntry* pEntry ) void SvxIconChoiceCtrl_Impl::SetBoundingRect_Impl( SvxIconChoiceCtrlEntry* pEntry, const Point& rPos, const Size& /*rBoundingSize*/ ) { - Rectangle aGridRect( rPos, Size(nGridDX, nGridDY) ); + tools::Rectangle aGridRect( rPos, Size(nGridDX, nGridDY) ); pEntry->aGridRect = aGridRect; Center( pEntry ); AdjustVirtSize( pEntry->aRect ); @@ -2016,7 +2016,7 @@ void SvxIconChoiceCtrl_Impl::ShowCursor( bool bShow ) pView->HideFocus(); return; } - Rectangle aRect ( CalcFocusRect( pCursor ) ); + tools::Rectangle aRect ( CalcFocusRect( pCursor ) ); /*pView->*/ShowFocus( aRect ); } @@ -2036,8 +2036,8 @@ void SvxIconChoiceCtrl_Impl::HideDDIcon() bool SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd ) { - Rectangle aDocRect( Point(), aVirtOutputSize ); - Rectangle aVisRect( GetOutputRect() ); + tools::Rectangle aDocRect( Point(), aVirtOutputSize ); + tools::Rectangle aVisRect( GetOutputRect() ); if( aVisRect.IsInside( aDocRect )) return false; Size aDocSize( aDocRect.GetSize() ); @@ -2145,7 +2145,7 @@ void SvxIconChoiceCtrl_Impl::ToTop( SvxIconChoiceCtrlEntry* pEntry ) } } -void SvxIconChoiceCtrl_Impl::ClipAtVirtOutRect( Rectangle& rRect ) const +void SvxIconChoiceCtrl_Impl::ClipAtVirtOutRect( tools::Rectangle& rRect ) const { if( rRect.Bottom() >= aVirtOutputSize.Height() ) rRect.Bottom() = aVirtOutputSize.Height() - 1; @@ -2161,14 +2161,14 @@ void SvxIconChoiceCtrl_Impl::ClipAtVirtOutRect( Rectangle& rRect ) const // visible // bScrBar == true: rectangle was calculated because of a scrollbar event -void SvxIconChoiceCtrl_Impl::MakeVisible( const Rectangle& rRect, bool bScrBar ) +void SvxIconChoiceCtrl_Impl::MakeVisible( const tools::Rectangle& rRect, bool bScrBar ) { - Rectangle aVirtRect( rRect ); + tools::Rectangle aVirtRect( rRect ); ClipAtVirtOutRect( aVirtRect ); Point aOrigin( pView->GetMapMode().GetOrigin() ); // convert to document coordinate aOrigin *= -1; - Rectangle aOutputArea( GetOutputRect() ); + tools::Rectangle aOutputArea( GetOutputRect() ); if( aOutputArea.IsInside( aVirtRect ) ) return; // is already visible @@ -2334,16 +2334,16 @@ void SvxIconChoiceCtrl_Impl::SetGrid( const Size& rSize ) // bounding rectangle. In WB_ICON mode with SvxIconChoiceCtrlTextMode::Full, Bottom is set to // LONG_MAX. -Rectangle SvxIconChoiceCtrl_Impl::CalcMaxTextRect( const SvxIconChoiceCtrlEntry* pEntry ) const +tools::Rectangle SvxIconChoiceCtrl_Impl::CalcMaxTextRect( const SvxIconChoiceCtrlEntry* pEntry ) const { - Rectangle aBoundRect; + tools::Rectangle aBoundRect; // avoid infinite recursion: don't calculate the bounding rectangle here if( IsBoundingRectValid( pEntry->aRect ) ) aBoundRect = pEntry->aRect; else aBoundRect = pEntry->aGridRect; - Rectangle aBmpRect( const_cast<SvxIconChoiceCtrl_Impl*>(this)->CalcBmpRect( + tools::Rectangle aBmpRect( const_cast<SvxIconChoiceCtrl_Impl*>(this)->CalcBmpRect( const_cast<SvxIconChoiceCtrlEntry*>(pEntry) ) ); if( nWinBits & WB_ICON ) { @@ -2429,7 +2429,7 @@ void SvxIconChoiceCtrl_Impl::Scroll( long nDeltaX, long nDeltaY ) aOrigin *= -1; aOrigin.Y() += nDeltaY; aOrigin.X() += nDeltaX; - Rectangle aRect( aOrigin, aOutputSize ); + tools::Rectangle aRect( aOrigin, aOutputSize ); MakeVisible( aRect, true/*bScrollBar*/ ); } @@ -2442,19 +2442,19 @@ const Size& SvxIconChoiceCtrl_Impl::GetItemSize( SvxIconChoiceCtrlEntry*, return aImageSize; // IcnViewFieldType::Image } -Rectangle SvxIconChoiceCtrl_Impl::CalcFocusRect( SvxIconChoiceCtrlEntry* pEntry ) +tools::Rectangle SvxIconChoiceCtrl_Impl::CalcFocusRect( SvxIconChoiceCtrlEntry* pEntry ) { - Rectangle aTextRect( CalcTextRect( pEntry ) ); - Rectangle aBoundRect( GetEntryBoundRect( pEntry ) ); - return Rectangle( + tools::Rectangle aTextRect( CalcTextRect( pEntry ) ); + tools::Rectangle aBoundRect( GetEntryBoundRect( pEntry ) ); + return tools::Rectangle( aBoundRect.Left(), aBoundRect.Top() - 1, aBoundRect.Right() - 1, aTextRect.Bottom() + 1); } // the hot spot is the inner 50% of the rectangle -static Rectangle GetHotSpot( const Rectangle& rRect ) +static tools::Rectangle GetHotSpot( const tools::Rectangle& rRect ) { - Rectangle aResult( rRect ); + tools::Rectangle aResult( rRect ); aResult.Justify(); Size aSize( rRect.GetSize() ); long nDelta = aSize.Width() / 4; @@ -2467,16 +2467,16 @@ static Rectangle GetHotSpot( const Rectangle& rRect ) } void SvxIconChoiceCtrl_Impl::SelectRect( SvxIconChoiceCtrlEntry* pEntry1, SvxIconChoiceCtrlEntry* pEntry2, - bool bAdd, std::vector<Rectangle*>* pOtherRects ) + bool bAdd, std::vector<tools::Rectangle*>* pOtherRects ) { DBG_ASSERT(pEntry1 && pEntry2,"SelectEntry: Invalid Entry-Ptr"); - Rectangle aRect( GetEntryBoundRect( pEntry1 ) ); + tools::Rectangle aRect( GetEntryBoundRect( pEntry1 ) ); aRect.Union( GetEntryBoundRect( pEntry2 ) ); SelectRect( aRect, bAdd, pOtherRects ); } -void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, bool bAdd, - std::vector<Rectangle*>* pOtherRects ) +void SvxIconChoiceCtrl_Impl::SelectRect( const tools::Rectangle& rRect, bool bAdd, + std::vector<tools::Rectangle*>* pOtherRects ) { aCurSelectionRect = rRect; if( !pZOrderList || !pZOrderList->size() ) @@ -2490,7 +2490,7 @@ void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, bool bAdd, pView->Update(); const size_t nCount = pZOrderList->size(); - Rectangle aRect( rRect ); + tools::Rectangle aRect( rRect ); aRect.Justify(); bool bCalcOverlap = (bAdd && pOtherRects && !pOtherRects->empty()); @@ -2507,7 +2507,7 @@ void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, bool bAdd, if( !IsBoundingRectValid( pEntry->aRect )) FindBoundingRect( pEntry ); - Rectangle aBoundRect( GetHotSpot( pEntry->aRect ) ); + tools::Rectangle aBoundRect( GetHotSpot( pEntry->aRect ) ); bool bSelected = pEntry->IsSelected(); bool bOverlaps; @@ -2618,12 +2618,12 @@ void SvxIconChoiceCtrl_Impl::SelectRange( } } -bool SvxIconChoiceCtrl_Impl::IsOver( std::vector<Rectangle*>* pRectList, const Rectangle& rBoundRect ) +bool SvxIconChoiceCtrl_Impl::IsOver( std::vector<tools::Rectangle*>* pRectList, const tools::Rectangle& rBoundRect ) { const sal_uInt16 nCount = pRectList->size(); for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ ) { - Rectangle* pRect = (*pRectList)[ nCur ]; + tools::Rectangle* pRect = (*pRectList)[ nCur ]; if( rBoundRect.IsOver( *pRect )) return true; } @@ -2634,14 +2634,14 @@ void SvxIconChoiceCtrl_Impl::AddSelectedRect( SvxIconChoiceCtrlEntry* pEntry1, SvxIconChoiceCtrlEntry* pEntry2 ) { DBG_ASSERT(pEntry1 && pEntry2,"SelectEntry: Invalid Entry-Ptr"); - Rectangle aRect( GetEntryBoundRect( pEntry1 ) ); + tools::Rectangle aRect( GetEntryBoundRect( pEntry1 ) ); aRect.Union( GetEntryBoundRect( pEntry2 ) ); AddSelectedRect( aRect ); } -void SvxIconChoiceCtrl_Impl::AddSelectedRect( const Rectangle& rRect ) +void SvxIconChoiceCtrl_Impl::AddSelectedRect( const tools::Rectangle& rRect ) { - Rectangle* pRect = new Rectangle( rRect ); + tools::Rectangle* pRect = new tools::Rectangle( rRect ); pRect->Justify(); aSelectedRectList.push_back( pRect ); } @@ -2651,7 +2651,7 @@ void SvxIconChoiceCtrl_Impl::ClearSelectedRectList() const sal_uInt16 nCount = aSelectedRectList.size(); for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ ) { - Rectangle* pRect = aSelectedRectList[ nCur ]; + tools::Rectangle* pRect = aSelectedRectList[ nCur ]; delete pRect; } aSelectedRectList.clear(); @@ -2675,7 +2675,7 @@ IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, DocRectChangedHdl, Timer *, void) bool SvxIconChoiceCtrl_Impl::IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos ) { - Rectangle aRect( CalcTextRect( pEntry )); + tools::Rectangle aRect( CalcTextRect( pEntry )); if( aRect.IsInside( rDocPos ) ) return true; return false; @@ -2719,7 +2719,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryTextMode( SvxIconChoiceCtrlTextMode eMode, // of the background. But what will we see, if the backgroundcolor is gray ? - We will see // a gray focusrect on a gray background !!! -void SvxIconChoiceCtrl_Impl::ShowFocus ( Rectangle& rRect ) +void SvxIconChoiceCtrl_Impl::ShowFocus ( tools::Rectangle& rRect ) { Color aBkgColor(pView->GetBackground().GetColor()); Color aPenColor; @@ -2820,7 +2820,7 @@ void SvxIconChoiceCtrl_Impl::EditEntry( SvxIconChoiceCtrlEntry* pEntry ) pCurEditedEntry = pEntry; OUString aEntryText( SvtIconChoiceCtrl::GetEntryText( pEntry, true ) ); - Rectangle aRect( CalcTextRect( pEntry, nullptr, true, &aEntryText ) ); + tools::Rectangle aRect( CalcTextRect( pEntry, nullptr, true, &aEntryText ) ); MakeVisible( aRect ); Point aPos( aRect.TopLeft() ); aPos = pView->GetPixelPos( aPos ); @@ -3219,7 +3219,7 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::FindEntryPredecessor( SvxIconCho const Point& rPosTopLeft ) { Point aPos( rPosTopLeft ); //TopLeft - Rectangle aCenterRect( CalcBmpRect( pEntry, &aPos )); + tools::Rectangle aCenterRect( CalcBmpRect( pEntry, &aPos )); Point aNewPos( aCenterRect.Center() ); sal_uLong nGrid = GetPredecessorGrid( aNewPos ); size_t nCount = aEntries.size(); @@ -3277,11 +3277,11 @@ bool SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt ) OUString sQuickHelpText = pEntry->GetQuickHelpText(); OUString aEntryText( SvtIconChoiceCtrl::GetEntryText( pEntry, false ) ); - Rectangle aTextRect( CalcTextRect( pEntry, nullptr, false, &aEntryText ) ); + tools::Rectangle aTextRect( CalcTextRect( pEntry, nullptr, false, &aEntryText ) ); if ( ( !aTextRect.IsInside( aPos ) || aEntryText.isEmpty() ) && sQuickHelpText.isEmpty() ) return false; - Rectangle aOptTextRect( aTextRect ); + tools::Rectangle aOptTextRect( aTextRect ); aOptTextRect.Bottom() = LONG_MAX; DrawTextFlags nNewFlags = nCurTextDrawFlags; nNewFlags &= ~DrawTextFlags( DrawTextFlags::Clip | DrawTextFlags::EndEllipsis ); @@ -3343,9 +3343,9 @@ const SvxIconChoiceCtrlColumnInfo* SvxIconChoiceCtrl_Impl::GetColumn( sal_uInt16 return it->second.get(); } -void SvxIconChoiceCtrl_Impl::DrawHighlightFrame(vcl::RenderContext& rRenderContext, const Rectangle& rBmpRect) +void SvxIconChoiceCtrl_Impl::DrawHighlightFrame(vcl::RenderContext& rRenderContext, const tools::Rectangle& rBmpRect) { - Rectangle aBmpRect(rBmpRect); + tools::Rectangle aBmpRect(rBmpRect); long nBorder = 2; if (aImageSize.Width() < 32) nBorder = 1; @@ -3374,7 +3374,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryHighlightFrame( SvxIconChoiceCtrlEntry* pEn if (pCurHighlightFrame) { - Rectangle aInvalidationRect(GetEntryBoundRect(pCurHighlightFrame)); + tools::Rectangle aInvalidationRect(GetEntryBoundRect(pCurHighlightFrame)); aInvalidationRect.expand(5); pCurHighlightFrame = nullptr; pView->Invalidate(aInvalidationRect); @@ -3383,7 +3383,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryHighlightFrame( SvxIconChoiceCtrlEntry* pEn pCurHighlightFrame = pEntry; if (pEntry) { - Rectangle aInvalidationRect(GetEntryBoundRect(pEntry)); + tools::Rectangle aInvalidationRect(GetEntryBoundRect(pEntry)); aInvalidationRect.expand(5); pView->Invalidate(aInvalidationRect); } diff --git a/svtools/source/contnr/imivctl2.cxx b/svtools/source/contnr/imivctl2.cxx index 6506974e1e79..8fc65811fe35 100644 --- a/svtools/source/contnr/imivctl2.cxx +++ b/svtools/source/contnr/imivctl2.cxx @@ -44,7 +44,7 @@ sal_uInt16 IcnCursor_Impl::GetSortListPos( SvxIconChoiceCtrlEntryPtrVec& rList, long nPrevValue = LONG_MIN; while( nCount ) { - const Rectangle& rRect = pView->GetEntryBoundRect( rList[nCurPos] ); + const tools::Rectangle& rRect = pView->GetEntryBoundRect( rList[nCurPos] ); long nCurValue; if( bVertical ) nCurValue = rRect.Top(); @@ -74,7 +74,7 @@ void IcnCursor_Impl::ImplCreate() { SvxIconChoiceCtrlEntry* pEntry = pView->aEntries[ nCur ]; // const Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); - Rectangle rRect( pView->CalcBmpRect( pEntry ) ); + tools::Rectangle rRect( pView->CalcBmpRect( pEntry ) ); short nY = (short)( ((rRect.Top()+rRect.Bottom())/2) / nDeltaHeight ); short nX = (short)( ((rRect.Left()+rRect.Right())/2) / nDeltaWidth ); @@ -122,7 +122,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(sal_uInt16 nCol, sal_uInt16 nT if( !nCount ) return nullptr; - const Rectangle& rRefRect = pView->GetEntryBoundRect(pCurEntry); + const tools::Rectangle& rRefRect = pView->GetEntryBoundRect(pCurEntry); if( bSimple ) { @@ -137,7 +137,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(sal_uInt16 nCol, sal_uInt16 nT while( ++it != rList.end() ) { SvxIconChoiceCtrlEntry* pEntry = *it; - const Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); + const tools::Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); if( rRect.Top() > rRefRect.Top() ) return pEntry; } @@ -149,7 +149,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(sal_uInt16 nCol, sal_uInt16 nT while (it2 != rList.rend()) { SvxIconChoiceCtrlEntry* pEntry = *it2; - const Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); + const tools::Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); if( rRect.Top() < rRefRect.Top() ) return pEntry; ++it2; @@ -171,7 +171,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(sal_uInt16 nCol, sal_uInt16 nT sal_uInt16 nY = pEntry->nY; if( nY >= nTop && nY <= nBottom ) { - const Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); + const tools::Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); long nDistance = rRect.Top() - rRefRect.Top(); if( nDistance < 0 ) nDistance *= -1; @@ -198,7 +198,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(sal_uInt16 nRow, sal_uInt16 nL if( !nCount ) return nullptr; - const Rectangle& rRefRect = pView->GetEntryBoundRect(pCurEntry); + const tools::Rectangle& rRefRect = pView->GetEntryBoundRect(pCurEntry); if( bSimple ) { @@ -213,7 +213,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(sal_uInt16 nRow, sal_uInt16 nL while( ++it != rList.end() ) { SvxIconChoiceCtrlEntry* pEntry = *it; - const Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); + const tools::Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); if( rRect.Left() > rRefRect.Left() ) return pEntry; } @@ -225,7 +225,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(sal_uInt16 nRow, sal_uInt16 nL while (it2 != rList.rend()) { SvxIconChoiceCtrlEntry* pEntry = *it2; - const Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); + const tools::Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); if( rRect.Left() < rRefRect.Left() ) return pEntry; ++it2; @@ -247,7 +247,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(sal_uInt16 nRow, sal_uInt16 nL sal_uInt16 nX = pEntry->nX; if( nX >= nLeft && nX <= nRight ) { - const Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); + const tools::Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); long nDistance = rRect.Left() - rRefRect.Left(); if( nDistance < 0 ) nDistance *= -1; @@ -606,14 +606,14 @@ GridId IcnGridMap_Impl::GetGrid( const Point& rDocPos ) return nId; } -Rectangle IcnGridMap_Impl::GetGridRect( GridId nId ) +tools::Rectangle IcnGridMap_Impl::GetGridRect( GridId nId ) { Create(); sal_uInt16 nGridX, nGridY; GetGridCoord( nId, nGridX, nGridY ); const long nLeft = nGridX * _pView->nGridDX+ LROFFS_WINBORDER; const long nTop = nGridY * _pView->nGridDY + TBOFFS_WINBORDER; - return Rectangle( + return tools::Rectangle( nLeft, nTop, nLeft + _pView->nGridDX, nTop + _pView->nGridDY ); diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx index 4d41497c8cd2..41c113867ffd 100644 --- a/svtools/source/contnr/ivctrl.cxx +++ b/svtools/source/contnr/ivctrl.cxx @@ -112,7 +112,7 @@ OUString SvtIconChoiceCtrl::GetEntryText( SvxIconChoiceCtrlEntry* pEntry, bool ) return pEntry->GetText(); } -void SvtIconChoiceCtrl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SvtIconChoiceCtrl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { _pImpl->Paint(rRenderContext, rRect); } @@ -139,7 +139,7 @@ void SvtIconChoiceCtrl::ArrangeIcons() if ( GetStyle() & WB_ALIGN_TOP ) { Size aFullSize; - Rectangle aEntryRect; + tools::Rectangle aEntryRect; for ( sal_Int32 i = 0; i < GetEntryCount(); i++ ) { @@ -154,7 +154,7 @@ void SvtIconChoiceCtrl::ArrangeIcons() else if ( GetStyle() & WB_ALIGN_LEFT ) { Size aFullSize; - Rectangle aEntryRect; + tools::Rectangle aEntryRect; for ( sal_Int32 i = 0; i < GetEntryCount(); i++ ) { @@ -363,13 +363,13 @@ void SvtIconChoiceCtrl::SetBackground( const Wallpaper& rPaper ) } if( aBackground.IsScrollable() ) { - Rectangle aRect; + tools::Rectangle aRect; aRect.SetSize( Size(32765, 32765) ); aBackground.SetRect( aRect ); } else { - Rectangle aRect( _pImpl->GetOutputRect() ); + tools::Rectangle aRect( _pImpl->GetOutputRect() ); aBackground.SetRect( aRect ); } Control::SetBackground( aBackground ); @@ -396,7 +396,7 @@ void SvtIconChoiceCtrl::SetSelectionMode( SelectionMode eMode ) _pImpl->SetSelectionMode( eMode ); } -Rectangle SvtIconChoiceCtrl::GetBoundingBox( SvxIconChoiceCtrlEntry* pEntry ) const +tools::Rectangle SvtIconChoiceCtrl::GetBoundingBox( SvxIconChoiceCtrlEntry* pEntry ) const { return _pImpl->GetEntryBoundRect( pEntry ); } @@ -407,9 +407,9 @@ void SvtIconChoiceCtrl::FillLayoutData() const const_cast<SvtIconChoiceCtrl*>(this)->Invalidate(); } -Rectangle SvtIconChoiceCtrl::GetEntryCharacterBounds( const sal_Int32 _nEntryPos, const sal_Int32 _nCharacterIndex ) const +tools::Rectangle SvtIconChoiceCtrl::GetEntryCharacterBounds( const sal_Int32 _nEntryPos, const sal_Int32 _nCharacterIndex ) const { - Rectangle aRect; + tools::Rectangle aRect; Pair aEntryCharacterRange = GetLineStartEnd( _nEntryPos ); if ( aEntryCharacterRange.A() + _nCharacterIndex < aEntryCharacterRange.B() ) diff --git a/svtools/source/contnr/simptabl.cxx b/svtools/source/contnr/simptabl.cxx index aa1c614a231d..0d910049248f 100644 --- a/svtools/source/contnr/simptabl.cxx +++ b/svtools/source/contnr/simptabl.cxx @@ -192,7 +192,7 @@ void SvSimpleTable::SetTabs() } } -void SvSimpleTable::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SvSimpleTable::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { SvHeaderTabListBox::Paint(rRenderContext, rRect); @@ -344,7 +344,7 @@ void SvSimpleTable::HBarDrag() HideTracking(); if(!aHeaderBar->IsItemMode()) { - Rectangle aSizeRect(Point(0,0), + tools::Rectangle aSizeRect(Point(0,0), SvHeaderTabListBox::GetOutputSizePixel()); aSizeRect.Left()=-GetXOffset()+aHeaderBar->GetDragPos(); aSizeRect.Right()=-GetXOffset()+aHeaderBar->GetDragPos(); @@ -389,7 +389,7 @@ IMPL_LINK( SvSimpleTable, StartDragHdl, HeaderBar*, pCtr, void) { if(!aHeaderBar->IsItemMode()) { - Rectangle aSizeRect(Point(0,0), + tools::Rectangle aSizeRect(Point(0,0), SvHeaderTabListBox::GetOutputSizePixel()); aSizeRect.Left()=-GetXOffset()+aHeaderBar->GetDragPos(); aSizeRect.Right()=-GetXOffset()+aHeaderBar->GetDragPos(); diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index fb3c17827bee..b47fd58440bb 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -218,7 +218,7 @@ void SvImpLBox::UpdateContextBmpWidthMax( SvTreeListEntry* pEntry ) } } -void SvImpLBox::CalcCellFocusRect( SvTreeListEntry* pEntry, Rectangle& rRect ) +void SvImpLBox::CalcCellFocusRect( SvTreeListEntry* pEntry, tools::Rectangle& rRect ) { if ( pEntry && bIsCellFocusEnabled ) { @@ -359,7 +359,7 @@ void SvImpLBox::CursorDown() ShowCursor( false ); pView->Update(); pStartEntry = pNextFirstToDraw; - Rectangle aArea( GetVisibleArea() ); + tools::Rectangle aArea( GetVisibleArea() ); pView->Scroll( 0, -(pView->GetEntryHeight()), aArea, ScrollFlags::NoChildren ); pView->Update(); ShowCursor( true ); @@ -380,7 +380,7 @@ void SvImpLBox::CursorUp() ShowCursor( false ); pView->Update(); pStartEntry = pPrevFirstToDraw; - Rectangle aArea( GetVisibleArea() ); + tools::Rectangle aArea( GetVisibleArea() ); aArea.Bottom() -= nEntryHeight; pView->Scroll( 0, nEntryHeight, aArea, ScrollFlags::NoChildren ); pView->Update(); @@ -416,7 +416,7 @@ void SvImpLBox::PageDown( sal_uInt16 nDelta ) } else { - Rectangle aArea( GetVisibleArea() ); + tools::Rectangle aArea( GetVisibleArea() ); long nScroll = pView->GetEntryHeight() * static_cast<long>(nRealDelta); nScroll = -nScroll; pView->Update(); @@ -454,7 +454,7 @@ void SvImpLBox::PageUp( sal_uInt16 nDelta ) else { long nEntryHeight = pView->GetEntryHeight(); - Rectangle aArea( GetVisibleArea() ); + tools::Rectangle aArea( GetVisibleArea() ); pView->Update(); pView->Scroll( 0, nEntryHeight*nRealDelta, aArea, ScrollFlags::NoChildren ); pView->Update(); @@ -535,7 +535,7 @@ void SvImpLBox::InvalidateEntriesFrom( long nY ) const { if( !(nFlags & LBoxFlags::InPaint )) { - Rectangle aRect( GetVisibleArea() ); + tools::Rectangle aRect( GetVisibleArea() ); aRect.Top() = nY; pView->Invalidate( aRect ); } @@ -545,7 +545,7 @@ void SvImpLBox::InvalidateEntry( long nY ) const { if( !(nFlags & LBoxFlags::InPaint )) { - Rectangle aRect( GetVisibleArea() ); + tools::Rectangle aRect( GetVisibleArea() ); long nMaxBottom = aRect.Bottom(); aRect.Top() = nY; aRect.Bottom() = nY; aRect.Bottom() += pView->GetEntryHeight(); @@ -587,7 +587,7 @@ void SvImpLBox::RecalcFocusRect() { pView->HideFocus(); long nY = GetEntryLine( pCursor ); - Rectangle aRect = pView->GetFocusRect( pCursor, nY ); + tools::Rectangle aRect = pView->GetFocusRect( pCursor, nY ); CalcCellFocusRect( pCursor, aRect ); vcl::Region aOldClip( pView->GetClipRegion()); vcl::Region aClipRegion( GetClipRegionRect() ); @@ -683,7 +683,7 @@ void SvImpLBox::ShowCursor( bool bShow ) else { long nY = GetEntryLine( pCursor ); - Rectangle aRect = pView->GetFocusRect( pCursor, nY ); + tools::Rectangle aRect = pView->GetFocusRect( pCursor, nY ); CalcCellFocusRect( pCursor, aRect ); vcl::Region aOldClip( pView->GetClipRegion()); vcl::Region aClipRegion( GetClipRegionRect() ); @@ -743,7 +743,7 @@ void SvImpLBox::KeyLeftRight( long nDelta ) if( !(nFlags & LBoxFlags::InResize) ) { - Rectangle aRect( GetVisibleArea() ); + tools::Rectangle aRect( GetVisibleArea() ); pView->Scroll( -nDelta, 0, aRect, ScrollFlags::NoChildren ); } else @@ -785,7 +785,7 @@ bool SvImpLBox::EntryReallyHit(SvTreeListEntry* pEntry, const Point& rPosPixel, if( pEntry->ItemCount() >= 3 ) return true; - Rectangle aRect( pView->GetFocusRect( pEntry, nLine )); + tools::Rectangle aRect( pView->GetFocusRect( pEntry, nLine )); aRect.Right() = GetOutputSize().Width() - pView->GetMapMode().GetOrigin().X(); SvLBoxContextBmp* pBmp = static_cast<SvLBoxContextBmp*>(pEntry->GetFirstItem(SvLBoxItemType::ContextBmp)); @@ -861,17 +861,17 @@ SvTreeListEntry* SvImpLBox::MakePointVisible(const Point& rPoint) return pEntry; } -Rectangle SvImpLBox::GetClipRegionRect() const +tools::Rectangle SvImpLBox::GetClipRegionRect() const { Point aOrigin( pView->GetMapMode().GetOrigin() ); aOrigin.X() *= -1; // conversion document coordinates - Rectangle aClipRect( aOrigin, aOutputSize ); + tools::Rectangle aClipRect( aOrigin, aOutputSize ); aClipRect.Bottom()++; return aClipRect; } -void SvImpLBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SvImpLBox::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { if (!pView->GetVisibleCount()) return; @@ -1031,7 +1031,7 @@ void SvImpLBox::DrawNet(vcl::RenderContext& rRenderContext) ImplControlValue aControlValue; ControlState nState = ControlState::ENABLED; if (rRenderContext.DrawNativeControl(ControlType::ListNet, ControlPart::Entire, - Rectangle(), nState, aControlValue, OUString())) + tools::Rectangle(), nState, aControlValue, OUString())) { return; } @@ -1230,7 +1230,7 @@ void SvImpLBox::AdjustScrollBars( Size& rSize ) // adapt Range, VisibleRange etc. // refresh output size, in case we have to scroll - Rectangle aRect; + tools::Rectangle aRect; aRect.SetSize( aOSize ); aSelEng.SetVisibleArea( aRect ); @@ -3059,11 +3059,11 @@ void SvImpLBox::EndScroll() } -Rectangle SvImpLBox::GetVisibleArea() const +tools::Rectangle SvImpLBox::GetVisibleArea() const { Point aPos( pView->GetMapMode().GetOrigin() ); aPos.X() *= -1; - Rectangle aRect( aPos, aOutputSize ); + tools::Rectangle aRect( aPos, aOutputSize ); return aRect; } @@ -3139,9 +3139,9 @@ bool SvImpLBox::RequestHelp( const HelpEvent& rHEvt ) aSize.Width() = pNextTab->GetPos() - pTab->GetPos(); bItemClipped = true; } - Rectangle aItemRect( aPos, aSize ); + tools::Rectangle aItemRect( aPos, aSize ); - Rectangle aViewRect( GetVisibleArea() ); + tools::Rectangle aViewRect( GetVisibleArea() ); if( bItemClipped || !aViewRect.IsInside( aItemRect ) ) { @@ -3322,7 +3322,7 @@ void SvImpLBox::ShowFocusRect( const SvTreeListEntry* pEntry ) if( pEntry ) { long nY = GetEntryLine( const_cast<SvTreeListEntry*>(pEntry) ); - Rectangle aRect = pView->GetFocusRect( const_cast<SvTreeListEntry*>(pEntry), nY ); + tools::Rectangle aRect = pView->GetFocusRect( const_cast<SvTreeListEntry*>(pEntry), nY ); vcl::Region aOldClip( pView->GetClipRegion()); vcl::Region aClipRegion( GetClipRegionRect() ); pView->SetClipRegion( aClipRegion ); diff --git a/svtools/source/contnr/svlbitm.cxx b/svtools/source/contnr/svlbitm.cxx index 52c0da1fbacc..6b7d4e4b96df 100644 --- a/svtools/source/contnr/svlbitm.cxx +++ b/svtools/source/contnr/svlbitm.cxx @@ -198,7 +198,7 @@ void SvLBoxString::Paint( nStyle |= DrawTextFlags::PathEllipsis | DrawTextFlags::Center; aSize.Width() = rDev.GetEntryWidth(); } - rRenderContext.DrawText(Rectangle(rPos, aSize), maText, nStyle); + rRenderContext.DrawText(tools::Rectangle(rPos, aSize), maText, nStyle); } SvLBoxItem* SvLBoxString::Create() const @@ -301,7 +301,7 @@ void SvLBoxButton::Paint( Size aSize(pData->Width(), pData->Height()); ImplAdjustBoxSize(aSize, eCtrlType, rRenderContext); ImplControlValue aControlValue; - Rectangle aCtrlRegion( rPos, aSize ); + tools::Rectangle aCtrlRegion( rPos, aSize ); ControlState nState = ControlState::NONE; //states ControlState::DEFAULT, ControlState::PRESSED and ControlState::ROLLOVER are not implemented @@ -340,12 +340,12 @@ void SvLBoxButton::ImplAdjustBoxSize(Size& io_rSize, ControlType i_eType, vcl::R if (rRenderContext.IsNativeControlSupported( i_eType, ControlPart::Entire) ) { ImplControlValue aControlValue; - Rectangle aCtrlRegion( Point( 0, 0 ), io_rSize ); + tools::Rectangle aCtrlRegion( Point( 0, 0 ), io_rSize ); ControlState nState = ControlState::ENABLED; aControlValue.setTristateVal( ButtonValue::On ); - Rectangle aNativeBounds, aNativeContent; + tools::Rectangle aNativeBounds, aNativeContent; bool bNativeOK = rRenderContext.GetNativeControlRegion( i_eType, ControlPart::Entire, aCtrlRegion, diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx index 965fd15c3397..5e3e5e641081 100644 --- a/svtools/source/contnr/svtabbx.cxx +++ b/svtools/source/contnr/svtabbx.cxx @@ -510,7 +510,7 @@ void SvHeaderTabListBox::dispose() SvTabListBox::dispose(); } -void SvHeaderTabListBox::Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) +void SvHeaderTabListBox::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) { if (m_bFirstPaint) { @@ -776,9 +776,9 @@ OUString SvHeaderTabListBox::GetAccessibleCellText( long _nRow, sal_uInt16 _nCol return GetTabEntryText(_nRow, _nColumnPos); } -Rectangle SvHeaderTabListBox::calcHeaderRect( bool _bIsColumnBar, bool _bOnScreen ) +tools::Rectangle SvHeaderTabListBox::calcHeaderRect( bool _bIsColumnBar, bool _bOnScreen ) { - Rectangle aRect; + tools::Rectangle aRect; if ( _bIsColumnBar ) { vcl::Window* pParent = nullptr; @@ -790,36 +790,36 @@ Rectangle SvHeaderTabListBox::calcHeaderRect( bool _bIsColumnBar, bool _bOnScree return aRect; } -Rectangle SvHeaderTabListBox::calcTableRect( bool _bOnScreen ) +tools::Rectangle SvHeaderTabListBox::calcTableRect( bool _bOnScreen ) { vcl::Window* pParent = nullptr; if ( !_bOnScreen ) pParent = GetAccessibleParentWindow(); - Rectangle aRect( GetWindowExtentsRelative( pParent ) ); + tools::Rectangle aRect( GetWindowExtentsRelative( pParent ) ); return aRect; } -Rectangle SvHeaderTabListBox::GetFieldRectPixelAbs( sal_Int32 _nRow, sal_uInt16 _nColumn, bool _bIsHeader, bool _bOnScreen ) +tools::Rectangle SvHeaderTabListBox::GetFieldRectPixelAbs( sal_Int32 _nRow, sal_uInt16 _nColumn, bool _bIsHeader, bool _bOnScreen ) { DBG_ASSERT( !_bIsHeader || 0 == _nRow, "invalid parameters" ); - Rectangle aRect; + tools::Rectangle aRect; SvTreeListEntry* pEntry = GetEntry( _nRow ); if ( pEntry ) { aRect = _bIsHeader ? calcHeaderRect( true, false ) : GetBoundingRect( pEntry ); Point aTopLeft = aRect.TopLeft(); DBG_ASSERT( m_pImpl->m_pHeaderBar->GetItemCount() > _nColumn, "invalid column" ); - Rectangle aItemRect = m_pImpl->m_pHeaderBar->GetItemRect( m_pImpl->m_pHeaderBar->GetItemId( _nColumn ) ); + tools::Rectangle aItemRect = m_pImpl->m_pHeaderBar->GetItemRect( m_pImpl->m_pHeaderBar->GetItemId( _nColumn ) ); aTopLeft.X() = aItemRect.Left(); Size aSize = aItemRect.GetSize(); - aRect = Rectangle( aTopLeft, aSize ); + aRect = tools::Rectangle( aTopLeft, aSize ); vcl::Window* pParent = nullptr; if ( !_bOnScreen ) pParent = GetAccessibleParentWindow(); aTopLeft = aRect.TopLeft(); aTopLeft += GetWindowExtentsRelative( pParent ).TopLeft(); - aRect = Rectangle( aTopLeft, aRect.GetSize() ); + aRect = tools::Rectangle( aTopLeft, aRect.GetSize() ); } return aRect; @@ -1095,7 +1095,7 @@ bool SvHeaderTabListBox::GetGlyphBoundRects( const Point& rOrigin, const OUStrin return Control::GetGlyphBoundRects( rOrigin, rStr, nIndex, nLen, rVector ); } -Rectangle SvHeaderTabListBox::GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const +tools::Rectangle SvHeaderTabListBox::GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const { return Control::GetWindowExtentsRelative( pRelativeWindow ); } @@ -1141,9 +1141,9 @@ Reference< XAccessible > SvHeaderTabListBox::CreateAccessible() return xAccessible; } -Rectangle SvHeaderTabListBox::GetFieldCharacterBounds(sal_Int32,sal_Int32,sal_Int32) +tools::Rectangle SvHeaderTabListBox::GetFieldCharacterBounds(sal_Int32,sal_Int32,sal_Int32) { - Rectangle aRect; + tools::Rectangle aRect; return aRect; } diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 2adf1912ae79..564bbcb5733b 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -883,7 +883,7 @@ void SvTreeListBox::EnableSelectionAsDropTarget( bool bEnable ) // InplaceEditing // ****************************************************************** -void SvTreeListBox::EditText( const OUString& rStr, const Rectangle& rRect, +void SvTreeListBox::EditText( const OUString& rStr, const tools::Rectangle& rRect, const Selection& rSel ) { delete pEdCtrl; @@ -2397,7 +2397,7 @@ void SvTreeListBox::AdjustEntryHeightAndRecalc() RecalcViewData(); } -void SvTreeListBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SvTreeListBox::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { Control::Paint(rRenderContext, rRect); if (nTreeFlags & SvTreeFlags::RECALCTABS) @@ -2410,7 +2410,7 @@ void SvTreeListBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& r if (HasFocus()) { long nHeight = rRenderContext.GetTextHeight(); - Rectangle aRect(Point(0, 0), Size(GetSizePixel().Width(), nHeight)); + tools::Rectangle aRect(Point(0, 0), Size(GetSizePixel().Width(), nHeight)); ShowFocus(aRect); } else @@ -2538,7 +2538,7 @@ void SvTreeListBox::EditItemText(SvTreeListEntry* pEntry, SvLBoxString* pItem, c Point aOrigin( GetMapMode().GetOrigin() ); aPos += aOrigin; // convert to win coordinates aSize.Width() -= aOrigin.X(); - Rectangle aRect( aPos, aSize ); + tools::Rectangle aRect( aPos, aSize ); EditText( pItem->GetText(), aRect, rSelection ); } @@ -2704,7 +2704,7 @@ void SvTreeListBox::InvalidateEntry(SvTreeListEntry* pEntry) void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, long nLine, vcl::RenderContext& rRenderContext) { - Rectangle aRect; // multi purpose + tools::Rectangle aRect; // multi purpose bool bHorSBar = pImpl->HasHorScrollBar(); PreparePaint(rRenderContext, rEntry); @@ -2959,7 +2959,7 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, long nLine, vcl::Render if (rRenderContext.IsNativeControlSupported(ControlType::ListNode, ControlPart::Entire)) { ImplControlValue aControlValue; - Rectangle aCtrlRegion(aPos, pImg->GetSizePixel()); + tools::Rectangle aCtrlRegion(aPos, pImg->GetSizePixel()); ControlState nState = ControlState::NONE; if (IsEnabled()) @@ -3000,10 +3000,10 @@ void SvTreeListBox::PreparePaint(vcl::RenderContext& /*rRenderContext*/, SvTreeL { } -Rectangle SvTreeListBox::GetFocusRect( SvTreeListEntry* pEntry, long nLine ) +tools::Rectangle SvTreeListBox::GetFocusRect( SvTreeListEntry* pEntry, long nLine ) { Size aSize; - Rectangle aRect; + tools::Rectangle aRect; aRect.Top() = nLine; aSize.Height() = GetEntryHeight(); @@ -3343,7 +3343,7 @@ void SvTreeListBox::Invalidate( InvalidateFlags nInvalidateFlags ) pImpl->Invalidate(); } -void SvTreeListBox::Invalidate( const Rectangle& rRect, InvalidateFlags nInvalidateFlags ) +void SvTreeListBox::Invalidate( const tools::Rectangle& rRect, InvalidateFlags nInvalidateFlags ) { if( nFocusWidth == -1 ) // to make sure that the control doesn't show the wrong focus rectangle @@ -3668,7 +3668,7 @@ void SvTreeListBox::EnableList( bool _bEnable ) // call base class method Window::Enable(_bEnable); // then invalidate - Invalidate(Rectangle(Point(), GetSizePixel())); + Invalidate(tools::Rectangle(Point(), GetSizePixel())); } css::uno::Reference< XAccessible > SvTreeListBox::CreateAccessible() @@ -3718,10 +3718,10 @@ void SvTreeListBox::FillAccessibleEntryStateSet( SvTreeListEntry* pEntry, ::utl: } } -Rectangle SvTreeListBox::GetBoundingRect( SvTreeListEntry* pEntry ) +tools::Rectangle SvTreeListBox::GetBoundingRect( SvTreeListEntry* pEntry ) { Point aPos = GetEntryPosition( pEntry ); - Rectangle aRect = GetFocusRect( pEntry, aPos.Y() ); + tools::Rectangle aRect = GetFocusRect( pEntry, aPos.Y() ); return aRect; } diff --git a/svtools/source/contnr/viewdataentry.cxx b/svtools/source/contnr/viewdataentry.cxx index 353d891b38d0..53795b414db2 100644 --- a/svtools/source/contnr/viewdataentry.cxx +++ b/svtools/source/contnr/viewdataentry.cxx @@ -89,12 +89,12 @@ SvViewDataItem& SvViewDataEntry::GetItem(size_t nPos) return maItems[nPos]; } -void SvViewDataEntry::SetPaintRectangle(Rectangle aRectangle) +void SvViewDataEntry::SetPaintRectangle(tools::Rectangle aRectangle) { maPaintRectangle = aRectangle; } -const Rectangle& SvViewDataEntry::GetPaintRectangle() const +const tools::Rectangle& SvViewDataEntry::GetPaintRectangle() const { return maPaintRectangle; } |