diff options
Diffstat (limited to 'svx/source')
170 files changed, 1123 insertions, 1123 deletions
diff --git a/svx/source/accessibility/AccessibleEmptyEditSource.cxx b/svx/source/accessibility/AccessibleEmptyEditSource.cxx index 5b329f48a334..ea020a63dc40 100644 --- a/svx/source/accessibility/AccessibleEmptyEditSource.cxx +++ b/svx/source/accessibility/AccessibleEmptyEditSource.cxx @@ -131,8 +131,8 @@ namespace accessibility sal_Int32 GetFieldCount( sal_Int32 ) const override { return 0; } EFieldInfo GetFieldInfo( sal_Int32, sal_uInt16 ) const override { return EFieldInfo(); } EBulletInfo GetBulletInfo( sal_Int32 ) const override { return EBulletInfo(); } - Rectangle GetCharBounds( sal_Int32, sal_Int32 ) const override { return Rectangle(); } - Rectangle GetParaBounds( sal_Int32 ) const override { return Rectangle(); } + tools::Rectangle GetCharBounds( sal_Int32, sal_Int32 ) const override { return tools::Rectangle(); } + tools::Rectangle GetParaBounds( sal_Int32 ) const override { return tools::Rectangle(); } MapMode GetMapMode() const override { return MapMode(); } OutputDevice* GetRefDevice() const override { return nullptr; } bool GetIndexAtPoint( const Point&, sal_Int32&, sal_Int32& ) const override { return false; } @@ -157,7 +157,7 @@ namespace accessibility sal_Int16 GetDepth( sal_Int32 ) const override { return -1; } bool SetDepth( sal_Int32, sal_Int16 ) override { return true; } - Rectangle GetVisArea() const override { return Rectangle(); } + tools::Rectangle GetVisArea() const override { return tools::Rectangle(); } Point LogicToPixel( const Point& rPoint, const MapMode& /*rMapMode*/ ) const override { return rPoint; } Point PixelToLogic( const Point& rPoint, const MapMode& /*rMapMode*/ ) const override { return rPoint; } diff --git a/svx/source/accessibility/AccessibleFrameSelector.cxx b/svx/source/accessibility/AccessibleFrameSelector.cxx index 02c3aedb571e..105d9b8be162 100644 --- a/svx/source/accessibility/AccessibleFrameSelector.cxx +++ b/svx/source/accessibility/AccessibleFrameSelector.cxx @@ -272,7 +272,7 @@ css::awt::Rectangle AccFrameSelector::getBounds( ) aPos = mpFrameSel->GetPosPixel(); break; default: - const Rectangle aSpot = mpFrameSel->GetClickBoundRect( meBorder ); + const tools::Rectangle aSpot = mpFrameSel->GetClickBoundRect( meBorder ); aPos = aSpot.TopLeft(); aSz = aSpot.GetSize(); } @@ -296,7 +296,7 @@ css::awt::Point AccFrameSelector::getLocation( ) aPos = mpFrameSel->GetPosPixel(); break; default: - const Rectangle aSpot = mpFrameSel->GetClickBoundRect( meBorder ); + const tools::Rectangle aSpot = mpFrameSel->GetClickBoundRect( meBorder ); aPos = aSpot.TopLeft(); } css::awt::Point aRet(aPos.X(), aPos.Y()); @@ -315,7 +315,7 @@ css::awt::Point AccFrameSelector::getLocationOnScreen( ) aPos = mpFrameSel->GetPosPixel(); break; default: - const Rectangle aSpot = mpFrameSel->GetClickBoundRect( meBorder ); + const tools::Rectangle aSpot = mpFrameSel->GetClickBoundRect( meBorder ); aPos = aSpot.TopLeft(); } aPos = mpFrameSel->OutputToAbsoluteScreenPixel( aPos ); @@ -335,7 +335,7 @@ css::awt::Size AccFrameSelector::getSize( ) aSz = mpFrameSel->GetSizePixel(); break; default: - const Rectangle aSpot = mpFrameSel->GetClickBoundRect( meBorder ); + const tools::Rectangle aSpot = mpFrameSel->GetClickBoundRect( meBorder ); aSz = aSpot.GetSize(); } css::awt::Size aRet(aSz.Width(), aSz.Height()); diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index 996fff3283fc..de059e9bb7fd 100644 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -597,10 +597,10 @@ awt::Rectangle SAL_CALL AccessibleShape::getBounds() int y = aPixelPosition.getY() - aParentLocation.Y; // Clip with parent (with coordinates relative to itself). - ::Rectangle aBBox ( + ::tools::Rectangle aBBox ( x, y, x + aPixelSize.getWidth(), y + aPixelSize.getHeight()); awt::Size aParentSize (xParentComponent->getSize()); - ::Rectangle aParentBBox (0,0, aParentSize.Width, aParentSize.Height); + ::tools::Rectangle aParentBBox (0,0, aParentSize.Width, aParentSize.Height); aBBox = aBBox.GetIntersection (aParentBBox); aBoundingBox = awt::Rectangle ( aBBox.getX(), diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx index c30ec415c6c7..c1c93b18ba6c 100644 --- a/svx/source/accessibility/AccessibleTextHelper.cxx +++ b/svx/source/accessibility/AccessibleTextHelper.cxx @@ -764,19 +764,19 @@ namespace accessibility SvxTextForwarder& rCacheTF = GetTextForwarder(); SvxViewForwarder& rCacheVF = GetViewForwarder(); - Rectangle aViewArea = rCacheVF.GetVisArea(); + tools::Rectangle aViewArea = rCacheVF.GetVisArea(); if( IsActive() ) { // maybe the edit view scrolls, adapt aViewArea - Rectangle aEditViewArea = GetEditViewForwarder().GetVisArea(); + tools::Rectangle aEditViewArea = GetEditViewForwarder().GetVisArea(); aViewArea += aEditViewArea.TopLeft(); // now determine intersection aViewArea.Intersection( aEditViewArea ); } - Rectangle aTmpBB, aParaBB; + tools::Rectangle aTmpBB, aParaBB; bool bFirstChild = true; sal_Int32 nCurrPara; sal_Int32 nParas=rCacheTF.GetParagraphCount(); @@ -1585,7 +1585,7 @@ namespace accessibility DBG_ASSERT(nChild >= 0 && nChild <= USHRT_MAX, "AccessibleTextHelper_Impl::getAccessibleAt: index value overflow"); - Rectangle aParaBounds( rCacheTF.GetParaBounds( nChild ) ); + tools::Rectangle aParaBounds( rCacheTF.GetParaBounds( nChild ) ); if( aParaBounds.IsInside( aLogPoint ) ) return getAccessibleChild( nChild - mnFirstVisibleChild + GetStartIndex() ); diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx b/svx/source/accessibility/ChildrenManagerImpl.cxx index 6ef89c027654..c4b72ffd70ff 100644 --- a/svx/source/accessibility/ChildrenManagerImpl.cxx +++ b/svx/source/accessibility/ChildrenManagerImpl.cxx @@ -202,7 +202,7 @@ void ChildrenManagerImpl::Update (bool bCreateNewObjectsOnDemand) { if (maShapeTreeInfo.GetViewForwarder() == nullptr) return; - Rectangle aVisibleArea = maShapeTreeInfo.GetViewForwarder()->GetVisibleArea(); + tools::Rectangle aVisibleArea = maShapeTreeInfo.GetViewForwarder()->GetVisibleArea(); // 1. Create a local list of visible shapes. ChildDescriptorListType aChildList; @@ -281,7 +281,7 @@ void ChildrenManagerImpl::CreateListOfVisibleShapes ( OSL_ASSERT (maShapeTreeInfo.GetViewForwarder() != nullptr); - Rectangle aVisibleArea = maShapeTreeInfo.GetViewForwarder()->GetVisibleArea(); + tools::Rectangle aVisibleArea = maShapeTreeInfo.GetViewForwarder()->GetVisibleArea(); // Add the visible shapes for which the accessible objects already exist. AccessibleShapeList::const_iterator aEnd = maAccessibleShapes.end(); @@ -311,7 +311,7 @@ void ChildrenManagerImpl::CreateListOfVisibleShapes ( raDescriptorList.reserve( nShapeCount ); awt::Point aPos; awt::Size aSize; - Rectangle aBoundingBox; + tools::Rectangle aBoundingBox; uno::Reference<drawing::XShape> xShape; for (sal_Int32 i=0; i<nShapeCount; ++i) { @@ -436,11 +436,11 @@ void ChildrenManagerImpl::AddShape (const Reference<drawing::XShape>& rxShape) SolarMutexClearableGuard aGuard; // Test visibility of the shape. - Rectangle aVisibleArea = maShapeTreeInfo.GetViewForwarder()->GetVisibleArea(); + tools::Rectangle aVisibleArea = maShapeTreeInfo.GetViewForwarder()->GetVisibleArea(); awt::Point aPos = rxShape->getPosition(); awt::Size aSize = rxShape->getSize(); - Rectangle aBoundingBox ( + tools::Rectangle aBoundingBox ( aPos.X, aPos.Y, aPos.X + aSize.Width, diff --git a/svx/source/accessibility/ChildrenManagerImpl.hxx b/svx/source/accessibility/ChildrenManagerImpl.hxx index 79c554b7d65a..a15adafd7357 100644 --- a/svx/source/accessibility/ChildrenManagerImpl.hxx +++ b/svx/source/accessibility/ChildrenManagerImpl.hxx @@ -313,7 +313,7 @@ protected: at least partly, to be accessible through this class. Used to detect changes of the visible area after changes of the view forwarder. */ - Rectangle maVisibleArea; + tools::Rectangle maVisibleArea; /** The parent of the shapes. It is used for creating accessible objects for given shapes. diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx index 768b58b94e9d..2d85c66c4d63 100644 --- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx +++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx @@ -203,7 +203,7 @@ Reference< XAccessible > SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleAt awt::Rectangle SAL_CALL SvxGraphCtrlAccessibleContext::getBounds() { // no guard -> done in GetBoundingBox() - Rectangle aCoreBounds( GetBoundingBox() ); + tools::Rectangle aCoreBounds( GetBoundingBox() ); awt::Rectangle aBounds; aBounds.X = aCoreBounds.getX(); aBounds.Y = aCoreBounds.getY(); @@ -216,7 +216,7 @@ awt::Rectangle SAL_CALL SvxGraphCtrlAccessibleContext::getBounds() awt::Point SAL_CALL SvxGraphCtrlAccessibleContext::getLocation() { // no guard -> done in GetBoundingBox() - Rectangle aRect( GetBoundingBox() ); + tools::Rectangle aRect( GetBoundingBox() ); return awt::Point( aRect.getX(), aRect.getY() ); } @@ -224,7 +224,7 @@ awt::Point SAL_CALL SvxGraphCtrlAccessibleContext::getLocation() awt::Point SAL_CALL SvxGraphCtrlAccessibleContext::getLocationOnScreen() { // no guard -> done in GetBoundingBoxOnScreen() - Rectangle aRect( GetBoundingBoxOnScreen() ); + tools::Rectangle aRect( GetBoundingBoxOnScreen() ); return awt::Point( aRect.getX(), aRect.getY() ); } @@ -232,7 +232,7 @@ awt::Point SAL_CALL SvxGraphCtrlAccessibleContext::getLocationOnScreen() awt::Size SAL_CALL SvxGraphCtrlAccessibleContext::getSize() { // no guard -> done in GetBoundingBox() - Rectangle aRect( GetBoundingBox() ); + tools::Rectangle aRect( GetBoundingBox() ); return awt::Size( aRect.getWidth(), aRect.getHeight() ); } @@ -660,14 +660,14 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::disposing() } -Rectangle SvxGraphCtrlAccessibleContext::GetBoundingBoxOnScreen() +tools::Rectangle SvxGraphCtrlAccessibleContext::GetBoundingBoxOnScreen() { ::SolarMutexGuard aGuard; if( nullptr == mpControl ) throw DisposedException(); - return Rectangle( + return tools::Rectangle( mpControl->GetAccessibleParentWindow()->OutputToAbsoluteScreenPixel( mpControl->GetPosPixel() ), mpControl->GetSizePixel() ); @@ -678,11 +678,11 @@ Rectangle SvxGraphCtrlAccessibleContext::GetBoundingBoxOnScreen() between the absolute coordinates of the bounding boxes of this control and its parent in the accessibility tree. */ -Rectangle SvxGraphCtrlAccessibleContext::GetBoundingBox() +tools::Rectangle SvxGraphCtrlAccessibleContext::GetBoundingBox() { ::SolarMutexGuard aGuard; - Rectangle aBounds ( 0, 0, 0, 0 ); + tools::Rectangle aBounds ( 0, 0, 0, 0 ); vcl::Window* pWindow = mpControl; if (pWindow != nullptr) @@ -691,7 +691,7 @@ Rectangle SvxGraphCtrlAccessibleContext::GetBoundingBox() vcl::Window* pParent = pWindow->GetAccessibleParentWindow(); if (pParent != nullptr) { - Rectangle aParentRect = pParent->GetWindowExtentsRelative (nullptr); + tools::Rectangle aParentRect = pParent->GetWindowExtentsRelative (nullptr); aBounds -= aParentRect.TopLeft(); } } @@ -748,9 +748,9 @@ void SvxGraphCtrlAccessibleContext::Notify( SfxBroadcaster& /*rBC*/, const SfxHi } // IAccessibleViewforwarder -Rectangle SvxGraphCtrlAccessibleContext::GetVisibleArea() const +tools::Rectangle SvxGraphCtrlAccessibleContext::GetVisibleArea() const { - Rectangle aVisArea; + tools::Rectangle aVisArea; if( mpView && mpView->PaintWindowCount()) { @@ -766,7 +766,7 @@ Point SvxGraphCtrlAccessibleContext::LogicToPixel (const Point& rPoint) const { if( mpControl ) { - Rectangle aBBox(mpControl->GetWindowExtentsRelative(nullptr)); + tools::Rectangle aBBox(mpControl->GetWindowExtentsRelative(nullptr)); return mpControl->LogicToPixel (rPoint) + aBBox.TopLeft(); } else diff --git a/svx/source/accessibility/charmapacc.cxx b/svx/source/accessibility/charmapacc.cxx index 7b03438ff273..3292514fd62c 100644 --- a/svx/source/accessibility/charmapacc.cxx +++ b/svx/source/accessibility/charmapacc.cxx @@ -102,7 +102,7 @@ uno::Reference< css::accessibility::XAccessible > SAL_CALL SvxShowCharSetVirtual { const Point aOutPos( mpParent->getScrollBar().GetPosPixel() ); const Size aScrollBar = mpParent->getScrollBar().GetOutputSizePixel(); - Rectangle aRect(aOutPos,aScrollBar); + tools::Rectangle aRect(aOutPos,aScrollBar); if ( aRect.IsInside(VCLPoint(aPoint)) ) xRet = mpParent->getScrollBar().GetAccessible(); @@ -154,12 +154,12 @@ css::awt::Rectangle SvxShowCharSetVirtualAcc::implGetBounds( ) vcl::Window* pWindow = mpParent; if ( pWindow ) { - Rectangle aRect = pWindow->GetWindowExtentsRelative( nullptr ); + tools::Rectangle aRect = pWindow->GetWindowExtentsRelative( nullptr ); aBounds = AWTRectangle( aRect ); vcl::Window* pParent = pWindow->GetAccessibleParentWindow(); if ( pParent ) { - Rectangle aParentRect = pParent->GetWindowExtentsRelative( nullptr ); + tools::Rectangle aParentRect = pParent->GetWindowExtentsRelative( nullptr ); css::awt::Point aParentScreenLoc = AWTPoint( aParentRect.TopLeft() ); aBounds.X -= aParentScreenLoc.X; aBounds.Y -= aParentScreenLoc.Y; @@ -750,9 +750,9 @@ awt::Rectangle SvxShowCharSetItemAcc::implGetBounds( ) if( mpParent ) { - Rectangle aRect( mpParent->maRect ); + tools::Rectangle aRect( mpParent->maRect ); Point aOrigin; - Rectangle aParentRect( aOrigin, mpParent->mrParent.GetOutputSizePixel() ); + tools::Rectangle aParentRect( aOrigin, mpParent->mrParent.GetOutputSizePixel() ); aRect.Intersection( aParentRect ); diff --git a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx index ed62e566d250..c93a67537432 100644 --- a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx +++ b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx @@ -249,7 +249,7 @@ awt::Point SvxPixelCtlAccessible::getLocation( ) awt::Point SvxPixelCtlAccessible::getLocationOnScreen( ) { ::osl::MutexGuard aGuard( m_aMutex ); - Rectangle rect = mrPixelCtl.GetWindowExtentsRelative(nullptr); + tools::Rectangle rect = mrPixelCtl.GetWindowExtentsRelative(nullptr); return awt::Point(rect.Left(),rect.Top() ); } @@ -460,7 +460,7 @@ uno::Reference<XAccessible> SvxPixelCtlAccessible::CreateChild (long nIndex,Poin uno::Reference<XAccessible> xChild; xChild = new SvxPixelCtlAccessibleChild(mrPixelCtl, bPixelColorOrBG, - Rectangle(mPoint,size), + tools::Rectangle(mPoint,size), this, nIndex); @@ -523,14 +523,14 @@ void SvxPixelCtlAccessibleChild::FireAccessibleEvent ( SvxPixelCtlAccessibleChild::SvxPixelCtlAccessibleChild( SvxPixelCtl& rWindow, bool bPixelColorOrBG, - const Rectangle& rBoundingBox, + const tools::Rectangle& rBoundingBox, const uno::Reference<XAccessible>& rxParent, long nIndexInParent ) : SvxPixelCtlAccessibleChild_BASE( m_aMutex ), mrParentWindow( rWindow ), mxParent(rxParent), m_bPixelColorOrBG(bPixelColorOrBG), - mpBoundingBox( new Rectangle( rBoundingBox ) ), + mpBoundingBox( new tools::Rectangle( rBoundingBox ) ), mnIndexInParent( nIndexInParent ), mnClientId( 0 ) { @@ -557,7 +557,7 @@ sal_Bool SAL_CALL SvxPixelCtlAccessibleChild::containsPoint( const awt::Point& r { // no guard -> done in getBounds() // return GetBoundingBox().IsInside( VCLPoint( rPoint ) ); - return Rectangle( Point( 0, 0 ), GetBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) ); + return tools::Rectangle( Point( 0, 0 ), GetBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) ); } uno::Reference< XAccessible > SAL_CALL SvxPixelCtlAccessibleChild::getAccessibleAtPoint( const awt::Point& ) @@ -782,17 +782,17 @@ void SvxPixelCtlAccessibleChild::ThrowExceptionIfNotAlive() throw lang::DisposedException(); } -Rectangle SvxPixelCtlAccessibleChild::GetBoundingBoxOnScreen() +tools::Rectangle SvxPixelCtlAccessibleChild::GetBoundingBoxOnScreen() { ::osl::MutexGuard aGuard( m_aMutex ); // no ThrowExceptionIfNotAlive() because its done in GetBoundingBox() - Rectangle aRect( GetBoundingBox() ); + tools::Rectangle aRect( GetBoundingBox() ); - return Rectangle( mrParentWindow.OutputToAbsoluteScreenPixel( aRect.TopLeft() ), aRect.GetSize() ); + return tools::Rectangle( mrParentWindow.OutputToAbsoluteScreenPixel( aRect.TopLeft() ), aRect.GetSize() ); } -Rectangle const & SvxPixelCtlAccessibleChild::GetBoundingBox() +tools::Rectangle const & SvxPixelCtlAccessibleChild::GetBoundingBox() { // no guard necessary, because no one changes mpBoundingBox after creating it ThrowExceptionIfNotAlive(); diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx index 3b9eb4300370..2f474038dacc 100644 --- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx +++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx @@ -146,7 +146,7 @@ sal_Bool SAL_CALL SvxRectCtlAccessibleContext::containsPoint( const awt::Point& { // no guard -> done in getBounds() // return GetBoundingBox().IsInside( VCLPoint( rPoint ) ); - return Rectangle( Point( 0, 0 ), GetBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) ); + return tools::Rectangle( Point( 0, 0 ), GetBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) ); } Reference< XAccessible > SAL_CALL SvxRectCtlAccessibleContext::getAccessibleAtPoint( const awt::Point& rPoint ) @@ -229,7 +229,7 @@ Reference< XAccessible > SAL_CALL SvxRectCtlAccessibleContext::getAccessibleChil OUString aName(SVX_RESSTR(p->nResIdName)); OUString aDescr(SVX_RESSTR(p->nResIdDescr)); - Rectangle aFocusRect( mpRepr->CalculateFocusRectangle( p->ePoint ) ); + tools::Rectangle aFocusRect( mpRepr->CalculateFocusRectangle( p->ePoint ) ); SvxRectCtlChildAccessibleContext* pChild = new SvxRectCtlChildAccessibleContext( this, *mpRepr, aName, aDescr, aFocusRect, nIndex ); @@ -621,24 +621,24 @@ void SAL_CALL SvxRectCtlAccessibleContext::disposing() } } -Rectangle SvxRectCtlAccessibleContext::GetBoundingBoxOnScreen() +tools::Rectangle SvxRectCtlAccessibleContext::GetBoundingBoxOnScreen() { ::SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); ThrowExceptionIfNotAlive(); - return Rectangle( mpRepr->GetParent()->OutputToScreenPixel( mpRepr->GetPosPixel() ), mpRepr->GetSizePixel() ); + return tools::Rectangle( mpRepr->GetParent()->OutputToScreenPixel( mpRepr->GetPosPixel() ), mpRepr->GetSizePixel() ); } -Rectangle SvxRectCtlAccessibleContext::GetBoundingBox() +tools::Rectangle SvxRectCtlAccessibleContext::GetBoundingBox() { ::SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); ThrowExceptionIfNotAlive(); - return Rectangle( mpRepr->GetPosPixel(), mpRepr->GetSizePixel() ); + return tools::Rectangle( mpRepr->GetPosPixel(), mpRepr->GetSizePixel() ); } void SvxRectCtlAccessibleContext::ThrowExceptionIfNotAlive() @@ -653,14 +653,14 @@ SvxRectCtlChildAccessibleContext::SvxRectCtlChildAccessibleContext( const vcl::Window& rParentWindow, const OUString& rName, const OUString& rDescription, - const Rectangle& rBoundingBox, + const tools::Rectangle& rBoundingBox, long nIndexInParent ) : SvxRectCtlChildAccessibleContext_Base( maMutex ), msDescription( rDescription ), msName( rName ), mxParent(rxParent), - mpBoundingBox( new Rectangle( rBoundingBox ) ), + mpBoundingBox( new tools::Rectangle( rBoundingBox ) ), mrParentWindow( rParentWindow ), mnClientId( 0 ), mnIndexInParent( nIndexInParent ), @@ -689,7 +689,7 @@ Reference< XAccessibleContext> SAL_CALL SvxRectCtlChildAccessibleContext::getAcc sal_Bool SAL_CALL SvxRectCtlChildAccessibleContext::containsPoint( const awt::Point& rPoint ) { // no guard -> done in getBounds() - return Rectangle( Point( 0, 0 ), GetBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) ); + return tools::Rectangle( Point( 0, 0 ), GetBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) ); } Reference< XAccessible > SAL_CALL SvxRectCtlChildAccessibleContext::getAccessibleAtPoint( const awt::Point& /*rPoint*/ ) @@ -997,17 +997,17 @@ void SvxRectCtlChildAccessibleContext::ThrowExceptionIfNotAlive() throw lang::DisposedException(); } -Rectangle SvxRectCtlChildAccessibleContext::GetBoundingBoxOnScreen() +tools::Rectangle SvxRectCtlChildAccessibleContext::GetBoundingBoxOnScreen() { ::osl::MutexGuard aGuard( maMutex ); // no ThrowExceptionIfNotAlive() because its done in GetBoundingBox() - Rectangle aRect( GetBoundingBox() ); + tools::Rectangle aRect( GetBoundingBox() ); - return Rectangle( mrParentWindow.OutputToScreenPixel( aRect.TopLeft() ), aRect.GetSize() ); + return tools::Rectangle( mrParentWindow.OutputToScreenPixel( aRect.TopLeft() ), aRect.GetSize() ); } -Rectangle const & SvxRectCtlChildAccessibleContext::GetBoundingBox() +tools::Rectangle const & SvxRectCtlChildAccessibleContext::GetBoundingBox() { // no guard necessary, because no one changes mpBoundingBox after creating it ThrowExceptionIfNotAlive(); diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index c45e41abe3f4..c3c2d4c33099 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -716,7 +716,7 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) : Size aS( pCustomShapeObj->GetLogicRect().GetSize() ); aP.X() -= aS.Width() / 2; aP.Y() -= aS.Height() / 2; - aLogicRect = Rectangle( aP, aS ); + aLogicRect = tools::Rectangle( aP, aS ); OUString sShapeType; const SdrCustomShapeGeometryItem& rGeometryItem = static_cast<const SdrCustomShapeGeometryItem&>(pCustomShapeObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )); @@ -1086,7 +1086,7 @@ Color EnhancedCustomShape2d::GetColorData( const Color& rFillColor, sal_uInt32 n } } -Rectangle EnhancedCustomShape2d::GetTextRect() const +tools::Rectangle EnhancedCustomShape2d::GetTextRect() const { sal_Int32 nIndex, nSize = seqTextFrames.getLength(); if ( !nSize ) @@ -1106,7 +1106,7 @@ Rectangle EnhancedCustomShape2d::GetTextRect() const aTopLeft.Y() = aLogicRect.GetHeight() - aTopLeft.Y(); aBottomRight.Y() = aLogicRect.GetHeight() - aBottomRight.Y(); } - Rectangle aRect( aTopLeft, aBottomRight ); + tools::Rectangle aRect( aTopLeft, aBottomRight ); SAL_INFO("svx", aRect.GetWidth() << " x " << aRect.GetHeight()); if( aRect.GetWidth() <= 1 || aRect.GetHeight() <= 1 ) return aLogicRect; @@ -1396,9 +1396,9 @@ void EnhancedCustomShape2d::SwapStartAndEndArrow( SdrObject* pObj ) //#108274 pObj->SetMergedItem( aLineEndCenter ); } -static basegfx::B2DPolygon CreateArc( const Rectangle& rRect, const Point& rStart, const Point& rEnd, const bool bClockwise, bool bFullCircle = false ) +static basegfx::B2DPolygon CreateArc( const tools::Rectangle& rRect, const Point& rStart, const Point& rEnd, const bool bClockwise, bool bFullCircle = false ) { - Rectangle aRect( rRect ); + tools::Rectangle aRect( rRect ); Point aStart( rStart ); Point aEnd( rEnd ); @@ -1641,7 +1641,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_Int32& rSrcPt, sal_Int32& rSegmen fHeight*= fYScale; Point aP( (sal_Int32)( _aCenter.X() - fWidth ), (sal_Int32)( _aCenter.Y() - fHeight ) ); Size aS( (sal_Int32)( fWidth * 2.0 ), (sal_Int32)( fHeight * 2.0 ) ); - Rectangle aRect( aP, aS ); + tools::Rectangle aRect( aP, aS ); if ( aRect.GetWidth() && aRect.GetHeight() ) { double fStartAngle, fEndAngle; @@ -1779,7 +1779,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_Int32& rSrcPt, sal_Int32& rSegmen sal_uInt32 nXor = bClockwise ? 3 : 2; for ( sal_uInt16 i = 0; ( i < nPntCount ) && ( ( rSrcPt + 3 ) < nCoordSize ); i++ ) { - Rectangle aRect( GetPoint( seqCoordinates[ rSrcPt ], true, true ), GetPoint( seqCoordinates[ rSrcPt + 1 ], true, true ) ); + tools::Rectangle aRect( GetPoint( seqCoordinates[ rSrcPt ], true, true ), GetPoint( seqCoordinates[ rSrcPt + 1 ], true, true ) ); if ( aRect.GetWidth() && aRect.GetHeight() ) { Point aCenter( aRect.Center() ); @@ -1831,7 +1831,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_Int32& rSrcPt, sal_Int32& rSegmen fWR *= fXScale; fHR *= fYScale; - Rectangle aRect ( Point ( aStartPoint.getX() - fWR*cos(fT) - fWR, aStartPoint.getY() - fHR*sin(fT) - fHR ), + tools::Rectangle aRect ( Point ( aStartPoint.getX() - fWR*cos(fT) - fWR, aStartPoint.getY() - fHR*sin(fT) - fHR ), Point ( aStartPoint.getX() - fWR*cos(fT) + fWR, aStartPoint.getY() - fHR*sin(fT) + fHR) ); Point aEndPoint ( aStartPoint.getX() - fWR*(cos(fT) - cos(fTE)), aStartPoint.getY() - fHR*(sin(fT) - sin(fTE)) ); @@ -2334,7 +2334,7 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( bool bLineGeometryNeededOnly ) if(pRet) { // move to target position - Rectangle aCurRect(pRet->GetSnapRect()); + tools::Rectangle aCurRect(pRet->GetSnapRect()); aCurRect.Move(aLogicRect.Left(), aLogicRect.Top()); pRet->NbcSetSnapRect(aCurRect); } diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx index a52bfffe4097..d33942b0190f 100644 --- a/svx/source/customshapes/EnhancedCustomShape3d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx @@ -178,7 +178,7 @@ drawing::Direction3D GetDirection3D( const SdrCustomShapeGeometryItem& rItem, co } -EnhancedCustomShape3d::Transformation2D::Transformation2D( const SdrObject* pCustomShape, const Rectangle& /*rBoundRect*/, const double *pM ) +EnhancedCustomShape3d::Transformation2D::Transformation2D( const SdrObject* pCustomShape, const tools::Rectangle& /*rBoundRect*/, const double *pM ) : aCenter( pCustomShape->GetSnapRect().Center() ) , eProjectionMode( drawing::ProjectionMode_PARALLEL ) , fSkewAngle(0.0) @@ -280,7 +280,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con { bool bIsMirroredX = static_cast<const SdrObjCustomShape*>(pCustomShape)->IsMirroredX(); bool bIsMirroredY = static_cast<const SdrObjCustomShape*>(pCustomShape)->IsMirroredY(); - Rectangle aSnapRect( pCustomShape->GetLogicRect() ); + tools::Rectangle aSnapRect( pCustomShape->GetLogicRect() ); long nObjectRotation = pCustomShape->GetRotateAngle(); if ( nObjectRotation ) { @@ -367,7 +367,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con } } - Rectangle aBoundRect2d; + tools::Rectangle aBoundRect2d; SdrObjListIter aIter( *pShape2d, SdrIterMode::DeepNoGroups ); const bool bMultipleSubObjects(aIter.Count() > 1); @@ -476,7 +476,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con } const basegfx::B2DRange aTempRange(basegfx::tools::getRange(aPolyPoly)); - const Rectangle aBoundRect(basegfx::fround(aTempRange.getMinX()), basegfx::fround(aTempRange.getMinY()), basegfx::fround(aTempRange.getMaxX()), basegfx::fround(aTempRange.getMaxY())); + const tools::Rectangle aBoundRect(basegfx::fround(aTempRange.getMinX()), basegfx::fround(aTempRange.getMinY()), basegfx::fround(aTempRange.getMaxX()), basegfx::fround(aTempRange.getMaxY())); aBoundRect2d.Union( aBoundRect ); // #i122777# depth 0 is okay for planes when using double-sided @@ -524,7 +524,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con (sal_Int32)( (double)( aBoundRect.Top() - aSnapRect.Top() ) * (double)aBmpSize.Height() / (double)aSnapRect.GetHeight() ) ); Size aSize( (sal_Int32)( aBmpSize.Width() * fXScale ), (sal_Int32)( aBmpSize.Height() * fYScale ) ); - Rectangle aCropRect( aPt, aSize ); + tools::Rectangle aCropRect( aPt, aSize ); aFillBmp.Crop( aCropRect ); p3DObj->SetMergedItem(XFillBitmapItem(OUString(), Graphic(aFillBmp))); } @@ -736,7 +736,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con return pRet; } -Rectangle EnhancedCustomShape3d::CalculateNewSnapRect( const SdrObject* pCustomShape, const Rectangle& rSnapRect, const Rectangle& rBoundRect, const double* pMap ) +tools::Rectangle EnhancedCustomShape3d::CalculateNewSnapRect( const SdrObject* pCustomShape, const tools::Rectangle& rSnapRect, const tools::Rectangle& rBoundRect, const double* pMap ) { const SdrCustomShapeGeometryItem& rGeometryItem = static_cast<const SdrCustomShapeGeometryItem&>(pCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )); const Point aCenter( rSnapRect.Center() ); diff --git a/svx/source/customshapes/EnhancedCustomShape3d.hxx b/svx/source/customshapes/EnhancedCustomShape3d.hxx index 81c6558065e9..16b5ccffb2ce 100644 --- a/svx/source/customshapes/EnhancedCustomShape3d.hxx +++ b/svx/source/customshapes/EnhancedCustomShape3d.hxx @@ -50,7 +50,7 @@ class EnhancedCustomShape3d public: - Transformation2D( const SdrObject* pCustomShape, const Rectangle& rBoundRect, const double* pMap ); + Transformation2D( const SdrObject* pCustomShape, const tools::Rectangle& rBoundRect, const double* pMap ); basegfx::B3DPolygon ApplySkewSettings( const basegfx::B3DPolygon& rPolygon3D ) const; Point Transform2D( const basegfx::B3DPoint& rPoint ) const; @@ -60,7 +60,7 @@ class EnhancedCustomShape3d friend class Transformation2D; protected: - static Rectangle CalculateNewSnapRect( const SdrObject* pCustomShape, const Rectangle& rSnapRect, const Rectangle& rBoundRect, const double* pMap ); + static tools::Rectangle CalculateNewSnapRect( const SdrObject* pCustomShape, const tools::Rectangle& rSnapRect, const tools::Rectangle& rBoundRect, const double* pMap ); public: static SdrObject* Create3DObject( const SdrObject* pShape2d, const SdrObject* pCustomShape ); diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx index b5a600816bae..a919f7c2c38e 100644 --- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx @@ -190,7 +190,7 @@ SdrObject* EnhancedCustomShapeEngine::ImplForceGroupWithText( const SdrObjCustom aTargetItemSet.Put(XFillStyleItem(drawing::FillStyle_NONE)); // get the text bounds and set at text object - Rectangle aTextBounds = pCustoObj->GetSnapRect(); + tools::Rectangle aTextBounds = pCustoObj->GetSnapRect(); SdrObject* pSdrObjCustomShape( GetSdrObjectFromXShape( mxShape ) ); if ( pSdrObjCustomShape ) { @@ -293,7 +293,7 @@ Reference< drawing::XShape > SAL_CALL EnhancedCustomShapeEngine::render() SdrObject::Free( pRenderedShape ); pRenderedShape = pRenderedShape3d; } - Rectangle aRect( pSdrObjCustomShape->GetSnapRect() ); + tools::Rectangle aRect( pSdrObjCustomShape->GetSnapRect() ); const GeoStat& rGeoStat = static_cast<SdrObjCustomShape*>(pSdrObjCustomShape)->GetGeoStat(); if ( rGeoStat.nShearAngle ) @@ -358,7 +358,7 @@ awt::Rectangle SAL_CALL EnhancedCustomShapeEngine::getTextBounds() if ( pSdrObjCustomShape ) { EnhancedCustomShape2d aCustomShape2d( pSdrObjCustomShape ); - Rectangle aRect( aCustomShape2d.GetTextRect() ); + tools::Rectangle aRect( aCustomShape2d.GetTextRect() ); aTextRect.X = aRect.Left(); aTextRect.Y = aRect.Top(); aTextRect.Width = aRect.GetWidth(); @@ -378,7 +378,7 @@ drawing::PolyPolygonBezierCoords SAL_CALL EnhancedCustomShapeEngine::getLineGeom SdrObject* pObj = aCustomShape2d.CreateLineGeometry(); if ( pObj ) { - Rectangle aRect( pSdrObjCustomShape->GetSnapRect() ); + tools::Rectangle aRect( pSdrObjCustomShape->GetSnapRect() ); bool bFlipV = aCustomShape2d.IsFlipVert(); bool bFlipH = aCustomShape2d.IsFlipHorz(); diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index 076bfd075003..c01ee3d3282b 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -62,19 +62,19 @@ using namespace com::sun::star::uno; struct FWCharacterData // representing a single character { std::vector< tools::PolyPolygon > vOutlines; - Rectangle aBoundRect; + tools::Rectangle aBoundRect; }; struct FWParagraphData // representing a single paragraph { OUString aString; std::vector< FWCharacterData > vCharacters; - Rectangle aBoundRect; + tools::Rectangle aBoundRect; SvxFrameDirection nFrameDirection; }; struct FWTextArea // representing multiple concluding paragraphs { std::vector< FWParagraphData > vParagraphs; - Rectangle aBoundRect; + tools::Rectangle aBoundRect; }; struct FWData // representing the whole text { @@ -279,7 +279,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F // vertical _> each single character needs to be rotated by 90 sal_Int32 i; sal_Int32 nHeight = 0; - Rectangle aSingleCharacterUnion; + tools::Rectangle aSingleCharacterUnion; for ( i = 0; i < rText.getLength(); i++ ) { FWCharacterData aCharacterData; @@ -364,7 +364,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F rPolyPoly.Move( 0, nVerticalOffset ); // retrieving the boundrect for the paragraph - Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); + tools::Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); aParagraphIter->aBoundRect.Union( aBoundRect ); } ++aCharacterIter; @@ -374,13 +374,13 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F if ( aParagraphIter->aBoundRect.IsEmpty() ) { if ( rTextArea.aBoundRect.IsEmpty() ) - rTextArea.aBoundRect = Rectangle( Point( 0, 0 ), Size( 1, rFWData.nSingleLineHeight ) ); + rTextArea.aBoundRect = tools::Rectangle( Point( 0, 0 ), Size( 1, rFWData.nSingleLineHeight ) ); else rTextArea.aBoundRect.Bottom() += rFWData.nSingleLineHeight; } else { - Rectangle& rParagraphBoundRect = aParagraphIter->aBoundRect; + tools::Rectangle& rParagraphBoundRect = aParagraphIter->aBoundRect; rTextArea.aBoundRect.Union( rParagraphBoundRect ); if ( bSameLetterHeights ) @@ -393,7 +393,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F std::vector< tools::PolyPolygon >::const_iterator aOutlineIEnd( aCharacterIter->vOutlines.end() ); while( aOutlineIter != aOutlineIEnd ) { - Rectangle aPolyPolyBoundRect( aOutlineIter->GetBoundRect() ); + tools::Rectangle aPolyPolyBoundRect( aOutlineIter->GetBoundRect() ); if (aPolyPolyBoundRect.GetHeight() != rParagraphBoundRect.GetHeight() && aPolyPolyBoundRect.GetHeight()) aOutlineIter->Scale( 1.0, (double)rParagraphBoundRect.GetHeight() / aPolyPolyBoundRect.GetHeight() ); aPolyPolyBoundRect = aOutlineIter->GetBoundRect(); @@ -552,7 +552,7 @@ void CalcDistances( const tools::Polygon& rPoly, std::vector< double >& rDistanc } void InsertMissingOutlinePoints( const tools::Polygon& /*rOutlinePoly*/, const std::vector< double >& rDistances, - const Rectangle& rTextAreaBoundRect, tools::Polygon& rPoly ) + const tools::Rectangle& rTextAreaBoundRect, tools::Polygon& rPoly ) { sal_uInt16 nSize = rPoly.GetSize(); if (nSize == 0) @@ -641,7 +641,7 @@ void FitTextOutlinesToShapeOutlines( const tools::PolyPolygon& aOutlines2d, FWDa sal_uInt16 nOutline2dIdx = 0; while( aTextAreaIter != aTextAreaIEnd ) { - Rectangle rTextAreaBoundRect = aTextAreaIter->aBoundRect; + tools::Rectangle rTextAreaBoundRect = aTextAreaIter->aBoundRect; sal_Int32 nLeft = rTextAreaBoundRect.Left(); sal_Int32 nTop = rTextAreaBoundRect.Top(); sal_Int32 nWidth = rTextAreaBoundRect.GetWidth(); @@ -672,7 +672,7 @@ void FitTextOutlinesToShapeOutlines( const tools::PolyPolygon& aOutlines2d, FWDa while( aOutlineIter != aOutlineIEnd ) { tools::PolyPolygon& rPolyPoly = *aOutlineIter; - Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); + tools::Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); double fx1 = aBoundRect.Left() - nLeft; double fx2 = aBoundRect.Right() - nLeft; double fy1, fy2; diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index df7b77d36522..3b56e960416c 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -75,7 +75,7 @@ public: Invalidate(); } - virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rRect ) override; virtual Size GetOptimalSize() const override { @@ -312,12 +312,12 @@ IMPL_LINK_NOARG(MaskData, ExecHdl, Button*, void) { &aBItem }); } -void ColorWindow::Paint( vcl::RenderContext& rRenderContext, const Rectangle& /*Rect*/) +void ColorWindow::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& /*Rect*/) { rRenderContext.Push(PushFlags::LINECOLOR | PushFlags::FILLCOLOR); rRenderContext.SetLineColor(aColor); rRenderContext.SetFillColor(aColor); - rRenderContext.DrawRect(Rectangle(Point(), GetSizePixel())); + rRenderContext.DrawRect(tools::Rectangle(Point(), GetSizePixel())); rRenderContext.Pop(); } @@ -965,7 +965,7 @@ GDIMetaFile SvxBmpMask::ImpReplaceTransparency( const GDIMetaFile& rMtf, const C // retrieve one action at the time; first // set the whole area to the replacement color. - pVDev->DrawRect( Rectangle( rPrefMap.GetOrigin(), rPrefSize ) ); + pVDev->DrawRect( tools::Rectangle( rPrefMap.GetOrigin(), rPrefSize ) ); for ( size_t i = 0; i < nActionCount; i++ ) { MetaAction* pAct = rMtf.GetAction( i ); diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index 59e268df1d02..e13d2fe6dc44 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -103,7 +103,7 @@ void SvxContourDlg::SetSuperClass( SvxSuperContourDlg& rSuperClass ) } tools::PolyPolygon SvxContourDlg::CreateAutoContour( const Graphic& rGraphic, - const Rectangle* pRect, + const tools::Rectangle* pRect, const sal_uIntPtr nFlags ) { Bitmap aBmp; @@ -589,7 +589,7 @@ IMPL_LINK_NOARG(SvxSuperContourDlg, CreateHdl, Timer *, void) { aCreateIdle.Stop(); - const Rectangle aWorkRect = m_pContourWnd->LogicToPixel( m_pContourWnd->GetWorkRect(), MapMode( MapUnit::Map100thMM ) ); + const tools::Rectangle aWorkRect = m_pContourWnd->LogicToPixel( m_pContourWnd->GetWorkRect(), MapMode( MapUnit::Map100thMM ) ); const Graphic& rGraphic = m_pContourWnd->GetGraphic(); const bool bValid = aWorkRect.Left() != aWorkRect.Right() && aWorkRect.Top() != aWorkRect.Bottom(); @@ -658,7 +658,7 @@ IMPL_LINK( SvxSuperContourDlg, PipetteHdl, ContourWindow&, rWnd, void ) const Color& rOldLineColor = m_pStbStatus->GetLineColor(); const Color& rOldFillColor = m_pStbStatus->GetFillColor(); - Rectangle aRect( m_pStbStatus->GetItemRect( 4 ) ); + tools::Rectangle aRect( m_pStbStatus->GetItemRect( 4 ) ); const Color& rColor = rWnd.GetPipetteColor(); m_pStbStatus->SetLineColor( rColor ); diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index f4f2a7f92a6c..21d2dcd50cce 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -163,7 +163,7 @@ void SvxShowCharSet::MouseButtonUp( const MouseEvent& rMEvt ) if ( bDrag && rMEvt.IsLeft() ) { // released mouse over character map - if ( Rectangle(Point(), GetOutputSize()).IsInside(rMEvt.GetPosPixel())) + if ( tools::Rectangle(Point(), GetOutputSize()).IsInside(rMEvt.GetPosPixel())) aSelectHdl.Call( this ); ReleaseMouse(); bDrag = false; @@ -317,7 +317,7 @@ void SvxShowCharSet::KeyInput(const KeyEvent& rKEvt) } -void SvxShowCharSet::Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) +void SvxShowCharSet::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) { InitSettings(rRenderContext); RecalculateFont(rRenderContext); @@ -337,7 +337,7 @@ void SvxShowCharSet::DeSelect() } // stretch a grid rectangle if its at the edge to fill unused space -Rectangle SvxShowCharSet::getGridRectangle(const Point &rPointUL, const Size &rOutputSize) +tools::Rectangle SvxShowCharSet::getGridRectangle(const Point &rPointUL, const Size &rOutputSize) { long x = rPointUL.X() - 1; long y = rPointUL.Y() - 1; @@ -364,7 +364,7 @@ Rectangle SvxShowCharSet::getGridRectangle(const Point &rPointUL, const Size &rO if (nXDistFromBottom <= 1) aGridSize.Height() += m_nYGap + nXDistFromBottom; - return Rectangle(aPointUL, aGridSize); + return tools::Rectangle(aPointUL, aGridSize); } void SvxShowCharSet::DrawChars_Impl(vcl::RenderContext& rRenderContext, int n1, int n2) @@ -396,7 +396,7 @@ void SvxShowCharSet::DrawChars_Impl(vcl::RenderContext& rRenderContext, int n1, Color aShadowColor(rStyleSettings.GetShadowColor()); int nTextHeight = rRenderContext.GetTextHeight(); - Rectangle aBoundRect; + tools::Rectangle aBoundRect; for (i = n1; i <= n2; ++i) { Point pix = MapIndexToPixel(i); @@ -736,7 +736,7 @@ svx::SvxShowCharSetItem* SvxShowCharSet::ImplGetItem( int _nPos ) buf.appendUtf32( mxFontCharMap->GetCharFromIndex( _nPos ) ); aFind->second->maText = buf.makeStringAndClear(); Point pix = MapIndexToPixel( _nPos ); - aFind->second->maRect = Rectangle( Point( pix.X() + 1, pix.Y() + 1 ), Size(nX-1,nY-1) ); + aFind->second->maRect = tools::Rectangle( Point( pix.X() + 1, pix.Y() + 1 ), Size(nX-1,nY-1) ); } return aFind->second.get(); diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx index 8da722a22b0a..a622c0a079f2 100644 --- a/svx/source/dialog/compressgraphicdialog.cxx +++ b/svx/source/dialog/compressgraphicdialog.cxx @@ -49,12 +49,12 @@ CompressGraphicsDialog::CompressGraphicsDialog( vcl::Window* pParent, SdrGrafObj m_dResolution ( 96.0 ) { const SdrGrafCropItem& rCrop = static_cast<const SdrGrafCropItem&>( m_pGraphicObj->GetMergedItem(SDRATTR_GRAFCROP) ); - m_aCropRectangle = Rectangle(rCrop.GetLeft(), rCrop.GetTop(), rCrop.GetRight(), rCrop.GetBottom()); + m_aCropRectangle = tools::Rectangle(rCrop.GetLeft(), rCrop.GetTop(), rCrop.GetRight(), rCrop.GetBottom()); Initialize(); } -CompressGraphicsDialog::CompressGraphicsDialog( vcl::Window* pParent, Graphic& rGraphic, Size rViewSize100mm, Rectangle& rCropRectangle, SfxBindings& rBindings ) : +CompressGraphicsDialog::CompressGraphicsDialog( vcl::Window* pParent, Graphic& rGraphic, Size rViewSize100mm, tools::Rectangle& rCropRectangle, SfxBindings& rBindings ) : ModalDialog ( pParent, "CompressGraphicDialog", "svx/ui/compressgraphicdialog.ui" ), m_pGraphicObj ( nullptr ), m_aGraphic ( rGraphic ), @@ -391,7 +391,7 @@ IMPL_LINK_NOARG( CompressGraphicsDialog, CalculateClickHdl, Button*, void ) } } -Rectangle CompressGraphicsDialog::GetScaledCropRectangle() +tools::Rectangle CompressGraphicsDialog::GetScaledCropRectangle() { if ( m_pReduceResolutionCB->IsChecked() ) { @@ -401,7 +401,7 @@ Rectangle CompressGraphicsDialog::GetScaledCropRectangle() double aScaleX = nPixelX / (double) aSize.Width(); double aScaleY = nPixelY / (double) aSize.Height(); - return Rectangle( + return tools::Rectangle( m_aCropRectangle.Left() * aScaleX, m_aCropRectangle.Top() * aScaleY, m_aCropRectangle.Right() * aScaleX, @@ -438,7 +438,7 @@ SdrGrafObj* CompressGraphicsDialog::GetCompressedSdrGrafObj() if ( m_pReduceResolutionCB->IsChecked() ) { - Rectangle aScaledCropedRectangle = GetScaledCropRectangle(); + tools::Rectangle aScaledCropedRectangle = GetScaledCropRectangle(); SdrGrafCropItem aNewCrop( aScaledCropedRectangle.Left(), aScaledCropedRectangle.Top(), diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx index 1e172b430202..13d5004424fb 100644 --- a/svx/source/dialog/connctrl.cxx +++ b/svx/source/dialog/connctrl.cxx @@ -81,7 +81,7 @@ void SvxXConnectionPreview::AdaptSize() SetMapMode( MapUnit::Map100thMM ); OutputDevice* pOD = pView->GetFirstOutputDevice(); // GetWin( 0 ); - Rectangle aRect = pObjList->GetAllObjBoundRect(); + tools::Rectangle aRect = pObjList->GetAllObjBoundRect(); MapMode aMapMode = GetMapMode(); aMapMode.SetMapUnit( pOD->GetMapMode().GetMapUnit() ); @@ -200,7 +200,7 @@ void SvxXConnectionPreview::Construct() AdaptSize(); } -void SvxXConnectionPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SvxXConnectionPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { if (pObjList) { diff --git a/svx/source/dialog/contwnd.cxx b/svx/source/dialog/contwnd.cxx index c258847ec408..12934170aea3 100644 --- a/svx/source/dialog/contwnd.cxx +++ b/svx/source/dialog/contwnd.cxx @@ -142,8 +142,8 @@ void ContourWindow::MouseButtonDown( const MouseEvent& rMEvt ) const Point aLogPt( PixelToLogic( rMEvt.GetPosPixel() ) ); SetPolyPolygon( tools::PolyPolygon() ); - aWorkRect = Rectangle( aLogPt, aLogPt ); - Invalidate(Rectangle(Point(), GetGraphicSize())); + aWorkRect = tools::Rectangle( aLogPt, aLogPt ); + Invalidate(tools::Rectangle(Point(), GetGraphicSize())); SetEditMode( true ); } @@ -162,7 +162,7 @@ void ContourWindow::MouseMove( const MouseEvent& rMEvt ) aPipetteColor = GetPixel( aLogPt ); Control::MouseMove( rMEvt ); - if ( aPipetteLink.IsSet() && Rectangle( Point(), GetGraphicSize() ).IsInside( aLogPt ) ) + if ( aPipetteLink.IsSet() && tools::Rectangle( Point(), GetGraphicSize() ).IsInside( aLogPt ) ) { SetPointer( PointerStyle::RefHand ); aPipetteLink.Call( *this ); @@ -175,7 +175,7 @@ void ContourWindow::MouseMove( const MouseEvent& rMEvt ) void ContourWindow::MouseButtonUp(const MouseEvent& rMEvt) { Point aTmpPoint; - const Rectangle aGraphRect( aTmpPoint, GetGraphicSize() ); + const tools::Rectangle aGraphRect( aTmpPoint, GetGraphicSize() ); const Point aLogPt( PixelToLogic( rMEvt.GetPosPixel() ) ); bClickValid = aGraphRect.IsInside( aLogPt ); @@ -215,7 +215,7 @@ void ContourWindow::MouseButtonUp(const MouseEvent& rMEvt) GraphCtrl::MouseButtonUp( rMEvt ); } -void ContourWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void ContourWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { // #i75482# // encapsulate the redraw using Begin/End and use the returned @@ -227,7 +227,7 @@ void ContourWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& r rTarget.Push(PushFlags::LINECOLOR |PushFlags::FILLCOLOR); rTarget.SetLineColor(Color(COL_BLACK)); rTarget.SetFillColor(Color(COL_WHITE)); - rTarget.DrawRect( Rectangle( Point(), GetGraphicSize() ) ); + rTarget.DrawRect( tools::Rectangle( Point(), GetGraphicSize() ) ); rTarget.Pop(); if (rGraphic.GetType() != GraphicType::NONE) @@ -237,7 +237,7 @@ void ContourWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& r { tools::PolyPolygon _aPolyPoly(2, 2); rTarget.Push(PushFlags::FILLCOLOR); - _aPolyPoly.Insert(Rectangle(Point(), GetGraphicSize())); + _aPolyPoly.Insert(tools::Rectangle(Point(), GetGraphicSize())); _aPolyPoly.Insert(aWorkRect); rTarget.SetFillColor(COL_LIGHTRED); rTarget.DrawTransparent(_aPolyPoly, 50); diff --git a/svx/source/dialog/contwnd.hxx b/svx/source/dialog/contwnd.hxx index 063794eed869..d29ead73c5ef 100644 --- a/svx/source/dialog/contwnd.hxx +++ b/svx/source/dialog/contwnd.hxx @@ -27,7 +27,7 @@ class ContourWindow : public GraphCtrl { tools::PolyPolygon aPolyPoly; Color aPipetteColor; - Rectangle aWorkRect; + tools::Rectangle aWorkRect; Link<ContourWindow&,void> aPipetteLink; Link<ContourWindow&,void> aPipetteClickLink; Link<ContourWindow&,void> aWorkplaceClickLink; @@ -42,7 +42,7 @@ protected: virtual void MouseButtonUp(const MouseEvent& rMEvt) override; virtual void SdrObjCreated( const SdrObject& rObj ) override; virtual void InitSdrModel() override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual Size GetOptimalSize() const override; public: @@ -59,7 +59,7 @@ public: bool IsContourChanged() const; void SetWorkplaceMode( const bool bWorkplace ) { bWorkplaceMode = bWorkplace; } - const Rectangle& GetWorkRect() const { return aWorkRect; } + const tools::Rectangle& GetWorkRect() const { return aWorkRect; } void SetPipetteHdl( const Link<ContourWindow&,void>& rLink ) { aPipetteLink = rLink; } void SetPipetteClickHdl( const Link<ContourWindow&,void>& rLink ) { aPipetteClickLink = rLink; } diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx index 4f7a240e146b..14d75def2647 100644 --- a/svx/source/dialog/dialcontrol.cxx +++ b/svx/source/dialog/dialcontrol.cxx @@ -86,7 +86,7 @@ void DialControlBmp::DrawElements( const OUString& rText, sal_Int32 nAngle ) long nX = static_cast< long >( mnCenterX - fWidth * fCos - fHeight * fSin ); long nY = static_cast< long >( mnCenterY + fWidth * fSin - fHeight * fCos ); - Rectangle aRect( nX, nY, 2 * mnCenterX - nX, 2 * mnCenterY - nY ); + tools::Rectangle aRect( nX, nY, 2 * mnCenterX - nX, 2 * mnCenterY - nY ); DrawText( aRect, rText, mbEnabled ? DrawTextFlags::NONE : DrawTextFlags::Disable ); } else @@ -110,7 +110,7 @@ void DialControlBmp::DrawElements( const OUString& rText, sal_Int32 nAngle ) long nX = mnCenterX - static_cast< long >( (DIAL_OUTER_WIDTH / 2 - mnCenterX) * fCos ); long nY = mnCenterY - static_cast< long >( (mnCenterY - DIAL_OUTER_WIDTH / 2) * fSin ); long nSize = bMain ? (DIAL_OUTER_WIDTH / 4) : (DIAL_OUTER_WIDTH / 2 - 1); - DrawEllipse( Rectangle( nX - nSize, nY - nSize, nX + nSize, nY + nSize ) ); + DrawEllipse( tools::Rectangle( nX - nSize, nY - nSize, nX + nSize, nY + nSize ) ); } const Color& DialControlBmp::GetBackgroundColor() const @@ -213,7 +213,7 @@ void DialControlBmp::DrawBackground() SetLineColor(); SetFillColor( GetBackgroundColor() ); - DrawEllipse( Rectangle( maRect.Left() + DIAL_OUTER_WIDTH, maRect.Top() + DIAL_OUTER_WIDTH, + DrawEllipse( tools::Rectangle( maRect.Left() + DIAL_OUTER_WIDTH, maRect.Top() + DIAL_OUTER_WIDTH, maRect.Right() - DIAL_OUTER_WIDTH, maRect.Bottom() - DIAL_OUTER_WIDTH ) ); } @@ -273,7 +273,7 @@ void DialControl::Resize() InvalidateControl(); } -void DialControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void DialControl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { Point aPos; rRenderContext.DrawBitmapEx(aPos, mpImpl->mxBmpBuffered->GetBitmapEx(aPos, mpImpl->maWinSize)); diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx index 80249e75f8eb..5b4a90cb6dab 100644 --- a/svx/source/dialog/dlgctl3d.cxx +++ b/svx/source/dialog/dlgctl3d.cxx @@ -159,11 +159,11 @@ void Svx3DPreviewControl::Resize() Size aObjSize( aSize.Width()*5/6, aSize.Height()*5/6 ); Point aObjPoint( (aSize.Width() - aObjSize.Width()) / 2, (aSize.Height() - aObjSize.Height()) / 2); - Rectangle aRect( aObjPoint, aObjSize); + tools::Rectangle aRect( aObjPoint, aObjSize); mpScene->SetSnapRect( aRect ); } -void Svx3DPreviewControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void Svx3DPreviewControl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { mp3DView->CompleteRedraw(&rRenderContext, vcl::Region(rRect)); } @@ -524,7 +524,7 @@ void Svx3DLightControl::TrySelection(Point aPosPixel) } } -void Svx3DLightControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void Svx3DLightControl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { Svx3DPreviewControl::Paint(rRenderContext, rRect); } @@ -704,7 +704,7 @@ void Svx3DLightControl::Resize() mpFmPage->SetSize(aSize); // set position and size of scene - mpScene->SetSnapRect(Rectangle(Point(0, 0), aSize)); + mpScene->SetSnapRect(tools::Rectangle(Point(0, 0), aSize)); } void Svx3DLightControl::SetObjectType(SvxPreviewObjectType nType) @@ -1208,7 +1208,7 @@ void SvxLightCtl3D::GetFocus() aFocusSize.Width() -= 4; aFocusSize.Height() -= 4; - Rectangle aFocusRect( Point( 2, 2 ), aFocusSize ); + tools::Rectangle aFocusRect( Point( 2, 2 ), aFocusSize ); aFocusRect = maLightControl->PixelToLogic( aFocusRect ); diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index 1c26ef988711..dd00bf2ab0ea 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -233,9 +233,9 @@ void SvxRectCtl::MouseButtonDown( const MouseEvent& rMEvt ) aPtNew = GetApproxLogPtFromPixPt( rMEvt.GetPosPixel() ); - Invalidate( Rectangle( aPtLast - Point( nRadius, nRadius ), + Invalidate( tools::Rectangle( aPtLast - Point( nRadius, nRadius ), aPtLast + Point( nRadius, nRadius ) ) ); - Invalidate( Rectangle( aPtNew - Point( nRadius, nRadius ), + Invalidate( tools::Rectangle( aPtNew - Point( nRadius, nRadius ), aPtNew + Point( nRadius, nRadius ) ) ); eRP = GetRPFromPoint( aPtNew ); @@ -355,7 +355,7 @@ void SvxRectCtl::DataChanged( const DataChangedEvent& rDCEvt ) // the control (rectangle with 9 circles) -void SvxRectCtl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SvxRectCtl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { InitSettings(rRenderContext); @@ -365,7 +365,7 @@ void SvxRectCtl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) rRenderContext.SetLineColor(rStyles.GetDialogColor()); rRenderContext.SetFillColor(rStyles.GetDialogColor()); - rRenderContext.DrawRect(Rectangle(Point(0,0), rRenderContext.GetOutputSize())); + rRenderContext.DrawRect(tools::Rectangle(Point(0,0), rRenderContext.GetOutputSize())); if (IsEnabled()) rRenderContext.SetLineColor(rStyles.GetLabelTextColor()); @@ -378,10 +378,10 @@ void SvxRectCtl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) { Color aOldCol = rRenderContext.GetLineColor(); rRenderContext.SetLineColor(rStyles.GetLightColor()); - rRenderContext.DrawRect(Rectangle(aPtLT + aPtDiff, aPtRB + aPtDiff)); + rRenderContext.DrawRect(tools::Rectangle(aPtLT + aPtDiff, aPtRB + aPtDiff)); rRenderContext.SetLineColor(aOldCol); } - rRenderContext.DrawRect(Rectangle(aPtLT, aPtRB)); + rRenderContext.DrawRect(tools::Rectangle(aPtLT, aPtRB)); rRenderContext.SetFillColor(rRenderContext.GetBackground().GetColor()); @@ -575,8 +575,8 @@ void SvxRectCtl::SetActualRP( RectPoint eNewRP ) { Point aPtLast( SetActualRPWithoutInvalidate( eNewRP ) ); - Invalidate( Rectangle( aPtLast - Point( nRadius, nRadius ), aPtLast + Point( nRadius, nRadius ) ) ); - Invalidate( Rectangle( aPtNew - Point( nRadius, nRadius ), aPtNew + Point( nRadius, nRadius ) ) ); + Invalidate( tools::Rectangle( aPtLast - Point( nRadius, nRadius ), aPtLast + Point( nRadius, nRadius ) ) ); + Invalidate( tools::Rectangle( aPtNew - Point( nRadius, nRadius ), aPtNew + Point( nRadius, nRadius ) ) ); // notify accessibility object about change if( pAccContext.is() ) @@ -604,15 +604,15 @@ void SvxRectCtl::SetState( CTL_STATE nState ) static_cast<SvxTabPage*>(pTabPage)->PointChanged(this, eRP); } -Rectangle SvxRectCtl::CalculateFocusRectangle() const +tools::Rectangle SvxRectCtl::CalculateFocusRectangle() const { Size aDstBtnSize( PixelToLogic( Size( 15, 15 ) ) ); - return Rectangle( aPtNew - Point( aDstBtnSize.Width() >> 1, aDstBtnSize.Height() >> 1 ), aDstBtnSize ); + return tools::Rectangle( aPtNew - Point( aDstBtnSize.Width() >> 1, aDstBtnSize.Height() >> 1 ), aDstBtnSize ); } -Rectangle SvxRectCtl::CalculateFocusRectangle( RectPoint eRectPoint ) const +tools::Rectangle SvxRectCtl::CalculateFocusRectangle( RectPoint eRectPoint ) const { - Rectangle aRet; + tools::Rectangle aRet; RectPoint eOldRectPoint = GetActualRP(); if( eOldRectPoint == eRectPoint ) @@ -713,7 +713,7 @@ long SvxPixelCtl::ShowPosition( const Point &pt) //Invalidate( Rectangle( aPtTl, aPtBr ) ); aFocusPosition.setX(nX); aFocusPosition.setY(nY); - Invalidate(Rectangle(Point(0,0),aRectSize)); + Invalidate(tools::Rectangle(Point(0,0),aRectSize)); vcl::Window *pTabPage = getNonLayoutParent(this); if (pTabPage && WindowType::TABPAGE == pTabPage->GetType()) @@ -796,7 +796,7 @@ void SvxPixelCtl::MouseButtonDown( const MouseEvent& rMEvt ) // Draws the Control (Rectangle with nine circles) -void SvxPixelCtl::Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) +void SvxPixelCtl::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) { if (!aRectSize.Width() || !aRectSize.Height()) return; @@ -838,7 +838,7 @@ void SvxPixelCtl::Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) // Change color: 0 -> Background color rRenderContext.SetFillColor(nLastPixel ? aPixelColor : aBackgroundColor); } - rRenderContext.DrawRect(Rectangle(aPtTl, aPtBr)); + rRenderContext.DrawRect(tools::Rectangle(aPtTl, aPtBr)); } } //Draw visual focus when has focus @@ -857,7 +857,7 @@ void SvxPixelCtl::Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) } //Calculate visual focus rectangle via focus position -Rectangle SvxPixelCtl::implCalFocusRect( const Point& aPosition ) +tools::Rectangle SvxPixelCtl::implCalFocusRect( const Point& aPosition ) { long nLeft,nTop,nRight,nBottom; long i,j; @@ -867,7 +867,7 @@ Rectangle SvxPixelCtl::implCalFocusRect( const Point& aPosition ) nRight = aRectSize.Width() * (j + 1) / nLines - 1; nTop = aRectSize.Height() * i / nLines + 1; nBottom = aRectSize.Height() * (i + 1) / nLines - 1; - return Rectangle(nLeft,nTop,nRight,nBottom); + return tools::Rectangle(nLeft,nTop,nRight,nBottom); } //Solution:Keyboard function @@ -883,7 +883,7 @@ void SvxPixelCtl::KeyInput( const KeyEvent& rKEvt ) aRectSize.Height() *( aFocusPosition.getY() - 1)/ nLines -1 ); Size aRepaintSize( aRectSize.Width() *3/ nLines + 2,aRectSize.Height() *3/ nLines + 2); - Rectangle aRepaintRect( aRepaintPoint, aRepaintSize ); + tools::Rectangle aRepaintRect( aRepaintPoint, aRepaintSize ); bool bFocusPosChanged=false; switch(nCode) { @@ -1693,7 +1693,7 @@ void SvxXLinePreview::SetLineAttributes(const SfxItemSet& rItemSet) } -void SvxXLinePreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SvxXLinePreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { LocalPrePaint(rRenderContext); @@ -1728,14 +1728,14 @@ SvxXRectPreview::SvxXRectPreview(vcl::Window* pParent) InitSettings(true, true); // create RectangleObject - const Rectangle aObjectSize(Point(), GetOutputSize()); + const tools::Rectangle aObjectSize(Point(), GetOutputSize()); mpRectangleObject = new SdrRectObj(aObjectSize); mpRectangleObject->SetModel(&getModel()); } void SvxXRectPreview::Resize() { - const Rectangle aObjectSize(Point(), GetOutputSize()); + const tools::Rectangle aObjectSize(Point(), GetOutputSize()); SdrObject *pOrigObject = mpRectangleObject; if (pOrigObject) { @@ -1766,7 +1766,7 @@ void SvxXRectPreview::SetAttributes(const SfxItemSet& rItemSet) mpRectangleObject->SetMergedItem(XLineStyleItem(drawing::LineStyle_NONE)); } -void SvxXRectPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SvxXRectPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { LocalPrePaint(rRenderContext); @@ -1795,12 +1795,12 @@ SvxXShadowPreview::SvxXShadowPreview( vcl::Window* pParent ) aSize.Height() = aSize.Height() / 3; // create RectangleObject - const Rectangle aObjectSize( Point( aSize.Width(), aSize.Height() ), aSize ); + const tools::Rectangle aObjectSize( Point( aSize.Width(), aSize.Height() ), aSize ); mpRectangleObject = new SdrRectObj(aObjectSize); mpRectangleObject->SetModel(&getModel()); // create ShadowObject - const Rectangle aShadowSize( Point( aSize.Width(), aSize.Height() ), aSize ); + const tools::Rectangle aShadowSize( Point( aSize.Width(), aSize.Height() ), aSize ); mpRectangleShadow = new SdrRectObj(aShadowSize); mpRectangleShadow->SetModel(&getModel()); } @@ -1836,7 +1836,7 @@ void SvxXShadowPreview::SetShadowPosition(const Point& rPos) maShadowOffset = rPos; } -void SvxXShadowPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SvxXShadowPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { LocalPrePaint(rRenderContext); @@ -1845,7 +1845,7 @@ void SvxXShadowPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangl aSize.Width() = aSize.Width() / 3; aSize.Height() = aSize.Height() / 3; - Rectangle aObjectRect(Point(aSize.Width(), aSize.Height()), aSize); + tools::Rectangle aObjectRect(Point(aSize.Width(), aSize.Height()), aSize); mpRectangleObject->SetSnapRect(aObjectRect); aObjectRect.Move(maShadowOffset.X(), maShadowOffset.Y()); mpRectangleShadow->SetSnapRect(aObjectRect); diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx index b7be30bddb3c..213126c069c1 100644 --- a/svx/source/dialog/fntctrl.cxx +++ b/svx/source/dialog/fntctrl.cxx @@ -611,7 +611,7 @@ void SvxFontPrevWindow::UseResourceText() pImpl->mbUseResText = true; } -void SvxFontPrevWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SvxFontPrevWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { ApplySettings(rRenderContext); @@ -625,7 +625,7 @@ void SvxFontPrevWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangl const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); const Size aLogSize(rRenderContext.GetOutputSize()); - Rectangle aRect(Point(0, 0), aLogSize); + tools::Rectangle aRect(Point(0, 0), aLogSize); rRenderContext.SetLineColor(); rRenderContext.SetFillColor(rStyleSettings.GetWindowColor()); rRenderContext.DrawRect(aRect); @@ -718,7 +718,7 @@ void SvxFontPrevWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangl if (pImpl->mpBackColor) { - Rectangle aRect(Point(0, 0), aLogSize); + tools::Rectangle aRect(Point(0, 0), aLogSize); Color aLineCol = rRenderContext.GetLineColor(); Color aFillCol = rRenderContext.GetFillColor(); rRenderContext.SetLineColor(); @@ -729,7 +729,7 @@ void SvxFontPrevWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangl } if (pImpl->mpColor) { - Rectangle aRect(Point(nX, nY), aTxtSize); + tools::Rectangle aRect(Point(nX, nY), aTxtSize); Color aLineCol = rRenderContext.GetLineColor(); Color aFillCol = rRenderContext.GetFillColor(); rRenderContext.SetLineColor(); diff --git a/svx/source/dialog/framelink.cxx b/svx/source/dialog/framelink.cxx index 73d153e6a526..2de6d3dae281 100644 --- a/svx/source/dialog/framelink.cxx +++ b/svx/source/dialog/framelink.cxx @@ -179,7 +179,7 @@ struct LinePoints explicit LinePoints( const Point& rBeg, const Point& rEnd ) : maBeg( rBeg ), maEnd( rEnd ) {} - explicit LinePoints( const Rectangle& rRect, bool bTLBR ) : + explicit LinePoints( const tools::Rectangle& rRect, bool bTLBR ) : maBeg( bTLBR ? rRect.TopLeft() : rRect.TopRight() ), maEnd( bTLBR ? rRect.BottomRight() : rRect.BottomLeft() ) {} }; @@ -900,7 +900,7 @@ void lclDrawVerFrameBorder( @return A struct containg start and end position of the diagonal line. */ -LinePoints lclGetDiagLineEnds( const Rectangle& rRect, bool bTLBR, long nDiagOffs ) +LinePoints lclGetDiagLineEnds( const tools::Rectangle& rRect, bool bTLBR, long nDiagOffs ) { LinePoints aPoints( rRect, bTLBR ); bool bVert = rRect.GetWidth() < rRect.GetHeight(); @@ -938,10 +938,10 @@ LinePoints lclGetDiagLineEnds( const Rectangle& rRect, bool bTLBR, long nDiagOff The result struct containing modifies for each border of the reference rectangle. */ -void lclPushDiagClipRect( OutputDevice& rDev, const Rectangle& rRect, const DiagLineResult& rResult ) +void lclPushDiagClipRect( OutputDevice& rDev, const tools::Rectangle& rRect, const DiagLineResult& rResult ) { // PixelToLogic() regards internal offset of the output device - Rectangle aClipRect( rRect ); + tools::Rectangle aClipRect( rRect ); aClipRect.Left() += lclToMapUnit( rResult.mnLClip ); aClipRect.Top() += lclToMapUnit( rResult.mnTClip ); aClipRect.Right() += lclToMapUnit( rResult.mnRClip ); @@ -975,7 +975,7 @@ void lclPushDiagClipRect( OutputDevice& rDev, const Rectangle& rRect, const Diag @param bCrossStyle The style of the crossing frame border. Must be a double frame style. */ -void lclPushCrossingClipRegion( OutputDevice& rDev, const Rectangle& rRect, bool bTLBR, const Style& rCrossStyle ) +void lclPushCrossingClipRegion( OutputDevice& rDev, const tools::Rectangle& rRect, bool bTLBR, const Style& rCrossStyle ) { DBG_ASSERT( rCrossStyle.Secn(), "lclGetCrossingClipRegion - use only for double styles" ); LinePoints aLPoints( lclGetDiagLineEnds( rRect, !bTLBR, lclGetPrimEnd( rCrossStyle ) ) ); @@ -1010,7 +1010,7 @@ void lclPushCrossingClipRegion( OutputDevice& rDev, const Rectangle& rRect, bool passed DiagLineResult struct. A one pixel wide line can be drawn dotted. */ void lclDrawDiagLine( - OutputDevice& rDev, const Rectangle& rRect, bool bTLBR, + OutputDevice& rDev, const tools::Rectangle& rRect, bool bTLBR, const DiagLineResult& rResult, long nDiagOffs1, long nDiagOffs2, SvxBorderLineStyle nDashing ) { lclPushDiagClipRect( rDev, rRect, rResult ); @@ -1044,7 +1044,7 @@ void lclDrawDiagLine( Style of the crossing diagonal frame border. */ void lclDrawDiagFrameBorder( - OutputDevice& rDev, const Rectangle& rRect, bool bTLBR, + OutputDevice& rDev, const tools::Rectangle& rRect, bool bTLBR, const Style& rBorder, const DiagBorderResult& rResult, const Style& rCrossStyle, const Color* pForceColor, bool bDiagDblClip ) { @@ -1090,7 +1090,7 @@ void lclDrawDiagFrameBorder( Offsets (sub units) to modify the clipping region of the output device. */ void lclDrawDiagFrameBorders( - OutputDevice& rDev, const Rectangle& rRect, + OutputDevice& rDev, const tools::Rectangle& rRect, const Style& rTLBR, const Style& rBLTR, const DiagBordersResult& rResult, const Color* pForceColor, bool bDiagDblClip ) { @@ -1396,7 +1396,7 @@ basegfx::B2DPoint lcl_PointToB2DPoint( const Point& rPoint ) drawinglayer::primitive2d::Primitive2DContainer CreateClippedBorderPrimitives ( const Point& rStart, const Point& rEnd, const Style& rBorder, - const Rectangle& rClipRect ) + const tools::Rectangle& rClipRect ) { drawinglayer::primitive2d::Primitive2DContainer aSequence( 1 ); basegfx::B2DPolygon aPolygon; @@ -1496,7 +1496,7 @@ void DrawVerFrameBorder( OutputDevice& rDev, void DrawDiagFrameBorders( - OutputDevice& rDev, const Rectangle& rRect, const Style& rTLBR, const Style& rBLTR, + OutputDevice& rDev, const tools::Rectangle& rRect, const Style& rTLBR, const Style& rBLTR, const Style& rTLFromB, const Style& rTLFromR, const Style& rBRFromT, const Style& rBRFromL, const Style& rBLFromT, const Style& rBLFromR, const Style& rTRFromB, const Style& rTRFromL, const Color* pForceColor, bool bDiagDblClip ) diff --git a/svx/source/dialog/framelinkarray.cxx b/svx/source/dialog/framelinkarray.cxx index 3438e9840a4a..079a12b9acb3 100644 --- a/svx/source/dialog/framelinkarray.cxx +++ b/svx/source/dialog/framelinkarray.cxx @@ -708,9 +708,9 @@ void Array::SetClipRange( size_t nFirstCol, size_t nFirstRow, size_t nLastCol, s mxImpl->mnLastClipRow = nLastRow; } -Rectangle Array::GetClipRangeRectangle() const +tools::Rectangle Array::GetClipRangeRectangle() const { - return Rectangle( + return tools::Rectangle( mxImpl->GetColPosition( mxImpl->mnFirstClipCol ), mxImpl->GetRowPosition( mxImpl->mnFirstClipRow ), mxImpl->GetColPosition( mxImpl->mnLastClipCol + 1 ), @@ -808,9 +808,9 @@ Size Array::GetCellSize( size_t nCol, size_t nRow ) const return Size( GetColWidth( nFirstCol, nLastCol ) + 1, GetRowHeight( nFirstRow, nLastRow ) + 1 ); } -Rectangle Array::GetCellRect( size_t nCol, size_t nRow ) const +tools::Rectangle Array::GetCellRect( size_t nCol, size_t nRow ) const { - Rectangle aRect( GetCellPosition( nCol, nRow ), GetCellSize( nCol, nRow ) ); + tools::Rectangle aRect( GetCellPosition( nCol, nRow ), GetCellSize( nCol, nRow ) ); // adjust rectangle for partly visible merged cells const Cell& rCell = CELL( nCol, nRow ); @@ -900,7 +900,7 @@ void Array::DrawRange( drawinglayer::processor2d::BaseProcessor2D* pProcessor, if( (!bOverlapX && !bOverlapY) || (bFirstCol && bFirstRow) || (!bOverlapY && bFirstCol) || (!bOverlapX && bFirstRow) ) { - Rectangle aRect( GetCellRect( nCol, nRow ) ); + tools::Rectangle aRect( GetCellRect( nCol, nRow ) ); if( (aRect.GetWidth() > 1) && (aRect.GetHeight() > 1) ) { size_t _nFirstCol = mxImpl->GetMergedFirstCol( nCol, nRow ); @@ -1105,7 +1105,7 @@ void Array::DrawRange( OutputDevice& rDev, if( (!bOverlapX && !bOverlapY) || (bFirstCol && bFirstRow) || (!bOverlapY && bFirstCol) || (!bOverlapX && bFirstRow) ) { - Rectangle aRect( GetCellRect( nCol, nRow ) ); + tools::Rectangle aRect( GetCellRect( nCol, nRow ) ); if( (aRect.GetWidth() > 1) && (aRect.GetHeight() > 1) ) { size_t _nFirstCol = mxImpl->GetMergedFirstCol( nCol, nRow ); diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx index bd63f944ab4b..0a281acc2c07 100644 --- a/svx/source/dialog/frmsel.cxx +++ b/svx/source/dialog/frmsel.cxx @@ -165,7 +165,7 @@ void FrameBorder::MergeFocusToPolyPolygon( tools::PolyPolygon& rPPoly ) const lclPolyPolyUnion( rPPoly, maFocusArea ); } -void FrameBorder::AddClickRect( const Rectangle& rRect ) +void FrameBorder::AddClickRect( const tools::Rectangle& rRect ) { lclPolyPolyUnion( maClickArea, tools::Polygon( rRect ) ); } @@ -175,7 +175,7 @@ bool FrameBorder::ContainsClickPoint( const Point& rPos ) const return vcl::Region( maClickArea ).IsInside( rPos ); } -Rectangle FrameBorder::GetClickBoundRect() const +tools::Rectangle FrameBorder::GetClickBoundRect() const { return maClickArea.GetBoundRect(); } @@ -400,18 +400,18 @@ void FrameSelectorImpl::InitBorderGeometry() maHor.ClearFocusArea(); maBottom.ClearFocusArea(); - maLeft.AddFocusPolygon( Rectangle( mnLine1 - mnFocusOffs, mnLine1 - mnFocusOffs, mnLine1 + mnFocusOffs, mnLine3 + mnFocusOffs ) ); - maVer.AddFocusPolygon( Rectangle( mnLine2 - mnFocusOffs, mnLine1 - mnFocusOffs, mnLine2 + mnFocusOffs, mnLine3 + mnFocusOffs ) ); - maRight.AddFocusPolygon( Rectangle( mnLine3 - mnFocusOffs, mnLine1 - mnFocusOffs, mnLine3 + mnFocusOffs, mnLine3 + mnFocusOffs ) ); - maTop.AddFocusPolygon( Rectangle( mnLine1 - mnFocusOffs, mnLine1 - mnFocusOffs, mnLine3 + mnFocusOffs, mnLine1 + mnFocusOffs ) ); - maHor.AddFocusPolygon( Rectangle( mnLine1 - mnFocusOffs, mnLine2 - mnFocusOffs, mnLine3 + mnFocusOffs, mnLine2 + mnFocusOffs ) ); - maBottom.AddFocusPolygon( Rectangle( mnLine1 - mnFocusOffs, mnLine3 - mnFocusOffs, mnLine3 + mnFocusOffs, mnLine3 + mnFocusOffs ) ); + maLeft.AddFocusPolygon( tools::Rectangle( mnLine1 - mnFocusOffs, mnLine1 - mnFocusOffs, mnLine1 + mnFocusOffs, mnLine3 + mnFocusOffs ) ); + maVer.AddFocusPolygon( tools::Rectangle( mnLine2 - mnFocusOffs, mnLine1 - mnFocusOffs, mnLine2 + mnFocusOffs, mnLine3 + mnFocusOffs ) ); + maRight.AddFocusPolygon( tools::Rectangle( mnLine3 - mnFocusOffs, mnLine1 - mnFocusOffs, mnLine3 + mnFocusOffs, mnLine3 + mnFocusOffs ) ); + maTop.AddFocusPolygon( tools::Rectangle( mnLine1 - mnFocusOffs, mnLine1 - mnFocusOffs, mnLine3 + mnFocusOffs, mnLine1 + mnFocusOffs ) ); + maHor.AddFocusPolygon( tools::Rectangle( mnLine1 - mnFocusOffs, mnLine2 - mnFocusOffs, mnLine3 + mnFocusOffs, mnLine2 + mnFocusOffs ) ); + maBottom.AddFocusPolygon( tools::Rectangle( mnLine1 - mnFocusOffs, mnLine3 - mnFocusOffs, mnLine3 + mnFocusOffs, mnLine3 + mnFocusOffs ) ); for( nCol = 0, nCols = maArray.GetColCount(); nCol < nCols; ++nCol ) { for( nRow = 0, nRows = maArray.GetRowCount(); nRow < nRows; ++nRow ) { - Rectangle aRect( maArray.GetCellRect( nCol, nRow ) ); + tools::Rectangle aRect( maArray.GetCellRect( nCol, nRow ) ); long nDiagFocusOffsX = frame::GetTLDiagOffset( -mnFocusOffs, mnFocusOffs, maArray.GetHorDiagAngle( nCol, nRow ) ); long nDiagFocusOffsY = frame::GetTLDiagOffset( -mnFocusOffs, mnFocusOffs, maArray.GetVerDiagAngle( nCol, nRow ) ); @@ -450,12 +450,12 @@ void FrameSelectorImpl::InitBorderGeometry() long nClH = mbHor ? nClI : nClO; // additional space dependent of horizontal inner border long nClV = mbVer ? nClI : nClO; // additional space dependent of vertical inner border - maLeft.AddClickRect( Rectangle( mnLine1 - nClO, mnLine1 - nClO, mnLine1 + nClV, mnLine3 + nClO ) ); - maVer.AddClickRect( Rectangle( mnLine2 - nClI, mnLine1 - nClO, mnLine2 + nClI, mnLine3 + nClO ) ); - maRight.AddClickRect( Rectangle( mnLine3 - nClV, mnLine1 - nClO, mnLine3 + nClO, mnLine3 + nClO ) ); - maTop.AddClickRect( Rectangle( mnLine1 - nClO, mnLine1 - nClO, mnLine3 + nClO, mnLine1 + nClH ) ); - maHor.AddClickRect( Rectangle( mnLine1 - nClO, mnLine2 - nClI, mnLine3 + nClO, mnLine2 + nClI ) ); - maBottom.AddClickRect( Rectangle( mnLine1 - nClO, mnLine3 - nClH, mnLine3 + nClO, mnLine3 + nClO ) ); + maLeft.AddClickRect( tools::Rectangle( mnLine1 - nClO, mnLine1 - nClO, mnLine1 + nClV, mnLine3 + nClO ) ); + maVer.AddClickRect( tools::Rectangle( mnLine2 - nClI, mnLine1 - nClO, mnLine2 + nClI, mnLine3 + nClO ) ); + maRight.AddClickRect( tools::Rectangle( mnLine3 - nClV, mnLine1 - nClO, mnLine3 + nClO, mnLine3 + nClO ) ); + maTop.AddClickRect( tools::Rectangle( mnLine1 - nClO, mnLine1 - nClO, mnLine3 + nClO, mnLine1 + nClH ) ); + maHor.AddClickRect( tools::Rectangle( mnLine1 - nClO, mnLine2 - nClI, mnLine3 + nClO, mnLine2 + nClI ) ); + maBottom.AddClickRect( tools::Rectangle( mnLine1 - nClO, mnLine3 - nClH, mnLine3 + nClO, mnLine3 + nClO ) ); /* Diagonal frame borders use the remaining space between outer and inner frame borders. */ if( mbTLBR || mbBLTR ) @@ -465,7 +465,7 @@ void FrameSelectorImpl::InitBorderGeometry() for( nRow = 0, nRows = maArray.GetRowCount(); nRow < nRows; ++nRow ) { // the usable area between horizonal/vertical frame borders of current quadrant - Rectangle aRect( maArray.GetCellRect( nCol, nRow ) ); + tools::Rectangle aRect( maArray.GetCellRect( nCol, nRow ) ); aRect.Left() += nClV + 1; aRect.Right() -= nClV + 1; aRect.Top() += nClH + 1; @@ -476,12 +476,12 @@ void FrameSelectorImpl::InitBorderGeometry() { // single areas Point aMid( aRect.Center() ); - maTLBR.AddClickRect( Rectangle( aRect.TopLeft(), aMid ) ); - maTLBR.AddClickRect( Rectangle( aMid + Point( 1, 1 ), aRect.BottomRight() ) ); - maBLTR.AddClickRect( Rectangle( aRect.Left(), aMid.Y() + 1, aMid.X(), aRect.Bottom() ) ); - maBLTR.AddClickRect( Rectangle( aMid.X() + 1, aRect.Top(), aRect.Right(), aMid.Y() ) ); + maTLBR.AddClickRect( tools::Rectangle( aRect.TopLeft(), aMid ) ); + maTLBR.AddClickRect( tools::Rectangle( aMid + Point( 1, 1 ), aRect.BottomRight() ) ); + maBLTR.AddClickRect( tools::Rectangle( aRect.Left(), aMid.Y() + 1, aMid.X(), aRect.Bottom() ) ); + maBLTR.AddClickRect( tools::Rectangle( aMid.X() + 1, aRect.Top(), aRect.Right(), aMid.Y() ) ); // centered rectangle for both frame borders - Rectangle aMidRect( aRect.TopLeft(), Size( aRect.GetWidth() / 3, aRect.GetHeight() / 3 ) ); + tools::Rectangle aMidRect( aRect.TopLeft(), Size( aRect.GetWidth() / 3, aRect.GetHeight() / 3 ) ); aMidRect.Move( (aRect.GetWidth() - aMidRect.GetWidth()) / 2, (aRect.GetHeight() - aMidRect.GetHeight()) / 2 ); maTLBR.AddClickRect( aMidRect ); maBLTR.AddClickRect( aMidRect ); @@ -537,12 +537,12 @@ void FrameSelectorImpl::DrawBackground() // clear the area mpVirDev->SetLineColor(); mpVirDev->SetFillColor( maBackCol ); - mpVirDev->DrawRect( Rectangle( Point( 0, 0 ), mpVirDev->GetOutputSizePixel() ) ); + mpVirDev->DrawRect( tools::Rectangle( Point( 0, 0 ), mpVirDev->GetOutputSizePixel() ) ); // draw the inner gray (or whatever color) rectangle mpVirDev->SetLineColor(); mpVirDev->SetFillColor( maMarkCol ); - mpVirDev->DrawRect( Rectangle( + mpVirDev->DrawRect( tools::Rectangle( mnLine1 - mnFocusOffs, mnLine1 - mnFocusOffs, mnLine3 + mnFocusOffs, mnLine3 + mnFocusOffs ) ); // draw the white space for enabled frame borders @@ -700,7 +700,7 @@ void FrameSelectorImpl::DrawAllTrackingRects() } else // no frame border selected -> draw tracking rectangle around entire control - aPPoly.Insert( tools::Polygon(Rectangle(maVirDevPos, mpVirDev->GetOutputSizePixel()))); + aPPoly.Insert( tools::Polygon(tools::Rectangle(maVirDevPos, mpVirDev->GetOutputSizePixel()))); aPPoly.Optimize(PolyOptimizeFlags::CLOSE); for(sal_uInt16 nIdx = 0, nCount = aPPoly.Count(); nIdx < nCount; ++nIdx) @@ -1046,9 +1046,9 @@ bool FrameSelector::ContainsClickPoint( const Point& rPos ) const return bContains; } -Rectangle FrameSelector::GetClickBoundRect( FrameBorderType eBorder ) const +tools::Rectangle FrameSelector::GetClickBoundRect( FrameBorderType eBorder ) const { - Rectangle aRect; + tools::Rectangle aRect; const FrameBorder& rBorder = mxImpl->GetBorder( eBorder ); if( rBorder.IsEnabled() ) aRect = rBorder.GetClickBoundRect(); @@ -1056,7 +1056,7 @@ Rectangle FrameSelector::GetClickBoundRect( FrameBorderType eBorder ) const } // virtual functions from base class -void FrameSelector::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void FrameSelector::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { mxImpl->CopyVirDevToControl(rRenderContext); if (HasFocus()) diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx index bed8deff3823..cdf0e5d05003 100644 --- a/svx/source/dialog/graphctl.cxx +++ b/svx/source/dialog/graphctl.cxx @@ -36,7 +36,7 @@ #include <svx/svdpage.hxx> #include "svx/sdrpaintwindow.hxx" -void GraphCtrlUserCall::Changed( const SdrObject& rObj, SdrUserCallType eType, const Rectangle& /*rOldBoundRect*/ ) +void GraphCtrlUserCall::Changed( const SdrObject& rObj, SdrUserCallType eType, const tools::Rectangle& /*rOldBoundRect*/ ) { switch( eType ) { @@ -149,7 +149,7 @@ void GraphCtrl::InitSdrModel() // Creating a View pView = new GraphCtrlView( pModel, this ); - pView->SetWorkArea( Rectangle( Point(), aGraphSize ) ); + pView->SetWorkArea( tools::Rectangle( Point(), aGraphSize ) ); pView->EnableExtendedMouseEventDispatcher( true ); pView->ShowSdrPage(pView->GetModel()->GetPage(0)); pView->SetFrameDragSingles(); @@ -244,7 +244,7 @@ void GraphCtrl::Resize() Invalidate(); } -void GraphCtrl::Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void GraphCtrl::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { // #i72889# used splitted repaint to be able to paint an own background // even to the buffered view @@ -457,11 +457,11 @@ void GraphCtrl::KeyInput( const KeyEvent& rKEvt ) if(nullptr == pHdl) { // restrict movement to WorkArea - const Rectangle& rWorkArea = pView->GetWorkArea(); + const tools::Rectangle& rWorkArea = pView->GetWorkArea(); if(!rWorkArea.IsEmpty()) { - Rectangle aMarkRect(pView->GetMarkedObjRect()); + tools::Rectangle aMarkRect(pView->GetMarkedObjRect()); aMarkRect.Move(nX, nY); if(!aMarkRect.IsInside(rWorkArea)) @@ -613,7 +613,7 @@ void GraphCtrl::MouseButtonDown( const MouseEvent& rMEvt ) { const Point aLogPt( PixelToLogic( rMEvt.GetPosPixel() ) ); - if ( !Rectangle( Point(), aGraphSize ).IsInside( aLogPt ) && !pView->IsEditMode() ) + if ( !tools::Rectangle( Point(), aGraphSize ).IsInside( aLogPt ) && !pView->IsEditMode() ) Control::MouseButtonDown( rMEvt ); else { @@ -670,7 +670,7 @@ void GraphCtrl::MouseMove(const MouseEvent& rMEvt) if ( aMousePosLink.IsSet() ) { - if ( Rectangle( Point(), aGraphSize ).IsInside( aLogPos ) ) + if ( tools::Rectangle( Point(), aGraphSize ).IsInside( aLogPos ) ) aMousePos = aLogPos; else aMousePos = Point(); diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx index 8f52dca70df2..9b4cc00dcd6f 100644 --- a/svx/source/dialog/imapwnd.cxx +++ b/svx/source/dialog/imapwnd.cxx @@ -184,7 +184,7 @@ void IMapWindow::SetTargetList( TargetList& rTargetList ) SdrObject* IMapWindow::CreateObj( const IMapObject* pIMapObj ) { Point aPoint; - Rectangle aClipRect( aPoint, GetGraphicSize() ); + tools::Rectangle aClipRect( aPoint, GetGraphicSize() ); SdrObject* pSdrObj = nullptr; IMapObjectPtr pCloneIMapObj; @@ -193,7 +193,7 @@ SdrObject* IMapWindow::CreateObj( const IMapObject* pIMapObj ) case IMAP_OBJ_RECTANGLE: { const IMapRectangleObject* pIMapRectObj = static_cast<const IMapRectangleObject*>(pIMapObj); - Rectangle aDrawRect( pIMapRectObj->GetRectangle( false ) ); + tools::Rectangle aDrawRect( pIMapRectObj->GetRectangle( false ) ); // clipped on CanvasPane aDrawRect.Intersection( aClipRect ); @@ -209,7 +209,7 @@ SdrObject* IMapWindow::CreateObj( const IMapObject* pIMapObj ) const Point aCenter( pIMapCircleObj->GetCenter( false ) ); const long nRadius = pIMapCircleObj->GetRadius( false ); const Point aOffset( nRadius, nRadius ); - Rectangle aCircle( aCenter - aOffset, aCenter + aOffset ); + tools::Rectangle aCircle( aCenter - aOffset, aCenter + aOffset ); // limited to CanvasPane aCircle.Intersection( aClipRect ); @@ -226,7 +226,7 @@ SdrObject* IMapWindow::CreateObj( const IMapObject* pIMapObj ) // If it actually is an ellipse, then another ellipse is created again if ( pIMapPolyObj->HasExtraEllipse() ) { - Rectangle aDrawRect( pIMapPolyObj->GetExtraEllipse() ); + tools::Rectangle aDrawRect( pIMapPolyObj->GetExtraEllipse() ); // clipped on CanvasPane aDrawRect.Intersection( aClipRect ); @@ -427,7 +427,7 @@ SdrObject* IMapWindow::GetHitSdrObj( const Point& rPosPixel ) const SdrObject* pObj = nullptr; Point aPt = PixelToLogic( rPosPixel ); - if ( Rectangle( Point(), GetGraphicSize() ).IsInside( aPt ) ) + if ( tools::Rectangle( Point(), GetGraphicSize() ).IsInside( aPt ) ) { SdrPage* pPage = pModel->GetPage( 0 ); if ( pPage ) @@ -563,8 +563,8 @@ void IMapWindow::RequestHelp( const HelpEvent& rHEvt ) if ( pIMapObj && !( aStr = pIMapObj->GetURL() ).isEmpty() ) { - Rectangle aLogicPix( LogicToPixel( Rectangle( Point(), GetGraphicSize() ) ) ); - Rectangle aScreenRect( OutputToScreenPixel( aLogicPix.TopLeft() ), + tools::Rectangle aLogicPix( LogicToPixel( tools::Rectangle( Point(), GetGraphicSize() ) ) ); + tools::Rectangle aScreenRect( OutputToScreenPixel( aLogicPix.TopLeft() ), OutputToScreenPixel( aLogicPix.BottomRight() ) ); if ( Help::IsBalloonHelpEnabled() ) @@ -775,7 +775,7 @@ void IMapWindow::CreateDefaultObject() sal_uInt32 nDefaultObjectSizeHeight = aPageSize.Height() / 4; aPagePos.X() += (aPageSize.Width() / 2) - (nDefaultObjectSizeWidth / 2); aPagePos.Y() += (aPageSize.Height() / 2) - (nDefaultObjectSizeHeight / 2); - Rectangle aNewObjectRectangle(aPagePos, Size(nDefaultObjectSizeWidth, nDefaultObjectSizeHeight)); + tools::Rectangle aNewObjectRectangle(aPagePos, Size(nDefaultObjectSizeWidth, nDefaultObjectSizeHeight)); SdrObject* pObj = SdrObjFactory::MakeNewObject( pView->GetCurrentObjInventor(), pView->GetCurrentObjIdentifier(), nullptr, pModel); pObj->SetLogicRect(aNewObjectRectangle); diff --git a/svx/source/dialog/measctrl.cxx b/svx/source/dialog/measctrl.cxx index 78e2a456103d..d9610abb17a9 100644 --- a/svx/source/dialog/measctrl.cxx +++ b/svx/source/dialog/measctrl.cxx @@ -88,7 +88,7 @@ void SvxXMeasurePreview::dispose() Control::dispose(); } -void SvxXMeasurePreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SvxXMeasurePreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { pMeasureObj->SingleObjectPainter(rRenderContext); } diff --git a/svx/source/dialog/pagectrl.cxx b/svx/source/dialog/pagectrl.cxx index f59900ac4332..087b2e2dc6f5 100644 --- a/svx/source/dialog/pagectrl.cxx +++ b/svx/source/dialog/pagectrl.cxx @@ -98,7 +98,7 @@ void SvxPageWindow::dispose() VCL_BUILDER_FACTORY(SvxPageWindow) -void SvxPageWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SvxPageWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { Fraction aXScale(aWinSize.Width(), std::max(long(aSize.Width() * 2 + aSize.Width() / 8), 1L)); Fraction aYScale(aWinSize.Height(), std::max(aSize.Height(), 1L)); @@ -165,7 +165,7 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO rRenderContext.SetLineColor(Color(COL_TRANSPARENT)); rRenderContext.SetFillColor(rDlgColor); Size winSize(rRenderContext.GetOutputSize()); - rRenderContext.DrawRect(Rectangle(Point(0,0), winSize)); + rRenderContext.DrawRect(tools::Rectangle(Point(0,0), winSize)); if (bResetBackground) bResetBackground = false; @@ -179,11 +179,11 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO if (!bEnabled) { rRenderContext.SetFillColor(rDisableColor); - rRenderContext.DrawRect(Rectangle(rOrg, aTempSize)); + rRenderContext.DrawRect(tools::Rectangle(rOrg, aTempSize)); return; } rRenderContext.SetFillColor(rFieldColor); - rRenderContext.DrawRect(Rectangle(rOrg, aTempSize)); + rRenderContext.DrawRect(tools::Rectangle(rOrg, aTempSize)); long nL = nLeft; long nR = nRight; @@ -195,15 +195,15 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO nR = nLeft; } - Rectangle aRect; + tools::Rectangle aRect; aRect.Left() = rOrg.X() + nL; aRect.Right() = rOrg.X() + aTempSize.Width() - nR; aRect.Top() = rOrg.Y() + nTop; aRect.Bottom() = rOrg.Y() + aTempSize.Height() - nBottom; - Rectangle aHdRect(aRect); - Rectangle aFtRect(aRect); + tools::Rectangle aHdRect(aRect); + tools::Rectangle aFtRect(aRect); if (bHeader || bFooter) { @@ -325,7 +325,7 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO long nTH = CELL_HEIGHT * 3; long _nLeft = bHorz ? aRect.Left() + ((nW - nTW) / 2) : aRect.Left(); long _nTop = bVert ? aRect.Top() + ((nH - nTH) / 2) : aRect.Top(); - Rectangle aCellRect(Point(_nLeft, _nTop),Size(CELL_WIDTH, CELL_HEIGHT)); + tools::Rectangle aCellRect(Point(_nLeft, _nTop),Size(CELL_WIDTH, CELL_HEIGHT)); for (sal_uInt16 i = 0; i < 3; ++i) { @@ -346,8 +346,8 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO void SvxPageWindow::drawFillAttributes(vcl::RenderContext& rRenderContext, const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes, - const Rectangle& rPaintRange, - const Rectangle& rDefineRange) + const tools::Rectangle& rPaintRange, + const tools::Rectangle& rDefineRange) { const basegfx::B2DRange aPaintRange( rPaintRange.Left(), diff --git a/svx/source/dialog/paraprev.cxx b/svx/source/dialog/paraprev.cxx index 4a9da503e533..4d64c91aebcc 100644 --- a/svx/source/dialog/paraprev.cxx +++ b/svx/source/dialog/paraprev.cxx @@ -50,7 +50,7 @@ Size SvxParaPrevWindow::GetOptimalSize() const return getParagraphPreviewOptimalSize(this); } -void SvxParaPrevWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SvxParaPrevWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { DrawParagraph(rRenderContext); } @@ -71,7 +71,7 @@ void SvxParaPrevWindow::DrawParagraph(vcl::RenderContext& rRenderContext) Color aGrayColor(COL_LIGHTGRAY); rRenderContext.SetFillColor(Color(rWinColor)); - rRenderContext.DrawRect(Rectangle(Point(), aWinSize)); + rRenderContext.DrawRect(tools::Rectangle(Point(), aWinSize)); rRenderContext.SetLineColor(); @@ -192,7 +192,7 @@ void SvxParaPrevWindow::DrawParagraph(vcl::RenderContext& rRenderContext) aSiz.Width() = nLW; } - Rectangle aRect(aPnt, aSiz); + tools::Rectangle aRect(aPnt, aSiz); rRenderContext.DrawRect( aRect ); Lines[i] = aRect; diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index 489572f644a8..2b74ef1251f7 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -778,7 +778,7 @@ void RubyPreview::dispose() VCL_BUILDER_FACTORY(RubyPreview) -void RubyPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) +void RubyPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) { rRenderContext.Push(PushFlags::MAPMODE); @@ -790,7 +790,7 @@ void RubyPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*r aSaveFont.SetFontHeight(aWinSize.Height() / 4); rRenderContext.SetFont(aSaveFont); - Rectangle aRect(Point(0, 0), aWinSize); + tools::Rectangle aRect(Point(0, 0), aWinSize); rRenderContext.SetLineColor(); rRenderContext.SetFillColor(aSaveFont.GetFillColor()); rRenderContext.DrawRect(aRect); diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx index 18b37372267a..f4c27d362f19 100644 --- a/svx/source/dialog/svxbmpnumvalueset.cxx +++ b/svx/source/dialog/svxbmpnumvalueset.cxx @@ -133,7 +133,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt ) const Color aTextColor(COL_BLACK); vcl::RenderContext* pDev = rUDEvt.GetRenderContext(); - Rectangle aRect = rUDEvt.GetRect(); + tools::Rectangle aRect = rUDEvt.GetRect(); sal_uInt16 nItemId = rUDEvt.GetItemId(); long nRectWidth = aRect.GetWidth(); @@ -487,7 +487,7 @@ void SvxBmpNumValueSet::UserDraw(const UserDrawEvent& rUDEvt) { SvxNumValueSet::UserDraw(rUDEvt); - Rectangle aRect = rUDEvt.GetRect(); + tools::Rectangle aRect = rUDEvt.GetRect(); vcl::RenderContext* pDev = rUDEvt.GetRenderContext(); sal_uInt16 nItemId = rUDEvt.GetItemId(); Point aBLPos = aRect.TopLeft(); diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index 531d85df393d..ec43c43eb1a8 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -1585,7 +1585,7 @@ void SvxRuler::DrawLine_Impl(long& lTabPosition, int nNew, bool bHorizontal) if(lTabPosition != -1) { pEditWin->InvertTracking( - Rectangle( Point(lTabPosition, -aZero.Y()), + tools::Rectangle( Point(lTabPosition, -aZero.Y()), Point(lTabPosition, -aZero.Y() + nHeight)), ShowTrackFlags::Split | ShowTrackFlags::Clip ); } @@ -1597,7 +1597,7 @@ void SvxRuler::DrawLine_Impl(long& lTabPosition, int nNew, bool bHorizontal) if(mxPagePosItem.get()) lTabPosition += mxPagePosItem->GetPos().X(); pEditWin->InvertTracking( - Rectangle( Point(lTabPosition, -aZero.Y()), + tools::Rectangle( Point(lTabPosition, -aZero.Y()), Point(lTabPosition, -aZero.Y() + nHeight) ), ShowTrackFlags::Clip | ShowTrackFlags::Split ); } @@ -1609,7 +1609,7 @@ void SvxRuler::DrawLine_Impl(long& lTabPosition, int nNew, bool bHorizontal) if(lTabPosition != -1) { pEditWin->InvertTracking( - Rectangle( Point(-aZero.X(), lTabPosition), + tools::Rectangle( Point(-aZero.X(), lTabPosition), Point(-aZero.X() + nWidth, lTabPosition)), ShowTrackFlags::Split | ShowTrackFlags::Clip ); } @@ -1622,7 +1622,7 @@ void SvxRuler::DrawLine_Impl(long& lTabPosition, int nNew, bool bHorizontal) if(mxPagePosItem.get()) lTabPosition += mxPagePosItem->GetPos().Y(); pEditWin->InvertTracking( - Rectangle( Point(-aZero.X(), lTabPosition), + tools::Rectangle( Point(-aZero.X(), lTabPosition), Point(-aZero.X()+nWidth, lTabPosition)), ShowTrackFlags::Clip | ShowTrackFlags::Split ); } diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx index 19539641bbc7..8f0a9e5d8fb8 100644 --- a/svx/source/dialog/swframeexample.cxx +++ b/svx/source/dialog/swframeexample.cxx @@ -37,7 +37,7 @@ using namespace ::com::sun::star::text; namespace { -void DrawRect_Impl(vcl::RenderContext& rRenderContext, const Rectangle &rRect, +void DrawRect_Impl(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect, const Color &rFillColor, const Color &rLineColor) { rRenderContext.SetFillColor(rFillColor); @@ -140,7 +140,7 @@ void SvxSwFrameExample::InitAllRects_Impl(vcl::RenderContext& rRenderContext) nTTxtBorder = 2; nBTxtBorder = 2; } - aPagePrtArea = Rectangle(Point(nLBorder, nTBorder), Point((nOutWPix - 1) - nRBorder, (nOutHPix - 1) - nBBorder)); + aPagePrtArea = tools::Rectangle(Point(nLBorder, nTBorder), Point((nOutWPix - 1) - nRBorder, (nOutHPix - 1) - nBBorder)); // Example text: Preparing for the text output // A line of text @@ -232,7 +232,7 @@ void SvxSwFrameExample::InitAllRects_Impl(vcl::RenderContext& rRenderContext) } } -void SvxSwFrameExample::CalcBoundRect_Impl(Rectangle &rRect) +void SvxSwFrameExample::CalcBoundRect_Impl(tools::Rectangle &rRect) { switch (nAnchor) { @@ -444,19 +444,19 @@ void SvxSwFrameExample::CalcBoundRect_Impl(Rectangle &rRect) } } -Rectangle SvxSwFrameExample::DrawInnerFrame_Impl(vcl::RenderContext& rRenderContext, const Rectangle &rRect, +tools::Rectangle SvxSwFrameExample::DrawInnerFrame_Impl(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect, const Color &rFillColor, const Color &rBorderColor) { DrawRect_Impl(rRenderContext, rRect, rFillColor, rBorderColor); // Bereich, zu dem relativ positioniert wird, bestimmen - Rectangle aRect(rRect); // aPagePrtArea = Default + tools::Rectangle aRect(rRect); // aPagePrtArea = Default CalcBoundRect_Impl(aRect); if (nAnchor == TextContentAnchorType_AT_FRAME && &rRect == &aPagePrtArea) { // Testabsatz zeichnen - Rectangle aTxt(aTextLine); + tools::Rectangle aTxt(aTextLine); sal_Int32 nStep = aTxt.GetHeight() + 2; sal_uInt16 nLines = static_cast<sal_uInt16>(aParaPrtArea.GetHeight() / (aTextLine.GetHeight() + 2)); @@ -472,7 +472,7 @@ Rectangle SvxSwFrameExample::DrawInnerFrame_Impl(vcl::RenderContext& rRenderCont return aRect; } -void SvxSwFrameExample::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SvxSwFrameExample::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { rRenderContext.SetMapMode(MapUnit::MapPixel); @@ -482,7 +482,7 @@ void SvxSwFrameExample::Paint(vcl::RenderContext& rRenderContext, const Rectangl DrawRect_Impl(rRenderContext, aPage, m_aBgCol, m_aBorderCol); // Draw PrintArea - Rectangle aRect = DrawInnerFrame_Impl(rRenderContext, aPagePrtArea, m_aTransColor, m_aPrintAreaCol); + tools::Rectangle aRect = DrawInnerFrame_Impl(rRenderContext, aPagePrtArea, m_aTransColor, m_aPrintAreaCol); if (nAnchor == TextContentAnchorType_AT_FRAME) aRect = DrawInnerFrame_Impl(rRenderContext, aFrameAtFrame, m_aBgCol, m_aBorderCol); @@ -590,9 +590,9 @@ void SvxSwFrameExample::Paint(vcl::RenderContext& rRenderContext, const Rectangl } } - Rectangle aFrmRect(Point(lXPos, lYPos), aFrmSize); + tools::Rectangle aFrmRect(Point(lXPos, lYPos), aFrmSize); - Rectangle* pOuterFrame = &aPage; + tools::Rectangle* pOuterFrame = &aPage; if (nAnchor == TextContentAnchorType_AT_FRAME) pOuterFrame = &aFrameAtFrame; @@ -609,7 +609,7 @@ void SvxSwFrameExample::Paint(vcl::RenderContext& rRenderContext, const Rectangl // Draw Test paragraph const long nTxtLineHeight = aTextLine.GetHeight(); - Rectangle aTxt(aTextLine); + tools::Rectangle aTxt(aTextLine); sal_Int32 nStep; sal_uInt16 nLines; diff --git a/svx/source/engine3d/e3dsceneupdater.cxx b/svx/source/engine3d/e3dsceneupdater.cxx index 0db7d98613ba..a77e7badd5a6 100644 --- a/svx/source/engine3d/e3dsceneupdater.cxx +++ b/svx/source/engine3d/e3dsceneupdater.cxx @@ -99,7 +99,7 @@ E3DModifySceneSnapRectUpdater::~E3DModifySceneSnapRectUpdater() aSnapRange.transform(rVCScene.getObjectTransformation()); // snap to (old) integer - const Rectangle aNewSnapRect( + const tools::Rectangle aNewSnapRect( sal_Int32(floor(aSnapRange.getMinX())), sal_Int32(floor(aSnapRange.getMinY())), sal_Int32(ceil(aSnapRange.getMaxX())), sal_Int32(ceil(aSnapRange.getMaxY()))); diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx index da26db574f64..959a39d9e67c 100644 --- a/svx/source/engine3d/obj3d.cxx +++ b/svx/source/engine3d/obj3d.cxx @@ -384,7 +384,7 @@ void E3dObject::NbcMove(const Size& rSize) if(pScene) { //Dimensions of the scene in 3D and 2D for comparison - Rectangle aRect = pScene->GetSnapRect(); + tools::Rectangle aRect = pScene->GetSnapRect(); basegfx::B3DHomMatrix aInvDispTransform; if(GetParentObj()) @@ -435,7 +435,7 @@ SdrObjList* E3dObject::GetSubList() const void E3dObject::RecalcSnapRect() { - maSnapRect = Rectangle(); + maSnapRect = tools::Rectangle(); for(size_t a = 0; a < maSubList.GetObjCount(); ++a) { @@ -652,7 +652,7 @@ void E3dObject::SetTransform(const basegfx::B3DHomMatrix& rMatrix) NbcSetTransform(rMatrix); SetChanged(); BroadcastObjectChange(); - if (pUserCall != nullptr) pUserCall->Changed(*this, SdrUserCallType::Resize, Rectangle()); + if (pUserCall != nullptr) pUserCall->Changed(*this, SdrUserCallType::Resize, tools::Rectangle()); } } @@ -890,7 +890,7 @@ void E3dCompoundObject::RecalcSnapRect() const uno::Sequence< beans::PropertyValue > aEmptyParameters; drawinglayer::geometry::ViewInformation3D aViewInfo3D(aEmptyParameters); E3dScene* pRootScene = fillViewInformation3DForCompoundObject(aViewInfo3D, *this); - maSnapRect = Rectangle(); + maSnapRect = tools::Rectangle(); if(pRootScene) { @@ -920,7 +920,7 @@ void E3dCompoundObject::RecalcSnapRect() aSnapRange.transform(rVCScene.getObjectTransformation()); // snap to integer - maSnapRect = Rectangle( + maSnapRect = tools::Rectangle( sal_Int32(floor(aSnapRange.getMinX())), sal_Int32(floor(aSnapRange.getMinY())), sal_Int32(ceil(aSnapRange.getMaxX())), sal_Int32(ceil(aSnapRange.getMaxY()))); } diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx index 609e3dd13991..93d005e663b9 100644 --- a/svx/source/engine3d/scene3d.cxx +++ b/svx/source/engine3d/scene3d.cxx @@ -201,8 +201,8 @@ void E3dScene::SetDefaultAttributes(E3dDefaultAttributes& /*rDefault*/) // Set defaults aCamera.SetViewWindow(-2, -2, 4, 4); aCameraSet.SetDeviceRectangle(-2, 2, -2, 2); - aCamera.SetDeviceWindow(Rectangle(0, 0, 10, 10)); - Rectangle aRect(0, 0, 10, 10); + aCamera.SetDeviceWindow(tools::Rectangle(0, 0, 10, 10)); + tools::Rectangle aRect(0, 0, 10, 10); aCameraSet.SetViewportRectangle(aRect); // set defaults for Camera from ItemPool @@ -287,19 +287,19 @@ void E3dScene::SetBoundRectDirty() } } -void E3dScene::NbcSetSnapRect(const Rectangle& rRect) +void E3dScene::NbcSetSnapRect(const tools::Rectangle& rRect) { SetRectsDirty(); E3dObject::NbcSetSnapRect(rRect); aCamera.SetDeviceWindow(rRect); - aCameraSet.SetViewportRectangle((Rectangle&)rRect); + aCameraSet.SetViewportRectangle((tools::Rectangle&)rRect); ImpCleanup3DDepthMapper(); } void E3dScene::NbcMove(const Size& rSize) { - Rectangle aNewSnapRect = GetSnapRect(); + tools::Rectangle aNewSnapRect = GetSnapRect(); MoveRect(aNewSnapRect, rSize); NbcSetSnapRect(aNewSnapRect); } @@ -307,7 +307,7 @@ void E3dScene::NbcMove(const Size& rSize) void E3dScene::NbcResize(const Point& rRef, const Fraction& rXFact, const Fraction& rYFact) { - Rectangle aNewSnapRect = GetSnapRect(); + tools::Rectangle aNewSnapRect = GetSnapRect(); ResizeRect(aNewSnapRect, rRef, rXFact, rYFact); NbcSetSnapRect(aNewSnapRect); } @@ -336,7 +336,7 @@ void E3dScene::SetCamera(const Camera3D& rNewCamera) // Set perspective GetCameraSet().SetPerspective(aCamera.GetProjection() == ProjectionType::Perspective); - GetCameraSet().SetViewportRectangle((Rectangle&)aCamera.GetDeviceWindow()); + GetCameraSet().SetViewportRectangle((tools::Rectangle&)aCamera.GetDeviceWindow()); ImpCleanup3DDepthMapper(); } @@ -662,7 +662,7 @@ basegfx::B2DPolyPolygon E3dScene::TakeCreatePoly(const SdrDragStat& /*rDrag*/) c bool E3dScene::BegCreate(SdrDragStat& rStat) { rStat.SetOrtho4Possible(); - Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); + tools::Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); aRect1.Justify(); rStat.SetActionRect(aRect1); NbcSetSnapRect(aRect1); @@ -671,7 +671,7 @@ bool E3dScene::BegCreate(SdrDragStat& rStat) bool E3dScene::MovCreate(SdrDragStat& rStat) { - Rectangle aRect1; + tools::Rectangle aRect1; rStat.TakeCreateRect(aRect1); aRect1.Justify(); rStat.SetActionRect(aRect1); @@ -683,7 +683,7 @@ bool E3dScene::MovCreate(SdrDragStat& rStat) bool E3dScene::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) { - Rectangle aRect1; + tools::Rectangle aRect1; rStat.TakeCreateRect(aRect1); aRect1.Justify(); NbcSetSnapRect(aRect1); diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx index df28c3c5ba56..a2b0af5f3261 100644 --- a/svx/source/engine3d/view3d.cxx +++ b/svx/source/engine3d/view3d.cxx @@ -365,7 +365,7 @@ SdrModel* E3dView::GetMarkedObjModel() const } SdrModel* pNewModel = nullptr; - Rectangle aSelectedSnapRect; + tools::Rectangle aSelectedSnapRect; // set 3d selection flags at all directly selected objects // and collect SnapRect of selected objects @@ -470,7 +470,7 @@ bool E3dView::Paste( const size_t nObjCount(pSrcPg->GetObjCount()); // calculate offset for paste - Rectangle aR = pSrcPg->GetAllObjBoundRect(); + tools::Rectangle aR = pSrcPg->GetAllObjBoundRect(); Point aDist(aPos - aR.Center()); // Insert sub-objects for scenes @@ -842,7 +842,7 @@ void E3dView::ConvertMarkedObjTo3D(bool bExtrude, const basegfx::B2DPoint& rPnt1 E3dScene* pScene = new E3dPolyScene(Get3DDefaultAttributes()); // Determine rectangle and possibly correct it - Rectangle aRect = GetAllMarkedRect(); + tools::Rectangle aRect = GetAllMarkedRect(); if(aRect.GetWidth() <= 1) aRect.SetSize(Size(500, aRect.GetHeight())); if(aRect.GetHeight() <= 1) @@ -898,7 +898,7 @@ void E3dView::ConvertMarkedObjTo3D(bool bExtrude, const basegfx::B2DPoint& rPnt1 { SdrMark* pMark = GetSdrMarkByIndex(a); SdrObject* pObj = pMark->GetMarkedSdrObj(); - Rectangle aTurnRect = pObj->GetSnapRect(); + tools::Rectangle aTurnRect = pObj->GetSnapRect(); basegfx::B2DPoint aRot; Point aRotPnt; @@ -907,28 +907,28 @@ void E3dView::ConvertMarkedObjTo3D(bool bExtrude, const basegfx::B2DPoint& rPnt1 aRot.setX(-aRot.getX()); aRot *= aInvLatheMat; aRotPnt = Point((long)(aRot.getX() + 0.5), (long)(-aRot.getY() - 0.5)); - aRect.Union(Rectangle(aRotPnt, aRotPnt)); + aRect.Union(tools::Rectangle(aRotPnt, aRotPnt)); aRot = basegfx::B2DPoint(aTurnRect.Left(), -aTurnRect.Bottom()); aRot *= aLatheMat; aRot.setX(-aRot.getX()); aRot *= aInvLatheMat; aRotPnt = Point((long)(aRot.getX() + 0.5), (long)(-aRot.getY() - 0.5)); - aRect.Union(Rectangle(aRotPnt, aRotPnt)); + aRect.Union(tools::Rectangle(aRotPnt, aRotPnt)); aRot = basegfx::B2DPoint(aTurnRect.Right(), -aTurnRect.Top()); aRot *= aLatheMat; aRot.setX(-aRot.getX()); aRot *= aInvLatheMat; aRotPnt = Point((long)(aRot.getX() + 0.5), (long)(-aRot.getY() - 0.5)); - aRect.Union(Rectangle(aRotPnt, aRotPnt)); + aRect.Union(tools::Rectangle(aRotPnt, aRotPnt)); aRot = basegfx::B2DPoint(aTurnRect.Right(), -aTurnRect.Bottom()); aRot *= aLatheMat; aRot.setX(-aRot.getX()); aRot *= aInvLatheMat; aRotPnt = Point((long)(aRot.getX() + 0.5), (long)(-aRot.getY() - 0.5)); - aRect.Union(Rectangle(aRotPnt, aRotPnt)); + aRect.Union(tools::Rectangle(aRotPnt, aRotPnt)); } } @@ -1301,7 +1301,7 @@ E3dScene* E3dView::SetCurrent3DObj(E3dObject* p3DObj) double fW(aVolume.getWidth()); double fH(aVolume.getHeight()); - Rectangle aRect(0,0, (long) fW, (long) fH); + tools::Rectangle aRect(0,0, (long) fW, (long) fH); pScene = new E3dPolyScene(Get3DDefaultAttributes()); @@ -1472,7 +1472,7 @@ void E3dView::End3DCreation(bool bUseDefaultValuesForMirrorAxes) { if(bUseDefaultValuesForMirrorAxes) { - Rectangle aRect = GetAllMarkedRect(); + tools::Rectangle aRect = GetAllMarkedRect(); if(aRect.GetWidth() <= 1) aRect.SetSize(Size(500, aRect.GetHeight())); if(aRect.GetHeight() <= 1) diff --git a/svx/source/engine3d/viewpt3d2.cxx b/svx/source/engine3d/viewpt3d2.cxx index 7c8a73cec03c..9a0769a953bd 100644 --- a/svx/source/engine3d/viewpt3d2.cxx +++ b/svx/source/engine3d/viewpt3d2.cxx @@ -118,7 +118,7 @@ const basegfx::B3DPoint& Viewport3D::GetViewPoint() return aViewPoint; } -void Viewport3D::SetDeviceWindow(const Rectangle& rRect) +void Viewport3D::SetDeviceWindow(const tools::Rectangle& rRect) { long nNewW = rRect.GetWidth(); long nNewH = rRect.GetHeight(); diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index 1c08880b0ef8..8a40701f5bea 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -180,7 +180,7 @@ void FmGridHeader::RequestHelp( const HelpEvent& rHEvt ) { if ( rHEvt.GetMode() & (HelpEventMode::QUICK | HelpEventMode::BALLOON) ) { - Rectangle aItemRect = GetItemRect( nItemId ); + tools::Rectangle aItemRect = GetItemRect( nItemId ); Point aPt = OutputToScreenPixel( aItemRect.TopLeft() ); aItemRect.Left() = aPt.X(); aItemRect.Top() = aPt.Y(); @@ -1058,7 +1058,7 @@ void FmGridControl::Command(const CommandEvent& _rEvt) { sal_uInt16 nSelId = GetColumnId( sal::static_int_cast< sal_uInt16 >( FirstSelectedColumn() ) ); - ::Rectangle aColRect( GetFieldRectPixel( 0, nSelId, false ) ); + ::tools::Rectangle aColRect( GetFieldRectPixel( 0, nSelId, false ) ); Point aRelativePos( pMyHeader->ScreenToOutputPixel( OutputToScreenPixel( aColRect.TopCenter() ) ) ); pMyHeader->triggerColumnContextMenu(aRelativePos); diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index 36b5bf9ee82e..3a8b87f7d5f5 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -1464,7 +1464,7 @@ void FmXGridPeer::propertyChange(const PropertyChangeEvent& evt) if (bWasEditing) pGrid->DeactivateCell(); - ::Rectangle aColRect = pGrid->GetFieldRect(nId); + ::tools::Rectangle aColRect = pGrid->GetFieldRect(nId); aColRect.Top() = 0; aColRect.Bottom() = pGrid->GetSizePixel().Height(); pGrid->Invalidate(aColRect); diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index a2a8960146dd..a6485c72fd0a 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -450,7 +450,7 @@ Reference< css::sdb::XColumn > DbGridColumn::GetCurrentFieldValue() const void DbGridColumn::Paint(OutputDevice& rDev, - const Rectangle& rRect, + const tools::Rectangle& rRect, const DbGridRow* pRow, const Reference< XNumberFormatter >& xFormatter) { @@ -951,7 +951,7 @@ void DbCellControl::AlignControl(sal_Int16 nAlignment) } -void DbCellControl::PaintCell( OutputDevice& _rDev, const Rectangle& _rRect ) +void DbCellControl::PaintCell( OutputDevice& _rDev, const tools::Rectangle& _rRect ) { if ( m_pPainter->GetParent() == &_rDev ) { @@ -978,7 +978,7 @@ void DbCellControl::PaintCell( OutputDevice& _rDev, const Rectangle& _rRect ) } -void DbCellControl::PaintFieldToCell( OutputDevice& _rDev, const Rectangle& _rRect, const Reference< XColumn >& _rxField, const Reference< XNumberFormatter >& _rxFormatter ) +void DbCellControl::PaintFieldToCell( OutputDevice& _rDev, const tools::Rectangle& _rRect, const Reference< XColumn >& _rxField, const Reference< XNumberFormatter >& _rxFormatter ) { m_pPainter->SetText( GetFormatText( _rxField, _rxFormatter ) ); PaintCell( _rDev, _rRect ); @@ -1141,7 +1141,7 @@ CellControllerRef DbTextField::CreateController() const } -void DbTextField::PaintFieldToCell( OutputDevice& _rDev, const Rectangle& _rRect, const Reference< XColumn >& _rxField, const Reference< XNumberFormatter >& _rxFormatter ) +void DbTextField::PaintFieldToCell( OutputDevice& _rDev, const tools::Rectangle& _rRect, const Reference< XColumn >& _rxField, const Reference< XNumberFormatter >& _rxFormatter ) { if ( m_pPainterImplementation ) m_pPainterImplementation->SetText( GetFormatText( _rxField, _rxFormatter ) ); @@ -1680,7 +1680,7 @@ void DbCheckBox::UpdateFromField(const Reference< css::sdb::XColumn >& _rxField, } -void DbCheckBox::PaintFieldToCell(OutputDevice& rDev, const Rectangle& rRect, +void DbCheckBox::PaintFieldToCell(OutputDevice& rDev, const tools::Rectangle& rRect, const Reference< css::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& xFormatter) { @@ -2677,7 +2677,7 @@ DbFilterField::~DbFilterField() } -void DbFilterField::PaintCell(OutputDevice& rDev, const Rectangle& rRect) +void DbFilterField::PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect) { static const DrawTextFlags nStyle = DrawTextFlags::Clip | DrawTextFlags::VCenter | DrawTextFlags::Left; switch (m_nControlClass) @@ -3486,7 +3486,7 @@ void FmXGridCell::onWindowEvent( const VclEventId _nEventId, const vcl::Window& } -void FmXDataCell::PaintFieldToCell(OutputDevice& rDev, const Rectangle& rRect, +void FmXDataCell::PaintFieldToCell(OutputDevice& rDev, const tools::Rectangle& rRect, const Reference< css::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& xFormatter) { @@ -3510,7 +3510,7 @@ FmXTextCell::FmXTextCell( DbGridColumn* pColumn, DbCellControl& _rControl ) void FmXTextCell::PaintFieldToCell(OutputDevice& rDev, - const Rectangle& rRect, + const tools::Rectangle& rRect, const Reference< css::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& xFormatter) { @@ -4563,7 +4563,7 @@ const Sequence<sal_Int8>& FmXFilterCell::getUnoTunnelId() } -void FmXFilterCell::PaintCell( OutputDevice& rDev, const Rectangle& rRect ) +void FmXFilterCell::PaintCell( OutputDevice& rDev, const tools::Rectangle& rRect ) { static_cast< DbFilterField* >( m_pCellControl )->PaintCell( rDev, rRect ); } diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index e04a5499c314..0dc400b43024 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -424,7 +424,7 @@ sal_uInt16 DbGridControl::NavigationBar::ArrangeControls() { // positioning of the controls // calculate base size - Rectangle aRect(static_cast<DbGridControl*>(GetParent())->GetControlArea()); + tools::Rectangle aRect(static_cast<DbGridControl*>(GetParent())->GetControlArea()); long nH = aRect.GetSize().Height(); long nW = GetParent()->GetOutputSizePixel().Width(); Size aBorder = LogicToPixel(Size(2, 2),MapUnit::MapAppFont); @@ -770,7 +770,7 @@ void DbGridControl::NavigationBar::Resize() ArrangeControls(); } -void DbGridControl::NavigationBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void DbGridControl::NavigationBar::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { Control::Paint(rRenderContext, rRect); Point aAbsolutePos = m_aAbsolute->GetPosPixel(); @@ -1198,7 +1198,7 @@ void DbGridControl::ArrangeControls(sal_uInt16& nX, sal_uInt16 nY) // positioning of the controls if (m_bNavigationBar) { - Rectangle aRect(GetControlArea()); + tools::Rectangle aRect(GetControlArea()); m_aBar->SetPosSizePixel(Point(0, nY + 1), Size(aRect.GetSize().Width(), aRect.GetSize().Height() - 1)); nX = m_aBar->ArrangeControls(); } @@ -2034,7 +2034,7 @@ svt::EditBrowseBox::RowStatus DbGridControl::GetRowStatus(long nRow) const return EditBrowseBox::CLEAN; } -void DbGridControl::PaintCell(OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId) const +void DbGridControl::PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId) const { if (!IsValid(m_xPaintRow)) return; @@ -2043,7 +2043,7 @@ void DbGridControl::PaintCell(OutputDevice& rDev, const Rectangle& rRect, sal_uI DbGridColumn* pColumn = (Location < m_aColumns.size() ) ? m_aColumns[ Location ] : nullptr; if (pColumn) { - Rectangle aArea(rRect); + tools::Rectangle aArea(rRect); if ((GetMode() & BrowserMode::CURSOR_WO_FOCUS) == BrowserMode::CURSOR_WO_FOCUS) { aArea.Top() += 1; @@ -2850,7 +2850,7 @@ void DbGridControl::Command(const CommandEvent& rEvt) { long nRow = FirstSelectedRow( ); - ::Rectangle aRowRect( GetRowRectPixel( nRow ) ); + ::tools::Rectangle aRowRect( GetRowRectPixel( nRow ) ); executeRowContextMenu( nRow, aRowRect.LeftCenter() ); // handled diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index 374324049f97..965b2c0069fe 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -988,7 +988,7 @@ void FmFilterItemsString::Paint(const Point& rPos, SvTreeListBox& rDev, vcl::Ren rRenderContext.Push(PushFlags::LINECOLOR); rRenderContext.SetLineColor(rRenderContext.GetTextColor()); - Rectangle aRect(rPos, GetSize(&rDev, &rEntry)); + tools::Rectangle aRect(rPos, GetSize(&rDev, &rEntry)); Point aFirst(rPos.X(), aRect.Bottom() - 6); Point aSecond(aFirst .X() + 2, aFirst.Y() + 3); diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx index ed0da03cfac7..bc700454abd2 100644 --- a/svx/source/form/fmpage.cxx +++ b/svx/source/form/fmpage.cxx @@ -198,7 +198,7 @@ bool FmFormPage::RequestHelp( vcl::Window* pWindow, SdrView* pView, if ( !aHelpText.isEmpty() ) { // Hilfe anzeigen - Rectangle aItemRect = pObj->GetCurrentBoundRect(); + tools::Rectangle aItemRect = pObj->GetCurrentBoundRect(); aItemRect = pWindow->LogicToPixel( aItemRect ); Point aPt = pWindow->OutputToScreenPixel( aItemRect.TopLeft() ); aItemRect.Left() = aPt.X(); diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx index 8d8f7200d6f8..d6da352e106f 100644 --- a/svx/source/form/fmvwimp.cxx +++ b/svx/source/form/fmvwimp.cxx @@ -255,7 +255,7 @@ void SAL_CALL FormViewPageWindowAdapter::makeVisible( const Reference< XControl if ( xWindow.is() && m_pViewImpl->getView() && m_pWindow ) { awt::Rectangle aRect = xWindow->getPosSize(); - ::Rectangle aNewRect( aRect.X, aRect.Y, aRect.X + aRect.Width, aRect.Y + aRect.Height ); + ::tools::Rectangle aNewRect( aRect.X, aRect.Y, aRect.X + aRect.Width, aRect.Y + aRect.Height ); aNewRect = m_pWindow->PixelToLogic( aNewRect ); m_pViewImpl->getView()->MakeVisible( aNewRect, *m_pWindow ); } @@ -1005,7 +1005,7 @@ IMPL_LINK_NOARG(FmXFormView, OnAutoFocus, void*, void) if ( pCurrentWindow ) { awt::Rectangle aRect = xControlWindow->getPosSize(); - ::Rectangle aNonUnoRect( aRect.X, aRect.Y, aRect.X + aRect.Width, aRect.Y + aRect.Height ); + ::tools::Rectangle aNonUnoRect( aRect.X, aRect.Y, aRect.X + aRect.Width, aRect.Y + aRect.Height ); m_pView->MakeVisible( pCurrentWindow->PixelToLogic( aNonUnoRect ), *const_cast< vcl::Window* >( pCurrentWindow ) ); } } @@ -1490,7 +1490,7 @@ SdrObject* FmXFormView::implCreateXFormsControl( const svx::OXFormsDescriptor &_ controlSize.Width() = Fraction(controlSize.Width(), 1) * eTargetMode.GetScaleX(); controlSize.Height() = Fraction(controlSize.Height(), 1) * eTargetMode.GetScaleY(); ::Point controlPos( OutputDevice::LogicToLogic( ::Point( controlSize.Width(), 0 ), eSourceMode, eTargetMode ) ); - ::Rectangle controlRect( controlPos, OutputDevice::LogicToLogic( controlSize, eSourceMode, eTargetMode ) ); + ::tools::Rectangle controlRect( controlPos, OutputDevice::LogicToLogic( controlSize, eSourceMode, eTargetMode ) ); pControl->SetLogicRect(controlRect); // set the button label @@ -1608,7 +1608,7 @@ bool FmXFormView::createControlLabelPair( OutputDevice& _rOutDev, sal_Int32 _nXO xLabelModel->setPropertyValue(FM_PROP_NAME, makeAny(sObjectLabel)); } - pLabel->SetLogicRect( ::Rectangle( + pLabel->SetLogicRect( ::tools::Rectangle( OutputDevice::LogicToLogic( ::Point( _nXOffsetMM, _nYOffsetMM ), eSourceMode, eTargetMode ), OutputDevice::LogicToLogic( aRealSize, eSourceMode, eTargetMode ) ) ); @@ -1647,7 +1647,7 @@ bool FmXFormView::createControlLabelPair( OutputDevice& _rOutDev, sal_Int32 _nXO aControlSize.Width() = long(Fraction(aControlSize.Width(), 1) * eTargetMode.GetScaleX()); aControlSize.Height() = long(Fraction(aControlSize.Height(), 1) * eTargetMode.GetScaleY()); - pControl->SetLogicRect( ::Rectangle( + pControl->SetLogicRect( ::tools::Rectangle( OutputDevice::LogicToLogic( ::Point( aRealSize.Width() + _nXOffsetMM, _nYOffsetMM ), eSourceMode, eTargetMode ), OutputDevice::LogicToLogic( aControlSize, eSourceMode, eTargetMode ) ) ); diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx index b86d281fc42e..d4aeebd3c530 100644 --- a/svx/source/form/formcontrolfactory.cxx +++ b/svx/source/form/formcontrolfactory.cxx @@ -128,7 +128,7 @@ namespace svxform void FormControlFactory::initializeControlModel( const DocumentType _eDocType, const Reference< XPropertySet >& _rxControlModel ) { initializeControlModel( - _eDocType, _rxControlModel, Rectangle() + _eDocType, _rxControlModel, tools::Rectangle() ); } @@ -381,7 +381,7 @@ namespace svxform sal_Int16 FormControlFactory::initializeControlModel( const DocumentType _eDocType, const Reference< XPropertySet >& _rxControlModel, - const Rectangle& _rControlBoundRect ) + const tools::Rectangle& _rControlBoundRect ) { sal_Int16 nClassId = FormComponentType::CONTROL; diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx index 648b1c3d4344..3ff0d2000906 100644 --- a/svx/source/form/navigatortree.cxx +++ b/svx/source/form/navigatortree.cxx @@ -2077,7 +2077,7 @@ namespace svxform } } // while ( aIter.IsMore() ) // make the mark visible - ::Rectangle aMarkRect( pFormView->GetAllMarkedRect()); + ::tools::Rectangle aMarkRect( pFormView->GetAllMarkedRect()); for ( sal_uInt32 i = 0; i < pFormView->PaintWindowCount(); ++i ) { SdrPaintWindow* pPaintWindow = pFormView->GetPaintWindow( i ); @@ -2145,7 +2145,7 @@ namespace svxform if ( bPaint ) { // make the mark visible - ::Rectangle aMarkRect( pFormView->GetAllMarkedRect()); + ::tools::Rectangle aMarkRect( pFormView->GetAllMarkedRect()); for ( sal_uInt32 i = 0; i < pFormView->PaintWindowCount(); ++i ) { SdrPaintWindow* pPaintWindow = pFormView->GetPaintWindow( i ); diff --git a/svx/source/gallery2/GalleryControl.cxx b/svx/source/gallery2/GalleryControl.cxx index 80822893f9f0..0857cdb57431 100644 --- a/svx/source/gallery2/GalleryControl.cxx +++ b/svx/source/gallery2/GalleryControl.cxx @@ -146,7 +146,7 @@ void GalleryControl::Resize() Size( nSplitSize, aNewSize.Height() ) ); mpSplitter->SetDragRectPixel( - Rectangle( + tools::Rectangle( Point( nFrameLen2, 0 ), Size( aNewSize.Width() - ( nFrameLen2 << 1 ) - nSplitSize, aNewSize.Height() ) ) ); @@ -165,7 +165,7 @@ void GalleryControl::Resize() Size( aNewSize.Width(), nSplitSize ) ); mpSplitter->SetDragRectPixel( - Rectangle( + tools::Rectangle( Point( 0, nFrameLen2 ), Size( aNewSize.Width(), aNewSize.Height() - ( nFrameLen2 << 1 ) - nSplitSize ) )); diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 7201c6e21698..04c76bc2fbbd 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -591,7 +591,7 @@ IMPL_LINK_NOARG(GalleryBrowser1, ShowContextMenuHdl, void*, void) aMenu->SetSelectHdl( LINK( this, GalleryBrowser1, PopupMenuHdl ) ); aMenu->RemoveDisabledEntries(); - const Rectangle aThemesRect( mpThemes->GetPosPixel(), mpThemes->GetOutputSizePixel() ); + const tools::Rectangle aThemesRect( mpThemes->GetPosPixel(), mpThemes->GetOutputSizePixel() ); Point aSelPos( mpThemes->GetBoundingRectangle( mpThemes->GetSelectEntryPos() ).Center() ); aSelPos.X() = std::max( std::min( aSelPos.X(), aThemesRect.Right() ), aThemesRect.Left() ); diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx index f7f9edbdcde2..6260869d827b 100644 --- a/svx/source/gallery2/galctrl.cxx +++ b/svx/source/gallery2/galctrl.cxx @@ -91,7 +91,7 @@ void GalleryPreview::DataChanged( const DataChangedEvent& rDCEvt ) Window::DataChanged( rDCEvt ); } -bool GalleryPreview::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const +bool GalleryPreview::ImplGetGraphicCenterRect( const Graphic& rGraphic, tools::Rectangle& rResultRect ) const { const Size aWinSize( GetOutputSizePixel() ); Size aNewSize( LogicToPixel( rGraphic.GetPrefSize(), rGraphic.GetPrefMapMode() ) ); @@ -117,14 +117,14 @@ bool GalleryPreview::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangl const Point aNewPos( ( aWinSize.Width() - aNewSize.Width() ) >> 1, ( aWinSize.Height() - aNewSize.Height() ) >> 1 ); - rResultRect = Rectangle( aNewPos, aNewSize ); + rResultRect = tools::Rectangle( aNewPos, aNewSize ); bRet = true; } return bRet; } -void GalleryPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void GalleryPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { Window::Paint(rRenderContext, rRect); @@ -297,7 +297,7 @@ void GalleryIconView::UserDraw(const UserDrawEvent& rUDEvt) if (nId && mpTheme) { - const Rectangle& rRect = rUDEvt.GetRect(); + const tools::Rectangle& rRect = rUDEvt.GetRect(); const Size aSize(rRect.GetWidth(), rRect.GetHeight()); BitmapEx aBitmapEx; Size aPreparedSize; @@ -451,10 +451,10 @@ OUString GalleryListView::GetCellText(long _nRow, sal_uInt16 /*nColumnId*/) cons return sRet; } -Rectangle GalleryListView::GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) +tools::Rectangle GalleryListView::GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) { DBG_ASSERT(_nColumnPos >= 0 && _nColumnPos <= USHRT_MAX, "GalleryListView::GetFieldCharacterBounds: _nColumnId overflow"); - Rectangle aRect; + tools::Rectangle aRect; if ( SeekRow(_nRow) ) { SvxFont aFont( GetFont() ); @@ -481,7 +481,7 @@ sal_Int32 GalleryListView::GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColu return nRet; } -void GalleryListView::PaintField(vcl::RenderContext& rDev, const Rectangle& rRect, sal_uInt16 /*nColumnId*/) const +void GalleryListView::PaintField(vcl::RenderContext& rDev, const tools::Rectangle& rRect, sal_uInt16 /*nColumnId*/) const { rDev.Push( PushFlags::CLIPREGION ); rDev.IntersectClipRegion( rRect ); diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx index a24c0fa7eba9..10bc1b9e21cd 100644 --- a/svx/source/gallery2/galobj.cxx +++ b/svx/source/gallery2/galobj.cxx @@ -478,7 +478,7 @@ bool SgaObjectSvDraw::CreateThumb( const FmFormModel& rModel ) if(pPage) { - const Rectangle aObjRect(pPage->GetAllObjBoundRect()); + const tools::Rectangle aObjRect(pPage->GetAllObjBoundRect()); if(aObjRect.GetWidth() && aObjRect.GetHeight()) { diff --git a/svx/source/inc/GraphCtlAccessibleContext.hxx b/svx/source/inc/GraphCtlAccessibleContext.hxx index 4ccc2221d0ae..3b5e142caaf9 100644 --- a/svx/source/inc/GraphCtlAccessibleContext.hxx +++ b/svx/source/inc/GraphCtlAccessibleContext.hxx @@ -55,7 +55,7 @@ namespace com { namespace sun { namespace star { namespace awt { class XFocusListener; } } } } -class Rectangle; +namespace tools { class Rectangle; } class GraphCtrl; class SdrObject; class SdrModel; @@ -151,7 +151,7 @@ public: virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) override; // IAccessibleViewforwarder - virtual Rectangle GetVisibleArea() const override; + virtual tools::Rectangle GetVisibleArea() const override; virtual Point LogicToPixel (const Point& rPoint) const override; virtual Size LogicToPixel (const Size& rSize) const override; @@ -177,12 +177,12 @@ protected: When the object is already disposed then a <type>DisposedException</type> is thrown. */ - Rectangle GetBoundingBoxOnScreen(); + tools::Rectangle GetBoundingBoxOnScreen(); /// Return the object's current bounding box relative to the parent object. /// /// @throws css::uno::RuntimeException - Rectangle GetBoundingBox(); + tools::Rectangle GetBoundingBox(); virtual void SAL_CALL disposing() final override; diff --git a/svx/source/inc/charmapacc.hxx b/svx/source/inc/charmapacc.hxx index afc9181fec91..6783b5504752 100644 --- a/svx/source/inc/charmapacc.hxx +++ b/svx/source/inc/charmapacc.hxx @@ -100,7 +100,7 @@ namespace svx SvxShowCharSet& mrParent; sal_uInt16 mnId; OUString maText; - Rectangle maRect; + tools::Rectangle maRect; rtl::Reference<SvxShowCharSetItemAcc> m_xItem; SvxShowCharSetAcc* m_pParent; diff --git a/svx/source/inc/formcontrolfactory.hxx b/svx/source/inc/formcontrolfactory.hxx index 020a457a50c2..0f21051f2da6 100644 --- a/svx/source/inc/formcontrolfactory.hxx +++ b/svx/source/inc/formcontrolfactory.hxx @@ -33,7 +33,7 @@ #include <memory> class SdrUnoObj; -class Rectangle; +namespace tools { class Rectangle; } namespace comphelper { class ComponentContext; @@ -66,7 +66,7 @@ namespace svxform sal_Int16 initializeControlModel( const DocumentType _eDocType, const css::uno::Reference< css::beans::XPropertySet >& _rxControlModel, - const Rectangle& _rControlBoundRect + const tools::Rectangle& _rControlBoundRect ); sal_Int16 initializeControlModel( const DocumentType _eDocType, const SdrUnoObj& _rObject ); diff --git a/svx/source/inc/frmselimpl.hxx b/svx/source/inc/frmselimpl.hxx index 0bb1e12b17ae..736a81dd2644 100644 --- a/svx/source/inc/frmselimpl.hxx +++ b/svx/source/inc/frmselimpl.hxx @@ -69,9 +69,9 @@ public: void MergeFocusToPolyPolygon( tools::PolyPolygon& rPPoly ) const; void ClearClickArea() { maClickArea.Clear(); } - void AddClickRect( const Rectangle& rRect ); + void AddClickRect( const tools::Rectangle& rRect ); bool ContainsClickPoint( const Point& rPos ) const; - Rectangle GetClickBoundRect() const; + tools::Rectangle GetClickBoundRect() const; void SetKeyboardNeighbors(FrameBorderType eLeft, FrameBorderType eRight, FrameBorderType eTop, FrameBorderType eBottom); diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx index 418719bccc7c..69993985f1da 100644 --- a/svx/source/inc/gridcell.hxx +++ b/svx/source/inc/gridcell.hxx @@ -140,7 +140,7 @@ public: // Zeichnen eines Feldes an einer Position, ist ein View gesetzt // uebernimmt dieser das Zeichnen, z.B. fuer CheckBoxen void Paint(OutputDevice& rDev, - const Rectangle& rRect, + const tools::Rectangle& rRect, const DbGridRow* pRow, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter); @@ -292,8 +292,8 @@ public: virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) = 0; // Painten eines Zellinhalts im vorgegeben Rechteck - virtual void PaintFieldToCell( OutputDevice& rDev, const Rectangle& rRect, const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter); - virtual void PaintCell( OutputDevice& _rDev, const Rectangle& _rRect ); + virtual void PaintFieldToCell( OutputDevice& rDev, const tools::Rectangle& rRect, const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter); + virtual void PaintCell( OutputDevice& _rDev, const tools::Rectangle& _rRect ); void ImplInitWindow( vcl::Window& rParent, const InitWindowFacet _eInitWhat ); @@ -397,7 +397,7 @@ public: virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override; virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override; virtual ::svt::CellControllerRef CreateController() const override; - virtual void PaintFieldToCell( OutputDevice& _rDev, const Rectangle& _rRect, + virtual void PaintFieldToCell( OutputDevice& _rDev, const tools::Rectangle& _rRect, const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& _rxFormatter ) override; @@ -445,7 +445,7 @@ public: virtual void Init( vcl::Window& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override; virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override; virtual ::svt::CellControllerRef CreateController() const override; - virtual void PaintFieldToCell(OutputDevice& rDev, const Rectangle& rRect, + virtual void PaintFieldToCell(OutputDevice& rDev, const tools::Rectangle& rRect, const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override; virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override; @@ -676,7 +676,7 @@ public: virtual void Init( vcl::Window& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override; virtual ::svt::CellControllerRef CreateController() const override; - virtual void PaintCell(OutputDevice& rDev, const Rectangle& rRect) override; + virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect) override; virtual void Update() override; virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override; virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override; @@ -813,7 +813,7 @@ public: } virtual void PaintFieldToCell(OutputDevice& rDev, - const Rectangle& rRect, + const tools::Rectangle& rRect, const css::uno::Reference< css::sdb::XColumn >& xField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter); @@ -848,7 +848,7 @@ public: FmXTextCell( DbGridColumn* pColumn, DbCellControl& _rControl ); virtual void PaintFieldToCell(OutputDevice& rDev, - const Rectangle& rRect, + const tools::Rectangle& rRect, const css::uno::Reference< css::sdb::XColumn >& xField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override; @@ -1085,7 +1085,7 @@ public: static const css::uno::Sequence<sal_Int8>& getUnoTunnelId(); // painting the filter text - void PaintCell(OutputDevice& rDev, const Rectangle& rRect); + void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect); void Update(){m_pCellControl->Update();} // OComponentHelper diff --git a/svx/source/inc/svxpixelctlaccessiblecontext.hxx b/svx/source/inc/svxpixelctlaccessiblecontext.hxx index 76d626de9d09..827fab99a0b2 100644 --- a/svx/source/inc/svxpixelctlaccessiblecontext.hxx +++ b/svx/source/inc/svxpixelctlaccessiblecontext.hxx @@ -69,14 +69,14 @@ class SvxPixelCtlAccessibleChild : SvxPixelCtl& mrParentWindow; css::uno::Reference< css::accessibility::XAccessible > mxParent; bool m_bPixelColorOrBG;//Pixel Color Or BackGround Color - Rectangle* mpBoundingBox; + tools::Rectangle* mpBoundingBox; /// index of child in parent long mnIndexInParent; public: SvxPixelCtlAccessibleChild( SvxPixelCtl& rWindow, bool bPixelColorOrBG, - const Rectangle& rBounds, + const tools::Rectangle& rBounds, const css::uno::Reference< css::accessibility::XAccessible >& xParent, long nIndexInParent ); virtual ~SvxPixelCtlAccessibleChild() override; @@ -129,10 +129,10 @@ public: virtual void SAL_CALL disposing() override; /// @throws css::uno::RuntimeException - Rectangle GetBoundingBoxOnScreen(); + tools::Rectangle GetBoundingBoxOnScreen(); /// @throws css::uno::RuntimeException - Rectangle const & GetBoundingBox(); + tools::Rectangle const & GetBoundingBox(); /// @returns true if it's disposed or in disposing inline bool IsAlive() const; diff --git a/svx/source/inc/svxrectctaccessiblecontext.hxx b/svx/source/inc/svxrectctaccessiblecontext.hxx index 7238478c269d..1a71e781d2ef 100644 --- a/svx/source/inc/svxrectctaccessiblecontext.hxx +++ b/svx/source/inc/svxrectctaccessiblecontext.hxx @@ -53,7 +53,7 @@ namespace com { namespace sun { namespace star { namespace awt { class XFocusListener; } } } } -class Rectangle; +namespace tools { class Rectangle; } class SvxRectCtl; class SvxRectCtlChildAccessibleContext; namespace vcl { class Window; } @@ -222,12 +222,12 @@ protected: /// @Return the object's current bounding box relative to the desktop. /// /// @throws css::uno::RuntimeException - Rectangle GetBoundingBoxOnScreen(); + tools::Rectangle GetBoundingBoxOnScreen(); /// @Return the object's current bounding box relative to the parent object. /// /// @throws css::uno::RuntimeException - Rectangle GetBoundingBox(); + tools::Rectangle GetBoundingBox(); virtual void SAL_CALL disposing() override; @@ -286,7 +286,7 @@ public: const css::uno::Reference< css::accessibility::XAccessible>& rxParent, const vcl::Window& rParentWindow, const OUString& rName, const OUString& rDescription, - const Rectangle& rBoundingBox, + const tools::Rectangle& rBoundingBox, long nIndexInParent ); protected: virtual ~SvxRectCtlChildAccessibleContext() override; @@ -401,10 +401,10 @@ public: protected: /// @throws css::uno::RuntimeException - Rectangle GetBoundingBoxOnScreen(); + tools::Rectangle GetBoundingBoxOnScreen(); /// @throws css::uno::RuntimeException - Rectangle const & GetBoundingBox(); + tools::Rectangle const & GetBoundingBox(); void CommitChange( const css::accessibility::AccessibleEventObject& rEvent ); @@ -437,7 +437,7 @@ private: mxParent; /// Bounding box - Rectangle* mpBoundingBox; + tools::Rectangle* mpBoundingBox; /// window of parent const vcl::Window& mrParentWindow; diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx index 7720c5fa13d5..8643cfd30324 100644 --- a/svx/source/sdr/contact/objectcontactofpageview.cxx +++ b/svx/source/sdr/contact/objectcontactofpageview.cxx @@ -194,7 +194,7 @@ namespace sdr // OD 2009-03-05 #i99876# perform the same also for SW on printing. // fdo#78149 same thing also needed for plain MetaFile // export, so why not do it always - const Rectangle aLogicClipRectangle(rDisplayInfo.GetRedrawArea().GetBoundRect()); + const tools::Rectangle aLogicClipRectangle(rDisplayInfo.GetRedrawArea().GetBoundRect()); aViewRange = basegfx::B2DRange( aLogicClipRectangle.Left(), aLogicClipRectangle.Top(), @@ -209,7 +209,7 @@ namespace sdr if(!rDisplayInfo.GetRedrawArea().IsEmpty()) { // get logic clip range and create discrete one - const Rectangle aLogicClipRectangle(rDisplayInfo.GetRedrawArea().GetBoundRect()); + const tools::Rectangle aLogicClipRectangle(rDisplayInfo.GetRedrawArea().GetBoundRect()); basegfx::B2DRange aLogicClipRange( aLogicClipRectangle.Left(), aLogicClipRectangle.Top(), aLogicClipRectangle.Right(), aLogicClipRectangle.Bottom()); diff --git a/svx/source/sdr/contact/viewcontactofe3dscene.cxx b/svx/source/sdr/contact/viewcontactofe3dscene.cxx index 902cf3a0782b..18f99ccc0445 100644 --- a/svx/source/sdr/contact/viewcontactofe3dscene.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dscene.cxx @@ -245,7 +245,7 @@ void ViewContactOfE3dScene::createViewInformation3D(const basegfx::B3DRange& rCo void ViewContactOfE3dScene::createObjectTransformation() { // create 2d Object Transformation from relative point in 2d scene to world - Rectangle aRectangle = GetE3dScene().GetSnapRect(); + tools::Rectangle aRectangle = GetE3dScene().GetSnapRect(); // Hack for calc, transform position of object according // to current zoom so as objects relative position to grid // appears stable diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx index 89b763deb3ef..991a9b1667f8 100644 --- a/svx/source/sdr/contact/viewcontactofgraphic.cxx +++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx @@ -320,7 +320,7 @@ namespace sdr // take unrotated snap rect for position and size. Directly use model data, not getBoundRect() or getSnapRect() // which will use the primitive data we just create in the near future - Rectangle rRectangle = GetGrafObject().GetGeoRect(); + tools::Rectangle rRectangle = GetGrafObject().GetGeoRect(); // Hack for calc, transform position of object according // to current zoom so as objects relative position to grid // appears stable diff --git a/svx/source/sdr/contact/viewcontactofgroup.cxx b/svx/source/sdr/contact/viewcontactofgroup.cxx index 54d3b01511c3..19224da02d7b 100644 --- a/svx/source/sdr/contact/viewcontactofgroup.cxx +++ b/svx/source/sdr/contact/viewcontactofgroup.cxx @@ -71,7 +71,7 @@ namespace sdr else { // append an invisible outline for the cases where no visible content exists - Rectangle aCurrentBoundRect(GetSdrObjGroup().GetLastBoundRect()); + tools::Rectangle aCurrentBoundRect(GetSdrObjGroup().GetLastBoundRect()); // Hack for calc, transform position of object according // to current zoom so as objects relative position to grid // appears stable diff --git a/svx/source/sdr/contact/viewcontactofpageobj.cxx b/svx/source/sdr/contact/viewcontactofpageobj.cxx index 9ef99daf4ad4..9913b4d59391 100644 --- a/svx/source/sdr/contact/viewcontactofpageobj.cxx +++ b/svx/source/sdr/contact/viewcontactofpageobj.cxx @@ -69,7 +69,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfPageObj::createView // create graphical visualisation data. Since this is the view-independent version which should not be used, // create a replacement graphic visualisation here. Use GetLastBoundRect to access the model data directly // which is aOutRect for SdrPageObj. - const Rectangle aModelRectangle(GetPageObj().GetLastBoundRect()); + const tools::Rectangle aModelRectangle(GetPageObj().GetLastBoundRect()); const basegfx::B2DRange aModelRange(aModelRectangle.Left(), aModelRectangle.Top(), aModelRectangle.Right(), aModelRectangle.Bottom()); const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aModelRange)); const basegfx::BColor aYellow(1.0, 1.0, 0.0); diff --git a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx index cfe70426dac5..cc6f93b366b8 100644 --- a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx @@ -63,7 +63,7 @@ namespace sdr false)); // take unrotated snap rect (direct model data) for position and size - Rectangle rRectangle = rCaptionObj.GetGeoRect(); + tools::Rectangle rRectangle = rCaptionObj.GetGeoRect(); // Hack for calc, transform position of object according // to current zoom so as objects relative position to grid // appears stable diff --git a/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx index 7e595c16b02e..50bc75980a2f 100644 --- a/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx @@ -50,7 +50,7 @@ namespace sdr false)); // take unrotated snap rect (direct model data) for position and size - Rectangle aRectangle = GetCircObj().GetGeoRect(); + tools::Rectangle aRectangle = GetCircObj().GetGeoRect(); // Hack for calc, transform position of object according // to current zoom so as objects relative position to grid // appears stable diff --git a/svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx b/svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx index a7869c2a0fbd..47b55fd16ffc 100644 --- a/svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx @@ -100,7 +100,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrMediaObj::create { // create range using the model data directly. This is in SdrTextObj::aRect which i will access using // GetGeoRect() to not trigger any calculations. It's the unrotated geometry which is okay for MediaObjects ATM. - Rectangle aRectangle(GetSdrMediaObj().GetGeoRect()); + tools::Rectangle aRectangle(GetSdrMediaObj().GetGeoRect()); // Hack for calc, transform position of object according // to current zoom so as objects relative position to grid // appears stable diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx index 62f097b3cc70..f13dc1eafe42 100644 --- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx @@ -45,9 +45,9 @@ namespace sdr basegfx::B2DRange ViewContactOfSdrObjCustomShape::getCorrectedTextBoundRect() const { - Rectangle aObjectBound(GetCustomShapeObj().GetGeoRect()); + tools::Rectangle aObjectBound(GetCustomShapeObj().GetGeoRect()); aObjectBound += GetCustomShapeObj().GetGridOffset(); - Rectangle aTextBound(aObjectBound); + tools::Rectangle aTextBound(aObjectBound); GetCustomShapeObj().GetTextBounds(aTextBound); aTextBound += GetCustomShapeObj().GetGridOffset(); basegfx::B2DRange aTextRange(aTextBound.Left(), aTextBound.Top(), aTextBound.Right(), aTextBound.Bottom()); @@ -153,7 +153,7 @@ namespace sdr { // take unrotated snap rect as default, then get the // unrotated text box. Rotation needs to be done centered - Rectangle aObjectBound(GetCustomShapeObj().GetGeoRect()); + tools::Rectangle aObjectBound(GetCustomShapeObj().GetGeoRect()); // hack for calc grid sync aObjectBound += GetCustomShapeObj().GetGridOffset(); const basegfx::B2DRange aObjectRange(aObjectBound.Left(), aObjectBound.Top(), aObjectBound.Right(), aObjectBound.Bottom()); diff --git a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx index 630c869a43c8..874b982c1dbf 100644 --- a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx @@ -60,7 +60,7 @@ ViewContactOfSdrOle2Obj::~ViewContactOfSdrOle2Obj() basegfx::B2DHomMatrix ViewContactOfSdrOle2Obj::createObjectTransform() const { // take unrotated snap rect (direct model data) for position and size - Rectangle rRectangle = GetOle2Obj().GetGeoRect(); + tools::Rectangle rRectangle = GetOle2Obj().GetGeoRect(); // Hack for calc, transform position of object according // to current zoom so as objects relative position to grid // appears stable diff --git a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx index 523b814f20fc..13742d358c17 100644 --- a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx @@ -47,7 +47,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrRectObj::createV false)); // take unrotated snap rect (direct model data) for position and size - Rectangle rRectangle = GetRectObj().GetGeoRect(); + tools::Rectangle rRectangle = GetRectObj().GetGeoRect(); // Hack for calc, transform position of object according // to current zoom so as objects relative position to grid // appears stable diff --git a/svx/source/sdr/contact/viewcontactofunocontrol.cxx b/svx/source/sdr/contact/viewcontactofunocontrol.cxx index 821444d70523..7df1f041631d 100644 --- a/svx/source/sdr/contact/viewcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewcontactofunocontrol.cxx @@ -94,7 +94,7 @@ namespace sdr { namespace contact { // create range. Use model data directly, not getBoundRect()/getSnapRect; these will use // the primitive data themselves in the long run. Use SdrUnoObj's (which is a SdrRectObj) // call to GetGeoRect() to access SdrTextObj::aRect directly and without executing anything - Rectangle aRectangle(GetSdrUnoObj().GetGeoRect()); + tools::Rectangle aRectangle(GetSdrUnoObj().GetGeoRect()); // Hack for calc, transform position of object according // to current zoom so as objects relative position to grid // appears stable diff --git a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx index dfe57ea6e18b..a6c3e63ba912 100644 --- a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx @@ -197,7 +197,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewObjectContactOfPageObj::crea // get PageObject's geometry basegfx::B2DHomMatrix aPageObjectTransform; { - const Rectangle aPageObjectModelData(rPageObject.GetLastBoundRect()); + const tools::Rectangle aPageObjectModelData(rPageObject.GetLastBoundRect()); const basegfx::B2DRange aPageObjectBound( aPageObjectModelData.Left(), aPageObjectModelData.Top(), aPageObjectModelData.Right(), aPageObjectModelData.Bottom()); diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx index 1c095b02af69..a239c3b303e3 100644 --- a/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx @@ -103,7 +103,7 @@ void ViewObjectContactOfSdrMediaObj::updateMediaItem( ::avmedia::MediaItem& rIte basegfx::B2DRange aViewRange(getObjectRange()); aViewRange.transform(GetObjectContact().getViewInformation2D().getViewTransformation()); - const Rectangle aViewRectangle( + const tools::Rectangle aViewRectangle( (sal_Int32)floor(aViewRange.getMinX()), (sal_Int32)floor(aViewRange.getMinY()), (sal_Int32)ceil(aViewRange.getMaxX()), (sal_Int32)ceil(aViewRange.getMaxY())); diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx index ebcbc95caf72..f84880d1f53e 100644 --- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx @@ -193,8 +193,8 @@ namespace sdr { namespace contact { void addWindowListener( const Reference< XWindowListener >& _l ) const { m_xControlWindow->addWindowListener( _l ); } void removeWindowListener( const Reference< XWindowListener >& _l ) const { m_xControlWindow->removeWindowListener( _l ); } - void setPosSize( const Rectangle& _rPosSize ) const; - Rectangle + void setPosSize( const tools::Rectangle& _rPosSize ) const; + tools::Rectangle getPosSize() const; void setZoom( const ::basegfx::B2DVector& _rScale ) const; ::basegfx::B2DVector @@ -217,13 +217,13 @@ namespace sdr { namespace contact { return _rControl == Reference< XInterface >( _rxCompare, UNO_QUERY ); } - void ControlHolder::setPosSize( const Rectangle& _rPosSize ) const + void ControlHolder::setPosSize( const tools::Rectangle& _rPosSize ) const { // no check whether we're valid, this is the responsibility of the caller // don't call setPosSize when pos/size did not change // #i104181# / 2009-08-18 / frank.schoenheit@sun.com - ::Rectangle aCurrentRect( getPosSize() ); + ::tools::Rectangle aCurrentRect( getPosSize() ); if ( aCurrentRect != _rPosSize ) { m_xControlWindow->setPosSize( @@ -234,7 +234,7 @@ namespace sdr { namespace contact { } - ::Rectangle ControlHolder::getPosSize() const + ::tools::Rectangle ControlHolder::getPosSize() const { // no check whether we're valid, this is the responsibility of the caller return VCLUnoHelper::ConvertToVCLRect( m_xControlWindow->getPosSize() ); @@ -283,7 +283,7 @@ namespace sdr { namespace contact { /** positions a control, and sets its zoom mode, using a given transformation and output device */ - void adjustControlGeometry_throw( const ControlHolder& _rControl, const Rectangle& _rLogicBoundingRect, + void adjustControlGeometry_throw( const ControlHolder& _rControl, const tools::Rectangle& _rLogicBoundingRect, const basegfx::B2DHomMatrix& _rViewTransformation, const ::basegfx::B2DHomMatrix& _rZoomLevelNormalization ) { OSL_PRECOND( _rControl.is(), "UnoControlContactHelper::adjustControlGeometry_throw: illegal control!" ); @@ -306,7 +306,7 @@ namespace sdr { namespace contact { ::basegfx::B2DPoint aBottomRight( _rLogicBoundingRect.Right(), _rLogicBoundingRect.Bottom() ); aBottomRight *= _rViewTransformation; - const Rectangle aPaintRectPixel( (long)aTopLeft.getX(), (long)aTopLeft.getY(), (long)aBottomRight.getX(), (long)aBottomRight.getY() ); + const tools::Rectangle aPaintRectPixel( (long)aTopLeft.getX(), (long)aTopLeft.getY(), (long)aBottomRight.getX(), (long)aBottomRight.getY() ); _rControl.setPosSize( aPaintRectPixel ); // determine the scale from the current view transformation, and the normalization matrix @@ -927,7 +927,7 @@ namespace sdr { namespace contact { if ( getUnoObject( pUnoObject ) ) { Point aGridOffset = pUnoObject->GetGridOffset(); - Rectangle aRect( pUnoObject->GetLogicRect() ); + tools::Rectangle aRect( pUnoObject->GetLogicRect() ); // Hack for calc, transform position of object according // to current zoom so as objects relative position to grid // appears stable @@ -1097,7 +1097,7 @@ namespace sdr { namespace contact { // knit the model and the control _out_rControl.setModel( xControlModel ); Point aGridOffset = _rUnoObject.GetGridOffset(); - Rectangle aRect( _rUnoObject.GetLogicRect() ); + tools::Rectangle aRect( _rUnoObject.GetLogicRect() ); // Hack for calc, transform position of object according // to current zoom so as objects relative position to grid // appears stable @@ -1500,7 +1500,7 @@ namespace sdr { namespace contact { // Do use model data directly to create the correct geometry. Do NOT // use getBoundRect()/getSnapRect() here; these will use the sequence of // primitives themselves in the long run. - Rectangle aSdrGeoData( _rVOC.GetSdrUnoObj().GetGeoRect() ); + tools::Rectangle aSdrGeoData( _rVOC.GetSdrUnoObj().GetGeoRect() ); Point aGridOffset = _rVOC.GetSdrUnoObj().GetGridOffset(); // Hack for calc, transform position of object according // to current zoom so as objects relative position to grid diff --git a/svx/source/sdr/overlay/overlaymanager.cxx b/svx/source/sdr/overlay/overlaymanager.cxx index 043d4cacc9d5..4ffd872cd7f0 100644 --- a/svx/source/sdr/overlay/overlaymanager.cxx +++ b/svx/source/sdr/overlay/overlaymanager.cxx @@ -246,7 +246,7 @@ namespace sdr //ImpCheckMapModeChange(); // paint members - const Rectangle aRegionBoundRect(rRegion.GetBoundRect()); + const tools::Rectangle aRegionBoundRect(rRegion.GetBoundRect()); const basegfx::B2DRange aRegionRange( aRegionBoundRect.Left(), aRegionBoundRect.Top(), aRegionBoundRect.Right(), aRegionBoundRect.Bottom()); @@ -303,7 +303,7 @@ namespace sdr { // assume AA needs one pixel more and invalidate one pixel more const double fDiscreteOne(getDiscreteOne()); - const Rectangle aInvalidateRectangle( + const tools::Rectangle aInvalidateRectangle( (sal_Int32)floor(rRange.getMinX() - fDiscreteOne), (sal_Int32)floor(rRange.getMinY() - fDiscreteOne), (sal_Int32)ceil(rRange.getMaxX() + fDiscreteOne), @@ -316,7 +316,7 @@ namespace sdr { // #i77674# transform to rectangle. Use floor/ceil to get all covered // discrete pixels, see #i75163# and OverlayManagerBuffered::invalidateRange - const Rectangle aInvalidateRectangle( + const tools::Rectangle aInvalidateRectangle( (sal_Int32)floor(rRange.getMinX()), (sal_Int32)floor(rRange.getMinY()), (sal_Int32)ceil(rRange.getMaxX()), (sal_Int32)ceil(rRange.getMaxY())); diff --git a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx index 939daf397fff..8a7f8d55630c 100644 --- a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx +++ b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx @@ -101,7 +101,7 @@ namespace sdr void OverlayManagerBuffered::ImpRestoreBackground() const { - const Rectangle aRegionRectanglePixel( + const tools::Rectangle aRegionRectanglePixel( maBufferRememberedRangePixel.getMinX(), maBufferRememberedRangePixel.getMinY(), maBufferRememberedRangePixel.getMaxX(), maBufferRememberedRangePixel.getMaxY()); const vcl::Region aRegionPixel(aRegionRectanglePixel); @@ -175,7 +175,7 @@ namespace sdr } // also limit to buffer size - const Rectangle aBufferDeviceRectanglePixel(Point(), mpBufferDevice->GetOutputSizePixel()); + const tools::Rectangle aBufferDeviceRectanglePixel(Point(), mpBufferDevice->GetOutputSizePixel()); aRegion.Intersect(aBufferDeviceRectanglePixel); // MapModes off @@ -256,7 +256,7 @@ namespace sdr mpOutputBufferDevice->SetAntialiasing(mpBufferDevice->GetAntialiasing()); // calculate sizes - Rectangle aRegionRectanglePixel( + tools::Rectangle aRegionRectanglePixel( maBufferRememberedRangePixel.getMinX(), maBufferRememberedRangePixel.getMinY(), maBufferRememberedRangePixel.getMaxX(), maBufferRememberedRangePixel.getMaxY()); @@ -347,7 +347,7 @@ namespace sdr { vcl::Window& rWindow = static_cast< vcl::Window& >(mrOutputDevice); - const Rectangle aRegionRectanglePixel( + const tools::Rectangle aRegionRectanglePixel( maBufferRememberedRangePixel.getMinX(), maBufferRememberedRangePixel.getMinY(), maBufferRememberedRangePixel.getMaxX(), diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx index 5dad59138d08..d18959eb4ca1 100644 --- a/svx/source/sdr/properties/attributeproperties.cxx +++ b/svx/source/sdr/properties/attributeproperties.cxx @@ -577,7 +577,7 @@ namespace sdr // Get old BoundRect. Do this after the style change is handled // in the ItemSet parts because GetBoundRect() may calculate a new - Rectangle aBoundRect = rObj.GetLastBoundRect(); + tools::Rectangle aBoundRect = rObj.GetLastBoundRect(); rObj.SetRectsDirty(true); diff --git a/svx/source/sdr/properties/itemsettools.cxx b/svx/source/sdr/properties/itemsettools.cxx index 64c70eb47307..7e5e2bf97484 100644 --- a/svx/source/sdr/properties/itemsettools.cxx +++ b/svx/source/sdr/properties/itemsettools.cxx @@ -57,7 +57,7 @@ namespace sdr } else { - mpData = new Rectangle(rObj.GetLastBoundRect()); + mpData = new tools::Rectangle(rObj.GetLastBoundRect()); mnCount = 1L; } } @@ -70,12 +70,12 @@ namespace sdr } else { - delete static_cast<Rectangle*>(mpData); + delete static_cast<tools::Rectangle*>(mpData); } } - const Rectangle& ItemChangeBroadcaster::GetRectangle(sal_uInt32 nIndex) const + const tools::Rectangle& ItemChangeBroadcaster::GetRectangle(sal_uInt32 nIndex) const { if(mnCount > 1) { @@ -83,7 +83,7 @@ namespace sdr } else { - return *static_cast<Rectangle*>(mpData); + return *static_cast<tools::Rectangle*>(mpData); } } } // end of namespace properties diff --git a/svx/source/sidebar/line/LinePropertyPanelBase.cxx b/svx/source/sidebar/line/LinePropertyPanelBase.cxx index 7a57b4dce02e..9f7465a6fe1e 100644 --- a/svx/source/sidebar/line/LinePropertyPanelBase.cxx +++ b/svx/source/sidebar/line/LinePropertyPanelBase.cxx @@ -75,8 +75,8 @@ void FillLineEndListBox(ListBox& rListBoxStart, ListBox& rListBoxEnd, const XLin Bitmap aCopyEnd(aBitmap); const Size aBmpSize(aCopyStart.GetSizePixel()); - const Rectangle aCropRectStart(Point(), Size(aBmpSize.Width() / 2, aBmpSize.Height())); - const Rectangle aCropRectEnd(Point(aBmpSize.Width() / 2, 0), Size(aBmpSize.Width() / 2, aBmpSize.Height())); + const tools::Rectangle aCropRectStart(Point(), Size(aBmpSize.Width() / 2, aBmpSize.Height())); + const tools::Rectangle aCropRectEnd(Point(aBmpSize.Width() / 2, 0), Size(aBmpSize.Width() / 2, aBmpSize.Height())); aCopyStart.Crop(aCropRectStart); rListBoxStart.InsertEntry( @@ -104,7 +104,7 @@ void FillLineEndListBox(ListBox& rListBoxStart, ListBox& rListBoxEnd, const XLin // take solid line bitmap and crop it to the size of // line cap entries Bitmap aCopyZero( rBitmapZero ); - const Rectangle aCropZero( Point(), aImgSize ); + const tools::Rectangle aCropZero( Point(), aImgSize ); aCopyZero.Crop( aCropZero ); // make it 1st item in list diff --git a/svx/source/sidebar/line/LineWidthValueSet.cxx b/svx/source/sidebar/line/LineWidthValueSet.cxx index 7b406b4575a6..637fa8fb9ed4 100644 --- a/svx/source/sidebar/line/LineWidthValueSet.cxx +++ b/svx/source/sidebar/line/LineWidthValueSet.cxx @@ -86,7 +86,7 @@ void LineWidthValueSet::SetCusEnable(bool bEnable) void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt ) { - Rectangle aRect = rUDEvt.GetRect(); + tools::Rectangle aRect = rUDEvt.GetRect(); vcl::RenderContext* pDev = rUDEvt.GetRenderContext(); sal_uInt16 nItemId = rUDEvt.GetItemId(); @@ -113,7 +113,7 @@ void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt ) Point aImgStart(aBLPos.X() + 5, aBLPos.Y() + ( nRectHeight - 23 ) / 2); pDev->DrawImage(aImgStart, imgCus); // Point aStart(aImgStart.X() + 14 + 20 , aBLPos.Y() + nRectHeight/6); - Rectangle aStrRect = aRect; + tools::Rectangle aStrRect = aRect; aStrRect.Top() += nRectHeight/6; aStrRect.Bottom() -= nRectHeight/6; aStrRect.Left() += imgCus.GetSizePixel().Width() + 20; @@ -130,7 +130,7 @@ void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt ) if( nSelItem == nItemId ) { Color aBackColor(50,107,197); - Rectangle aBackRect = aRect; + tools::Rectangle aBackRect = aRect; aBackRect.Top() += 3; aBackRect.Bottom() -= 2; pDev->SetFillColor(aBackColor); diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 46982bab7442..7ca72f4def9d 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -1031,11 +1031,11 @@ void PosSizePropertyPanel::SetPosSizeMinMax() SdrPageView* pPV = mpView->GetSdrPageView(); if (!pPV) return; - Rectangle aTmpRect(mpView->GetAllMarkedRect()); + tools::Rectangle aTmpRect(mpView->GetAllMarkedRect()); pPV->LogicToPagePos(aTmpRect); maRect = basegfx::B2DRange(aTmpRect.Left(), aTmpRect.Top(), aTmpRect.Right(), aTmpRect.Bottom()); - Rectangle aTmpRect2(mpView->GetWorkArea()); + tools::Rectangle aTmpRect2(mpView->GetWorkArea()); pPV->LogicToPagePos(aTmpRect2); maWorkArea = basegfx::B2DRange(aTmpRect2.Left(), aTmpRect2.Top(), aTmpRect2.Right(), aTmpRect2.Bottom()); diff --git a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx index 7f1834173f93..1f8fe0d9569a 100644 --- a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx +++ b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx @@ -53,7 +53,7 @@ void ValueSetWithTextControl::AddItem( void ValueSetWithTextControl::UserDraw( const UserDrawEvent& rUDEvt ) { - const Rectangle aRect = rUDEvt.GetRect(); + const tools::Rectangle aRect = rUDEvt.GetRect(); vcl::RenderContext* pDev = rUDEvt.GetRenderContext(); pDev->Push(); const sal_uInt16 nItemId = rUDEvt.GetItemId(); @@ -71,7 +71,7 @@ void ValueSetWithTextControl::UserDraw( const UserDrawEvent& rUDEvt ) //draw background if ( GetSelectItemId() == nItemId ) { - Rectangle aBackRect = aRect; + tools::Rectangle aBackRect = aRect; aBackRect.Top() += 3; aBackRect.Bottom() -= 2; pDev->SetFillColor( sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Color_Highlight ) ); @@ -92,7 +92,7 @@ void ValueSetWithTextControl::UserDraw( const UserDrawEvent& rUDEvt ) aFont.SetColor( GetSettings().GetStyleSettings().GetFieldTextColor() ); } - Rectangle aStrRect = aRect; + tools::Rectangle aStrRect = aRect; aStrRect.Top() += nRectHeight/4; aStrRect.Bottom() -= nRectHeight/4; diff --git a/svx/source/stbctrls/modctrl.cxx b/svx/source/stbctrls/modctrl.cxx index 2476d1481ad9..2f4eb634f68d 100644 --- a/svx/source/stbctrls/modctrl.cxx +++ b/svx/source/stbctrls/modctrl.cxx @@ -123,7 +123,7 @@ void SvxModifyControl::_repaint() * * @return Point top-left corner of the centered image position */ -Point centerImage(const Rectangle& rBoundingRect, const Image& rImg) +Point centerImage(const tools::Rectangle& rBoundingRect, const Image& rImg) { Size aImgSize = rImg.GetSizePixel(); Size aRectSize = rBoundingRect.GetSize(); @@ -137,7 +137,7 @@ Point centerImage(const Rectangle& rBoundingRect, const Image& rImg) void SvxModifyControl::Paint( const UserDrawEvent& rUsrEvt ) { vcl::RenderContext* pDev = rUsrEvt.GetRenderContext(); - Rectangle aRect(rUsrEvt.GetRect()); + tools::Rectangle aRect(rUsrEvt.GetRect()); ImplData::ModificationState state = mxImpl->mnModState; Point aPt = centerImage(aRect, mxImpl->maImages[state]); diff --git a/svx/source/stbctrls/modctrl_internal.hxx b/svx/source/stbctrls/modctrl_internal.hxx index 753bf95a6725..21af209b72f7 100644 --- a/svx/source/stbctrls/modctrl_internal.hxx +++ b/svx/source/stbctrls/modctrl_internal.hxx @@ -19,7 +19,7 @@ #ifndef INCLUDED_SVX_SOURCE_STBCTRLS_MODCTRL_INTERNAL_HXX #define INCLUDED_SVX_SOURCE_STBCTRLS_MODCTRL_INTERNAL_HXX -Point centerImage(const Rectangle& rBoundingRect, const Image& rImg); +Point centerImage(const tools::Rectangle& rBoundingRect, const Image& rImg); #endif // INCLUDED_SVX_SOURCE_STBCTRLS_MODCTRL_INTERNAL_HXX diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx index 4fafe04060e4..a6cc6bb0aec0 100644 --- a/svx/source/stbctrls/pszctrl.cxx +++ b/svx/source/stbctrls/pszctrl.cxx @@ -342,7 +342,7 @@ void SvxPosSizeStatusBarControl::Paint( const UserDrawEvent& rUsrEvt ) { vcl::RenderContext* pDev = rUsrEvt.GetRenderContext(); - const Rectangle& rRect = rUsrEvt.GetRect(); + const tools::Rectangle& rRect = rUsrEvt.GetRect(); StatusBar& rBar = GetStatusBar(); Point aItemPos = rBar.GetItemTextPos( GetId() ); Color aOldLineColor = pDev->GetLineColor(); @@ -365,7 +365,7 @@ void SvxPosSizeStatusBarControl::Paint( const UserDrawEvent& rUsrEvt ) OUString aStr = GetMetricStr_Impl( pImpl->aPos.X()); aStr += " / "; aStr += GetMetricStr_Impl( pImpl->aPos.Y()); - Rectangle aRect(aPnt, Point(nSizePosX, rRect.Bottom())); + tools::Rectangle aRect(aPnt, Point(nSizePosX, rRect.Bottom())); pDev->DrawRect(aRect); vcl::Region aOrigRegion(pDev->GetClipRegion()); pDev->SetClipRegion(vcl::Region(aRect)); @@ -384,7 +384,7 @@ void SvxPosSizeStatusBarControl::Paint( const UserDrawEvent& rUsrEvt ) aStr = GetMetricStr_Impl( pImpl->aSize.Width() ); aStr += " x "; aStr += GetMetricStr_Impl( pImpl->aSize.Height() ); - aRect = Rectangle(aDrwPnt, rRect.BottomRight()); + aRect = tools::Rectangle(aDrwPnt, rRect.BottomRight()); pDev->DrawRect(aRect); aOrigRegion = pDev->GetClipRegion(); pDev->SetClipRegion(vcl::Region(aRect)); @@ -392,7 +392,7 @@ void SvxPosSizeStatusBarControl::Paint( const UserDrawEvent& rUsrEvt ) pDev->SetClipRegion(aOrigRegion); } else - pDev->DrawRect( Rectangle( aPnt, rRect.BottomRight() ) ); + pDev->DrawRect( tools::Rectangle( aPnt, rRect.BottomRight() ) ); } else if ( pImpl->bTable ) { diff --git a/svx/source/stbctrls/selctrl.cxx b/svx/source/stbctrls/selctrl.cxx index c6ef39f929b8..af230c55dac9 100644 --- a/svx/source/stbctrls/selctrl.cxx +++ b/svx/source/stbctrls/selctrl.cxx @@ -126,9 +126,9 @@ bool SvxSelectionModeControl::MouseButtonDown( const MouseEvent& rEvt ) void SvxSelectionModeControl::Paint( const UserDrawEvent& rUsrEvt ) { - const Rectangle aControlRect = getControlRect(); + const tools::Rectangle aControlRect = getControlRect(); vcl::RenderContext* pDev = rUsrEvt.GetRenderContext(); - Rectangle aRect = rUsrEvt.GetRect(); + tools::Rectangle aRect = rUsrEvt.GetRect(); Size aImgSize( maImage.GetSizePixel() ); diff --git a/svx/source/stbctrls/xmlsecctrl.cxx b/svx/source/stbctrls/xmlsecctrl.cxx index e8047c2e57fc..ba706e8e506e 100644 --- a/svx/source/stbctrls/xmlsecctrl.cxx +++ b/svx/source/stbctrls/xmlsecctrl.cxx @@ -124,7 +124,7 @@ void XmlSecStatusBarControl::Paint( const UserDrawEvent& rUsrEvt ) { vcl::RenderContext* pDev = rUsrEvt.GetRenderContext(); - Rectangle aRect = rUsrEvt.GetRect(); + tools::Rectangle aRect = rUsrEvt.GetRect(); Color aOldLineColor = pDev->GetLineColor(); Color aOldFillColor = pDev->GetFillColor(); diff --git a/svx/source/stbctrls/zoomctrl.cxx b/svx/source/stbctrls/zoomctrl.cxx index be7eb431daff..384a0f9ed13e 100644 --- a/svx/source/stbctrls/zoomctrl.cxx +++ b/svx/source/stbctrls/zoomctrl.cxx @@ -185,7 +185,7 @@ SvxZoomPageStatusBarControl::SvxZoomPageStatusBarControl(sal_uInt16 _nSlotId, void SvxZoomPageStatusBarControl::Paint(const UserDrawEvent& rUsrEvt) { vcl::RenderContext* pDev = rUsrEvt.GetRenderContext(); - Rectangle aRect = rUsrEvt.GetRect(); + tools::Rectangle aRect = rUsrEvt.GetRect(); Point aPt = centerImage(aRect, maImage); pDev->DrawImage(aPt, maImage); } diff --git a/svx/source/stbctrls/zoomsliderctrl.cxx b/svx/source/stbctrls/zoomsliderctrl.cxx index c9187ecbc3fa..b137bf37a201 100644 --- a/svx/source/stbctrls/zoomsliderctrl.cxx +++ b/svx/source/stbctrls/zoomsliderctrl.cxx @@ -229,10 +229,10 @@ void SvxZoomSliderControl::Paint( const UserDrawEvent& rUsrEvt ) if ( !mxImpl->mbValuesSet ) return; - const Rectangle aControlRect = getControlRect(); + const tools::Rectangle aControlRect = getControlRect(); vcl::RenderContext* pDev = rUsrEvt.GetRenderContext(); - Rectangle aRect = rUsrEvt.GetRect(); - Rectangle aSlider = aRect; + tools::Rectangle aRect = rUsrEvt.GetRect(); + tools::Rectangle aSlider = aRect; long nSliderHeight = 2 * pDev->GetDPIScaleFactor(); long nSnappingHeight = 4 * pDev->GetDPIScaleFactor(); @@ -258,7 +258,7 @@ void SvxZoomSliderControl::Paint( const UserDrawEvent& rUsrEvt ) { long nSnapPosX = aRect.Left() + *aSnappingPointIter; - pDev->DrawRect( Rectangle( nSnapPosX - 1, aSlider.Top() - nSnappingHeight, + pDev->DrawRect( tools::Rectangle( nSnapPosX - 1, aSlider.Top() - nSnappingHeight, nSnapPosX, aSlider.Bottom() + nSnappingHeight ) ); } @@ -291,7 +291,7 @@ bool SvxZoomSliderControl::MouseButtonDown( const MouseEvent & rEvt ) if ( !mxImpl->mbValuesSet ) return true; - const Rectangle aControlRect = getControlRect(); + const tools::Rectangle aControlRect = getControlRect(); const Point aPoint = rEvt.GetPosPixel(); const sal_Int32 nXDiff = aPoint.X() - aControlRect.Left(); @@ -341,7 +341,7 @@ bool SvxZoomSliderControl::MouseMove( const MouseEvent & rEvt ) return true; const short nButtons = rEvt.GetButtons(); - const Rectangle aControlRect = getControlRect(); + const tools::Rectangle aControlRect = getControlRect(); const Point aPoint = rEvt.GetPosPixel(); const sal_Int32 nXDiff = aPoint.X() - aControlRect.Left(); diff --git a/svx/source/styles/CommonStylePreviewRenderer.cxx b/svx/source/styles/CommonStylePreviewRenderer.cxx index 3c4b607841f7..fdb41ecbec42 100644 --- a/svx/source/styles/CommonStylePreviewRenderer.cxx +++ b/svx/source/styles/CommonStylePreviewRenderer.cxx @@ -151,7 +151,7 @@ bool CommonStylePreviewRenderer::recalculate() vcl::Font aOldFont(mrOutputDev.GetFont()); mrOutputDev.SetFont(*pFont); - Rectangle aTextRect; + tools::Rectangle aTextRect; mrOutputDev.GetTextBoundRect(aTextRect, mpStyle->GetName()); if (aTextRect.Bottom() > mnMaxHeight) { @@ -180,7 +180,7 @@ Size CommonStylePreviewRenderer::getRenderSize() return maPixelSize; } -bool CommonStylePreviewRenderer::render(const Rectangle& aRectangle, RenderAlign eRenderAlign) +bool CommonStylePreviewRenderer::render(const tools::Rectangle& aRectangle, RenderAlign eRenderAlign) { const OUString& rText = msRenderText.isEmpty() ? maStyleName : msRenderText; diff --git a/svx/source/svdraw/gradtrns.cxx b/svx/source/svdraw/gradtrns.cxx index 0ea08d95e646..b25ae340d0e4 100644 --- a/svx/source/svdraw/gradtrns.cxx +++ b/svx/source/svdraw/gradtrns.cxx @@ -46,7 +46,7 @@ void GradTransformer::GradToVec(GradTransGradient& rG, GradTransVector& rV, cons } // calc the basic positions - const Rectangle aObjectSnapRectangle(pObj->GetSnapRect()); + const tools::Rectangle aObjectSnapRectangle(pObj->GetSnapRect()); const basegfx::B2DRange aRange(aObjectSnapRectangle.Left(), aObjectSnapRectangle.Top(), aObjectSnapRectangle.Right(), aObjectSnapRectangle.Bottom()); const basegfx::B2DPoint aCenter(aRange.getCenter()); basegfx::B2DPoint aStartPos, aEndPos; @@ -198,7 +198,7 @@ void GradTransformer::VecToGrad(GradTransVector& rV, GradTransGradient& rG, Grad } // calc the basic positions - const Rectangle aObjectSnapRectangle(pObj->GetSnapRect()); + const tools::Rectangle aObjectSnapRectangle(pObj->GetSnapRect()); const basegfx::B2DRange aRange(aObjectSnapRectangle.Left(), aObjectSnapRectangle.Top(), aObjectSnapRectangle.Right(), aObjectSnapRectangle.Bottom()); const basegfx::B2DPoint aCenter(aRange.getCenter()); basegfx::B2DPoint aStartPos(rV.maPositionA); diff --git a/svx/source/svdraw/sdrpagewindow.cxx b/svx/source/svdraw/sdrpagewindow.cxx index 2fdb7db20e49..add2130a32be 100644 --- a/svx/source/svdraw/sdrpagewindow.cxx +++ b/svx/source/svdraw/sdrpagewindow.cxx @@ -423,7 +423,7 @@ void SdrPageWindow::InvalidatePageWindow(const basegfx::B2DRange& rRange) aDiscreteRange.grow(1.0); } - const Rectangle aVCLDiscreteRectangle( + const tools::Rectangle aVCLDiscreteRectangle( static_cast<long>(floor(aDiscreteRange.getMinX())), static_cast<long>(floor(aDiscreteRange.getMinY())), static_cast<long>(ceil(aDiscreteRange.getMaxX())), diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx index 8105a65ce05a..c3fc94e02c9f 100644 --- a/svx/source/svdraw/sdrpaintwindow.cxx +++ b/svx/source/svdraw/sdrpaintwindow.cxx @@ -38,7 +38,7 @@ class CandidateMgr std::set<VclPtr<vcl::Window> > m_aDeletedCandidates; DECL_LINK(WindowEventListener, VclWindowEvent&, void); public: - void PaintTransparentChildren(vcl::Window & rWindow, Rectangle const& rPixelRect); + void PaintTransparentChildren(vcl::Window & rWindow, tools::Rectangle const& rPixelRect); ~CandidateMgr(); }; @@ -62,7 +62,7 @@ CandidateMgr::~CandidateMgr() } } -void PaintTransparentChildren(vcl::Window & rWindow, Rectangle const& rPixelRect) +void PaintTransparentChildren(vcl::Window & rWindow, tools::Rectangle const& rPixelRect) { if (!rWindow.IsChildTransparentModeEnabled()) return; @@ -71,14 +71,14 @@ void PaintTransparentChildren(vcl::Window & rWindow, Rectangle const& rPixelRect aManager.PaintTransparentChildren(rWindow, rPixelRect); } -void CandidateMgr::PaintTransparentChildren(vcl::Window & rWindow, Rectangle const& rPixelRect) +void CandidateMgr::PaintTransparentChildren(vcl::Window & rWindow, tools::Rectangle const& rPixelRect) { vcl::Window * pCandidate = rWindow.GetWindow( GetWindowType::FirstChild ); while (pCandidate) { if (pCandidate->IsPaintTransparent()) { - const Rectangle aCandidatePosSizePixel( + const tools::Rectangle aCandidatePosSizePixel( pCandidate->GetPosPixel(), pCandidate->GetSizePixel()); @@ -268,10 +268,10 @@ rtl::Reference< sdr::overlay::OverlayManager > const & SdrPaintWindow::GetOverla return mxOverlayManager; } -Rectangle SdrPaintWindow::GetVisibleArea() const +tools::Rectangle SdrPaintWindow::GetVisibleArea() const { Size aVisSizePixel(GetOutputDevice().GetOutputSizePixel()); - return Rectangle(GetOutputDevice().PixelToLogic(Rectangle(Point(0,0), aVisSizePixel))); + return tools::Rectangle(GetOutputDevice().PixelToLogic(tools::Rectangle(Point(0,0), aVisSizePixel))); } bool SdrPaintWindow::OutputToRecordingMetaFile() const diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx index 2b3ff4203766..28c6a9cad4ea 100644 --- a/svx/source/svdraw/svdcrtv.cxx +++ b/svx/source/svdraw/svdcrtv.cxx @@ -243,14 +243,14 @@ void SdrCreateView::BrkAction() BrkCreateObj(); } -void SdrCreateView::TakeActionRect(Rectangle& rRect) const +void SdrCreateView::TakeActionRect(tools::Rectangle& rRect) const { if (pAktCreate!=nullptr) { rRect=maDragStat.GetActionRect(); if (rRect.IsEmpty()) { - rRect=Rectangle(maDragStat.GetPrev(),maDragStat.GetNow()); + rRect=tools::Rectangle(maDragStat.GetPrev(),maDragStat.GetNow()); } } else @@ -376,7 +376,7 @@ void SdrCreateView::SetCurrentObj(sal_uInt16 nIdent, SdrInventor nInvent) } bool SdrCreateView::ImpBegCreateObj(SdrInventor nInvent, sal_uInt16 nIdent, const Point& rPnt, OutputDevice* pOut, - short nMinMov, const Rectangle& rLogRect, SdrObject* pPreparedFactoryObject) + short nMinMov, const tools::Rectangle& rLogRect, SdrObject* pPreparedFactoryObject) { bool bRet=false; UnmarkAllObj(); @@ -459,7 +459,7 @@ bool SdrCreateView::ImpBegCreateObj(SdrInventor nInvent, sal_uInt16 nIdent, cons if (!rLogRect.IsEmpty()) pAktCreate->NbcSetLogicRect(rLogRect); // make sure drag start point is inside WorkArea - const Rectangle& rWorkArea = GetWorkArea(); + const tools::Rectangle& rWorkArea = GetWorkArea(); if(!rWorkArea.IsEmpty()) { @@ -508,7 +508,7 @@ bool SdrCreateView::ImpBegCreateObj(SdrInventor nInvent, sal_uInt16 nIdent, cons bool SdrCreateView::BegCreateObj(const Point& rPnt, OutputDevice* pOut, short nMinMov) { - return ImpBegCreateObj(nAktInvent,nAktIdent,rPnt,pOut,nMinMov,Rectangle(), nullptr); + return ImpBegCreateObj(nAktInvent,nAktIdent,rPnt,pOut,nMinMov,tools::Rectangle(), nullptr); } bool SdrCreateView::BegCreatePreparedObject(const Point& rPnt, sal_Int16 nMinMov, SdrObject* pPreparedFactoryObject) @@ -522,14 +522,14 @@ bool SdrCreateView::BegCreatePreparedObject(const Point& rPnt, sal_Int16 nMinMov nIdent = pPreparedFactoryObject->GetObjIdentifier(); } - return ImpBegCreateObj(nInvent, nIdent, rPnt, nullptr, nMinMov, Rectangle(), pPreparedFactoryObject); + return ImpBegCreateObj(nInvent, nIdent, rPnt, nullptr, nMinMov, tools::Rectangle(), pPreparedFactoryObject); } bool SdrCreateView::BegCreateCaptionObj(const Point& rPnt, const Size& rObjSiz, OutputDevice* pOut, short nMinMov) { return ImpBegCreateObj(SdrInventor::Default,OBJ_CAPTION,rPnt,pOut,nMinMov, - Rectangle(rPnt,Size(rObjSiz.Width()+1,rObjSiz.Height()+1)), nullptr); + tools::Rectangle(rPnt,Size(rObjSiz.Width()+1,rObjSiz.Height()+1)), nullptr); } void SdrCreateView::MovCreateObj(const Point& rPnt) @@ -779,11 +779,11 @@ void SdrCreateView::ShowCreateObj(/*OutputDevice* pOut, sal_Bool bFull*/) { // ensure object has some size, necessary for SdrTextObj because // there are still untested divisions by that sizes - Rectangle aCurrentSnapRect(pAktCreate->GetSnapRect()); + tools::Rectangle aCurrentSnapRect(pAktCreate->GetSnapRect()); if(!(aCurrentSnapRect.GetWidth() > 1 && aCurrentSnapRect.GetHeight() > 1)) { - Rectangle aNewRect(maDragStat.GetStart(), maDragStat.GetStart() + Point(2, 2)); + tools::Rectangle aNewRect(maDragStat.GetStart(), maDragStat.GetStart() + Point(2, 2)); pAktCreate->NbcSetSnapRect(aNewRect); } } diff --git a/svx/source/svdraw/svddrag.cxx b/svx/source/svdraw/svddrag.cxx index 75c046a1326b..d527c9865d8e 100644 --- a/svx/source/svdraw/svddrag.cxx +++ b/svx/source/svdraw/svddrag.cxx @@ -53,7 +53,7 @@ void SdrDragStat::Reset() mbEndDragChangesLayout=false; bMouseIsUp=false; Clear(true); - aActionRect=Rectangle(); + aActionRect=tools::Rectangle(); } void SdrDragStat::Reset(const Point& rPnt) @@ -124,9 +124,9 @@ Fraction SdrDragStat::GetYFact() const return Fraction(nMul,nDiv); } -void SdrDragStat::TakeCreateRect(Rectangle& rRect) const +void SdrDragStat::TakeCreateRect(tools::Rectangle& rRect) const { - rRect=Rectangle(GetStart(),GetNow()); + rRect=tools::Rectangle(GetStart(),GetNow()); if (GetPointCount()>=2) { Point aBtmRgt(GetPoint(1)); rRect.Right()=aBtmRgt.X(); diff --git a/svx/source/svdraw/svddrgm1.hxx b/svx/source/svdraw/svddrgm1.hxx index 46f3e53020dd..94de57531ff0 100644 --- a/svx/source/svdraw/svddrgm1.hxx +++ b/svx/source/svdraw/svddrgm1.hxx @@ -139,7 +139,7 @@ public: class SdrDragCrook : public SdrDragMethod { private: - Rectangle aMarkRect; + tools::Rectangle aMarkRect; Point aMarkCenter; Point aCenter; Point aStart; @@ -187,7 +187,7 @@ public: class SdrDragDistort : public SdrDragMethod { private: - Rectangle aMarkRect; + tools::Rectangle aMarkRect; XPolygon aDistortedRect; sal_uInt16 nPolyPt; bool bContortionAllowed; diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index 5d16e8b95e07..b46d6ae7e0c8 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -450,7 +450,7 @@ void SdrDragMethod::createSdrDragEntries_PolygonDrag() if(bNoPolygons) { - const Rectangle aR(getSdrDragView().GetSdrPageView()->MarkSnap()); + const tools::Rectangle aR(getSdrDragView().GetSdrPageView()->MarkSnap()); const basegfx::B2DRange aNewRectangle(aR.Left(), aR.Top(), aR.Right(), aR.Bottom()); basegfx::B2DPolygon aNewPolygon(basegfx::tools::createPolygonFromRect(aNewRectangle)); @@ -800,7 +800,7 @@ void SdrDragMethod::CreateOverlayGeometry(sdr::overlay::OverlayManager& rOverlay // add DragStripes if necessary (help lines cross the page when dragging) if(getSdrDragView().IsDragStripes()) { - Rectangle aActionRectangle; + tools::Rectangle aActionRectangle; getSdrDragView().TakeActionRect(aActionRectangle); const basegfx::B2DPoint aTopLeft(aActionRectangle.Left(), aActionRectangle.Top()); @@ -965,12 +965,12 @@ bool SdrDragMovHdl::BeginSdrDrag() return false; } - DragStat().SetActionRect(Rectangle(pH1->GetPos(),pH2->GetPos())); + DragStat().SetActionRect(tools::Rectangle(pH1->GetPos(),pH2->GetPos())); } else { Point aPt(GetDragHdl()->GetPos()); - DragStat().SetActionRect(Rectangle(aPt,aPt)); + DragStat().SetActionRect(tools::Rectangle(aPt,aPt)); } return true; @@ -1017,7 +1017,7 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt) pHM->Touch(); Show(); - DragStat().SetActionRect(Rectangle(pH1->GetPos(),pH2->GetPos())); + DragStat().SetActionRect(tools::Rectangle(pH1->GetPos(),pH2->GetPos())); } } else @@ -1083,7 +1083,7 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt) pHM->Touch(); Show(); - DragStat().SetActionRect(Rectangle(aPnt,aPnt)); + DragStat().SetActionRect(tools::Rectangle(aPnt,aPnt)); } } } @@ -1377,7 +1377,7 @@ bool SdrDragObjOwn::EndSdrDrag(bool /*bCopy*/) // in its SdrTableObj::endSpecialDrag, so currently not possible. OTOH it uses // a CreateUndoGeoObject(), so maybe setting SetEndDragChangesAttributes is okay. I // will test this now - Rectangle aBoundRect0; + tools::Rectangle aBoundRect0; if(pObj->GetUserCall()) { @@ -1561,7 +1561,7 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_) bXSnapped=false; bYSnapped=false; Point aNoSnapPnt(rNoSnapPnt_); - const Rectangle& aSR=GetMarkedRect(); + const tools::Rectangle& aSR=GetMarkedRect(); long nMovedx=aNoSnapPnt.X()-DragStat().GetStart().X(); long nMovedy=aNoSnapPnt.Y()-DragStat().GetStart().Y(); Point aLO(aSR.TopLeft()); aLO.X()+=nMovedx; aLO.Y()+=nMovedy; @@ -1586,18 +1586,18 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_) if (DragStat().CheckMinMoved(aNoSnapPnt)) { Point aPt1(aPnt); - Rectangle aLR(getSdrDragView().GetWorkArea()); + tools::Rectangle aLR(getSdrDragView().GetWorkArea()); bool bWorkArea=!aLR.IsEmpty(); bool bDragLimit=IsDragLimit(); if (bDragLimit || bWorkArea) { - Rectangle aSR2(GetMarkedRect()); + tools::Rectangle aSR2(GetMarkedRect()); Point aD(aPt1-DragStat().GetStart()); if (bDragLimit) { - Rectangle aR2(GetDragLimitRect()); + tools::Rectangle aR2(GetDragLimitRect()); if (bWorkArea) aLR.Intersection(aR2); @@ -1653,7 +1653,7 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_) { const SdrObject* pObj=pM->GetMarkedSdrObj(); const SdrGluePointList* pGPL=pObj->GetGluePointList(); - Rectangle aBound(pObj->GetCurrentBoundRect()); + tools::Rectangle aBound(pObj->GetCurrentBoundRect()); for (SdrUShortCont::const_iterator it = rPts.begin(); it != rPts.end(); ++it) { @@ -1683,7 +1683,7 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_) { Hide(); DragStat().NextMove(aPt1); - Rectangle aAction(GetMarkedRect()); + tools::Rectangle aAction(GetMarkedRect()); aAction.Move(DragStat().GetDX(),DragStat().GetDY()); DragStat().SetActionRect(aAction); Show(); @@ -1819,7 +1819,7 @@ bool SdrDragResize::BeginSdrDrag() if (pRef1!=nullptr && pRef2!=nullptr) { - DragStat().Ref1()=Rectangle(pRef1->GetPos(),pRef2->GetPos()).Center(); + DragStat().Ref1()=tools::Rectangle(pRef1->GetPos(),pRef2->GetPos()).Center(); } else { @@ -1848,17 +1848,17 @@ void SdrDragResize::MoveSdrDrag(const Point& rNoSnapPnt) Point aStart(DragStat().GetStart()); Point aRef(DragStat().GetRef1()); Fraction aMaxFact(0x7FFFFFFF,1); - Rectangle aLR(getSdrDragView().GetWorkArea()); + tools::Rectangle aLR(getSdrDragView().GetWorkArea()); bool bWorkArea=!aLR.IsEmpty(); bool bDragLimit=IsDragLimit(); if (bDragLimit || bWorkArea) { - Rectangle aSR(GetMarkedRect()); + tools::Rectangle aSR(GetMarkedRect()); if (bDragLimit) { - Rectangle aR2(GetDragLimitRect()); + tools::Rectangle aR2(GetDragLimitRect()); if (bWorkArea) aLR.Intersection(aR2); @@ -2812,14 +2812,14 @@ void SdrDragCrook::TakeSdrDragComment(OUString& rStr) const #define DRAG_CROOK_RASTER_MAXIMUM (15) #define DRAG_CROOK_RASTER_DISTANCE (30) -basegfx::B2DPolyPolygon impCreateDragRaster(SdrPageView& rPageView, const Rectangle& rMarkRect) +basegfx::B2DPolyPolygon impCreateDragRaster(SdrPageView& rPageView, const tools::Rectangle& rMarkRect) { basegfx::B2DPolyPolygon aRetval; if(rPageView.PageWindowCount()) { OutputDevice& rOut = (rPageView.GetPageWindow(0)->GetPaintWindow().GetOutputDevice()); - Rectangle aPixelSize = rOut.LogicToPixel(rMarkRect); + tools::Rectangle aPixelSize = rOut.LogicToPixel(rMarkRect); sal_uInt32 nHorDiv(aPixelSize.GetWidth() / DRAG_CROOK_RASTER_DISTANCE); sal_uInt32 nVerDiv(aPixelSize.GetHeight() / DRAG_CROOK_RASTER_DISTANCE); @@ -2946,7 +2946,7 @@ void SdrDragCrook::MovAllPoints(basegfx::B2DPolyPolygon& rTarget) { nLast=n1st; while (nLast<nPolyCount && aTempPolyPoly[nLast].GetPointCount()!=0) nLast++; - Rectangle aBound(aTempPolyPoly[n1st].GetBoundRect()); + tools::Rectangle aBound(aTempPolyPoly[n1st].GetBoundRect()); sal_uInt16 i; for (i=n1st+1; i<nLast; i++) @@ -3295,7 +3295,7 @@ void SdrDragCrook::applyCurrentTransformationToSdrObject(SdrObject& rTarget) if (bDoCrook) { - const Rectangle aLocalMarkRect(getSdrDragView().GetMarkedObjRect()); + const tools::Rectangle aLocalMarkRect(getSdrDragView().GetMarkedObjRect()); const bool bLocalRotate(!bContortion && eMode == SdrCrookMode::Rotate && getSdrDragView().IsRotateAllowed()); SdrEditView::ImpCrookObj(&rTarget,aCenter,aRad,eMode,bVertical,!bContortion,bLocalRotate,aLocalMarkRect); @@ -3624,7 +3624,7 @@ bool SdrDragCrop::EndSdrDrag(bool /*bCopy*/) if (pRef1==nullptr || pRef2==nullptr) return false; - Rectangle rect(pRef1->GetPos(),pRef2->GetPos()); + tools::Rectangle rect(pRef1->GetPos(),pRef2->GetPos()); Point aEnd(DragStat().GetNow()); Point aStart(DragStat().GetStart()); @@ -3940,12 +3940,12 @@ bool SdrDragCrop::EndSdrDrag(bool /*bCopy*/) aRangeNewNoShearNoRotate.transform(aMatrixOriginalNoShearNoRotate * aDiscreteChangeMatrix); // extract the old Rectangle structures - Rectangle aOldRect( + tools::Rectangle aOldRect( basegfx::fround(aRangeOriginalNoShearNoRotate.getMinX()), basegfx::fround(aRangeOriginalNoShearNoRotate.getMinY()), basegfx::fround(aRangeOriginalNoShearNoRotate.getMaxX()), basegfx::fround(aRangeOriginalNoShearNoRotate.getMaxY())); - Rectangle aNewRect( + tools::Rectangle aNewRect( basegfx::fround(aRangeNewNoShearNoRotate.getMinX()), basegfx::fround(aRangeNewNoShearNoRotate.getMinY()), basegfx::fround(aRangeNewNoShearNoRotate.getMaxX()), diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx index 65a92c50c8b7..787e7434ef9e 100644 --- a/svx/source/svdraw/svddrgv.cxx +++ b/svx/source/svdraw/svddrgv.cxx @@ -120,7 +120,7 @@ void SdrDragView::BrkAction() BrkDragObj(); } -void SdrDragView::TakeActionRect(Rectangle& rRect) const +void SdrDragView::TakeActionRect(tools::Rectangle& rRect) const { if (mpCurrentSdrDragMethod) { @@ -139,7 +139,7 @@ void SdrDragView::TakeActionRect(Rectangle& rRect) const } else { - rRect = Rectangle( + rRect = tools::Rectangle( basegfx::fround(aBoundRange.getMinX()), basegfx::fround(aBoundRange.getMinY()), basegfx::fround(aBoundRange.getMaxX()), basegfx::fround(aBoundRange.getMaxY())); } @@ -147,7 +147,7 @@ void SdrDragView::TakeActionRect(Rectangle& rRect) const } if (rRect.IsEmpty()) { - rRect=Rectangle(maDragStat.GetNow(),maDragStat.GetNow()); + rRect=tools::Rectangle(maDragStat.GetNow(),maDragStat.GetNow()); } } else @@ -158,7 +158,7 @@ void SdrDragView::TakeActionRect(Rectangle& rRect) const bool SdrDragView::TakeDragObjAnchorPos(Point& rPos, bool bTR ) const { - Rectangle aR; + tools::Rectangle aR; TakeActionRect(aR); rPos = bTR ? aR.TopRight() : aR.TopLeft(); if (GetMarkedObjectCount()==1 && IsDragObj() && // only on single selection @@ -192,7 +192,7 @@ bool SdrDragView::TakeDragObjAnchorPos(Point& rPos, bool bTR ) const } -bool SdrDragView::TakeDragLimit(SdrDragMode /*eMode*/, Rectangle& /*rRect*/) const +bool SdrDragView::TakeDragLimit(SdrDragMode /*eMode*/, tools::Rectangle& /*rRect*/) const { return false; } diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx index 97bd8a7b9287..6cdd8e926f6d 100644 --- a/svx/source/svdraw/svdedtv.cxx +++ b/svx/source/svdraw/svdedtv.cxx @@ -662,8 +662,8 @@ void SdrEditView::ForceMarkedObjToAnotherPage() for (size_t nm=0; nm<GetMarkedObjectCount(); ++nm) { SdrMark* pM=GetSdrMarkByIndex(nm); SdrObject* pObj=pM->GetMarkedSdrObj(); - Rectangle aObjRect(pObj->GetCurrentBoundRect()); - Rectangle aPgRect(pM->GetPageView()->GetPageRect()); + tools::Rectangle aObjRect(pObj->GetCurrentBoundRect()); + tools::Rectangle aPgRect(pM->GetPageView()->GetPageRect()); if (!aObjRect.IsOver(aPgRect)) { bool bFnd=false; SdrPageView* pPV = GetSdrPageView(); diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index dddb0bd0ee98..dcef2d237b0a 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -66,13 +66,13 @@ // EditView -void SdrEditView::SetMarkedObjRect(const Rectangle& rRect) +void SdrEditView::SetMarkedObjRect(const tools::Rectangle& rRect) { DBG_ASSERT(!rRect.IsEmpty(),"SetMarkedObjRect() with an empty Rect does not make sense."); if (rRect.IsEmpty()) return; const size_t nCount=GetMarkedObjectCount(); if (nCount==0) return; - Rectangle aR0(GetMarkedObjRect()); + tools::Rectangle aR0(GetMarkedObjRect()); DBG_ASSERT(!aR0.IsEmpty(),"SetMarkedObjRect(): GetMarkedObjRect() is empty."); if (aR0.IsEmpty()) return; long x0=aR0.Left(); @@ -97,7 +97,7 @@ void SdrEditView::SetMarkedObjRect(const Rectangle& rRect) if( bUndo ) AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO)); - Rectangle aR1(pO->GetSnapRect()); + tools::Rectangle aR1(pO->GetSnapRect()); if (!aR1.IsEmpty()) { if (aR1==aR0) @@ -500,7 +500,7 @@ void SdrEditView::ShearMarkedObj(const Point& rRef, long nAngle, bool bVShear, b } void SdrEditView::ImpCrookObj(SdrObject* pO, const Point& rRef, const Point& rRad, - SdrCrookMode eMode, bool bVertical, bool bNoContortion, bool bRotate, const Rectangle& rMarkRect) + SdrCrookMode eMode, bool bVertical, bool bNoContortion, bool bRotate, const tools::Rectangle& rMarkRect) { SdrPathObj* pPath=dynamic_cast<SdrPathObj*>( pO ); bool bDone = false; @@ -580,7 +580,7 @@ void SdrEditView::ImpCrookObj(SdrObject* pO, const Point& rRef, const Point& rRa void SdrEditView::CrookMarkedObj(const Point& rRef, const Point& rRad, SdrCrookMode eMode, bool bVertical, bool bNoContortion, bool bCopy) { - Rectangle aMarkRect(GetMarkedObjRect()); + tools::Rectangle aMarkRect(GetMarkedObjRect()); const bool bUndo = IsUndoEnabled(); bool bRotate=bNoContortion && eMode==SdrCrookMode::Rotate && IsRotateAllowed(); @@ -621,7 +621,7 @@ void SdrEditView::CrookMarkedObj(const Point& rRef, const Point& rRad, SdrCrookM EndUndo(); } -void SdrEditView::ImpDistortObj(SdrObject* pO, const Rectangle& rRef, const XPolygon& rDistortedRect, bool bNoContortion) +void SdrEditView::ImpDistortObj(SdrObject* pO, const tools::Rectangle& rRef, const XPolygon& rDistortedRect, bool bNoContortion) { SdrPathObj* pPath = dynamic_cast<SdrPathObj*>( pO ); @@ -655,7 +655,7 @@ void SdrEditView::ImpDistortObj(SdrObject* pO, const Rectangle& rRef, const XPol } } -void SdrEditView::DistortMarkedObj(const Rectangle& rRef, const XPolygon& rDistortedRect, bool bNoContortion, bool bCopy) +void SdrEditView::DistortMarkedObj(const tools::Rectangle& rRef, const XPolygon& rDistortedRect, bool bNoContortion, bool bCopy) { const bool bUndo = IsUndoEnabled(); @@ -679,7 +679,7 @@ void SdrEditView::DistortMarkedObj(const Rectangle& rRef, const XPolygon& rDisto if( bUndo ) AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO)); - Rectangle aRefRect(rRef); + tools::Rectangle aRefRect(rRef); const SdrObjList* pOL=pO->GetSubList(); if (bNoContortion || pOL==nullptr) { ImpDistortObj(pO,aRefRect,rDistortedRect,bNoContortion); @@ -699,7 +699,7 @@ void SdrEditView::DistortMarkedObj(const Rectangle& rRef, const XPolygon& rDisto void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr, bool /*bReplaceAll*/) { // bReplaceAll has no effect here - Rectangle aAllSnapRect(GetMarkedObjRect()); + tools::Rectangle aAllSnapRect(GetMarkedObjRect()); const SfxPoolItem *pPoolItem=nullptr; if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1X,true,&pPoolItem)==SfxItemState::SET) { long n=static_cast<const SdrTransformRef1XItem*>(pPoolItem)->GetValue(); @@ -739,7 +739,7 @@ void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr, bool /*bRep bAllHgt=true; bDoIt=true; } if (bDoIt) { - Rectangle aRect(aAllSnapRect); // TODO: change this for PolyPt's and GluePt's!!! + tools::Rectangle aRect(aAllSnapRect); // TODO: change this for PolyPt's and GluePt's!!! if (bAllPosX) aRect.Move(nAllPosX-aRect.Left(),0); if (bAllPosY) aRect.Move(0,nAllPosY-aRect.Top()); if (bAllWdt) aRect.Right()=aAllSnapRect.Left()+nAllWdt; @@ -786,7 +786,7 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, bool /*bOnlyH { // bOnlyHardAttr has no effect here. // TODO: Take into account the origin and PvPos. - Rectangle aAllSnapRect(GetMarkedObjRect()); // TODO: change this for PolyPt's and GluePt's!!! + tools::Rectangle aAllSnapRect(GetMarkedObjRect()); // TODO: change this for PolyPt's and GluePt's!!! long nAllSnapPosX=aAllSnapRect.Left(); long nAllSnapPosY=aAllSnapRect.Top(); long nAllSnapWdt=aAllSnapRect.GetWidth()-1; @@ -807,8 +807,8 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, bool /*bOnlyH long nLogicHgt=0; bool bLogicHgtDC=false,bLogicHgtDiff=false; long nRotAngle=0; bool bRotAngleDC=false; long nShrAngle=0; bool bShrAngleDC=false; - Rectangle aSnapRect; - Rectangle aLogicRect; + tools::Rectangle aSnapRect; + tools::Rectangle aLogicRect; const size_t nMarkCount=GetMarkedObjectCount(); for (size_t nm=0; nm<nMarkCount; ++nm) { const SdrMark* pM=GetSdrMarkByIndex(nm); @@ -819,8 +819,8 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, bool /*bOnlyH bSizProtect=pObj->IsResizeProtect(); bPrintable =pObj->IsPrintable(); bVisible = pObj->IsVisible(); - Rectangle aSnapRect2(pObj->GetSnapRect()); - Rectangle aLogicRect2(pObj->GetLogicRect()); + tools::Rectangle aSnapRect2(pObj->GetSnapRect()); + tools::Rectangle aLogicRect2(pObj->GetLogicRect()); nSnapPosX=aSnapRect2.Left(); nSnapPosY=aSnapRect2.Top(); nSnapWdt=aSnapRect2.GetWidth()-1; @@ -1133,7 +1133,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll) if(!aCharWhichIds.empty()) { - Rectangle aOldBoundRect = pTextObj->GetLastBoundRect(); + tools::Rectangle aOldBoundRect = pTextObj->GetLastBoundRect(); // #110094#-14 pTextObj->SendRepaintBroadcast(pTextObj->GetBoundRect()); pTextObj->RemoveOutlinerCharacterAttribs( aCharWhichIds ); @@ -1284,7 +1284,7 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const if (AreObjectsMarked()) { SfxItemSet aMarkAttr(GetAttrFromMarked(false)); // because of AutoGrowHeight and corner radius - Rectangle aRect(GetMarkedObjRect()); + tools::Rectangle aRect(GetMarkedObjRect()); // restore position to that before calc hack aRect -= GetGridOffset(); @@ -1434,7 +1434,7 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const return aRetSet; } -Point ImpGetPoint(const Rectangle& rRect, RectPoint eRP) +Point ImpGetPoint(const tools::Rectangle& rRect, RectPoint eRP) { switch(eRP) { case RectPoint::LT: return rRect.TopLeft(); @@ -1452,7 +1452,7 @@ Point ImpGetPoint(const Rectangle& rRect, RectPoint eRP) void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr) { - Rectangle aRect(GetMarkedObjRect()); + tools::Rectangle aRect(GetMarkedObjRect()); if(GetSdrPageView()) { @@ -1790,7 +1790,7 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert) BegUndo(aStr); } - Rectangle aBound; + tools::Rectangle aBound; const size_t nMarkCount=GetMarkedObjectCount(); bool bHasFixed=false; for (size_t nm=0; nm<nMarkCount; ++nm) @@ -1801,7 +1801,7 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert) pObj->TakeObjInfo(aInfo); if (!aInfo.bMoveAllowed || pObj->IsMoveProtect()) { - Rectangle aObjRect(pObj->GetSnapRect()); + tools::Rectangle aObjRect(pObj->GetSnapRect()); aBound.Union(aObjRect); bHasFixed=true; } @@ -1825,7 +1825,7 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert) } else { - aBound=Rectangle(pPage->GetLftBorder(),pPage->GetUppBorder(), + aBound=tools::Rectangle(pPage->GetLftBorder(),pPage->GetUppBorder(), pPage->GetWdt()-pPage->GetRgtBorder(), pPage->GetHgt()-pPage->GetLwrBorder()); } @@ -1846,7 +1846,7 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert) { long nXMov=0; long nYMov=0; - Rectangle aObjRect(pObj->GetSnapRect()); + tools::Rectangle aObjRect(pObj->GetSnapRect()); switch (eVert) { case SdrVertAlign::Top : nYMov=aBound.Top() -aObjRect.Top() ; break; diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index cfd03d34b76a..671f1d4591e8 100644 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -91,7 +91,7 @@ void SdrEditView::MovMarkedToTop() pOL0=pOL; } const size_t nNowPos = pObj->GetOrdNumDirect(); - const Rectangle& rBR=pObj->GetCurrentBoundRect(); + const tools::Rectangle& rBR=pObj->GetCurrentBoundRect(); size_t nCmpPos = nNowPos+1; SdrObject* pMaxObj=GetMaxToTopObj(pObj); if (pMaxObj!=nullptr) @@ -178,7 +178,7 @@ void SdrEditView::MovMarkedToBtm() pOL0=pOL; } const size_t nNowPos = pObj->GetOrdNumDirect(); - const Rectangle& rBR=pObj->GetCurrentBoundRect(); + const tools::Rectangle& rBR=pObj->GetCurrentBoundRect(); size_t nCmpPos = nNowPos; if (nCmpPos>0) --nCmpPos; @@ -1207,7 +1207,7 @@ void SdrEditView::EqualizeMarkedObjects(bool bWidth) continue; SdrMark* pM = rMarkList.GetMark(a); SdrObject* pObj = pM->GetMarkedSdrObj(); - Rectangle aLogicRect(pObj->GetLogicRect()); + tools::Rectangle aLogicRect(pObj->GetLogicRect()); Size aLogicRectSize(aLogicRect.GetSize()); if (bWidth) aLogicRectSize.Width() = aLastRectSize.Width(); @@ -1622,7 +1622,7 @@ void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL, aTargetItemSet.Put(XFillStyleItem(drawing::FillStyle_NONE)); // get the text bounds and set at text object - Rectangle aTextBounds = pCustomShape->GetSnapRect(); + tools::Rectangle aTextBounds = pCustomShape->GetSnapRect(); if(pCustomShape->GetTextBounds(aTextBounds)) { pTextObj->SetSnapRect(aTextBounds); @@ -2038,7 +2038,7 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo) SdrGrafObj* pGraf= dynamic_cast<SdrGrafObj*>( pObj ); SdrOle2Obj* pOle2= dynamic_cast<SdrOle2Obj*>( pObj ); sal_uIntPtr nInsAnz=0; - Rectangle aLogicRect; + tools::Rectangle aLogicRect; if (pGraf && (pGraf->HasGDIMetaFile() || pGraf->isEmbeddedSvg())) { diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index f015928901e0..436c5740094e 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -204,7 +204,7 @@ void SdrObjEditView::HideSdrPage() SdrGlueEditView::HideSdrPage(); } -void SdrObjEditView::TakeActionRect(Rectangle& rRect) const +void SdrObjEditView::TakeActionRect(tools::Rectangle& rRect) const { if (IsMacroObj()) { rRect=pMacroObj->GetCurrentBoundRect(); @@ -245,14 +245,14 @@ void SdrObjEditView::ModelHasChanged() bool bColorChg=false; bool bContourFrame=pTextObj->IsContourTextFrame(); EVAnchorMode eNewAnchor(ANCHOR_VCENTER_HCENTER); - Rectangle aOldArea(aMinTextEditArea); + tools::Rectangle aOldArea(aMinTextEditArea); aOldArea.Union(aTextEditArea); Color aNewColor; { // check area Size aPaperMin1; Size aPaperMax1; - Rectangle aEditArea1; - Rectangle aMinArea1; + tools::Rectangle aEditArea1; + tools::Rectangle aMinArea1; pTextObj->TakeTextEditArea(&aPaperMin1,&aPaperMax1,&aEditArea1,&aMinArea1); Point aPvOfs(pTextObj->GetTextEditOffset()); @@ -263,7 +263,7 @@ void SdrObjEditView::ModelHasChanged() aMinArea1 += pTextObj->GetGridOffset(); aEditArea1.Move(aPvOfs.X(),aPvOfs.Y()); aMinArea1.Move(aPvOfs.X(),aPvOfs.Y()); - Rectangle aNewArea(aMinArea1); + tools::Rectangle aNewArea(aMinArea1); aNewArea.Union(aEditArea1); if (aNewArea!=aOldArea || aEditArea1!=aTextEditArea || aMinArea1!=aMinTextEditArea || @@ -283,7 +283,7 @@ void SdrObjEditView::ModelHasChanged() EEControlBits nStat=pTextEditOutliner->GetControlWord(); nStat&=~EEControlBits::AUTOPAGESIZE; pTextEditOutliner->SetControlWord(nStat); - Rectangle aAnchorRect; + tools::Rectangle aAnchorRect; pTextObj->TakeTextAnchorRect(aAnchorRect); pTextObj->ImpSetContourPolygon(*pTextEditOutliner,aAnchorRect, true); } @@ -330,7 +330,7 @@ void SdrObjEditView::ModelHasChanged() OutlinerView* pOLV=pTextEditOutliner->GetView(nOV); { // invalidate old OutlinerView area vcl::Window* pWin=pOLV->GetWindow(); - Rectangle aTmpRect(aOldArea); + tools::Rectangle aTmpRect(aOldArea); sal_uInt16 nPixSiz=pOLV->GetInvalidateMore()+1; Size aMore(pWin->PixelToLogic(Size(nPixSiz,nPixSiz))); aTmpRect.Left()-=aMore.Width(); @@ -372,7 +372,7 @@ void SdrObjEditView::TextEditDrawing(SdrPaintWindow& rPaintWindow) const if(nViewCount) { const vcl::Region& rRedrawRegion = rPaintWindow.GetRedrawRegion(); - const Rectangle aCheckRect(rRedrawRegion.GetBoundRect()); + const tools::Rectangle aCheckRect(rRedrawRegion.GetBoundRect()); for(sal_uInt32 i(0); i < nViewCount; i++) { @@ -394,15 +394,15 @@ void SdrObjEditView::TextEditDrawing(SdrPaintWindow& rPaintWindow) const } } -void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectangle& rRect, OutputDevice& rTargetDevice) const +void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const tools::Rectangle& rRect, OutputDevice& rTargetDevice) const { const SdrTextObj* pText = dynamic_cast<SdrTextObj*>( GetTextEditObject() ); bool bTextFrame(pText && pText->IsTextFrame()); bool bFitToSize(pTextEditOutliner->GetControlWord() & EEControlBits::STRETCHING); bool bModifyMerk(pTextEditOutliner->IsModified()); - Rectangle aBlankRect(rOutlView.GetOutputArea()); + tools::Rectangle aBlankRect(rOutlView.GetOutputArea()); aBlankRect.Union(aMinTextEditArea); - Rectangle aPixRect(rTargetDevice.LogicToPixel(aBlankRect)); + tools::Rectangle aPixRect(rTargetDevice.LogicToPixel(aBlankRect)); // in the tiled rendering case, the setup is incomplete, and we very // easily get an empty rRect on input - that will cause that everything is @@ -467,9 +467,9 @@ void SdrObjEditView::ImpInvalidateOutlinerView(OutlinerView& rOutlView) const if(bTextFrame && !bFitToSize) { - Rectangle aBlankRect(rOutlView.GetOutputArea()); + tools::Rectangle aBlankRect(rOutlView.GetOutputArea()); aBlankRect.Union(aMinTextEditArea); - Rectangle aPixRect(pWin->LogicToPixel(aBlankRect)); + tools::Rectangle aPixRect(pWin->LogicToPixel(aBlankRect)); sal_uInt16 nPixSiz(rOutlView.GetInvalidateMore() - 1); aPixRect.Left()--; @@ -490,7 +490,7 @@ void SdrObjEditView::ImpInvalidateOutlinerView(OutlinerView& rOutlView) const if (aPixRect.Bottom()>nMaxY) aPixRect.Bottom()=nMaxY; } - Rectangle aOuterPix(aPixRect); + tools::Rectangle aOuterPix(aPixRect); aOuterPix.Left()-=nPixSiz; aOuterPix.Top()-=nPixSiz; aOuterPix.Right()+=nPixSiz; @@ -827,8 +827,8 @@ bool SdrObjEditView::SdrBeginTextEdit( // but aMinTextEditArea has to happen, too (therefore leaving this in right now) pTextObj->TakeTextEditArea(nullptr,nullptr,&aTextEditArea,&aMinTextEditArea); - Rectangle aTextRect; - Rectangle aAnchorRect; + tools::Rectangle aTextRect; + tools::Rectangle aAnchorRect; pTextObj->TakeTextRect(*pTextEditOutliner, aTextRect, true, &aAnchorRect /* Give true here, not false */); @@ -1078,7 +1078,7 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally) pTextEditOutliner=nullptr; pTextEditOutlinerView=nullptr; pTextEditCursorMerker=nullptr; - aTextEditArea=Rectangle(); + aTextEditArea=tools::Rectangle(); if (pTEOutliner!=nullptr) { @@ -1202,7 +1202,7 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally) OutlinerView* pOLV=pTEOutliner->GetView(i); sal_uInt16 nMorePix=pOLV->GetInvalidateMore() + 10; vcl::Window* pWin=pOLV->GetWindow(); - Rectangle aRect(pOLV->GetOutputArea()); + tools::Rectangle aRect(pOLV->GetOutputArea()); pTEOutliner->RemoveView(i); if (!bTextEditDontDelete || i!=0) { @@ -1320,7 +1320,7 @@ bool SdrObjEditView::IsTextEditHit(const Point& rHit) const bool bOk=false; if(mxTextEditObj.is()) { - Rectangle aEditArea; + tools::Rectangle aEditArea; OutlinerView* pOLV=pTextEditOutliner->GetView(0); if (pOLV!=nullptr) { @@ -1353,7 +1353,7 @@ bool SdrObjEditView::IsTextEditFrameHit(const Point& rHit) const vcl::Window* pWin=pOLV->GetWindow(); if (pText!=nullptr && pText->IsTextFrame() && pOLV!=nullptr && pWin!=nullptr) { sal_uInt16 nPixSiz=pOLV->GetInvalidateMore(); - Rectangle aEditArea(aMinTextEditArea); + tools::Rectangle aEditArea(aMinTextEditArea); aEditArea.Union(pOLV->GetOutputArea()); if (!aEditArea.IsInside(rHit)) { Size aSiz(pWin->PixelToLogic(Size(nPixSiz,nPixSiz))); @@ -1447,7 +1447,7 @@ bool SdrObjEditView::MouseButtonDown(const MouseEvent& rMEvt, vcl::Window* pWin) Point aPixPos(rMEvt.GetPosPixel()); if (pWin) { - Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea())); + tools::Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea())); if (aPixPos.X()<aR.Left ()) aPixPos.X()=aR.Left (); if (aPixPos.X()>aR.Right ()) aPixPos.X()=aR.Right (); if (aPixPos.Y()<aR.Top ()) aPixPos.Y()=aR.Top (); @@ -1480,7 +1480,7 @@ bool SdrObjEditView::MouseButtonUp(const MouseEvent& rMEvt, vcl::Window* pWin) } if (bPostIt && pWin) { Point aPixPos(rMEvt.GetPosPixel()); - Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea())); + tools::Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea())); if (aPixPos.X()<aR.Left ()) aPixPos.X()=aR.Left (); if (aPixPos.X()>aR.Right ()) aPixPos.X()=aR.Right (); if (aPixPos.Y()<aR.Top ()) aPixPos.Y()=aR.Top (); @@ -1514,7 +1514,7 @@ bool SdrObjEditView::MouseMove(const MouseEvent& rMEvt, vcl::Window* pWin) } if (bPostIt) { Point aPixPos(rMEvt.GetPosPixel()); - Rectangle aR(pTextEditOutlinerView->GetOutputArea()); + tools::Rectangle aR(pTextEditOutlinerView->GetOutputArea()); if (pWin) aR = pWin->LogicToPixel(aR); else if (pTextEditWin) @@ -1553,7 +1553,7 @@ bool SdrObjEditView::Command(const CommandEvent& rCEvt, vcl::Window* pWin) if (bPostIt) { Point aPixPos(rCEvt.GetMousePosPixel()); if (rCEvt.IsMouseEvent() && pWin) { - Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea())); + tools::Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea())); if (aPixPos.X()<aR.Left ()) aPixPos.X()=aR.Left (); if (aPixPos.X()>aR.Right ()) aPixPos.X()=aR.Right (); if (aPixPos.Y()<aR.Top ()) aPixPos.Y()=aR.Top (); @@ -1618,7 +1618,7 @@ void SdrObjEditView::ImpMakeTextCursorAreaVisible() if (pCsr!=nullptr) { Size aSiz(pCsr->GetSize()); if (aSiz.Width()!=0 && aSiz.Height()!=0) { - MakeVisible(Rectangle(pCsr->GetPos(),aSiz),*pTextEditWin); + MakeVisible(tools::Rectangle(pCsr->GetPos(),aSiz),*pTextEditWin); } } } @@ -1953,7 +1953,7 @@ void SdrObjEditView::ImpMacroUp(const Point& rUpPos) aHitRec.pVisiLayer=&pMacroPV->GetVisibleLayers(); aHitRec.pPageView=pMacroPV; aHitRec.pOut=pMacroWin.get(); - pMacroObj->PaintMacro(*pMacroWin,Rectangle(),aHitRec); + pMacroObj->PaintMacro(*pMacroWin,tools::Rectangle(),aHitRec); bMacroDown=false; } } @@ -1970,7 +1970,7 @@ void SdrObjEditView::ImpMacroDown(const Point& rDownPos) aHitRec.pPageView=pMacroPV; aHitRec.bDown=true; aHitRec.pOut=pMacroWin.get(); - pMacroObj->PaintMacro(*pMacroWin,Rectangle(),aHitRec); + pMacroObj->PaintMacro(*pMacroWin,tools::Rectangle(),aHitRec); bMacroDown=true; } } diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx index 74cb4343adcb..9187f2c1d386 100644 --- a/svx/source/svdraw/svdetc.cxx +++ b/svx/source/svdraw/svdetc.cxx @@ -653,7 +653,7 @@ namespace } Color impCalcBackgroundColor( - const Rectangle& rArea, + const tools::Rectangle& rArea, const SdrPageView& rTextEditPV, const SdrPage& rPage) { @@ -803,7 +803,7 @@ Color GetTextEditBackgroundColor(const SdrObjEditView& rView) if(pPg) { - Rectangle aSnapRect( pText->GetSnapRect() ); + tools::Rectangle aSnapRect( pText->GetSnapRect() ); aSnapRect.Move(aPvOfs.X(), aPvOfs.Y()); return impCalcBackgroundColor(aSnapRect, *pTextEditPV, *pPg); diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index adf930c3fba5..5b53f4ad2d54 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -76,7 +76,7 @@ using namespace com::sun::star; ImpSdrGDIMetaFileImport::ImpSdrGDIMetaFileImport( SdrModel& rModel, SdrLayerID nLay, - const Rectangle& rRect) + const tools::Rectangle& rRect) : maTmpList(), mpVD(VclPtr<VirtualDevice>::Create()), maScaleRect(rRect), @@ -994,7 +994,7 @@ void ImpSdrGDIMetaFileImport::ImportText( const Point& rPos, const OUString& rSt else if ( eAlg == ALIGN_BOTTOM ) aPos.Y() -= nTextHeight; - Rectangle aTextRect( aPos, aSize ); + tools::Rectangle aTextRect( aPos, aSize ); SdrRectObj* pText =new SdrRectObj( OBJ_TEXT, aTextRect ); pText->SetMergedItem ( makeSdrTextUpperDistItem (0)); @@ -1062,7 +1062,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaStretchTextAction& rAct) void ImpSdrGDIMetaFileImport::DoAction(MetaBmpAction& rAct) { - Rectangle aRect(rAct.GetPoint(),rAct.GetBitmap().GetSizePixel()); + tools::Rectangle aRect(rAct.GetPoint(),rAct.GetBitmap().GetSizePixel()); aRect.Right()++; aRect.Bottom()++; SdrGrafObj* pGraf=new SdrGrafObj(Graphic(rAct.GetBitmap()),aRect); @@ -1074,7 +1074,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaBmpAction& rAct) void ImpSdrGDIMetaFileImport::DoAction(MetaBmpScaleAction& rAct) { - Rectangle aRect(rAct.GetPoint(),rAct.GetSize()); + tools::Rectangle aRect(rAct.GetPoint(),rAct.GetSize()); aRect.Right()++; aRect.Bottom()++; SdrGrafObj* pGraf=new SdrGrafObj(Graphic(rAct.GetBitmap()),aRect); @@ -1086,7 +1086,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaBmpScaleAction& rAct) void ImpSdrGDIMetaFileImport::DoAction(MetaBmpExAction& rAct) { - Rectangle aRect(rAct.GetPoint(),rAct.GetBitmapEx().GetSizePixel()); + tools::Rectangle aRect(rAct.GetPoint(),rAct.GetBitmapEx().GetSizePixel()); aRect.Right()++; aRect.Bottom()++; SdrGrafObj* pGraf=new SdrGrafObj( rAct.GetBitmapEx(), aRect ); @@ -1098,7 +1098,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaBmpExAction& rAct) void ImpSdrGDIMetaFileImport::DoAction(MetaBmpExScaleAction& rAct) { - Rectangle aRect(rAct.GetPoint(),rAct.GetSize()); + tools::Rectangle aRect(rAct.GetPoint(),rAct.GetSize()); aRect.Right()++; aRect.Bottom()++; SdrGrafObj* pGraf=new SdrGrafObj( rAct.GetBitmapEx(), aRect ); @@ -1274,12 +1274,12 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaTextRectAction& rAct) void ImpSdrGDIMetaFileImport::DoAction(MetaBmpScalePartAction& rAct) { - Rectangle aRect(rAct.GetDestPoint(), rAct.GetDestSize()); + tools::Rectangle aRect(rAct.GetDestPoint(), rAct.GetDestSize()); Bitmap aBitmap(rAct.GetBitmap()); aRect.Right()++; aRect.Bottom()++; - aBitmap.Crop(Rectangle(rAct.GetSrcPoint(), rAct.GetSrcSize())); + aBitmap.Crop(tools::Rectangle(rAct.GetSrcPoint(), rAct.GetSrcSize())); SdrGrafObj* pGraf = new SdrGrafObj(aBitmap, aRect); // This action is not creating line and fill, set directly, do not use SetAttributes(..) @@ -1290,12 +1290,12 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaBmpScalePartAction& rAct) void ImpSdrGDIMetaFileImport::DoAction(MetaBmpExScalePartAction& rAct) { - Rectangle aRect(rAct.GetDestPoint(),rAct.GetDestSize()); + tools::Rectangle aRect(rAct.GetDestPoint(),rAct.GetDestSize()); BitmapEx aBitmapEx(rAct.GetBitmapEx()); aRect.Right()++; aRect.Bottom()++; - aBitmapEx.Crop(Rectangle(rAct.GetSrcPoint(), rAct.GetSrcSize())); + aBitmapEx.Crop(tools::Rectangle(rAct.GetSrcPoint(), rAct.GetSrcSize())); SdrGrafObj* pGraf = new SdrGrafObj(aBitmapEx, aRect); // This action is not creating line and fill, set directly, do not use SetAttributes(..) @@ -1306,7 +1306,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaBmpExScalePartAction& rAct) void ImpSdrGDIMetaFileImport::DoAction(MetaMaskAction& rAct) { - Rectangle aRect(rAct.GetPoint(), rAct.GetBitmap().GetSizePixel()); + tools::Rectangle aRect(rAct.GetPoint(), rAct.GetBitmap().GetSizePixel()); BitmapEx aBitmapEx(rAct.GetBitmap(), rAct.GetColor()); aRect.Right()++; aRect.Bottom()++; @@ -1320,7 +1320,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaMaskAction& rAct) void ImpSdrGDIMetaFileImport::DoAction(MetaMaskScaleAction& rAct) { - Rectangle aRect(rAct.GetPoint(), rAct.GetSize()); + tools::Rectangle aRect(rAct.GetPoint(), rAct.GetSize()); BitmapEx aBitmapEx(rAct.GetBitmap(), rAct.GetColor()); aRect.Right()++; aRect.Bottom()++; @@ -1334,11 +1334,11 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaMaskScaleAction& rAct) void ImpSdrGDIMetaFileImport::DoAction(MetaMaskScalePartAction& rAct) { - Rectangle aRect(rAct.GetDestPoint(), rAct.GetDestSize()); + tools::Rectangle aRect(rAct.GetDestPoint(), rAct.GetDestSize()); BitmapEx aBitmapEx(rAct.GetBitmap(), rAct.GetColor()); aRect.Right()++; aRect.Bottom()++; - aBitmapEx.Crop(Rectangle(rAct.GetSrcPoint(), rAct.GetSrcSize())); + aBitmapEx.Crop(tools::Rectangle(rAct.GetSrcPoint(), rAct.GetSrcSize())); SdrGrafObj* pGraf = new SdrGrafObj(aBitmapEx, aRect); // This action is not creating line and fill, set directly, do not use SetAttributes(..) @@ -1385,7 +1385,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaGradientAction& rAct) aRange.transform(aTransform); const Gradient& rGradient = rAct.GetGradient(); SdrRectObj* pRect = new SdrRectObj( - Rectangle( + tools::Rectangle( floor(aRange.getMinX()), floor(aRange.getMinY()), ceil(aRange.getMaxX()), @@ -1492,7 +1492,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaFloatTransparentAction& rAct) if(rMtf.GetActionSize()) { - const Rectangle aRect(rAct.GetPoint(),rAct.GetSize()); + const tools::Rectangle aRect(rAct.GetPoint(),rAct.GetSize()); // convert metafile sub-content to BitmapEx BitmapEx aBitmapEx( @@ -1553,7 +1553,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaFloatTransparentAction& rAct) ScopedVclPtrInstance< VirtualDevice > pVDev; pVDev->SetOutputSizePixel(aBitmapEx.GetBitmap().GetSizePixel()); - pVDev->DrawGradient(Rectangle(Point(0, 0), pVDev->GetOutputSizePixel()), rGradient); + pVDev->DrawGradient(tools::Rectangle(Point(0, 0), pVDev->GetOutputSizePixel()), rGradient); aNewMask = AlphaMask(pVDev->GetBitmap(Point(0, 0), pVDev->GetOutputSizePixel())); bHasNewMask = true; diff --git a/svx/source/svdraw/svdfmtf.hxx b/svx/source/svdraw/svdfmtf.hxx index e8440da97246..b6b4b7e0df26 100644 --- a/svx/source/svdraw/svdfmtf.hxx +++ b/svx/source/svdraw/svdfmtf.hxx @@ -44,7 +44,7 @@ class ImpSdrGDIMetaFileImport protected: ::std::vector< SdrObject* > maTmpList; ScopedVclPtr<VirtualDevice> mpVD; - Rectangle maScaleRect; + tools::Rectangle maScaleRect; size_t mnMapScalingOfs; // from here on, not edited with MapScaling SfxItemSet* mpLineAttr; SfxItemSet* mpFillAttr; @@ -161,7 +161,7 @@ public: ImpSdrGDIMetaFileImport( SdrModel& rModel, SdrLayerID nLay, - const Rectangle& rRect); + const tools::Rectangle& rRect); ~ImpSdrGDIMetaFileImport(); size_t DoImport( diff --git a/svx/source/svdraw/svdglue.cxx b/svx/source/svdraw/svdglue.cxx index 0b73f7f65897..7563fa3bc57c 100644 --- a/svx/source/svdraw/svdglue.cxx +++ b/svx/source/svdraw/svdglue.cxx @@ -46,8 +46,8 @@ void SdrGluePoint::SetReallyAbsolute(bool bOn, const SdrObject& rObj) Point SdrGluePoint::GetAbsolutePos(const SdrObject& rObj) const { if (bReallyAbsolute) return aPos; - Rectangle aSnap(rObj.GetSnapRect()); - Rectangle aBound(rObj.GetSnapRect()); + tools::Rectangle aSnap(rObj.GetSnapRect()); + tools::Rectangle aBound(rObj.GetSnapRect()); Point aPt(aPos); Point aOfs(aSnap.Center()); @@ -90,7 +90,7 @@ void SdrGluePoint::SetAbsolutePos(const Point& rNewPos, const SdrObject& rObj) aPos=rNewPos; return; } - Rectangle aSnap(rObj.GetSnapRect()); + tools::Rectangle aSnap(rObj.GetSnapRect()); Point aPt(rNewPos); Point aOfs(aSnap.Center()); @@ -258,7 +258,7 @@ void SdrGluePoint::Invalidate(vcl::Window& rWin, const SdrObject* pObj) const rWin.EnableMapMode(false); Size aSiz( aGlueHalfSize ); - Rectangle aRect(aPt.X()-aSiz.Width(),aPt.Y()-aSiz.Height(), + tools::Rectangle aRect(aPt.X()-aSiz.Width(),aPt.Y()-aSiz.Height(), aPt.X()+aSiz.Width(),aPt.Y()+aSiz.Height()); // do not erase background, that causes flicker (!) @@ -271,7 +271,7 @@ bool SdrGluePoint::IsHit(const Point& rPnt, const OutputDevice& rOut, const SdrO { Point aPt(pObj!=nullptr ? GetAbsolutePos(*pObj) : GetPos()); Size aSiz=rOut.PixelToLogic(aGlueHalfSize); - Rectangle aRect(aPt.X()-aSiz.Width(),aPt.Y()-aSiz.Height(),aPt.X()+aSiz.Width(),aPt.Y()+aSiz.Height()); + tools::Rectangle aRect(aPt.X()-aSiz.Width(),aPt.Y()-aSiz.Height(),aPt.X()+aSiz.Width(),aPt.Y()+aSiz.Height()); return aRect.IsInside(rPnt); } diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index 174b964f8c59..16a28661adb6 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -87,7 +87,7 @@ class SdrHdlBitmapSet ::std::vector< BitmapEx > maRealMarkers; // helpers - BitmapEx& impGetOrCreateTargetBitmap(sal_uInt16 nIndex, const Rectangle& rRectangle); + BitmapEx& impGetOrCreateTargetBitmap(sal_uInt16 nIndex, const tools::Rectangle& rRectangle); public: explicit SdrHdlBitmapSet(); @@ -107,7 +107,7 @@ SdrHdlBitmapSet::SdrHdlBitmapSet() { } -BitmapEx& SdrHdlBitmapSet::impGetOrCreateTargetBitmap(sal_uInt16 nIndex, const Rectangle& rRectangle) +BitmapEx& SdrHdlBitmapSet::impGetOrCreateTargetBitmap(sal_uInt16 nIndex, const tools::Rectangle& rRectangle) { BitmapEx& rTargetBitmap = maRealMarkers[nIndex]; @@ -135,17 +135,17 @@ const BitmapEx& SdrHdlBitmapSet::GetBitmapEx(BitmapMarkerKind eKindOfMarker, sal } case BitmapMarkerKind::Rect_9x9: { - return impGetOrCreateTargetBitmap((1 * INDEX_COUNT) + nInd, Rectangle(Point(7, nYPos), Size(9, 9))); + return impGetOrCreateTargetBitmap((1 * INDEX_COUNT) + nInd, tools::Rectangle(Point(7, nYPos), Size(9, 9))); } case BitmapMarkerKind::Rect_7x7: { - return impGetOrCreateTargetBitmap((0 * INDEX_COUNT) + nInd, Rectangle(Point(0, nYPos), Size(7, 7))); + return impGetOrCreateTargetBitmap((0 * INDEX_COUNT) + nInd, tools::Rectangle(Point(0, nYPos), Size(7, 7))); } case BitmapMarkerKind::Rect_11x11: { - return impGetOrCreateTargetBitmap((2 * INDEX_COUNT) + nInd, Rectangle(Point(16, nYPos), Size(11, 11))); + return impGetOrCreateTargetBitmap((2 * INDEX_COUNT) + nInd, tools::Rectangle(Point(16, nYPos), Size(11, 11))); } case BitmapMarkerKind::Rect_13x13: @@ -156,27 +156,27 @@ const BitmapEx& SdrHdlBitmapSet::GetBitmapEx(BitmapMarkerKind eKindOfMarker, sal { case 0: { - return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(72, 66), Size(13, 13))); + return impGetOrCreateTargetBitmap(nIndex, tools::Rectangle(Point(72, 66), Size(13, 13))); } case 1: { - return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(85, 66), Size(13, 13))); + return impGetOrCreateTargetBitmap(nIndex, tools::Rectangle(Point(85, 66), Size(13, 13))); } case 2: { - return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(72, 79), Size(13, 13))); + return impGetOrCreateTargetBitmap(nIndex, tools::Rectangle(Point(72, 79), Size(13, 13))); } case 3: { - return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(85, 79), Size(13, 13))); + return impGetOrCreateTargetBitmap(nIndex, tools::Rectangle(Point(85, 79), Size(13, 13))); } case 4: { - return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(98, 79), Size(13, 13))); + return impGetOrCreateTargetBitmap(nIndex, tools::Rectangle(Point(98, 79), Size(13, 13))); } default: // case 5: { - return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(98, 66), Size(13, 13))); + return impGetOrCreateTargetBitmap(nIndex, tools::Rectangle(Point(98, 66), Size(13, 13))); } } } @@ -184,82 +184,82 @@ const BitmapEx& SdrHdlBitmapSet::GetBitmapEx(BitmapMarkerKind eKindOfMarker, sal case BitmapMarkerKind::Circ_7x7: case BitmapMarkerKind::Customshape_7x7: { - return impGetOrCreateTargetBitmap((4 * INDEX_COUNT) + nInd, Rectangle(Point(27, nYPos), Size(7, 7))); + return impGetOrCreateTargetBitmap((4 * INDEX_COUNT) + nInd, tools::Rectangle(Point(27, nYPos), Size(7, 7))); } case BitmapMarkerKind::Circ_9x9: case BitmapMarkerKind::Customshape_9x9: { - return impGetOrCreateTargetBitmap((5 * INDEX_COUNT) + nInd, Rectangle(Point(34, nYPos), Size(9, 9))); + return impGetOrCreateTargetBitmap((5 * INDEX_COUNT) + nInd, tools::Rectangle(Point(34, nYPos), Size(9, 9))); } case BitmapMarkerKind::Circ_11x11: case BitmapMarkerKind::Customshape_11x11: { - return impGetOrCreateTargetBitmap((6 * INDEX_COUNT) + nInd, Rectangle(Point(43, nYPos), Size(11, 11))); + return impGetOrCreateTargetBitmap((6 * INDEX_COUNT) + nInd, tools::Rectangle(Point(43, nYPos), Size(11, 11))); } case BitmapMarkerKind::Elli_7x9: { - return impGetOrCreateTargetBitmap((7 * INDEX_COUNT) + nInd, Rectangle(Point(54, nYPos), Size(7, 9))); + return impGetOrCreateTargetBitmap((7 * INDEX_COUNT) + nInd, tools::Rectangle(Point(54, nYPos), Size(7, 9))); } case BitmapMarkerKind::Elli_9x11: { - return impGetOrCreateTargetBitmap((8 * INDEX_COUNT) + nInd, Rectangle(Point(61, nYPos), Size(9, 11))); + return impGetOrCreateTargetBitmap((8 * INDEX_COUNT) + nInd, tools::Rectangle(Point(61, nYPos), Size(9, 11))); } case BitmapMarkerKind::Elli_9x7: { - return impGetOrCreateTargetBitmap((9 * INDEX_COUNT) + nInd, Rectangle(Point(70, nYPos), Size(9, 7))); + return impGetOrCreateTargetBitmap((9 * INDEX_COUNT) + nInd, tools::Rectangle(Point(70, nYPos), Size(9, 7))); } case BitmapMarkerKind::Elli_11x9: { - return impGetOrCreateTargetBitmap((10 * INDEX_COUNT) + nInd, Rectangle(Point(79, nYPos), Size(11, 9))); + return impGetOrCreateTargetBitmap((10 * INDEX_COUNT) + nInd, tools::Rectangle(Point(79, nYPos), Size(11, 9))); } case BitmapMarkerKind::RectPlus_7x7: { - return impGetOrCreateTargetBitmap((11 * INDEX_COUNT) + nInd, Rectangle(Point(90, nYPos), Size(7, 7))); + return impGetOrCreateTargetBitmap((11 * INDEX_COUNT) + nInd, tools::Rectangle(Point(90, nYPos), Size(7, 7))); } case BitmapMarkerKind::RectPlus_9x9: { - return impGetOrCreateTargetBitmap((12 * INDEX_COUNT) + nInd, Rectangle(Point(97, nYPos), Size(9, 9))); + return impGetOrCreateTargetBitmap((12 * INDEX_COUNT) + nInd, tools::Rectangle(Point(97, nYPos), Size(9, 9))); } case BitmapMarkerKind::RectPlus_11x11: { - return impGetOrCreateTargetBitmap((13 * INDEX_COUNT) + nInd, Rectangle(Point(106, nYPos), Size(11, 11))); + return impGetOrCreateTargetBitmap((13 * INDEX_COUNT) + nInd, tools::Rectangle(Point(106, nYPos), Size(11, 11))); } case BitmapMarkerKind::Crosshair: { - return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 0, Rectangle(Point(0, 68), Size(15, 15))); + return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 0, tools::Rectangle(Point(0, 68), Size(15, 15))); } case BitmapMarkerKind::Glue: { - return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 1, Rectangle(Point(15, 76), Size(9, 9))); + return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 1, tools::Rectangle(Point(15, 76), Size(9, 9))); } case BitmapMarkerKind::Glue_Deselected: { - return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 2, Rectangle(Point(15, 67), Size(9, 9))); + return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 2, tools::Rectangle(Point(15, 67), Size(9, 9))); } case BitmapMarkerKind::Anchor: // AnchorTR for SW case BitmapMarkerKind::AnchorTR: { - return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 3, Rectangle(Point(24, 67), Size(24, 24))); + return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 3, tools::Rectangle(Point(24, 67), Size(24, 24))); } // add AnchorPressed to be able to animate anchor control case BitmapMarkerKind::AnchorPressed: case BitmapMarkerKind::AnchorPressedTR: { - return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 4, Rectangle(Point(48, 67), Size(24, 24))); + return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 4, tools::Rectangle(Point(48, 67), Size(24, 24))); } } } @@ -1760,7 +1760,7 @@ Pointer ImpMeasureHdl::GetPointer() const } -ImpTextframeHdl::ImpTextframeHdl(const Rectangle& rRect) : +ImpTextframeHdl::ImpTextframeHdl(const tools::Rectangle& rRect) : SdrHdl(rRect.TopLeft(),SdrHdlKind::Move), maRect(rRect) { @@ -2349,7 +2349,7 @@ BitmapEx SdrCropHdl::GetBitmapForHandle( const BitmapEx& rBitmap, int nSize ) default: break; } - Rectangle aSourceRect( Point( nX * (nPixelSize) + nOffset, nY * (nPixelSize)), Size(nPixelSize, nPixelSize) ); + tools::Rectangle aSourceRect( Point( nX * (nPixelSize) + nOffset, nY * (nPixelSize)), Size(nPixelSize, nPixelSize) ); BitmapEx aRetval(rBitmap); aRetval.Crop(aSourceRect); diff --git a/svx/source/svdraw/svdhlpln.cxx b/svx/source/svdraw/svdhlpln.cxx index 73bf9c148b09..622ae221b78d 100644 --- a/svx/source/svdraw/svdhlpln.cxx +++ b/svx/source/svdraw/svdhlpln.cxx @@ -54,9 +54,9 @@ bool SdrHelpLine::IsHit(const Point& rPnt, sal_uInt16 nTolLog, const OutputDevic return false; } -Rectangle SdrHelpLine::GetBoundRect(const OutputDevice& rOut) const +tools::Rectangle SdrHelpLine::GetBoundRect(const OutputDevice& rOut) const { - Rectangle aRet(aPos,aPos); + tools::Rectangle aRet(aPos,aPos); Point aOfs(rOut.GetMapMode().GetOrigin()); Size aSiz(rOut.GetOutputSize()); switch (eKind) { diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx index 41407b648f61..97100753fee4 100644 --- a/svx/source/svdraw/svdibrow.cxx +++ b/svx/source/svdraw/svdibrow.cxx @@ -340,12 +340,12 @@ OUString SdrItemBrowserControl::GetCellText(long _nRow, sal_uInt16 _nColId) cons return sRet; } -void SdrItemBrowserControl::PaintField(OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId) const +void SdrItemBrowserControl::PaintField(OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId) const { if (nAktPaintRow<0 || static_cast<std::size_t>(nAktPaintRow)>=aList.size()) { return; } - Rectangle aR(rRect); + tools::Rectangle aR(rRect); aR.Bottom()++; ImpItemListRow* pEntry=ImpGetEntry(nAktPaintRow); if (pEntry->bComment) @@ -429,10 +429,10 @@ void SdrItemBrowserControl::SetDirty() aSetDirtyHdl.Call(*this); } -Rectangle SdrItemBrowserControl::GetFieldCharacterBounds(sal_Int32 /*_nRow*/,sal_Int32 /*_nColumnPos*/,sal_Int32 /*nIndex*/) +tools::Rectangle SdrItemBrowserControl::GetFieldCharacterBounds(sal_Int32 /*_nRow*/,sal_Int32 /*_nColumnPos*/,sal_Int32 /*nIndex*/) { // no accessibility implementation required - return Rectangle(); + return tools::Rectangle(); } sal_Int32 SdrItemBrowserControl::GetFieldIndexAtPoint(sal_Int32 /*_nRow*/,sal_Int32 /*_nColumnPos*/,const Point& /*_rPoint*/) @@ -496,7 +496,7 @@ bool SdrItemBrowserControl::BeginChangeEntry(std::size_t nPos) if (pEntry!=nullptr && !pEntry->bComment) { SetMode(MYBROWSEMODE & BrowserMode(~BrowserMode::KEEPHIGHLIGHT)); pEditControl=VclPtr<ImpItemEdit>::Create(&GetDataWindow(),this,0); - Rectangle aRect(GetFieldRectPixel(nPos, ITEMBROWSER_VALUECOL_ID, false)); + tools::Rectangle aRect(GetFieldRectPixel(nPos, ITEMBROWSER_VALUECOL_ID, false)); aRect.Left()+=2; // little offset for the Edit, so it's exact to the pixel aRect.Right()--; pEditControl->SetPosSizePixel(aRect.TopLeft(),aRect.GetSize()); diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx index 7a76fd4d1401..7c4747ab0684 100644 --- a/svx/source/svdraw/svdmark.cxx +++ b/svx/source/svdraw/svdmark.cxx @@ -603,10 +603,10 @@ const OUString& SdrMarkList::GetPointMarkDescription(bool bGlue) const return rName; } -bool SdrMarkList::TakeBoundRect(SdrPageView* pPV, Rectangle& rRect) const +bool SdrMarkList::TakeBoundRect(SdrPageView* pPV, tools::Rectangle& rRect) const { bool bFnd(false); - Rectangle aR; + tools::Rectangle aR; for(size_t i = 0; i < GetMarkCount(); ++i) { @@ -634,7 +634,7 @@ bool SdrMarkList::TakeBoundRect(SdrPageView* pPV, Rectangle& rRect) const return bFnd; } -bool SdrMarkList::TakeSnapRect(SdrPageView* pPV, Rectangle& rRect) const +bool SdrMarkList::TakeSnapRect(SdrPageView* pPV, tools::Rectangle& rRect) const { bool bFnd(false); @@ -646,7 +646,7 @@ bool SdrMarkList::TakeSnapRect(SdrPageView* pPV, Rectangle& rRect) const { if(pMark->GetMarkedSdrObj()) { - Rectangle aR(pMark->GetMarkedSdrObj()->GetSnapRect()); + tools::Rectangle aR(pMark->GetMarkedSdrObj()->GetSnapRect()); if(bFnd) { diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 4d97d6613cb9..5d007aff7966 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -204,7 +204,7 @@ void SdrMarkView::ModelHasChanged() if (comphelper::LibreOfficeKit::isActive() && GetMarkedObjectCount() > 0) { //TODO: Is MarkedObjRect valid at this point? - Rectangle aSelection(GetMarkedObjRect()); + tools::Rectangle aSelection(GetMarkedObjRect()); OString sSelection; if (aSelection.IsEmpty()) sSelection = "EMPTY"; @@ -286,11 +286,11 @@ void SdrMarkView::BrkAction() BrkMarkGluePoints(); } -void SdrMarkView::TakeActionRect(Rectangle& rRect) const +void SdrMarkView::TakeActionRect(tools::Rectangle& rRect) const { if(IsMarkObj() || IsMarkPoints() || IsMarkGluePoints()) { - rRect = Rectangle(maDragStat.GetStart(), maDragStat.GetNow()); + rRect = tools::Rectangle(maDragStat.GetStart(), maDragStat.GetNow()); } else { @@ -363,7 +363,7 @@ bool SdrMarkView::EndMarkObj() { if(maDragStat.IsMinMoved()) { - Rectangle aRect(maDragStat.GetStart(), maDragStat.GetNow()); + tools::Rectangle aRect(maDragStat.GetStart(), maDragStat.GetNow()); aRect.Justify(); MarkObj(aRect, mpMarkObjOverlay->IsUnmarking()); bRetval = true; @@ -427,7 +427,7 @@ bool SdrMarkView::EndMarkPoints() { if(maDragStat.IsMinMoved()) { - Rectangle aRect(maDragStat.GetStart(), maDragStat.GetNow()); + tools::Rectangle aRect(maDragStat.GetStart(), maDragStat.GetNow()); aRect.Justify(); MarkPoints(&aRect, mpMarkPointsOverlay->IsUnmarking()); @@ -490,7 +490,7 @@ void SdrMarkView::EndMarkGluePoints() { if(maDragStat.IsMinMoved()) { - Rectangle aRect(maDragStat.GetStart(),maDragStat.GetNow()); + tools::Rectangle aRect(maDragStat.GetStart(),maDragStat.GetNow()); aRect.Justify(); MarkGluePoints(&aRect, mpMarkGluePointsOverlay->IsUnmarking()); } @@ -734,11 +734,11 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell) } } - Rectangle aRect(GetMarkedObjRect()); + tools::Rectangle aRect(GetMarkedObjRect()); if (bTiledRendering) { - Rectangle aSelection(aRect); + tools::Rectangle aSelection(aRect); OString sSelection; if (aSelection.IsEmpty()) sSelection = "EMPTY"; @@ -1152,7 +1152,7 @@ void SdrMarkView::ForceRefToMarked() { case SdrDragMode::Rotate: { - Rectangle aR(GetMarkedObjRect()); + tools::Rectangle aR(GetMarkedObjRect()); maRef1 = aR.Center(); break; @@ -1192,7 +1192,7 @@ void SdrMarkView::ForceRefToMarked() if (nTemp>nMinLen) nMinLen=nTemp; } - Rectangle aR(GetMarkedObjBoundRect()); + tools::Rectangle aR(GetMarkedObjBoundRect()); Point aCenter(aR.Center()); long nMarkHgt=aR.GetHeight()-1; long nHgt=nMarkHgt+nObjDst*2; // 20 pixels overlapping above and below @@ -1226,7 +1226,7 @@ void SdrMarkView::ForceRefToMarked() case SdrDragMode::Gradient: case SdrDragMode::Crop: { - Rectangle aRect(GetMarkedObjBoundRect()); + tools::Rectangle aRect(GetMarkedObjBoundRect()); maRef1 = aRect.TopLeft(); maRef2 = aRect.BottomRight(); break; @@ -1540,10 +1540,10 @@ bool SdrMarkView::MarkNextObj(const Point& rPnt, short nTol, bool bPrev) return pFndObj!=nullptr; } -void SdrMarkView::MarkObj(const Rectangle& rRect, bool bUnmark) +void SdrMarkView::MarkObj(const tools::Rectangle& rRect, bool bUnmark) { bool bFnd=false; - Rectangle aR(rRect); + tools::Rectangle aR(rRect); SdrObjList* pObjList; BrkAction(); SdrPageView* pPV = GetSdrPageView(); @@ -1551,11 +1551,11 @@ void SdrMarkView::MarkObj(const Rectangle& rRect, bool bUnmark) if(pPV) { pObjList=pPV->GetObjList(); - Rectangle aFrm1(aR); + tools::Rectangle aFrm1(aR); const size_t nObjCount = pObjList->GetObjCount(); for (size_t nO=0; nO<nObjCount; ++nO) { SdrObject* pObj=pObjList->GetObj(nO); - Rectangle aRect(pObj->GetCurrentBoundRect()); + tools::Rectangle aRect(pObj->GetCurrentBoundRect()); if (aFrm1.IsInside(aRect)) { if (!bUnmark) { if (IsObjMarkable(pObj,pPV)) @@ -1635,7 +1635,7 @@ SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nT const bool bOLE(dynamic_cast< const SdrOle2Obj* >(pObj) != nullptr); const bool bTXT(dynamic_cast<const SdrTextObj*>( pObj) != nullptr && static_cast<SdrTextObj*>(pObj)->IsTextFrame()); SdrObject* pRet=nullptr; - Rectangle aRect(pObj->GetCurrentBoundRect()); + tools::Rectangle aRect(pObj->GetCurrentBoundRect()); // hack for calc grid sync aRect += pObj->GetGridOffset(); sal_uInt16 nTol2(nTol); @@ -1889,7 +1889,7 @@ bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageVie SdrMark* pM=GetSdrMarkByIndex(nMarkNum); SdrPageView* pPV=pM->GetPageView(); SdrObject* pObj=pM->GetMarkedSdrObj(); - Rectangle aRect(pObj->GetCurrentBoundRect()); + tools::Rectangle aRect(pObj->GetCurrentBoundRect()); aRect.Left ()-=nTol; aRect.Top ()-=nTol; aRect.Right ()+=nTol; @@ -1974,13 +1974,13 @@ void SdrMarkView::AdjustMarkHdl(SfxViewShell* pOtherShell) SetMarkHandles(pOtherShell); } -Rectangle SdrMarkView::GetMarkedObjBoundRect() const +tools::Rectangle SdrMarkView::GetMarkedObjBoundRect() const { - Rectangle aRect; + tools::Rectangle aRect; for (size_t nm=0; nm<GetMarkedObjectCount(); ++nm) { SdrMark* pM=GetSdrMarkByIndex(nm); SdrObject* pO=pM->GetMarkedSdrObj(); - Rectangle aR1(pO->GetCurrentBoundRect()); + tools::Rectangle aR1(pO->GetCurrentBoundRect()); // Ensure marked area includes the calc offset // ( if applicable ) to sync to grid aR1 += pO->GetGridOffset(); @@ -1996,23 +1996,23 @@ Point SdrMarkView::GetGridOffset() const // calculate the area occupied by the union of each marked object // ( synced to grid ) and compare to the same unsynced area to calculate // the offset. Hopefully that's the sensible thing to do - const Rectangle& aGroupSyncedRect = GetMarkedObjRect(); + const tools::Rectangle& aGroupSyncedRect = GetMarkedObjRect(); aOffset = aGroupSyncedRect.TopLeft() - maMarkedObjRectNoOffset.TopLeft(); return aOffset; } -const Rectangle& SdrMarkView::GetMarkedObjRect() const +const tools::Rectangle& SdrMarkView::GetMarkedObjRect() const { if (mbMarkedObjRectDirty) { const_cast<SdrMarkView*>(this)->mbMarkedObjRectDirty=false; - Rectangle aRect; - Rectangle aRect2; + tools::Rectangle aRect; + tools::Rectangle aRect2; for (size_t nm=0; nm<GetMarkedObjectCount(); ++nm) { SdrMark* pM=GetSdrMarkByIndex(nm); SdrObject* pO = pM->GetMarkedSdrObj(); if (!pO) continue; - Rectangle aR1(pO->GetSnapRect()); + tools::Rectangle aR1(pO->GetSnapRect()); // apply calc offset to marked object rect // ( necessary for handles to be displayed in // correct position ) diff --git a/svx/source/svdraw/svdmrkv1.cxx b/svx/source/svdraw/svdmrkv1.cxx index cd833e7e293e..8f5d5ca41359 100644 --- a/svx/source/svdraw/svdmrkv1.cxx +++ b/svx/source/svdraw/svdmrkv1.cxx @@ -206,7 +206,7 @@ bool SdrMarkView::MarkPoint(SdrHdl& rHdl, bool bUnmark) return bRet; } -bool SdrMarkView::MarkPoints(const Rectangle* pRect, bool bUnmark) +bool SdrMarkView::MarkPoints(const tools::Rectangle* pRect, bool bUnmark) { ForceUndirtyMrkPnt(); bool bChgd=false; @@ -257,7 +257,7 @@ bool SdrMarkView::MarkNextPoint(const Point& /*rPnt*/, bool /*bPrev*/) return false; } -const Rectangle& SdrMarkView::GetMarkedPointsRect() const +const tools::Rectangle& SdrMarkView::GetMarkedPointsRect() const { ForceUndirtyMrkPnt(); if (mbMarkedPointsRectsDirty) ImpSetPointsRects(); @@ -280,17 +280,17 @@ void SdrMarkView::SetPlusHandlesAlwaysVisible(bool bOn) void SdrMarkView::ImpSetPointsRects() const { - Rectangle aPnts; - Rectangle aGlue; + tools::Rectangle aPnts; + tools::Rectangle aGlue; const size_t nHdlAnz=maHdlList.GetHdlCount(); for (size_t nHdlNum=0; nHdlNum<nHdlAnz; ++nHdlNum) { const SdrHdl* pHdl=maHdlList.GetHdl(nHdlNum); SdrHdlKind eKind=pHdl->GetKind(); if ((eKind==SdrHdlKind::Poly && pHdl->IsSelected()) || eKind==SdrHdlKind::Glue) { Point aPt(pHdl->GetPos()); - Rectangle& rR=eKind==SdrHdlKind::Glue ? aGlue : aPnts; + tools::Rectangle& rR=eKind==SdrHdlKind::Glue ? aGlue : aPnts; if (rR.IsEmpty()) { - rR=Rectangle(aPt,aPt); + rR=tools::Rectangle(aPt,aPt); } else { if (aPt.X()<rR.Left ()) rR.Left ()=aPt.X(); if (aPt.X()>rR.Right ()) rR.Right ()=aPt.X(); @@ -412,7 +412,7 @@ bool SdrMarkView::HasMarkedGluePoints() const return bRet; } -bool SdrMarkView::MarkGluePoints(const Rectangle* pRect, bool bUnmark) +bool SdrMarkView::MarkGluePoints(const tools::Rectangle* pRect, bool bUnmark) { if (!IsGluePointEditMode() && !bUnmark) return false; ForceUndirtyMrkPnt(); @@ -561,7 +561,7 @@ bool SdrMarkView::MarkNextGluePoint(const Point& /*rPnt*/, bool /*bPrev*/) return false; } -const Rectangle& SdrMarkView::GetMarkedGluePointsRect() const +const tools::Rectangle& SdrMarkView::GetMarkedGluePointsRect() const { ForceUndirtyMrkPnt(); if (mbMarkedPointsRectsDirty) ImpSetPointsRects(); diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index f01c49107472..f0577a8b239e 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -562,7 +562,7 @@ double SdrObjCustomShape::GetExtraTextRotation( const bool bPreRotation ) const return fExtraTextRotateAngle; } -bool SdrObjCustomShape::GetTextBounds( Rectangle& rTextBound ) const +bool SdrObjCustomShape::GetTextBounds( tools::Rectangle& rTextBound ) const { bool bRet = false; @@ -572,7 +572,7 @@ bool SdrObjCustomShape::GetTextBounds( Rectangle& rTextBound ) const awt::Rectangle aR( xCustomShapeEngine->getTextBounds() ); if ( aR.Width > 1 && aR.Height > 1 ) { - rTextBound = Rectangle( Point( aR.X, aR.Y ), Size( aR.Width, aR.Height ) ); + rTextBound = tools::Rectangle( Point( aR.X, aR.Y ), Size( aR.Width, aR.Height ) ); bRet = true; } } @@ -1407,7 +1407,7 @@ void SdrObjCustomShape::AdaptTextMinSize() else { // recreate from CustomShape-specific TextBounds - Rectangle aTextBound(maRect); + tools::Rectangle aTextBound(maRect); if(GetTextBounds(aTextBound)) { @@ -1427,7 +1427,7 @@ void SdrObjCustomShape::AdaptTextMinSize() } } -void SdrObjCustomShape::NbcSetSnapRect( const Rectangle& rRect ) +void SdrObjCustomShape::NbcSetSnapRect( const tools::Rectangle& rRect ) { maRect = rRect; ImpJustifyRect(maRect); @@ -1440,9 +1440,9 @@ void SdrObjCustomShape::NbcSetSnapRect( const Rectangle& rRect ) SetChanged(); } -void SdrObjCustomShape::SetSnapRect( const Rectangle& rRect ) +void SdrObjCustomShape::SetSnapRect( const tools::Rectangle& rRect ) { - Rectangle aBoundRect0; + tools::Rectangle aBoundRect0; if ( pUserCall ) aBoundRect0 = GetLastBoundRect(); NbcSetSnapRect( rRect ); @@ -1450,7 +1450,7 @@ void SdrObjCustomShape::SetSnapRect( const Rectangle& rRect ) SendUserCall(SdrUserCallType::Resize,aBoundRect0); } -void SdrObjCustomShape::NbcSetLogicRect( const Rectangle& rRect ) +void SdrObjCustomShape::NbcSetLogicRect( const tools::Rectangle& rRect ) { maRect = rRect; ImpJustifyRect(maRect); @@ -1462,9 +1462,9 @@ void SdrObjCustomShape::NbcSetLogicRect( const Rectangle& rRect ) SetChanged(); } -void SdrObjCustomShape::SetLogicRect( const Rectangle& rRect ) +void SdrObjCustomShape::SetLogicRect( const tools::Rectangle& rRect ) { - Rectangle aBoundRect0; + tools::Rectangle aBoundRect0; if ( pUserCall ) aBoundRect0 = GetLastBoundRect(); NbcSetLogicRect(rRect); @@ -1476,7 +1476,7 @@ void SdrObjCustomShape::Move( const Size& rSiz ) { if ( rSiz.Width() || rSiz.Height() ) { - Rectangle aBoundRect0; + tools::Rectangle aBoundRect0; if ( pUserCall ) aBoundRect0 = GetLastBoundRect(); NbcMove(rSiz); @@ -1510,7 +1510,7 @@ void SdrObjCustomShape::NbcMove( const Size& rSiz ) void SdrObjCustomShape::NbcResize( const Point& rRef, const Fraction& rxFact, const Fraction& ryFact ) { // taking care of handles that should not been changed - Rectangle aOld( maRect ); + tools::Rectangle aOld( maRect ); std::vector< SdrCustomShapeInteraction > aInteractionHandles( GetInteractionHandles() ); SdrTextObj::NbcResize( rRef, rxFact, ryFact ); @@ -1750,7 +1750,7 @@ void SdrObjCustomShape::ImpCheckCustomGluePointsAreAdded() if ( aGeo.nRotationAngle ) aPoly.Rotate( maRect.Center(), aGeo.nRotationAngle / 10 ); - Rectangle aBoundRect( aPoly.GetBoundRect() ); + tools::Rectangle aBoundRect( aPoly.GetBoundRect() ); sal_Int32 nXDiff = aBoundRect.Left() - maRect.Left(); sal_Int32 nYDiff = aBoundRect.Top() - maRect.Top(); @@ -1907,13 +1907,13 @@ bool SdrObjCustomShape::beginSpecialDrag(SdrDragStat& rDrag) const return true; } -void SdrObjCustomShape::DragResizeCustomShape( const Rectangle& rNewRect ) +void SdrObjCustomShape::DragResizeCustomShape( const tools::Rectangle& rNewRect ) { - Rectangle aOld( maRect ); + tools::Rectangle aOld( maRect ); bool bOldMirroredX( IsMirroredX() ); bool bOldMirroredY( IsMirroredY() ); - Rectangle aNewRect( rNewRect ); + tools::Rectangle aNewRect( rNewRect ); aNewRect.Justify(); std::vector< SdrCustomShapeInteraction > aInteractionHandles( GetInteractionHandles() ); @@ -2087,7 +2087,7 @@ bool SdrObjCustomShape::applySpecialDrag(SdrDragStat& rDrag) void SdrObjCustomShape::DragCreateObject( SdrDragStat& rStat ) { - Rectangle aRect1; + tools::Rectangle aRect1; rStat.TakeCreateRect( aRect1 ); std::vector< SdrCustomShapeInteraction > aInteractionHandles( GetInteractionHandles() ); @@ -2099,7 +2099,7 @@ void SdrObjCustomShape::DragCreateObject( SdrDragStat& rStat ) { SetMirroredX( aRect1.Left() > aRect1.Right() ); - aRect1 = Rectangle( rStat.GetNow(), Size( nDefaultObjectSizeWidth, nDefaultObjectSizeHeight ) ); + aRect1 = tools::Rectangle( rStat.GetNow(), Size( nDefaultObjectSizeWidth, nDefaultObjectSizeHeight ) ); // subtracting the horizontal difference of the latest handle from shape position if ( !aInteractionHandles.empty() ) { @@ -2200,7 +2200,7 @@ void SdrObjCustomShape::SetVerticalWriting( bool bVertical ) SdrTextVertAdjust eVert = static_cast<const SdrTextVertAdjustItem&>(rSet.Get(SDRATTR_TEXT_VERTADJUST)).GetValue(); // rescue object size - Rectangle aObjectRect = GetSnapRect(); + tools::Rectangle aObjectRect = GetSnapRect(); // prepare ItemSet to set exchanged width and height items SfxItemSet aNewSet(*rSet.GetPool(), @@ -2244,7 +2244,7 @@ void SdrObjCustomShape::SuggestTextFrameSize(Size aSuggestedTextFrameSize) m_aSuggestedTextFrameSize = aSuggestedTextFrameSize; } -bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt, bool bWdt) const +bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool bHgt, bool bWdt) const { // Either we have text or the application has native text and suggested its size to us. bool bHasText = HasText() || (m_aSuggestedTextFrameSize.Width() != 0 && m_aSuggestedTextFrameSize.Height() != 0); @@ -2254,7 +2254,7 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt, bool bHgtGrow=bHgt && IsAutoGrowHeight(); if ( bWdtGrow || bHgtGrow ) { - Rectangle aR0(rR); + tools::Rectangle aR0(rR); long nHgt=0,nMinHgt=0,nMaxHgt=0; long nWdt=0,nMinWdt=0,nMaxWdt=0; Size aSiz(rR.GetSize()); aSiz.Width()--; aSiz.Height()--; @@ -2397,16 +2397,16 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt, return false; } -Rectangle SdrObjCustomShape::ImpCalculateTextFrame( const bool bHgt, const bool bWdt ) +tools::Rectangle SdrObjCustomShape::ImpCalculateTextFrame( const bool bHgt, const bool bWdt ) { - Rectangle aReturnValue; + tools::Rectangle aReturnValue; - Rectangle aOldTextRect( maRect ); // <- initial text rectangle + tools::Rectangle aOldTextRect( maRect ); // <- initial text rectangle - Rectangle aNewTextRect( maRect ); // <- new text rectangle returned from the custom shape renderer, + tools::Rectangle aNewTextRect( maRect ); // <- new text rectangle returned from the custom shape renderer, GetTextBounds( aNewTextRect ); // it depends to the current logical shape size - Rectangle aAdjustedTextRect( aNewTextRect ); // <- new text rectangle is being tested by AdjustTextFrameWidthAndHeight to ensure + tools::Rectangle aAdjustedTextRect( aNewTextRect ); // <- new text rectangle is being tested by AdjustTextFrameWidthAndHeight to ensure if ( AdjustTextFrameWidthAndHeight( aAdjustedTextRect, bHgt, bWdt ) ) // that the new text rectangle is matching the current text size from the outliner { if (aAdjustedTextRect != aNewTextRect && aOldTextRect != aAdjustedTextRect && @@ -2430,7 +2430,7 @@ Rectangle SdrObjCustomShape::ImpCalculateTextFrame( const bool bHgt, const bool bool SdrObjCustomShape::NbcAdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) { - Rectangle aNewTextRect = ImpCalculateTextFrame(bHgt, bWdt); + tools::Rectangle aNewTextRect = ImpCalculateTextFrame(bHgt, bWdt); const bool bRet = !aNewTextRect.IsEmpty() && aNewTextRect != maRect; if (bRet && !mbAdjustingTextFrameWidthAndHeight) { @@ -2464,11 +2464,11 @@ bool SdrObjCustomShape::NbcAdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight() { - Rectangle aNewTextRect = ImpCalculateTextFrame( true/*bHgt*/, true/*bWdt*/ ); + tools::Rectangle aNewTextRect = ImpCalculateTextFrame( true/*bHgt*/, true/*bWdt*/ ); bool bRet = !aNewTextRect.IsEmpty() && ( aNewTextRect != maRect ); if ( bRet ) { - Rectangle aBoundRect0; + tools::Rectangle aBoundRect0; if ( pUserCall ) aBoundRect0 = GetCurrentBoundRect(); @@ -2498,10 +2498,10 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight() } return bRet; } -void SdrObjCustomShape::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const +void SdrObjCustomShape::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin) const { Size aPaperMin,aPaperMax; - Rectangle aViewInit; + tools::Rectangle aViewInit; TakeTextAnchorRect( aViewInit ); if ( aGeo.nRotationAngle ) { @@ -2593,7 +2593,7 @@ void SdrObjCustomShape::EndTextEdit( SdrOutliner& rOutl ) SdrTextObj::EndTextEdit( rOutl ); InvalidateRenderGeometry(); } -void SdrObjCustomShape::TakeTextAnchorRect( Rectangle& rAnchorRect ) const +void SdrObjCustomShape::TakeTextAnchorRect( tools::Rectangle& rAnchorRect ) const { if ( GetTextBounds( rAnchorRect ) ) { @@ -2618,10 +2618,10 @@ void SdrObjCustomShape::TakeTextAnchorRect( Rectangle& rAnchorRect ) const else SdrTextObj::TakeTextAnchorRect( rAnchorRect ); } -void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText, - Rectangle* pAnchorRect, bool /*bLineWidth*/) const +void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRect, bool bNoEditText, + tools::Rectangle* pAnchorRect, bool /*bLineWidth*/) const { - Rectangle aAnkRect; // Rect in which we anchor + tools::Rectangle aAnkRect; // Rect in which we anchor TakeTextAnchorRect(aAnkRect); SdrTextVertAdjust eVAdj=GetTextVerticalAdjust(); SdrTextHorzAdjust eHAdj=GetTextHorizontalAdjust(); @@ -2751,7 +2751,7 @@ void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRe *pAnchorRect=aAnkRect; // using rTextRect together with ContourFrame doesn't always work correctly - rTextRect=Rectangle(aTextPos,aTextSiz); + rTextRect=tools::Rectangle(aTextPos,aTextSiz); } void SdrObjCustomShape::NbcSetOutlinerParaObject(OutlinerParaObject* pTextObject) @@ -2871,7 +2871,7 @@ void SdrObjCustomShape::SetPage( SdrPage* pNewPage ) // invalidating rectangles by SetRectsDirty is not sufficient, // AdjustTextFrameWidthAndHeight() also has to be made, both // actions are done by NbcSetSnapRect - Rectangle aTmp( maRect ); //creating temporary rectangle #i61108# + tools::Rectangle aTmp( maRect ); //creating temporary rectangle #i61108# NbcSetSnapRect( aTmp ); } } @@ -2979,7 +2979,7 @@ void SdrObjCustomShape::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, if( !aSize.Height() ) aSize.setHeight( 1 ); if( !aSize.Width() ) aSize.setWidth( 1 ); - Rectangle aBaseRect(aPoint, aSize); + tools::Rectangle aBaseRect(aPoint, aSize); SetSnapRect(aBaseRect); // shear? @@ -3022,7 +3022,7 @@ bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf double fShearX = (aGeo.nShearAngle / 100.0) * F_PI180; // get aRect, this is the unrotated snaprect - Rectangle aRectangle(maRect); + tools::Rectangle aRectangle(maRect); bool bMirroredX = IsMirroredX(); bool bMirroredY = IsMirroredY(); @@ -3034,7 +3034,7 @@ bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf if ( bMirroredX ) { tools::Polygon aPol = Rect2Poly(maRect, aNewGeo); - Rectangle aBoundRect( aPol.GetBoundRect() ); + tools::Rectangle aBoundRect( aPol.GetBoundRect() ); Point aRef1( ( aBoundRect.Left() + aBoundRect.Right() ) >> 1, aBoundRect.Top() ); Point aRef2( aRef1.X(), aRef1.Y() + 1000 ); @@ -3056,7 +3056,7 @@ bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf if ( bMirroredY ) { tools::Polygon aPol( Rect2Poly( aRectangle, aNewGeo ) ); - Rectangle aBoundRect( aPol.GetBoundRect() ); + tools::Rectangle aBoundRect( aPol.GetBoundRect() ); Point aRef1( aBoundRect.Left(), ( aBoundRect.Top() + aBoundRect.Bottom() ) >> 1 ); Point aRef2( aRef1.X() + 1000, aRef1.Y() ); diff --git a/svx/source/svdraw/svdoattr.cxx b/svx/source/svdraw/svdoattr.cxx index 964bf6388d9c..1897e2194364 100644 --- a/svx/source/svdraw/svdoattr.cxx +++ b/svx/source/svdraw/svdoattr.cxx @@ -88,7 +88,7 @@ SdrAttrObj::~SdrAttrObj() { } -const Rectangle& SdrAttrObj::GetSnapRect() const +const tools::Rectangle& SdrAttrObj::GetSnapRect() const { if(bSnapRectDirty) { @@ -125,7 +125,7 @@ void SdrAttrObj::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint) if(bDataChg) { - Rectangle aBoundRect = GetLastBoundRect(); + tools::Rectangle aBoundRect = GetLastBoundRect(); SetBoundRectDirty(); SetRectsDirty(true); diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 998158cbe68d..a275c9d2477a 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -145,7 +145,7 @@ SdrObjUserCall::~SdrObjUserCall() { } -void SdrObjUserCall::Changed(const SdrObject& /*rObj*/, SdrUserCallType /*eType*/, const Rectangle& /*rOldBoundRect*/) +void SdrObjUserCall::Changed(const SdrObject& /*rObj*/, SdrUserCallType /*eType*/, const tools::Rectangle& /*rOldBoundRect*/) { } @@ -284,7 +284,7 @@ void SdrObject::ActionChanged() const void SdrObject::SetBoundRectDirty() { - aOutRect = Rectangle(); + aOutRect = tools::Rectangle(); } @@ -826,7 +826,7 @@ void SdrObject::SetNavigationPosition (const sal_uInt32 nNewPosition) // expensive and sometimes problematic (inside a bigger object change you will get // non-useful BoundRects sometimes) I rename that method from GetBoundRect() to // GetCurrentBoundRect(). -const Rectangle& SdrObject::GetCurrentBoundRect() const +const tools::Rectangle& SdrObject::GetCurrentBoundRect() const { if(aOutRect.IsEmpty()) { @@ -840,7 +840,7 @@ const Rectangle& SdrObject::GetCurrentBoundRect() const // the first rectangle for repaints (old and new need to be used) without forcing // a RecalcBoundRect (which may be problematical and expensive sometimes) I add here // a new method for accessing the last BoundRect. -const Rectangle& SdrObject::GetLastBoundRect() const +const tools::Rectangle& SdrObject::GetLastBoundRect() const { return aOutRect; } @@ -864,7 +864,7 @@ void SdrObject::RecalcBoundRect() if(!aRange.isEmpty()) { - aOutRect = Rectangle( + aOutRect = tools::Rectangle( static_cast<long>(floor(aRange.getMinX())), static_cast<long>(floor(aRange.getMinY())), static_cast<long>(ceil(aRange.getMaxX())), @@ -1061,7 +1061,7 @@ OUString SdrObject::GetMetrStr(long nVal) const basegfx::B2DPolyPolygon SdrObject::TakeXorPoly() const { basegfx::B2DPolyPolygon aRetval; - const Rectangle aR(GetCurrentBoundRect()); + const tools::Rectangle aR(GetCurrentBoundRect()); const basegfx::B2DRange aRange(aR.Left(), aR.Top(), aR.Right(), aR.Bottom()); aRetval.append(basegfx::tools::createPolygonFromRect(aRange)); @@ -1163,7 +1163,7 @@ sal_uInt32 SdrObject::GetHdlCount() const SdrHdl* SdrObject::GetHdl(sal_uInt32 nHdlNum) const { SdrHdl* pH=nullptr; - const Rectangle& rR=GetSnapRect(); + const tools::Rectangle& rR=GetSnapRect(); switch (nHdlNum) { case 0: pH=new SdrHdl(rR.TopLeft(), SdrHdlKind::UpperLeft); break; case 1: pH=new SdrHdl(rR.TopCenter(), SdrHdlKind::Upper); break; @@ -1204,10 +1204,10 @@ void SdrObject::addCropHandles(SdrHdlList& /*rTarget*/) const // SdrGrafObj and SwVirtFlyDrawObj } -Rectangle SdrObject::ImpDragCalcRect(const SdrDragStat& rDrag) const +tools::Rectangle SdrObject::ImpDragCalcRect(const SdrDragStat& rDrag) const { - Rectangle aTmpRect(GetSnapRect()); - Rectangle aRect(aTmpRect); + tools::Rectangle aTmpRect(GetSnapRect()); + tools::Rectangle aRect(aTmpRect); const SdrHdl* pHdl=rDrag.GetHdl(); SdrHdlKind eHdl=pHdl==nullptr ? SdrHdlKind::Move : pHdl->GetKind(); bool bEcke=(eHdl==SdrHdlKind::UpperLeft || eHdl==SdrHdlKind::UpperRight || eHdl==SdrHdlKind::LowerLeft || eHdl==SdrHdlKind::LowerRight); @@ -1308,7 +1308,7 @@ bool SdrObject::beginSpecialDrag(SdrDragStat& rDrag) const bool SdrObject::applySpecialDrag(SdrDragStat& rDrag) { - Rectangle aNewRect(ImpDragCalcRect(rDrag)); + tools::Rectangle aNewRect(ImpDragCalcRect(rDrag)); if(aNewRect != GetSnapRect()) { @@ -1334,7 +1334,7 @@ basegfx::B2DPolyPolygon SdrObject::getSpecialDragPoly(const SdrDragStat& /*rDrag bool SdrObject::BegCreate(SdrDragStat& rStat) { rStat.SetOrtho4Possible(); - Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); + tools::Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); aRect1.Justify(); rStat.SetActionRect(aRect1); aOutRect = aRect1; @@ -1369,7 +1369,7 @@ bool SdrObject::BckCreate(SdrDragStat& /*rStat*/) basegfx::B2DPolyPolygon SdrObject::TakeCreatePoly(const SdrDragStat& rDrag) const { - Rectangle aRect1; + tools::Rectangle aRect1; rDrag.TakeCreateRect(aRect1); aRect1.Justify(); @@ -1416,7 +1416,7 @@ void SdrObject::NbcRotate(const Point& rRef, long nAngle, double sn, double cs) { SetGlueReallyAbsolute(true); aOutRect.Move(-rRef.X(),-rRef.Y()); - Rectangle R(aOutRect); + tools::Rectangle R(aOutRect); if (sn==1.0 && cs==0.0) { // 90deg aOutRect.Left() =-R.Bottom(); aOutRect.Right() =-R.Top(); @@ -1444,7 +1444,7 @@ void SdrObject::NbcMirror(const Point& rRef1, const Point& rRef2) { SetGlueReallyAbsolute(true); aOutRect.Move(-rRef1.X(),-rRef1.Y()); - Rectangle R(aOutRect); + tools::Rectangle R(aOutRect); long dx=rRef2.X()-rRef1.X(); long dy=rRef2.Y()-rRef1.Y(); if (dx==0) { // vertical axis @@ -1481,7 +1481,7 @@ void SdrObject::NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear void SdrObject::Move(const Size& rSiz) { if (rSiz.Width()!=0 || rSiz.Height()!=0) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcMove(rSiz); SetChanged(); BroadcastObjectChange(); @@ -1503,7 +1503,7 @@ void SdrObject::Resize(const Point& rRef, const Fraction& xFact, const Fraction& mpImpl->meRelativeHeightRelation = text::RelOrientation::PAGE_FRAME; mpImpl->mnRelativeHeight.reset(); } - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcResize(rRef,xFact,yFact); SetChanged(); BroadcastObjectChange(); @@ -1513,7 +1513,7 @@ void SdrObject::Resize(const Point& rRef, const Fraction& xFact, const Fraction& void SdrObject::Crop(const Point& rRef, const Fraction& xFact, const Fraction& yFact) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcCrop(rRef, xFact, yFact); SetChanged(); BroadcastObjectChange(); @@ -1523,7 +1523,7 @@ void SdrObject::Crop(const Point& rRef, const Fraction& xFact, const Fraction& y void SdrObject::Rotate(const Point& rRef, long nAngle, double sn, double cs) { if (nAngle!=0) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcRotate(rRef,nAngle,sn,cs); SetChanged(); BroadcastObjectChange(); @@ -1533,7 +1533,7 @@ void SdrObject::Rotate(const Point& rRef, long nAngle, double sn, double cs) void SdrObject::Mirror(const Point& rRef1, const Point& rRef2) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcMirror(rRef1,rRef2); SetChanged(); BroadcastObjectChange(); @@ -1543,7 +1543,7 @@ void SdrObject::Mirror(const Point& rRef1, const Point& rRef2) void SdrObject::Shear(const Point& rRef, long nAngle, double tn, bool bVShear) { if (nAngle!=0) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcShear(rRef,nAngle,tn,bVShear); SetChanged(); BroadcastObjectChange(); @@ -1561,7 +1561,7 @@ void SdrObject::NbcSetRelativePos(const Point& rPnt) void SdrObject::SetRelativePos(const Point& rPnt) { if (rPnt!=GetRelativePos()) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcSetRelativePos(rPnt); SetChanged(); BroadcastObjectChange(); @@ -1589,7 +1589,7 @@ void SdrObject::NbcSetAnchorPos(const Point& rPnt) void SdrObject::SetAnchorPos(const Point& rPnt) { if (rPnt!=aAnchor) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcSetAnchorPos(rPnt); SetChanged(); BroadcastObjectChange(); @@ -1606,43 +1606,43 @@ void SdrObject::RecalcSnapRect() { } -const Rectangle& SdrObject::GetSnapRect() const +const tools::Rectangle& SdrObject::GetSnapRect() const { return aOutRect; } -void SdrObject::NbcSetSnapRect(const Rectangle& rRect) +void SdrObject::NbcSetSnapRect(const tools::Rectangle& rRect) { aOutRect=rRect; } -const Rectangle& SdrObject::GetLogicRect() const +const tools::Rectangle& SdrObject::GetLogicRect() const { return GetSnapRect(); } -void SdrObject::NbcSetLogicRect(const Rectangle& rRect) +void SdrObject::NbcSetLogicRect(const tools::Rectangle& rRect) { NbcSetSnapRect(rRect); } -void SdrObject::AdjustToMaxRect( const Rectangle& rMaxRect, bool /* bShrinkOnly = false */ ) +void SdrObject::AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool /* bShrinkOnly = false */ ) { SetLogicRect( rMaxRect ); } -void SdrObject::SetSnapRect(const Rectangle& rRect) +void SdrObject::SetSnapRect(const tools::Rectangle& rRect) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcSetSnapRect(rRect); SetChanged(); BroadcastObjectChange(); SendUserCall(SdrUserCallType::Resize,aBoundRect0); } -void SdrObject::SetLogicRect(const Rectangle& rRect) +void SdrObject::SetLogicRect(const tools::Rectangle& rRect) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcSetLogicRect(rRect); SetChanged(); BroadcastObjectChange(); @@ -1686,7 +1686,7 @@ Point SdrObject::GetPoint(sal_uInt32 /*i*/) const void SdrObject::SetPoint(const Point& rPnt, sal_uInt32 i) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcSetPoint(rPnt, i); SetChanged(); BroadcastObjectChange(); @@ -1763,7 +1763,7 @@ void SdrObject::EndTextEdit(SdrOutliner& /*rOutl*/) void SdrObject::SetOutlinerParaObject(OutlinerParaObject* pTextObject) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcSetOutlinerParaObject(pTextObject); SetChanged(); BroadcastObjectChange(); @@ -1787,7 +1787,7 @@ void SdrObject::NbcReformatText() void SdrObject::ReformatText() { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcReformatText(); SetChanged(); BroadcastObjectChange(); @@ -1821,7 +1821,7 @@ Pointer SdrObject::GetMacroPointer(const SdrObjMacroHitRec&) const return Pointer(PointerStyle::RefHand); } -void SdrObject::PaintMacro(OutputDevice& rOut, const Rectangle& , const SdrObjMacroHitRec& ) const +void SdrObject::PaintMacro(OutputDevice& rOut, const tools::Rectangle& , const SdrObjMacroHitRec& ) const { const RasterOp eRop(rOut.GetRasterOp()); const basegfx::B2DPolyPolygon aPolyPolygon(TakeXorPoly()); @@ -1920,7 +1920,7 @@ SdrObjGeoData* SdrObject::GetGeoData() const void SdrObject::SetGeoData(const SdrObjGeoData& rGeo) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); RestGeoData(rGeo); SetChanged(); BroadcastObjectChange(); @@ -1987,7 +1987,7 @@ void SdrObject::SetMergedItemSetAndBroadcast(const SfxItemSet& rSet, bool bClear void SdrObject::ApplyNotPersistAttr(const SfxItemSet& rAttr) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcApplyNotPersistAttr(rAttr); SetChanged(); BroadcastObjectChange(); @@ -1996,8 +1996,8 @@ void SdrObject::ApplyNotPersistAttr(const SfxItemSet& rAttr) void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr) { - const Rectangle& rSnap=GetSnapRect(); - const Rectangle& rLogic=GetLogicRect(); + const tools::Rectangle& rSnap=GetSnapRect(); + const tools::Rectangle& rLogic=GetLogicRect(); Point aRef1(rSnap.Center()); Point aRef2(aRef1); aRef2.Y()++; const SfxPoolItem *pPoolItem=nullptr; @@ -2014,7 +2014,7 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr) aRef2.Y()=static_cast<const SdrTransformRef2YItem*>(pPoolItem)->GetValue(); } - Rectangle aNewSnap(rSnap); + tools::Rectangle aNewSnap(rSnap); if (rAttr.GetItemState(SDRATTR_MOVEX,true,&pPoolItem)==SfxItemState::SET) { long n=static_cast<const SdrMoveXItem*>(pPoolItem)->GetValue(); aNewSnap.Move(n,0); @@ -2127,7 +2127,7 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr) OUString aName=static_cast<const SfxStringItem*>(pPoolItem)->GetValue(); SetName(aName); } - Rectangle aNewLogic(rLogic); + tools::Rectangle aNewLogic(rLogic); if (rAttr.GetItemState(SDRATTR_LOGICSIZEWIDTH,true,&pPoolItem)==SfxItemState::SET) { long n=static_cast<const SdrLogicSizeWidthItem*>(pPoolItem)->GetValue(); aNewLogic.Right()=aNewLogic.Left()+n; @@ -2160,8 +2160,8 @@ static void lcl_SetItem(SfxItemSet& rAttr, bool bMerge, const SfxPoolItem& rItem void SdrObject::TakeNotPersistAttr(SfxItemSet& rAttr) const { - const Rectangle& rSnap=GetSnapRect(); - const Rectangle& rLogic=GetLogicRect(); + const tools::Rectangle& rSnap=GetSnapRect(); + const tools::Rectangle& rLogic=GetLogicRect(); lcl_SetItem(rAttr,false,SdrYesNoItem(SDRATTR_OBJMOVEPROTECT, IsMoveProtect())); lcl_SetItem(rAttr,false,SdrYesNoItem(SDRATTR_OBJSIZEPROTECT, IsResizeProtect())); lcl_SetItem(rAttr,false,SdrObjPrintableItem(IsPrintable())); @@ -2208,7 +2208,7 @@ SfxStyleSheet* SdrObject::GetStyleSheet() const void SdrObject::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) { - Rectangle aBoundRect0; + tools::Rectangle aBoundRect0; if(pUserCall) aBoundRect0 = GetLastBoundRect(); @@ -2239,7 +2239,7 @@ bool SdrObject::IsNode() const SdrGluePoint SdrObject::GetVertexGluePoint(sal_uInt16 nPosNum) const { // #i41936# Use SnapRect for default GluePoints - const Rectangle aR(GetSnapRect()); + const tools::Rectangle aR(GetSnapRect()); Point aPt; switch(nPosNum) @@ -2259,7 +2259,7 @@ SdrGluePoint SdrObject::GetVertexGluePoint(sal_uInt16 nPosNum) const SdrGluePoint SdrObject::GetCornerGluePoint(sal_uInt16 nPosNum) const { - Rectangle aR(GetCurrentBoundRect()); + tools::Rectangle aR(GetCurrentBoundRect()); Point aPt; switch (nPosNum) { case 0 : aPt=aR.TopLeft(); break; @@ -2622,7 +2622,7 @@ void SdrObject::SetInserted(bool bIns) { if (bIns!=IsInserted()) { bInserted=bIns; - Rectangle aBoundRect0(GetLastBoundRect()); + tools::Rectangle aBoundRect0(GetLastBoundRect()); if (bIns) SendUserCall(SdrUserCallType::Inserted,aBoundRect0); else SendUserCall(SdrUserCallType::Removed,aBoundRect0); @@ -2731,7 +2731,7 @@ void SdrObject::SetUserCall(SdrObjUserCall* pUser) } -void SdrObject::SendUserCall(SdrUserCallType eUserCall, const Rectangle& rBoundRect) const +void SdrObject::SendUserCall(SdrUserCallType eUserCall, const tools::Rectangle& rBoundRect) const { SdrObject* pGroup = nullptr; @@ -2936,7 +2936,7 @@ void SdrObject::notifyShapePropertyChange( const svx::ShapeProperty _eProperty ) bool SdrObject::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPolyPolygon& /*rPolyPolygon*/) const { // any kind of SdrObject, just use SnapRect - Rectangle aRectangle(GetSnapRect()); + tools::Rectangle aRectangle(GetSnapRect()); // convert to transformation values basegfx::B2DTuple aScale(aRectangle.GetWidth(), aRectangle.GetHeight()); @@ -3037,7 +3037,7 @@ void SdrObject::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const ba // build BaseRect Point aPoint(FRound(aTranslate.getX()), FRound(aTranslate.getY())); - Rectangle aBaseRect(aPoint, Size(FRound(aScale.getX()), FRound(aScale.getY()))); + tools::Rectangle aBaseRect(aPoint, Size(FRound(aScale.getX()), FRound(aScale.getY()))); // set BaseRect SetSnapRect(aBaseRect); @@ -3070,7 +3070,7 @@ bool SdrObject::HasLineStyle() const // might be resized -void SdrObject::SetBLIPSizeRectangle( const Rectangle& aRect ) +void SdrObject::SetBLIPSizeRectangle( const tools::Rectangle& aRect ) { maBLIPSizeRectangle = aRect; } @@ -3189,7 +3189,7 @@ SdrObject* SdrObjFactory::MakeNewObject(SdrInventor nInvent, sal_uInt16 nIdent, } SdrObject* SdrObjFactory::MakeNewObject( - SdrInventor nInventor, sal_uInt16 nIdentifier, const Rectangle& rSnapRect, SdrPage* pPage ) + SdrInventor nInventor, sal_uInt16 nIdentifier, const tools::Rectangle& rSnapRect, SdrPage* pPage ) { SdrModel* pModel = pPage ? pPage->GetModel() : nullptr; diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx index 65822737b2f6..0eb46c8bec69 100644 --- a/svx/source/svdraw/svdocapt.cxx +++ b/svx/source/svdraw/svdocapt.cxx @@ -91,10 +91,10 @@ public: nLineLen =0; bFitLineLen=true; } - void CalcEscPos(const Point& rTail, const Rectangle& rRect, Point& rPt, EscDir& rDir) const; + void CalcEscPos(const Point& rTail, const tools::Rectangle& rRect, Point& rPt, EscDir& rDir) const; }; -void ImpCaptParams::CalcEscPos(const Point& rTailPt, const Rectangle& rRect, Point& rPt, EscDir& rDir) const +void ImpCaptParams::CalcEscPos(const Point& rTailPt, const tools::Rectangle& rRect, Point& rPt, EscDir& rDir) const { Point aTl(rTailPt); // copy locally for performance reasons long nX,nY; @@ -199,7 +199,7 @@ SdrCaptionObj::SdrCaptionObj(): { } -SdrCaptionObj::SdrCaptionObj(const Rectangle& rRect, const Point& rTail): +SdrCaptionObj::SdrCaptionObj(const tools::Rectangle& rRect, const Point& rTail): SdrRectObj(OBJ_TEXT,rRect), aTailPoly(3), // default size: 3 points = 2 lines mbSpecialTextBoxShadow(false), @@ -449,7 +449,7 @@ void SdrCaptionObj::ImpRecalcTail() // tail end pos for SdrCaptionType::Type1. This sure was the simplest method // to achieve this, at the cost of making a whole group of const methods // of this object implicitly change the object's position. -void SdrCaptionObj::ImpCalcTail1(const ImpCaptParams& rPara, tools::Polygon& rPoly, Rectangle& rRect) +void SdrCaptionObj::ImpCalcTail1(const ImpCaptParams& rPara, tools::Polygon& rPoly, tools::Rectangle& rRect) { tools::Polygon aPol(2); Point aTl(rPoly[0]); @@ -475,7 +475,7 @@ void SdrCaptionObj::ImpCalcTail1(const ImpCaptParams& rPara, tools::Polygon& rPo rPoly = aPol; } -void SdrCaptionObj::ImpCalcTail2(const ImpCaptParams& rPara, tools::Polygon& rPoly, Rectangle& rRect) +void SdrCaptionObj::ImpCalcTail2(const ImpCaptParams& rPara, tools::Polygon& rPoly, tools::Rectangle& rRect) { // Gap/EscDir/EscPos/Angle tools::Polygon aPol(2); Point aTl(rPoly[0]); @@ -492,7 +492,7 @@ void SdrCaptionObj::ImpCalcTail2(const ImpCaptParams& rPara, tools::Polygon& rPo rPoly=aPol; } -void SdrCaptionObj::ImpCalcTail3(const ImpCaptParams& rPara, tools::Polygon& rPoly, Rectangle& rRect) +void SdrCaptionObj::ImpCalcTail3(const ImpCaptParams& rPara, tools::Polygon& rPoly, tools::Rectangle& rRect) { // Gap/EscDir/EscPos/Angle/LineLen tools::Polygon aPol(3); Point aTl(rPoly[0]); @@ -525,7 +525,7 @@ void SdrCaptionObj::ImpCalcTail3(const ImpCaptParams& rPara, tools::Polygon& rPo rPoly=aPol; } -void SdrCaptionObj::ImpCalcTail(const ImpCaptParams& rPara, tools::Polygon& rPoly, Rectangle& rRect) +void SdrCaptionObj::ImpCalcTail(const ImpCaptParams& rPara, tools::Polygon& rPoly, tools::Rectangle& rRect) { switch (rPara.eType) { case SdrCaptionType::Type1: ImpCalcTail1(rPara,rPoly,rRect); break; @@ -622,12 +622,12 @@ Point SdrCaptionObj::GetRelativePos() const return aTailPoly.GetPoint(0)-aAnchor; } -const Rectangle& SdrCaptionObj::GetLogicRect() const +const tools::Rectangle& SdrCaptionObj::GetLogicRect() const { return maRect; } -void SdrCaptionObj::NbcSetLogicRect(const Rectangle& rRect) +void SdrCaptionObj::NbcSetLogicRect(const tools::Rectangle& rRect) { SdrRectObj::NbcSetLogicRect(rRect); ImpRecalcTail(); @@ -641,7 +641,7 @@ const Point& SdrCaptionObj::GetTailPos() const void SdrCaptionObj::SetTailPos(const Point& rPos) { if (aTailPoly.GetSize()==0 || aTailPoly[0]!=rPos) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcSetTailPos(rPos); SetChanged(); BroadcastObjectChange(); @@ -786,7 +786,7 @@ void SdrCaptionObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, cons // build BaseRect Point aPoint(FRound(aTranslate.getX()), FRound(aTranslate.getY())); - Rectangle aBaseRect(aPoint, Size(FRound(aScale.getX()), FRound(aScale.getY()))); + tools::Rectangle aBaseRect(aPoint, Size(FRound(aScale.getX()), FRound(aScale.getY()))); // set BaseRect, but rescue TailPos over this call const Point aTailPoint = GetTailPos(); diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx index f561e8220062..cce0f010e2b5 100644 --- a/svx/source/svdraw/svdocirc.cxx +++ b/svx/source/svdraw/svdocirc.cxx @@ -52,7 +52,7 @@ using namespace com::sun::star; -Point GetAnglePnt(const Rectangle& rR, long nAngle) +Point GetAnglePnt(const tools::Rectangle& rR, long nAngle) { Point aCenter(rR.Center()); long nWdt=rR.Right()-rR.Left(); @@ -113,7 +113,7 @@ SdrCircObj::SdrCircObj(SdrObjKind eNewKind) bClosedObj=eNewKind!=OBJ_CARC; } -SdrCircObj::SdrCircObj(SdrObjKind eNewKind, const Rectangle& rRect): +SdrCircObj::SdrCircObj(SdrObjKind eNewKind, const tools::Rectangle& rRect): SdrRectObj(rRect) { nStartAngle=0; @@ -122,7 +122,7 @@ SdrCircObj::SdrCircObj(SdrObjKind eNewKind, const Rectangle& rRect): bClosedObj=eNewKind!=OBJ_CARC; } -SdrCircObj::SdrCircObj(SdrObjKind eNewKind, const Rectangle& rRect, long nNewStartWink, long nNewEndWink): +SdrCircObj::SdrCircObj(SdrObjKind eNewKind, const tools::Rectangle& rRect, long nNewStartWink, long nNewEndWink): SdrRectObj(rRect) { long nAngleDif=nNewEndWink-nNewStartWink; @@ -201,7 +201,7 @@ bool SdrCircObj::PaintNeedsXPolyCirc() const return bNeed; } -basegfx::B2DPolygon SdrCircObj::ImpCalcXPolyCirc(const SdrObjKind eCicrleKind, const Rectangle& rRect1, long nStart, long nEnd) const +basegfx::B2DPolygon SdrCircObj::ImpCalcXPolyCirc(const SdrObjKind eCicrleKind, const tools::Rectangle& rRect1, long nStart, long nEnd) const { const basegfx::B2DRange aRange(rRect1.Left(), rRect1.Top(), rRect1.Right(), rRect1.Bottom()); basegfx::B2DPolygon aCircPolygon; @@ -351,7 +351,7 @@ basegfx::B2DPolyPolygon SdrCircObj::TakeXorPoly() const struct ImpCircUser : public SdrDragStatUserData { - Rectangle aR; + tools::Rectangle aR; Point aCenter; Point aP1; Point aP2; @@ -676,7 +676,7 @@ void SdrCircObj::ImpSetCreateParams(SdrDragStat& rStat) bool SdrCircObj::BegCreate(SdrDragStat& rStat) { rStat.SetOrtho4Possible(); - Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); + tools::Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); aRect1.Justify(); rStat.SetActionRect(aRect1); maRect = aRect1; @@ -945,7 +945,7 @@ void SdrCircObj::RestGeoData(const SdrObjGeoData& rGeo) ImpSetCircInfoToAttr(); } -void Union(Rectangle& rR, const Point& rP) +void Union(tools::Rectangle& rR, const Point& rP) { if (rP.X()<rR.Left ()) rR.Left ()=rP.X(); if (rP.X()>rR.Right ()) rR.Right ()=rP.X(); @@ -953,7 +953,7 @@ void Union(Rectangle& rR, const Point& rP) if (rP.Y()>rR.Bottom()) rR.Bottom()=rP.Y(); } -void SdrCircObj::TakeUnrotatedSnapRect(Rectangle& rRect) const +void SdrCircObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const { rRect = maRect; if (meCircleKind!=OBJ_CIRC) { @@ -1015,10 +1015,10 @@ void SdrCircObj::RecalcSnapRect() } } -void SdrCircObj::NbcSetSnapRect(const Rectangle& rRect) +void SdrCircObj::NbcSetSnapRect(const tools::Rectangle& rRect) { if (aGeo.nRotationAngle!=0 || aGeo.nShearAngle!=0 || meCircleKind!=OBJ_CIRC) { - Rectangle aSR0(GetSnapRect()); + tools::Rectangle aSR0(GetSnapRect()); long nWdt0=aSR0.Right()-aSR0.Left(); long nHgt0=aSR0.Bottom()-aSR0.Top(); long nWdt1=rRect.Right()-rRect.Left(); diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx index 86a842841581..e7d04d1fe005 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -370,7 +370,7 @@ sal_uInt16 SdrEdgeObj::GetObjIdentifier() const return sal_uInt16(OBJ_EDGE); } -const Rectangle& SdrEdgeObj::GetCurrentBoundRect() const +const tools::Rectangle& SdrEdgeObj::GetCurrentBoundRect() const { if(bEdgeTrackDirty) { @@ -380,7 +380,7 @@ const Rectangle& SdrEdgeObj::GetCurrentBoundRect() const return SdrTextObj::GetCurrentBoundRect(); } -const Rectangle& SdrEdgeObj::GetSnapRect() const +const tools::Rectangle& SdrEdgeObj::GetSnapRect() const { if(bEdgeTrackDirty) { @@ -395,7 +395,7 @@ void SdrEdgeObj::RecalcSnapRect() maSnapRect=pEdgeTrack->GetBoundRect(); } -void SdrEdgeObj::TakeUnrotatedSnapRect(Rectangle& rRect) const +void SdrEdgeObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const { rRect=GetSnapRect(); } @@ -574,7 +574,7 @@ void SdrEdgeObj::ImpRecalcEdgeTrack() mbSuppressed = false; } - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetCurrentBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetCurrentBoundRect(); SetRectsDirty(); *pEdgeTrack=ImpCalcEdgeTrack(*pEdgeTrack,aCon1,aCon2,&aEdgeInfo); ImpSetEdgeInfoToAttr(); // copy values from aEdgeInfo into the pool @@ -592,7 +592,7 @@ void SdrEdgeObj::ImpRecalcEdgeTrack() SdrEscapeDirection SdrEdgeObj::ImpCalcEscAngle(SdrObject* pObj, const Point& rPt) { if (pObj==nullptr) return SdrEscapeDirection::ALL; - Rectangle aR(pObj->GetSnapRect()); + tools::Rectangle aR(pObj->GetSnapRect()); long dxl=rPt.X()-aR.Left(); long dyo=rPt.Y()-aR.Top(); long dxr=aR.Right()-rPt.X(); @@ -627,7 +627,7 @@ SdrEscapeDirection SdrEdgeObj::ImpCalcEscAngle(SdrObject* pObj, const Point& rPt } } -XPolygon SdrEdgeObj::ImpCalcObjToCenter(const Point& rStPt, long nEscAngle, const Rectangle& rRect, const Point& rMeeting) +XPolygon SdrEdgeObj::ImpCalcObjToCenter(const Point& rStPt, long nEscAngle, const tools::Rectangle& rRect, const Point& rMeeting) { XPolygon aXP; aXP.Insert(XPOLY_APPEND,rStPt,PolyFlags::Normal); @@ -691,10 +691,10 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection& Point aPt1,aPt2; SdrGluePoint aGP1,aGP2; SdrEscapeDirection nEsc1=SdrEscapeDirection::ALL,nEsc2=SdrEscapeDirection::ALL; - Rectangle aBoundRect1; - Rectangle aBoundRect2; - Rectangle aBewareRect1; - Rectangle aBewareRect2; + tools::Rectangle aBoundRect1; + tools::Rectangle aBoundRect2; + tools::Rectangle aBewareRect1; + tools::Rectangle aBewareRect2; // first, get the old corner points if (rTrack0.GetPointCount()!=0) { aPt1=rTrack0[0]; @@ -735,7 +735,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection& aBewareRect1.Top()-=nV; aBewareRect1.Bottom()+=nV; } else { - aBoundRect1=Rectangle(aPt1,aPt1); + aBoundRect1=tools::Rectangle(aPt1,aPt1); aBoundRect1.Move(rCon1.aObjOfs.X(),rCon1.aObjOfs.Y()); aBewareRect1=aBoundRect1; } @@ -758,7 +758,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection& aBewareRect2.Top()-=nV; aBewareRect2.Bottom()+=nV; } else { - aBoundRect2=Rectangle(aPt2,aPt2); + aBoundRect2=tools::Rectangle(aPt2,aPt2); aBoundRect2.Move(rCon2.aObjOfs.X(),rCon2.aObjOfs.Y()); aBewareRect2=aBoundRect2; } @@ -814,8 +814,8 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection& return aBestXP; } -XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rectangle& rBoundRect1, const Rectangle& rBewareRect1, - const Point& rPt2, long nAngle2, const Rectangle& rBoundRect2, const Rectangle& rBewareRect2, +XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const tools::Rectangle& rBoundRect1, const tools::Rectangle& rBewareRect1, + const Point& rPt2, long nAngle2, const tools::Rectangle& rBoundRect2, const tools::Rectangle& rBewareRect2, sal_uIntPtr* pnQuality, SdrEdgeInfoRec* pInfo) const { SdrEdgeKind eKind=static_cast<const SdrEdgeKindItem&>(GetObjectItem(SDRATTR_EDGEKIND)).GetValue(); @@ -842,10 +842,10 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec } Point aPt1(rPt1); Point aPt2(rPt2); - Rectangle aBoundRect1 (rBoundRect1 ); - Rectangle aBoundRect2 (rBoundRect2 ); - Rectangle aBewareRect1(rBewareRect1); - Rectangle aBewareRect2(rBewareRect2); + tools::Rectangle aBoundRect1 (rBoundRect1 ); + tools::Rectangle aBoundRect2 (rBoundRect2 ); + tools::Rectangle aBewareRect1(rBewareRect1); + tools::Rectangle aBewareRect2(rBewareRect2); Point aMeeting((aPt1.X()+aPt2.X()+1)/2,(aPt1.Y()+aPt2.Y()+1)/2); if (eKind==SdrEdgeKind::OneLine) { XPolygon aXP(2); @@ -998,10 +998,10 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec // normalization; be aR1 the one exiting to the right, // be aR2 the one exiting to the left - Rectangle aBewR1(bRts1 ? aBewareRect1 : aBewareRect2); - Rectangle aBewR2(bRts1 ? aBewareRect2 : aBewareRect1); - Rectangle aBndR1(bRts1 ? aBoundRect1 : aBoundRect2); - Rectangle aBndR2(bRts1 ? aBoundRect2 : aBoundRect1); + tools::Rectangle aBewR1(bRts1 ? aBewareRect1 : aBewareRect2); + tools::Rectangle aBewR2(bRts1 ? aBewareRect2 : aBewareRect1); + tools::Rectangle aBndR1(bRts1 ? aBoundRect1 : aBoundRect2); + tools::Rectangle aBndR2(bRts1 ? aBoundRect2 : aBoundRect1); if (aBewR1.Bottom()>aBewR2.Top() && aBewR1.Top()<aBewR2.Bottom()) { // overlap on y axis; cases 2.1, 2.8, 2.9 if (aBewR1.Right()>aBewR2.Left()) { @@ -1060,10 +1060,10 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec } } } else if (bVer1) { // both horizontal - Rectangle aBewR1(bUnt1 ? aBewareRect1 : aBewareRect2); - Rectangle aBewR2(bUnt1 ? aBewareRect2 : aBewareRect1); - Rectangle aBndR1(bUnt1 ? aBoundRect1 : aBoundRect2); - Rectangle aBndR2(bUnt1 ? aBoundRect2 : aBoundRect1); + tools::Rectangle aBewR1(bUnt1 ? aBewareRect1 : aBewareRect2); + tools::Rectangle aBewR2(bUnt1 ? aBewareRect2 : aBewareRect1); + tools::Rectangle aBndR1(bUnt1 ? aBoundRect1 : aBoundRect2); + tools::Rectangle aBndR2(bUnt1 ? aBoundRect2 : aBoundRect1); if (aBewR1.Right()>aBewR2.Left() && aBewR1.Left()<aBewR2.Right()) { // overlap on y axis; cases 2.1, 2.8, 2.9 if (aBewR1.Bottom()>aBewR2.Top()) { @@ -1171,8 +1171,8 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec */ // case 3.2 - Rectangle aTmpR1(aBewareRect1); - Rectangle aTmpR2(aBewareRect2); + tools::Rectangle aTmpR1(aBewareRect1); + tools::Rectangle aTmpR2(aBewareRect2); if (bBewareOverlap) { // overlapping BewareRects: use BoundRects for checking for case 3.2 aTmpR1=aBoundRect1; @@ -1590,7 +1590,7 @@ void SdrEdgeObj::Notify(SfxBroadcaster& rBC, const SfxHint& rHint) (pSdrHint && pSdrHint->GetKind()==SdrHintKind::ObjectRemoved)) { // broadcasting only, if on the same page - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetCurrentBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetCurrentBoundRect(); ImpDirtyEdgeTrack(); // only redraw here, object hasn't actually changed @@ -1691,7 +1691,7 @@ void SdrEdgeObj::SetEdgeTrackPath( const basegfx::B2DPolyPolygon& rPoly ) bEdgeTrackUserDefined = true; // #i110629# also set aRect and maSnapeRect depending on pEdgeTrack - const Rectangle aPolygonBounds(pEdgeTrack->GetBoundRect()); + const tools::Rectangle aPolygonBounds(pEdgeTrack->GetBoundRect()); maRect = aPolygonBounds; maSnapRect = aPolygonBounds; } @@ -2100,7 +2100,7 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrO sal_uInt16 nMarkHdSiz=rPV.GetView().GetMarkHdlSizePixel(); Size aHalfConSiz(nMarkHdSiz,nMarkHdSiz); aHalfConSiz=pOut->PixelToLogic(aHalfConSiz); - Rectangle aMouseRect(rPt,rPt); + tools::Rectangle aMouseRect(rPt,rPt); aMouseRect.Left() -=aHalfConSiz.Width(); aMouseRect.Top() -=aHalfConSiz.Height(); aMouseRect.Right() +=aHalfConSiz.Width(); @@ -2119,7 +2119,7 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrO (pThis==nullptr || pObj!=static_cast<SdrObject const *>(pThis)) && // don't connect it to itself pObj->IsNode()) { - Rectangle aObjBound(pObj->GetCurrentBoundRect()); + tools::Rectangle aObjBound(pObj->GetCurrentBoundRect()); if (aObjBound.IsOver(aMouseRect)) { aTestCon.ResetVars(); bool bEdge=dynamic_cast<const SdrEdgeObj *>(pObj) != nullptr; // no BestCon for Edge @@ -2194,7 +2194,7 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrO } } if (bFnd) { - Rectangle aMouseRect2(rPt,rPt); + tools::Rectangle aMouseRect2(rPt,rPt); aMouseRect.Left() -=nBoundHitTol; aMouseRect.Top() -=nBoundHitTol; aMouseRect.Right() +=nBoundHitTol; @@ -2209,9 +2209,9 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrO return bFnd; } -void SdrEdgeObj::NbcSetSnapRect(const Rectangle& rRect) +void SdrEdgeObj::NbcSetSnapRect(const tools::Rectangle& rRect) { - const Rectangle aOld(GetSnapRect()); + const tools::Rectangle aOld(GetSnapRect()); if(aOld != rRect) { @@ -2499,7 +2499,7 @@ void SdrEdgeObj::SetTailPoint( bool bTail, const Point& rPt ) */ void SdrEdgeObj::setGluePointIndex( bool bTail, sal_Int32 nIndex /* = -1 */ ) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetCurrentBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetCurrentBoundRect(); SdrObjConnection& rConn1 = GetConnection( bTail ); diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 526202639e90..62f73c21d8b9 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -350,7 +350,7 @@ SdrGrafObj::SdrGrafObj() mbSupportTextIndentingOnLineWidthChange = false; } -SdrGrafObj::SdrGrafObj(const Graphic& rGrf, const Rectangle& rRect) +SdrGrafObj::SdrGrafObj(const Graphic& rGrf, const tools::Rectangle& rRect) : SdrRectObj ( rRect ), pGraphicLink ( nullptr ), bMirrored ( false ) @@ -878,7 +878,7 @@ basegfx::B2DPolyPolygon SdrGrafObj::TakeXorPoly() const // take grown rectangle const sal_Int32 nHalfLineWidth(ImpGetLineWdt() / 2); - const Rectangle aGrownRect( + const tools::Rectangle aGrownRect( maRect.Left() - nHalfLineWidth, maRect.Top() - nHalfLineWidth, maRect.Right() + nHalfLineWidth, @@ -1027,7 +1027,7 @@ GDIMetaFile SdrGrafObj::getMetafileFromEmbeddedSvg() const if(isEmbeddedSvg() && GetModel()) { ScopedVclPtrInstance< VirtualDevice > pOut; - const Rectangle aBoundRect(GetCurrentBoundRect()); + const tools::Rectangle aBoundRect(GetCurrentBoundRect()); const MapMode aMap(GetModel()->GetScaleUnit(), Point(), GetModel()->GetScaleFraction(), GetModel()->GetScaleFraction()); pOut->EnableOutput(false); @@ -1221,7 +1221,7 @@ void SdrGrafObj::ImpSetAttrToGrafInfo() SetRectsDirty(); } -void SdrGrafObj::AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly ) +void SdrGrafObj::AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrinkOnly ) { Size aSize; Size aMaxSize( rMaxRect.GetSize() ); @@ -1267,7 +1267,7 @@ void SdrGrafObj::AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly ) aPos.X() -= aSize.Width() / 2; aPos.Y() -= aSize.Height() / 2; - SetLogicRect( Rectangle( aPos, aSize ) ); + SetLogicRect( tools::Rectangle( aPos, aSize ) ); } } diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx index 62a368220264..3ba147e89433 100644 --- a/svx/source/svdraw/svdogrp.cxx +++ b/svx/source/svdraw/svdogrp.cxx @@ -218,7 +218,7 @@ SdrObjList* SdrObjGroup::GetSubList() const return pSub.get(); } -const Rectangle& SdrObjGroup::GetCurrentBoundRect() const +const tools::Rectangle& SdrObjGroup::GetCurrentBoundRect() const { // <aOutRect> has to contain the bounding rectangle if ( pSub->GetObjCount()!=0 ) @@ -229,7 +229,7 @@ const Rectangle& SdrObjGroup::GetCurrentBoundRect() const return aOutRect; } -const Rectangle& SdrObjGroup::GetSnapRect() const +const tools::Rectangle& SdrObjGroup::GetSnapRect() const { // <aOutRect> has to contain the bounding rectangle if ( pSub->GetObjCount()!=0 ) @@ -369,9 +369,9 @@ long SdrObjGroup::GetShearAngle(bool /*bVertical*/) const } -void SdrObjGroup::NbcSetSnapRect(const Rectangle& rRect) +void SdrObjGroup::NbcSetSnapRect(const tools::Rectangle& rRect) { - Rectangle aOld(GetSnapRect()); + tools::Rectangle aOld(GetSnapRect()); long nMulX=rRect.Right()-rRect.Left(); long nDivX=aOld.Right()-aOld.Left(); long nMulY=rRect.Bottom()-rRect.Top(); @@ -389,7 +389,7 @@ void SdrObjGroup::NbcSetSnapRect(const Rectangle& rRect) } -void SdrObjGroup::NbcSetLogicRect(const Rectangle& rRect) +void SdrObjGroup::NbcSetLogicRect(const tools::Rectangle& rRect) { NbcSetSnapRect(rRect); } @@ -503,10 +503,10 @@ void SdrObjGroup::NbcSetAnchorPos(const Point& rPnt) } -void SdrObjGroup::SetSnapRect(const Rectangle& rRect) +void SdrObjGroup::SetSnapRect(const tools::Rectangle& rRect) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); - Rectangle aOld(GetSnapRect()); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aOld(GetSnapRect()); long nMulX=rRect.Right()-rRect.Left(); long nDivX=aOld.Right()-aOld.Left(); long nMulY=rRect.Bottom()-rRect.Top(); @@ -528,7 +528,7 @@ void SdrObjGroup::SetSnapRect(const Rectangle& rRect) } -void SdrObjGroup::SetLogicRect(const Rectangle& rRect) +void SdrObjGroup::SetLogicRect(const tools::Rectangle& rRect) { SetSnapRect(rRect); } @@ -537,7 +537,7 @@ void SdrObjGroup::SetLogicRect(const Rectangle& rRect) void SdrObjGroup::Move(const Size& rSiz) { if (rSiz.Width()!=0 || rSiz.Height()!=0) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); MovePoint(aRefPoint,rSiz); if (pSub->GetObjCount()!=0) { // first move the connectors, then everything else @@ -581,7 +581,7 @@ void SdrObjGroup::Resize(const Point& rRef, const Fraction& xFact, const Fractio NbcMirrorGluePoints(aRef1,aRef2); } } - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); ResizePoint(aRefPoint,rRef,xFact,yFact); if (pSub->GetObjCount()!=0) { // move the connectors first, everything else afterwards @@ -611,7 +611,7 @@ void SdrObjGroup::Rotate(const Point& rRef, long nAngle, double sn, double cs) { if (nAngle!=0) { SetGlueReallyAbsolute(true); - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); RotatePoint(aRefPoint,rRef,sn,cs); // move the connectors first, everything else afterwards SdrObjList* pOL=pSub.get(); @@ -636,7 +636,7 @@ void SdrObjGroup::Rotate(const Point& rRef, long nAngle, double sn, double cs) void SdrObjGroup::Mirror(const Point& rRef1, const Point& rRef2) { SetGlueReallyAbsolute(true); - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); MirrorPoint(aRefPoint,rRef1,rRef2); // implementation missing in SvdEtc! // move the connectors first, everything else afterwards SdrObjList* pOL=pSub.get(); @@ -661,7 +661,7 @@ void SdrObjGroup::Shear(const Point& rRef, long nAngle, double tn, bool bVShear) { if (nAngle!=0) { SetGlueReallyAbsolute(true); - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); ShearPoint(aRefPoint,rRef,tn); // move the connectors first, everything else afterwards SdrObjList* pOL=pSub.get(); @@ -685,7 +685,7 @@ void SdrObjGroup::Shear(const Point& rRef, long nAngle, double tn, bool bVShear) void SdrObjGroup::SetAnchorPos(const Point& rPnt) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); bool bChg=aAnchor!=rPnt; aAnchor=rPnt; Size aSiz(rPnt.X()-aAnchor.X(),rPnt.Y()-aAnchor.Y()); diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx index c29523910dd3..7f4654b211dd 100644 --- a/svx/source/svdraw/svdomeas.cxx +++ b/svx/source/svdraw/svdomeas.cxx @@ -634,7 +634,7 @@ void SdrMeasureObj::UndirtyText() const } } -void SdrMeasureObj::TakeUnrotatedSnapRect(Rectangle& rRect) const +void SdrMeasureObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const { if (bTextDirty) UndirtyText(); ImpMeasureRec aRec; @@ -719,7 +719,7 @@ void SdrMeasureObj::TakeUnrotatedSnapRect(Rectangle& rRect) const } RotatePoint(aTextPos,aPt1b,aMPol.nLineSin,aMPol.nLineCos); aTextSize2.Width()++; aTextSize2.Height()++; // because of the Rect-Ctor's odd behavior - rRect=Rectangle(aTextPos,aTextSize2); + rRect=tools::Rectangle(aTextPos,aTextSize2); rRect.Justify(); const_cast<SdrMeasureObj*>(this)->maRect=rRect; @@ -1294,20 +1294,20 @@ void SdrMeasureObj::NbcSetOutlinerParaObject(OutlinerParaObject* pTextObject) SetTextDirty(); // recalculate text } -void SdrMeasureObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText, - Rectangle* pAnchorRect, bool bLineWidth ) const +void SdrMeasureObj::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRect, bool bNoEditText, + tools::Rectangle* pAnchorRect, bool bLineWidth ) const { if (bTextDirty) UndirtyText(); SdrTextObj::TakeTextRect( rOutliner, rTextRect, bNoEditText, pAnchorRect, bLineWidth ); } -void SdrMeasureObj::TakeTextAnchorRect(Rectangle& rAnchorRect) const +void SdrMeasureObj::TakeTextAnchorRect(tools::Rectangle& rAnchorRect) const { if (bTextDirty) UndirtyText(); SdrTextObj::TakeTextAnchorRect(rAnchorRect); } -void SdrMeasureObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const +void SdrMeasureObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin) const { if (bTextDirty) UndirtyText(); SdrTextObj::TakeTextEditArea(pPaperMin,pPaperMax,pViewInit,pViewMin); @@ -1469,7 +1469,7 @@ void SdrMeasureObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, cons if(aNewPt1 != aPt1 || aNewPt2 != aPt2) { // set model values and broadcast - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); aPt1 = aNewPt1; aPt2 = aNewPt2; diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx index 993ebd93b213..d80f5206ac17 100644 --- a/svx/source/svdraw/svdomedia.cxx +++ b/svx/source/svdraw/svdomedia.cxx @@ -82,7 +82,7 @@ SdrMediaObj::SdrMediaObj() { } -SdrMediaObj::SdrMediaObj( const Rectangle& rRect ) +SdrMediaObj::SdrMediaObj( const tools::Rectangle& rRect ) : SdrRectObj( rRect ) , m_xImpl( new Impl ) { @@ -182,7 +182,7 @@ const uno::Reference< graphic::XGraphic > SdrMediaObj::getSnapshot() const return m_xImpl->m_xCachedSnapshot; } -void SdrMediaObj::AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly /* = false */ ) +void SdrMediaObj::AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrinkOnly /* = false */ ) { Size aSize( Application::GetDefaultDevice()->PixelToLogic( static_cast< sdr::contact::ViewContactOfSdrMediaObj& >( GetViewContact() ).getPreferredSize(), @@ -224,7 +224,7 @@ void SdrMediaObj::AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly / aPos.X() -= aSize.Width() / 2; aPos.Y() -= aSize.Height() / 2; - SetLogicRect( Rectangle( aPos, aSize ) ); + SetLogicRect( tools::Rectangle( aPos, aSize ) ); } } diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index 030cafcc8490..368417306bac 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -134,7 +134,7 @@ public: void setWindow(const uno::Reference< awt::XWindow >& _xWindow); private: - Rectangle impl_getScaledRect_nothrow() const; + tools::Rectangle impl_getScaledRect_nothrow() const; // XStateChangeListener virtual void SAL_CALL changingState( const css::lang::EventObject& aEvent, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) override; virtual void SAL_CALL stateChanged( const css::lang::EventObject& aEvent, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) override; @@ -172,9 +172,9 @@ SdrLightEmbeddedClient_Impl::SdrLightEmbeddedClient_Impl( SdrOle2Obj* pObj ) : mpObj( pObj ) { } -Rectangle SdrLightEmbeddedClient_Impl::impl_getScaledRect_nothrow() const +tools::Rectangle SdrLightEmbeddedClient_Impl::impl_getScaledRect_nothrow() const { - Rectangle aLogicRect( mpObj->GetLogicRect() ); + tools::Rectangle aLogicRect( mpObj->GetLogicRect() ); // apply scaling to object area and convert to pixels aLogicRect.SetSize( Size( Fraction( aLogicRect.GetWidth() ) * m_aScaleWidth, Fraction( aLogicRect.GetHeight() ) * m_aScaleHeight ) ); @@ -236,7 +236,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::notifyEvent( const document::EventObj MapUnit aObjMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( mpObj->GetObjRef()->getMapUnit( mpObj->GetAspect() ) ); - Rectangle aVisArea; + tools::Rectangle aVisArea; awt::Size aSz; try { @@ -259,7 +259,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::notifyEvent( const document::EventObj aVisArea = OutputDevice::LogicToLogic( aVisArea, aObjMapUnit, aContainerMapUnit ); Size aScaledSize( static_cast< long >( m_aScaleWidth * Fraction( aVisArea.GetWidth() ) ), static_cast< long >( m_aScaleHeight * Fraction( aVisArea.GetHeight() ) ) ); - Rectangle aLogicRect( mpObj->GetLogicRect() ); + tools::Rectangle aLogicRect( mpObj->GetLogicRect() ); // react to the change if the difference is bigger than one pixel Size aPixelDiff = @@ -269,7 +269,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::notifyEvent( const document::EventObj aContainerMapUnit ); if( aPixelDiff.Width() || aPixelDiff.Height() ) { - mpObj->SetLogicRect( Rectangle( aLogicRect.TopLeft(), aScaledSize ) ); + mpObj->SetLogicRect( tools::Rectangle( aLogicRect.TopLeft(), aScaledSize ) ); mpObj->BroadcastObjectChange(); } else @@ -311,13 +311,13 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::visibilityChanged( sal_Bool /*bVisibl // TODO/LATER: when writer uses this implementation the code could be shared with SfxInPlaceClient_Impl if ( mpObj ) { - Rectangle aLogicRect( mpObj->GetLogicRect() ); + tools::Rectangle aLogicRect( mpObj->GetLogicRect() ); Size aLogicSize( aLogicRect.GetWidth(), aLogicRect.GetHeight() ); if( mpObj->IsChart() ) { //charts never should be stretched see #i84323# for example - mpObj->SetLogicRect( Rectangle( aLogicRect.TopLeft(), aLogicSize ) ); + mpObj->SetLogicRect( tools::Rectangle( aLogicRect.TopLeft(), aLogicSize ) ); mpObj->BroadcastObjectChange(); } // if( mpObj->IsChart() ) } @@ -442,7 +442,7 @@ awt::Rectangle SAL_CALL SdrLightEmbeddedClient_Impl::getPlacement() if ( !mpObj ) throw uno::RuntimeException(); - Rectangle aLogicRect = impl_getScaledRect_nothrow(); + tools::Rectangle aLogicRect = impl_getScaledRect_nothrow(); MapUnit aContainerMapUnit( MapUnit::Map100thMM ); uno::Reference< embed::XVisualObject > xParentVis( mpObj->GetParentXModel(), uno::UNO_QUERY ); if ( xParentVis.is() ) @@ -475,8 +475,8 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::changedPlacement( const awt::Rectangl // check if the change is at least one pixel in size awt::Rectangle aOldRect = getPlacement(); - Rectangle aNewPixelRect = VCLRectangle( aPosRect ); - Rectangle aOldPixelRect = VCLRectangle( aOldRect ); + tools::Rectangle aNewPixelRect = VCLRectangle( aPosRect ); + tools::Rectangle aOldPixelRect = VCLRectangle( aOldRect ); if ( aOldPixelRect == aNewPixelRect ) // nothing has changed return; @@ -487,8 +487,8 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::changedPlacement( const awt::Rectangl if ( xParentVis.is() ) aContainerMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xParentVis->getMapUnit( mpObj->GetAspect() ) ); - Rectangle aNewLogicRect = Application::GetDefaultDevice()->PixelToLogic(aNewPixelRect,aContainerMapUnit); - Rectangle aLogicRect = impl_getScaledRect_nothrow(); + tools::Rectangle aNewLogicRect = Application::GetDefaultDevice()->PixelToLogic(aNewPixelRect,aContainerMapUnit); + tools::Rectangle aLogicRect = impl_getScaledRect_nothrow(); if ( aNewLogicRect != aLogicRect ) { @@ -510,7 +510,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::changedPlacement( const awt::Rectangl aContainerMapUnit ); if( aPixelDiff.Width() || aPixelDiff.Height() ) { - mpObj->SetLogicRect( Rectangle( aLogicRect.TopLeft(), aNewObjSize ) ); + mpObj->SetLogicRect( tools::Rectangle( aLogicRect.TopLeft(), aNewObjSize ) ); mpObj->BroadcastObjectChange(); } else @@ -700,7 +700,7 @@ SdrOle2Obj::SdrOle2Obj( bool bFrame_ ) : { } -SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, const OUString& rNewObjName, const Rectangle& rNewRect) : +SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, const OUString& rNewObjName, const tools::Rectangle& rNewRect) : SdrRectObj(rNewRect), mpImpl(new SdrOle2ObjImpl(false/*bFrame_*/, rNewObjRef)) { @@ -1644,7 +1644,7 @@ void SdrOle2Obj::ImpSetVisAreaSize() catch( embed::NoVisualAreaSizeException& ) {} - Rectangle aAcceptedVisArea; + tools::Rectangle aAcceptedVisArea; aAcceptedVisArea.SetSize( Size( (long)( Fraction( long( aSz.Width ) ) * aScaleWidth ), (long)( Fraction( long( aSz.Height ) ) * aScaleHeight ) ) ); if (aVisSize != aAcceptedVisArea.GetSize()) @@ -1680,7 +1680,7 @@ void SdrOle2Obj::ImpSetVisAreaSize() { if ( pClient ) { - Rectangle aScaleRect(maRect.TopLeft(), aObjAreaSize); + tools::Rectangle aScaleRect(maRect.TopLeft(), aObjAreaSize); pClient->SetObjAreaAndScale( aScaleRect, aScaleWidth, aScaleHeight); } else @@ -1703,7 +1703,7 @@ void SdrOle2Obj::ImpSetVisAreaSize() Point aBR( maRect.BottomRight() ); Point aTL2( OutputDevice::LogicToLogic( aTL, pModel->GetScaleUnit(), aMapUnit) ); Point aBR2( OutputDevice::LogicToLogic( aBR, pModel->GetScaleUnit(), aMapUnit) ); - Rectangle aNewRect( aTL2, aBR2 ); + tools::Rectangle aNewRect( aTL2, aBR2 ); xVisualObject->setVisualAreaSize( GetAspect(), awt::Size( aNewRect.GetWidth(), aNewRect.GetHeight() ) ); } } @@ -1737,7 +1737,7 @@ void SdrOle2Obj::SetGeoData(const SdrObjGeoData& rGeo) ImpSetVisAreaSize(); } -void SdrOle2Obj::NbcSetSnapRect(const Rectangle& rRect) +void SdrOle2Obj::NbcSetSnapRect(const tools::Rectangle& rRect) { SdrRectObj::NbcSetSnapRect(rRect); @@ -1753,7 +1753,7 @@ void SdrOle2Obj::NbcSetSnapRect(const Rectangle& rRect) } } -void SdrOle2Obj::NbcSetLogicRect(const Rectangle& rRect) +void SdrOle2Obj::NbcSetLogicRect(const tools::Rectangle& rRect) { SdrRectObj::NbcSetLogicRect(rRect); diff --git a/svx/source/svdraw/svdopage.cxx b/svx/source/svdraw/svdopage.cxx index 02f2dfcbceaf..d1117caff580 100644 --- a/svx/source/svdraw/svdopage.cxx +++ b/svx/source/svdraw/svdopage.cxx @@ -74,7 +74,7 @@ SdrPageObj::SdrPageObj(SdrPage* pNewPage) } } -SdrPageObj::SdrPageObj(const Rectangle& rRect, SdrPage* pNewPage) +SdrPageObj::SdrPageObj(const tools::Rectangle& rRect, SdrPage* pNewPage) : mpShownPage(pNewPage) { if(mpShownPage) diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index 91a03fad70a3..595c004b531e 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -742,7 +742,7 @@ bool ImpPathForDragAndCreate::movePathDrag( SdrDragStat& rDrag ) const if (bPnt1) rDrag.Now()=aNeuPos1; if (bPnt2) rDrag.Now()=aNeuPos2; } - rDrag.SetActionRect(Rectangle(rDrag.GetNow(),rDrag.GetNow())); + rDrag.SetActionRect(tools::Rectangle(rDrag.GetNow(),rDrag.GetNow())); // specially for IBM: Eliminate points if both adjoining lines form near 180 degrees angle anyway if (!bControl && rDrag.GetView()!=nullptr && rDrag.GetView()->IsEliminatePolyPoints() && @@ -1694,11 +1694,11 @@ static bool lcl_ImpIsLine(const basegfx::B2DPolyPolygon& rPolyPolygon) return (1L == rPolyPolygon.count() && 2L == rPolyPolygon.getB2DPolygon(0L).count()); } -static Rectangle lcl_ImpGetBoundRect(const basegfx::B2DPolyPolygon& rPolyPolygon) +static tools::Rectangle lcl_ImpGetBoundRect(const basegfx::B2DPolyPolygon& rPolyPolygon) { basegfx::B2DRange aRange(basegfx::tools::getRange(rPolyPolygon)); - return Rectangle( + return tools::Rectangle( FRound(aRange.getMinX()), FRound(aRange.getMinY()), FRound(aRange.getMaxX()), FRound(aRange.getMaxY())); } @@ -1720,7 +1720,7 @@ void SdrPathObj::ImpForceLineAngle() aGeo.RecalcTan(); // for SdrTextObj, keep aRect up to date - maRect = Rectangle(aPoint0, aPoint1); + maRect = tools::Rectangle(aPoint0, aPoint1); maRect.Justify(); } } @@ -2415,7 +2415,7 @@ void SdrPathObj::NbcMirror(const Point& rRefPnt1, const Point& rRefPnt2) SdrTextObj::NbcMirror(rRefPnt1,rRefPnt2); } -void SdrPathObj::TakeUnrotatedSnapRect(Rectangle& rRect) const +void SdrPathObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const { if(!aGeo.nRotationAngle) { @@ -2441,9 +2441,9 @@ void SdrPathObj::RecalcSnapRect() } } -void SdrPathObj::NbcSetSnapRect(const Rectangle& rRect) +void SdrPathObj::NbcSetSnapRect(const tools::Rectangle& rRect) { - Rectangle aOld(GetSnapRect()); + tools::Rectangle aOld(GetSnapRect()); // Take RECT_EMPTY into account when calculating scale factors long nMulX = (RECT_EMPTY == rRect.Right()) ? 0 : rRect.Right() - rRect.Left(); @@ -2810,7 +2810,7 @@ void SdrPathObj::SetPathPoly(const basegfx::B2DPolyPolygon& rPathPoly) { if(GetPathPoly() != rPathPoly) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcSetPathPoly(rPathPoly); SetChanged(); BroadcastObjectChange(); @@ -2820,7 +2820,7 @@ void SdrPathObj::SetPathPoly(const basegfx::B2DPolyPolygon& rPathPoly) void SdrPathObj::ToggleClosed() { - Rectangle aBoundRect0; + tools::Rectangle aBoundRect0; if(pUserCall != nullptr) aBoundRect0 = GetLastBoundRect(); ImpSetClosed(!IsClosed()); // set new ObjKind diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx index 8e07df00e16c..52b706497f8e 100644 --- a/svx/source/svdraw/svdorect.cxx +++ b/svx/source/svdraw/svdorect.cxx @@ -68,7 +68,7 @@ SdrRectObj::SdrRectObj() bClosedObj=true; } -SdrRectObj::SdrRectObj(const Rectangle& rRect) +SdrRectObj::SdrRectObj(const tools::Rectangle& rRect) : SdrTextObj(rRect), mpXPoly(nullptr) { @@ -85,7 +85,7 @@ SdrRectObj::SdrRectObj(SdrObjKind eNewTextKind) bClosedObj=true; } -SdrRectObj::SdrRectObj(SdrObjKind eNewTextKind, const Rectangle& rRect) +SdrRectObj::SdrRectObj(SdrObjKind eNewTextKind, const tools::Rectangle& rRect) : SdrTextObj(eNewTextKind,rRect), mpXPoly(nullptr) { @@ -119,7 +119,7 @@ void SdrRectObj::SetXPolyDirty() mpXPoly.reset(); } -XPolygon SdrRectObj::ImpCalcXPoly(const Rectangle& rRect1, long nRad1) const +XPolygon SdrRectObj::ImpCalcXPoly(const tools::Rectangle& rRect1, long nRad1) const { XPolygon aXPoly(rRect1,nRad1,nRad1); const sal_uInt16 nPointAnz(aXPoly.GetPointCount()); @@ -194,7 +194,7 @@ sal_uInt16 SdrRectObj::GetObjIdentifier() const else return sal_uInt16(OBJ_RECT); } -void SdrRectObj::TakeUnrotatedSnapRect(Rectangle& rRect) const +void SdrRectObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const { rRect = maRect; if (aGeo.nShearAngle!=0) @@ -293,13 +293,13 @@ void SdrRectObj::RecalcSnapRect() } } -void SdrRectObj::NbcSetSnapRect(const Rectangle& rRect) +void SdrRectObj::NbcSetSnapRect(const tools::Rectangle& rRect) { SdrTextObj::NbcSetSnapRect(rRect); SetXPolyDirty(); } -void SdrRectObj::NbcSetLogicRect(const Rectangle& rRect) +void SdrRectObj::NbcSetLogicRect(const tools::Rectangle& rRect) { SdrTextObj::NbcSetLogicRect(rRect); SetXPolyDirty(); @@ -467,7 +467,7 @@ OUString SdrRectObj::getSpecialDragComment(const SdrDragStat& rDrag) const basegfx::B2DPolyPolygon SdrRectObj::TakeCreatePoly(const SdrDragStat& rDrag) const { - Rectangle aRect1; + tools::Rectangle aRect1; rDrag.TakeCreateRect(aRect1); aRect1.Justify(); diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 25b8d527ae63..abbdb1117585 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -103,7 +103,7 @@ SdrTextObj::SdrTextObj() mbInDownScale = false; } -SdrTextObj::SdrTextObj(const Rectangle& rNewRect) +SdrTextObj::SdrTextObj(const tools::Rectangle& rNewRect) : SdrAttrObj(), maRect(rNewRect), mpText(nullptr), @@ -149,7 +149,7 @@ SdrTextObj::SdrTextObj(SdrObjKind eNewTextKind) mbSupportTextIndentingOnLineWidthChange = true; } -SdrTextObj::SdrTextObj(SdrObjKind eNewTextKind, const Rectangle& rNewRect) +SdrTextObj::SdrTextObj(SdrObjKind eNewTextKind, const tools::Rectangle& rNewRect) : SdrAttrObj(), maRect(rNewRect), mpText(nullptr), @@ -204,7 +204,7 @@ void SdrTextObj::FitFrameToTextSize() aNewSize.Width()++; // because of possible rounding errors aNewSize.Width()+=GetTextLeftDistance()+GetTextRightDistance(); aNewSize.Height()+=GetTextUpperDistance()+GetTextLowerDistance(); - Rectangle aNewRect(maRect); + tools::Rectangle aNewRect(maRect); aNewRect.SetSize(aNewSize); ImpJustifyRect(aNewRect); if (aNewRect!=maRect) { @@ -229,7 +229,7 @@ void SdrTextObj::NbcSetText(const OUString& rStr) void SdrTextObj::SetText(const OUString& rStr) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcSetText(rStr); SetChanged(); BroadcastObjectChange(); @@ -252,7 +252,7 @@ void SdrTextObj::NbcSetText(SvStream& rInput, const OUString& rBaseURL, sal_uInt void SdrTextObj::SetText(SvStream& rInput, const OUString& rBaseURL, sal_uInt16 eFormat) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcSetText(rInput,rBaseURL,eFormat); SetChanged(); BroadcastObjectChange(); @@ -397,7 +397,7 @@ SdrTextVertAdjust SdrTextObj::GetTextVerticalAdjust(const SfxItemSet& rSet) cons return eRet; } // defaults: TOP for text frame, CENTER for captions of drawing objects -void SdrTextObj::ImpJustifyRect(Rectangle& rRect) +void SdrTextObj::ImpJustifyRect(tools::Rectangle& rRect) { if (!rRect.IsEmpty()) { rRect.Justify(); @@ -581,7 +581,7 @@ void SdrTextObj::AdaptTextMinSize() SetObjectItemSet(aSet); } -void SdrTextObj::ImpSetContourPolygon( SdrOutliner& rOutliner, Rectangle& rAnchorRect, bool bLineWidth ) const +void SdrTextObj::ImpSetContourPolygon( SdrOutliner& rOutliner, tools::Rectangle& rAnchorRect, bool bLineWidth ) const { basegfx::B2DPolyPolygon aXorPolyPolygon(TakeXorPoly()); basegfx::B2DPolyPolygon* pContourPolyPolygon = nullptr; @@ -639,18 +639,18 @@ void SdrTextObj::ImpSetContourPolygon( SdrOutliner& rOutliner, Rectangle& rAncho delete pContourPolyPolygon; } -void SdrTextObj::TakeUnrotatedSnapRect(Rectangle& rRect) const +void SdrTextObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const { rRect=maRect; } -void SdrTextObj::TakeTextAnchorRect(Rectangle& rAnchorRect) const +void SdrTextObj::TakeTextAnchorRect(tools::Rectangle& rAnchorRect) const { long nLeftDist=GetTextLeftDistance(); long nRightDist=GetTextRightDistance(); long nUpperDist=GetTextUpperDistance(); long nLowerDist=GetTextLowerDistance(); - Rectangle aAnkRect(maRect); // the rectangle in which we anchor + tools::Rectangle aAnkRect(maRect); // the rectangle in which we anchor bool bFrame=IsTextFrame(); if (!bFrame) { TakeUnrotatedSnapRect(aAnkRect); @@ -679,10 +679,10 @@ void SdrTextObj::TakeTextAnchorRect(Rectangle& rAnchorRect) const rAnchorRect=aAnkRect; } -void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText, - Rectangle* pAnchorRect, bool bLineWidth ) const +void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRect, bool bNoEditText, + tools::Rectangle* pAnchorRect, bool bLineWidth ) const { - Rectangle aAnkRect; // the rectangle in which we anchor + tools::Rectangle aAnkRect; // the rectangle in which we anchor TakeTextAnchorRect(aAnkRect); SdrTextVertAdjust eVAdj=GetTextVerticalAdjust(); SdrTextHorzAdjust eHAdj=GetTextHorizontalAdjust(); @@ -846,7 +846,7 @@ void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, boo *pAnchorRect=aAnkRect; // rTextRect might not be correct in some cases at ContourFrame - rTextRect=Rectangle(aTextPos,aTextSiz); + rTextRect=tools::Rectangle(aTextPos,aTextSiz); if (bContourFrame) rTextRect=aAnkRect; } @@ -1126,8 +1126,8 @@ basegfx::B2DPolyPolygon SdrTextObj::TakeContour() const // in every case SdrOutliner& rOutliner=ImpGetDrawOutliner(); - Rectangle aAnchor2; - Rectangle aR; + tools::Rectangle aAnchor2; + tools::Rectangle aR; TakeTextRect(rOutliner,aR,false,&aAnchor2); rOutliner.Clear(); bool bFitToSize(IsFitToSize()); @@ -1233,9 +1233,9 @@ SdrOutliner& SdrTextObj::ImpGetDrawOutliner() const // Extracted from Paint() void SdrTextObj::ImpSetupDrawOutlinerForPaint( bool bContourFrame, SdrOutliner& rOutliner, - Rectangle& rTextRect, - Rectangle& rAnchorRect, - Rectangle& rPaintRect, + tools::Rectangle& rTextRect, + tools::Rectangle& rAnchorRect, + tools::Rectangle& rPaintRect, Fraction& rFitXKorreg ) const { if (!bContourFrame) @@ -1337,16 +1337,16 @@ void SdrTextObj::ImpAutoFitText( SdrOutliner& rOutliner, const Size& rTextSize, std::min(sal_uInt16(100),nMinStretchY)); } -void SdrTextObj::SetupOutlinerFormatting( SdrOutliner& rOutl, Rectangle& rPaintRect ) const +void SdrTextObj::SetupOutlinerFormatting( SdrOutliner& rOutl, tools::Rectangle& rPaintRect ) const { ImpInitDrawOutliner( rOutl ); UpdateOutlinerFormatting( rOutl, rPaintRect ); } -void SdrTextObj::UpdateOutlinerFormatting( SdrOutliner& rOutl, Rectangle& rPaintRect ) const +void SdrTextObj::UpdateOutlinerFormatting( SdrOutliner& rOutl, tools::Rectangle& rPaintRect ) const { - Rectangle aTextRect; - Rectangle aAnchorRect; + tools::Rectangle aTextRect; + tools::Rectangle aAnchorRect; Fraction aFitXKorreg(1,1); bool bContourFrame=IsContourTextFrame(); @@ -1441,7 +1441,7 @@ void SdrTextObj::ReformatText() { if(GetOutlinerParaObject()) { - Rectangle aBoundRect0; + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); @@ -1484,7 +1484,7 @@ SdrFitToSizeType SdrTextObj::GetFitToSize() const return eType; } -const Rectangle& SdrTextObj::GetGeoRect() const +const tools::Rectangle& SdrTextObj::GetGeoRect() const { return maRect; } @@ -1549,7 +1549,7 @@ void SdrTextObj::SetVerticalWriting(bool bVertical) SdrTextVertAdjust eVert = static_cast<const SdrTextVertAdjustItem&>(rSet.Get(SDRATTR_TEXT_VERTADJUST)).GetValue(); // rescue object size - Rectangle aObjectRect = GetSnapRect(); + tools::Rectangle aObjectRect = GetSnapRect(); // prepare ItemSet to set exchanged width and height items SfxItemSet aNewSet(*rSet.GetPool(), @@ -1609,7 +1609,7 @@ bool SdrTextObj::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DP double fShearX = (aGeo.nShearAngle / 100.0) * F_PI180; // get aRect, this is the unrotated snaprect - Rectangle aRectangle(maRect); + tools::Rectangle aRectangle(maRect); // fill other values basegfx::B2DTuple aScale(aRectangle.GetWidth(), aRectangle.GetHeight()); @@ -1726,7 +1726,7 @@ void SdrTextObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const b // build and set BaseRect (use scale) Point aPoint = Point(); Size aSize(FRound(aScale.getX()), FRound(aScale.getY())); - Rectangle aBaseRect(aPoint, aSize); + tools::Rectangle aBaseRect(aPoint, aSize); SetSnapRect(aBaseRect); // flip? @@ -1851,13 +1851,13 @@ SdrTextAniDirection SdrTextObj::GetTextAniDirection() const // Get necessary data for text scroll animation. ATM base it on a Text-Metafile and a // painting rectangle. Rotation is excluded from the returned values. GDIMetaFile* SdrTextObj::GetTextScrollMetaFileAndRectangle( - Rectangle& rScrollRectangle, Rectangle& rPaintRectangle) + tools::Rectangle& rScrollRectangle, tools::Rectangle& rPaintRectangle) { GDIMetaFile* pRetval = nullptr; SdrOutliner& rOutliner = ImpGetDrawOutliner(); - Rectangle aTextRect; - Rectangle aAnchorRect; - Rectangle aPaintRect; + tools::Rectangle aTextRect; + tools::Rectangle aAnchorRect; + tools::Rectangle aPaintRect; Fraction aFitXKorreg(1,1); bool bContourFrame(IsContourTextFrame()); @@ -1868,7 +1868,7 @@ GDIMetaFile* SdrTextObj::GetTextScrollMetaFileAndRectangle( ImpSetupDrawOutlinerForPaint( bContourFrame, rOutliner, aTextRect, aAnchorRect, aPaintRect, aFitXKorreg ); aGeo.nRotationAngle = nAngle; - Rectangle aScrollFrameRect(aPaintRect); + tools::Rectangle aScrollFrameRect(aPaintRect); const SfxItemSet& rSet = GetObjectItemSet(); SdrTextAniDirection eDirection = static_cast<const SdrTextAniDirectionItem&>(rSet.Get(SDRATTR_TEXT_ANIDIRECTION)).GetValue(); diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx index 8c6b575df6c4..cf29c117594b 100644 --- a/svx/source/svdraw/svdotxat.cxx +++ b/svx/source/svdraw/svdotxat.cxx @@ -56,7 +56,7 @@ const short PADDING_LENGTH_FOR_STYLE_FAMILY = 5; const sal_Char PADDING_CHARACTER_FOR_STYLE_FAMILY = ' '; } -bool SdrTextObj::AdjustTextFrameWidthAndHeight( Rectangle& rR, bool bHgt, bool bWdt ) const +bool SdrTextObj::AdjustTextFrameWidthAndHeight( tools::Rectangle& rR, bool bHgt, bool bWdt ) const { if (!bTextFrame) // Not a text frame. Bail out. @@ -87,7 +87,7 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight( Rectangle& rR, bool bHgt, bool b bool bHScroll = bScroll && (eAniDir == SdrTextAniDirection::Left || eAniDir == SdrTextAniDirection::Right); bool bVScroll = bScroll && (eAniDir == SdrTextAniDirection::Up || eAniDir == SdrTextAniDirection::Down); - Rectangle aOldRect = rR; + tools::Rectangle aOldRect = rR; long nHgt = 0, nMinHgt = 0, nMaxHgt = 0; long nWdt = 0, nMinWdt = 0, nMaxWdt = 0; @@ -275,10 +275,10 @@ bool SdrTextObj::NbcAdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) bool SdrTextObj::AdjustTextFrameWidthAndHeight() { - Rectangle aNeuRect(maRect); + tools::Rectangle aNeuRect(maRect); bool bRet=AdjustTextFrameWidthAndHeight(aNeuRect); if (bRet) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); maRect = aNeuRect; SetRectsDirty(); if (dynamic_cast<const SdrRectObj *>(this) != nullptr) { // this is a hack diff --git a/svx/source/svdraw/svdotxdr.cxx b/svx/source/svdraw/svdotxdr.cxx index 93b0fad4aac1..4c020a82bfdf 100644 --- a/svx/source/svdraw/svdotxdr.cxx +++ b/svx/source/svdraw/svdotxdr.cxx @@ -68,9 +68,9 @@ bool SdrTextObj::hasSpecialDrag() const return true; } -Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const +tools::Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const { - Rectangle aTmpRect(maRect); + tools::Rectangle aTmpRect(maRect); const SdrHdl* pHdl=rDrag.GetHdl(); SdrHdlKind eHdl=pHdl==nullptr ? SdrHdlKind::Move : pHdl->GetKind(); bool bEcke=(eHdl==SdrHdlKind::UpperLeft || eHdl==SdrHdlKind::UpperRight || eHdl==SdrHdlKind::LowerLeft || eHdl==SdrHdlKind::LowerRight); @@ -147,7 +147,7 @@ Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const bool SdrTextObj::applySpecialDrag(SdrDragStat& rDrag) { - Rectangle aNewRect(ImpDragCalcRect(rDrag)); + tools::Rectangle aNewRect(ImpDragCalcRect(rDrag)); if(aNewRect.TopLeft() != maRect.TopLeft() && (aGeo.nRotationAngle || aGeo.nShearAngle)) { @@ -183,7 +183,7 @@ OUString SdrTextObj::getSpecialDragComment(const SdrDragStat& /*rDrag*/) const bool SdrTextObj::BegCreate(SdrDragStat& rStat) { rStat.SetOrtho4Possible(); - Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); + tools::Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); aRect1.Justify(); rStat.SetActionRect(aRect1); maRect = aRect1; @@ -192,7 +192,7 @@ bool SdrTextObj::BegCreate(SdrDragStat& rStat) bool SdrTextObj::MovCreate(SdrDragStat& rStat) { - Rectangle aRect1; + tools::Rectangle aRect1; rStat.TakeCreateRect(aRect1); ImpJustifyRect(aRect1); rStat.SetActionRect(aRect1); @@ -230,7 +230,7 @@ bool SdrTextObj::BckCreate(SdrDragStat& /*rStat*/) basegfx::B2DPolyPolygon SdrTextObj::TakeCreatePoly(const SdrDragStat& rDrag) const { - Rectangle aRect1; + tools::Rectangle aRect1; rDrag.TakeCreateRect(aRect1); aRect1.Justify(); diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx index 5368dc0c0e17..35b34a36c1de 100644 --- a/svx/source/svdraw/svdotxed.cxx +++ b/svx/source/svdraw/svdotxed.cxx @@ -102,8 +102,8 @@ bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl) } if (bFitToSize) { - Rectangle aAnchorRect; - Rectangle aTextRect; + tools::Rectangle aAnchorRect; + tools::Rectangle aTextRect; TakeTextRect(rOutl, aTextRect, false, &aAnchorRect); Fraction aFitXKorreg(1,1); @@ -134,7 +134,7 @@ void ImpUpdateOutlParamsForOverflow(SdrOutliner *pOutl, SdrTextObj *pTextObj) // Code from ImpSetTextEditParams Size aPaperMin; Size aPaperMax; - Rectangle aEditArea; + tools::Rectangle aEditArea; pTextObj->TakeTextEditArea(&aPaperMin,&aPaperMax,&aEditArea,nullptr); pOutl->SetMinAutoPaperSize(aPaperMin); @@ -142,11 +142,11 @@ void ImpUpdateOutlParamsForOverflow(SdrOutliner *pOutl, SdrTextObj *pTextObj) pOutl->SetPaperSize(Size()); } -void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const +void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin) const { bool bFitToSize(IsFitToSize()); Size aPaperMin,aPaperMax; - Rectangle aViewInit; + tools::Rectangle aViewInit; TakeTextAnchorRect(aViewInit); if (aGeo.nRotationAngle!=0) { Point aCenter(aViewInit.Center()); @@ -383,14 +383,14 @@ void SdrTextObj::ImpSetTextEditParams() const if (bUpdMerk) pEdtOutl->SetUpdateMode(false); Size aPaperMin; Size aPaperMax; - Rectangle aEditArea; + tools::Rectangle aEditArea; TakeTextEditArea(&aPaperMin,&aPaperMax,&aEditArea,nullptr); bool bContourFrame=IsContourTextFrame(); pEdtOutl->SetMinAutoPaperSize(aPaperMin); pEdtOutl->SetMaxAutoPaperSize(aPaperMax); pEdtOutl->SetPaperSize(Size()); if (bContourFrame) { - Rectangle aAnchorRect; + tools::Rectangle aAnchorRect; TakeTextAnchorRect(aAnchorRect); ImpSetContourPolygon(*pEdtOutl,aAnchorRect, true); } diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx index 01c5a79225a9..995e4cd0469f 100644 --- a/svx/source/svdraw/svdotxtr.cxx +++ b/svx/source/svdraw/svdotxtr.cxx @@ -40,12 +40,12 @@ using namespace com::sun::star; -void SdrTextObj::NbcSetSnapRect(const Rectangle& rRect) +void SdrTextObj::NbcSetSnapRect(const tools::Rectangle& rRect) { if (aGeo.nRotationAngle!=0 || aGeo.nShearAngle!=0) { // Either the rotation or shear angle exists. - Rectangle aSR0(GetSnapRect()); + tools::Rectangle aSR0(GetSnapRect()); long nWdt0=aSR0.Right()-aSR0.Left(); long nHgt0=aSR0.Bottom()-aSR0.Top(); long nWdt1=rRect.Right()-rRect.Left(); @@ -67,12 +67,12 @@ void SdrTextObj::NbcSetSnapRect(const Rectangle& rRect) } } -const Rectangle& SdrTextObj::GetLogicRect() const +const tools::Rectangle& SdrTextObj::GetLogicRect() const { return maRect; } -void SdrTextObj::NbcSetLogicRect(const Rectangle& rRect) +void SdrTextObj::NbcSetLogicRect(const tools::Rectangle& rRect) { maRect = rRect; ImpJustifyRect(maRect); diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx index f277a14adca8..00ee676799b3 100644 --- a/svx/source/svdraw/svdovirt.cxx +++ b/svx/source/svdraw/svdovirt.cxx @@ -108,14 +108,14 @@ SdrObjList* SdrVirtObj::GetSubList() const return rRefObj.GetSubList(); } -const Rectangle& SdrVirtObj::GetCurrentBoundRect() const +const tools::Rectangle& SdrVirtObj::GetCurrentBoundRect() const { const_cast<SdrVirtObj*>(this)->aOutRect=rRefObj.GetCurrentBoundRect(); // TODO: Optimize this. const_cast<SdrVirtObj*>(this)->aOutRect+=aAnchor; return aOutRect; } -const Rectangle& SdrVirtObj::GetLastBoundRect() const +const tools::Rectangle& SdrVirtObj::GetLastBoundRect() const { const_cast<SdrVirtObj*>(this)->aOutRect=rRefObj.GetLastBoundRect(); // TODO: Optimize this. const_cast<SdrVirtObj*>(this)->aOutRect+=aAnchor; @@ -368,7 +368,7 @@ void SdrVirtObj::NbcShear(const Point& rRef, long nAngle, double tn, bool bVShea void SdrVirtObj::Move(const Size& rSiz) { if (rSiz.Width()!=0 || rSiz.Height()!=0) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcMove(rSiz); SetChanged(); BroadcastObjectChange(); @@ -379,7 +379,7 @@ void SdrVirtObj::Move(const Size& rSiz) void SdrVirtObj::Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bUnsetRelative) { if (xFact.GetNumerator()!=xFact.GetDenominator() || yFact.GetNumerator()!=yFact.GetDenominator()) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); rRefObj.Resize(rRef-aAnchor,xFact,yFact, bUnsetRelative); SetRectsDirty(); SendUserCall(SdrUserCallType::Resize,aBoundRect0); @@ -389,7 +389,7 @@ void SdrVirtObj::Resize(const Point& rRef, const Fraction& xFact, const Fraction void SdrVirtObj::Rotate(const Point& rRef, long nAngle, double sn, double cs) { if (nAngle!=0) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); rRefObj.Rotate(rRef-aAnchor,nAngle,sn,cs); SetRectsDirty(); SendUserCall(SdrUserCallType::Resize,aBoundRect0); @@ -398,7 +398,7 @@ void SdrVirtObj::Rotate(const Point& rRef, long nAngle, double sn, double cs) void SdrVirtObj::Mirror(const Point& rRef1, const Point& rRef2) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); rRefObj.Mirror(rRef1-aAnchor,rRef2-aAnchor); SetRectsDirty(); SendUserCall(SdrUserCallType::Resize,aBoundRect0); @@ -407,7 +407,7 @@ void SdrVirtObj::Mirror(const Point& rRef1, const Point& rRef2) void SdrVirtObj::Shear(const Point& rRef, long nAngle, double tn, bool bVShear) { if (nAngle!=0) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); rRefObj.Shear(rRef-aAnchor,nAngle,tn,bVShear); SetRectsDirty(); SendUserCall(SdrUserCallType::Resize,aBoundRect0); @@ -421,18 +421,18 @@ void SdrVirtObj::RecalcSnapRect() aSnapRect+=aAnchor; } -const Rectangle& SdrVirtObj::GetSnapRect() const +const tools::Rectangle& SdrVirtObj::GetSnapRect() const { const_cast<SdrVirtObj*>(this)->aSnapRect=rRefObj.GetSnapRect(); const_cast<SdrVirtObj*>(this)->aSnapRect+=aAnchor; return aSnapRect; } -void SdrVirtObj::SetSnapRect(const Rectangle& rRect) +void SdrVirtObj::SetSnapRect(const tools::Rectangle& rRect) { { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); - Rectangle aR(rRect); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aR(rRect); aR-=aAnchor; rRefObj.SetSnapRect(aR); SetRectsDirty(); @@ -440,35 +440,35 @@ void SdrVirtObj::SetSnapRect(const Rectangle& rRect) } } -void SdrVirtObj::NbcSetSnapRect(const Rectangle& rRect) +void SdrVirtObj::NbcSetSnapRect(const tools::Rectangle& rRect) { - Rectangle aR(rRect); + tools::Rectangle aR(rRect); aR-=aAnchor; SetRectsDirty(); rRefObj.NbcSetSnapRect(aR); } -const Rectangle& SdrVirtObj::GetLogicRect() const +const tools::Rectangle& SdrVirtObj::GetLogicRect() const { const_cast<SdrVirtObj*>(this)->aSnapRect=rRefObj.GetLogicRect(); // An abuse of aSnapRect! const_cast<SdrVirtObj*>(this)->aSnapRect+=aAnchor; // If there's trouble, we need another Rectangle Member (or a Heap). return aSnapRect; } -void SdrVirtObj::SetLogicRect(const Rectangle& rRect) +void SdrVirtObj::SetLogicRect(const tools::Rectangle& rRect) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); - Rectangle aR(rRect); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aR(rRect); aR-=aAnchor; rRefObj.SetLogicRect(aR); SetRectsDirty(); SendUserCall(SdrUserCallType::Resize,aBoundRect0); } -void SdrVirtObj::NbcSetLogicRect(const Rectangle& rRect) +void SdrVirtObj::NbcSetLogicRect(const tools::Rectangle& rRect) { - Rectangle aR(rRect); + tools::Rectangle aR(rRect); aR-=aAnchor; SetRectsDirty(); rRefObj.NbcSetLogicRect(aR); @@ -546,7 +546,7 @@ SdrObjGeoData* SdrVirtObj::GetGeoData() const void SdrVirtObj::SetGeoData(const SdrObjGeoData& rGeo) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); rRefObj.SetGeoData(rGeo); SetRectsDirty(); SendUserCall(SdrUserCallType::Resize,aBoundRect0); @@ -579,7 +579,7 @@ Pointer SdrVirtObj::GetMacroPointer(const SdrObjMacroHitRec& rRec) const return rRefObj.GetMacroPointer(rRec); // TODO: positioning offset } -void SdrVirtObj::PaintMacro(OutputDevice& rOut, const Rectangle& rDirtyRect, const SdrObjMacroHitRec& rRec) const +void SdrVirtObj::PaintMacro(OutputDevice& rOut, const tools::Rectangle& rDirtyRect, const SdrObjMacroHitRec& rRec) const { rRefObj.PaintMacro(rOut,rDirtyRect,rRec); // TODO: positioning offset } diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index 3e48ddc21cac..6a287d67eedb 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -294,7 +294,7 @@ void SdrObjList::RecalcObjOrdNums() void SdrObjList::RecalcRects() { - aOutRect=Rectangle(); + aOutRect=tools::Rectangle(); aSnapRect=aOutRect; const size_t nCount = GetObjCount(); for (size_t i=0; i<nCount; ++i) { @@ -592,7 +592,7 @@ SdrObject* SdrObjList::SetObjectOrdNum(size_t nOldObjNum, size_t nNewObjNum) return pObj; } -const Rectangle& SdrObjList::GetAllObjSnapRect() const +const tools::Rectangle& SdrObjList::GetAllObjSnapRect() const { if (bRectsDirty) { const_cast<SdrObjList*>(this)->RecalcRects(); @@ -601,7 +601,7 @@ const Rectangle& SdrObjList::GetAllObjSnapRect() const return aSnapRect; } -const Rectangle& SdrObjList::GetAllObjBoundRect() const +const tools::Rectangle& SdrObjList::GetAllObjBoundRect() const { // #i106183# for deep group hierarchies like in chart2, the invalidates // through the hierarchy are not correct; use a 2nd hint for the needed @@ -1615,7 +1615,7 @@ void SdrPage::TRG_ImpMasterPageRemoved(const SdrPage& rRemovedPage) } } -const SdrPageGridFrameList* SdrPage::GetGridFrameList(const SdrPageView* /*pPV*/, const Rectangle* /*pRect*/) const +const SdrPageGridFrameList* SdrPage::GetGridFrameList(const SdrPageView* /*pPV*/, const tools::Rectangle* /*pRect*/) const { return nullptr; } diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx index 544bf48ca788..c3f35eb16f94 100644 --- a/svx/source/svdraw/svdpagv.cxx +++ b/svx/source/svdraw/svdpagv.cxx @@ -237,17 +237,17 @@ void SdrPageView::Hide() } } -Rectangle SdrPageView::GetPageRect() const +tools::Rectangle SdrPageView::GetPageRect() const { - if (GetPage()==nullptr) return Rectangle(); - return Rectangle(Point(),Size(GetPage()->GetWdt()+1,GetPage()->GetHgt()+1)); + if (GetPage()==nullptr) return tools::Rectangle(); + return tools::Rectangle(Point(),Size(GetPage()->GetWdt()+1,GetPage()->GetHgt()+1)); } void SdrPageView::InvalidateAllWin() { if(IsVisible() && GetPage()) { - Rectangle aRect(Point(0,0),Size(GetPage()->GetWdt()+1,GetPage()->GetHgt()+1)); + tools::Rectangle aRect(Point(0,0),Size(GetPage()->GetWdt()+1,GetPage()->GetHgt()+1)); aRect.Union(GetPage()->GetAllObjBoundRect()); GetView().InvalidateAllWin(aRect); } @@ -308,7 +308,7 @@ void SdrPageView::setPreparedPageWindow(SdrPageWindow* pKnownTarget) void SdrPageView::DrawLayer(SdrLayerID nID, OutputDevice* pGivenTarget, sdr::contact::ViewObjectContactRedirector* pRedirector, - const Rectangle& rRect, basegfx::B2IRectangle const*const pPageFrame) + const tools::Rectangle& rRect, basegfx::B2IRectangle const*const pPageFrame) { if(GetPage()) { @@ -405,7 +405,7 @@ void SdrPageView::SetDesignMode( bool _bDesignMode ) const } -void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const Rectangle& rRect, Color aColor) +void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const tools::Rectangle& rRect, Color aColor) { if (GetPage()==nullptr) return; @@ -555,7 +555,7 @@ void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const Rectangle& rRect, C { // draw rOut.DrawGrid( - Rectangle( xFinOrg + (a * nx2) + nPointOffset, yBigOrg, x2, y2 ), + tools::Rectangle( xFinOrg + (a * nx2) + nPointOffset, yBigOrg, x2, y2 ), Size( nx1, ny1 ), nGridFlags ); // do a step @@ -580,7 +580,7 @@ void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const Rectangle& rRect, C { // draw rOut.DrawGrid( - Rectangle( xBigOrg, yFinOrg + (a * ny2) + nPointOffset, x2, y2 ), + tools::Rectangle( xBigOrg, yFinOrg + (a * ny2) + nPointOffset, x2, y2 ), Size( nx1, ny1 ), nGridFlags ); // do a step @@ -703,7 +703,7 @@ void SdrPageView::ImpInvalidateHelpLineArea(sal_uInt16 nNum) const if(pCandidate->OutputToWindow()) { OutputDevice& rOutDev = pCandidate->GetOutputDevice(); - Rectangle aR(rHL.GetBoundRect(rOutDev)); + tools::Rectangle aR(rHL.GetBoundRect(rOutDev)); Size aSiz(rOutDev.PixelToLogic(Size(1,1))); aR.Left() -= aSiz.Width(); aR.Right() += aSiz.Width(); diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index bd019285fc13..2164abba3d71 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -332,7 +332,7 @@ void SdrPaintView::BrkAction() { } -void SdrPaintView::TakeActionRect(Rectangle&) const +void SdrPaintView::TakeActionRect(tools::Rectangle&) const { } @@ -917,7 +917,7 @@ void SdrPaintView::InvalidateAllWin() } } -void SdrPaintView::InvalidateAllWin(const Rectangle& rRect) +void SdrPaintView::InvalidateAllWin(const tools::Rectangle& rRect) { const sal_uInt32 nWindowCount(PaintWindowCount()); @@ -928,11 +928,11 @@ void SdrPaintView::InvalidateAllWin(const Rectangle& rRect) if(pPaintWindow->OutputToWindow()) { OutputDevice& rOutDev = pPaintWindow->GetOutputDevice(); - Rectangle aRect(rRect); + tools::Rectangle aRect(rRect); Point aOrg(rOutDev.GetMapMode().GetOrigin()); aOrg.X()=-aOrg.X(); aOrg.Y()=-aOrg.Y(); - Rectangle aOutRect(aOrg, rOutDev.GetOutputSize()); + tools::Rectangle aOutRect(aOrg, rOutDev.GetOutputSize()); // In case of tiled rendering we want to get all invalidations, so visual area is not interesting. if (aRect.IsOver(aOutRect) || comphelper::LibreOfficeKit::isActive()) @@ -949,7 +949,7 @@ void SdrPaintView::InvalidateOneWin(vcl::Window& rWin) rWin.Invalidate(InvalidateFlags::NoErase); } -void SdrPaintView::InvalidateOneWin(vcl::Window& rWin, const Rectangle& rRect) +void SdrPaintView::InvalidateOneWin(vcl::Window& rWin, const tools::Rectangle& rRect) { // do not erase background, that causes flicker (!) rWin.Invalidate(rRect, InvalidateFlags::NoErase); @@ -1117,7 +1117,7 @@ void SdrPaintView::ShowItemBrowser(bool bShow) } #endif -void SdrPaintView::MakeVisible(const Rectangle& rRect, vcl::Window& rWin) +void SdrPaintView::MakeVisible(const tools::Rectangle& rRect, vcl::Window& rWin) { MapMode aMap(rWin.GetMapMode()); Size aActualSize(rWin.GetOutputSize()); diff --git a/svx/source/svdraw/svdsnpv.cxx b/svx/source/svdraw/svdsnpv.cxx index 7b7feab8ee3e..4923e7de66d3 100644 --- a/svx/source/svdraw/svdsnpv.cxx +++ b/svx/source/svdraw/svdsnpv.cxx @@ -240,10 +240,10 @@ void SdrSnapView::BrkAction() SdrPaintView::BrkAction(); } -void SdrSnapView::TakeActionRect(Rectangle& rRect) const +void SdrSnapView::TakeActionRect(tools::Rectangle& rRect) const { if (IsSetPageOrg() || IsDragHelpLine()) { - rRect=Rectangle(maDragStat.GetNow(),maDragStat.GetNow()); + rRect=tools::Rectangle(maDragStat.GetNow(),maDragStat.GetNow()); } else { SdrPaintView::TakeActionRect(rRect); } @@ -328,7 +328,7 @@ SdrSnap SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const while (aIter.IsMore() && (nMaxPointSnapCount>0 || nMaxFrameSnapCount>0)) { SdrObject* pO=aIter.Next(); - Rectangle aRect(pO->GetCurrentBoundRect()); + tools::Rectangle aRect(pO->GetCurrentBoundRect()); aRect.Left ()-=mx; aRect.Right ()+=mx; aRect.Top ()-=my; @@ -350,8 +350,8 @@ SdrSnap SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const } } if (bOFrmSnap && nMaxFrameSnapCount>0) { - Rectangle aLog(pO->GetSnapRect()); - Rectangle aR1(aLog); + tools::Rectangle aLog(pO->GetSnapRect()); + tools::Rectangle aR1(aLog); aR1.Left ()-=mx; aR1.Right ()+=mx; aR1.Top ()-=my; diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx index f79beadd465e..ff598139f19f 100644 --- a/svx/source/svdraw/svdtrans.cxx +++ b/svx/source/svdraw/svdtrans.cxx @@ -32,7 +32,7 @@ void MoveXPoly(XPolygon& rPoly, const Size& S) rPoly.Move(S.Width(),S.Height()); } -void ResizeRect(Rectangle& rRect, const Point& rRef, const Fraction& rxFact, const Fraction& ryFact) +void ResizeRect(tools::Rectangle& rRect, const Point& rRef, const Fraction& rxFact, const Fraction& ryFact) { Fraction aXFact(rxFact); Fraction aYFact(ryFact); @@ -268,7 +268,7 @@ double CrookSlantXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCente double CrookStretchXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCenter, const Point& rRad, double& rSin, double& rCos, bool bVert, - const Rectangle& rRefRect) + const tools::Rectangle& rRefRect) { long y0=rPnt.Y(); CrookSlantXPoint(rPnt,pC1,pC2,rCenter,rRad,rSin,rCos,bVert); @@ -331,7 +331,7 @@ void CrookSlantPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, bo } } -void CrookStretchPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert, const Rectangle& rRefRect) +void CrookStretchPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert, const tools::Rectangle& rRefRect) { double nSin,nCos; sal_uInt16 nPointAnz=rPoly.GetPointCount(); @@ -371,7 +371,7 @@ void CrookSlantPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad } } -void CrookStretchPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert, const Rectangle& rRefRect) +void CrookStretchPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert, const tools::Rectangle& rRefRect) { sal_uInt16 nPolyCount=rPoly.Count(); for (sal_uInt16 nPolyNum=0; nPolyNum<nPolyCount; nPolyNum++) { @@ -467,7 +467,7 @@ void GeoStat::RecalcTan() } -tools::Polygon Rect2Poly(const Rectangle& rRect, const GeoStat& rGeo) +tools::Polygon Rect2Poly(const tools::Rectangle& rRect, const GeoStat& rGeo) { tools::Polygon aPol(5); aPol[0]=rRect.TopLeft(); @@ -480,7 +480,7 @@ tools::Polygon Rect2Poly(const Rectangle& rRect, const GeoStat& rGeo) return aPol; } -void Poly2Rect(const tools::Polygon& rPol, Rectangle& rRect, GeoStat& rGeo) +void Poly2Rect(const tools::Polygon& rPol, tools::Rectangle& rRect, GeoStat& rGeo) { rGeo.nRotationAngle=GetAngle(rPol[1]-rPol[0]); rGeo.nRotationAngle=NormAngle360(rGeo.nRotationAngle); @@ -518,7 +518,7 @@ void Poly2Rect(const tools::Polygon& rPol, Rectangle& rRect, GeoStat& rGeo) Point aRU(aPt0); aRU.X()+=nWdt; aRU.Y()+=nHgt; - rRect=Rectangle(aPt0,aRU); + rRect=tools::Rectangle(aPt0,aRU); } diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx index f04dc32b2b35..b411e935c88e 100644 --- a/svx/source/svdraw/svdundo.cxx +++ b/svx/source/svdraw/svdundo.cxx @@ -380,7 +380,7 @@ void SdrUndoAttrObj::Undo() // losing the geometry size info for the object when it is // laid out again from AdjustTextFrameWidthAndHeight(). This makes // rescuing the size of the object necessary. - const Rectangle aSnapRect = pObj->GetSnapRect(); + const tools::Rectangle aSnapRect = pObj->GetSnapRect(); if(pUndoSet) { @@ -457,7 +457,7 @@ void SdrUndoAttrObj::Redo() sdr::properties::ItemChangeBroadcaster aItemChange(*pObj); - const Rectangle aSnapRect = pObj->GetSnapRect(); + const tools::Rectangle aSnapRect = pObj->GetSnapRect(); if(pRedoSet) { diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index 2ee34fcdb07e..5f957e81f37c 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -116,7 +116,7 @@ SdrDropMarkerOverlay::SdrDropMarkerOverlay(const SdrView& rView, const SdrObject rObject.TakeXorPoly()); } -SdrDropMarkerOverlay::SdrDropMarkerOverlay(const SdrView& rView, const Rectangle& rRectangle) +SdrDropMarkerOverlay::SdrDropMarkerOverlay(const SdrView& rView, const tools::Rectangle& rRectangle) { basegfx::B2DPolygon aB2DPolygon; @@ -454,8 +454,8 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co if (bTEHit) { - Rectangle aTextRect; - Rectangle aAnchor; + tools::Rectangle aTextRect; + tools::Rectangle aAnchor; SdrOutliner* pOutliner = &pTextObj->ImpGetDrawOutliner(); if( pTextObj->GetModel() ) pOutliner = &pTextObj->GetModel()->GetHitTestOutliner(); @@ -499,7 +499,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co (IsTextTool() || (IsEditMode() && IsQuickTextEditMode())) && pHitObj->HasTextEdit()) { // Around the TextEditArea there's a border to select without going into text edit mode. - Rectangle aBoundRect(pHitObj->GetCurrentBoundRect()); + tools::Rectangle aBoundRect(pHitObj->GetCurrentBoundRect()); // Force to SnapRect when Fontwork if( dynamic_cast<const SdrTextObj*>( pHitObj) != nullptr && static_cast<SdrTextObj*>(pHitObj)->IsFontwork()) @@ -1370,7 +1370,7 @@ void SdrView::UnmarkAll() else UnmarkAllObj(); } -const Rectangle& SdrView::GetMarkedRect() const +const tools::Rectangle& SdrView::GetMarkedRect() const { if (IsGluePointEditMode() && HasMarkedGluePoints()) { return GetMarkedGluePointsRect(); diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index ba333fdd4395..0692f647ff66 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -138,7 +138,7 @@ bool SdrExchangeView::Paste(const OUString& rStr, const Point& rPos, SdrObjList* if (!ImpGetPasteLayer(pLst,nLayer)) return false; bool bUnmark = (nOptions & (SdrInsertFlags::DONTMARK|SdrInsertFlags::ADDMARK))==SdrInsertFlags::NONE && !IsTextEdit(); if (bUnmark) UnmarkAllObj(); - Rectangle aTextRect(0,0,500,500); + tools::Rectangle aTextRect(0,0,500,500); SdrPage* pPage=pLst->GetPage(); if (pPage!=nullptr) { aTextRect.SetSize(pPage->GetSize()); @@ -175,7 +175,7 @@ bool SdrExchangeView::Paste(SvStream& rInput, const OUString& rBaseURL, sal_uInt if (!ImpGetPasteLayer(pLst,nLayer)) return false; bool bUnmark=(nOptions&(SdrInsertFlags::DONTMARK|SdrInsertFlags::ADDMARK))==SdrInsertFlags::NONE && !IsTextEdit(); if (bUnmark) UnmarkAllObj(); - Rectangle aTextRect(0,0,500,500); + tools::Rectangle aTextRect(0,0,500,500); SdrPage* pPage=pLst->GetPage(); if (pPage!=nullptr) { aTextRect.SetSize(pPage->GetSize()); @@ -281,7 +281,7 @@ bool SdrExchangeView::Paste( const SdrPage* pSrcPg=pSrcMod->GetPage(nPg); // Use SnapRect, not BoundRect here - Rectangle aR=pSrcPg->GetAllObjSnapRect(); + tools::Rectangle aR=pSrcPg->GetAllObjSnapRect(); if (bResize) ResizeRect(aR,aPt0,aXResize,aYResize); @@ -417,7 +417,7 @@ void SdrExchangeView::ImpPasteObject(SdrObject* pObj, SdrObjList& rLst, const Po long xs=nSizX; long ys=nSizY; Point aPos(rCenter.X()-xs/2,rCenter.Y()-ys/2); - Rectangle aR(aPos.X(),aPos.Y(),aPos.X()+xs,aPos.Y()+ys); + tools::Rectangle aR(aPos.X(),aPos.Y(),aPos.X()+xs,aPos.Y()+ys); pObj->SetLogicRect(aR); rLst.InsertObject(pObj, SAL_MAX_SIZE); @@ -525,7 +525,7 @@ GDIMetaFile SdrExchangeView::GetMarkedObjMetaFile(bool bNoVDevIfOneMtfMarked) co if( AreObjectsMarked() ) { - Rectangle aBound( GetMarkedObjBoundRect() ); + tools::Rectangle aBound( GetMarkedObjBoundRect() ); Size aBoundSize( aBound.GetWidth(), aBound.GetHeight() ); MapMode aMap( mpModel->GetScaleUnit(), Point(), mpModel->GetScaleFraction(), mpModel->GetScaleFraction() ); @@ -632,7 +632,7 @@ Graphic SdrExchangeView::GetObjGraphic( const SdrModel* pModel, const SdrObject* { ScopedVclPtrInstance< VirtualDevice > pOut; GDIMetaFile aMtf; - const Rectangle aBoundRect( pObj->GetCurrentBoundRect() ); + const tools::Rectangle aBoundRect( pObj->GetCurrentBoundRect() ); const MapMode aMap( pModel->GetScaleUnit(), Point(), pModel->GetScaleFraction(), diff --git a/svx/source/table/accessiblecell.cxx b/svx/source/table/accessiblecell.cxx index d34cb90a5bd1..85ae72dd1f3b 100644 --- a/svx/source/table/accessiblecell.cxx +++ b/svx/source/table/accessiblecell.cxx @@ -310,7 +310,7 @@ css::awt::Rectangle SAL_CALL AccessibleCell::getBounds() if( mxCell.is() ) { // Get the cell's bounding box in internal coordinates (in 100th of mm) - const ::Rectangle aCellRect( mxCell->getCellRect() ); + const ::tools::Rectangle aCellRect( mxCell->getCellRect() ); // Transform coordinates from internal to pixel. if (maShapeTreeInfo.GetViewForwarder() == nullptr) @@ -329,9 +329,9 @@ css::awt::Rectangle SAL_CALL AccessibleCell::getBounds() int y = aPixelPosition.getY() - aParentLocation.Y; // Clip with parent (with coordinates relative to itself). - ::Rectangle aBBox ( x, y, x + aPixelSize.getWidth(), y + aPixelSize.getHeight()); + ::tools::Rectangle aBBox ( x, y, x + aPixelSize.getWidth(), y + aPixelSize.getHeight()); awt::Size aParentSize (xParentComponent->getSize()); - ::Rectangle aParentBBox (0,0, aParentSize.Width, aParentSize.Height); + ::tools::Rectangle aParentBBox (0,0, aParentSize.Width, aParentSize.Height); aBBox = aBBox.GetIntersection (aParentBBox); aBoundingBox = awt::Rectangle ( aBBox.getX(), aBBox.getY(), aBBox.getWidth(), aBBox.getHeight()); } diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index a5637875a821..41601c98be83 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -653,7 +653,7 @@ SfxStyleSheet* Cell::GetStyleSheet() const return nullptr; } -void Cell::TakeTextAnchorRect(Rectangle& rAnchorRect) const +void Cell::TakeTextAnchorRect(tools::Rectangle& rAnchorRect) const { rAnchorRect.Left() = maCellRect.Left() + GetTextLeftDistance(); rAnchorRect.Right() = maCellRect.Right() - GetTextRightDistance(); @@ -692,7 +692,7 @@ sal_Int32 Cell::getMinimumHeight() SdrTableObj& rTableObj = dynamic_cast< SdrTableObj& >( GetObject() ); sal_Int32 nMinimumHeight = 0; - Rectangle aTextRect; + tools::Rectangle aTextRect; TakeTextAnchorRect( aTextRect ); Size aSize( aTextRect.GetSize() ); aSize.Height()=0x0FFFFFFF; diff --git a/svx/source/table/cell.hxx b/svx/source/table/cell.hxx index 9b568c584c11..0d599784335a 100644 --- a/svx/source/table/cell.hxx +++ b/svx/source/table/cell.hxx @@ -67,14 +67,14 @@ public: SVX_DLLPRIVATE void cloneFrom( const CellRef& rCell ); - SVX_DLLPRIVATE void setCellRect( ::Rectangle& rCellRect ) { maCellRect = rCellRect; } - SVX_DLLPRIVATE const ::Rectangle& getCellRect() const { return maCellRect; } - SVX_DLLPRIVATE ::Rectangle& getCellRect() { return maCellRect; } + SVX_DLLPRIVATE void setCellRect( ::tools::Rectangle& rCellRect ) { maCellRect = rCellRect; } + SVX_DLLPRIVATE const ::tools::Rectangle& getCellRect() const { return maCellRect; } + SVX_DLLPRIVATE ::tools::Rectangle& getCellRect() { return maCellRect; } OutlinerParaObject* GetEditOutlinerParaObject() const; SVX_DLLPRIVATE void SetStyleSheet( SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr ); SVX_DLLPRIVATE virtual SfxStyleSheet* GetStyleSheet() const override; - SVX_DLLPRIVATE void TakeTextAnchorRect(Rectangle& rAnchorRect) const; + SVX_DLLPRIVATE void TakeTextAnchorRect(tools::Rectangle& rAnchorRect) const; SVX_DLLPRIVATE virtual const SfxItemSet& GetItemSet() const override; SVX_DLLPRIVATE void SetMergedItemSetAndBroadcast(const SfxItemSet& rSet, bool bClearAllItems); @@ -212,7 +212,7 @@ private: ::sal_Int32 mnRowSpan; ::sal_Int32 mnColSpan; - Rectangle maCellRect; + tools::Rectangle maCellRect; css::uno::Reference< css::table::XTable > mxTable; }; diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index 3ccbc3e744cd..ce2b7cbd49c2 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -146,7 +146,7 @@ SfxItemSet* TableProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) class TableObjectGeoData : public SdrTextObjGeoData { public: - Rectangle maLogicRect; + tools::Rectangle maLogicRect; }; TableStyleSettings::TableStyleSettings() @@ -203,10 +203,10 @@ public: void SetModel(SdrModel* pOldModel, SdrModel* pNewModel); CellRef getCell( const CellPos& rPos ) const; - void LayoutTable( Rectangle& rArea, bool bFitWidth, bool bFitHeight ); + void LayoutTable( tools::Rectangle& rArea, bool bFitWidth, bool bFitHeight ); void ApplyCellStyles(); - void UpdateCells( Rectangle& rArea ); + void UpdateCells( tools::Rectangle& rArea ); SdrTableObjImpl(); virtual ~SdrTableObjImpl() override; @@ -237,8 +237,8 @@ public: void dumpAsXml(struct _xmlTextWriter* pWriter) const; private: static SdrTableObjImpl* lastLayoutTable; - static Rectangle lastLayoutInputRectangle; - static Rectangle lastLayoutResultRectangle; + static tools::Rectangle lastLayoutInputRectangle; + static tools::Rectangle lastLayoutResultRectangle; static bool lastLayoutFitWidth; static bool lastLayoutFitHeight; static WritingMode lastLayoutMode; @@ -248,8 +248,8 @@ private: }; SdrTableObjImpl* SdrTableObjImpl::lastLayoutTable = nullptr; -Rectangle SdrTableObjImpl::lastLayoutInputRectangle; -Rectangle SdrTableObjImpl::lastLayoutResultRectangle; +tools::Rectangle SdrTableObjImpl::lastLayoutInputRectangle; +tools::Rectangle SdrTableObjImpl::lastLayoutResultRectangle; bool SdrTableObjImpl::lastLayoutFitWidth; bool SdrTableObjImpl::lastLayoutFitHeight; WritingMode SdrTableObjImpl::lastLayoutMode; @@ -684,7 +684,7 @@ sal_Int32 SdrTableObjImpl::getRowCount() const return mxTable.is() ? mxTable->getRowCount() : 0; } -void SdrTableObjImpl::LayoutTable( Rectangle& rArea, bool bFitWidth, bool bFitHeight ) +void SdrTableObjImpl::LayoutTable( tools::Rectangle& rArea, bool bFitWidth, bool bFitHeight ) { if( mpLayouter && mpTableObj->GetModel() ) { @@ -722,7 +722,7 @@ void SdrTableObjImpl::LayoutTable( Rectangle& rArea, bool bFitWidth, bool bFitHe } } -void SdrTableObjImpl::UpdateCells( Rectangle& rArea ) +void SdrTableObjImpl::UpdateCells( tools::Rectangle& rArea ) { if( mpLayouter && mxTable.is() ) { @@ -758,7 +758,7 @@ SdrTableObj::SdrTableObj(SdrModel* _pModel) } -SdrTableObj::SdrTableObj(SdrModel* _pModel, const ::Rectangle& rNewRect, sal_Int32 nColumns, sal_Int32 nRows) +SdrTableObj::SdrTableObj(SdrModel* _pModel, const ::tools::Rectangle& rNewRect, sal_Int32 nColumns, sal_Int32 nRows) : SdrTextObj( rNewRect ) , maLogicRect( rNewRect ) { @@ -1315,7 +1315,7 @@ void SdrTableObj::onEditOutlinerStatusEvent( EditStatus* pEditStatus ) { if( (pEditStatus->GetStatusWord() & EditStatusFlags::TextHeightChanged) && mpImpl.is() && mpImpl->mpLayouter ) { - Rectangle aRect0( maRect ); + tools::Rectangle aRect0( maRect ); maRect = maLogicRect; mpImpl->LayoutTable( maRect, false, false ); SetRectsDirty(); @@ -1380,14 +1380,14 @@ void SdrTableObj::SetModel(SdrModel* pNewModel) } -void SdrTableObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText, Rectangle* pAnchorRect, bool bLineWidth ) const +void SdrTableObj::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRect, bool bNoEditText, tools::Rectangle* pAnchorRect, bool bLineWidth ) const { if( mpImpl.is() ) TakeTextRect( mpImpl->maEditPos, rOutliner, rTextRect, bNoEditText, pAnchorRect, bLineWidth ); } -void SdrTableObj::TakeTextRect( const CellPos& rPos, SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText, Rectangle* pAnchorRect, bool /*bLineWidth*/ ) const +void SdrTableObj::TakeTextRect( const CellPos& rPos, SdrOutliner& rOutliner, tools::Rectangle& rTextRect, bool bNoEditText, tools::Rectangle* pAnchorRect, bool /*bLineWidth*/ ) const { if( !mpImpl.is()) return; @@ -1396,7 +1396,7 @@ void SdrTableObj::TakeTextRect( const CellPos& rPos, SdrOutliner& rOutliner, Rec if( !xCell.is() ) return; - Rectangle aAnkRect; + tools::Rectangle aAnkRect; TakeTextAnchorRect( rPos, aAnkRect ); SdrTextVertAdjust eVAdj=xCell->GetTextVerticalAdjust(); @@ -1465,7 +1465,7 @@ void SdrTableObj::TakeTextRect( const CellPos& rPos, SdrOutliner& rOutliner, Rec if (pAnchorRect) *pAnchorRect=aAnkRect; - rTextRect=Rectangle(aTextPos,aTextSiz); + rTextRect=tools::Rectangle(aTextPos,aTextSiz); } @@ -1524,7 +1524,7 @@ void SdrTableObj::getActiveCellPos( CellPos& rPos ) const } -void SdrTableObj::getCellBounds( const CellPos& rPos, ::Rectangle& rCellRect ) +void SdrTableObj::getCellBounds( const CellPos& rPos, ::tools::Rectangle& rCellRect ) { if( mpImpl.is() ) { @@ -1535,16 +1535,16 @@ void SdrTableObj::getCellBounds( const CellPos& rPos, ::Rectangle& rCellRect ) } -void SdrTableObj::TakeTextAnchorRect(Rectangle& rAnchorRect) const +void SdrTableObj::TakeTextAnchorRect(tools::Rectangle& rAnchorRect) const { if( mpImpl.is() ) TakeTextAnchorRect( mpImpl->maEditPos, rAnchorRect ); } -void SdrTableObj::TakeTextAnchorRect( const CellPos& rPos, Rectangle& rAnchorRect ) const +void SdrTableObj::TakeTextAnchorRect( const CellPos& rPos, tools::Rectangle& rAnchorRect ) const { - Rectangle aAnkRect(maRect); + tools::Rectangle aAnkRect(maRect); if( mpImpl.is() ) { @@ -1558,17 +1558,17 @@ void SdrTableObj::TakeTextAnchorRect( const CellPos& rPos, Rectangle& rAnchorRec } -void SdrTableObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const +void SdrTableObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin) const { if( mpImpl.is() ) TakeTextEditArea( mpImpl->maEditPos, pPaperMin, pPaperMax, pViewInit, pViewMin ); } -void SdrTableObj::TakeTextEditArea( const CellPos& rPos, Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin ) const +void SdrTableObj::TakeTextEditArea( const CellPos& rPos, Size* pPaperMin, Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin ) const { Size aPaperMin,aPaperMax; - Rectangle aViewInit; + tools::Rectangle aViewInit; TakeTextAnchorRect( rPos, aViewInit ); Size aAnkSiz(aViewInit.GetSize()); @@ -1701,19 +1701,19 @@ SdrTableObj& SdrTableObj::operator=(const SdrTableObj& rObj) } -const Rectangle& SdrTableObj::GetSnapRect() const +const tools::Rectangle& SdrTableObj::GetSnapRect() const { return maRect; } -void SdrTableObj::NbcSetSnapRect(const Rectangle& rRect) +void SdrTableObj::NbcSetSnapRect(const tools::Rectangle& rRect) { NbcSetLogicRect( rRect ); } -const Rectangle& SdrTableObj::GetLogicRect() const +const tools::Rectangle& SdrTableObj::GetLogicRect() const { return maLogicRect; } @@ -1740,7 +1740,7 @@ bool SdrTableObj::BegTextEdit(SdrOutliner& rOutl) if (bUpdMerk) rOutl.SetUpdateMode(false); Size aPaperMin; Size aPaperMax; - Rectangle aEditArea; + tools::Rectangle aEditArea; TakeTextEditArea(&aPaperMin,&aPaperMax,&aEditArea,nullptr); rOutl.SetMinAutoPaperSize(aPaperMin); @@ -1835,7 +1835,7 @@ void SdrTableObj::NbcSetOutlinerParaObject( OutlinerParaObject* pTextObject) } -void SdrTableObj::NbcSetLogicRect(const Rectangle& rRect) +void SdrTableObj::NbcSetLogicRect(const tools::Rectangle& rRect) { maLogicRect=rRect; ImpJustifyRect(maLogicRect); @@ -1851,9 +1851,9 @@ void SdrTableObj::NbcSetLogicRect(const Rectangle& rRect) } -void SdrTableObj::AdjustToMaxRect( const Rectangle& rMaxRect, bool /* bShrinkOnly = false */ ) +void SdrTableObj::AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool /* bShrinkOnly = false */ ) { - Rectangle aAdjustRect( rMaxRect ); + tools::Rectangle aAdjustRect( rMaxRect ); aAdjustRect.setHeight( GetLogicRect().getHeight() ); SetLogicRect( aAdjustRect ); } @@ -1870,7 +1870,7 @@ void SdrTableObj::NbcMove(const Size& rSiz) void SdrTableObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) { - Rectangle aOldRect( maLogicRect ); + tools::Rectangle aOldRect( maLogicRect ); ResizeRect(maLogicRect,rRef,xFact,yFact); maRect = maLogicRect; @@ -1881,11 +1881,11 @@ void SdrTableObj::NbcResize(const Point& rRef, const Fraction& xFact, const Frac bool SdrTableObj::AdjustTextFrameWidthAndHeight() { - Rectangle aNeuRect(maLogicRect); + tools::Rectangle aNeuRect(maLogicRect); bool bRet=AdjustTextFrameWidthAndHeight(aNeuRect); if (bRet) { - Rectangle aBoundRect0; + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); maRect = aNeuRect; @@ -1898,12 +1898,12 @@ bool SdrTableObj::AdjustTextFrameWidthAndHeight() } -bool SdrTableObj::AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHeight, bool bWidth) const +bool SdrTableObj::AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool bHeight, bool bWidth) const { if((pModel == nullptr) || rR.IsEmpty() || !mpImpl.is() || !mpImpl->mxTable.is() ) return false; - Rectangle aRectangle( rR ); + tools::Rectangle aRectangle( rR ); mpImpl->LayoutTable( aRectangle, !bWidth, !bHeight ); if( aRectangle != rR ) @@ -1926,7 +1926,7 @@ void SdrTableObj::NbcReformatText() void SdrTableObj::ReformatText() { - Rectangle aBoundRect0; + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcReformatText(); @@ -2188,7 +2188,7 @@ bool SdrTableObj::applySpecialDrag(SdrDragStat& rDrag) case SdrHdlKind::Lower: case SdrHdlKind::LowerRight: { - const Rectangle aNewRectangle(ImpDragCalcRect(rDrag)); + const tools::Rectangle aNewRectangle(ImpDragCalcRect(rDrag)); if (aNewRectangle != maRect) { @@ -2257,7 +2257,7 @@ basegfx::B2DPolyPolygon SdrTableObj::getSpecialDragPoly(const SdrDragStat& rDrag bool SdrTableObj::BegCreate(SdrDragStat& rStat) { rStat.SetOrtho4Possible(); - Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); + tools::Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); aRect1.Justify(); rStat.SetActionRect(aRect1); maRect = aRect1; @@ -2267,7 +2267,7 @@ bool SdrTableObj::BegCreate(SdrDragStat& rStat) bool SdrTableObj::MovCreate(SdrDragStat& rStat) { - Rectangle aRect1; + tools::Rectangle aRect1; rStat.TakeCreateRect(aRect1); ImpJustifyRect(aRect1); rStat.SetActionRect(aRect1); @@ -2298,7 +2298,7 @@ bool SdrTableObj::BckCreate(SdrDragStat& /*rStat*/) basegfx::B2DPolyPolygon SdrTableObj::TakeCreatePoly(const SdrDragStat& rDrag) const { - Rectangle aRect1; + tools::Rectangle aRect1; rDrag.TakeCreateRect(aRect1); aRect1.Justify(); diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index f7d8d7da1fc4..0e53a54d7450 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -2082,7 +2082,7 @@ void SvxTableController::updateSelectionOverlay() { sdr::overlay::OverlayObjectCell::RangeVector aRanges; - Rectangle aStartRect, aEndRect; + tools::Rectangle aStartRect, aEndRect; CellPos aStart,aEnd; getSelectedCells( aStart, aEnd ); pTableObj->getCellBounds( aStart, aStartRect ); @@ -2123,10 +2123,10 @@ void SvxTableController::updateSelectionOverlay() if (pOutDev && comphelper::LibreOfficeKit::isActive()) { // Left edge of aStartRect. - Rectangle aSelectionStart(aStartRect.Left(), aStartRect.Top(), aStartRect.Left(), aStartRect.Bottom()); + tools::Rectangle aSelectionStart(aStartRect.Left(), aStartRect.Top(), aStartRect.Left(), aStartRect.Bottom()); // Right edge of aEndRect. - Rectangle aSelectionEnd(aEndRect.Right(), aEndRect.Top(), aEndRect.Right(), aEndRect.Bottom()); - Rectangle aSelection(a2DRange.getMinX(), a2DRange.getMinY(), a2DRange.getMaxX(), a2DRange.getMaxY()); + tools::Rectangle aSelectionEnd(aEndRect.Right(), aEndRect.Top(), aEndRect.Right(), aEndRect.Bottom()); + tools::Rectangle aSelection(a2DRange.getMinX(), a2DRange.getMinY(), a2DRange.getMaxX(), a2DRange.getMaxY()); if (pOutDev->GetMapMode().GetMapUnit() == MapUnit::Map100thMM) { diff --git a/svx/source/table/tablehandles.cxx b/svx/source/table/tablehandles.cxx index 63b2ac8f4d47..01eb2ce65ae0 100644 --- a/svx/source/table/tablehandles.cxx +++ b/svx/source/table/tablehandles.cxx @@ -238,7 +238,7 @@ drawinglayer::primitive2d::Primitive2DContainer OverlayTableEdge::createOverlayO TableBorderHdl::TableBorderHdl( - const Rectangle& rRect, + const tools::Rectangle& rRect, bool bAnimate) : SdrHdl(rRect.TopLeft(), SdrHdlKind::Move), maRectangle(rRect), diff --git a/svx/source/table/tablehandles.hxx b/svx/source/table/tablehandles.hxx index 48f0f679008e..3b34cfac640d 100644 --- a/svx/source/table/tablehandles.hxx +++ b/svx/source/table/tablehandles.hxx @@ -70,7 +70,7 @@ class TableBorderHdl : public SdrHdl { public: TableBorderHdl( - const Rectangle& rRect, + const tools::Rectangle& rRect, bool bAnimate); virtual Pointer GetPointer() const override; @@ -81,7 +81,7 @@ protected: virtual void CreateB2dIAObject() override; private: - Rectangle maRectangle; + tools::Rectangle maRectangle; bool mbAnimate : 1; }; diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx index efba5de5ef01..ae588b11a5aa 100644 --- a/svx/source/table/tablelayouter.cxx +++ b/svx/source/table/tablelayouter.cxx @@ -496,7 +496,7 @@ typedef std::vector< MergeableCellVector > MergeVector; typedef std::vector< sal_Int32 > Int32Vector; -void TableLayouter::LayoutTableWidth( Rectangle& rArea, bool bFit ) +void TableLayouter::LayoutTableWidth( tools::Rectangle& rArea, bool bFit ) { const sal_Int32 nColCount = getColumnCount(); const sal_Int32 nRowCount = getRowCount(); @@ -648,7 +648,7 @@ void TableLayouter::LayoutTableWidth( Rectangle& rArea, bool bFit ) } -void TableLayouter::LayoutTableHeight( Rectangle& rArea, bool bFit ) +void TableLayouter::LayoutTableHeight( tools::Rectangle& rArea, bool bFit ) { const sal_Int32 nColCount = getColumnCount(); const sal_Int32 nRowCount = getRowCount(); @@ -807,7 +807,7 @@ void TableLayouter::LayoutTableHeight( Rectangle& rArea, bool bFit ) /** try to fit the table into the given rectangle. If the rectangle is to small, it will be grown to fit the table. */ -void TableLayouter::LayoutTable( Rectangle& rRectangle, bool bFitWidth, bool bFitHeight ) +void TableLayouter::LayoutTable( tools::Rectangle& rRectangle, bool bFitWidth, bool bFitHeight ) { if( !mxTable.is() ) return; @@ -837,7 +837,7 @@ void TableLayouter::LayoutTable( Rectangle& rRectangle, bool bFitWidth, bool bFi } -void TableLayouter::updateCells( Rectangle& rRectangle ) +void TableLayouter::updateCells( tools::Rectangle& rRectangle ) { const sal_Int32 nColCount = getColumnCount(); const sal_Int32 nRowCount = getRowCount(); @@ -853,7 +853,7 @@ void TableLayouter::updateCells( Rectangle& rRectangle ) basegfx::B2IRectangle aCellArea; if( getCellArea( xCell, aPos, aCellArea ) ) { - Rectangle aCellRect; + tools::Rectangle aCellRect; aCellRect.Left() = aCellArea.getMinX(); aCellRect.Right() = aCellArea.getMaxX(); aCellRect.Top() = aCellArea.getMinY(); @@ -1034,7 +1034,7 @@ void TableLayouter::UpdateBorderLayout() } -void TableLayouter::DistributeColumns( ::Rectangle& rArea, sal_Int32 nFirstCol, sal_Int32 nLastCol ) +void TableLayouter::DistributeColumns( ::tools::Rectangle& rArea, sal_Int32 nFirstCol, sal_Int32 nLastCol ) { if( mxTable.is() ) try { @@ -1072,7 +1072,7 @@ void TableLayouter::DistributeColumns( ::Rectangle& rArea, sal_Int32 nFirstCol, } -void TableLayouter::DistributeRows( ::Rectangle& rArea, sal_Int32 nFirstRow, sal_Int32 nLastRow ) +void TableLayouter::DistributeRows( ::tools::Rectangle& rArea, sal_Int32 nFirstRow, sal_Int32 nLastRow ) { if( mxTable.is() ) try { diff --git a/svx/source/table/tablelayouter.hxx b/svx/source/table/tablelayouter.hxx index 5798179214dd..cf577e905437 100644 --- a/svx/source/table/tablelayouter.hxx +++ b/svx/source/table/tablelayouter.hxx @@ -31,7 +31,7 @@ #include "svx/svdotable.hxx" -class Rectangle; +namespace tools { class Rectangle; } namespace editeng { @@ -67,7 +67,7 @@ public: if bFitWidth or bFitHeight is set, the model is changed. */ - void LayoutTable( ::Rectangle& rRectangle, bool bFitWidth, bool bFitHeight ); + void LayoutTable( ::tools::Rectangle& rRectangle, bool bFitWidth, bool bFitHeight ); void UpdateBorderLayout(); @@ -89,21 +89,21 @@ public: /** returns the requested borderline in rpBorderLine or a null pointer if there is no border at this edge */ editeng::SvxBorderLine* getBorderLine( sal_Int32 nEdgeX, sal_Int32 nEdgeY, bool bHorizontal )const; - void updateCells( ::Rectangle& rRectangle ); + void updateCells( ::tools::Rectangle& rRectangle ); sal_Int32 getHorizontalEdge( int nEdgeY, sal_Int32* pnMin, sal_Int32* pnMax ); sal_Int32 getVerticalEdge( int nEdgeX , sal_Int32* pnMin, sal_Int32* pnMax); - void DistributeColumns( ::Rectangle& rArea, sal_Int32 nFirstCol, sal_Int32 nLastCol ); - void DistributeRows( ::Rectangle& rArea, sal_Int32 nFirstRow, sal_Int32 nLastRow ); + void DistributeColumns( ::tools::Rectangle& rArea, sal_Int32 nFirstCol, sal_Int32 nLastCol ); + void DistributeRows( ::tools::Rectangle& rArea, sal_Int32 nFirstRow, sal_Int32 nLastRow ); void dumpAsXml(struct _xmlTextWriter* pWriter) const; private: CellRef getCell( const CellPos& rPos ) const; basegfx::B2ITuple getCellSize( const CellRef& xCell, const CellPos& rPos ) const; - void LayoutTableWidth( ::Rectangle& rArea, bool bFit ); - void LayoutTableHeight( ::Rectangle& rArea, bool bFit ); + void LayoutTableWidth( ::tools::Rectangle& rArea, bool bFit ); + void LayoutTableHeight( ::tools::Rectangle& rArea, bool bFit ); bool isValidColumn( sal_Int32 nColumn ) const { return (nColumn >= 0) && (nColumn < static_cast<sal_Int32>( maColumns.size())); } bool isValidRow( sal_Int32 nRow ) const { return (nRow >= 0) && (nRow < static_cast<sal_Int32>( maRows.size())); } diff --git a/svx/source/table/tablertfimporter.cxx b/svx/source/table/tablertfimporter.cxx index 5dad05c6104f..6f217f08c1fc 100644 --- a/svx/source/table/tablertfimporter.cxx +++ b/svx/source/table/tablertfimporter.cxx @@ -346,7 +346,7 @@ void SdrTableRTFParser::FillTable() } } - Rectangle aRect( mrTableObj.GetSnapRect() ); + tools::Rectangle aRect( mrTableObj.GetSnapRect() ); aRect.Right() = aRect.Left() + nLastEdge; mrTableObj.NbcSetSnapRect( aRect ); diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx index 24fc6655b86e..fc1adcda3dad 100644 --- a/svx/source/table/viewcontactoftableobj.cxx +++ b/svx/source/table/viewcontactoftableobj.cxx @@ -520,7 +520,7 @@ namespace sdr // create range using the model data directly. This is in SdrTextObj::aRect which i will access using // GetGeoRect() to not trigger any calculations. It's the unrotated geometry. - const Rectangle& rObjectRectangle(rTableObj.GetGeoRect()); + const tools::Rectangle& rObjectRectangle(rTableObj.GetGeoRect()); const basegfx::B2DRange aObjectRange(rObjectRectangle.Left(), rObjectRectangle.Top(), rObjectRectangle.Right(), rObjectRectangle.Bottom()); // for each cell we need potentially a cell primitive and a border primitive @@ -680,7 +680,7 @@ namespace sdr else { // take unrotated snap rect (direct model data) for position and size - const Rectangle& rRectangle = rTableObj.GetGeoRect(); + const tools::Rectangle& rRectangle = rTableObj.GetGeoRect(); const basegfx::B2DRange aObjectRange( rRectangle.Left(), rRectangle.Top(), rRectangle.Right(), rRectangle.Bottom()); diff --git a/svx/source/tbxctrls/SvxPresetListBox.cxx b/svx/source/tbxctrls/SvxPresetListBox.cxx index 89f96da17ec7..0bda5d1831b4 100644 --- a/svx/source/tbxctrls/SvxPresetListBox.cxx +++ b/svx/source/tbxctrls/SvxPresetListBox.cxx @@ -67,7 +67,7 @@ void SvxPresetListBox::Command( const CommandEvent& rEvent ) pMenuWindow->GetPopupModeFlags() | FloatWinPopupFlags::NoMouseUpClose); } pMenu->SetSelectHdl( LINK(this, SvxPresetListBox, OnMenuItemSelected) ); - pMenu->Execute(this,Rectangle(aPos,Size(1,1)),PopupMenuFlags::ExecuteDown); + pMenu->Execute(this,tools::Rectangle(aPos,Size(1,1)),PopupMenuFlags::ExecuteDown); } } break; diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx index 2d34ace6eef1..9b93bc22d008 100644 --- a/svx/source/tbxctrls/fontworkgallery.cxx +++ b/svx/source/tbxctrls/fontworkgallery.cxx @@ -203,12 +203,12 @@ void FontWorkGalleryDialog::insertSelectedFontwork() OutputDevice* pOutDev = mpSdrView->GetFirstOutputDevice(); if( pOutDev ) { - Rectangle aObjRect( pNewObject->GetLogicRect() ); - Rectangle aVisArea = pOutDev->PixelToLogic(Rectangle(Point(0,0), pOutDev->GetOutputSizePixel())); + tools::Rectangle aObjRect( pNewObject->GetLogicRect() ); + tools::Rectangle aVisArea = pOutDev->PixelToLogic(tools::Rectangle(Point(0,0), pOutDev->GetOutputSizePixel())); Point aPagePos = aVisArea.Center(); aPagePos.X() -= aObjRect.GetWidth() / 2; aPagePos.Y() -= aObjRect.GetHeight() / 2; - Rectangle aNewObjectRectangle(aPagePos, aObjRect.GetSize()); + tools::Rectangle aNewObjectRectangle(aPagePos, aObjRect.GetSize()); SdrPageView* pPV = mpSdrView->GetSdrPageView(); pNewObject->SetLogicRect(aNewObjectRectangle); diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index 9a8e4e419ab5..a66609ec79af 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -741,7 +741,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) Size aNewGrfSize( OutputDevice::LogicToLogic( rGrfSize, aMapTwip, aMap100 ) ); Size aOldGrfSize( pObj->GetLogicRect().GetSize() ); - Rectangle aNewRect( aNewOrigin, aNewGrfSize ); + tools::Rectangle aNewRect( aNewOrigin, aNewGrfSize ); Point aOffset( (aNewGrfSize.Width() - aOldGrfSize.Width()) >> 1, (aNewGrfSize.Height() - aOldGrfSize.Height()) >> 1 ); diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx index f552a4864a4a..ee5e69f2fc3f 100644 --- a/svx/source/tbxctrls/layctrl.cxx +++ b/svx/source/tbxctrls/layctrl.cxx @@ -81,7 +81,7 @@ public: void KeyInput( const KeyEvent& rKEvt ) override; virtual void MouseMove( const MouseEvent& rMEvt ) override; virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; - virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& ) override; + virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& ) override; virtual void PopupModeEnd() override; private: @@ -242,7 +242,7 @@ void TableWindow::MouseButtonUp( const MouseEvent& rMEvt ) } -void TableWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void TableWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { const long nSelectionWidth = mnTablePosX + nCol * mnTableCellWidth; const long nSelectionHeight = mnTablePosY + nLine * mnTableCellHeight; @@ -250,15 +250,15 @@ void TableWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) // the non-selected parts of the table rRenderContext.SetLineColor(aLineColor); rRenderContext.SetFillColor(aFillColor); - rRenderContext.DrawRect(Rectangle(nSelectionWidth, mnTablePosY, mnTableWidth, nSelectionHeight)); - rRenderContext.DrawRect(Rectangle(mnTablePosX, nSelectionHeight, nSelectionWidth, mnTableHeight)); - rRenderContext.DrawRect(Rectangle(nSelectionWidth, nSelectionHeight, mnTableWidth, mnTableHeight)); + rRenderContext.DrawRect(tools::Rectangle(nSelectionWidth, mnTablePosY, mnTableWidth, nSelectionHeight)); + rRenderContext.DrawRect(tools::Rectangle(mnTablePosX, nSelectionHeight, nSelectionWidth, mnTableHeight)); + rRenderContext.DrawRect(tools::Rectangle(nSelectionWidth, nSelectionHeight, mnTableWidth, mnTableHeight)); // the selection if (nCol > 0 && nLine > 0) { rRenderContext.SetFillColor(aHighlightFillColor); - rRenderContext.DrawRect(Rectangle(mnTablePosX, mnTablePosY, nSelectionWidth, nSelectionHeight)); + rRenderContext.DrawRect(tools::Rectangle(mnTablePosX, mnTablePosY, nSelectionWidth, nSelectionHeight)); } // lines inside of the table @@ -302,7 +302,7 @@ void TableWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) rRenderContext.SetLineColor(aLineColor); rRenderContext.SetFillColor(aBackgroundColor); - rRenderContext.DrawRect(Rectangle(nTextX - 2 * nTipBorder, + rRenderContext.DrawRect(tools::Rectangle(nTextX - 2 * nTipBorder, nTextY - 2 * nTipBorder, nTextX + aTextSize.Width() + nTipBorder, nTextY + aTextSize.Height() + nTipBorder)); @@ -345,7 +345,7 @@ void TableWindow::Update( long nNewCol, long nNewLine ) { nCol = nNewCol; nLine = nNewLine; - Invalidate(Rectangle(mnTablePosX, mnTablePosY, mnTableWidth, mnTableHeight)); + Invalidate(tools::Rectangle(mnTablePosX, mnTablePosY, mnTableWidth, mnTableHeight)); } } @@ -401,7 +401,7 @@ public: virtual void MouseMove( const MouseEvent& rMEvt ) override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; - virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& ) override; + virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& ) override; virtual void PopupModeEnd() override; }; @@ -489,7 +489,7 @@ void ColumnsWindow::UpdateSize_Impl( long nNewCol ) if ( nNewCol > nWidth ) nNewCol = nWidth; - Invalidate( Rectangle( 0, aWinSize.Height()-nTextHeight+2, + Invalidate( tools::Rectangle( 0, aWinSize.Height()-nTextHeight+2, aWinSize.Width(), aWinSize.Height() ) ); SetOutputSizePixel( Size( nMX*nWidth-1, aWinSize.Height() ) ); } @@ -497,7 +497,7 @@ void ColumnsWindow::UpdateSize_Impl( long nNewCol ) if ( nNewCol != nCol ) { - Invalidate( Rectangle( 0, aWinSize.Height()-nTextHeight+2, + Invalidate( tools::Rectangle( 0, aWinSize.Height()-nTextHeight+2, aWinSize.Width(), aWinSize.Height() ) ); long nMinCol = 0, nMaxCol = 0; @@ -513,7 +513,7 @@ void ColumnsWindow::UpdateSize_Impl( long nNewCol ) nMaxCol = nNewCol; } - Invalidate( Rectangle( nMinCol*nMX-1, 0, + Invalidate( tools::Rectangle( nMinCol*nMX-1, 0, nMaxCol*nMX+1, aWinSize.Height()-nTextHeight+2 ) ); nCol = nNewCol; } @@ -591,7 +591,7 @@ void ColumnsWindow::MouseButtonUp( const MouseEvent& rMEvt ) } -void ColumnsWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void ColumnsWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { long i; long nLineWidth; @@ -610,7 +610,7 @@ void ColumnsWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) rRenderContext.SetFillColor(aFillColor); } - rRenderContext.DrawRect(Rectangle(i * nMX - 1, -1, i * nMX + nMX, aSize.Height() - nTextHeight + 1)); + rRenderContext.DrawRect(tools::Rectangle(i * nMX - 1, -1, i * nMX + nMX, aSize.Height() - nTextHeight + 1)); long j = 4; while (j < aSize.Height() - nTextHeight - 4) @@ -635,19 +635,19 @@ void ColumnsWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) Size aTextSize(rRenderContext.GetTextWidth(aText), rRenderContext.GetTextHeight()); rRenderContext.DrawText(Point((aSize.Width() - aTextSize.Width()) / 2, aSize.Height() - nTextHeight + 2), aText); - rRenderContext.DrawRect(Rectangle(0, + rRenderContext.DrawRect(tools::Rectangle(0, aSize.Height() - nTextHeight + 2, (aSize.Width() - aTextSize.Width()) / 2 - 1, aSize.Height())); - rRenderContext.DrawRect(Rectangle((aSize.Width() - aTextSize.Width()) / 2 + aTextSize.Width(), + rRenderContext.DrawRect(tools::Rectangle((aSize.Width() - aTextSize.Width()) / 2 + aTextSize.Width(), aSize.Height() - nTextHeight + 2, aSize.Width(), aSize.Height())); rRenderContext.SetLineColor(aLineColor); rRenderContext.SetFillColor(); - rRenderContext.DrawRect(Rectangle( 0, 0, aSize.Width() - 1, aSize.Height() - nTextHeight + 1)); + rRenderContext.DrawRect(tools::Rectangle( 0, 0, aSize.Width() - 1, aSize.Height() - nTextHeight + 1)); } diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index a4725bc0d533..c70d184c2810 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -174,8 +174,8 @@ private: void ReleaseFocus(); static Color TestColorsVisible(const Color &FontCol, const Color &BackCol); static void UserDrawEntry(const UserDrawEvent& rUDEvt, const OUString &rStyleName); - void SetupEntry(vcl::RenderContext& rRenderContext, vcl::Window* pParent, sal_Int32 nItem, const Rectangle& rRect, const OUString& rStyleName, bool bIsNotSelected); - static bool AdjustFontForItemHeight(OutputDevice* pDevice, Rectangle& rTextRect, long nHeight); + void SetupEntry(vcl::RenderContext& rRenderContext, vcl::Window* pParent, sal_Int32 nItem, const tools::Rectangle& rRect, const OUString& rStyleName, bool bIsNotSelected); + static bool AdjustFontForItemHeight(OutputDevice* pDevice, tools::Rectangle& rTextRect, long nHeight); void SetOptimalSize(); DECL_LINK( MenuSelectHdl, Menu *, bool ); }; @@ -603,7 +603,7 @@ void SvxStyleBox_Impl::StateChanged( StateChangedType nStateChange ) } } -bool SvxStyleBox_Impl::AdjustFontForItemHeight(OutputDevice* pDevice, Rectangle& rTextRect, long nHeight) +bool SvxStyleBox_Impl::AdjustFontForItemHeight(OutputDevice* pDevice, tools::Rectangle& rTextRect, long nHeight) { if (rTextRect.Bottom() > nHeight) { @@ -637,7 +637,7 @@ void SvxStyleBox_Impl::UserDrawEntry(const UserDrawEvent& rUDEvt, const OUString // italics is present const int nLeftDistance = 8; - Rectangle aTextRect; + tools::Rectangle aTextRect; pDevice->GetTextBoundRect(aTextRect, rStyleName); Point aPos( rUDEvt.GetRect().TopLeft() ); @@ -649,7 +649,7 @@ void SvxStyleBox_Impl::UserDrawEntry(const UserDrawEvent& rUDEvt, const OUString pDevice->DrawText(aPos, rStyleName); } -void SvxStyleBox_Impl::SetupEntry(vcl::RenderContext& rRenderContext, vcl::Window* pParent, sal_Int32 nItem, const Rectangle& rRect, const OUString& rStyleName, bool bIsNotSelected) +void SvxStyleBox_Impl::SetupEntry(vcl::RenderContext& rRenderContext, vcl::Window* pParent, sal_Int32 nItem, const tools::Rectangle& rRect, const OUString& rStyleName, bool bIsNotSelected) { unsigned int nId = rRect.GetHeight() != 0 ? (rRect.getY() / rRect.GetHeight()) : MAX_STYLES_ENTRIES; if (nItem == 0 || nItem == GetEntryCount() - 1) @@ -813,7 +813,7 @@ void SvxStyleBox_Impl::UserDraw( const UserDrawEvent& rUDEvt ) vcl::RenderContext *pDevice = rUDEvt.GetRenderContext(); pDevice->Push(PushFlags::FILLCOLOR | PushFlags::FONT | PushFlags::TEXTCOLOR); - const Rectangle& rRect(rUDEvt.GetRect()); + const tools::Rectangle& rRect(rUDEvt.GetRect()); bool bIsNotSelected = rUDEvt.GetItemId() != GetSelectEntryPos(); SetupEntry(*pDevice, rUDEvt.GetWindow(), nItem, rRect, aStyleName, bIsNotSelected); @@ -836,7 +836,7 @@ IMPL_LINK(SvxStyleBox_Impl, CalcOptimalExtraUserWidth, VclWindowEvent&, event, v for (sal_Int32 i = 0; i < nEntryCount; ++i) { OUString sStyleName(GetEntry(i)); - Rectangle aTextRectForDefaultFont; + tools::Rectangle aTextRectForDefaultFont; GetTextBoundRect(aTextRectForDefaultFont, sStyleName); const long nWidth = aTextRectForDefaultFont.GetWidth(); @@ -850,8 +850,8 @@ IMPL_LINK(SvxStyleBox_Impl, CalcOptimalExtraUserWidth, VclWindowEvent&, event, v OUString sStyleName(GetEntry(i)); Push(PushFlags::FILLCOLOR | PushFlags::FONT | PushFlags::TEXTCOLOR); - SetupEntry(*this /*FIXME rendercontext*/, this, i, Rectangle(0, 0, RECT_MAX, ITEM_HEIGHT), sStyleName, true); - Rectangle aTextRectForActualFont; + SetupEntry(*this /*FIXME rendercontext*/, this, i, tools::Rectangle(0, 0, RECT_MAX, ITEM_HEIGHT), sStyleName, true); + tools::Rectangle aTextRectForActualFont; GetTextBoundRect(aTextRectForActualFont, sStyleName); if (AdjustFontForItemHeight(this, aTextRectForActualFont, ITEM_HEIGHT)) { @@ -3262,7 +3262,7 @@ void SvxColorListBox::ShowPreview(const NamedColor &rColor) VclPtr<VirtualDevice> xDevice = VclPtr<VirtualDevice>::Create(); xDevice->SetOutputSize(aImageSize); - const Rectangle aRect(Point(0, 0), aImageSize); + const tools::Rectangle aRect(Point(0, 0), aImageSize); if (m_bShowNoneButton && rColor.first == COL_NONE_COLOR) { const Color aW(COL_WHITE); diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx index e452bc1aaedf..157b65db6318 100644 --- a/svx/source/tbxctrls/tbxcolorupdate.cxx +++ b/svx/source/tbxctrls/tbxcolorupdate.cxx @@ -95,7 +95,7 @@ namespace svx long nWidth = std::min(aItemSize.Width(), aSource.GetSizePixel().Width()); long nHeight = std::min(aItemSize.Height(), aSource.GetSizePixel().Height()); - Rectangle aRect(Point(0, 0), Size(nWidth, nHeight)); + tools::Rectangle aRect(Point(0, 0), Size(nWidth, nHeight)); aBmpEx.CopyPixel( aRect, aRect, &aSource ); @@ -149,9 +149,9 @@ namespace svx if (maBmpSize.Width() == maBmpSize.Height()) // tdf#84985 align color bar with icon bottom edge; integer arithmetic e.g. 26 - 26/4 <> 26 * 3/4 - maUpdRect = Rectangle(Point( 0, maBmpSize.Height() - maBmpSize.Height() / 4), Size(maBmpSize.Width(), maBmpSize.Height() / 4)); + maUpdRect = tools::Rectangle(Point( 0, maBmpSize.Height() - maBmpSize.Height() / 4), Size(maBmpSize.Width(), maBmpSize.Height() / 4)); else - maUpdRect = Rectangle(Point( maBmpSize.Height() + 2, 2), Point(maBmpSize.Width() - 3, maBmpSize.Height() - 3)); + maUpdRect = tools::Rectangle(Point( maBmpSize.Height() + 2, 2), Point(maBmpSize.Width() - 3, maBmpSize.Height() - 3)); pBmpAcc->DrawRect(maUpdRect); diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index b2c76da96c76..17eabdd5c360 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -223,8 +223,8 @@ namespace { // get hairline and full bound rect to evtl. reduce given target pixel size when // it is known that it will be expanded to get the right and bottom hairlines right - Rectangle aHairlineRect; - const Rectangle aRect(rMtf.GetBoundRect(*Application::GetDefaultDevice(), &aHairlineRect)); + tools::Rectangle aHairlineRect; + const tools::Rectangle aRect(rMtf.GetBoundRect(*Application::GetDefaultDevice(), &aHairlineRect)); if(!aRect.IsEmpty() && !aHairlineRect.IsEmpty()) { @@ -432,7 +432,7 @@ VclPtr<VirtualDevice> GraphicExporter::CreatePageVDev( SdrPage* pPage, sal_uIntP pView->SetHlplVisible( false ); pView->SetGlueVisible( false ); pView->ShowSdrPage(pPage); - vcl::Region aRegion (Rectangle( aPoint, aPageSize ) ); + vcl::Region aRegion (tools::Rectangle( aPoint, aPageSize ) ); ImplExportCheckVisisbilityRedirector aRedirector( mpCurrentPage ); @@ -636,7 +636,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, if(pCorrectProperties) { - pTempBackgroundShape = new SdrRectObj(Rectangle(Point(0,0), pPage->GetSize())); + pTempBackgroundShape = new SdrRectObj(tools::Rectangle(Point(0,0), pPage->GetSize())); pTempBackgroundShape->SetMergedItemSet(pCorrectProperties->GetItemSet()); pTempBackgroundShape->SetMergedItem(XLineStyleItem(drawing::LineStyle_NONE)); pTempBackgroundShape->NbcSetStyleSheet(pCorrectProperties->GetStyleSheet(), true); @@ -740,7 +740,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, const Point aNewOrg( pPage->GetLftBorder(), pPage->GetUppBorder() ); aNewSize = Size( aSize.Width() - pPage->GetLftBorder() - pPage->GetRgtBorder(), aSize.Height() - pPage->GetUppBorder() - pPage->GetLwrBorder() ); - const Rectangle aClipRect( aNewOrg, aNewSize ); + const tools::Rectangle aClipRect( aNewOrg, aNewSize ); MapMode aVMap( aMap ); aVDev->Push(); @@ -751,7 +751,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, // Use new StandardCheckVisisbilityRedirector ImplExportCheckVisisbilityRedirector aRedirector( mpCurrentPage ); - pView->CompleteRedraw(aVDev, vcl::Region(Rectangle(aNewOrg, aNewSize)), &aRedirector); + pView->CompleteRedraw(aVDev, vcl::Region(tools::Rectangle(aNewOrg, aNewSize)), &aRedirector); aVDev->Pop(); @@ -849,8 +849,8 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, if( pObj && dynamic_cast<const SdrTextObj*>( pObj) != nullptr && static_cast<SdrTextObj*>(pObj)->HasText() ) { - Rectangle aScrollRectangle; - Rectangle aPaintRectangle; + tools::Rectangle aScrollRectangle; + tools::Rectangle aPaintRectangle; const std::unique_ptr< GDIMetaFile > pMtf( static_cast<SdrTextObj*>(pObj)->GetTextScrollMetaFileAndRectangle( @@ -859,7 +859,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, // take the larger one of the two rectangles (that // should be the bound rect of the retrieved // metafile) - Rectangle aTextRect; + tools::Rectangle aTextRect; if( aScrollRectangle.IsInside( aPaintRectangle ) ) aTextRect = aScrollRectangle; @@ -880,11 +880,11 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, pMtf->AddAction( new MetaCommentAction( "XTEXT_SCROLLRECT", 0, reinterpret_cast<sal_uInt8 const*>(&aScrollRectangle), - sizeof( Rectangle ) ) ); + sizeof( tools::Rectangle ) ) ); pMtf->AddAction( new MetaCommentAction( "XTEXT_PAINTRECT", 0, reinterpret_cast<sal_uInt8 const*>(&aPaintRectangle), - sizeof( Rectangle ) ) ); + sizeof( tools::Rectangle ) ) ); aGraphic = Graphic( *pMtf ); @@ -899,7 +899,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, ScopedVclPtrInstance< VirtualDevice > aOut; // calculate bound rect for all shapes - Rectangle aBound; + tools::Rectangle aBound; { std::vector< SdrObject* >::iterator aIter = aShapes.begin(); @@ -908,7 +908,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, while( aIter != aEnd ) { SdrObject* pObj = (*aIter++); - Rectangle aR1(pObj->GetCurrentBoundRect()); + tools::Rectangle aR1(pObj->GetCurrentBoundRect()); if (aBound.IsEmpty()) aBound=aR1; else diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx index 72413a7c328b..e41825f7fb85 100644 --- a/svx/source/unodraw/unopage.cxx +++ b/svx/source/unodraw/unopage.cxx @@ -478,7 +478,7 @@ SdrObject *SvxDrawPage::CreateSdrObject_(const Reference< drawing::XShape > & xS aSize.Width += 1; aSize.Height += 1; awt::Point aPos = xShape->getPosition(); - Rectangle aRect( Point( aPos.X, aPos.Y ), Size( aSize.Width, aSize.Height ) ); + tools::Rectangle aRect( Point( aPos.X, aPos.Y ), Size( aSize.Width, aSize.Height ) ); SdrObject* pNewObj = SdrObjFactory::MakeNewObject(nInventor, nType, aRect, mpPage); if (!pNewObj) diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index 201b245b0017..da4453058d24 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -1639,8 +1639,8 @@ awt::Point SAL_CALL SvxCustomShape::getPosition() bMirroredY = static_cast<SdrObjCustomShape*>(mpObj.get())->IsMirroredY(); } // get aRect, this is the unrotated snaprect - Rectangle aRect(static_cast<SdrObjCustomShape*>(mpObj.get())->GetLogicRect()); - Rectangle aRectangle( aRect ); + tools::Rectangle aRect(static_cast<SdrObjCustomShape*>(mpObj.get())->GetLogicRect()); + tools::Rectangle aRectangle( aRect ); if ( bMirroredX || bMirroredY ) { // we have to retrieve the unmirrored rect @@ -1649,7 +1649,7 @@ awt::Point SAL_CALL SvxCustomShape::getPosition() if ( bMirroredX ) { tools::Polygon aPol( Rect2Poly( aRect, aNewGeo ) ); - Rectangle aBoundRect( aPol.GetBoundRect() ); + tools::Rectangle aBoundRect( aPol.GetBoundRect() ); Point aRef1( ( aBoundRect.Left() + aBoundRect.Right() ) >> 1, aBoundRect.Top() ); Point aRef2( aRef1.X(), aRef1.Y() + 1000 ); @@ -1671,7 +1671,7 @@ awt::Point SAL_CALL SvxCustomShape::getPosition() if ( bMirroredY ) { tools::Polygon aPol( Rect2Poly( aRectangle, aNewGeo ) ); - Rectangle aBoundRect( aPol.GetBoundRect() ); + tools::Rectangle aBoundRect( aPol.GetBoundRect() ); Point aRef1( aBoundRect.Left(), ( aBoundRect.Top() + aBoundRect.Bottom() ) >> 1 ); Point aRef2( aRef1.X() + 1000, aRef1.Y() ); @@ -1743,7 +1743,7 @@ void SAL_CALL SvxCustomShape::setPropertyValue( const OUString& aPropertyName, c if ( bCustomShapeGeometry ) { static_cast<SdrObjCustomShape*>(pObject)->MergeDefaultAttributes(); - Rectangle aRect( pObject->GetSnapRect() ); + tools::Rectangle aRect( pObject->GetSnapRect() ); // #i38892# bool bNeedsMirrorX = static_cast<SdrObjCustomShape*>(pObject)->IsMirroredX() != bMirroredX; diff --git a/svx/source/unodraw/unoshap3.cxx b/svx/source/unodraw/unoshap3.cxx index 94123e1dd8b4..7a7797f64430 100644 --- a/svx/source/unodraw/unoshap3.cxx +++ b/svx/source/unodraw/unoshap3.cxx @@ -283,7 +283,7 @@ static void ConvertObjectToHomogenMatric( E3dObject* pObject, Any& rValue ) struct ImpRememberTransAndRect { basegfx::B3DHomMatrix maMat; - Rectangle maRect; + tools::Rectangle maRect; }; bool Svx3DSceneObject::setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) @@ -355,7 +355,7 @@ bool Svx3DSceneObject::setPropertyValueImpl( const OUString& rName, const SfxIte aCam.SetPosAndLookAt(aCamPos, aLookAt); aCam.SetFocalLength(fCamFocal / 100.0); aCam.SetDefaults(basegfx::B3DPoint(0.0, 0.0, fCamPosZ), aLookAt, fCamFocal / 100.0); - aCam.SetDeviceWindow(Rectangle(0, 0, (long)fW, (long)fH)); + aCam.SetDeviceWindow(tools::Rectangle(0, 0, (long)fW, (long)fH)); // set at scene pScene->SetCamera(aCam); diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx index 180cf7f817dd..896b724ccf3c 100644 --- a/svx/source/unodraw/unoshap4.cxx +++ b/svx/source/unodraw/unoshap4.cxx @@ -404,7 +404,7 @@ bool SvxOle2Shape::createObject( const SvGlobalName &aClassName ) aClassName.GetByteSequence(), objArgs, aPersistName)); if( xObj.is() ) { - Rectangle aRect = pOle2Obj->GetLogicRect(); + tools::Rectangle aRect = pOle2Obj->GetLogicRect(); if ( aRect.GetWidth() == 101 && aRect.GetHeight() == 101 ) { // TODO/LATER: is it possible that this method is used to create an iconified object? @@ -472,7 +472,7 @@ void SvxOle2Shape::createLink( const OUString& aLinkURL ) if( xObj.is() ) { - Rectangle aRect = pOle2Obj->GetLogicRect(); + tools::Rectangle aRect = pOle2Obj->GetLogicRect(); if ( aRect.GetWidth() == 101 && aRect.GetHeight() == 101 ) { // default size diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index c0c75d8e727a..ee49c9913b1b 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -681,7 +681,7 @@ uno::Any SvxShape::GetBitmap( bool bMetaFile /* = false */ ) const SdrObject *pTempObj = mpObj.get(); pView->MarkObj(pTempObj,pPageView); - Rectangle aRect(pTempObj->GetCurrentBoundRect()); + tools::Rectangle aRect(pTempObj->GetCurrentBoundRect()); aRect.Justify(); Size aSize(aRect.GetSize()); @@ -1093,7 +1093,7 @@ static bool svx_needLogicRectHack( SdrObject* pObj ) } -static Rectangle svx_getLogicRectHack( SdrObject* pObj ) +static tools::Rectangle svx_getLogicRectHack( SdrObject* pObj ) { if(svx_needLogicRectHack(pObj)) { @@ -1106,7 +1106,7 @@ static Rectangle svx_getLogicRectHack( SdrObject* pObj ) } -static void svx_setLogicRectHack( SdrObject* pObj, const Rectangle& rRect ) +static void svx_setLogicRectHack( SdrObject* pObj, const tools::Rectangle& rRect ) { if(svx_needLogicRectHack(pObj)) { @@ -1125,7 +1125,7 @@ awt::Point SAL_CALL SvxShape::getPosition() if( mpObj.is() && mpModel) { - Rectangle aRect( svx_getLogicRectHack(mpObj.get()) ); + tools::Rectangle aRect( svx_getLogicRectHack(mpObj.get()) ); Point aPt( aRect.Left(), aRect.Top() ); // Position is relative to anchor, so recalc to absolute position @@ -1152,7 +1152,7 @@ void SAL_CALL SvxShape::setPosition( const awt::Point& Position ) // transformation matrix if(dynamic_cast<const E3dCompoundObject* >(mpObj.get()) == nullptr) { - Rectangle aRect( svx_getLogicRectHack(mpObj.get()) ); + tools::Rectangle aRect( svx_getLogicRectHack(mpObj.get()) ); Point aLocalPos( Position.X, Position.Y ); ForceMetricToItemPoolMetric(aLocalPos); @@ -1178,7 +1178,7 @@ awt::Size SAL_CALL SvxShape::getSize() if( mpObj.is() && mpModel) { - Rectangle aRect( svx_getLogicRectHack(mpObj.get()) ); + tools::Rectangle aRect( svx_getLogicRectHack(mpObj.get()) ); Size aObjSize( aRect.getWidth(), aRect.getHeight() ); ForceMetricTo100th_mm(aObjSize); return css::awt::Size( aObjSize.getWidth(), aObjSize.getHeight() ); @@ -1199,9 +1199,9 @@ void SAL_CALL SvxShape::setSize( const awt::Size& rSize ) // scenes it may recalculate the whole scene since in AOO this depends // on the contained geometry (layouted to show all content) const bool b3DConstruction(dynamic_cast< E3dObject* >(mpObj.get()) && mpModel->isLocked()); - Rectangle aRect( + tools::Rectangle aRect( b3DConstruction ? - Rectangle(maPosition.X, maPosition.Y, maSize.Width, maSize.Height) : + tools::Rectangle(maPosition.X, maPosition.Y, maSize.Width, maSize.Height) : svx_getLogicRectHack(mpObj.get()) ); Size aLocalSize( rSize.Width, rSize.Height ); ForceMetricToItemPoolMetric(aLocalSize); @@ -2141,7 +2141,7 @@ bool SvxShape::setPropertyValueImpl( const OUString&, const SfxItemPropertySimpl Size aObjSize( aUnoRect.Width, aUnoRect.Height ); ForceMetricToItemPoolMetric(aTopLeft); ForceMetricToItemPoolMetric(aObjSize); - Rectangle aRect; + tools::Rectangle aRect; aRect.SetPos(aTopLeft); aRect.SetSize(aObjSize); mpObj->SetSnapRect(aRect); @@ -2574,7 +2574,7 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertySimpl case OWN_ATTR_FRAMERECT: { - Rectangle aRect( mpObj->GetSnapRect() ); + tools::Rectangle aRect( mpObj->GetSnapRect() ); Point aTopLeft( aRect.TopLeft() ); Size aObjSize( aRect.GetWidth(), aRect.GetHeight() ); ForceMetricTo100th_mm(aTopLeft); @@ -2588,7 +2588,7 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertySimpl case OWN_ATTR_BOUNDRECT: { - Rectangle aRect( mpObj->GetCurrentBoundRect() ); + tools::Rectangle aRect( mpObj->GetCurrentBoundRect() ); Point aTopLeft( aRect.TopLeft() ); Size aObjSize( aRect.GetWidth(), aRect.GetHeight() ); ForceMetricTo100th_mm(aTopLeft); diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx index 6d87416e0e93..cb5b73836645 100644 --- a/svx/source/unodraw/unoshtxt.cxx +++ b/svx/source/unodraw/unoshtxt.cxx @@ -142,7 +142,7 @@ public: bool IsValid() const; - Rectangle GetVisArea(); + tools::Rectangle GetVisArea(); Point LogicToPixel( const Point&, const MapMode& rMapMode ); Point PixelToLogic( const Point&, const MapMode& rMapMode ); @@ -504,10 +504,10 @@ void SvxTextEditSourceImpl::SetupOutliner() if( mpObject && mpOutliner ) { SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>( mpObject ); - Rectangle aPaintRect; + tools::Rectangle aPaintRect; if( pTextObj ) { - Rectangle aBoundRect( pTextObj->GetCurrentBoundRect() ); + tools::Rectangle aBoundRect( pTextObj->GetCurrentBoundRect() ); pTextObj->SetupOutlinerFormatting( *mpOutliner, aPaintRect ); // calc text offset from shape anchor @@ -525,10 +525,10 @@ void SvxTextEditSourceImpl::UpdateOutliner() if( mpObject && mpOutliner ) { SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>( mpObject ); - Rectangle aPaintRect; + tools::Rectangle aPaintRect; if( pTextObj ) { - Rectangle aBoundRect( pTextObj->GetCurrentBoundRect() ); + tools::Rectangle aBoundRect( pTextObj->GetCurrentBoundRect() ); pTextObj->UpdateOutlinerFormatting( *mpOutliner, aPaintRect ); // calc text offset from shape anchor @@ -734,7 +734,7 @@ SvxDrawOutlinerViewForwarder* SvxTextEditSourceImpl::CreateViewForwarder() SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>( mpObject ); if( pTextObj ) { - Rectangle aBoundRect( pTextObj->GetCurrentBoundRect() ); + tools::Rectangle aBoundRect( pTextObj->GetCurrentBoundRect() ); OutlinerView& rOutlView = *mpView->GetTextEditOutlinerView(); return new SvxDrawOutlinerViewForwarder( rOutlView, aBoundRect.TopLeft() ); @@ -888,12 +888,12 @@ bool SvxTextEditSourceImpl::IsValid() const return mpView && mpWindow; } -Rectangle SvxTextEditSourceImpl::GetVisArea() +tools::Rectangle SvxTextEditSourceImpl::GetVisArea() { if( IsValid() ) { SdrPaintWindow* pPaintWindow = mpView->FindPaintWindow(*mpWindow); - Rectangle aVisArea; + tools::Rectangle aVisArea; if(pPaintWindow) { @@ -904,7 +904,7 @@ Rectangle SvxTextEditSourceImpl::GetVisArea() SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>( mpObject ); if( pTextObj ) { - Rectangle aAnchorRect; + tools::Rectangle aAnchorRect; pTextObj->TakeTextAnchorRect( aAnchorRect ); aVisArea.Move( -aAnchorRect.Left(), -aAnchorRect.Top() ); @@ -914,7 +914,7 @@ Rectangle SvxTextEditSourceImpl::GetVisArea() } } - return Rectangle(); + return tools::Rectangle(); } Point SvxTextEditSourceImpl::LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) @@ -1065,7 +1065,7 @@ bool SvxTextEditSource::IsValid() const return mpImpl->IsValid(); } -Rectangle SvxTextEditSource::GetVisArea() const +tools::Rectangle SvxTextEditSource::GetVisArea() const { return mpImpl->GetVisArea(); } diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx index 95c67332b219..fd105064b55c 100644 --- a/svx/source/xoutdev/_xoutbmp.cxx +++ b/svx/source/xoutdev/_xoutbmp.cxx @@ -520,12 +520,12 @@ Bitmap XOutBitmap::DetectEdges( const Bitmap& rBmp, const sal_uInt8 cThreshold ) tools::Polygon XOutBitmap::GetCountour( const Bitmap& rBmp, const XOutFlags nFlags, const sal_uInt8 cEdgeDetectThreshold, - const Rectangle* pWorkRectPixel ) + const tools::Rectangle* pWorkRectPixel ) { Bitmap aWorkBmp; tools::Polygon aRetPoly; Point aTmpPoint; - Rectangle aWorkRect( aTmpPoint, rBmp.GetSizePixel() ); + tools::Rectangle aWorkRect( aTmpPoint, rBmp.GetSizePixel() ); if( pWorkRectPixel ) aWorkRect.Intersection( *pWorkRectPixel ); diff --git a/svx/source/xoutdev/_xpoly.cxx b/svx/source/xoutdev/_xpoly.cxx index ce8ff47d37cf..a3571abdc914 100644 --- a/svx/source/xoutdev/_xpoly.cxx +++ b/svx/source/xoutdev/_xpoly.cxx @@ -232,7 +232,7 @@ XPolygon::XPolygon( const tools::Polygon& rPoly ) } /// create a rectangle (also with rounded corners) as a Bézier polygon -XPolygon::XPolygon(const Rectangle& rRect, long nRx, long nRy) +XPolygon::XPolygon(const tools::Rectangle& rRect, long nRx, long nRy) : pImpXPolygon( 17 ) { long nWh = (rRect.GetWidth() - 1) / 2; @@ -407,10 +407,10 @@ void XPolygon::Move( long nHorzMove, long nVertMove ) } } -Rectangle XPolygon::GetBoundRect() const +tools::Rectangle XPolygon::GetBoundRect() const { pImpXPolygon->CheckPointDelete(); - Rectangle aRetval; + tools::Rectangle aRetval; if(pImpXPolygon->nPoints) { @@ -421,7 +421,7 @@ Rectangle XPolygon::GetBoundRect() const // correct and never was. const basegfx::B2DRange aPolygonRange(basegfx::tools::getRange(getB2DPolygon())); - aRetval = Rectangle( + aRetval = tools::Rectangle( FRound(aPolygonRange.getMinX()), FRound(aPolygonRange.getMinY()), FRound(aPolygonRange.getMaxX()), FRound(aPolygonRange.getMaxY())); } @@ -781,7 +781,7 @@ void XPolygon::Scale(double fSx, double fSy) * 2: bottom right 3----2 * 3: bottom left */ -void XPolygon::Distort(const Rectangle& rRefRect, +void XPolygon::Distort(const tools::Rectangle& rRefRect, const XPolygon& rDistortedRect) { pImpXPolygon->CheckPointDelete(); @@ -950,10 +950,10 @@ sal_uInt16 XPolyPolygon::Count() const return (sal_uInt16)(pImpXPolyPolygon->aXPolyList.size()); } -Rectangle XPolyPolygon::GetBoundRect() const +tools::Rectangle XPolyPolygon::GetBoundRect() const { size_t nXPoly = pImpXPolyPolygon->aXPolyList.size(); - Rectangle aRect; + tools::Rectangle aRect; for ( size_t n = 0; n < nXPoly; n++ ) { @@ -991,7 +991,7 @@ XPolyPolygon& XPolyPolygon::operator=( XPolyPolygon&& rXPolyPoly ) * 2: bottom right 3----2 * 3: bottom left */ -void XPolyPolygon::Distort(const Rectangle& rRefRect, +void XPolyPolygon::Distort(const tools::Rectangle& rRefRect, const XPolygon& rDistortedRect) { for (size_t i = 0; i < Count(); i++) |