diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-03-30 20:27:55 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-03-31 06:27:11 +0000 |
commit | a5a571307fb3306b74ab46b085cde6388270a770 (patch) | |
tree | 66d4ce12bb5236c50ab6a5d253bc8c6d8b5d292d /sd/source | |
parent | 17d821af6bb9df93569836a92f6bed975587fc6c (diff) |
tdf#82580 tools: rename Rectangle to tools::Rectangle
Mostly generated using
make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle"
Except some modules have their own foo::tools namespace, so there have
to use ::tools::Rectangle. This commit just moves the class from the
global namespace, it does not update pre/postwin.h yet.
Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2
Reviewed-on: https://gerrit.libreoffice.org/35923
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sd/source')
176 files changed, 676 insertions, 676 deletions
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index e23930d05d4c..aada2ef1acd8 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -1550,7 +1550,7 @@ void CustomAnimationEffect::updateSdrPathObjFromPath( SdrPathObj& rPathObj ) aPolyPoly.transform(basegfx::tools::createScaleB2DHomMatrix((double)aPageSize.Width(), (double)aPageSize.Height())); } - const Rectangle aBoundRect( pObj->GetCurrentBoundRect() ); + const ::tools::Rectangle aBoundRect( pObj->GetCurrentBoundRect() ); const Point aCenter( aBoundRect.Center() ); aPolyPoly.transform(basegfx::tools::createTranslateB2DHomMatrix(aCenter.X(), aCenter.Y())); } @@ -1566,7 +1566,7 @@ void CustomAnimationEffect::updatePathFromSdrPathObj( const SdrPathObj& rPathObj SdrObject* pObj = GetSdrObjectFromXShape( getTargetShape() ); if( pObj ) { - Rectangle aBoundRect(0,0,0,0); + ::tools::Rectangle aBoundRect(0,0,0,0); const drawinglayer::primitive2d::Primitive2DContainer xPrimitives(pObj->GetViewContact().getViewIndependentPrimitive2DContainer()); const drawinglayer::geometry::ViewInformation2D aViewInformation2D; @@ -1574,7 +1574,7 @@ void CustomAnimationEffect::updatePathFromSdrPathObj( const SdrPathObj& rPathObj if(!aRange.isEmpty()) { - aBoundRect = Rectangle( + aBoundRect = ::tools::Rectangle( (sal_Int32)floor(aRange.getMinX()), (sal_Int32)floor(aRange.getMinY()), (sal_Int32)ceil(aRange.getMaxX()), (sal_Int32)ceil(aRange.getMaxY())); } diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index ab81cc4452ee..88aa8dfccb59 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -1047,7 +1047,7 @@ IMapObject* SdDrawDocument::GetHitIMapObject( SdrObject* pObj, Size aGraphSize; Point aRelPoint( rWinPoint ); ImageMap& rImageMap = (ImageMap&) pIMapInfo->GetImageMap(); - const Rectangle& rRect = pObj->GetLogicRect(); + const ::tools::Rectangle& rRect = pObj->GetLogicRect(); bool bObjSupported = false; // execute HitTest diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index c45d02ec052e..2a29a06b17de 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -858,7 +858,7 @@ bool SdDrawDocument::InsertBookmarkAsPage( if (bScaleObjects) { - Rectangle aBorderRect(nLeft, nUpper, nRight, nLower); + ::tools::Rectangle aBorderRect(nLeft, nUpper, nRight, nLower); pRefPage->ScaleObjects(aSize, aBorderRect, true); } pRefPage->SetSize(aSize); @@ -877,7 +877,7 @@ bool SdDrawDocument::InsertBookmarkAsPage( if (bScaleObjects) { - Rectangle aBorderRect(nNLeft, nNUpper, nNRight, nNLower); + ::tools::Rectangle aBorderRect(nNLeft, nNUpper, nNRight, nNLower); pRefPage->ScaleObjects(aNSize, aBorderRect, true); } @@ -900,7 +900,7 @@ bool SdDrawDocument::InsertBookmarkAsPage( { if (bScaleObjects) { - Rectangle aBorderRect(nLeft, nUpper, nRight, nLower); + ::tools::Rectangle aBorderRect(nLeft, nUpper, nRight, nLower); pRefPage->ScaleObjects(aSize, aBorderRect, true); } pRefPage->SetSize(aSize); @@ -911,7 +911,7 @@ bool SdDrawDocument::InsertBookmarkAsPage( { if (bScaleObjects) { - Rectangle aBorderRect(nNLeft, nNUpper, nNRight, nNLower); + ::tools::Rectangle aBorderRect(nNLeft, nNUpper, nNRight, nNLower); pRefPage->ScaleObjects(aNSize, aBorderRect, true); } pRefPage->SetSize(aNSize); @@ -1088,7 +1088,7 @@ bool SdDrawDocument::InsertBookmarkAsObject( } else { - aObjPos = Rectangle(Point(), pPage->GetSize()).Center(); + aObjPos = ::tools::Rectangle(Point(), pPage->GetSize()).Center(); } size_t nCountBefore = 0; @@ -1761,7 +1761,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum, if (pSourceDoc != this) { Size aSize(rOldMaster.GetSize()); - Rectangle aBorderRect(rOldMaster.GetLftBorder(), + ::tools::Rectangle aBorderRect(rOldMaster.GetLftBorder(), rOldMaster.GetUppBorder(), rOldMaster.GetRgtBorder(), rOldMaster.GetLwrBorder()); @@ -1775,7 +1775,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum, pMaster->SetAutoLayout(pMaster->GetAutoLayout()); aSize = rOldNotesMaster.GetSize(); - Rectangle aNotesBorderRect(rOldNotesMaster.GetLftBorder(), + ::tools::Rectangle aNotesBorderRect(rOldNotesMaster.GetLftBorder(), rOldNotesMaster.GetUppBorder(), rOldNotesMaster.GetRgtBorder(), rOldNotesMaster.GetLwrBorder()); diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 421e216cfe8c..afb247e441b2 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -276,7 +276,7 @@ void SdPage::EnsureMasterPageDefaultBackground() /** creates a presentation object with the given PresObjKind on this page. A user call will be set */ -SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rectangle& rRect, bool /* bInsert */ ) +SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const ::tools::Rectangle& rRect, bool /* bInsert */ ) { ::svl::IUndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : nullptr; const bool bUndo = pUndoManager && pUndoManager->IsInListAction() && IsInserted(); @@ -340,7 +340,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rec Size aSize = aOutDev.PixelToLogic(aSizePix); Point aPnt (0, 0); - Rectangle aRect (aPnt, aSize); + ::tools::Rectangle aRect (aPnt, aSize); pSdrObj = new SdrGrafObj(aGraphic, aRect); aOutDev.Pop(); } @@ -719,7 +719,7 @@ SdStyleSheet* SdPage::getPresentationStyle( sal_uInt32 nHelpId ) const |* \************************************************************************/ -void SdPage::Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectangle& ) +void SdPage::Changed(const SdrObject& rObj, SdrUserCallType eType, const ::tools::Rectangle& ) { if (!maLockAutoLayoutArrangement.isLocked()) { @@ -832,11 +832,11 @@ void SdPage::CreateTitleAndLayout(bool bInit, bool bCreate ) } } - std::vector< Rectangle > aAreas; + std::vector< ::tools::Rectangle > aAreas; CalculateHandoutAreas( *static_cast< SdDrawDocument* >(GetModel() ), pMasterPage->GetAutoLayout(), false, aAreas ); const bool bSkip = pMasterPage->GetAutoLayout() == AUTOLAYOUT_HANDOUT3; - std::vector< Rectangle >::iterator iter( aAreas.begin() ); + std::vector< ::tools::Rectangle >::iterator iter( aAreas.begin() ); while( iter != aAreas.end() ) { @@ -971,17 +971,17 @@ SdrObject* SdPage::CreateDefaultPresObj(PresObjKind eObjKind) if( eObjKind == PRESOBJ_TITLE ) { - Rectangle aTitleRect( GetTitleRect() ); + ::tools::Rectangle aTitleRect( GetTitleRect() ); return CreatePresObj(PRESOBJ_TITLE, false, aTitleRect, true/*bInsert*/); } else if( eObjKind == PRESOBJ_OUTLINE ) { - Rectangle aLayoutRect( GetLayoutRect() ); + ::tools::Rectangle aLayoutRect( GetLayoutRect() ); return CreatePresObj( PRESOBJ_OUTLINE, false, aLayoutRect, true/*bInsert*/); } else if( eObjKind == PRESOBJ_NOTES ) { - Rectangle aLayoutRect( GetLayoutRect() ); + ::tools::Rectangle aLayoutRect( GetLayoutRect() ); return CreatePresObj( PRESOBJ_NOTES, false, aLayoutRect, true/*bInsert*/); } else if( (eObjKind == PRESOBJ_FOOTER) || (eObjKind == PRESOBJ_DATETIME) || (eObjKind == PRESOBJ_SLIDENUMBER) || (eObjKind == PRESOBJ_HEADER ) ) @@ -1014,7 +1014,7 @@ SdrObject* SdPage::CreateDefaultPresObj(PresObjKind eObjKind) } else { - Rectangle aRect( aPos, aSize ); + ::tools::Rectangle aRect( aPos, aSize ); return CreatePresObj( eObjKind, false, aRect, true/*bInsert*/ ); } } @@ -1041,7 +1041,7 @@ SdrObject* SdPage::CreateDefaultPresObj(PresObjKind eObjKind) else aPos.Y() = aPosition.Y() + long( aPageSize.Height() - NOTES_HEADER_FOOTER_HEIGHT ); - Rectangle aRect( aPos, aSize ); + ::tools::Rectangle aRect( aPos, aSize ); return CreatePresObj( eObjKind, false, aRect, true/*bInsert*/ ); } } @@ -1077,9 +1077,9 @@ void SdPage::DestroyDefaultPresObj(PresObjKind eObjKind) |* \************************************************************************/ -Rectangle SdPage::GetTitleRect() const +::tools::Rectangle SdPage::GetTitleRect() const { - Rectangle aTitleRect; + ::tools::Rectangle aTitleRect; if (mePageKind != PageKind::Handout) { @@ -1163,9 +1163,9 @@ Rectangle SdPage::GetTitleRect() const |* \************************************************************************/ -Rectangle SdPage::GetLayoutRect() const +::tools::Rectangle SdPage::GetLayoutRect() const { - Rectangle aLayoutRect; + ::tools::Rectangle aLayoutRect; if (mePageKind != PageKind::Handout) { @@ -1338,10 +1338,10 @@ rtl::OUString enumtoString(AutoLayout aut) return retstr; } -static void CalcAutoLayoutRectangles( SdPage& rPage,Rectangle* rRectangle ,const rtl::OUString& sLayoutType ) +static void CalcAutoLayoutRectangles( SdPage& rPage,::tools::Rectangle* rRectangle ,const rtl::OUString& sLayoutType ) { - Rectangle aTitleRect; - Rectangle aLayoutRect; + ::tools::Rectangle aTitleRect; + ::tools::Rectangle aLayoutRect; if( rPage.GetPageKind() != PageKind::Handout ) { @@ -1424,7 +1424,7 @@ static void CalcAutoLayoutRectangles( SdPage& rPage,Rectangle* rRectangle ,const aSize.Width() = basegfx::fround(aSize.Width() * propvalue[1]); Point aPos( basegfx::fround(aTitlePos.X() +(aSize.Width() * propvalue[2])), basegfx::fround(aTitlePos.Y() + (aSize.Height() * propvalue[3])) ); - rRectangle[count] = Rectangle(aPos, aSize); + rRectangle[count] = ::tools::Rectangle(aPos, aSize); count = count+1; } else @@ -1433,7 +1433,7 @@ static void CalcAutoLayoutRectangles( SdPage& rPage,Rectangle* rRectangle ,const basegfx::fround(aLayoutSize.Height() * propvalue[0]) ); Point aPos( basegfx::fround(aLayoutPos.X() +(aSize.Width() * propvalue[2])), basegfx::fround(aLayoutPos.Y() + (aSize.Height() * propvalue[3])) ); - rRectangle[count] = Rectangle (aPos, aSize); + rRectangle[count] = ::tools::Rectangle (aPos, aSize); count = count+1; } } @@ -1623,7 +1623,7 @@ void SdPage::SetAutoLayout(AutoLayout eLayout, bool bInit, bool bCreate ) return; } - Rectangle aRectangle[MAX_PRESOBJS]; + ::tools::Rectangle aRectangle[MAX_PRESOBJS]; const LayoutDescriptor& aDescriptor = GetLayoutDescriptor( meAutoLayout ); rtl::OUString sLayoutName( enumtoString(meAutoLayout) ); CalcAutoLayoutRectangles( *this, aRectangle, sLayoutName); @@ -1840,7 +1840,7 @@ void SdPage::SetBackgroundFullSize( bool bIn ) |* \************************************************************************/ -void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderRect, bool bScaleAllObj) +void SdPage::ScaleObjects(const Size& rNewPageSize, const ::tools::Rectangle& rNewBorderRect, bool bScaleAllObj) { sd::ScopeLockGuard aGuard( maLockAutoLayoutArrangement ); @@ -1882,7 +1882,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR Point aBackgroundPos(nLeft, nUpper); Size aBackgroundSize(aNewPageSize); - Rectangle aBorderRect (aBackgroundPos, aBackgroundSize); + ::tools::Rectangle aBorderRect (aBackgroundPos, aBackgroundSize); if (mbScaleObjects) { @@ -2103,7 +2103,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR } } -SdrObject* convertPresentationObjectImpl(SdPage& rPage, SdrObject* pSourceObj, PresObjKind& eObjKind, bool bVertical, const Rectangle& rRect) +SdrObject* convertPresentationObjectImpl(SdPage& rPage, SdrObject* pSourceObj, PresObjKind& eObjKind, bool bVertical, const ::tools::Rectangle& rRect) { SdDrawDocument* pModel = static_cast< SdDrawDocument* >( rPage.GetModel() ); DBG_ASSERT( pModel, "sd::convertPresentationObjectImpl(), no model on page!" ); @@ -2246,7 +2246,7 @@ SdrObject* convertPresentationObjectImpl(SdPage& rPage, SdrObject* pSourceObj, P @returns A presentation shape that was either found or created with the given parameters */ -SdrObject* SdPage::InsertAutoLayoutShape(SdrObject* pObj, PresObjKind eObjKind, bool bVertical, const Rectangle& rRect, bool bInit) +SdrObject* SdPage::InsertAutoLayoutShape(SdrObject* pObj, PresObjKind eObjKind, bool bVertical, const ::tools::Rectangle& rRect, bool bInit) { ::svl::IUndoManager* pUndoManager = static_cast<SdDrawDocument*>(pModel)->GetUndoManager(); const bool bUndo = pUndoManager && pUndoManager->IsInListAction() && IsInserted(); @@ -2939,7 +2939,7 @@ bool SdPage::RestoreDefaultText( SdrObject* pObj ) && pTextObj->GetOutlinerParaObject() && pTextObj->GetOutlinerParaObject()->IsVertical() != (bool)bVertical) { - Rectangle aObjectRect = pTextObj->GetSnapRect(); + ::tools::Rectangle aObjectRect = pTextObj->GetSnapRect(); pTextObj->GetOutlinerParaObject()->SetVertical(bVertical); pTextObj->SetSnapRect(aObjectRect); } @@ -2955,7 +2955,7 @@ bool SdPage::RestoreDefaultText( SdrObject* pObj ) return bRet; } -void SdPage::CalculateHandoutAreas( SdDrawDocument& rModel, AutoLayout eLayout, bool bHorizontal, std::vector< Rectangle >& rAreas ) +void SdPage::CalculateHandoutAreas( SdDrawDocument& rModel, AutoLayout eLayout, bool bHorizontal, std::vector< ::tools::Rectangle >& rAreas ) { SdPage& rHandoutMaster = *rModel.GetMasterSdPage( 0, PageKind::Handout ); @@ -3107,7 +3107,7 @@ void SdPage::CalculateHandoutAreas( SdDrawDocument& rModel, AutoLayout eLayout, aPos.X() = nStartX; for(sal_uInt16 nCol = 0; nCol < nColCnt; nCol++) { - rAreas[*pOffsets++] = Rectangle(aPos, aSize); + rAreas[*pOffsets++] = ::tools::Rectangle(aPos, aSize); aPos.X() += nOffsetX; } diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index 616a4c7478f4..14747c1203a6 100644 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -1172,7 +1172,7 @@ void PPTWriter::ImplWriteBackground( css::uno::Reference< css::beans::XPropertyS mpPptEscherEx->AddShape( ESCHER_ShpInst_Rectangle, 0xc00 ); // Flags: Connector | Background | HasSpt // #i121183# Use real PageSize in 100th mm - Rectangle aRect(Point(0, 0), Size(maPageSize.Width, maPageSize.Height)); + ::tools::Rectangle aRect(Point(0, 0), Size(maPageSize.Width, maPageSize.Height)); EscherPropertyContainer aPropOpt( mpPptEscherEx->GetGraphicProvider(), mpPicStrm, aRect ); aPropOpt.AddOpt( ESCHER_Prop_fillType, ESCHER_FillSolid ); diff --git a/sd/source/filter/eppt/epptbase.hxx b/sd/source/filter/eppt/epptbase.hxx index ad9becab80bc..ffd031d07553 100644 --- a/sd/source/filter/eppt/epptbase.hxx +++ b/sd/source/filter/eppt/epptbase.hxx @@ -328,7 +328,7 @@ protected: css::uno::Reference< css::drawing::XShape > mXShape; css::awt::Size maSize; css::awt::Point maPosition; - Rectangle maRect; + ::tools::Rectangle maRect; OString mType; bool mbPresObj; bool mbEmptyPresObj; @@ -370,7 +370,7 @@ protected: css::awt::Size MapSize( const css::awt::Size& ); css::awt::Point MapPoint( const css::awt::Point& ); - Rectangle MapRectangle( const css::awt::Rectangle& ); + ::tools::Rectangle MapRectangle( const css::awt::Rectangle& ); bool ContainsOtherShapeThanPlaceholders(); diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index 068cc542e8d0..50177d7d737c 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -111,7 +111,7 @@ sal_uInt16 PPTExBulletProvider::GetId( const OString& rUniqueId, Size& rGraphicS if ( !rUniqueId.isEmpty() ) { - Rectangle aRect; + ::tools::Rectangle aRect; std::unique_ptr<GraphicObject> xGraphicObject(new GraphicObject(rUniqueId)); Graphic aMappedGraphic, aGraphic(xGraphicObject->GetGraphic()); Size aPrefSize( aGraphic.GetPrefSize() ); @@ -832,7 +832,7 @@ void PPTWriter::ImplWritePortions( SvStream& rOut, TextObj& rTextObj ) case css::drawing::FillStyle_GRADIENT : { Point aEmptyPoint; - Rectangle aRect( aEmptyPoint, Size( 28000, 21000 ) ); + ::tools::Rectangle aRect( aEmptyPoint, Size( 28000, 21000 ) ); EscherPropertyContainer aPropOpt( mpPptEscherEx->GetGraphicProvider(), mpPicStrm, aRect ); aPropOpt.CreateGradientProperties( mXPropSet ); aPropOpt.GetOpt( ESCHER_Prop_fillColor, nBackgroundColor ); @@ -855,7 +855,7 @@ void PPTWriter::ImplWritePortions( SvStream& rOut, TextObj& rTextObj ) case css::drawing::FillStyle_GRADIENT : { Point aEmptyPoint; - Rectangle aRect( aEmptyPoint, Size( 28000, 21000 ) ); + ::tools::Rectangle aRect( aEmptyPoint, Size( 28000, 21000 ) ); EscherPropertyContainer aPropOpt( mpPptEscherEx->GetGraphicProvider(), mpPicStrm, aRect ); aPropOpt.CreateGradientProperties( mXBackgroundPropSet ); aPropOpt.GetOpt( ESCHER_Prop_fillColor, nBackgroundColor ); @@ -1022,7 +1022,7 @@ void PPTWriter::ImplFlipBoundingBox( EscherPropertyContainer& rPropOpt ) const long nRotatedWidth(maRect.GetHeight()); const long nRotatedHeight(maRect.GetWidth()); const Size aNewSize(nRotatedWidth, nRotatedHeight); - maRect = Rectangle( Point( aTopLeft.X, aTopLeft.Y ), aNewSize ); + maRect = ::tools::Rectangle( Point( aTopLeft.X, aTopLeft.Y ), aNewSize ); } } @@ -1702,7 +1702,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a const css::awt::Size aSize100thmm( mXShape->getSize() ); const css::awt::Point aPoint100thmm( mXShape->getPosition() ); - Rectangle aRect100thmm( Point( aPoint100thmm.X, aPoint100thmm.Y ), Size( aSize100thmm.Width, aSize100thmm.Height ) ); + ::tools::Rectangle aRect100thmm( Point( aPoint100thmm.X, aPoint100thmm.Y ), Size( aSize100thmm.Width, aSize100thmm.Height ) ); EscherPropertyContainer aPropOpt( mpPptEscherEx->GetGraphicProvider(), mpPicStrm, aRect100thmm ); if ( bGroup ) @@ -1744,7 +1744,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a auto aRect = o3tl::doAccess<css::awt::Rectangle>(mAny); maPosition = MapPoint( css::awt::Point( aRect->X, aRect->Y ) ); maSize = MapSize( css::awt::Size( aRect->Width, aRect->Height ) ); - maRect = Rectangle( Point( maPosition.X, maPosition.Y ), Size( maSize.Width, maSize.Height ) ); + maRect = ::tools::Rectangle( Point( maPosition.X, maPosition.Y ), Size( maSize.Width, maSize.Height ) ); } mType = "drawing.dontknow"; } @@ -1769,10 +1769,10 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a SdrObject* pObj = GetSdrObjectFromXShape( mXShape ); if ( pObj ) { - Rectangle aBound = pObj->GetCurrentBoundRect(); + ::tools::Rectangle aBound = pObj->GetCurrentBoundRect(); maPosition = MapPoint( css::awt::Point( aBound.Left(), aBound.Top() ) ); maSize = MapSize( css::awt::Size ( aBound.GetWidth(), aBound.GetHeight() ) ); - maRect = Rectangle( Point( maPosition.X, maPosition.Y ), Size( maSize.Width, maSize.Height ) ); + maRect = ::tools::Rectangle( Point( maPosition.X, maPosition.Y ), Size( maSize.Width, maSize.Height ) ); mnAngle = 0; } } @@ -1869,7 +1869,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a css::awt::Point aPoint( mXShape->getPosition() ); css::awt::Size aSize( mXShape->getSize() ); css::awt::Point aStart, aEnd, aCenter; - Rectangle aRect( Point( aPoint.X, aPoint.Y ), Size( aSize.Width, aSize.Height ) ); + ::tools::Rectangle aRect( Point( aPoint.X, aPoint.Y ), Size( aSize.Width, aSize.Height ) ); aStart.X = (sal_Int32)( ( cos( (double)( nStartAngle * F_PI18000 ) ) * 100.0 ) ); aStart.Y = - (sal_Int32)( ( sin( (double)( nStartAngle * F_PI18000 ) ) * 100.0 ) ); aEnd.X = (sal_Int32)( ( cos( (double)( nEndAngle * F_PI18000 ) ) * 100.0 ) ); @@ -2864,7 +2864,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a if ( mType == "drawing.Line" ) { double fDist = hypot( maRect.GetWidth(), maRect.GetHeight() ); - maRect = Rectangle( Point( aTextRefPoint.X, aTextRefPoint.Y ), + maRect = ::tools::Rectangle( Point( aTextRefPoint.X, aTextRefPoint.Y ), Point( (sal_Int32)( aTextRefPoint.X + fDist ), aTextRefPoint.Y - 1 ) ); ImplCreateTextShape( aPropOpt, aSolverContainer, false ); aPropOpt.AddOpt( ESCHER_Prop_FitTextToShape, 0x60006 ); // Size Shape To Fit Text @@ -2968,7 +2968,7 @@ bool PPTWriter::ImplCreateCellBorder( const CellBorder* pCellBorder, sal_Int32 n //get merged cell's width sal_Int32 GetCellRight( sal_Int32 nColumn, - Rectangle& rect, + ::tools::Rectangle& rect, std::vector< std::pair< sal_Int32, sal_Int32 > >& aColumns, uno::Reference< table::XMergeableCell >& xCell ) { @@ -2985,7 +2985,7 @@ sal_Int32 GetCellRight( sal_Int32 nColumn, } //get merged cell's height sal_Int32 GetCellBottom( sal_Int32 nRow, - Rectangle& rect, + ::tools::Rectangle& rect, std::vector< std::pair< sal_Int32, sal_Int32 > >& aRows, uno::Reference< table::XMergeableCell >& xCell ) { diff --git a/sd/source/filter/eppt/escherex.cxx b/sd/source/filter/eppt/escherex.cxx index 580fbb2b2195..a5a950147e1d 100644 --- a/sd/source/filter/eppt/escherex.cxx +++ b/sd/source/filter/eppt/escherex.cxx @@ -203,7 +203,7 @@ void PptEscherEx::CloseContainer() } } -sal_uInt32 PptEscherEx::EnterGroup( Rectangle* pBoundRect, SvMemoryStream* pClientData ) +sal_uInt32 PptEscherEx::EnterGroup( ::tools::Rectangle* pBoundRect, SvMemoryStream* pClientData ) { sal_uInt32 nShapeId = 0; /* SJ: #Issue 26747# @@ -212,7 +212,7 @@ sal_uInt32 PptEscherEx::EnterGroup( Rectangle* pBoundRect, SvMemoryStream* pClie */ if ( mnGroupLevel < 12 ) { - Rectangle aRect; + ::tools::Rectangle aRect; if ( pBoundRect ) aRect = *pBoundRect; diff --git a/sd/source/filter/eppt/escherex.hxx b/sd/source/filter/eppt/escherex.hxx index 60e1a873e21b..d03c987282ea 100644 --- a/sd/source/filter/eppt/escherex.hxx +++ b/sd/source/filter/eppt/escherex.hxx @@ -54,7 +54,7 @@ class PptEscherEx : public EscherEx void OpenContainer( sal_uInt16 n_EscherContainer, int nRecInstance = 0 ) override; void CloseContainer() override; - sal_uInt32 EnterGroup( Rectangle* pBoundRect, SvMemoryStream* pClientData ); + sal_uInt32 EnterGroup( ::tools::Rectangle* pBoundRect, SvMemoryStream* pClientData ); sal_uInt32 DrawingGroupContainerSize(); void WriteDrawingGroupContainer( SvStream& rSt ); diff --git a/sd/source/filter/eppt/pptx-epptbase.cxx b/sd/source/filter/eppt/pptx-epptbase.cxx index 4a14713b9e60..4b98eae7b143 100644 --- a/sd/source/filter/eppt/pptx-epptbase.cxx +++ b/sd/source/filter/eppt/pptx-epptbase.cxx @@ -681,13 +681,13 @@ awt::Point PPTWriterBase::MapPoint( const awt::Point& rPoint ) return awt::Point( aRet.X(), aRet.Y() ); } -Rectangle PPTWriterBase::MapRectangle( const awt::Rectangle& rRect ) +::tools::Rectangle PPTWriterBase::MapRectangle( const awt::Rectangle& rRect ) { css::awt::Point aPoint( rRect.X, rRect.Y ); css::awt::Size aSize( rRect.Width, rRect.Height ); css::awt::Point aP( MapPoint( aPoint ) ); css::awt::Size aS( MapSize( aSize ) ); - return Rectangle( Point( aP.X, aP.Y ), Size( aS.Width, aS.Height ) ); + return ::tools::Rectangle( Point( aP.X, aP.Y ), Size( aS.Width, aS.Height ) ); } bool PPTWriterBase::GetShapeByIndex( sal_uInt32 nIndex, bool bGroup ) @@ -714,7 +714,7 @@ bool PPTWriterBase::GetShapeByIndex( sal_uInt32 nIndex, bool bGroup ) break; maPosition = MapPoint( mXShape->getPosition() ); maSize = MapSize( mXShape->getSize() ); - maRect = Rectangle( Point( maPosition.X, maPosition.Y ), Size( maSize.Width, maSize.Height ) ); + maRect = ::tools::Rectangle( Point( maPosition.X, maPosition.Y ), Size( maSize.Width, maSize.Height ) ); OStringBuffer aTypeBuffer(OUStringToOString( mXShape->getShapeType(), RTL_TEXTENCODING_UTF8)); diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx index c94e7ddcfd7b..c1941ec2be74 100644 --- a/sd/source/filter/grf/sdgrffilter.cxx +++ b/sd/source/filter/grf/sdgrffilter.cxx @@ -215,7 +215,7 @@ bool SdGRFFilter::Import() aPos.X() = ( ( aPagSize.Width() - aGrfSize.Width() ) >> 1 ) + pPage->GetLftBorder(); aPos.Y() = ( ( aPagSize.Height() - aGrfSize.Height() ) >> 1 ) + pPage->GetUppBorder(); - pPage->InsertObject( new SdrGrafObj( aGraphic, Rectangle( aPos, aGrfSize ) ) ); + pPage->InsertObject( new SdrGrafObj( aGraphic, ::tools::Rectangle( aPos, aGrfSize ) ) ); bRet = true; } return bRet; diff --git a/sd/source/filter/html/htmlattr.cxx b/sd/source/filter/html/htmlattr.cxx index 13e5f497dd31..782e599861c6 100644 --- a/sd/source/filter/html/htmlattr.cxx +++ b/sd/source/filter/html/htmlattr.cxx @@ -33,11 +33,11 @@ SdHtmlAttrPreview::~SdHtmlAttrPreview() { } -void SdHtmlAttrPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SdHtmlAttrPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) { DecorationView aDecoView(&rRenderContext); - Rectangle aTextRect; + ::tools::Rectangle aTextRect; aTextRect.SetSize(GetOutputSize()); rRenderContext.SetLineColor(m_aBackColor); diff --git a/sd/source/filter/html/htmlattr.hxx b/sd/source/filter/html/htmlattr.hxx index 9013f9d3b044..a681040d5d29 100644 --- a/sd/source/filter/html/htmlattr.hxx +++ b/sd/source/filter/html/htmlattr.hxx @@ -34,7 +34,7 @@ public: SdHtmlAttrPreview( vcl::Window* pParent, WinBits nStyle ); virtual ~SdHtmlAttrPreview() override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) override; void SetColors( Color& aBack, Color& aText, Color& aLink, Color& aVLink, Color& aALink ); diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index 0356a6c8937e..41c62c616d5d 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -1685,7 +1685,7 @@ bool HtmlExport::CreateHtmlForPresPages() SdAnimationInfo* pInfo = SdDrawDocument::GetAnimationInfo(pObject); SdIMapInfo* pIMapInfo = SdDrawDocument::GetIMapInfo(pObject); - Rectangle aRect(pObject->GetCurrentBoundRect()); + ::tools::Rectangle aRect(pObject->GetCurrentBoundRect()); Point aLogPos(aRect.TopLeft()); bool bIsSquare = aRect.GetWidth() == aRect.GetHeight(); @@ -1740,7 +1740,7 @@ bool HtmlExport::CreateHtmlForPresPages() { case IMAP_OBJ_RECTANGLE: { - Rectangle aArea(static_cast<IMapRectangleObject*>(pArea)-> + ::tools::Rectangle aArea(static_cast<IMapRectangleObject*>(pArea)-> GetRectangle(false)); // conversion into pixel coordinates @@ -2822,7 +2822,7 @@ OUString HtmlExport::CreateHTMLPolygonArea( const ::basegfx::B2DPolyPolygon& rPo } // create area for a rectangle; we expect pixel coordinates -OUString HtmlExport::CreateHTMLRectArea( const Rectangle& rRect, +OUString HtmlExport::CreateHTMLRectArea( const ::tools::Rectangle& rRect, const OUString& rHRef ) { OUString aStr( diff --git a/sd/source/filter/html/htmlex.hxx b/sd/source/filter/html/htmlex.hxx index a9c2939adea3..2af311c78573 100644 --- a/sd/source/filter/html/htmlex.hxx +++ b/sd/source/filter/html/htmlex.hxx @@ -185,7 +185,7 @@ class HtmlExport final static OUString CreateHTMLCircleArea( sal_uLong nRadius, sal_uLong nCenterX, sal_uLong nCenterY, const OUString& rHRef ); static OUString CreateHTMLPolygonArea( const ::basegfx::B2DPolyPolygon& rPolyPoly, Size aShift, double fFactor, const OUString& rHRef ); - static OUString CreateHTMLRectArea( const Rectangle& rRect, + static OUString CreateHTMLRectArea( const ::tools::Rectangle& rRect, const OUString& rHRef ); OUString CreatePageURL( sal_uInt16 nPgNum ); diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 25ea2c450920..f41a220d6b19 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -555,7 +555,7 @@ bool ImplSdPPTImport::Import() aVisAreaSize = aDocAtom.GetSlidesPageSize(); } Scale( aVisAreaSize ); - pDocShell->SetVisArea( Rectangle( Point(), aVisAreaSize ) ); + pDocShell->SetVisArea( ::tools::Rectangle( Point(), aVisAreaSize ) ); // create master pages: @@ -805,7 +805,7 @@ bool ImplSdPPTImport::Import() { if ( nObjCount++ ) // skipping the first object { - Rectangle aEmpty; + ::tools::Rectangle aEmpty; if (!aHd2.SeekToBegOfRecord(rStCtrl)) break; SdrObject* pImpObj = ImportObj( rStCtrl, static_cast<void*>(&aProcessData), aEmpty, aEmpty ); @@ -1436,7 +1436,7 @@ void ImplSdPPTImport::SetHeaderFooterPageSettings( SdPage* pPage, const PptSlide sal_uInt32 nPosition = pHFE->NeedToImportInstance( i, rSlidePersist ); if ( nPosition ) { - Rectangle aEmpty; + ::tools::Rectangle aEmpty; bVisible = false; rStCtrl.Seek( nPosition ); ProcessData aProcessData( rSlidePersist, SdPageCapsule(pPage) ); @@ -2449,8 +2449,8 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj SdrObject* pTitleObj = static_cast<SdPage&>(pPage->TRG_GetMasterPage()).GetPresObj( PRESOBJ_TITLE ); SdrObject* pOutlineObj = static_cast<SdPage&>(pPage->TRG_GetMasterPage()).GetPresObj( PRESOBJ_OUTLINE ); - Rectangle aTitleRect; - Rectangle aOutlineRect; + ::tools::Rectangle aTitleRect; + ::tools::Rectangle aOutlineRect; Size aOutlineSize; if ( pTitleObj ) @@ -2460,7 +2460,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj aOutlineRect = pOutlineObj->GetLogicRect(); aOutlineSize = aOutlineRect.GetSize(); } - Rectangle aLogicRect( pPresObj->GetLogicRect() ); + ::tools::Rectangle aLogicRect( pPresObj->GetLogicRect() ); Size aLogicSize( aLogicRect.GetSize() ); switch ( nPlacementId ) @@ -2575,7 +2575,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj return pRet; } -SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, void* pData, Rectangle& rTextRect, SdrObject* pRet ) +SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, void* pData, ::tools::Rectangle& rTextRect, SdrObject* pRet ) { SdrObject* pObj = SdrPowerPointImport::ProcessObj( rSt, rObjData, pData, rTextRect, pRet ); diff --git a/sd/source/filter/ppt/pptin.hxx b/sd/source/filter/ppt/pptin.hxx index c2a94a62bb51..90c5f6a686cc 100644 --- a/sd/source/filter/ppt/pptin.hxx +++ b/sd/source/filter/ppt/pptin.hxx @@ -63,7 +63,7 @@ class ImplSdPPTImport : public SdrPowerPointImport void FillSdAnimationInfo( SdAnimationInfo* pInfo, PptInteractiveInfoAtom* pIAtom, const OUString& aMacroName ); - virtual SdrObject* ProcessObj( SvStream& rSt, DffObjData& rData, void* pData, Rectangle& rTextRect, SdrObject* pObj ) override; + virtual SdrObject* ProcessObj( SvStream& rSt, DffObjData& rData, void* pData, ::tools::Rectangle& rTextRect, SdrObject* pObj ) override; virtual SdrObject* ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pText, SdPageCapsule pPage, SfxStyleSheet*, SfxStyleSheet** ) const override; diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx index 48b701192433..f126e3c82885 100644 --- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx +++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx @@ -302,7 +302,7 @@ awt::Rectangle SAL_CALL ThrowIfDisposed (); // Transform visible area into screen coordinates. - ::Rectangle aVisibleArea ( + ::tools::Rectangle aVisibleArea ( maShapeTreeInfo.GetViewForwarder()->GetVisibleArea()); ::Point aPixelTopLeft ( maShapeTreeInfo.GetViewForwarder()->LogicToPixel ( @@ -354,7 +354,7 @@ awt::Size SAL_CALL ThrowIfDisposed (); // Transform visible area into screen coordinates. - ::Rectangle aVisibleArea ( + ::tools::Rectangle aVisibleArea ( maShapeTreeInfo.GetViewForwarder()->GetVisibleArea()); ::Point aPixelTopLeft ( maShapeTreeInfo.GetViewForwarder()->LogicToPixel ( diff --git a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx index 5a1aa3f7e655..e56a0b050f85 100644 --- a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx +++ b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx @@ -120,12 +120,12 @@ namespace accessibility return false; } - Rectangle AccessibleOutlineEditSource::GetVisArea() const + ::tools::Rectangle AccessibleOutlineEditSource::GetVisArea() const { if( IsValid() ) { SdrPaintWindow* pPaintWindow = mrView.FindPaintWindow(mrWindow); - Rectangle aVisArea; + ::tools::Rectangle aVisArea; if(pPaintWindow) { @@ -137,7 +137,7 @@ namespace accessibility return mrWindow.LogicToPixel( aVisArea, aMapMode ); } - return Rectangle(); + return ::tools::Rectangle(); } Point AccessibleOutlineEditSource::LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const diff --git a/sd/source/ui/accessibility/AccessiblePageShape.cxx b/sd/source/ui/accessibility/AccessiblePageShape.cxx index 43513cfdb810..c19d6a40a4c6 100644 --- a/sd/source/ui/accessibility/AccessiblePageShape.cxx +++ b/sd/source/ui/accessibility/AccessiblePageShape.cxx @@ -116,10 +116,10 @@ awt::Rectangle SAL_CALL AccessiblePageShape::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/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx index 72f67ba9a098..6f2c5853b352 100644 --- a/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx +++ b/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx @@ -298,7 +298,7 @@ awt::Rectangle SAL_CALL AccessibleSlideSorterObject::getBounds() const SolarMutexGuard aSolarGuard; - Rectangle aBBox ( + ::tools::Rectangle aBBox ( mrSlideSorter.GetView().GetLayouter().GetPageObjectLayouter()->GetBoundingBox( mrSlideSorter.GetModel().GetPageDescriptor(mnPageNumber), ::sd::slidesorter::view::PageObjectLayouter::Part::PageObject, @@ -310,7 +310,7 @@ awt::Rectangle SAL_CALL AccessibleSlideSorterObject::getBounds() if (xParentComponent.is()) { awt::Rectangle aParentBBox (xParentComponent->getBounds()); - aBBox.Intersection(Rectangle( + aBBox.Intersection(::tools::Rectangle( aParentBBox.X, aParentBBox.Y, aParentBBox.Width, diff --git a/sd/source/ui/accessibility/AccessibleViewForwarder.cxx b/sd/source/ui/accessibility/AccessibleViewForwarder.cxx index e7db43c6bfe8..5190622366d5 100644 --- a/sd/source/ui/accessibility/AccessibleViewForwarder.cxx +++ b/sd/source/ui/accessibility/AccessibleViewForwarder.cxx @@ -54,9 +54,9 @@ AccessibleViewForwarder::~AccessibleViewForwarder() // empty } -Rectangle AccessibleViewForwarder::GetVisibleArea() const +::tools::Rectangle AccessibleViewForwarder::GetVisibleArea() const { - Rectangle aVisibleArea; + ::tools::Rectangle aVisibleArea; if((sal_uInt32)mnWindowId < mpView->PaintWindowCount()) { @@ -78,7 +78,7 @@ Point AccessibleViewForwarder::LogicToPixel (const Point& rPoint) const { SdrPaintWindow* pPaintWindow = mpView->GetPaintWindow((sal_uInt32)mnWindowId); OutputDevice& rOutDev = pPaintWindow->GetOutputDevice(); - Rectangle aBBox(static_cast<vcl::Window&>(rOutDev).GetWindowExtentsRelative(nullptr)); + ::tools::Rectangle aBBox(static_cast<vcl::Window&>(rOutDev).GetWindowExtentsRelative(nullptr)); return rOutDev.LogicToPixel (rPoint) + aBBox.TopLeft(); } else diff --git a/sd/source/ui/animations/CategoryListBox.cxx b/sd/source/ui/animations/CategoryListBox.cxx index ff1b28c5b7ba..f81b65ecec49 100644 --- a/sd/source/ui/animations/CategoryListBox.cxx +++ b/sd/source/ui/animations/CategoryListBox.cxx @@ -47,7 +47,7 @@ void CategoryListBox::UserDraw( const UserDrawEvent& rUDEvt ) if( ListBox::GetEntryFlags(nItem) & ListBoxEntryFlags::DisableSelection ) { - Rectangle aOutRect( rUDEvt.GetRect() ); + ::tools::Rectangle aOutRect( rUDEvt.GetRect() ); vcl::RenderContext* pDev = rUDEvt.GetRenderContext(); // fill the background diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index 21e28d46a8e0..ae782622bdc9 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -398,7 +398,7 @@ void CustomAnimationTriggerEntryItem::Paint(const Point& rPos, SvTreeListBox& rD Point aPos(0, rPos.Y()); - Rectangle aOutRect(aPos, aSize); + ::tools::Rectangle aOutRect(aPos, aSize); // fill the background Color aColor(rRenderContext.GetSettings().GetStyleSettings().GetDialogColor()); @@ -941,7 +941,7 @@ void CustomAnimationList::notify_change() mpController->onSelect(); } -void CustomAnimationList::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void CustomAnimationList::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) { if( mbIgnorePaint ) return; @@ -955,7 +955,7 @@ void CustomAnimationList::Paint(vcl::RenderContext& rRenderContext, const Rectan rRenderContext.SetTextColor(rRenderContext.GetSettings().GetStyleSettings().GetDisableColor()); ::Point aOffset(rRenderContext.LogicToPixel(Point(6, 6), MapUnit::MapAppFont)); - Rectangle aRect(Point(0,0), GetOutputSizePixel()); + ::tools::Rectangle aRect(Point(0,0), GetOutputSizePixel()); aRect.Left() += aOffset.X(); aRect.Top() += aOffset.Y(); diff --git a/sd/source/ui/animations/CustomAnimationList.hxx b/sd/source/ui/animations/CustomAnimationList.hxx index 7b45e88603b7..07303eedbb03 100644 --- a/sd/source/ui/animations/CustomAnimationList.hxx +++ b/sd/source/ui/animations/CustomAnimationList.hxx @@ -74,7 +74,7 @@ public: virtual void SelectHdl() override; virtual bool DoubleClickHdl() override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect ) override; virtual VclPtr<PopupMenu> CreateContextMenu() override; virtual void ExecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry ) override; diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx index b793469b6c8d..39369192911d 100644 --- a/sd/source/ui/animations/motionpathtag.cxx +++ b/sd/source/ui/animations/motionpathtag.cxx @@ -608,7 +608,7 @@ bool MotionPathTag::OnTabHandles( const KeyEvent& rKEvt ) if( pWindow ) { Point aHdlPosition(pHdl->GetPos()); - Rectangle aVisRect(aHdlPosition - Point(100, 100), Size(200, 200)); + ::tools::Rectangle aVisRect(aHdlPosition - Point(100, 100), Size(200, 200)); mrView.MakeVisible(aVisRect, *pWindow); } } @@ -798,7 +798,7 @@ bool MotionPathTag::MarkPoint(SdrHdl& rHdl, bool bUnmark ) return bRet; } -bool MotionPathTag::MarkPoints(const Rectangle* pRect, bool bUnmark ) +bool MotionPathTag::MarkPoints(const ::tools::Rectangle* pRect, bool bUnmark ) { bool bChgd=false; @@ -940,7 +940,7 @@ void MotionPathTag::addCustomHandles( SdrHdlList& rHandlerList ) } else { - Rectangle aRect(mpPathObj->GetCurrentBoundRect()); + ::tools::Rectangle aRect(mpPathObj->GetCurrentBoundRect()); if(!aRect.IsEmpty()) { diff --git a/sd/source/ui/animations/motionpathtag.hxx b/sd/source/ui/animations/motionpathtag.hxx index ebb6a55c8a71..ef6b06657d7b 100644 --- a/sd/source/ui/animations/motionpathtag.hxx +++ b/sd/source/ui/animations/motionpathtag.hxx @@ -54,7 +54,7 @@ public: virtual sal_uLong GetMarkedPointCount() const override; virtual bool MarkPoint(SdrHdl& rHdl, bool bUnmark) override; virtual void CheckPossibilities() override; - virtual bool MarkPoints(const Rectangle* pRect, bool bUnmark) override; + virtual bool MarkPoints(const ::tools::Rectangle* pRect, bool bUnmark) override; const CustomAnimationEffectPtr& getEffect() const { return mpEffect; } diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 29278b4fdc63..465f83698382 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -489,11 +489,11 @@ void AnnotationManagerImpl::InsertAnnotation(const OUString& rText) const int page_width = pPage->GetSize().Width(); const int width = 1000; const int height = 800; - Rectangle aTagRect; + ::tools::Rectangle aTagRect; while( true ) { - Rectangle aNewRect( x, y, x + width - 1, y + height - 1 ); + ::tools::Rectangle aNewRect( x, y, x + width - 1, y + height - 1 ); bool bFree = true; for( AnnotationVector::iterator iter = aAnnotations.begin(); iter != aAnnotations.end(); ++iter ) @@ -1089,7 +1089,7 @@ IMPL_LINK(AnnotationManagerImpl,EventMultiplexerListener, } } -void AnnotationManagerImpl::ExecuteAnnotationContextMenu( const Reference< XAnnotation >& xAnnotation, vcl::Window* pParent, const Rectangle& rContextRect, bool bButtonMenu /* = false */ ) +void AnnotationManagerImpl::ExecuteAnnotationContextMenu( const Reference< XAnnotation >& xAnnotation, vcl::Window* pParent, const ::tools::Rectangle& rContextRect, bool bButtonMenu /* = false */ ) { SfxDispatcher* pDispatcher( getDispatcher( mrBase ) ); if( !pDispatcher ) diff --git a/sd/source/ui/annotations/annotationmanagerimpl.hxx b/sd/source/ui/annotations/annotationmanagerimpl.hxx index 242a7fb6dcfc..16312b233425 100644 --- a/sd/source/ui/annotations/annotationmanagerimpl.hxx +++ b/sd/source/ui/annotations/annotationmanagerimpl.hxx @@ -79,7 +79,7 @@ public: void DeleteAnnotationsByAuthor( const OUString& sAuthor ); void DeleteAllAnnotations(); - void ExecuteAnnotationContextMenu( const css::uno::Reference< css::office::XAnnotation >& xAnnotation, vcl::Window* pParent, const Rectangle& rContextRect, bool bButtonMenu = false ); + void ExecuteAnnotationContextMenu( const css::uno::Reference< css::office::XAnnotation >& xAnnotation, vcl::Window* pParent, const ::tools::Rectangle& rContextRect, bool bButtonMenu = false ); static Color GetColorDark(sal_uInt16 aAuthorIndex); static Color GetColorLight(sal_uInt16 aAuthorIndex); diff --git a/sd/source/ui/annotations/annotationtag.cxx b/sd/source/ui/annotations/annotationtag.cxx index 0251af279c9f..78e53f9eff68 100644 --- a/sd/source/ui/annotations/annotationtag.cxx +++ b/sd/source/ui/annotations/annotationtag.cxx @@ -116,7 +116,7 @@ bool AnnotationDragMove::BeginSdrDrag() DragStat().SetShown(!DragStat().IsShown()); maOrigin = GetDragHdl()->GetPos(); - DragStat().SetActionRect(Rectangle(maOrigin,maOrigin)); + DragStat().SetActionRect(::tools::Rectangle(maOrigin,maOrigin)); return true; } @@ -133,7 +133,7 @@ void AnnotationDragMove::MoveSdrDrag(const Point& rNoSnapPnt) DragStat().NextMove(aPnt); GetDragHdl()->SetPos( maOrigin + Point( DragStat().GetDX(), DragStat().GetDY() ) ); Show(); - DragStat().SetActionRect(Rectangle(aPnt,aPnt)); + DragStat().SetActionRect(::tools::Rectangle(aPnt,aPnt)); } } } @@ -351,7 +351,7 @@ bool AnnotationTag::Command( const CommandEvent& rCEvt ) vcl::Window* pWindow = mrView.GetViewShell()->GetActiveWindow(); if( pWindow ) { - Rectangle aContextRect(rCEvt.GetMousePosPixel(),Size(1,1)); + ::tools::Rectangle aContextRect(rCEvt.GetMousePosPixel(),Size(1,1)); mrManager.ExecuteAnnotationContextMenu( mxAnnotation, pWindow, aContextRect ); return true; } @@ -436,7 +436,7 @@ bool AnnotationTag::MarkPoint(SdrHdl& /*rHdl*/, bool /*bUnmark*/ ) return bRet; } -bool AnnotationTag::MarkPoints(const Rectangle* /*pRect*/, bool /*bUnmark*/ ) +bool AnnotationTag::MarkPoints(const ::tools::Rectangle* /*pRect*/, bool /*bUnmark*/ ) { bool bChgd=false; return bChgd; @@ -495,7 +495,7 @@ void AnnotationTag::select() RealPoint2D aPosition( mxAnnotation->getPosition() ); Point aPos( static_cast<long>(aPosition.X * 100.0), static_cast<long>(aPosition.Y * 100.0) ); - Rectangle aVisRect( aPos, pWindow->PixelToLogic(maSize) ); + ::tools::Rectangle aVisRect( aPos, pWindow->PixelToLogic(maSize) ); mrView.MakeVisible(aVisRect, *pWindow); } } @@ -546,7 +546,7 @@ BitmapEx AnnotationTag::CreateAnnotationBitmap( bool bSelected ) } Point aPos; - Rectangle aBorderRect( aPos, maSize ); + ::tools::Rectangle aBorderRect( aPos, maSize ); pVDev->SetLineColor(aBorderColor); pVDev->SetFillColor(maColor); pVDev->DrawRect( aBorderRect ); @@ -573,7 +573,7 @@ void AnnotationTag::OpenPopup( bool bEdit ) aPos.X() += 4; // magic! aPos.Y() += 1; - Rectangle aRect( aPos, maSize ); + ::tools::Rectangle aRect( aPos, maSize ); mpAnnotationWindow.reset( VclPtr<AnnotationWindow>::Create( mrManager, mrView.GetDocSh(), pWindow->GetWindow(GetWindowType::Frame) ) ); mpAnnotationWindow->InitControls(); diff --git a/sd/source/ui/annotations/annotationtag.hxx b/sd/source/ui/annotations/annotationtag.hxx index 2e8f63ccc49a..9419efc0fd2e 100644 --- a/sd/source/ui/annotations/annotationtag.hxx +++ b/sd/source/ui/annotations/annotationtag.hxx @@ -54,7 +54,7 @@ public: virtual sal_uLong GetMarkedPointCount() const override; virtual bool MarkPoint(SdrHdl& rHdl, bool bUnmark) override; virtual void CheckPossibilities() override; - virtual bool MarkPoints(const Rectangle* pRect, bool bUnmark) override; + virtual bool MarkPoints(const ::tools::Rectangle* pRect, bool bUnmark) override; void Move( int nDX, int nDY ); bool OnMove( const KeyEvent& rKEvt ); diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index 4e7dfc1fa6f1..18bca50855a1 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -126,12 +126,12 @@ void AnnotationTextWindow::dispose() Control::dispose(); } -void AnnotationTextWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect) +void AnnotationTextWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const ::tools::Rectangle& rRect) { const bool bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode(); if ( !bHighContrast ) { - DrawGradient(Rectangle(Point(0,0),PixelToLogic(GetSizePixel())), + DrawGradient(::tools::Rectangle(Point(0,0),PixelToLogic(GetSizePixel())), Gradient(GradientStyle::Linear,mpAnnotationWindow->maColorLight,mpAnnotationWindow->maColor)); } @@ -331,7 +331,7 @@ void AnnotationWindow::InitControls() mpOutlinerView = new OutlinerView ( mpOutliner, mpTextWindow ); mpOutliner->InsertView(mpOutlinerView ); mpTextWindow->SetOutlinerView(mpOutlinerView); - mpOutlinerView->SetOutputArea( PixelToLogic( Rectangle(0,0,1,1) ) ); + mpOutlinerView->SetOutputArea( PixelToLogic( ::tools::Rectangle(0,0,1,1) ) ); //create Scrollbars mpVScrollbar = VclPtr<ScrollBar>::Create(this, WB_3DLOOK |WB_VSCROLL|WB_DRAG); @@ -409,10 +409,10 @@ void AnnotationWindow::DoResize() mpMeta->setPosSizePixel(0,aHeight,GetSizePixel().Width()-METABUTTON_AREA_WIDTH,POSTIT_META_HEIGHT); mpOutliner->SetPaperSize( PixelToLogic( Size(aWidth,aHeight) ) ) ; - mpOutlinerView->SetOutputArea( PixelToLogic( Rectangle(0,0,aWidth,aHeight) ) ); + mpOutlinerView->SetOutputArea( PixelToLogic( ::tools::Rectangle(0,0,aWidth,aHeight) ) ); if (!mpVScrollbar->IsVisible()) { // if we do not have a scrollbar anymore, we want to see the complete text - mpOutlinerView->SetVisArea( PixelToLogic( Rectangle(0,0,aWidth,aHeight) ) ); + mpOutlinerView->SetVisArea( PixelToLogic( ::tools::Rectangle(0,0,aWidth,aHeight) ) ); } mpVScrollbar->setPosSizePixel( 0 + aWidth, 0, GetScrollbarWidth(), aHeight ); mpVScrollbar->SetVisibleSize( PixelToLogic(Size(0,aHeight)).Height() ); @@ -432,7 +432,7 @@ void AnnotationWindow::DoResize() maPopupTriangle.append(basegfx::B2DPoint(aRight.X(),aRight.Y())); maPopupTriangle.append(basegfx::B2DPoint(aBottom.X(),aBottom.Y())); maPopupTriangle.setClosed(true); - maRectMetaButton = PixelToLogic( Rectangle( Point( + maRectMetaButton = PixelToLogic( ::tools::Rectangle( Point( aPos.X()+GetSizePixel().Width()-(METABUTTON_WIDTH+10), aPos.Y()+5 ), Size( METABUTTON_WIDTH, METABUTTON_HEIGHT ) ) ); @@ -632,7 +632,7 @@ void AnnotationWindow::Deactivate() Engine()->GetUndoManager().Clear(); } -void AnnotationWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void AnnotationWindow::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) { FloatingWindow::Paint(rRenderContext, rRect); @@ -645,7 +645,7 @@ void AnnotationWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle else SetFillColor(maColor); SetLineColor(); - DrawRect(PixelToLogic(Rectangle(Point(mpMeta->GetPosPixel().X()+mpMeta->GetSizePixel().Width(),mpMeta->GetPosPixel().Y()),Size(METABUTTON_AREA_WIDTH,mpMeta->GetSizePixel().Height())))); + DrawRect(PixelToLogic(::tools::Rectangle(Point(mpMeta->GetPosPixel().X()+mpMeta->GetSizePixel().Width(),mpMeta->GetPosPixel().Y()),Size(METABUTTON_AREA_WIDTH,mpMeta->GetSizePixel().Height())))); if ( bHighContrast ) { @@ -706,7 +706,7 @@ void AnnotationWindow::MouseButtonDown( const MouseEvent& rMEvt ) if (!mbReadonly && maRectMetaButton.IsInside(PixelToLogic(rMEvt.GetPosPixel())) && rMEvt.IsLeft()) { // context menu - Rectangle aRect(LogicToPixel(maRectMetaButton.BottomLeft()),LogicToPixel(maRectMetaButton.BottomLeft())); + ::tools::Rectangle aRect(LogicToPixel(maRectMetaButton.BottomLeft()),LogicToPixel(maRectMetaButton.BottomLeft())); mrManager.ExecuteAnnotationContextMenu( mxAnnotation, static_cast<vcl::Window*>(this), aRect, true ); } } @@ -717,7 +717,7 @@ void AnnotationWindow::Command( const CommandEvent& rCEvt ) { if( mpMeta->IsVisible() &&(mpMeta->GetPosPixel().Y() < rCEvt.GetMousePosPixel().Y()) ) return; - mrManager.ExecuteAnnotationContextMenu( mxAnnotation, this, Rectangle(rCEvt.GetMousePosPixel(),Size(1,1)) ); + mrManager.ExecuteAnnotationContextMenu( mxAnnotation, this, ::tools::Rectangle(rCEvt.GetMousePosPixel(),Size(1,1)) ); } else { diff --git a/sd/source/ui/annotations/annotationwindow.hxx b/sd/source/ui/annotations/annotationwindow.hxx index 3643a070b36b..14f61f2d3520 100644 --- a/sd/source/ui/annotations/annotationwindow.hxx +++ b/sd/source/ui/annotations/annotationwindow.hxx @@ -53,7 +53,7 @@ private: VclPtr<AnnotationWindow> mpAnnotationWindow; protected: - virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect) override; + virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const ::tools::Rectangle& rRect) override; virtual void KeyInput( const KeyEvent& rKeyEvt ) override; virtual void MouseMove( const MouseEvent& rMEvt ) override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; @@ -87,7 +87,7 @@ class AnnotationWindow : public FloatingWindow bool mbMouseOverButton; VclPtr<AnnotationTextWindow> mpTextWindow; VclPtr<MultiLineEdit> mpMeta; - Rectangle maRectMetaButton; + ::tools::Rectangle maRectMetaButton; basegfx::B2DPolygon maPopupTriangle; protected: @@ -127,7 +127,7 @@ class AnnotationWindow : public FloatingWindow void ToggleInsMode(); virtual void Deactivate() override; - virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect) override; + virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const ::tools::Rectangle& rRect) override; virtual void MouseMove( const MouseEvent& rMEvt ) override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void Command( const CommandEvent& rCEvt ) override; diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx index 658c2fd971b3..2422766ccfa0 100644 --- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx +++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx @@ -759,7 +759,7 @@ void SdPhotoAlbumDialog::createCaption(const awt::Size& aPageSize ) SdPage* pSlide = pDoc->GetSdPage( pDoc->GetSdPageCount(PageKind::Standard)-1, PageKind::Standard ); // try to get existing PresObj - const Rectangle rRect(CapPos,CapSize); + const ::tools::Rectangle rRect(CapPos,CapSize); SdrObject* pSdrObj = pSlide->GetPresObj(PRESOBJ_TITLE); if(!pSdrObj) diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.cxx b/sd/source/ui/dlg/RemoteDialogClientBox.cxx index 7c25286c1b81..f0933ba5e7e9 100644 --- a/sd/source/ui/dlg/RemoteDialogClientBox.cxx +++ b/sd/source/ui/dlg/RemoteDialogClientBox.cxx @@ -168,7 +168,7 @@ void ClientBox::CalcActiveHeight( const long nPos ) m_nActiveHeight = aTextHeight + 2; } -Rectangle ClientBox::GetEntryRect( const long nPos ) const +::tools::Rectangle ClientBox::GetEntryRect( const long nPos ) const { const ::osl::MutexGuard aGuard( m_entriesMutex ); @@ -186,7 +186,7 @@ Rectangle ClientBox::GetEntryRect( const long nPos ) const if ( m_bHasActive && ( nPos < m_nActive ) ) aPos.Y() += m_nActiveHeight - m_nStdHeight; - return Rectangle( aPos, aSize ); + return ::tools::Rectangle( aPos, aSize ); } void ClientBox::DeleteRemoved() @@ -273,7 +273,7 @@ void ClientBox::selectEntry( const long nPos ) guard.clear(); } -void ClientBox::DrawRow(vcl::RenderContext& rRenderContext, const Rectangle& rRect, const TClientBoxEntry& rEntry) +void ClientBox::DrawRow(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect, const TClientBoxEntry& rEntry) { const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); @@ -359,7 +359,7 @@ void ClientBox::RecalcAll() } else { - Rectangle aEntryRect = GetEntryRect( m_nActive ); + ::tools::Rectangle aEntryRect = GetEntryRect( m_nActive ); Size aPinBoxSize( m_aPinBox->GetSizePixel() ); Point aPos( aEntryRect.Left(), @@ -369,7 +369,7 @@ void ClientBox::RecalcAll() if ( !bAlreadyAuthorised ) { - m_sPinTextRect = Rectangle( aPos.X(), aPos.Y(), + m_sPinTextRect = ::tools::Rectangle( aPos.X(), aPos.Y(), aEntryRect.Right(), aEntryRect.Bottom() - TOP_OFFSET); @@ -474,7 +474,7 @@ bool ClientBox::HandleCursorKey( sal_uInt16 nKeyCode ) return true; } -void ClientBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle &/*rPaintRect*/) +void ClientBox::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle &/*rPaintRect*/) { if (!m_bInDelete) DeleteRemoved(); @@ -494,7 +494,7 @@ void ClientBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle &/*rPa for (ITER iIndex = m_vEntries.begin(); iIndex < m_vEntries.end(); ++iIndex) { aSize.Height() = (*iIndex)->m_bActive ? m_nActiveHeight : m_nStdHeight; - Rectangle aEntryRect(aStart, aSize); + ::tools::Rectangle aEntryRect(aStart, aSize); DrawRow(rRenderContext, aEntryRect, *iIndex); aStart.Y() += aSize.Height(); } @@ -701,7 +701,7 @@ void ClientBox::DoScroll( long nDelta ) m_nTopIndex += nDelta; Point aNewSBPt( m_aScrollBar->GetPosPixel() ); - Rectangle aScrRect( Point(), GetOutputSizePixel() ); + ::tools::Rectangle aScrRect( Point(), GetOutputSizePixel() ); aScrRect.Right() -= m_aScrollBar->GetSizePixel().Width(); Scroll( 0, -nDelta, aScrRect ); diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.hxx b/sd/source/ui/dlg/RemoteDialogClientBox.hxx index 597c9e4fca45..156ffc48e5f5 100644 --- a/sd/source/ui/dlg/RemoteDialogClientBox.hxx +++ b/sd/source/ui/dlg/RemoteDialogClientBox.hxx @@ -100,7 +100,7 @@ class ClientBox : public Control VclPtr<NumericBox> m_aPinBox; VclPtr<PushButton> m_aDeauthoriseButton; - Rectangle m_sPinTextRect; + ::tools::Rectangle m_sPinTextRect; VclPtr<ScrollBar> m_aScrollBar; @@ -120,7 +120,7 @@ class ClientBox : public Control void CalcActiveHeight( const long nPos ); long GetTotalHeight() const; void SetupScrollBar(); - void DrawRow(vcl::RenderContext& rRenderContext, const Rectangle& rRect, const TClientBoxEntry& rEntry); + void DrawRow(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect, const TClientBoxEntry& rEntry); bool HandleCursorKey( sal_uInt16 nKeyCode ); void DeleteRemoved(); @@ -133,14 +133,14 @@ public: virtual void dispose() override; void MouseButtonDown( const MouseEvent& rMEvt ) override; - void Paint( vcl::RenderContext& rRenderContext, const Rectangle &rPaintRect ) override; + void Paint( vcl::RenderContext& rRenderContext, const ::tools::Rectangle &rPaintRect ) override; void Resize() override; Size GetOptimalSize() const override; bool EventNotify( NotifyEvent& rNEvt ) override; TClientBoxEntry GetEntryData( long nPos ) { return m_vEntries[ nPos ]; } long GetActiveEntryIndex(); - Rectangle GetEntryRect( const long nPos ) const; + ::tools::Rectangle GetEntryRect( const long nPos ) const; long PointToPos( const Point& rPos ); void DoScroll( long nDelta ); void RecalcAll(); diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index 9f37ab71f887..7c627c359ac2 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -82,7 +82,7 @@ void SdDisplay::SetBitmapEx( BitmapEx* pBmpEx ) } } -void SdDisplay::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& ) +void SdDisplay::Paint( vcl::RenderContext& /*rRenderContext*/, const ::tools::Rectangle& ) { Point aPt; Size aSize = GetOutputSize(); @@ -530,7 +530,7 @@ void AnimationWindow::UpdateControl(bool const bDisableCtrls) if( pObject ) { ScopedVclPtrInstance< VirtualDevice > pVD; - Rectangle aObjRect( pObject->GetCurrentBoundRect() ); + ::tools::Rectangle aObjRect( pObject->GetCurrentBoundRect() ); Size aObjSize( aObjRect.GetSize() ); Point aOrigin( Point( -aObjRect.Left(), -aObjRect.Top() ) ); MapMode aMap( pVD->GetMapMode() ); @@ -1005,7 +1005,7 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView ) SdrGrafObj* pGrafObj = new SdrGrafObj( Graphic( aAnimation ) ); const Point aOrg( aWindowCenter.X() - ( aMaxSizeLog.Width() >> 1 ), aWindowCenter.Y() - ( aMaxSizeLog.Height() >> 1 ) ); - pGrafObj->SetLogicRect( Rectangle( aOrg, aMaxSizeLog ) ); + pGrafObj->SetLogicRect( ::tools::Rectangle( aOrg, aMaxSizeLog ) ); rView.InsertObjectAtView( pGrafObj, *pPV, SdrInsertFlags::SETDEFLAYER); } else @@ -1018,7 +1018,7 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView ) for (size_t i = 0; i < nCount; ++i) { pClone = pPage->GetObj(i); - Rectangle aRect( pClone->GetSnapRect() ); + ::tools::Rectangle aRect( pClone->GetSnapRect() ); switch( eBA ) { diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx index efcebc1442f1..6c679cd834bc 100644 --- a/sd/source/ui/dlg/copydlg.cxx +++ b/sd/source/ui/dlg/copydlg.cxx @@ -221,7 +221,7 @@ IMPL_LINK_NOARG(CopyDlg, SelectColorHdl, SvxColorListBox&, void) */ IMPL_LINK_NOARG(CopyDlg, SetViewData, Button*, void) { - Rectangle aRect = mpView->GetAllMarkedRect(); + ::tools::Rectangle aRect = mpView->GetAllMarkedRect(); SetMetricValue( *m_pMtrFldMoveX, Fraction( aRect.GetWidth() ) / maUIScale, MapUnit::Map100thMM); diff --git a/sd/source/ui/dlg/dlgsnap.cxx b/sd/source/ui/dlg/dlgsnap.cxx index 342108f3d6b8..c59dac16c704 100644 --- a/sd/source/ui/dlg/dlgsnap.cxx +++ b/sd/source/ui/dlg/dlgsnap.cxx @@ -59,7 +59,7 @@ SdSnapLineDlg::SdSnapLineDlg( SetFieldUnit( *m_pMtrFldY, eUIUnit, true ); // get WorkArea - Rectangle aWorkArea = pView->GetWorkArea(); + ::tools::Rectangle aWorkArea = pView->GetWorkArea(); // determine PoolUnit SfxItemPool* pPool = rInAttrs.GetPool(); diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx index d757d4bfb322..84cce2aa79e7 100644 --- a/sd/source/ui/dlg/docprev.cxx +++ b/sd/source/ui/dlg/docprev.cxx @@ -123,10 +123,10 @@ void SdDocPreviewWin::ImpPaint( OutputDevice* pVDev ) pVDev->SetLineColor(); pVDev->SetFillColor( Color( aColorConfig.GetColorValue( svtools::APPBACKGROUND ).nColor ) ); - pVDev->DrawRect(Rectangle( Point(0,0 ), pVDev->GetOutputSize())); + pVDev->DrawRect(::tools::Rectangle( Point(0,0 ), pVDev->GetOutputSize())); } -void SdDocPreviewWin::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect ) +void SdDocPreviewWin::Paint( vcl::RenderContext& /*rRenderContext*/, const ::tools::Rectangle& rRect ) { if( (!mxSlideShow.is()) || (!mxSlideShow->isRunning() ) ) { diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx index 201282de7bba..06421b0851f7 100644 --- a/sd/source/ui/dlg/headerfooterdlg.cxx +++ b/sd/source/ui/dlg/headerfooterdlg.cxx @@ -68,7 +68,7 @@ private: SdPage* mpMaster; HeaderFooterSettings maSettings; Size maPageSize; - Rectangle maOutRect; + ::tools::Rectangle maOutRect; private: void Paint(vcl::RenderContext& rRenderContext, SdrTextObj* pObj, bool bVisible, bool bDotted = false); @@ -76,7 +76,7 @@ private: public: explicit PresLayoutPreview(vcl::Window* pParent); - 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; void init(SdPage* pMaster); @@ -757,11 +757,11 @@ void PresLayoutPreview::Paint(vcl::RenderContext& rRenderContext, SdrTextObj* pO } } -void PresLayoutPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void PresLayoutPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&) { rRenderContext.Push(); - maOutRect = Rectangle(Point(0,0), rRenderContext.GetOutputSize()); + maOutRect = ::tools::Rectangle(Point(0,0), rRenderContext.GetOutputSize()); // calculate page size with correct aspect ratio int nWidth, nHeight; diff --git a/sd/source/ui/dlg/vectdlg.cxx b/sd/source/ui/dlg/vectdlg.cxx index 1e991ac179b1..203a423e09a8 100644 --- a/sd/source/ui/dlg/vectdlg.cxx +++ b/sd/source/ui/dlg/vectdlg.cxx @@ -90,9 +90,9 @@ void SdVectorizeDlg::dispose() ModalDialog::dispose(); } -Rectangle SdVectorizeDlg::GetRect( const Size& rDispSize, const Size& rBmpSize ) +::tools::Rectangle SdVectorizeDlg::GetRect( const Size& rDispSize, const Size& rBmpSize ) { - Rectangle aRect; + ::tools::Rectangle aRect; if( rBmpSize.Width() && rBmpSize.Height() && rDispSize.Width() && rDispSize.Height() ) { @@ -114,7 +114,7 @@ Rectangle SdVectorizeDlg::GetRect( const Size& rDispSize, const Size& rBmpSize ) const Point aBmpPos( ( rDispSize.Width() - aBmpSize.Width() ) >> 1, ( rDispSize.Height() - aBmpSize.Height() ) >> 1 ); - aRect = Rectangle( aBmpPos, aBmpSize ); + aRect = ::tools::Rectangle( aBmpPos, aBmpSize ); } return aRect; @@ -122,7 +122,7 @@ Rectangle SdVectorizeDlg::GetRect( const Size& rDispSize, const Size& rBmpSize ) void SdVectorizeDlg::InitPreviewBmp() { - const Rectangle aRect( GetRect( m_pBmpWin->GetSizePixel(), aBmp.GetSizePixel() ) ); + const ::tools::Rectangle aRect( GetRect( m_pBmpWin->GetSizePixel(), aBmp.GetSizePixel() ) ); aPreviewBmp = aBmp; aPreviewBmp.Scale( aRect.GetSize() ); @@ -136,7 +136,7 @@ Bitmap SdVectorizeDlg::GetPreparedBitmap( Bitmap& rBmp, Fraction& rScale ) if( aSizePix.Width() > VECTORIZE_MAX_EXTENT || aSizePix.Height() > VECTORIZE_MAX_EXTENT ) { - const Rectangle aRect( GetRect( Size( VECTORIZE_MAX_EXTENT, VECTORIZE_MAX_EXTENT ), aSizePix ) ); + const ::tools::Rectangle aRect( GetRect( Size( VECTORIZE_MAX_EXTENT, VECTORIZE_MAX_EXTENT ), aSizePix ) ); rScale = Fraction( aSizePix.Width(), aRect.GetWidth() ); aNew.Scale( aRect.GetSize() ); } @@ -244,7 +244,7 @@ void SdVectorizeDlg::AddTile( BitmapReadAccess* pRAcc, GDIMetaFile& rMtf, (sal_uInt8) FRound( nSumG * fMult ), (sal_uInt8) FRound( nSumB * fMult ) ); - Rectangle aRect( Point( nPosX, nPosY ), Size( nWidth + 1, nHeight + 1 ) ); + ::tools::Rectangle aRect( Point( nPosX, nPosY ), Size( nWidth + 1, nHeight + 1 ) ); const Size& rMaxSize = rMtf.GetPrefSize(); aRect = PixelToLogic( aRect, rMtf.GetPrefMapMode() ); diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx index cecf385fd9c7..851ff8c56e72 100644 --- a/sd/source/ui/docshell/docshel2.cxx +++ b/sd/source/ui/docshell/docshel2.cxx @@ -90,7 +90,7 @@ void DrawDocShell::Draw(OutputDevice* pOut, const JobSetup&, sal_uInt16 nAspect) pSelectedPage = mpDoc->GetSdPage(0, PageKind::Standard); } - Rectangle aVisArea = GetVisArea(nAspect); + ::tools::Rectangle aVisArea = GetVisArea(nAspect); pOut->IntersectClipRegion(aVisArea); pView->ShowSdrPage(pSelectedPage); @@ -118,9 +118,9 @@ void DrawDocShell::Draw(OutputDevice* pOut, const JobSetup&, sal_uInt16 nAspect) } } -Rectangle DrawDocShell::GetVisArea(sal_uInt16 nAspect) const +::tools::Rectangle DrawDocShell::GetVisArea(sal_uInt16 nAspect) const { - Rectangle aVisArea; + ::tools::Rectangle aVisArea; if( ( ASPECT_THUMBNAIL == nAspect ) || ( ASPECT_DOCPRINT == nAspect ) ) { @@ -144,7 +144,7 @@ Rectangle DrawDocShell::GetVisArea(sal_uInt16 nAspect) const if (pWin) { - aVisArea = pWin->PixelToLogic(Rectangle(Point(0,0), pWin->GetOutputSizePixel())); + aVisArea = pWin->PixelToLogic(::tools::Rectangle(Point(0,0), pWin->GetOutputSizePixel())); } } @@ -255,7 +255,7 @@ Bitmap DrawDocShell::GetPagePreviewBitmap(SdPage* pPage) pView->SetActiveLayer( pFrameView->GetActiveLayer() ); } - pView->CompleteRedraw( pVDev, vcl::Region(Rectangle(aNullPt, aSize)) ); + pView->CompleteRedraw( pVDev, vcl::Region(::tools::Rectangle(aNullPt, aSize)) ); // IsRedrawReady() always gives sal_True while ( !pView->IsRedrawReady() ) {} delete pView; diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index 00b7d463329b..0ee9859922cd 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -249,7 +249,7 @@ bool DrawDocShell::InitNew( const css::uno::Reference< css::embed::XStorage >& x { bool bRet = SfxObjectShell::InitNew( xStorage ); - Rectangle aVisArea( Point(0, 0), Size(14100, 10000) ); + ::tools::Rectangle aVisArea( Point(0, 0), Size(14100, 10000) ); SetVisArea(aVisArea); if (bRet) @@ -321,7 +321,7 @@ bool DrawDocShell::Load( SfxMedium& rMedium ) SdPage* pPage = mpDoc->GetSdPage( 0, PageKind::Standard ); if( pPage ) - SetVisArea( Rectangle( pPage->GetAllObjBoundRect() ) ); + SetVisArea( ::tools::Rectangle( pPage->GetAllObjBoundRect() ) ); } FinishedLoading(); @@ -533,7 +533,7 @@ bool DrawDocShell::Save() //TODO/LATER: why this?! if( GetCreateMode() == SfxObjectCreateMode::STANDARD ) - SfxObjectShell::SetVisArea( Rectangle() ); + SfxObjectShell::SetVisArea( ::tools::Rectangle() ); bool bRet = SfxObjectShell::Save(); @@ -583,7 +583,7 @@ bool DrawDocShell::SaveAs( SfxMedium& rMedium ) //TODO/LATER: why this?! if( GetCreateMode() == SfxObjectCreateMode::STANDARD ) - SfxObjectShell::SetVisArea( Rectangle() ); + SfxObjectShell::SetVisArea( ::tools::Rectangle() ); sal_uInt32 nVBWarning = ERRCODE_NONE; bool bRet = SfxObjectShell::SaveAs( rMedium ); diff --git a/sd/source/ui/docshell/sdclient.cxx b/sd/source/ui/docshell/sdclient.cxx index dfe544d35671..68c7dbacb428 100644 --- a/sd/source/ui/docshell/sdclient.cxx +++ b/sd/source/ui/docshell/sdclient.cxx @@ -55,7 +55,7 @@ Client::~Client() * If IP active, then we get this request to increase the visible section of the * object. */ -void Client::RequestNewObjectArea( Rectangle& aObjRect ) +void Client::RequestNewObjectArea( ::tools::Rectangle& aObjRect ) { ::sd::View* pView = mpViewShell->GetView(); @@ -73,14 +73,14 @@ void Client::RequestNewObjectArea( Rectangle& aObjRect ) bPosProtect = pObj->IsMoveProtect(); } - Rectangle aOldRect = GetObjArea(); + ::tools::Rectangle aOldRect = GetObjArea(); if ( bPosProtect ) aObjRect.SetPos( aOldRect.TopLeft() ); if ( bSizeProtect ) aObjRect.SetSize( aOldRect.GetSize() ); - Rectangle aWorkArea( pView->GetWorkArea() ); + ::tools::Rectangle aWorkArea( pView->GetWorkArea() ); if ( !aWorkArea.IsInside(aObjRect) && !bPosProtect && aObjRect != aOldRect ) { // correct position @@ -110,7 +110,7 @@ void Client::ObjectAreaChanged() if(pObj) { // no need to check for changes, this method is called only if the area really changed - Rectangle aNewRectangle(GetScaledObjArea()); + ::tools::Rectangle aNewRectangle(GetScaledObjArea()); // #i118524# if sheared/rotated, center to non-rotated LogicRect pObj->setSuppressSetVisAreaSize(true); @@ -119,7 +119,7 @@ void Client::ObjectAreaChanged() { pObj->SetLogicRect( aNewRectangle ); - const Rectangle& rBoundRect = pObj->GetCurrentBoundRect(); + const ::tools::Rectangle& rBoundRect = pObj->GetCurrentBoundRect(); const Point aDelta(aNewRectangle.Center() - rBoundRect.Center()); aNewRectangle.Move(aDelta.X(), aDelta.Y()); @@ -150,13 +150,13 @@ void Client::ViewChanged() ::sd::View* pView = mpViewShell->GetView(); if (pView) { - Rectangle aLogicRect( pSdrOle2Obj->GetLogicRect() ); + ::tools::Rectangle aLogicRect( pSdrOle2Obj->GetLogicRect() ); Size aLogicSize( aLogicRect.GetWidth(), aLogicRect.GetHeight() ); if( pSdrOle2Obj->IsChart() ) { //charts never should be stretched see #i84323# for example - pSdrOle2Obj->SetLogicRect( Rectangle( aLogicRect.TopLeft(), aLogicSize ) ); + pSdrOle2Obj->SetLogicRect( ::tools::Rectangle( aLogicRect.TopLeft(), aLogicSize ) ); pSdrOle2Obj->BroadcastObjectChange(); return; } @@ -164,7 +164,7 @@ void Client::ViewChanged() // TODO/LEAN: maybe we can do this without requesting the VisualArea? // working with the visual area might need running state, so the object may switch itself to this state MapMode aMap100( MapUnit::Map100thMM ); - Rectangle aVisArea; + ::tools::Rectangle aVisArea; Size aSize = pSdrOle2Obj->GetOrigObjSize( &aMap100 ); aVisArea.SetSize( aSize ); @@ -179,7 +179,7 @@ void Client::ViewChanged() aMap100 ); if( aPixelDiff.Width() || aPixelDiff.Height() ) { - pSdrOle2Obj->SetLogicRect( Rectangle( aLogicRect.TopLeft(), aScaledSize ) ); + pSdrOle2Obj->SetLogicRect( ::tools::Rectangle( aLogicRect.TopLeft(), aScaledSize ) ); pSdrOle2Obj->BroadcastObjectChange(); } else diff --git a/sd/source/ui/func/fucon3d.cxx b/sd/source/ui/func/fucon3d.cxx index 36950090cd20..d26f8fd56531 100644 --- a/sd/source/ui/func/fucon3d.cxx +++ b/sd/source/ui/func/fucon3d.cxx @@ -361,7 +361,7 @@ void FuConstruct3dObject::Activate() FuConstruct::Activate(); } -SdrObject* FuConstruct3dObject::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) +SdrObject* FuConstruct3dObject::CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle) { E3dCompoundObject* p3DObj = ImpCreateBasic3DShape(); @@ -373,7 +373,7 @@ SdrObject* FuConstruct3dObject::CreateDefaultObject(const sal_uInt16 nID, const basegfx::B3DRange aVolume(aObjVol); double fW(aVolume.getWidth()); double fH(aVolume.getHeight()); - Rectangle a3DRect(0, 0, (long)fW, (long)fH); + ::tools::Rectangle a3DRect(0, 0, (long)fW, (long)fH); E3dScene* pScene = new E3dPolyScene(mpView->Get3DDefaultAttributes()); // copied code from E3dView::InitScene @@ -404,7 +404,7 @@ SdrObject* FuConstruct3dObject::CreateDefaultObject(const sal_uInt16 nID, const pScene->SetRectsDirty(); // Take care of restrictions for the rectangle - Rectangle aRect(rRectangle); + ::tools::Rectangle aRect(rRectangle); switch(nID) { diff --git a/sd/source/ui/func/fuconarc.cxx b/sd/source/ui/func/fuconarc.cxx index c71454d82eaa..8860c006b2b7 100644 --- a/sd/source/ui/func/fuconarc.cxx +++ b/sd/source/ui/func/fuconarc.cxx @@ -84,7 +84,7 @@ void FuConstructArc::DoExecute( SfxRequest& rReq ) const SfxUInt32Item* pPhiStart = rReq.GetArg<SfxUInt32Item>(ID_VAL_ANGLESTART); const SfxUInt32Item* pPhiEnd = rReq.GetArg<SfxUInt32Item>(ID_VAL_ANGLEEND); - Rectangle aNewRectangle (pCenterX->GetValue () - pAxisX->GetValue () / 2, + ::tools::Rectangle aNewRectangle (pCenterX->GetValue () - pAxisX->GetValue () / 2, pCenterY->GetValue () - pAxisY->GetValue () / 2, pCenterX->GetValue () + pAxisX->GetValue () / 2, pCenterY->GetValue () + pAxisY->GetValue () / 2); @@ -198,7 +198,7 @@ void FuConstructArc::Activate() FuConstruct::Activate(); } -SdrObject* FuConstructArc::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) +SdrObject* FuConstructArc::CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle) { SdrObject* pObj = SdrObjFactory::MakeNewObject( @@ -209,7 +209,7 @@ SdrObject* FuConstructArc::CreateDefaultObject(const sal_uInt16 nID, const Recta { if( dynamic_cast< const SdrCircObj *>( pObj ) != nullptr) { - Rectangle aRect(rRectangle); + ::tools::Rectangle aRect(rRectangle); if(SID_DRAW_ARC == nID || SID_DRAW_CIRCLEARC == nID || diff --git a/sd/source/ui/func/fuconbez.cxx b/sd/source/ui/func/fuconbez.cxx index a3e09bd49036..18fc19bd1860 100644 --- a/sd/source/ui/func/fuconbez.cxx +++ b/sd/source/ui/func/fuconbez.cxx @@ -284,7 +284,7 @@ void FuConstructBezierPolygon::SetEditMode(sal_uInt16 nMode) rBindings.Invalidate(SID_BEZIER_INSERT); } -SdrObject* FuConstructBezierPolygon::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) +SdrObject* FuConstructBezierPolygon::CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle) { // case SID_DRAW_POLYGON: // case SID_DRAW_POLYGON_NOFILL: diff --git a/sd/source/ui/func/fuconcs.cxx b/sd/source/ui/func/fuconcs.cxx index 208eb37cbd2e..ef7a9e9402b9 100644 --- a/sd/source/ui/func/fuconcs.cxx +++ b/sd/source/ui/func/fuconcs.cxx @@ -236,7 +236,7 @@ const OUString& FuConstructCustomShape::GetShapeType() const return aCustomShape; } -SdrObject* FuConstructCustomShape::CreateDefaultObject(const sal_uInt16, const Rectangle& rRectangle) +SdrObject* FuConstructCustomShape::CreateDefaultObject(const sal_uInt16, const ::tools::Rectangle& rRectangle) { SdrObject* pObj = SdrObjFactory::MakeNewObject( mpView->GetCurrentObjInventor(), mpView->GetCurrentObjIdentifier(), @@ -244,7 +244,7 @@ SdrObject* FuConstructCustomShape::CreateDefaultObject(const sal_uInt16, const R if( pObj ) { - Rectangle aRect( rRectangle ); + ::tools::Rectangle aRect( rRectangle ); if ( doConstructOrthogonal() ) ImpForceQuadratic( aRect ); pObj->SetLogicRect( aRect ); diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx index ea54683d072f..c35ea41f4857 100644 --- a/sd/source/ui/func/fuconrec.cxx +++ b/sd/source/ui/func/fuconrec.cxx @@ -105,7 +105,7 @@ void FuConstructRectangle::DoExecute( SfxRequest& rReq ) const SfxUInt32Item* pAxisX = rReq.GetArg<SfxUInt32Item>(ID_VAL_AXIS_X); const SfxUInt32Item* pAxisY = rReq.GetArg<SfxUInt32Item>(ID_VAL_AXIS_Y); - Rectangle aNewRectangle (pCenterX->GetValue () - pAxisX->GetValue () / 2, + ::tools::Rectangle aNewRectangle (pCenterX->GetValue () - pAxisX->GetValue () / 2, pCenterY->GetValue () - pAxisY->GetValue () / 2, pCenterX->GetValue () + pAxisX->GetValue () / 2, pCenterY->GetValue () + pAxisY->GetValue () / 2); @@ -123,7 +123,7 @@ void FuConstructRectangle::DoExecute( SfxRequest& rReq ) const SfxUInt32Item* pMouseEndX = rReq.GetArg<SfxUInt32Item>(ID_VAL_MOUSEEND_X); const SfxUInt32Item* pMouseEndY = rReq.GetArg<SfxUInt32Item>(ID_VAL_MOUSEEND_Y); - Rectangle aNewRectangle (pMouseStartX->GetValue (), + ::tools::Rectangle aNewRectangle (pMouseStartX->GetValue (), pMouseStartY->GetValue (), pMouseEndX->GetValue (), pMouseEndY->GetValue ()); @@ -709,7 +709,7 @@ void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj) } } -SdrObject* FuConstructRectangle::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) +SdrObject* FuConstructRectangle::CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle) { DBG_ASSERT( (nID != SID_DRAW_FONTWORK) && (nID != SID_DRAW_FONTWORK_VERTICAL ), "FuConstRectangle::CreateDefaultObject can not create Fontwork shapes!" ); @@ -772,7 +772,7 @@ SdrObject* FuConstructRectangle::CreateDefaultObject(const sal_uInt16 nID, const if(pObj) { - Rectangle aRect(rRectangle); + ::tools::Rectangle aRect(rRectangle); if(SID_DRAW_SQUARE == nID || SID_DRAW_SQUARE_NOFILL == nID || diff --git a/sd/source/ui/func/fuconuno.cxx b/sd/source/ui/func/fuconuno.cxx index 75dfd782c90c..84024ff5c4fa 100644 --- a/sd/source/ui/func/fuconuno.cxx +++ b/sd/source/ui/func/fuconuno.cxx @@ -133,7 +133,7 @@ void FuConstructUnoControl::Deactivate() mpWindow->SetPointer( aOldPointer ); } -SdrObject* FuConstructUnoControl::CreateDefaultObject(const sal_uInt16, const Rectangle& rRectangle) +SdrObject* FuConstructUnoControl::CreateDefaultObject(const sal_uInt16, const ::tools::Rectangle& rRectangle) { // case SID_FM_CREATE_CONTROL: diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx index 3fb2dc929646..45490d68f8b3 100644 --- a/sd/source/ui/func/fucopy.cxx +++ b/sd/source/ui/func/fucopy.cxx @@ -126,7 +126,7 @@ void FuCopy::DoExecute( SfxRequest& rReq ) } } - Rectangle aRect; + ::tools::Rectangle aRect; sal_Int32 lWidth = 0, lHeight = 0, lSizeX = 0L, lSizeY = 0L, lAngle = 0L; sal_uInt16 nNumber = 0; Color aStartColor, aEndColor; diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx index c2929684422e..25b3483b9a24 100644 --- a/sd/source/ui/func/fudraw.cxx +++ b/sd/source/ui/func/fudraw.cxx @@ -285,7 +285,7 @@ bool FuDraw::MouseButtonUp(const MouseEvent& rMEvt) if ( bDragHelpLine ) { - Rectangle aOutputArea(Point(0,0), mpWindow->GetOutputSizePixel()); + ::tools::Rectangle aOutputArea(Point(0,0), mpWindow->GetOutputSizePixel()); if (mpView && !aOutputArea.IsInside(rMEvt.GetPosPixel())) mpView->GetSdrPageView()->DeleteHelpLine(nHelpLine); @@ -917,8 +917,8 @@ bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewE if (!aHelpText.isEmpty()) { bSet = true; - Rectangle aLogicPix = mpWindow->LogicToPixel(pObj->GetLogicRect()); - Rectangle aScreenRect(mpWindow->OutputToScreenPixel(aLogicPix.TopLeft()), + ::tools::Rectangle aLogicPix = mpWindow->LogicToPixel(pObj->GetLogicRect()); + ::tools::Rectangle aScreenRect(mpWindow->OutputToScreenPixel(aLogicPix.TopLeft()), mpWindow->OutputToScreenPixel(aLogicPix.BottomRight())); if (Help::IsBalloonHelpEnabled()) diff --git a/sd/source/ui/func/fuediglu.cxx b/sd/source/ui/func/fuediglu.cxx index f757691a03be..bf7a577a7202 100644 --- a/sd/source/ui/func/fuediglu.cxx +++ b/sd/source/ui/func/fuediglu.cxx @@ -302,7 +302,7 @@ bool FuEditGluePoints::KeyInput(const KeyEvent& rKEvt) nY = 0; } Point centerPoint; - Rectangle rect = mpView->GetMarkedObjRect(); + ::tools::Rectangle rect = mpView->GetMarkedObjRect(); centerPoint = mpWindow->LogicToPixel(rect.Center()); Point aPoint = bBeginInsertPoint? oldPoint:centerPoint; Point ePoint = aPoint + Point(nX,nY); diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index f91f0663ff81..5eb0ae16e9ff 100644 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -174,10 +174,10 @@ void FuInsertGraphic::DoExecute( SfxRequest& rReq ) Point aPos; // For LOK, set position to center of the page if (comphelper::LibreOfficeKit::isActive()) - aPos = Rectangle(aPos, mpView->GetSdrPageView()->GetPage()->GetSize()).Center(); + aPos = ::tools::Rectangle(aPos, mpView->GetSdrPageView()->GetPage()->GetSize()).Center(); else { - Rectangle aRect(aPos, mpWindow->GetOutputSizePixel() ); + ::tools::Rectangle aRect(aPos, mpWindow->GetOutputSizePixel() ); aPos = aRect.Center(); bool bMapModeWasEnabled(mpWindow->IsMapModeEnabled()); mpWindow->EnableMapMode(/*true*/); @@ -264,7 +264,7 @@ void FuInsertClipboard::DoExecute( SfxRequest& ) DrawViewShell* pDrViewSh = nullptr; if (!mpView->InsertData( aDataHelper, - mpWindow->PixelToLogic( Rectangle( Point(), mpWindow->GetOutputSizePixel() ).Center() ), + mpWindow->PixelToLogic( ::tools::Rectangle( Point(), mpWindow->GetOutputSizePixel() ).Center() ), nAction, false, nFormatId )) { pDrViewSh = dynamic_cast<DrawViewShell*>(mpViewShell); @@ -342,7 +342,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq ) MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) ); - Rectangle aRect; + ::tools::Rectangle aRect; if( pPickObj ) { aRect = pPickObj->GetLogicRect(); @@ -382,12 +382,12 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq ) } Point aPos; - Rectangle aWinRect(aPos, mpWindow->GetOutputSizePixel() ); + ::tools::Rectangle aWinRect(aPos, mpWindow->GetOutputSizePixel() ); aPos = aWinRect.Center(); aPos = mpWindow->PixelToLogic(aPos); aPos.X() -= aSize.Width() / 2; aPos.Y() -= aSize.Height() / 2; - aRect = Rectangle(aPos, aSize); + aRect = ::tools::Rectangle(aPos, aSize); } SdrOle2Obj* pOleObj = new SdrOle2Obj( svt::EmbeddedObjectRef( xObj, nAspect ), aObjName, aRect ); @@ -585,7 +585,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq ) static_cast<SdrOle2Obj*>(pObj)->SetPersistName(aName); static_cast<SdrOle2Obj*>(pObj)->SetName(aName); static_cast<SdrOle2Obj*>(pObj)->SetAspect(nAspect); - Rectangle aRect = static_cast<SdrOle2Obj*>(pObj)->GetLogicRect(); + ::tools::Rectangle aRect = static_cast<SdrOle2Obj*>(pObj)->GetLogicRect(); if ( nAspect == embed::Aspects::MSOLE_ICON ) { @@ -620,7 +620,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq ) Point aPnt ((aPageSize.Width() - aSize.Width()) / 2, (aPageSize.Height() - aSize.Height()) / 2); - Rectangle aRect (aPnt, aSize); + ::tools::Rectangle aRect (aPnt, aSize); SdrOle2Obj* pObj = new SdrOle2Obj( aObjRef, aName, aRect); @@ -663,7 +663,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq ) } Size aVisSizePixel = mpWindow->GetOutputSizePixel(); - Rectangle aVisAreaWin = mpWindow->PixelToLogic( Rectangle( Point(0,0), aVisSizePixel) ); + ::tools::Rectangle aVisAreaWin = mpWindow->PixelToLogic( ::tools::Rectangle( Point(0,0), aVisSizePixel) ); mpViewShell->VisAreaChanged(aVisAreaWin); mpDocSh->SetVisArea(aVisAreaWin); } @@ -747,7 +747,7 @@ void FuInsertAVMedia::DoExecute( SfxRequest& rReq ) if( mpWindow ) { - aPos = mpWindow->PixelToLogic( Rectangle( aPos, mpWindow->GetOutputSizePixel() ).Center() ); + aPos = mpWindow->PixelToLogic( ::tools::Rectangle( aPos, mpWindow->GetOutputSizePixel() ).Center() ); aPos.X() -= aSize.Width() >> 1; aPos.Y() -= aSize.Height() >> 1; } @@ -823,7 +823,7 @@ void FuInsert3DModel::DoExecute( SfxRequest& ) if( mpWindow ) { - aPos = mpWindow->PixelToLogic( Rectangle( aPos, mpWindow->GetOutputSizePixel() ).Center() ); + aPos = mpWindow->PixelToLogic( ::tools::Rectangle( aPos, mpWindow->GetOutputSizePixel() ).Center() ); aPos.X() -= aSize.Width() >> 1; aPos.Y() -= aSize.Height() >> 1; } diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx index d200cc894a75..d2228597d673 100644 --- a/sd/source/ui/func/fuinsfil.cxx +++ b/sd/source/ui/func/fuinsfil.cxx @@ -527,7 +527,7 @@ void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium) aPos.Y() -= aSize.Height() / 2; aSize = mpWindow->PixelToLogic(aSize); aPos = mpWindow->PixelToLogic(aPos); - pTO->SetLogicRect(Rectangle(aPos, aSize)); + pTO->SetLogicRect(::tools::Rectangle(aPos, aSize)); if (pDlg->IsLink()) { diff --git a/sd/source/ui/func/fuoaprms.cxx b/sd/source/ui/func/fuoaprms.cxx index eb7cfae7535a..06486761bb2d 100644 --- a/sd/source/ui/func/fuoaprms.cxx +++ b/sd/source/ui/func/fuoaprms.cxx @@ -660,7 +660,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) // push the running object to the end of the curve if (pRunningObj) { - Rectangle aCurRect(pRunningObj->GetLogicRect()); + ::tools::Rectangle aCurRect(pRunningObj->GetLogicRect()); Point aCurCenter(aCurRect.Center()); const ::basegfx::B2DPolyPolygon& rPolyPolygon = pPath->GetPathPoly(); sal_uInt32 nNoOfPolygons(rPolyPolygon.count()); diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx index 4e11571eac0b..2771a542fe6e 100644 --- a/sd/source/ui/func/fupoor.cxx +++ b/sd/source/ui/func/fupoor.cxx @@ -142,7 +142,7 @@ void FuPoor::ForceScroll(const Point& aPixPos) !SlideShow::IsRunning( mpViewShell->GetViewShellBase() ) ) { Point aPos = mpWindow->OutputToScreenPixel(aPixPos); - const Rectangle& rRect = mpViewShell->GetAllWindowRect(); + const ::tools::Rectangle& rRect = mpViewShell->GetAllWindowRect(); if ( bNoScrollUntilInside ) { @@ -296,7 +296,7 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt) if(pHdl) { Point aHdlPosition(pHdl->GetPos()); - Rectangle aVisRect(aHdlPosition - Point(100, 100), Size(200, 200)); + ::tools::Rectangle aVisRect(aHdlPosition - Point(100, 100), Size(200, 200)); mpView->MakeVisible(aVisRect, *mpWindow); } @@ -692,11 +692,11 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt) if(mpView->IsMoveAllowed()) { // restrict movement to WorkArea - const Rectangle& rWorkArea = mpView->GetWorkArea(); + const ::tools::Rectangle& rWorkArea = mpView->GetWorkArea(); if(!rWorkArea.IsEmpty()) { - Rectangle aMarkRect(mpView->GetMarkedObjRect()); + ::tools::Rectangle aMarkRect(mpView->GetMarkedObjRect()); aMarkRect.Move(nX, nY); if(!aMarkRect.IsInside(rWorkArea)) @@ -767,7 +767,7 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt) } // make moved handle visible - Rectangle aVisRect(aEndPoint - Point(100, 100), Size(200, 200)); + ::tools::Rectangle aVisRect(aEndPoint - Point(100, 100), Size(200, 200)); mpView->MakeVisible(aVisRect, *mpWindow); } } @@ -939,7 +939,7 @@ void FuPoor::DoPasteUnformatted() if (aDataHelper.GetTransferable().is()) { mpView->InsertData( aDataHelper, - mpWindow->PixelToLogic( Rectangle( Point(), mpWindow->GetOutputSizePixel() ).Center() ), + mpWindow->PixelToLogic( ::tools::Rectangle( Point(), mpWindow->GetOutputSizePixel() ).Center() ), nAction, false, SotClipboardFormatId::STRING); } } @@ -1046,23 +1046,23 @@ void FuPoor::ReceiveRequest(SfxRequest& rReq) } } -SdrObject* FuPoor::CreateDefaultObject(const sal_uInt16, const Rectangle& ) +SdrObject* FuPoor::CreateDefaultObject(const sal_uInt16, const ::tools::Rectangle& ) { // empty base implementation return nullptr; } -void FuPoor::ImpForceQuadratic(Rectangle& rRect) +void FuPoor::ImpForceQuadratic(::tools::Rectangle& rRect) { if(rRect.GetWidth() > rRect.GetHeight()) { - rRect = Rectangle( + rRect = ::tools::Rectangle( Point(rRect.Left() + ((rRect.GetWidth() - rRect.GetHeight()) / 2), rRect.Top()), Size(rRect.GetHeight(), rRect.GetHeight())); } else { - rRect = Rectangle( + rRect = ::tools::Rectangle( Point(rRect.Left(), rRect.Top() + ((rRect.GetHeight() - rRect.GetWidth()) / 2)), Size(rRect.GetWidth(), rRect.GetWidth())); } diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index d963bddc9ba5..f17998f58024 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -955,7 +955,7 @@ bool FuSelection::KeyInput(const KeyEvent& rKEvt) } Point centerPoint; - Rectangle rect = mpView->GetMarkedObjRect(); + ::tools::Rectangle rect = mpView->GetMarkedObjRect(); centerPoint = mpWindow->LogicToPixel(rect.Center()); Point aPoint = bMovedToCenterPoint? oldPoint:centerPoint; Point ePoint = aPoint + Point(nX,nY); diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index 3ff37ad8d469..9f1f57a02df2 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -1192,8 +1192,8 @@ bool FuText::RequestHelp(const HelpEvent& rHEvt) } if (!aHelpText.isEmpty()) { - Rectangle aLogicPix = mpWindow->LogicToPixel(mxTextObj->GetLogicRect()); - Rectangle aScreenRect(mpWindow->OutputToScreenPixel(aLogicPix.TopLeft()), + ::tools::Rectangle aLogicPix = mpWindow->LogicToPixel(mxTextObj->GetLogicRect()); + ::tools::Rectangle aScreenRect(mpWindow->OutputToScreenPixel(aLogicPix.TopLeft()), mpWindow->OutputToScreenPixel(aLogicPix.BottomRight())); if (Help::IsBalloonHelpEnabled()) @@ -1291,7 +1291,7 @@ void FuText::DoubleClick(const MouseEvent& ) /** Removed the insertion of default text and putting a new text object directly into edit mode. */ -SdrObject* FuText::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) +SdrObject* FuText::CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle) { SdrObject* pObj = SdrObjFactory::MakeNewObject( diff --git a/sd/source/ui/func/fuzoom.cxx b/sd/source/ui/func/fuzoom.cxx index 1cac3823f11c..ae11778b3634 100644 --- a/sd/source/ui/func/fuzoom.cxx +++ b/sd/source/ui/func/fuzoom.cxx @@ -125,7 +125,7 @@ bool FuZoom::MouseMove(const MouseEvent& rMEvt) } else { - Rectangle aRect(aBeginPos, aEndPos); + ::tools::Rectangle aRect(aBeginPos, aEndPos); aZoomRect = aRect; aZoomRect.Justify(); mpViewShell->DrawMarkRect(aZoomRect); @@ -181,7 +181,7 @@ bool FuZoom::MouseButtonUp(const MouseEvent& rMEvt) mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArrayZoom ); } - Rectangle aVisAreaWin = mpWindow->PixelToLogic(Rectangle(Point(0,0), + ::tools::Rectangle aVisAreaWin = mpWindow->PixelToLogic(::tools::Rectangle(Point(0,0), mpWindow->GetOutputSizePixel())); mpViewShell->GetZoomList()->InsertZoomRect(aVisAreaWin); diff --git a/sd/source/ui/func/smarttag.cxx b/sd/source/ui/func/smarttag.cxx index 0ee180765a9b..02e8ef121c3f 100644 --- a/sd/source/ui/func/smarttag.cxx +++ b/sd/source/ui/func/smarttag.cxx @@ -100,7 +100,7 @@ bool SmartTag::MarkPoint(SdrHdl& /*rHdl*/, bool /*bUnmark*/ ) return false; } -bool SmartTag::MarkPoints(const Rectangle* /*pRect*/, bool /*bUnmark*/ ) +bool SmartTag::MarkPoints(const ::tools::Rectangle* /*pRect*/, bool /*bUnmark*/ ) { return false; } @@ -335,7 +335,7 @@ bool SmartTagSet::MarkPoint(SdrHdl& rHdl, bool bUnmark ) return false; } -bool SmartTagSet::MarkPoints(const Rectangle* pRect, bool bUnmark) +bool SmartTagSet::MarkPoints(const ::tools::Rectangle* pRect, bool bUnmark) { if( mxSelectedTag.is() ) return mxSelectedTag->MarkPoints( pRect, bUnmark ); diff --git a/sd/source/ui/func/undopage.cxx b/sd/source/ui/func/undopage.cxx index 571dac181e70..81eb81f77ce7 100644 --- a/sd/source/ui/func/undopage.cxx +++ b/sd/source/ui/func/undopage.cxx @@ -36,7 +36,7 @@ SdPageFormatUndoAction::~SdPageFormatUndoAction() void SdPageFormatUndoAction::Undo() { - Rectangle aOldBorderRect(mnOldLeft, mnOldUpper, mnOldRight, mnOldLower); + ::tools::Rectangle aOldBorderRect(mnOldLeft, mnOldUpper, mnOldRight, mnOldLower); mpPage->ScaleObjects(maOldSize, aOldBorderRect, mbNewScale); mpPage->SetSize(maOldSize); mpPage->SetLftBorder(mnOldLeft); @@ -54,7 +54,7 @@ void SdPageFormatUndoAction::Undo() void SdPageFormatUndoAction::Redo() { - Rectangle aNewBorderRect(mnNewLeft, mnNewUpper, mnNewRight, mnNewLower); + ::tools::Rectangle aNewBorderRect(mnNewLeft, mnNewUpper, mnNewRight, mnNewLower); mpPage->ScaleObjects(maNewSize, aNewBorderRect, mbNewScale); mpPage->SetSize(maNewSize); mpPage->SetLftBorder(mnNewLeft); diff --git a/sd/source/ui/inc/AccessibleOutlineEditSource.hxx b/sd/source/ui/inc/AccessibleOutlineEditSource.hxx index a4afdc8a21f8..48af77ca7015 100644 --- a/sd/source/ui/inc/AccessibleOutlineEditSource.hxx +++ b/sd/source/ui/inc/AccessibleOutlineEditSource.hxx @@ -65,7 +65,7 @@ namespace accessibility // the view forwarder virtual bool IsValid() const override; - virtual Rectangle GetVisArea() const override; + virtual ::tools::Rectangle GetVisArea() const override; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const override; virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const override; diff --git a/sd/source/ui/inc/AccessibleViewForwarder.hxx b/sd/source/ui/inc/AccessibleViewForwarder.hxx index 552ec61b9db2..de378a61670b 100644 --- a/sd/source/ui/inc/AccessibleViewForwarder.hxx +++ b/sd/source/ui/inc/AccessibleViewForwarder.hxx @@ -56,7 +56,7 @@ public: @return The rectangle of the visible part of the document. */ - virtual Rectangle GetVisibleArea() const override; + virtual ::tools::Rectangle GetVisibleArea() const override; /** Transform the specified point from internal coordinates to an absolute screen position. diff --git a/sd/source/ui/inc/Client.hxx b/sd/source/ui/inc/Client.hxx index 046d8165c761..65a058966d79 100644 --- a/sd/source/ui/inc/Client.hxx +++ b/sd/source/ui/inc/Client.hxx @@ -36,7 +36,7 @@ class Client : public SfxInPlaceClient SdrGrafObj* pSdrGrafObj; virtual void ObjectAreaChanged() override; - virtual void RequestNewObjectArea( Rectangle& ) override; + virtual void RequestNewObjectArea( ::tools::Rectangle& ) override; virtual void ViewChanged() override; public: diff --git a/sd/source/ui/inc/ClientView.hxx b/sd/source/ui/inc/ClientView.hxx index fd7430ac18b0..1f6a720907a9 100644 --- a/sd/source/ui/inc/ClientView.hxx +++ b/sd/source/ui/inc/ClientView.hxx @@ -41,7 +41,7 @@ public: /* if the view should not do a Invalidate() on the windows, you have to override the following two methods and do something different */ virtual void InvalidateOneWin(vcl::Window& rWin) override; - virtual void InvalidateOneWin(vcl::Window& rWin, const Rectangle& rRect) override; + virtual void InvalidateOneWin(vcl::Window& rWin, const ::tools::Rectangle& rRect) override; }; } // end of namespace sd diff --git a/sd/source/ui/inc/DrawController.hxx b/sd/source/ui/inc/DrawController.hxx index d8e203478df2..98d932e47e1f 100644 --- a/sd/source/ui/inc/DrawController.hxx +++ b/sd/source/ui/inc/DrawController.hxx @@ -116,7 +116,7 @@ public: /** Call this method when the VisArea has changed. */ - void FireVisAreaChanged (const Rectangle& rVisArea) throw(); + void FireVisAreaChanged (const ::tools::Rectangle& rVisArea) throw(); /** Call this method when the selection has changed. */ @@ -288,7 +288,7 @@ private: */ ViewShellBase* mpBase; - Rectangle maLastVisArea; + ::tools::Rectangle maLastVisArea; ::tools::WeakReference<SdrPage> mpCurrentPage; bool mbMasterPageMode; bool mbLayerMode; diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx index ccb139532641..a4e3deeb5901 100644 --- a/sd/source/ui/inc/DrawDocShell.hxx +++ b/sd/source/ui/inc/DrawDocShell.hxx @@ -91,7 +91,7 @@ public: virtual bool LoadFrom( SfxMedium& rMedium ) override; virtual bool SaveAs( SfxMedium &rMedium ) override; - virtual Rectangle GetVisArea(sal_uInt16 nAspect) const override; + virtual ::tools::Rectangle GetVisArea(sal_uInt16 nAspect) const override; virtual void Draw(OutputDevice*, const JobSetup& rSetup, sal_uInt16 nAspect = ASPECT_CONTENT) override; virtual ::svl::IUndoManager* GetUndoManager() override; diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx index fbb33d1a0321..4dcffc6ab340 100644 --- a/sd/source/ui/inc/DrawViewShell.hxx +++ b/sd/source/ui/inc/DrawViewShell.hxx @@ -100,7 +100,7 @@ public: virtual void Shutdown() override; void PrePaint() override; - virtual void Paint(const Rectangle& rRect, ::sd::Window* pWin) override; + virtual void Paint(const ::tools::Rectangle& rRect, ::sd::Window* pWin) override; /** Arrange and resize the GUI elements like rulers, sliders, and buttons as well as the actual document view according to the size of @@ -119,12 +119,12 @@ public: virtual void Resize() override; - void ShowMousePosInfo(const Rectangle& rRect, ::sd::Window* pWin); + void ShowMousePosInfo(const ::tools::Rectangle& rRect, ::sd::Window* pWin); virtual void ChangeEditMode (EditMode eMode, bool bIsLayerModeActive); virtual void SetZoom( long nZoom ) override; - virtual void SetZoomRect( const Rectangle& rZoomRect ) override; + virtual void SetZoomRect( const ::tools::Rectangle& rZoomRect ) override; void InsertURLField(const OUString& rURL, const OUString& rText, const OUString& rTarget); void InsertURLButton(const OUString& rURL, const OUString& rText, const OUString& rTarget, @@ -250,7 +250,7 @@ public: //false. void FreshNavigatrEntry(); void FreshNavigatrTree(); - void MakeVisible(const Rectangle& rRect, vcl::Window& rWin); + void MakeVisible(const ::tools::Rectangle& rRect, vcl::Window& rWin); virtual void ReadFrameViewData(FrameView* pView) override; virtual void WriteFrameViewData() override; @@ -289,7 +289,7 @@ public: virtual void WriteUserDataSequence ( css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse ) override; virtual void ReadUserDataSequence ( const css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse ) override; - virtual void VisAreaChanged(const Rectangle& rRect) override; + virtual void VisAreaChanged(const ::tools::Rectangle& rRect) override; /** Create an accessible object representing the specified window. @param pWindow @@ -370,7 +370,7 @@ public: protected: DrawView* mpDrawView; SdPage* mpActualPage; - Rectangle maMarkRect; + ::tools::Rectangle maMarkRect; Point maMousePos; bool mbMousePosFreezed; VclPtr<TabControl> maTabControl; diff --git a/sd/source/ui/inc/FrameView.hxx b/sd/source/ui/inc/FrameView.hxx index 8603b1ec7298..15950ba61fe4 100644 --- a/sd/source/ui/inc/FrameView.hxx +++ b/sd/source/ui/inc/FrameView.hxx @@ -79,9 +79,9 @@ public: { mbNoAttribs = bNoAttr; } bool IsNoAttribs() const { return mbNoAttribs; } - void SetVisArea(const Rectangle& rVisArea) + void SetVisArea(const ::tools::Rectangle& rVisArea) { maVisArea = rVisArea; } - const Rectangle& GetVisArea() { return maVisArea; } + const ::tools::Rectangle& GetVisArea() { return maVisArea; } void SetPageKind(PageKind eKind) { mePageKind = eKind; } PageKind GetPageKind() const { return mePageKind; } @@ -179,7 +179,7 @@ private: SdrHelpLineList maHandoutHelpLines; bool mbNoColors; ///< structuring mode bool mbNoAttribs; ///< structuring mode - Rectangle maVisArea; ///< visible area + ::tools::Rectangle maVisArea; ///< visible area PageKind mePageKind; ///< kind of page (standard, notes, handout) sal_uInt16 mnSelectedPage; PageKind mePageKindOnLoad; diff --git a/sd/source/ui/inc/OutlineView.hxx b/sd/source/ui/inc/OutlineView.hxx index 75e5282a04cd..a4d513422390 100644 --- a/sd/source/ui/inc/OutlineView.hxx +++ b/sd/source/ui/inc/OutlineView.hxx @@ -92,7 +92,7 @@ public: /** selects the paragraph for the given page at the outliner view*/ void SetActualPage( SdPage* pActual ); - void Paint (const Rectangle& rRect, ::sd::Window* pWin); + void Paint (const ::tools::Rectangle& rRect, ::sd::Window* pWin); // Callbacks fuer LINKs DECL_LINK( ParagraphInsertedHdl, ::Outliner::ParagraphHdlParam, void ); diff --git a/sd/source/ui/inc/OutlineViewShell.hxx b/sd/source/ui/inc/OutlineViewShell.hxx index 5f46db658ee6..dc79fc1739e7 100644 --- a/sd/source/ui/inc/OutlineViewShell.hxx +++ b/sd/source/ui/inc/OutlineViewShell.hxx @@ -62,7 +62,7 @@ public: virtual void Shutdown() override; - virtual void Paint(const Rectangle& rRect, ::sd::Window* pWin) override; + virtual void Paint(const ::tools::Rectangle& rRect, ::sd::Window* pWin) override; /** Arrange and resize the GUI elements like rulers, sliders, and buttons as well as the actual document view according to the size of @@ -100,7 +100,7 @@ public: void FuSupport(SfxRequest &rReq); virtual void SetZoom(long nZoom) override; - virtual void SetZoomRect(const Rectangle& rZoomRect) override; + virtual void SetZoomRect(const ::tools::Rectangle& rZoomRect) override; void Execute(SfxRequest& rReq); @@ -117,7 +117,7 @@ public: virtual void ReadUserDataSequence ( const css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse ) override; /** this method is called when the visible area of the view from this viewshell is changed */ - virtual void VisAreaChanged(const Rectangle& rRect) override; + virtual void VisAreaChanged(const ::tools::Rectangle& rRect) override; /** Create an accessible object representing the specified window. @param pWindow diff --git a/sd/source/ui/inc/PresentationViewShell.hxx b/sd/source/ui/inc/PresentationViewShell.hxx index f5dfc5090dc7..6a4f33e28ebe 100644 --- a/sd/source/ui/inc/PresentationViewShell.hxx +++ b/sd/source/ui/inc/PresentationViewShell.hxx @@ -57,10 +57,10 @@ protected: virtual VclPtr<SvxRuler> CreateVRuler(::sd::Window* pWin) override; private: - Rectangle maOldVisArea; + ::tools::Rectangle maOldVisArea; virtual void Activate (bool bIsMDIActivate) override; - virtual void Paint (const Rectangle& rRect, ::sd::Window* pWin) override; + virtual void Paint (const ::tools::Rectangle& rRect, ::sd::Window* pWin) override; }; } // end of namespace sd diff --git a/sd/source/ui/inc/SlideSorter.hxx b/sd/source/ui/inc/SlideSorter.hxx index 0c7dd9554861..87f01e25df8f 100644 --- a/sd/source/ui/inc/SlideSorter.hxx +++ b/sd/source/ui/inc/SlideSorter.hxx @@ -160,7 +160,7 @@ public: */ ViewShellBase* GetViewShellBase() const { return mpViewShellBase;} - void Paint (const Rectangle& rRepaintArea); + void Paint (const ::tools::Rectangle& rRepaintArea); /** Place and size the controls and windows. You may want to call this method when something has changed that for instance affects the diff --git a/sd/source/ui/inc/SlideSorterViewShell.hxx b/sd/source/ui/inc/SlideSorterViewShell.hxx index ae6be10dfbf9..c29b295bfb16 100644 --- a/sd/source/ui/inc/SlideSorterViewShell.hxx +++ b/sd/source/ui/inc/SlideSorterViewShell.hxx @@ -100,12 +100,12 @@ public: factor. */ virtual void SetZoom (long int nZoom) override; - virtual void SetZoomRect (const Rectangle& rZoomRect) override; + virtual void SetZoomRect (const ::tools::Rectangle& rZoomRect) override; /** This is a callback method used by the active window to delegate its Paint() call to. This view shell itself delegates it to the view. */ - virtual void Paint(const Rectangle& rRect, ::sd::Window* pWin) override; + virtual void Paint(const ::tools::Rectangle& rRect, ::sd::Window* pWin) override; /** Place and size the controls and windows. You may want to call this method when something has changed that for instance affects the diff --git a/sd/source/ui/inc/View.hxx b/sd/source/ui/inc/View.hxx index 20c8798fafc6..c179236b97a6 100644 --- a/sd/source/ui/inc/View.hxx +++ b/sd/source/ui/inc/View.hxx @@ -193,7 +193,7 @@ public: virtual bool IsPointMarkable(const SdrHdl& rHdl) const override; virtual bool MarkPoint(SdrHdl& rHdl, bool bUnmark=false) override; virtual void CheckPossibilities() override; - virtual bool MarkPoints(const ::Rectangle* pRect, bool bUnmark) override; + virtual bool MarkPoints(const ::tools::Rectangle* pRect, bool bUnmark) override; using SdrMarkView::MarkPoints; bool ShouldToggleOn( diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx index 3d4dc90cfe67..74ec3b0e6c99 100644 --- a/sd/source/ui/inc/ViewShell.hxx +++ b/sd/source/ui/inc/ViewShell.hxx @@ -170,11 +170,11 @@ public: The rectangle is returned in screen coordinates, i.e. pixel values relative to the upper left corner of the screen?. */ - const Rectangle& GetAllWindowRect(); + const ::tools::Rectangle& GetAllWindowRect(); // Mouse- & Key-Events virtual void PrePaint(); - virtual void Paint (const Rectangle& rRect, ::sd::Window* pWin); + virtual void Paint (const ::tools::Rectangle& rRect, ::sd::Window* pWin); virtual bool KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin); virtual void MouseMove(const MouseEvent& rMEvt, ::sd::Window* pWin); virtual void MouseButtonUp(const MouseEvent& rMEvt, ::sd::Window* pWin); @@ -202,7 +202,7 @@ public: void ScrollLines(long nX, long nY); virtual void SetZoom(long nZoom); long GetZoom() const; - virtual void SetZoomRect(const Rectangle& rZoomRect); + virtual void SetZoomRect(const ::tools::Rectangle& rZoomRect); void InitWindows(const Point& rViewOrigin, const Size& rViewSize, const Point& rWinPos, bool bUpdate = false); void InvalidateWindows(); @@ -212,7 +212,7 @@ public: */ virtual void UpdatePreview (SdPage* pPage, bool bInit = false); - void DrawMarkRect(const Rectangle& rRect) const; + void DrawMarkRect(const ::tools::Rectangle& rRect) const; void ExecReq( SfxRequest &rReq ); @@ -282,7 +282,7 @@ public: virtual void ReadUserDataSequence ( const css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse ); /** this method is called when the visible area of the view from this viewshell is changed */ - virtual void VisAreaChanged(const Rectangle& rRect); + virtual void VisAreaChanged(const ::tools::Rectangle& rRect); /** Create an accessible object representing the specified window. Override this method to provide view mode specific objects. The @@ -492,7 +492,7 @@ protected: GetAllWindowRectangle() into screen coordinates (relative to the upper left corner of the screen. */ - Rectangle maAllWindowRectangle; + ::tools::Rectangle maAllWindowRectangle; /// The type of the shell. Returned by GetShellType(). ShellType meShellType; diff --git a/sd/source/ui/inc/ViewShellBase.hxx b/sd/source/ui/inc/ViewShellBase.hxx index 65e481ec0fdc..22a4ab501001 100644 --- a/sd/source/ui/inc/ViewShellBase.hxx +++ b/sd/source/ui/inc/ViewShellBase.hxx @@ -199,7 +199,7 @@ public: /** returns the complete area of the current view relative to the frame window */ - const Rectangle& getClientRectangle() const; + const ::tools::Rectangle& getClientRectangle() const; std::shared_ptr<ToolBarManager> GetToolBarManager() const; std::shared_ptr<FormShellManager> GetFormShellManager() const; diff --git a/sd/source/ui/inc/Window.hxx b/sd/source/ui/inc/Window.hxx index 5c3e08a9a4a6..a2658b72406c 100644 --- a/sd/source/ui/inc/Window.hxx +++ b/sd/source/ui/inc/Window.hxx @@ -83,9 +83,9 @@ public: @return The new zoom factor is returned as integral percent value. */ - long SetZoomRect (const Rectangle& rZoomRect); + long SetZoomRect (const ::tools::Rectangle& rZoomRect); - long GetZoomForRect( const Rectangle& rZoomRect ); + long GetZoomForRect( const ::tools::Rectangle& rZoomRect ); void SetMinZoomAutoCalc (bool bAuto); @@ -170,7 +170,7 @@ protected: virtual void Resize() override; virtual void PrePaint(vcl::RenderContext& rRenderContext) override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) override; virtual void MouseMove(const MouseEvent& rMEvt) override; virtual void MouseButtonUp(const MouseEvent& rMEvt) override; virtual void MouseButtonDown(const MouseEvent& rMEvt) override; @@ -191,7 +191,7 @@ protected: OUString GetSurroundingText() const override; Selection GetSurroundingTextSelection() const override; /// @see OutputDevice::LogicInvalidate(). - void LogicInvalidate(const Rectangle* pRectangle) override; + void LogicInvalidate(const ::tools::Rectangle* pRectangle) override; FactoryFunction GetUITestFactory() const override; }; diff --git a/sd/source/ui/inc/animobjs.hxx b/sd/source/ui/inc/animobjs.hxx index 31bd6396eda4..6a5876067371 100644 --- a/sd/source/ui/inc/animobjs.hxx +++ b/sd/source/ui/inc/animobjs.hxx @@ -67,7 +67,7 @@ public: SdDisplay(vcl::Window* pWin); virtual ~SdDisplay() override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect ) override; void SetBitmapEx( BitmapEx* pBmpEx ); void SetScale( const Fraction& rFrac ); diff --git a/sd/source/ui/inc/docprev.hxx b/sd/source/ui/inc/docprev.hxx index 51f55abc8631..42e329adac1b 100644 --- a/sd/source/ui/inc/docprev.hxx +++ b/sd/source/ui/inc/docprev.hxx @@ -43,7 +43,7 @@ protected: Color maDocumentColor; rtl::Reference< sd::SlideShow > mxSlideShow; - 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; static void CalcSizeAndPos( Size& rSize, Point& rPoint ); static void ImpPaint( OutputDevice* pVDev ); diff --git a/sd/source/ui/inc/drawview.hxx b/sd/source/ui/inc/drawview.hxx index d076b8ba942f..2bacf126a94f 100644 --- a/sd/source/ui/inc/drawview.hxx +++ b/sd/source/ui/inc/drawview.hxx @@ -51,7 +51,7 @@ public: bool SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr = false) override; - virtual void MakeVisible(const Rectangle& rRect, vcl::Window& rWin) override; + virtual void MakeVisible(const ::tools::Rectangle& rRect, vcl::Window& rWin) override; virtual void HideSdrPage() override; // SdrPageView* pPV); virtual void DeleteMarked() override; // from SdrView diff --git a/sd/source/ui/inc/fucon3d.hxx b/sd/source/ui/inc/fucon3d.hxx index b199ae4263cd..0b0d7db22dcd 100644 --- a/sd/source/ui/inc/fucon3d.hxx +++ b/sd/source/ui/inc/fucon3d.hxx @@ -43,7 +43,7 @@ public: virtual void Activate() override; - virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) override; + virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle) override; private: FuConstruct3dObject ( diff --git a/sd/source/ui/inc/fuconarc.hxx b/sd/source/ui/inc/fuconarc.hxx index de3ed819f613..4a2f1239b2ac 100644 --- a/sd/source/ui/inc/fuconarc.hxx +++ b/sd/source/ui/inc/fuconarc.hxx @@ -38,7 +38,7 @@ public: virtual void Activate() override; - virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) override; + virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle) override; protected: FuConstructArc ( diff --git a/sd/source/ui/inc/fuconbez.hxx b/sd/source/ui/inc/fuconbez.hxx index f43069632ae0..4530b9de7147 100644 --- a/sd/source/ui/inc/fuconbez.hxx +++ b/sd/source/ui/inc/fuconbez.hxx @@ -46,7 +46,7 @@ public: void SetEditMode(sal_uInt16 nMode); sal_uInt16 GetEditMode() { return nEditMode; } - virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) override; + virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle) override; protected: FuConstructBezierPolygon ( diff --git a/sd/source/ui/inc/fuconcs.hxx b/sd/source/ui/inc/fuconcs.hxx index c8b058b33515..a9928e060b0d 100644 --- a/sd/source/ui/inc/fuconcs.hxx +++ b/sd/source/ui/inc/fuconcs.hxx @@ -45,7 +45,7 @@ public: void SetAttributes( SdrObject* pObj ); const OUString& GetShapeType() const; - virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) override; + virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle) override; // #i33136# virtual bool doConstructOrthogonal() const override; diff --git a/sd/source/ui/inc/fuconrec.hxx b/sd/source/ui/inc/fuconrec.hxx index 0ab328bb2b0c..87cf6ef92d73 100644 --- a/sd/source/ui/inc/fuconrec.hxx +++ b/sd/source/ui/inc/fuconrec.hxx @@ -50,7 +50,7 @@ public: void SetAttributes(SfxItemSet& rAttr, SdrObject* pObj); void SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj); - virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) override; + virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle) override; protected: FuConstructRectangle ( diff --git a/sd/source/ui/inc/fuconuno.hxx b/sd/source/ui/inc/fuconuno.hxx index c0fc3a959b9f..6c7a2862721a 100644 --- a/sd/source/ui/inc/fuconuno.hxx +++ b/sd/source/ui/inc/fuconuno.hxx @@ -45,7 +45,7 @@ public: virtual void Activate() override; virtual void Deactivate() override; - virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) override; + virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle) override; protected: FuConstructUnoControl( diff --git a/sd/source/ui/inc/fupoor.hxx b/sd/source/ui/inc/fupoor.hxx index ffa4655545bb..d12615240aad 100644 --- a/sd/source/ui/inc/fupoor.hxx +++ b/sd/source/ui/inc/fupoor.hxx @@ -87,7 +87,7 @@ public: void StartDelayToScrollTimer (); - virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle); + virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle); /** is called when the current function should be aborted. <p> This is used when a function gets a KEY_ESCAPE but can also @@ -121,7 +121,7 @@ protected: DECL_LINK( DelayHdl, Timer *, void ); - static void ImpForceQuadratic(Rectangle& rRect); + static void ImpForceQuadratic(::tools::Rectangle& rRect); /** Switch to another layer. The layer to switch to is specified by an offset relative to the active layer. With respect to the layer bar diff --git a/sd/source/ui/inc/futext.hxx b/sd/source/ui/inc/futext.hxx index 610628328af8..281af763e1ec 100644 --- a/sd/source/ui/inc/futext.hxx +++ b/sd/source/ui/inc/futext.hxx @@ -57,7 +57,7 @@ public: void DeleteDefaultText(); SdrTextObj* GetTextObj() { return static_cast< SdrTextObj* >( mxTextObj.get() ); } - virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) override; + virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle) override; /** is called when the current function should be aborted. <p> This is used when a function gets a KEY_ESCAPE but can also diff --git a/sd/source/ui/inc/fuzoom.hxx b/sd/source/ui/inc/fuzoom.hxx index 02862246de45..4b968d16c59e 100644 --- a/sd/source/ui/inc/fuzoom.hxx +++ b/sd/source/ui/inc/fuzoom.hxx @@ -48,7 +48,7 @@ protected: Point aBeginPosPix; Point aBeginPos; Point aEndPos; - Rectangle aZoomRect; + ::tools::Rectangle aZoomRect; bool bVisible; bool bStartDrag; Pointer aPtr; diff --git a/sd/source/ui/inc/sdxfer.hxx b/sd/source/ui/inc/sdxfer.hxx index 234c4c58bcce..de543234cad9 100644 --- a/sd/source/ui/inc/sdxfer.hxx +++ b/sd/source/ui/inc/sdxfer.hxx @@ -127,7 +127,7 @@ private: INetBookmark* mpBookmark; Graphic* mpGraphic; ImageMap* mpImageMap; - Rectangle maVisArea; + ::tools::Rectangle maVisArea; Point maStartPos; bool mbInternalMove : 1; bool mbOwnDocument : 1; diff --git a/sd/source/ui/inc/slideshow.hxx b/sd/source/ui/inc/slideshow.hxx index 6dba507d431b..ada2329f0df8 100644 --- a/sd/source/ui/inc/slideshow.hxx +++ b/sd/source/ui/inc/slideshow.hxx @@ -48,7 +48,7 @@ class SdDrawDocument; class KeyEvent; class OutputDevice; class Size; -class Rectangle; +namespace tools { class Rectangle; } namespace vcl { class Window; } class SfxRequest; class WorkWindow; @@ -163,7 +163,7 @@ public: void resize( const Size &rSize ); void activate(ViewShellBase& rBase); void deactivate(ViewShellBase& rBase); - void paint( const Rectangle& rRect ); + void paint( const ::tools::Rectangle& rRect ); bool keyInput(const KeyEvent& rKEvt); diff --git a/sd/source/ui/inc/smarttag.hxx b/sd/source/ui/inc/smarttag.hxx index 509ebb07a73a..2dd2db97f4a5 100644 --- a/sd/source/ui/inc/smarttag.hxx +++ b/sd/source/ui/inc/smarttag.hxx @@ -72,7 +72,7 @@ protected: virtual sal_uLong GetMarkedPointCount() const; virtual bool MarkPoint(SdrHdl& rHdl, bool bUnmark); virtual void CheckPossibilities(); - virtual bool MarkPoints(const Rectangle* pRect, bool bUnmark); + virtual bool MarkPoints(const ::tools::Rectangle* pRect, bool bUnmark); virtual void addCustomHandles( SdrHdlList& rHandlerList ); virtual void select(); @@ -137,7 +137,7 @@ public: sal_uLong GetMarkedPointCount() const; static bool IsPointMarkable(const SdrHdl& rHdl); bool MarkPoint(SdrHdl& rHdl, bool bUnmark); - bool MarkPoints(const Rectangle* pRect, bool bUnmark); + bool MarkPoints(const ::tools::Rectangle* pRect, bool bUnmark); void CheckPossibilities(); diff --git a/sd/source/ui/inc/vectdlg.hxx b/sd/source/ui/inc/vectdlg.hxx index 4422687d1934..dbfeee16e9ce 100644 --- a/sd/source/ui/inc/vectdlg.hxx +++ b/sd/source/ui/inc/vectdlg.hxx @@ -65,7 +65,7 @@ class SdVectorizeDlg : public ModalDialog void SaveSettings() const; void InitPreviewBmp(); - static Rectangle GetRect( const Size& rDispSize, const Size& rBmpSize ); + static ::tools::Rectangle GetRect( const Size& rDispSize, const Size& rBmpSize ); Bitmap GetPreparedBitmap( Bitmap& rBmp, Fraction& rScale ); void Calculate( Bitmap& rBmp, GDIMetaFile& rMtf ); void AddTile( BitmapReadAccess* pRAcc, GDIMetaFile& rMtf, diff --git a/sd/source/ui/inc/zoomlist.hxx b/sd/source/ui/inc/zoomlist.hxx index fdd361aa0a77..115e0d36aa92 100644 --- a/sd/source/ui/inc/zoomlist.hxx +++ b/sd/source/ui/inc/zoomlist.hxx @@ -34,9 +34,9 @@ public: ZoomList(ViewShell* pViewShell); - void InsertZoomRect(const Rectangle& rRect); - Rectangle GetNextZoomRect(); - Rectangle GetPreviousZoomRect(); + void InsertZoomRect(const ::tools::Rectangle& rRect); + ::tools::Rectangle GetNextZoomRect(); + ::tools::Rectangle GetPreviousZoomRect(); bool IsNextPossible() const; bool IsPreviousPossible() const; @@ -44,7 +44,7 @@ private: ViewShell* mpViewShell; sal_uInt32 mnCurPos; - std::vector<Rectangle> maRectangles; + std::vector<::tools::Rectangle> maRectangles; }; } // end of namespace sd diff --git a/sd/source/ui/presenter/PresenterCanvas.cxx b/sd/source/ui/presenter/PresenterCanvas.cxx index a17ee1f6a38b..e9905cae8db5 100644 --- a/sd/source/ui/presenter/PresenterCanvas.cxx +++ b/sd/source/ui/presenter/PresenterCanvas.cxx @@ -574,7 +574,7 @@ awt::Point PresenterCanvas::GetOffset (const Reference<awt::XWindow>& rxBaseWind VclPtr<vcl::Window> pSharedWindow = VCLUnoHelper::GetWindow(rxBaseWindow); if (pWindow && pSharedWindow) { - Rectangle aBox = pWindow->GetWindowExtentsRelative(pSharedWindow); + ::tools::Rectangle aBox = pWindow->GetWindowExtentsRelative(pSharedWindow); // Calculate offset of this canvas with respect to the shared // canvas. @@ -599,7 +599,7 @@ awt::Point PresenterCanvas::GetOffset (const Reference<awt::XWindow>& rxBaseWind // Get the bounding box of the window and create a range in the // coordinate system of the child window. - Rectangle aLocalClip; + ::tools::Rectangle aLocalClip; if (maClipRectangle.Width <= 0 || maClipRectangle.Height <= 0) { // No clip rectangle has been set via SetClip by the pane. @@ -609,7 +609,7 @@ awt::Point PresenterCanvas::GetOffset (const Reference<awt::XWindow>& rxBaseWind else { // Use a previously given clip rectangle. - aLocalClip = Rectangle( + aLocalClip = ::tools::Rectangle( maClipRectangle.X + rOffset.X, maClipRectangle.Y + rOffset.Y, maClipRectangle.X + maClipRectangle.Width + rOffset.X, diff --git a/sd/source/ui/presenter/PresenterHelper.cxx b/sd/source/ui/presenter/PresenterHelper.cxx index 72893b7aac5a..5a2990cb01fb 100644 --- a/sd/source/ui/presenter/PresenterHelper.cxx +++ b/sd/source/ui/presenter/PresenterHelper.cxx @@ -446,7 +446,7 @@ awt::Rectangle PresenterHelper::getWindowExtentsRelative ( VclPtr<vcl::Window> pParentWindow = VCLUnoHelper::GetWindow(rxParentWindow); if (pChildWindow && pParentWindow) { - Rectangle aBox (pChildWindow->GetWindowExtentsRelative(pParentWindow)); + ::tools::Rectangle aBox (pChildWindow->GetWindowExtentsRelative(pParentWindow)); return awt::Rectangle(aBox.Left(),aBox.Top(),aBox.GetWidth(),aBox.GetHeight()); } else diff --git a/sd/source/ui/presenter/PresenterTextView.cxx b/sd/source/ui/presenter/PresenterTextView.cxx index ae5d81c9d802..4da4289e0919 100644 --- a/sd/source/ui/presenter/PresenterTextView.cxx +++ b/sd/source/ui/presenter/PresenterTextView.cxx @@ -455,7 +455,7 @@ Reference<rendering::XBitmap> const & PresenterTextView::Implementation::GetBitm MapMode aMapMode (mpOutputDevice->GetMapMode()); aMapMode.SetOrigin(Point(0,0)); mpOutputDevice->SetMapMode(aMapMode); - const Rectangle aWindowBox (Point(0,0), maSize); + const ::tools::Rectangle aWindowBox (Point(0,0), maSize); mpOutputDevice->DrawRect(aWindowBox); mpEditEngine->Clear(); diff --git a/sd/source/ui/sidebar/DocumentHelper.cxx b/sd/source/ui/sidebar/DocumentHelper.cxx index 304516f7d98f..d6d7c9fd7585 100644 --- a/sd/source/ui/sidebar/DocumentHelper.cxx +++ b/sd/source/ui/sidebar/DocumentHelper.cxx @@ -372,7 +372,7 @@ SdPage* DocumentHelper::AddMasterPage ( // Adapt the size of the new master page to that of the pages in // the document. Size aNewSize (rTargetDocument.GetSdPage(0, pMasterPage->GetPageKind())->GetSize()); - Rectangle aBorders ( + ::tools::Rectangle aBorders ( pClonedMasterPage->GetLftBorder(), pClonedMasterPage->GetUppBorder(), pClonedMasterPage->GetRgtBorder(), diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx index eac3c34810e7..ab862728f282 100644 --- a/sd/source/ui/sidebar/LayoutMenu.cxx +++ b/sd/source/ui/sidebar/LayoutMenu.cxx @@ -257,7 +257,7 @@ ui::LayoutSize LayoutMenu::GetHeightForWidth (const sal_Int32 nWidth) return ui::LayoutSize(nPreferredHeight,nPreferredHeight,nPreferredHeight); } -void LayoutMenu::Paint (vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void LayoutMenu::Paint (vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) { if (mbSelectionUpdatePending) { @@ -595,7 +595,7 @@ void LayoutMenu::Command (const CommandEvent& rEvent) { if (GetSelectItemId() == (sal_uInt16)-1) return; - Rectangle aBBox (GetItemRect(GetSelectItemId())); + ::tools::Rectangle aBBox (GetItemRect(GetSelectItemId())); aMenuPosition = aBBox.Center(); } @@ -616,7 +616,7 @@ void LayoutMenu::Command (const CommandEvent& rEvent) pMenu->EnableItem(SID_INSERTPAGE_LAYOUT_MENU, false); // Show the menu. - pMenu->Execute(this, Rectangle(aMenuPosition,Size(1,1)), PopupMenuFlags::ExecuteDown); + pMenu->Execute(this, ::tools::Rectangle(aMenuPosition,Size(1,1)), PopupMenuFlags::ExecuteDown); } break; diff --git a/sd/source/ui/sidebar/LayoutMenu.hxx b/sd/source/ui/sidebar/LayoutMenu.hxx index 10ff2674f138..9aa001d066f8 100644 --- a/sd/source/ui/sidebar/LayoutMenu.hxx +++ b/sd/source/ui/sidebar/LayoutMenu.hxx @@ -87,7 +87,7 @@ public: virtual css::ui::LayoutSize GetHeightForWidth (const sal_Int32 nWidth) override; // From vcl::Window - virtual void Paint (vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint (vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) override; virtual void Resize() override; /** Show a context menu when the right mouse button is pressed. diff --git a/sd/source/ui/sidebar/MasterPagesSelector.cxx b/sd/source/ui/sidebar/MasterPagesSelector.cxx index ff733e8dd806..fc9c06ba6da3 100644 --- a/sd/source/ui/sidebar/MasterPagesSelector.cxx +++ b/sd/source/ui/sidebar/MasterPagesSelector.cxx @@ -216,7 +216,7 @@ void MasterPagesSelector::Command (const CommandEvent& rEvent) Point aPosition (rEvent.GetMousePosPixel()); if ( ! rEvent.IsMouseEvent()) { - Rectangle aBBox (PreviewValueSet::GetItemRect(nIndex)); + ::tools::Rectangle aBBox (PreviewValueSet::GetItemRect(nIndex)); aPosition = aBBox.Center(); } @@ -231,7 +231,7 @@ void MasterPagesSelector::Command (const CommandEvent& rEvent) ProcessPopupMenu(*pMenu); // Show the menu. - pMenu->Execute(this, Rectangle(aPosition,Size(1,1)), PopupMenuFlags::ExecuteDown); + pMenu->Execute(this, ::tools::Rectangle(aPosition,Size(1,1)), PopupMenuFlags::ExecuteDown); } } break; diff --git a/sd/source/ui/slideshow/showwin.cxx b/sd/source/ui/slideshow/showwin.cxx index 2ca0044f301f..3fec3df97e44 100644 --- a/sd/source/ui/slideshow/showwin.cxx +++ b/sd/source/ui/slideshow/showwin.cxx @@ -248,7 +248,7 @@ void ShowWindow::MouseButtonUp(const MouseEvent& rMEvt) /** * if FuSlideShow is still available, forward it */ -void ShowWindow::Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect) +void ShowWindow::Paint(vcl::RenderContext& /*rRenderContext*/, const ::tools::Rectangle& rRect) { if( (meShowWindowMode == SHOWWINDOWMODE_NORMAL) || (meShowWindowMode == SHOWWINDOWMODE_PREVIEW) ) { @@ -576,7 +576,7 @@ IMPL_LINK( ShowWindow, EventHdl, VclWindowEvent&, rEvent, void ) } } -void ShowWindow::SetPresentationArea( const Rectangle& rPresArea ) +void ShowWindow::SetPresentationArea( const ::tools::Rectangle& rPresArea ) { maPresArea = rPresArea; } diff --git a/sd/source/ui/slideshow/showwindow.hxx b/sd/source/ui/slideshow/showwindow.hxx index 247900892e35..ed23d046513d 100644 --- a/sd/source/ui/slideshow/showwindow.hxx +++ b/sd/source/ui/slideshow/showwindow.hxx @@ -60,7 +60,7 @@ public: const Color& GetBlankColor() const { return maShowBackground.GetColor(); } void SetPreviewMode(); - void SetPresentationArea( const Rectangle& rPresArea ); + void SetPresentationArea( const ::tools::Rectangle& rPresArea ); void SetMouseAutoHide( bool bMouseAutoHide ) { mbMouseAutoHide = bMouseAutoHide; } @@ -74,7 +74,7 @@ public: virtual void MouseMove(const MouseEvent& rMEvt) override; virtual void MouseButtonUp(const MouseEvent& rMEvt) override; virtual void MouseButtonDown(const MouseEvent& rMEvt) override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) override; /// Override the sd::Window's CreateAccessible to create a different accessible object virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; @@ -98,7 +98,7 @@ private: sal_Int32 mnRestartPageIndex; ShowWindowMode meShowWindowMode; bool mbShowNavigatorAfterSpecialMode; - Rectangle maPresArea; + ::tools::Rectangle maPresArea; bool mbMouseAutoHide; bool mbMouseCursorHidden; sal_uInt64 mnFirstMouseMove; diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx index 23bea3a068ee..42237d0f83cf 100644 --- a/sd/source/ui/slideshow/slideshow.cxx +++ b/sd/source/ui/slideshow/slideshow.cxx @@ -987,7 +987,7 @@ bool SlideShow::keyInput(const KeyEvent& rKEvt) return mxController.is() && mxController->keyInput(rKEvt); } -void SlideShow::paint( const Rectangle& rRect ) +void SlideShow::paint( const ::tools::Rectangle& rRect ) { if( mxController.is() ) mxController->paint( rRect ); diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index 91751a91f24b..e2a7e0dddf85 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -696,7 +696,7 @@ void SAL_CALL SlideshowImpl::disposing() if (pActWin) { Size aVisSizePixel = pActWin->GetOutputSizePixel(); - Rectangle aVisAreaWin = pActWin->PixelToLogic( Rectangle( Point(0,0), aVisSizePixel) ); + ::tools::Rectangle aVisAreaWin = pActWin->PixelToLogic( ::tools::Rectangle( Point(0,0), aVisSizePixel) ); mpViewShell->VisAreaChanged(aVisAreaWin); if (mpView) mpView->VisAreaChanged(pActWin); @@ -794,7 +794,7 @@ bool SlideshowImpl::startPreview( } else if( mpViewShell ) { - Rectangle aContentRect (mpViewShell->GetViewShellBase().getClientRectangle()); + ::tools::Rectangle aContentRect (mpViewShell->GetViewShellBase().getClientRectangle()); if (AllSettings::GetLayoutRTL()) { aContentRect.Left() = aContentRect.Right(); @@ -958,7 +958,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings ) maPresSize = mpParentWindow->GetSizePixel(); if (!maPresSettings.mbFullScreen) { - const Rectangle& aClientRect = mpViewShell->GetViewShellBase().getClientRectangle(); + const ::tools::Rectangle& aClientRect = mpViewShell->GetViewShellBase().getClientRectangle(); maPresSize = aClientRect.GetSize(); mpShowWindow->SetPosPixel( aClientRect.TopLeft() ); resize( maPresSize ); @@ -1144,7 +1144,7 @@ void SlideshowImpl::onFirstPaint() maUpdateTimer.Start(); } -void SlideshowImpl::paint( const Rectangle& /* rRect */ ) +void SlideshowImpl::paint( const ::tools::Rectangle& /* rRect */ ) { if( mxView.is() ) try { diff --git a/sd/source/ui/slideshow/slideshowimpl.hxx b/sd/source/ui/slideshow/slideshowimpl.hxx index 1aa927160b20..32aace0af8d2 100644 --- a/sd/source/ui/slideshow/slideshowimpl.hxx +++ b/sd/source/ui/slideshow/slideshowimpl.hxx @@ -231,7 +231,7 @@ public: ViewShell* getViewShell() const { return mpViewShell; } - void paint( const Rectangle& rRect ); + void paint( const ::tools::Rectangle& rRect ); bool keyInput(const KeyEvent& rKEvt); void mouseButtonUp(const MouseEvent& rMEvt); diff --git a/sd/source/ui/slideshow/slideshowviewimpl.cxx b/sd/source/ui/slideshow/slideshowviewimpl.cxx index a22e15baa598..1a4f79f81ae8 100644 --- a/sd/source/ui/slideshow/slideshowviewimpl.cxx +++ b/sd/source/ui/slideshow/slideshowviewimpl.cxx @@ -361,7 +361,7 @@ geometry::AffineMatrix2D SAL_CALL SlideShowView::getTransformation( ) mTranslationOffset.Height = aOutputOffset.Y(); mTranslationOffset.Width = aOutputOffset.X(); - maPresentationArea = Rectangle( aOutputOffset, aOutputSize ); + maPresentationArea = ::tools::Rectangle( aOutputOffset, aOutputSize ); mrOutputWindow.SetPresentationArea( maPresentationArea ); // scale presentation into available window rect (minus 10%); center in the window diff --git a/sd/source/ui/slideshow/slideshowviewimpl.hxx b/sd/source/ui/slideshow/slideshowviewimpl.hxx index 4f96a8772394..02dfb2ece249 100644 --- a/sd/source/ui/slideshow/slideshowviewimpl.hxx +++ b/sd/source/ui/slideshow/slideshowviewimpl.hxx @@ -243,7 +243,7 @@ private: mpMouseMotionListeners; SdDrawDocument* mpDoc; bool mbIsMouseMotionListener; - Rectangle maPresentationArea; + ::tools::Rectangle maPresentationArea; AnimationMode meAnimationMode; bool mbFirstPaint; bool mbFullScreen; diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx index d804ee8fcb20..dfbf1692ef8d 100644 --- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx +++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx @@ -265,7 +265,7 @@ std::shared_ptr<InsertionIndicatorHandler> const & } void SlideSorterController::Paint ( - const Rectangle& rBBox, + const ::tools::Rectangle& rBBox, vcl::Window* pWindow) { if (mnPaintEntranceCount == 0) @@ -371,7 +371,7 @@ bool SlideSorterController::Command ( GetFocusManager().GetFocusedPageDescriptor()); if (pDescriptor.get() != nullptr) { - Rectangle aBBox ( + ::tools::Rectangle aBBox ( mrView.GetLayouter().GetPageObjectLayouter()->GetBoundingBox ( pDescriptor, PageObjectLayouter::Part::PageObject, @@ -663,7 +663,7 @@ void SlideSorterController::UpdateAllPages() mrSlideSorter.GetContentWindow()->Invalidate(); } -void SlideSorterController::Resize (const Rectangle& rAvailableSpace) +void SlideSorterController::Resize (const ::tools::Rectangle& rAvailableSpace) { if (maTotalWindowArea != rAvailableSpace) { @@ -692,7 +692,7 @@ void SlideSorterController::Rearrange (bool bForce) mrView.UpdateOrientation(); // Place the scroll bars. - Rectangle aNewContentArea = GetScrollBarManager().PlaceScrollBars( + ::tools::Rectangle aNewContentArea = GetScrollBarManager().PlaceScrollBars( maTotalWindowArea, mrView.GetOrientation() != view::Layouter::VERTICAL, mrView.GetOrientation() != view::Layouter::HORIZONTAL); @@ -702,7 +702,7 @@ void SlideSorterController::Rearrange (bool bForce) // order to determine whether the window and the view have to be resized. if ( ! bForce) { - Rectangle aCurrentContentArea (pWindow->GetPosPixel(), pWindow->GetOutputSizePixel()); + ::tools::Rectangle aCurrentContentArea (pWindow->GetPosPixel(), pWindow->GetOutputSizePixel()); bSizeHasChanged = (aNewContentArea != aCurrentContentArea); } if (bForce || bSizeHasChanged) diff --git a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx index e06b6359e11c..ccf42d0db77e 100644 --- a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx @@ -105,12 +105,12 @@ void ScrollBarManager::Disconnect() window changes and a second call to the layouter becomes necessary. That call is made anyway after this method returns. */ -Rectangle ScrollBarManager::PlaceScrollBars ( - const Rectangle& rAvailableArea, +::tools::Rectangle ScrollBarManager::PlaceScrollBars ( + const ::tools::Rectangle& rAvailableArea, const bool bIsHorizontalScrollBarAllowed, const bool bIsVerticalScrollBarAllowed) { - Rectangle aRemainingSpace (DetermineScrollBarVisibilities( + ::tools::Rectangle aRemainingSpace (DetermineScrollBarVisibilities( rAvailableArea, bIsHorizontalScrollBarAllowed, bIsVerticalScrollBarAllowed)); @@ -127,7 +127,7 @@ Rectangle ScrollBarManager::PlaceScrollBars ( return aRemainingSpace; } -void ScrollBarManager::PlaceHorizontalScrollBar (const Rectangle& aAvailableArea) +void ScrollBarManager::PlaceHorizontalScrollBar (const ::tools::Rectangle& aAvailableArea) { // Save the current relative position. mnHorizontalPosition = double(mpHorizontalScrollBar->GetThumbPos()) @@ -146,7 +146,7 @@ void ScrollBarManager::PlaceHorizontalScrollBar (const Rectangle& aAvailableArea (long)(0.5 + mnHorizontalPosition * mpHorizontalScrollBar->GetRange().Len())); } -void ScrollBarManager::PlaceVerticalScrollBar (const Rectangle& aArea) +void ScrollBarManager::PlaceVerticalScrollBar (const ::tools::Rectangle& aArea) { const sal_Int32 nThumbPosition (mpVerticalScrollBar->GetThumbPos()); @@ -161,7 +161,7 @@ void ScrollBarManager::PlaceVerticalScrollBar (const Rectangle& aArea) mnVerticalPosition = nThumbPosition / double(mpVerticalScrollBar->GetRange().Len()); } -void ScrollBarManager::PlaceFiller (const Rectangle& aArea) +void ScrollBarManager::PlaceFiller (const ::tools::Rectangle& aArea) { mpScrollBarFiller->SetPosSizePixel( Point( @@ -174,7 +174,7 @@ void ScrollBarManager::PlaceFiller (const Rectangle& aArea) void ScrollBarManager::UpdateScrollBars(bool bUseScrolling) { - Rectangle aModelArea (mrSlideSorter.GetView().GetModelArea()); + ::tools::Rectangle aModelArea (mrSlideSorter.GetView().GetModelArea()); sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); Size aWindowModelSize (pWindow->PixelToLogic(pWindow->GetSizePixel())); @@ -297,8 +297,8 @@ void ScrollBarManager::SetWindowOrigin ( b) when not showing a scroll bar the area used by the page objects fits into the available area in the scroll bars orientation. */ -Rectangle ScrollBarManager::DetermineScrollBarVisibilities ( - const Rectangle& rAvailableArea, +::tools::Rectangle ScrollBarManager::DetermineScrollBarVisibilities ( + const ::tools::Rectangle& rAvailableArea, const bool bIsHorizontalScrollBarAllowed, const bool bIsVerticalScrollBarAllowed) { @@ -335,7 +335,7 @@ Rectangle ScrollBarManager::DetermineScrollBarVisibilities ( mpScrollBarFiller->Show(bShowVertical && bShowHorizontal); // Adapt the remaining space accordingly. - Rectangle aRemainingSpace (rAvailableArea); + ::tools::Rectangle aRemainingSpace (rAvailableArea); if (bShowVertical) aRemainingSpace.Right() -= mpVerticalScrollBar->GetSizePixel().Width(); if (bShowHorizontal) @@ -347,7 +347,7 @@ Rectangle ScrollBarManager::DetermineScrollBarVisibilities ( bool ScrollBarManager::TestScrollBarVisibilities ( bool bHorizontalScrollBarVisible, bool bVerticalScrollBarVisible, - const Rectangle& rAvailableArea) + const ::tools::Rectangle& rAvailableArea) { model::SlideSorterModel& rModel (mrSlideSorter.GetModel()); @@ -437,8 +437,8 @@ void ScrollBarManager::CalcAutoScrollOffset (const Point& rMouseWindowPosition) int nDy = 0; Size aWindowSize = pWindow->GetOutputSizePixel(); - Rectangle aWindowArea (pWindow->GetPosPixel(), aWindowSize); - Rectangle aViewPixelArea ( + ::tools::Rectangle aWindowArea (pWindow->GetPosPixel(), aWindowSize); + ::tools::Rectangle aViewPixelArea ( pWindow->LogicToPixel(mrSlideSorter.GetView().GetModelArea())); if (aWindowSize.Width() > maScrollBorder.Width() * 3 diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx index 8d17378c7122..504cae72e242 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx @@ -786,7 +786,7 @@ SelectionFunction::EventDescriptor::EventDescriptor ( // we can call IsLeaveWindow at the event. Otherwise we have to make an // explicit test. mbIsLeaving = rEvent.IsLeaveWindow() - || ! Rectangle(Point(0,0), + || ! ::tools::Rectangle(Point(0,0), rSlideSorter.GetContentWindow()->GetOutputSizePixel()).IsInside(maMousePosition); } @@ -817,7 +817,7 @@ SelectionFunction::EventDescriptor::EventDescriptor ( // we can call IsLeaveWindow at the event. Otherwise we have to make an // explicit test. mbIsLeaving = rEvent.mbLeaving - || ! Rectangle(Point(0,0), + || ! ::tools::Rectangle(Point(0,0), rSlideSorter.GetContentWindow()->GetOutputSizePixel()).IsInside(maMousePosition); } diff --git a/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx b/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx index 03e38021800e..f6dff9e7d4cd 100644 --- a/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx @@ -152,11 +152,11 @@ void VisibleAreaManager::MakeVisible() return ::boost::optional<Point>(); // Get the currently visible area and the model area. - const Rectangle aVisibleArea (pWindow->PixelToLogic( - Rectangle( + const ::tools::Rectangle aVisibleArea (pWindow->PixelToLogic( + ::tools::Rectangle( Point(0,0), pWindow->GetOutputSizePixel()))); - const Rectangle aModelArea (mrSlideSorter.GetView().GetModelArea()); + const ::tools::Rectangle aModelArea (mrSlideSorter.GetView().GetModelArea()); sal_Int32 nVisibleTop (aVisibleArea.Top()); const sal_Int32 nVisibleWidth (aVisibleArea.GetWidth()); @@ -164,7 +164,7 @@ void VisibleAreaManager::MakeVisible() const sal_Int32 nVisibleHeight (aVisibleArea.GetHeight()); // Find the longest run of boxes whose union fits into the visible area. - for (::std::vector<Rectangle>::const_iterator + for (::std::vector<::tools::Rectangle>::const_iterator iBox(maVisibleRequests.begin()), iEnd(maVisibleRequests.end()); iBox!=iEnd; diff --git a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx index 44ae5995e9b9..cee9f9631bd8 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx @@ -83,7 +83,7 @@ public: /** Place and size the scroll bars and the browser window so that the given rectangle is filled. */ - void Resize (const Rectangle& rAvailableSpace); + void Resize (const ::tools::Rectangle& rAvailableSpace); /** Determine which of the UI elements--the scroll bars, the scroll bar filler, the actual slide sorter view--are visible and place them in @@ -124,7 +124,7 @@ public: /** This method forwards the call to the SlideSorterView and executes pending operations like moving selected pages into the visible area. */ - void Paint (const Rectangle& rRect, vcl::Window* pWin); + void Paint (const ::tools::Rectangle& rRect, vcl::Window* pWin); void FuTemporary (SfxRequest& rRequest); void FuPermanent (SfxRequest& rRequest); @@ -261,7 +261,7 @@ private: /** This rectangle in the parent window encloses scroll bars and slide sorter window. It is set when Resize() is called. */ - Rectangle maTotalWindowArea; + ::tools::Rectangle maTotalWindowArea; /** This counter is used to avoid processing of reentrant calls to Paint(). diff --git a/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx index 698ab95702ba..a544f4585726 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx @@ -102,8 +102,8 @@ public: Returns the space that remains after the scroll bars are placed. */ - Rectangle PlaceScrollBars ( - const Rectangle& rAvailableArea, + ::tools::Rectangle PlaceScrollBars ( + const ::tools::Rectangle& rAvailableArea, const bool bIsHorizontalScrollBarAllowed, const bool bIsVerticalScrollBarAllowed); @@ -217,8 +217,8 @@ private: The area that is enclosed by the scroll bars is returned. It will be filled with the SlideSorterView. */ - Rectangle DetermineScrollBarVisibilities( - const Rectangle& rAvailableArea, + ::tools::Rectangle DetermineScrollBarVisibilities( + const ::tools::Rectangle& rAvailableArea, const bool bIsHorizontalScrollBarAllowed, const bool bIsVerticalScrollBarAllowed); @@ -233,7 +233,7 @@ private: bool TestScrollBarVisibilities ( bool bHorizontalScrollBarVisible, bool bVerticalScrollBarVisible, - const Rectangle& rAvailableArea); + const ::tools::Rectangle& rAvailableArea); void CalcAutoScrollOffset (const Point& rMouseWindowPosition); bool RepeatAutoScroll(); @@ -242,9 +242,9 @@ private: DECL_LINK(VerticalScrollBarHandler, ScrollBar*, void); DECL_LINK(AutoScrollTimeoutHandler, Timer *, void); - void PlaceHorizontalScrollBar (const Rectangle& aArea); - void PlaceVerticalScrollBar (const Rectangle& aArea); - void PlaceFiller (const Rectangle& aArea); + void PlaceHorizontalScrollBar (const ::tools::Rectangle& aArea); + void PlaceVerticalScrollBar (const ::tools::Rectangle& aArea); + void PlaceFiller (const ::tools::Rectangle& aArea); }; } } } // end of namespace ::sd::slidesorter::controller diff --git a/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx index 7e227b578970..fec1640d6850 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx @@ -71,7 +71,7 @@ private: area. Cleared on every call to ForgetVisibleRequests() and MakeVisible(). */ - ::std::vector<Rectangle> maVisibleRequests; + ::std::vector<::tools::Rectangle> maVisibleRequests; /** Animation id for a scroll animation that sets the top and left of the visible area to maRequestedVisibleTopLeft. diff --git a/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx b/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx index 3b1d0df7c530..949f9f5b6034 100644 --- a/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx +++ b/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx @@ -110,9 +110,9 @@ public: VisualState& GetVisualState() { return maVisualState;} - Rectangle GetBoundingBox() const; + ::tools::Rectangle GetBoundingBox() const; Point GetLocation (const bool bIgnoreLocation) const; - void SetBoundingBox (const Rectangle& rBoundingBox); + void SetBoundingBox (const ::tools::Rectangle& rBoundingBox); private: SdPage* mpPage; @@ -124,7 +124,7 @@ private: */ sal_Int32 mnIndex; - Rectangle maBoundingBox; + ::tools::Rectangle maBoundingBox; VisualState maVisualState; bool mbIsSelected : 1; diff --git a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx index 1b541ca36374..5daf2d4efc89 100644 --- a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx @@ -85,10 +85,10 @@ public: void RequestRepaint(); void RequestRepaint (const model::SharedPageDescriptor& rDescriptor); - void RequestRepaint (const Rectangle& rRepaintBox); + void RequestRepaint (const ::tools::Rectangle& rRepaintBox); void RequestRepaint (const vcl::Region& rRepaintRegion); - Rectangle GetModelArea(); + ::tools::Rectangle GetModelArea(); /** Return the index of the page that is rendered at the given position. @param rPosition @@ -129,7 +129,7 @@ public: OutputDevice* pDevice, const vcl::Region& rPaintArea, sdr::contact::ViewObjectContactRedirector* pRedirector = nullptr) override; - void Paint (OutputDevice& rDevice, const Rectangle& rRepaintArea); + void Paint (OutputDevice& rDevice, const ::tools::Rectangle& rRepaintArea); virtual void ConfigurationChanged ( utl::ConfigurationBroadcaster* pBroadcaster, diff --git a/sd/source/ui/slidesorter/inc/view/SlsILayerPainter.hxx b/sd/source/ui/slidesorter/inc/view/SlsILayerPainter.hxx index f317f70f900a..35c58de2b285 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsILayerPainter.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsILayerPainter.hxx @@ -24,7 +24,7 @@ #include <memory> class OutputDevice; -class Rectangle; +namespace tools { class Rectangle; } namespace sd { namespace slidesorter { namespace view { @@ -33,7 +33,7 @@ class ILayerInvalidator public: virtual ~ILayerInvalidator() {} - virtual void Invalidate (const Rectangle& rInvalidationBox) = 0; + virtual void Invalidate (const ::tools::Rectangle& rInvalidationBox) = 0; }; typedef std::shared_ptr<ILayerInvalidator> SharedILayerInvalidator; @@ -46,7 +46,7 @@ public: const SharedILayerInvalidator& rpInvalidator) = 0; virtual void Paint ( OutputDevice& rDevice, - const Rectangle& rRepaintArea) = 0; + const ::tools::Rectangle& rRepaintArea) = 0; }; typedef std::shared_ptr<ILayerPainter> SharedILayerPainter; diff --git a/sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx b/sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx index 8fe353ce73c2..05eb4b876df8 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx @@ -69,13 +69,13 @@ public: virtual void Paint ( OutputDevice& rDevice, - const Rectangle& rRepaintArea) override; + const ::tools::Rectangle& rRepaintArea) override; bool IsVisible() const { return mbIsVisible;} void Hide(); void Show(); - Rectangle GetBoundingBox() const; + ::tools::Rectangle GetBoundingBox() const; private: SlideSorter& mrSlideSorter; diff --git a/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx b/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx index 8860817fc101..d312fe2700ae 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx @@ -116,14 +116,14 @@ public: /** Return the bounding box in window coordinates of the nIndex-th page object. */ - Rectangle GetPageObjectBox ( + ::tools::Rectangle GetPageObjectBox ( const sal_Int32 nIndex, const bool bIncludeBorderAndGap) const; /** Return the bounding box in model coordinates of the page that contains the given amount of page objects. */ - Rectangle GetTotalBoundingBox() const; + ::tools::Rectangle GetTotalBoundingBox() const; /** Return the index of the first fully or partially visible page object. This takes into account only the vertical dimension. @@ -131,7 +131,7 @@ public: The second index may be larger than the number of existing page objects. */ - Range GetRangeOfVisiblePageObjects (const Rectangle& rVisibleArea) const; + Range GetRangeOfVisiblePageObjects (const ::tools::Rectangle& rVisibleArea) const; /** Return the index of the page object that is rendered at the given point. diff --git a/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx b/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx index 15ff687fcc04..d6df4b7aa381 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx @@ -99,7 +99,7 @@ public: Return a position ignoring the slides' location, ie. as if we were the first slide. */ - Rectangle GetBoundingBox ( + ::tools::Rectangle GetBoundingBox ( const model::SharedPageDescriptor& rpPageDescriptor, const Part ePart, const CoordinateSystem eCoordinateSystem, @@ -115,7 +115,7 @@ public: const Image& GetCustomAnimationEffectIcon() const { return maCustomAnimationEffectIcon;} private: - Rectangle GetBoundingBox ( + ::tools::Rectangle GetBoundingBox ( const Point& rPageObjectLocation, const Part ePart, const CoordinateSystem eCoordinateSystem); @@ -123,18 +123,18 @@ private: private: VclPtr<sd::Window> mpWindow; Size maPageObjectSize; - Rectangle maFocusIndicatorBoundingBox; - Rectangle maPageObjectBoundingBox; - Rectangle maPageNumberAreaBoundingBox; - Rectangle maPreviewBoundingBox; - Rectangle maTransitionEffectBoundingBox; - Rectangle maCustomAnimationEffectBoundingBox; + ::tools::Rectangle maFocusIndicatorBoundingBox; + ::tools::Rectangle maPageObjectBoundingBox; + ::tools::Rectangle maPageNumberAreaBoundingBox; + ::tools::Rectangle maPreviewBoundingBox; + ::tools::Rectangle maTransitionEffectBoundingBox; + ::tools::Rectangle maCustomAnimationEffectBoundingBox; const Image maTransitionEffectIcon; const Image maCustomAnimationEffectIcon; const std::shared_ptr<vcl::Font> mpPageNumberFont; Size GetPageNumberAreaSize (const int nPageCount); - Rectangle CalculatePreviewBoundingBox ( + ::tools::Rectangle CalculatePreviewBoundingBox ( Size& rPageObjectSize, const Size& rPreviewModelSize, const sal_Int32 nPageNumberAreaWidth, diff --git a/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx b/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx index 52c037468b12..8f151e6ff99f 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx @@ -99,7 +99,7 @@ private: void PaintBorder ( OutputDevice& rDevice, const Theme::GradientColorType eColorType, - const Rectangle& rBox) const; + const ::tools::Rectangle& rBox) const; void PaintBackgroundDetail( PageObjectLayouter *pPageObjectLayouter, OutputDevice& rDevice, diff --git a/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx b/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx index 105460f53f5e..39211e967b21 100644 --- a/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx +++ b/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx @@ -209,9 +209,9 @@ void PageDescriptor::SetCoreSelection() } } -Rectangle PageDescriptor::GetBoundingBox() const +::tools::Rectangle PageDescriptor::GetBoundingBox() const { - Rectangle aBox (maBoundingBox); + ::tools::Rectangle aBox (maBoundingBox); const Point aOffset (maVisualState.GetLocationOffset()); aBox.Move(aOffset.X(), aOffset.Y()); return aBox; @@ -225,7 +225,7 @@ Point PageDescriptor::GetLocation (const bool bIgnoreOffset) const return maBoundingBox.TopLeft() + maVisualState.GetLocationOffset(); } -void PageDescriptor::SetBoundingBox (const Rectangle& rBoundingBox) +void PageDescriptor::SetBoundingBox (const ::tools::Rectangle& rBoundingBox) { maBoundingBox = rBoundingBox; } diff --git a/sd/source/ui/slidesorter/shell/SlideSorter.cxx b/sd/source/ui/slidesorter/shell/SlideSorter.cxx index d7c576b51b42..9a0a758b2370 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorter.cxx +++ b/sd/source/ui/slidesorter/shell/SlideSorter.cxx @@ -53,7 +53,7 @@ public: ContentWindow(vcl::Window& rParent, SlideSorter& rSlideSorter); void SetCurrentFunction (const rtl::Reference<FuPoor>& rpFunction); - virtual void Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& /*rRenderContext*/, const ::tools::Rectangle& rRect) override; virtual void KeyInput (const KeyEvent& rEvent) override; virtual void MouseMove (const MouseEvent& rEvent) override; virtual void MouseButtonUp (const MouseEvent& rEvent) override; @@ -235,7 +235,7 @@ Reference<frame::XController> SlideSorter::GetXController() const return xController; } -void SlideSorter::Paint (const Rectangle& rRepaintArea) +void SlideSorter::Paint (const ::tools::Rectangle& rRepaintArea) { GetController().Paint( rRepaintArea, @@ -356,7 +356,7 @@ void SlideSorter::ArrangeGUIElements ( view::SlideSorterView::DrawLock aLock (*this); GetContentWindow()->EnablePaint (false); - mpSlideSorterController->Resize (Rectangle(aOrigin, rSize)); + mpSlideSorterController->Resize (::tools::Rectangle(aOrigin, rSize)); GetContentWindow()->EnablePaint (true); @@ -444,7 +444,7 @@ void ContentWindow::SetCurrentFunction (const rtl::Reference<FuPoor>& rpFunction mpCurrentFunction = rpFunction; } -void ContentWindow::Paint (vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect) +void ContentWindow::Paint (vcl::RenderContext& /*rRenderContext*/, const ::tools::Rectangle& rRect) { mrSlideSorter.Paint(rRect); } diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx index 6190a6007168..d56fb3f52389 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx +++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx @@ -436,7 +436,7 @@ void SlideSorterViewShell::ExecStatusBar (SfxRequest& ) } void SlideSorterViewShell::Paint ( - const Rectangle& rBBox, + const ::tools::Rectangle& rBBox, ::sd::Window* pWindow) { SetActiveWindow (pWindow); @@ -582,12 +582,12 @@ void SlideSorterViewShell::SetZoom (long int ) // the window. } -void SlideSorterViewShell::SetZoomRect (const Rectangle& rZoomRect) +void SlideSorterViewShell::SetZoomRect (const ::tools::Rectangle& rZoomRect) { OSL_ASSERT(mpSlideSorter.get()!=nullptr); Size aPageSize (mpSlideSorter->GetView().GetLayouter().GetPageObjectSize()); - Rectangle aRect(rZoomRect); + ::tools::Rectangle aRect(rZoomRect); if (aRect.GetWidth() < aPageSize.Width()) { diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx index dbe84982651a..40a18782ff7f 100644 --- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx +++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx @@ -89,7 +89,7 @@ namespace { public: explicit Painter (SlideSorterView& rView) : mrView(rView) {} - virtual void Paint (OutputDevice& rDevice, const Rectangle& rRepaintArea) override + virtual void Paint (OutputDevice& rDevice, const ::tools::Rectangle& rRepaintArea) override { mrView.Paint(rDevice,rRepaintArea); } @@ -109,7 +109,7 @@ public: BackgroundPainter(const BackgroundPainter&) = delete; BackgroundPainter& operator=(const BackgroundPainter&) = delete; - virtual void Paint (OutputDevice& rDevice, const Rectangle& rRepaintArea) override + virtual void Paint (OutputDevice& rDevice, const ::tools::Rectangle& rRepaintArea) override { rDevice.SetFillColor(maBackgroundColor); rDevice.SetLineColor(); @@ -404,7 +404,7 @@ void SlideSorterView::Layout () { // Set the model area, i.e. the smallest rectangle that includes all // page objects. - const Rectangle aViewBox (mpLayouter->GetTotalBoundingBox()); + const ::tools::Rectangle aViewBox (mpLayouter->GetTotalBoundingBox()); pWindow->SetViewOrigin (aViewBox.TopLeft()); pWindow->SetViewSize (aViewBox.GetSize()); @@ -448,7 +448,7 @@ void SlideSorterView::DeterminePageObjectVisibilities() // visibility calculation can correctly invalidate it again. mbPageObjectVisibilitiesValid = true; - Rectangle aViewArea (pWindow->PixelToLogic(Rectangle(Point(0,0),pWindow->GetSizePixel()))); + ::tools::Rectangle aViewArea (pWindow->PixelToLogic(::tools::Rectangle(Point(0,0),pWindow->GetSizePixel()))); const Range aRange (mpLayouter->GetRangeOfVisiblePageObjects(aViewArea)); const Range aUnion( ::std::min(maVisiblePageRange.Min(), aRange.Min()), @@ -540,7 +540,7 @@ void SlideSorterView::RequestRepaint() if (pWindow) { mpLayeredDevice->InvalidateAllLayers( - Rectangle( + ::tools::Rectangle( pWindow->PixelToLogic(Point(0,0)), pWindow->PixelToLogic(pWindow->GetSizePixel()))); pWindow->Invalidate(); @@ -553,7 +553,7 @@ void SlideSorterView::RequestRepaint (const model::SharedPageDescriptor& rpDescr RequestRepaint(rpDescriptor->GetBoundingBox()); } -void SlideSorterView::RequestRepaint (const Rectangle& rRepaintBox) +void SlideSorterView::RequestRepaint (const ::tools::Rectangle& rRepaintBox) { sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); if (pWindow) @@ -573,7 +573,7 @@ void SlideSorterView::RequestRepaint (const vcl::Region& rRepaintRegion) } } -Rectangle SlideSorterView::GetModelArea() +::tools::Rectangle SlideSorterView::GetModelArea() { return mpLayouter->GetTotalBoundingBox(); } @@ -645,7 +645,7 @@ void SlideSorterView::CompleteRedraw ( void SlideSorterView::Paint ( OutputDevice& rDevice, - const Rectangle& rRepaintArea) + const ::tools::Rectangle& rRepaintArea) { if ( ! mpPageObjectPainter) if ( ! GetPageObjectPainter()) @@ -759,7 +759,7 @@ void SlideSorterView::UpdatePageUnderMouse () if (pWindow && pWindow->IsVisible() && ! pWindow->IsMouseCaptured()) { const Window::PointerState aPointerState (pWindow->GetPointerState()); - const Rectangle aWindowBox (pWindow->GetPosPixel(), pWindow->GetSizePixel()); + const ::tools::Rectangle aWindowBox (pWindow->GetPosPixel(), pWindow->GetSizePixel()); if (aWindowBox.IsInside(aPointerState.maPos)) { UpdatePageUnderMouse(aPointerState.maPos); diff --git a/sd/source/ui/slidesorter/view/SlsFramePainter.cxx b/sd/source/ui/slidesorter/view/SlsFramePainter.cxx index b54b666d5924..05c97f6a6c51 100644 --- a/sd/source/ui/slidesorter/view/SlsFramePainter.cxx +++ b/sd/source/ui/slidesorter/view/SlsFramePainter.cxx @@ -55,7 +55,7 @@ FramePainter::~FramePainter() void FramePainter::PaintFrame ( OutputDevice& rDevice, - const Rectangle& rBox) const + const ::tools::Rectangle& rBox) const { if ( ! mbIsValid) return; @@ -214,7 +214,7 @@ void FramePainter::OffsetBitmap::PaintSide ( void FramePainter::OffsetBitmap::PaintCenter ( OutputDevice& rDevice, - const Rectangle& rBox) const + const ::tools::Rectangle& rBox) const { const Size aBitmapSize (maBitmap.GetSizePixel()); for (long nY=rBox.Top(); nY<=rBox.Bottom(); nY+=aBitmapSize.Height()) diff --git a/sd/source/ui/slidesorter/view/SlsFramePainter.hxx b/sd/source/ui/slidesorter/view/SlsFramePainter.hxx index 5ce2ee6d06d0..1fbb22db620d 100644 --- a/sd/source/ui/slidesorter/view/SlsFramePainter.hxx +++ b/sd/source/ui/slidesorter/view/SlsFramePainter.hxx @@ -33,7 +33,7 @@ public: /** Paint a border around the given box by using a set of bitmaps for the corners and sides. */ - void PaintFrame (OutputDevice&rDevice, const Rectangle& rBox) const; + void PaintFrame (OutputDevice&rDevice, const ::tools::Rectangle& rBox) const; /** Special functionality that takes the color from the center bitmap and replaces that color in all bitmaps by the given new @@ -91,7 +91,7 @@ private: */ void PaintCenter ( OutputDevice& rDevice, - const Rectangle& rBox) const; + const ::tools::Rectangle& rBox) const; }; OffsetBitmap maTopLeft; OffsetBitmap maTop; diff --git a/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx b/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx index 778fa8d4d4e8..7677b9015d0e 100644 --- a/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx +++ b/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx @@ -361,7 +361,7 @@ void PageObjectRun::ResetOffsets (const controller::Animator::AnimationMode eMod maStartOffset[nIndex] = pDescriptor->GetVisualState().GetLocationOffset(); else { - const Rectangle aOldBoundingBox (pDescriptor->GetBoundingBox()); + const ::tools::Rectangle aOldBoundingBox (pDescriptor->GetBoundingBox()); pDescriptor->GetVisualState().SetLocationOffset(Point(0,0)); rView.RequestRepaint(aOldBoundingBox); rView.RequestRepaint(pDescriptor); @@ -409,7 +409,7 @@ void PageObjectRun::operator () (const double nGlobalTime) model::SharedPageDescriptor pDescriptor (rModel.GetPageDescriptor(nIndex)); if ( ! pDescriptor) continue; - const Rectangle aOldBoundingBox (pDescriptor->GetBoundingBox()); + const ::tools::Rectangle aOldBoundingBox (pDescriptor->GetBoundingBox()); pDescriptor->GetVisualState().SetLocationOffset( Blend( maStartOffset[nIndex-mnStartIndex], diff --git a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx index 9c8b3c98ff93..036ebc2c15a2 100644 --- a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx +++ b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx @@ -43,9 +43,9 @@ namespace { static const double gnPreviewOffsetScale = 1.0 / 8.0; -Rectangle GrowRectangle (const Rectangle& rBox, const sal_Int32 nOffset) +::tools::Rectangle GrowRectangle (const ::tools::Rectangle& rBox, const sal_Int32 nOffset) { - return Rectangle ( + return ::tools::Rectangle ( rBox.Left() - nOffset, rBox.Top() - nOffset, rBox.Right() + nOffset, @@ -192,7 +192,7 @@ Point InsertionIndicatorOverlay::PaintRepresentatives ( if (rRepresentatives[nIndex].mbIsExcluded) { const vcl::Region aSavedClipRegion (rContent.GetClipRegion()); - rContent.IntersectClipRegion(Rectangle(aPageOffset, rPreviewSize)); + rContent.IntersectClipRegion(::tools::Rectangle(aPageOffset, rPreviewSize)); // Paint bitmap tiled over the preview to mark it as excluded. const sal_Int32 nIconWidth (aExclusionOverlay.GetSizePixel().Width()); const sal_Int32 nIconHeight (aExclusionOverlay.GetSizePixel().Height()); @@ -206,7 +206,7 @@ Point InsertionIndicatorOverlay::PaintRepresentatives ( } // Tone down the bitmap. The further back the darker it becomes. - Rectangle aBox ( + ::tools::Rectangle aBox ( aPageOffset.X(), aPageOffset.Y(), aPageOffset.X()+rPreviewSize.Width()-1, @@ -221,7 +221,7 @@ Point InsertionIndicatorOverlay::PaintRepresentatives ( nTransparency); // Draw border around preview. - Rectangle aBorderBox (GrowRectangle(aBox, 1)); + ::tools::Rectangle aBorderBox (GrowRectangle(aBox, 1)); rContent.SetLineColor(COL_GRAY); rContent.SetFillColor(); rContent.DrawRect(aBorderBox); @@ -249,7 +249,7 @@ void InsertionIndicatorOverlay::PaintPageCount ( // Determine the size of the (painted) text and create a bounding // box that centers the text on the first preview. rDevice.SetFont(*pFont); - Rectangle aTextBox; + ::tools::Rectangle aTextBox; rDevice.GetTextBoundRect(aTextBox, sNumber); Point aTextOffset (aTextBox.TopLeft()); Size aTextSize (aTextBox.GetSize()); @@ -259,7 +259,7 @@ void InsertionIndicatorOverlay::PaintPageCount ( aTextLocation += Point( (rPreviewSize.Width()-aTextBox.GetWidth())/2, (rPreviewSize.Height()-aTextBox.GetHeight())/2); - aTextBox = Rectangle(aTextLocation, aTextSize); + aTextBox = ::tools::Rectangle(aTextLocation, aTextSize); // Paint background, border and text. static const sal_Int32 nBorder = 5; @@ -284,7 +284,7 @@ void InsertionIndicatorOverlay::SetLocation (const Point& rLocation) maIcon.GetSizePixel().Height()/2)); if (maLocation != aTopLeft) { - const Rectangle aOldBoundingBox (GetBoundingBox()); + const ::tools::Rectangle aOldBoundingBox (GetBoundingBox()); maLocation = aTopLeft; @@ -298,7 +298,7 @@ void InsertionIndicatorOverlay::SetLocation (const Point& rLocation) void InsertionIndicatorOverlay::Paint ( OutputDevice& rDevice, - const Rectangle& rRepaintArea) + const ::tools::Rectangle& rRepaintArea) { (void)rRepaintArea; @@ -350,9 +350,9 @@ void InsertionIndicatorOverlay::Hide() } } -Rectangle InsertionIndicatorOverlay::GetBoundingBox() const +::tools::Rectangle InsertionIndicatorOverlay::GetBoundingBox() const { - return Rectangle(maLocation, maIcon.GetSizePixel()); + return ::tools::Rectangle(maLocation, maIcon.GetSizePixel()); } Size InsertionIndicatorOverlay::GetSize() const diff --git a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx index dcff6a61d45d..276dc2cd791b 100644 --- a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx +++ b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx @@ -45,7 +45,7 @@ public: { } - virtual void Invalidate (const Rectangle& rInvalidationBox) override + virtual void Invalidate (const ::tools::Rectangle& rInvalidationBox) override { mpLayeredDevice->Invalidate(rInvalidationBox, mnLayer); mpTargetWindow->Invalidate(rInvalidationBox); @@ -60,7 +60,7 @@ private: void DeviceCopy ( vcl::RenderContext& rTargetDevice, vcl::RenderContext& rSourceDevice, - const Rectangle& rBox) + const ::tools::Rectangle& rBox) { rTargetDevice.DrawOutDev( rBox.TopLeft(), @@ -70,7 +70,7 @@ void DeviceCopy ( rSourceDevice); } -void ForAllRectangles (const vcl::Region& rRegion, const std::function<void (const Rectangle&)>& aFunction) +void ForAllRectangles (const vcl::Region& rRegion, const std::function<void (const ::tools::Rectangle&)>& aFunction) { OSL_ASSERT(aFunction); RectangleVector aRectangles; @@ -78,7 +78,7 @@ void ForAllRectangles (const vcl::Region& rRegion, const std::function<void (con if(0 == aRectangles.size()) { - aFunction(Rectangle()); + aFunction(::tools::Rectangle()); } else { @@ -104,12 +104,12 @@ public: Layer& operator=(const Layer&) = delete; void Initialize (sd::Window *pTargetWindow); - void InvalidateRectangle (const Rectangle& rInvalidationBox); + void InvalidateRectangle (const ::tools::Rectangle& rInvalidationBox); void InvalidateRegion (const vcl::Region& rInvalidationRegion); void Validate (const MapMode& rMapMode); void Repaint ( OutputDevice& rTargetDevice, - const Rectangle& rRepaintRectangle); + const ::tools::Rectangle& rRepaintRectangle); void Resize (const Size& rSize); void AddPainter (const SharedILayerPainter& rpPainter); void RemovePainter (const SharedILayerPainter& rpPainter); @@ -121,7 +121,7 @@ private: ::std::vector<SharedILayerPainter> maPainters; vcl::Region maInvalidationRegion; - void ValidateRectangle (const Rectangle& rBox); + void ValidateRectangle (const ::tools::Rectangle& rBox); }; typedef std::shared_ptr<Layer> SharedLayer; @@ -169,7 +169,7 @@ LayeredDevice::~LayeredDevice() } void LayeredDevice::Invalidate ( - const Rectangle& rInvalidationArea, + const ::tools::Rectangle& rInvalidationArea, const sal_Int32 nLayer) { if (nLayer<0 || size_t(nLayer)>=mpLayers->size()) @@ -181,7 +181,7 @@ void LayeredDevice::Invalidate ( (*mpLayers)[nLayer]->InvalidateRectangle(rInvalidationArea); } -void LayeredDevice::InvalidateAllLayers (const Rectangle& rInvalidationArea) +void LayeredDevice::InvalidateAllLayers (const ::tools::Rectangle& rInvalidationArea) { for (size_t nLayer=0; nLayer<mpLayers->size(); ++nLayer) (*mpLayers)[nLayer]->InvalidateRectangle(rInvalidationArea); @@ -260,10 +260,10 @@ void LayeredDevice::Repaint (const vcl::Region& rRepaintRegion) } ForAllRectangles(rRepaintRegion, - [this] (Rectangle const& r) { this->RepaintRectangle(r); }); + [this] (::tools::Rectangle const& r) { this->RepaintRectangle(r); }); } -void LayeredDevice::RepaintRectangle (const Rectangle& rRepaintRectangle) +void LayeredDevice::RepaintRectangle (const ::tools::Rectangle& rRepaintRectangle) { if (mpLayers->empty()) return; @@ -311,8 +311,8 @@ bool LayeredDevice::HandleMapModeChange() if (maSavedMapMode == rMapMode) return false; - const Rectangle aLogicWindowBox ( - mpTargetWindow->PixelToLogic(Rectangle(Point(0,0), mpTargetWindow->GetSizePixel()))); + const ::tools::Rectangle aLogicWindowBox ( + mpTargetWindow->PixelToLogic(::tools::Rectangle(Point(0,0), mpTargetWindow->GetSizePixel()))); if (maSavedMapMode.GetScaleX() != rMapMode.GetScaleX() || maSavedMapMode.GetScaleY() != rMapMode.GetScaleY() || maSavedMapMode.GetMapUnit() != rMapMode.GetMapUnit()) @@ -331,27 +331,27 @@ bool LayeredDevice::HandleMapModeChange() aLogicWindowBox.GetSize()); // Invalidate the area(s) that have been exposed. - const Rectangle aWindowBox (Point(0,0), mpTargetWindow->GetSizePixel()); + const ::tools::Rectangle aWindowBox (Point(0,0), mpTargetWindow->GetSizePixel()); if (aDelta.Y() < 0) - InvalidateAllLayers(mpTargetWindow->PixelToLogic(Rectangle( + InvalidateAllLayers(mpTargetWindow->PixelToLogic(::tools::Rectangle( aWindowBox.Left(), aWindowBox.Bottom()+aDelta.Y(), aWindowBox.Right(), aWindowBox.Bottom()))); else if (aDelta.Y() > 0) - InvalidateAllLayers(mpTargetWindow->PixelToLogic(Rectangle( + InvalidateAllLayers(mpTargetWindow->PixelToLogic(::tools::Rectangle( aWindowBox.Left(), aWindowBox.Top(), aWindowBox.Right(), aWindowBox.Top()+aDelta.Y()))); if (aDelta.X() < 0) - InvalidateAllLayers(mpTargetWindow->PixelToLogic(Rectangle( + InvalidateAllLayers(mpTargetWindow->PixelToLogic(::tools::Rectangle( aWindowBox.Right()+aDelta.X(), aWindowBox.Top(), aWindowBox.Right(), aWindowBox.Bottom()))); else if (aDelta.X() > 0) - InvalidateAllLayers(mpTargetWindow->PixelToLogic(Rectangle( + InvalidateAllLayers(mpTargetWindow->PixelToLogic(::tools::Rectangle( aWindowBox.Left(), aWindowBox.Top(), aWindowBox.Left()+aDelta.X(), @@ -390,7 +390,7 @@ void Layer::Initialize (sd::Window *pTargetWindow) #endif } -void Layer::InvalidateRectangle (const Rectangle& rInvalidationBox) +void Layer::InvalidateRectangle (const ::tools::Rectangle& rInvalidationBox) { maInvalidationRegion.Union(rInvalidationBox); } @@ -410,11 +410,11 @@ void Layer::Validate (const MapMode& rMapMode) mpLayerDevice->SetMapMode(rMapMode); ForAllRectangles( aRegion, - [this] (Rectangle const& r) { return this->ValidateRectangle(r); }); + [this] (::tools::Rectangle const& r) { return this->ValidateRectangle(r); }); } } -void Layer::ValidateRectangle (const Rectangle& rBox) +void Layer::ValidateRectangle (const ::tools::Rectangle& rBox) { if ( ! mpLayerDevice) return; @@ -435,7 +435,7 @@ void Layer::ValidateRectangle (const Rectangle& rBox) void Layer::Repaint ( OutputDevice& rTargetDevice, - const Rectangle& rRepaintRectangle) + const ::tools::Rectangle& rRepaintRectangle) { if (mpLayerDevice) { @@ -455,7 +455,7 @@ void Layer::Resize (const Size& rSize) if (mpLayerDevice) { mpLayerDevice->SetOutputSizePixel(rSize); - maInvalidationRegion = Rectangle(Point(0,0), rSize); + maInvalidationRegion = ::tools::Rectangle(Point(0,0), rSize); } } diff --git a/sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx b/sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx index b6d34433bc5b..487f97963774 100644 --- a/sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx +++ b/sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx @@ -29,7 +29,7 @@ #include <memory> #include <vector> -class Rectangle; +namespace tools { class Rectangle; } namespace sd { namespace slidesorter { namespace view { @@ -46,10 +46,10 @@ public: ~LayeredDevice (); void Invalidate ( - const Rectangle& rInvalidationBox, + const ::tools::Rectangle& rInvalidationBox, const sal_Int32 nLayer); void InvalidateAllLayers ( - const Rectangle& rInvalidationBox); + const ::tools::Rectangle& rInvalidationBox); void InvalidateAllLayers ( const vcl::Region& rInvalidationRegion); @@ -75,7 +75,7 @@ private: ScopedVclPtr<VirtualDevice> mpBackBuffer; MapMode maSavedMapMode; - void RepaintRectangle (const Rectangle& rRepaintRectangle); + void RepaintRectangle (const ::tools::Rectangle& rRepaintRectangle); }; } } } // end of namespace ::sd::slidesorter::view diff --git a/sd/source/ui/slidesorter/view/SlsLayouter.cxx b/sd/source/ui/slidesorter/view/SlsLayouter.cxx index e2d321defa80..1728cc390c3f 100644 --- a/sd/source/ui/slidesorter/view/SlsLayouter.cxx +++ b/sd/source/ui/slidesorter/view/SlsLayouter.cxx @@ -168,33 +168,33 @@ public: /** Return the bounding box of the preview or, when selected, of the page object. Thus, it returns something like a visual bounding box. */ - Rectangle GetInnerBoundingBox ( + ::tools::Rectangle GetInnerBoundingBox ( model::SlideSorterModel& rModel, const sal_Int32 nIndex) const; Range GetValidHorizontalSizeRange() const; Range GetValidVerticalSizeRange() const; - Range GetRangeOfVisiblePageObjects (const Rectangle& aVisibleArea) const; + Range GetRangeOfVisiblePageObjects (const ::tools::Rectangle& aVisibleArea) const; sal_Int32 GetIndex ( const sal_Int32 nRow, const sal_Int32 nColumn, const bool bClampToValidRange) const; - Rectangle GetPageObjectBox ( + ::tools::Rectangle GetPageObjectBox ( const sal_Int32 nIndex, const bool bIncludeBorderAndGap = false) const; - Rectangle GetPageObjectBox ( + ::tools::Rectangle GetPageObjectBox ( const sal_Int32 nRow, const sal_Int32 nColumn) const; - Rectangle AddBorderAndGap ( - const Rectangle& rBoundingBox, + ::tools::Rectangle AddBorderAndGap ( + const ::tools::Rectangle& rBoundingBox, const sal_Int32 nRow, const sal_Int32 nColumn) const; - Rectangle GetTotalBoundingBox() const; + ::tools::Rectangle GetTotalBoundingBox() const; virtual ~Implementation(); @@ -348,14 +348,14 @@ Size Layouter::GetPageObjectSize() const return mpImplementation->maPageObjectSize; } -Rectangle Layouter::GetPageObjectBox ( +::tools::Rectangle Layouter::GetPageObjectBox ( const sal_Int32 nIndex, const bool bIncludeBorderAndGap) const { return mpImplementation->GetPageObjectBox(nIndex, bIncludeBorderAndGap); } -Rectangle Layouter::GetTotalBoundingBox() const +::tools::Rectangle Layouter::GetTotalBoundingBox() const { return mpImplementation->GetTotalBoundingBox(); } @@ -387,7 +387,7 @@ Range Layouter::GetValidVerticalSizeRange() const return mpImplementation->GetValidVerticalSizeRange(); } -Range Layouter::GetRangeOfVisiblePageObjects (const Rectangle& aVisibleArea) const +Range Layouter::GetRangeOfVisiblePageObjects (const ::tools::Rectangle& aVisibleArea) const { return mpImplementation->GetRangeOfVisiblePageObjects(aVisibleArea); } @@ -687,8 +687,8 @@ void Layouter::Implementation::CalculateGeometricPosition ( if (rPosition.IsAtRunStart()) { // Place indicator at the top of the column. - const Rectangle aOuterBox (GetPageObjectBox(nIndex)); - const Rectangle aInnerBox (GetInnerBoundingBox(rModel, nIndex)); + const ::tools::Rectangle aOuterBox (GetPageObjectBox(nIndex)); + const ::tools::Rectangle aInnerBox (GetInnerBoundingBox(rModel, nIndex)); if (bIsVertical) { nLeadingLocation = aOuterBox.Top(); @@ -707,8 +707,8 @@ void Layouter::Implementation::CalculateGeometricPosition ( { // Place indicator at the bottom/right of the column/row. - const Rectangle aOuterBox (GetPageObjectBox(nIndex-1)); - const Rectangle aInnerBox (GetInnerBoundingBox(rModel, nIndex-1)); + const ::tools::Rectangle aOuterBox (GetPageObjectBox(nIndex-1)); + const ::tools::Rectangle aInnerBox (GetInnerBoundingBox(rModel, nIndex-1)); if (bIsVertical) { nLeadingLocation = aInnerBox.Bottom(); @@ -728,8 +728,8 @@ void Layouter::Implementation::CalculateGeometricPosition ( else { // Place indicator between two rows/columns. - const Rectangle aBox1 (GetInnerBoundingBox(rModel, nIndex-1)); - const Rectangle aBox2 (GetInnerBoundingBox(rModel, nIndex)); + const ::tools::Rectangle aBox1 (GetInnerBoundingBox(rModel, nIndex-1)); + const ::tools::Rectangle aBox2 (GetInnerBoundingBox(rModel, nIndex)); if (bIsVertical) { nLeadingLocation = aBox1.Bottom(); @@ -786,13 +786,13 @@ void Layouter::Implementation::CalculateGeometricPosition ( } } -Rectangle Layouter::Implementation::GetInnerBoundingBox ( +::tools::Rectangle Layouter::Implementation::GetInnerBoundingBox ( model::SlideSorterModel& rModel, const sal_Int32 nIndex) const { model::SharedPageDescriptor pDescriptor (rModel.GetPageDescriptor(nIndex)); if ( ! pDescriptor) - return Rectangle(); + return ::tools::Rectangle(); PageObjectLayouter::Part ePart = PageObjectLayouter::Part::Preview; @@ -818,7 +818,7 @@ Range Layouter::Implementation::GetValidVerticalSizeRange() const mnTopBorder + maMaximalSize.Height() + mnBottomBorder); } -Range Layouter::Implementation::GetRangeOfVisiblePageObjects (const Rectangle& aVisibleArea) const +Range Layouter::Implementation::GetRangeOfVisiblePageObjects (const ::tools::Rectangle& aVisibleArea) const { const sal_Int32 nRow0 (GetRowAtPosition(aVisibleArea.Top(), true, GM_NEXT)); const sal_Int32 nCol0 (GetColumnAtPosition(aVisibleArea.Left(),true, GM_NEXT)); @@ -899,25 +899,25 @@ sal_Int32 Layouter::Implementation::GetIndex ( return -1; } -Rectangle Layouter::Implementation::GetPageObjectBox ( +::tools::Rectangle Layouter::Implementation::GetPageObjectBox ( const sal_Int32 nIndex, const bool bIncludeBorderAndGap) const { const sal_Int32 nRow (nIndex / mnColumnCount); const sal_Int32 nColumn (nIndex % mnColumnCount); - const Rectangle aBoundingBox (GetPageObjectBox(nRow,nColumn)); + const ::tools::Rectangle aBoundingBox (GetPageObjectBox(nRow,nColumn)); if (bIncludeBorderAndGap) return AddBorderAndGap(aBoundingBox, nRow, nColumn); else return aBoundingBox; } -Rectangle Layouter::Implementation::GetPageObjectBox ( +::tools::Rectangle Layouter::Implementation::GetPageObjectBox ( const sal_Int32 nRow, const sal_Int32 nColumn) const { - return Rectangle( + return ::tools::Rectangle( Point (mnLeftBorder + nColumn * maPageObjectSize.Width() + (nColumn>0 ? nColumn : 0) * mnHorizontalGap, @@ -927,12 +927,12 @@ Rectangle Layouter::Implementation::GetPageObjectBox ( maPageObjectSize); } -Rectangle Layouter::Implementation::AddBorderAndGap ( - const Rectangle& rBoundingBox, +::tools::Rectangle Layouter::Implementation::AddBorderAndGap ( + const ::tools::Rectangle& rBoundingBox, const sal_Int32 nRow, const sal_Int32 nColumn) const { - Rectangle aBoundingBox (rBoundingBox); + ::tools::Rectangle aBoundingBox (rBoundingBox); if (nColumn == 0) aBoundingBox.Left() = 0; @@ -953,7 +953,7 @@ Rectangle Layouter::Implementation::AddBorderAndGap ( return aBoundingBox; } -Rectangle Layouter::Implementation::GetTotalBoundingBox() const +::tools::Rectangle Layouter::Implementation::GetTotalBoundingBox() const { sal_Int32 nHorizontalSize = 0; sal_Int32 nVerticalSize = 0; @@ -974,7 +974,7 @@ Rectangle Layouter::Implementation::GetTotalBoundingBox() const nVerticalSize += (nRowCount-1) * mnVerticalGap; } - return Rectangle ( + return ::tools::Rectangle ( Point(0,0), Size (nHorizontalSize, nVerticalSize) ); diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx index 119a8cc44560..49dfc8ec1f36 100644 --- a/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx +++ b/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx @@ -60,8 +60,8 @@ PageObjectLayouter::PageObjectLayouter ( Size(rPageSize.Width(), rPageSize.Height()), aPageNumberAreaSize.Width(), nFocusIndicatorWidth); - maFocusIndicatorBoundingBox = Rectangle(Point(0,0), maPageObjectSize); - maPageObjectBoundingBox = Rectangle( + maFocusIndicatorBoundingBox = ::tools::Rectangle(Point(0,0), maPageObjectSize); + maPageObjectBoundingBox = ::tools::Rectangle( Point( nFocusIndicatorWidth, nFocusIndicatorWidth), @@ -69,7 +69,7 @@ PageObjectLayouter::PageObjectLayouter ( maPageObjectSize.Width()-2*nFocusIndicatorWidth, maPageObjectSize.Height()-2*nFocusIndicatorWidth)); - maPageNumberAreaBoundingBox = Rectangle( + maPageNumberAreaBoundingBox = ::tools::Rectangle( Point( std::max(gnLeftPageNumberOffset, sal_Int32(maPreviewBoundingBox.Left() @@ -79,12 +79,12 @@ PageObjectLayouter::PageObjectLayouter ( aPageNumberAreaSize); const Size aIconSize (maTransitionEffectIcon.GetSizePixel()); - maTransitionEffectBoundingBox = Rectangle( + maTransitionEffectBoundingBox = ::tools::Rectangle( Point( (maPreviewBoundingBox.Left() - 2*aIconSize.Width()) / 2, maPreviewBoundingBox.Bottom() - aIconSize.Height()), aIconSize); - maCustomAnimationEffectBoundingBox = Rectangle( + maCustomAnimationEffectBoundingBox = ::tools::Rectangle( Point( (maPreviewBoundingBox.Left() - 2*aIconSize.Width()) / 2, maPreviewBoundingBox.Bottom() - 2*aIconSize.Height()), @@ -95,7 +95,7 @@ PageObjectLayouter::~PageObjectLayouter() { } -Rectangle PageObjectLayouter::CalculatePreviewBoundingBox ( +::tools::Rectangle PageObjectLayouter::CalculatePreviewBoundingBox ( Size& rPageObjectSize, const Size& rPageSize, const sal_Int32 nPageNumberAreaWidth, @@ -151,14 +151,14 @@ Rectangle PageObjectLayouter::CalculatePreviewBoundingBox ( const int nLeft (rPageObjectSize.Width() - gnOuterBorderWidth - nPreviewWidth - nFocusIndicatorWidth - 1); const int nTop ((rPageObjectSize.Height() - nPreviewHeight)/2); - return Rectangle( + return ::tools::Rectangle( nLeft, nTop, nLeft + nPreviewWidth, nTop + nPreviewHeight); } -Rectangle PageObjectLayouter::GetBoundingBox ( +::tools::Rectangle PageObjectLayouter::GetBoundingBox ( const model::SharedPageDescriptor& rpPageDescriptor, const Part ePart, const CoordinateSystem eCoordinateSystem, @@ -171,12 +171,12 @@ Rectangle PageObjectLayouter::GetBoundingBox ( return GetBoundingBox(aLocation, ePart, eCoordinateSystem); } -Rectangle PageObjectLayouter::GetBoundingBox ( +::tools::Rectangle PageObjectLayouter::GetBoundingBox ( const Point& rPageObjectLocation, const Part ePart, const CoordinateSystem eCoordinateSystem) { - Rectangle aBoundingBox; + ::tools::Rectangle aBoundingBox; switch (ePart) { case Part::FocusIndicator: @@ -208,7 +208,7 @@ Rectangle PageObjectLayouter::GetBoundingBox ( if (eCoordinateSystem == WindowCoordinateSystem) aLocation += mpWindow->GetMapMode().GetOrigin(); - return Rectangle( + return ::tools::Rectangle( aBoundingBox.TopLeft() + aLocation, aBoundingBox.BottomRight() + aLocation); } diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx index ea5fc5bcb2f4..51d361205b36 100644 --- a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx +++ b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx @@ -119,7 +119,7 @@ void PageObjectPainter::PaintBackground ( { rDevice.SetFillColor(pPage->GetPageBackgroundColor(nullptr)); rDevice.SetLineColor(pPage->GetPageBackgroundColor(nullptr)); - const Rectangle aPreviewBox (pPageObjectLayouter->GetBoundingBox( + const ::tools::Rectangle aPreviewBox (pPageObjectLayouter->GetBoundingBox( rpDescriptor, PageObjectLayouter::Part::Preview, PageObjectLayouter::ModelCoordinateSystem)); @@ -132,7 +132,7 @@ void PageObjectPainter::PaintPreview ( OutputDevice& rDevice, const model::SharedPageDescriptor& rpDescriptor) const { - const Rectangle aBox (pPageObjectLayouter->GetBoundingBox( + const ::tools::Rectangle aBox (pPageObjectLayouter->GetBoundingBox( rpDescriptor, PageObjectLayouter::Part::Preview, PageObjectLayouter::ModelCoordinateSystem)); @@ -192,7 +192,7 @@ Bitmap PageObjectPainter::GetPreviewBitmap ( PageObjectLayouter *pPageObjectLayouter = mrLayouter.GetPageObjectLayouter().get(); Bitmap aMarkedPreview (mpCache->GetMarkedPreviewBitmap(pPage)); - const Rectangle aPreviewBox (pPageObjectLayouter->GetBoundingBox( + const ::tools::Rectangle aPreviewBox (pPageObjectLayouter->GetBoundingBox( rpDescriptor, PageObjectLayouter::Part::Preview, PageObjectLayouter::ModelCoordinateSystem)); @@ -218,7 +218,7 @@ void PageObjectPainter::PaintPageNumber ( OutputDevice& rDevice, const model::SharedPageDescriptor& rpDescriptor) const { - const Rectangle aBox (pPageObjectLayouter->GetBoundingBox( + const ::tools::Rectangle aBox (pPageObjectLayouter->GetBoundingBox( rpDescriptor, PageObjectLayouter::Part::PageNumber, PageObjectLayouter::ModelCoordinateSystem)); @@ -274,7 +274,7 @@ void PageObjectPainter::PaintTransitionEffect ( const SdPage* pPage = rpDescriptor->GetPage(); if (pPage!=nullptr && pPage->getTransitionType() > 0) { - const Rectangle aBox (pPageObjectLayouter->GetBoundingBox( + const ::tools::Rectangle aBox (pPageObjectLayouter->GetBoundingBox( rpDescriptor, PageObjectLayouter::Part::TransitionEffectIndicator, PageObjectLayouter::ModelCoordinateSystem)); @@ -296,7 +296,7 @@ void PageObjectPainter::PaintCustomAnimationEffect ( EffectSequence::iterator aEnd = aMainSequence->getEnd(); if ( aIter != aEnd ) { - const Rectangle aBox (pPageObjectLayouter->GetBoundingBox( + const ::tools::Rectangle aBox (pPageObjectLayouter->GetBoundingBox( rpDescriptor, PageObjectLayouter::Part::CustomAnimationEffectIndicator, PageObjectLayouter::ModelCoordinateSystem)); @@ -364,12 +364,12 @@ void PageObjectPainter::PaintBackgroundDetail ( break; } - const Rectangle aFocusSize (pPageObjectLayouter->GetBoundingBox( + const ::tools::Rectangle aFocusSize (pPageObjectLayouter->GetBoundingBox( rpDescriptor, PageObjectLayouter::Part::FocusIndicator, PageObjectLayouter::ModelCoordinateSystem)); - const Rectangle aPageObjectBox (pPageObjectLayouter->GetBoundingBox( + const ::tools::Rectangle aPageObjectBox (pPageObjectLayouter->GetBoundingBox( rpDescriptor, PageObjectLayouter::Part::PageObject, PageObjectLayouter::ModelCoordinateSystem)); @@ -428,18 +428,18 @@ void PageObjectPainter::PaintBackgroundDetail ( // Get bounding box of the preview around which a shadow is painted. // Compensate for the border around the preview. - const Rectangle aBox (pPageObjectLayouter->GetBoundingBox( + const ::tools::Rectangle aBox (pPageObjectLayouter->GetBoundingBox( rpDescriptor, PageObjectLayouter::Part::Preview, PageObjectLayouter::ModelCoordinateSystem)); - Rectangle aFrameBox (aBox.Left()-1,aBox.Top()-1,aBox.Right()+1,aBox.Bottom()+1); + ::tools::Rectangle aFrameBox (aBox.Left()-1,aBox.Top()-1,aBox.Right()+1,aBox.Bottom()+1); mpShadowPainter->PaintFrame(rDevice, aFrameBox); } void PageObjectPainter::PaintBorder ( OutputDevice& rDevice, const Theme::GradientColorType eColorType, - const Rectangle& rBox) const + const ::tools::Rectangle& rBox) const { rDevice.SetFillColor(); const sal_Int32 nBorderWidth (1); diff --git a/sd/source/ui/slidesorter/view/SlsToolTip.cxx b/sd/source/ui/slidesorter/view/SlsToolTip.cxx index cd312e40708d..515520b8371a 100644 --- a/sd/source/ui/slidesorter/view/SlsToolTip.cxx +++ b/sd/source/ui/slidesorter/view/SlsToolTip.cxx @@ -107,7 +107,7 @@ void ToolTip::DoShow() sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); if (!msCurrentHelpText.isEmpty() && pWindow) { - Rectangle aBox ( + ::tools::Rectangle aBox ( mrSlideSorter.GetView().GetLayouter().GetPageObjectLayouter()->GetBoundingBox( mpDescriptor, PageObjectLayouter::Part::Preview, diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx index 09ed83994e95..4a84a52be381 100644 --- a/sd/source/ui/table/TableDesignPane.cxx +++ b/sd/source/ui/table/TableDesignPane.cxx @@ -635,7 +635,7 @@ const Bitmap CreateDesignPreview( const Reference< XIndexAccess >& xTableStyle, if( xCellInfo.get() ) { // fill cell background - const Rectangle aRect( nX, nY, nX + nCellWidth - 1, nY + nCellHeight - 1 ); + const ::tools::Rectangle aRect( nX, nY, nX + nCellWidth - 1, nY + nCellHeight - 1 ); if( xCellInfo->maCellColor.GetColor() != COL_TRANSPARENT ) { diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx index 2ab095e09c29..69878f2ef874 100644 --- a/sd/source/ui/table/tablefunction.cxx +++ b/sd/source/ui/table/tablefunction.cxx @@ -137,7 +137,7 @@ void DrawViewShell::FuTable(SfxRequest& rReq) nRows = pDlg->getRows(); } - Rectangle aRect; + ::tools::Rectangle aRect; SdrObject* pPickObj = mpView->GetEmptyPresentationObject( PRESOBJ_TABLE ); if( pPickObj ) @@ -150,7 +150,7 @@ void DrawViewShell::FuTable(SfxRequest& rReq) Size aSize( 14100, 2000 ); Point aPos; - Rectangle aWinRect(aPos, GetActiveWindow()->GetOutputSizePixel()); + ::tools::Rectangle aWinRect(aPos, GetActiveWindow()->GetOutputSizePixel()); aWinRect = GetActiveWindow()->PixelToLogic(aWinRect); // make sure that the default size of the table fits on the paper and is inside the viewing area. @@ -160,7 +160,7 @@ void DrawViewShell::FuTable(SfxRequest& rReq) if (comphelper::LibreOfficeKit::isActive()) { // aWinRect is nonsensical in the LOK case - aWinRect = Rectangle(aPos, aMaxSize); + aWinRect = ::tools::Rectangle(aPos, aMaxSize); } else { @@ -184,7 +184,7 @@ void DrawViewShell::FuTable(SfxRequest& rReq) aPos = aWinRect.Center(); aPos.X() -= aSize.Width() / 2; aPos.Y() -= aSize.Height() / 2; - aRect = Rectangle(aPos, aSize); + aRect = ::tools::Rectangle(aPos, aSize); } sdr::table::SdrTableObj* pObj = new sdr::table::SdrTableObj( GetDoc(), aRect, nColumns, nRows ); @@ -275,7 +275,7 @@ void CreateTableFromRTF( SvStream& rStream, SdDrawDocument* pModel ) { Size aSize( 200, 200 ); Point aPos; - Rectangle aRect (aPos, aSize); + ::tools::Rectangle aRect (aPos, aSize); sdr::table::SdrTableObj* pObj = new sdr::table::SdrTableObj( pModel, aRect, 1, 1 ); pObj->NbcSetStyleSheet( pModel->GetDefaultStyleSheet(), true ); OUString sTableStyle; diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx index f174577eef6c..d8096c27e53c 100644 --- a/sd/source/ui/tools/PreviewRenderer.cxx +++ b/sd/source/ui/tools/PreviewRenderer.cxx @@ -170,7 +170,7 @@ Image PreviewRenderer::RenderSubstitution ( mpPreviewDevice->SetMapMode (aMapMode); // Clear the background. - const Rectangle aPaintRectangle ( + const ::tools::Rectangle aPaintRectangle ( Point(0,0), mpPreviewDevice->GetOutputSizePixel()); mpPreviewDevice->EnableMapMode(false); @@ -277,7 +277,7 @@ void PreviewRenderer::PaintPage ( const bool bDisplayPresentationObjects) { // Paint the page. - Rectangle aPaintRectangle (Point(0,0), pPage->GetSize()); + ::tools::Rectangle aPaintRectangle (Point(0,0), pPage->GetSize()); vcl::Region aRegion (aPaintRectangle); // Turn off online spelling and redlining. @@ -321,7 +321,7 @@ void PreviewRenderer::PaintSubstitutionText (const OUString& rSubstitutionText) mpPreviewDevice->SetFont (aFont); // Paint the substitution text. - Rectangle aTextBox ( + ::tools::Rectangle aTextBox ( Point(0,0), mpPreviewDevice->PixelToLogic( mpPreviewDevice->GetOutputSizePixel())); @@ -342,7 +342,7 @@ void PreviewRenderer::PaintFrame() if (mbHasFrame) { // Paint a frame around the preview. - Rectangle aPaintRectangle ( + ::tools::Rectangle aPaintRectangle ( Point(0,0), mpPreviewDevice->GetOutputSizePixel()); mpPreviewDevice->EnableMapMode(false); @@ -454,7 +454,7 @@ Image PreviewRenderer::ScaleBitmap ( // Paint a frame around the preview. mpPreviewDevice->SetLineColor (maFrameColor); mpPreviewDevice->SetFillColor (); - mpPreviewDevice->DrawRect (Rectangle(Point(0,0), aFrameSize)); + mpPreviewDevice->DrawRect (::tools::Rectangle(Point(0,0), aFrameSize)); // Paint the bitmap scaled to the desired width. BitmapEx aScaledBitmap (rBitmapEx.GetBitmap()); diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx index db1cd7d559b3..451b239b24b9 100644 --- a/sd/source/ui/unoidl/DrawController.cxx +++ b/sd/source/ui/unoidl/DrawController.cxx @@ -91,7 +91,7 @@ void DrawController::SetSubController ( // Update the internal state. mxSubController = rxSubController; mpPropertyArrayHelper.reset(); - maLastVisArea = Rectangle(); + maLastVisArea = ::tools::Rectangle(); // Inform listeners about the changed state. FireSelectionChangeListener(); @@ -328,7 +328,7 @@ Reference< drawing::XDrawPage > SAL_CALL DrawController::getCurrentPage() return xPage; } -void DrawController::FireVisAreaChanged (const Rectangle& rVisArea) throw() +void DrawController::FireVisAreaChanged (const ::tools::Rectangle& rVisArea) throw() { if( maLastVisArea != rVisArea ) { diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index ba51319c0108..d68425076e89 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -1254,7 +1254,7 @@ void SAL_CALL SdXImpressDocument::setPropertyValue( const OUString& aPropertyNam if( !(aValue >>= aVisArea) || (aVisArea.Width < 0) || (aVisArea.Height < 0) ) throw lang::IllegalArgumentException(); - pEmbeddedObj->SetVisArea( Rectangle( aVisArea.X, aVisArea.Y, aVisArea.X + aVisArea.Width, aVisArea.Y + aVisArea.Height ) ); + pEmbeddedObj->SetVisArea( ::tools::Rectangle( aVisArea.X, aVisArea.Y, aVisArea.X + aVisArea.Width, aVisArea.Y + aVisArea.Height ) ); } break; case WID_MODEL_CONTFOCUS: @@ -1319,7 +1319,7 @@ uno::Any SAL_CALL SdXImpressDocument::getPropertyValue( const OUString& Property if( !pEmbeddedObj ) break; - const Rectangle& aRect = pEmbeddedObj->GetVisArea(); + const ::tools::Rectangle& aRect = pEmbeddedObj->GetVisArea(); awt::Rectangle aVisArea( aRect.Left(), aRect.Top(), aRect.getWidth(), aRect.getHeight() ); aAny <<= aVisArea; } @@ -1508,7 +1508,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SdXImpressDocument::getRenderer( } else { - const Rectangle aVisArea( mpDocShell->GetVisArea( embed::Aspects::MSOLE_DOCPRINT ) ); + const ::tools::Rectangle aVisArea( mpDocShell->GetVisArea( embed::Aspects::MSOLE_DOCPRINT ) ); aPageSize = awt::Size( aVisArea.GetWidth(), aVisArea.GetHeight() ); } aRenderer.realloc( 1 ); @@ -1600,7 +1600,7 @@ void ImplPDFExportComments( const uno::Reference< drawing::XDrawPage >& xPage, v sTitle += aStr; aNote.Title = sTitle; aNote.Contents = xText->getString(); - rPDFExtOutDevData.CreateNote( Rectangle( Point( static_cast< long >( aRealPoint2D.X * 100 ), + rPDFExtOutDevData.CreateNote( ::tools::Rectangle( Point( static_cast< long >( aRealPoint2D.X * 100 ), static_cast< long >( aRealPoint2D.Y * 100 ) ), Size( 1000, 1000 ) ), aNote ); } } @@ -1632,11 +1632,11 @@ void ImplPDFExportShapeInteraction( const uno::Reference< drawing::XShape >& xSh { Size aPageSize( rDoc.GetSdPage( 0, PageKind::Standard )->GetSize() ); Point aPoint( 0, 0 ); - Rectangle aPageRect( aPoint, aPageSize ); + ::tools::Rectangle aPageRect( aPoint, aPageSize ); awt::Point aShapePos( xShape->getPosition() ); awt::Size aShapeSize( xShape->getSize() ); - Rectangle aLinkRect( Point( aShapePos.X, aShapePos.Y ), Size( aShapeSize.Width, aShapeSize.Height ) ); + ::tools::Rectangle aLinkRect( Point( aShapePos.X, aShapePos.Y ), Size( aShapeSize.Width, aShapeSize.Height ) ); // Handle linked videos. if (xShape->getShapeType() == "com.sun.star.drawing.MediaShape" || xShape->getShapeType() == "com.sun.star.presentation.MediaShape") @@ -1906,7 +1906,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r (pPDFExtOutDevData && pPDFExtOutDevData->GetIsExportHiddenSlides()) ) { std::unique_ptr<::sd::ClientView> pView( new ::sd::ClientView( mpDocShell, pOut ) ); - Rectangle aVisArea = Rectangle( Point(), mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1, ePageKind )->GetSize() ); + ::tools::Rectangle aVisArea = ::tools::Rectangle( Point(), mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1, ePageKind )->GetSize() ); vcl::Region aRegion( aVisArea ); ::sd::ViewShell* pOldViewSh = mpDocShell->GetViewShell(); @@ -2123,7 +2123,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r Size aPageSize( mpDoc->GetSdPage( 0, PageKind::Standard )->GetSize() ); Point aPoint( 0, 0 ); - Rectangle aPageRect( aPoint, aPageSize ); + ::tools::Rectangle aPageRect( aPoint, aPageSize ); // resolving links found in this page by the method ImpEditEngine::Paint std::vector< vcl::PDFExtOutDevBookmarkEntry >& rBookmarks = pPDFExtOutDevData->GetBookmarks(); @@ -2274,7 +2274,7 @@ void SdXImpressDocument::paintTile( VirtualDevice& rDevice, Point aPoint(nTilePosX, nTilePosY); Size aSize(nTileWidth, nTileHeight); - Rectangle aRect(aPoint, aSize); + ::tools::Rectangle aRect(aPoint, aSize); pViewSh->GetView()->CompleteRedraw(&rDevice, vcl::Region(aRect)); } diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 785c771c27af..3fd76478467a 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -509,7 +509,7 @@ SdrObject * SdGenericDrawPage::CreateSdrObject_( const Reference< drawing::XShap eObjKind = PRESOBJ_MEDIA; } - Rectangle aRect( eObjKind == PRESOBJ_TITLE ? GetPage()->GetTitleRect() : GetPage()->GetLayoutRect() ); + ::tools::Rectangle aRect( eObjKind == PRESOBJ_TITLE ? GetPage()->GetTitleRect() : GetPage()->GetLayoutRect() ); const awt::Point aPos( aRect.Left(), aRect.Top() ); xShape->setPosition( aPos ); @@ -1125,7 +1125,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName ) Point aPoint; Size aSize( GetPage()->GetSize() ); xMetaFile->AddAction( static_cast<MetaAction*>(new MetaFillColorAction( COL_WHITE, true )), 0 ); - xMetaFile->AddAction( static_cast<MetaAction*>(new MetaRectAction( Rectangle( aPoint, aSize ) )), 1 ); + xMetaFile->AddAction( static_cast<MetaAction*>(new MetaRectAction( ::tools::Rectangle( aPoint, aSize ) )), 1 ); xMetaFile->SetPrefMapMode( MapUnit::Map100thMM ); xMetaFile->SetPrefSize( aSize ); diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index 0eba71c93f37..17d9fa3bdbbf 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -308,7 +308,7 @@ namespace { pView->DrawMarkedObj(rPrinter); else rPrintView.CompleteRedraw(&rPrinter, - vcl::Region(Rectangle(Point(0,0), rPage.GetSize()))); + vcl::Region(::tools::Rectangle(Point(0,0), rPage.GetSize()))); rPrinter.SetMapMode(aOriginalMapMode); @@ -1106,7 +1106,7 @@ namespace { rPrinter.SetMapMode(maMap); // Get and set up the outliner. - const Rectangle aOutRect (rPrinter.GetPageOffset(), rPrinter.GetOutputSize()); + const ::tools::Rectangle aOutRect (rPrinter.GetPageOffset(), rPrinter.GetOutputSize()); Outliner* pOutliner = rDocument.GetInternalOutliner(); const OutlinerMode nSavedOutlMode (pOutliner->GetMode()); const bool bSavedUpdateMode (pOutliner->GetUpdateMode()); @@ -1535,17 +1535,17 @@ private: const bool bDrawLines (eLayout == AUTOLAYOUT_HANDOUT3); - std::vector< Rectangle > aAreas; + std::vector< ::tools::Rectangle > aAreas; SdPage::CalculateHandoutAreas( rModel, eLayout, bHandoutHorizontal, aAreas ); - std::vector< Rectangle >::iterator iter( aAreas.begin() ); + std::vector< ::tools::Rectangle >::iterator iter( aAreas.begin() ); while( iter != aAreas.end() ) { pHandout->NbcInsertObject( new SdrPageObj((*iter++)) ); if( bDrawLines && (iter != aAreas.end()) ) { - Rectangle aRect( (*iter++) ); + ::tools::Rectangle aRect( (*iter++) ); basegfx::B2DPolygon aPoly; aPoly.insert(0, basegfx::B2DPoint( aRect.Left(), aRect.Top() ) ); @@ -1606,7 +1606,7 @@ private: aMap.SetScaleY(Fraction(1,2)); mpPrinter->SetMapMode(aMap); - Rectangle aOutRect(aPageOfs, rInfo.mpPrinter->GetOutputSize()); + ::tools::Rectangle aOutRect(aPageOfs, rInfo.mpPrinter->GetOutputSize()); if( aOutRect.GetWidth() > aOutRect.GetHeight() ) { Size aPaperSize( rInfo.mpPrinter->PixelToLogic( rInfo.mpPrinter->GetPaperSizePixel(), MapMode( MapUnit::Map100thMM ) ) ); @@ -1614,7 +1614,7 @@ private: maPrintSize.Height = aPaperSize.Width(); const long nRotatedWidth = aOutRect.GetHeight(); const long nRotatedHeight = aOutRect.GetWidth(); - aOutRect = Rectangle( Point( aPageOfs.Y(), aPageOfs.X() ), + aOutRect = ::tools::Rectangle( Point( aPageOfs.Y(), aPageOfs.X() ), Size( nRotatedWidth, nRotatedHeight ) ); } diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 9b4fe138301c..cd38117db3da 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -800,11 +800,11 @@ bool SdOutliner::SearchAndReplaceOnce(std::vector<sd::SearchSelection>* pSelecti if (pViewShell && comphelper::LibreOfficeKit::isActive() && mbStringFound) { - std::vector<Rectangle> aLogicRects; + std::vector<::tools::Rectangle> aLogicRects; pOutlinerView->GetSelectionRectangles(aLogicRects); std::vector<OString> aLogicRectStrings; - std::transform(aLogicRects.begin(), aLogicRects.end(), std::back_inserter(aLogicRectStrings), [](const Rectangle& rRectangle) { return rRectangle.toString(); }); + std::transform(aLogicRects.begin(), aLogicRects.end(), std::back_inserter(aLogicRectStrings), [](const ::tools::Rectangle& rRectangle) { return rRectangle.toString(); }); OString sRectangles = comphelper::string::join("; ", aLogicRectStrings); if (!pSelections) @@ -869,7 +869,7 @@ void SdOutliner::DetectChange() SetUpdateMode(false); OutlinerView* pOutlinerView = mpImpl->GetOutlinerView(); if (pOutlinerView != nullptr) - pOutlinerView->SetOutputArea( Rectangle( Point(), Size(1, 1) ) ); + pOutlinerView->SetOutputArea( ::tools::Rectangle( Point(), Size(1, 1) ) ); if (meMode == SPELL) SetPaperSize( Size(1, 1) ); SetText(OUString(), GetParagraph(0)); @@ -1061,7 +1061,7 @@ void SdOutliner::ProvideNextTextObject() SetUpdateMode(false); OutlinerView* pOutlinerView = mpImpl->GetOutlinerView(); if (pOutlinerView != nullptr) - pOutlinerView->SetOutputArea( Rectangle( Point(), Size(1, 1) ) ); + pOutlinerView->SetOutputArea( ::tools::Rectangle( Point(), Size(1, 1) ) ); if (meMode == SPELL) SetPaperSize( Size(1, 1) ); SetText(OUString(), GetParagraph(0)); @@ -1408,7 +1408,7 @@ void SdOutliner::EnterEditMode (bool bGrabFocus) OutlinerView* pOutlinerView = mpImpl->GetOutlinerView(); if (pOutlinerView && mpTextObj) { - pOutlinerView->SetOutputArea( Rectangle( Point(), Size(1, 1))); + pOutlinerView->SetOutputArea( ::tools::Rectangle( Point(), Size(1, 1))); SetPaperSize( mpTextObj->GetLogicRect().GetSize() ); SdrPageView* pPV = mpView->GetSdrPageView(); @@ -1785,7 +1785,7 @@ void SdOutliner::Implementation::ProvideOutlinerView ( rOutliner.InsertView( mpOutlineView ); rOutliner.SetUpdateMode(false); - mpOutlineView->SetOutputArea (Rectangle (Point(), Size(1, 1))); + mpOutlineView->SetOutputArea (::tools::Rectangle (Point(), Size(1, 1))); rOutliner.SetPaperSize( Size(1, 1) ); rOutliner.SetText(OUString(), rOutliner.GetParagraph(0)); diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index c1f7efcdad24..a2263c38c9e6 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -138,7 +138,7 @@ public: ::rtl::Reference<ViewTabBar> mpViewTabBar; // contains the complete area of the current view relative to the frame window - Rectangle maClientArea; + ::tools::Rectangle maClientArea; // This is set to true when PrepareClose() is called. bool mbIsClosing; @@ -931,7 +931,7 @@ std::shared_ptr<tools::EventMultiplexer> ViewShellBase::GetEventMultiplexer() return mpImpl->mpEventMultiplexer; } -const Rectangle& ViewShellBase::getClientRectangle() const +const ::tools::Rectangle& ViewShellBase::getClientRectangle() const { return mpImpl->maClientArea; } @@ -1020,7 +1020,7 @@ void ViewShellBase::NotifyCursor(SfxViewShell* pOtherShell) const // Shape text lock. if (OutlinerView* pOutlinerView = pDrawView->GetTextEditOutlinerView()) { - Rectangle aRectangle = pOutlinerView->GetOutputArea(); + ::tools::Rectangle aRectangle = pOutlinerView->GetOutputArea(); vcl::Window* pWin = pThisShell->GetActiveWindow(); if (pWin && pWin->GetMapMode().GetMapUnit() == MapUnit::Map100thMM) aRectangle = OutputDevice::LogicToLogic(aRectangle, MapUnit::Map100thMM, MapUnit::MapTwip); @@ -1157,7 +1157,7 @@ void ViewShellBase::Implementation::ResizePixel ( rSize.Height() - aBaseBorder.Top() - aBaseBorder.Bottom()); mpViewWindow->SetPosSizePixel(aViewWindowPosition, aViewWindowSize); - maClientArea = Rectangle(Point(0,0), aViewWindowSize); + maClientArea = ::tools::Rectangle(Point(0,0), aViewWindowSize); } void ViewShellBase::Implementation::SetPaneVisibility ( diff --git a/sd/source/ui/view/ViewTabBar.cxx b/sd/source/ui/view/ViewTabBar.cxx index 30aa66ddfff9..e09f36fc0a64 100644 --- a/sd/source/ui/view/ViewTabBar.cxx +++ b/sd/source/ui/view/ViewTabBar.cxx @@ -65,7 +65,7 @@ class TabBarControl : public ::TabControl { public: TabBarControl (vcl::Window* pParentWindow, const ::rtl::Reference<ViewTabBar>& rpViewTabBar); - virtual void Paint (vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint (vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) override; virtual void ActivatePage() override; private: ::rtl::Reference<ViewTabBar> mpViewTabBar; @@ -550,7 +550,7 @@ TabBarControl::TabBarControl ( { } -void TabBarControl::Paint (vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void TabBarControl::Paint (vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) { Color aOriginalFillColor(rRenderContext.GetFillColor()); Color aOriginalLineColor(rRenderContext.GetLineColor()); diff --git a/sd/source/ui/view/clview.cxx b/sd/source/ui/view/clview.cxx index 986481ad860c..c92c3a16a55f 100644 --- a/sd/source/ui/view/clview.cxx +++ b/sd/source/ui/view/clview.cxx @@ -59,7 +59,7 @@ void ClientView::InvalidateOneWin(vcl::Window& rWin) * to be overridden and properly handled. */ -void ClientView::InvalidateOneWin(vcl::Window& rWin, const Rectangle& rRect) +void ClientView::InvalidateOneWin(vcl::Window& rWin, const ::tools::Rectangle& rRect) { CompleteRedraw(&rWin, vcl::Region(rRect)); } diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx index 355b0a3f1abf..fd74fd14a497 100644 --- a/sd/source/ui/view/drawview.cxx +++ b/sd/source/ui/view/drawview.cxx @@ -489,7 +489,7 @@ void DrawView::CompleteRedraw(OutputDevice* pOutDev, const vcl::Region& rReg, sd * Make passed region visible (scrolling if necessary) */ -void DrawView::MakeVisible(const Rectangle& rRect, vcl::Window& rWin) +void DrawView::MakeVisible(const ::tools::Rectangle& rRect, vcl::Window& rWin) { if (!rRect.IsEmpty() && mpDrawViewShell) { @@ -558,7 +558,7 @@ void DrawView::DeleteMarked() } SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( pObj ); bool bVertical = pTextObj && pTextObj->IsVerticalWriting(); - Rectangle aRect( pObj->GetLogicRect() ); + ::tools::Rectangle aRect( pObj->GetLogicRect() ); SdrObject* pNewObj = pPage->InsertAutoLayoutShape( nullptr, ePresObjKind, bVertical, aRect, true ); // pUndoManager should not be NULL (see assert above) diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index 830953a22dcc..1331c26b394d 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -287,7 +287,7 @@ void DrawViewShell::SetZoom( long nZoom ) * Set zoom rectangle for active window */ -void DrawViewShell::SetZoomRect( const Rectangle& rZoomRect ) +void DrawViewShell::SetZoomRect( const ::tools::Rectangle& rZoomRect ) { ViewShell::SetZoomRect( rZoomRect ); GetViewFrame()->GetBindings().Invalidate( SID_ATTR_ZOOM ); @@ -932,7 +932,7 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage) // !!! only if we are not in presentation mode (#96279) !!! OSL_ASSERT (GetViewShell()!=nullptr); GetViewShell()->DisconnectAllClients(); - VisAreaChanged(Rectangle(Point(), Size(1, 1))); + VisAreaChanged(::tools::Rectangle(Point(), Size(1, 1))); } if (meEditMode == EditMode::Page) @@ -1090,7 +1090,7 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage) } Size aVisSizePixel = GetActiveWindow()->GetOutputSizePixel(); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), aVisSizePixel) ); + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), aVisSizePixel) ); VisAreaChanged(aVisAreaWin); mpDrawView->VisAreaChanged(GetActiveWindow()); diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 292067501d6b..fa8024e0a8c9 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -738,7 +738,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) OSL_ENSURE(pPageView, "DrawViewShell::FuTemporary: SID_CONVERT_TO_BITMAP without SdrPageView (!)"); // fit rectangle of new graphic object to selection's mark rect - Rectangle aAllMarkedRect; + ::tools::Rectangle aAllMarkedRect; rMarkList.TakeBoundRect(pPageView, aAllMarkedRect); pGraphicObj->SetLogicRect(aAllMarkedRect); @@ -1940,13 +1940,13 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) pOutl->SetUpdateMode( false ); Point aPos; - Rectangle aRect( aPos, GetActiveWindow()->GetOutputSizePixel() ); + ::tools::Rectangle aRect( aPos, GetActiveWindow()->GetOutputSizePixel() ); aPos = aRect.Center(); aPos = GetActiveWindow()->PixelToLogic(aPos); aPos.X() -= aSize.Width() / 2; aPos.Y() -= aSize.Height() / 2; - Rectangle aLogicRect(aPos, aSize); + ::tools::Rectangle aLogicRect(aPos, aSize); pRectObj->SetLogicRect(aLogicRect); pRectObj->SetOutlinerParaObject( pOutlParaObject ); mpDrawView->InsertObjectAtView(pRectObj, *mpDrawView->GetSdrPageView()); diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index 3a56d0d0d4fa..4aff2371708d 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -334,7 +334,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) { const SfxRectangleItem& rRect = static_cast<const SfxRectangleItem&>(rReq.GetArgs()->Get(SID_OBJECTRESIZE)); - Rectangle aRect( GetActiveWindow()->PixelToLogic( rRect.GetValue() ) ); + ::tools::Rectangle aRect( GetActiveWindow()->PixelToLogic( rRect.GetValue() ) ); if ( mpDrawView->AreObjectsMarked() ) { @@ -503,7 +503,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq) if( mpDrawView->IsTextEdit() ) { - Rectangle aRect = maMarkRect; + ::tools::Rectangle aRect = maMarkRect; aRect.SetPos(aRect.TopLeft() + aPagePos); aRect.Left() = rLRSpace.GetLeft(); aRect.Right() = aViewSize.Width() - rLRSpace.GetRight(); @@ -568,7 +568,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq) if( mpDrawView->IsTextEdit() ) { - Rectangle aRect = maMarkRect; + ::tools::Rectangle aRect = maMarkRect; aRect.SetPos(aRect.TopLeft() + aPagePos); aRect.Top() = rULSpace.GetUpper(); aRect.Bottom() = aViewSize.Height() - rULSpace.GetLower(); @@ -626,7 +626,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq) case SID_RULER_OBJECT: if (pArgs) { - Rectangle aRect = maMarkRect; + ::tools::Rectangle aRect = maMarkRect; aRect.SetPos(aRect.TopLeft() + aPagePos); const SvxObjectItem& rOI = static_cast<const SvxObjectItem&>( @@ -861,13 +861,13 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet) const Point aPagePos( GetActiveWindow()->GetViewOrigin() ); Size aPageSize = mpActualPage->GetSize(); - Rectangle aRect(aPagePos, Point( aViewSize.Width() - (aPagePos.X() + aPageSize.Width()), + ::tools::Rectangle aRect(aPagePos, Point( aViewSize.Width() - (aPagePos.X() + aPageSize.Width()), aViewSize.Height() - (aPagePos.Y() + aPageSize.Height()))); if( mpDrawView->IsTextEdit() ) { Point aPnt1 = GetActiveWindow()->GetWinViewPos(); - Rectangle aMinMaxRect = Rectangle( aPnt1, Size(ULONG_MAX, ULONG_MAX) ); + ::tools::Rectangle aMinMaxRect = ::tools::Rectangle( aPnt1, Size(ULONG_MAX, ULONG_MAX) ); rSet.Put( SfxRectangleItem(SID_RULER_LR_MIN_MAX, aMinMaxRect) ); } else @@ -974,7 +974,7 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet) if( mpDrawView->IsResizeAllowed(true) ) { - Rectangle aResizeRect( maMarkRect ); + ::tools::Rectangle aResizeRect( maMarkRect ); aResizeRect.SetPos(aResizeRect.TopLeft() + aPagePos); SvxObjectItem aObjItem(aResizeRect.Left(), aResizeRect.Right(), diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx index 3ce20cdb5796..fc5d537e2796 100644 --- a/sd/source/ui/view/drviews4.cxx +++ b/sd/source/ui/view/drviews4.cxx @@ -304,7 +304,7 @@ void DrawViewShell::MouseMove(const MouseEvent& rMEvt, ::sd::Window* pWin) { if ( mpDrawView->IsAction() ) { - Rectangle aOutputArea(Point(0,0), GetActiveWindow()->GetOutputSizePixel()); + ::tools::Rectangle aOutputArea(Point(0,0), GetActiveWindow()->GetOutputSizePixel()); if ( !aOutputArea.IsInside(rMEvt.GetPosPixel()) ) { @@ -312,7 +312,7 @@ void DrawViewShell::MouseMove(const MouseEvent& rMEvt, ::sd::Window* pWin) if (mpContentWindow.get() != nullptr) { - aOutputArea = Rectangle(Point(0,0), + aOutputArea = ::tools::Rectangle(Point(0,0), mpContentWindow->GetOutputSizePixel()); Point aPos = mpContentWindow->GetPointerPosPixel(); @@ -350,7 +350,7 @@ void DrawViewShell::MouseMove(const MouseEvent& rMEvt, ::sd::Window* pWin) if( !mbMousePosFreezed ) maMousePos = rMEvt.GetPosPixel(); - Rectangle aRect; + ::tools::Rectangle aRect; if ( mbIsRulerDrag ) { @@ -365,7 +365,7 @@ void DrawViewShell::MouseMove(const MouseEvent& rMEvt, ::sd::Window* pWin) } else { - aRect = Rectangle(maMousePos, maMousePos); + aRect = ::tools::Rectangle(maMousePos, maMousePos); } ShowMousePosInfo(aRect, pWin); @@ -415,7 +415,7 @@ void DrawViewShell::MouseButtonUp(const MouseEvent& rMEvt, ::sd::Window* pWin) if (mbIsRulerDrag) { - Rectangle aOutputArea(Point(0,0), GetActiveWindow()->GetOutputSizePixel()); + ::tools::Rectangle aOutputArea(Point(0,0), GetActiveWindow()->GetOutputSizePixel()); if (aOutputArea.IsInside(rMEvt.GetPosPixel())) { @@ -752,7 +752,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin) //middle of the bounding rect if something is marked if( mpDrawView->AreObjectsMarked() && mpDrawView->GetMarkedObjectList().GetMarkCount() >= 1 ) { - Rectangle aMarkRect; + ::tools::Rectangle aMarkRect; mpDrawView->GetMarkedObjectList().TakeBoundRect(nullptr,aMarkRect); aMenuPos = GetActiveWindow()->LogicToPixel( aMarkRect.Center() ); @@ -780,7 +780,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin) } } -void DrawViewShell::ShowMousePosInfo(const Rectangle& rRect, +void DrawViewShell::ShowMousePosInfo(const ::tools::Rectangle& rRect, ::sd::Window* pWin) { if (mbHasRulers && pWin ) @@ -896,7 +896,7 @@ void DrawViewShell::ShowSnapLineContextMenu ( const sal_uInt16 nResult = pMenu->Execute( GetActiveWindow(), - Rectangle(rMouseLocation, Size(10,10)), + ::tools::Rectangle(rMouseLocation, Size(10,10)), PopupMenuFlags::ExecuteDown); switch (nResult) { diff --git a/sd/source/ui/view/drviews5.cxx b/sd/source/ui/view/drviews5.cxx index 372de4953ada..bf487fba1762 100644 --- a/sd/source/ui/view/drviews5.cxx +++ b/sd/source/ui/view/drviews5.cxx @@ -347,7 +347,7 @@ void DrawViewShell::WriteFrameViewData() mpFrameView->SetDesignMode( mpDrawView->IsDesignMode() ); Size aVisSizePixel = GetActiveWindow()->GetOutputSizePixel(); - Rectangle aVisArea = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), aVisSizePixel) ); + ::tools::Rectangle aVisArea = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), aVisSizePixel) ); mpFrameView->SetVisArea(aVisArea); if( mePageKind == PageKind::Handout ) @@ -406,7 +406,7 @@ void DrawViewShell::PrePaint() * * Remark: pWin==NULL, if Paint() is called from ShowWindow! */ -void DrawViewShell::Paint(const Rectangle& rRect, ::sd::Window* pWin) +void DrawViewShell::Paint(const ::tools::Rectangle& rRect, ::sd::Window* pWin) { /* This is done before each text edit, so why not do it before every paint. The default language is only used if the outliner only contains one @@ -501,7 +501,7 @@ void DrawViewShell::ReadUserDataSequence ( const css::uno::Sequence < css::beans if( !mbZoomOnPage ) { - const Rectangle aVisArea( mpFrameView->GetVisArea() ); + const ::tools::Rectangle aVisArea( mpFrameView->GetVisArea() ); if ( GetDocSh()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED ) { @@ -523,7 +523,7 @@ void DrawViewShell::ReadUserDataSequence ( const css::uno::Sequence < css::beans ResetActualLayer(); } -void DrawViewShell::VisAreaChanged(const Rectangle& rRect) +void DrawViewShell::VisAreaChanged(const ::tools::Rectangle& rRect) { ViewShell::VisAreaChanged( rRect ); diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index 0e540b7bd7b0..82209d72ca4a 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -1326,7 +1326,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) const SdrGrafObj* pSdrGrafObj = static_cast< const SdrGrafObj* >(pObj); // Current size of the OBJ_GRAF - const Rectangle aRect = pObj->GetLogicRect(); + const ::tools::Rectangle aRect = pObj->GetLogicRect(); const Size aCurrentSizeofObj = aRect.GetSize(); // Original size of the OBJ_GRAF diff --git a/sd/source/ui/view/drviews8.cxx b/sd/source/ui/view/drviews8.cxx index f1c07f6102ed..8c23c9656f3a 100644 --- a/sd/source/ui/view/drviews8.cxx +++ b/sd/source/ui/view/drviews8.cxx @@ -97,7 +97,7 @@ void DrawViewShell::ScannerEvent( const css::lang::EventObject& ) Point aPnt ( ( aPageSize.Width() - aBmpSize.Width() ) >> 1, ( aPageSize.Height() - aBmpSize.Height() ) >> 1 ); aPnt += Point( pPage->GetLftBorder(), pPage->GetUppBorder() ); - Rectangle aRect( aPnt, aBmpSize ); + ::tools::Rectangle aRect( aPnt, aBmpSize ); SdrGrafObj* pGrafObj = nullptr; bool bInsertNewObject = true; diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx index 438560f70342..1bf00f00e603 100644 --- a/sd/source/ui/view/drviews9.cxx +++ b/sd/source/ui/view/drviews9.cxx @@ -126,7 +126,7 @@ void DrawViewShell::ExecGallery(SfxRequest& rReq) Point aPnt ((aPageSize.Width() - aSize.Width()) / 2, (aPageSize.Height() - aSize.Height()) / 2); aPnt += Point(pPage->GetLftBorder(), pPage->GetUppBorder()); - Rectangle aRect (aPnt, aSize); + ::tools::Rectangle aRect (aPnt, aSize); SdrGrafObj* pGrafObj = nullptr; diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index 2f1968695614..24269c22ef43 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -249,7 +249,7 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind) aVisAreaPos = pDocSh->GetVisArea(ASPECT_CONTENT).TopLeft(); } - mpDrawView->SetWorkArea(Rectangle(Point() - aVisAreaPos - aPageOrg, aSize)); + mpDrawView->SetWorkArea(::tools::Rectangle(Point() - aVisAreaPos - aPageOrg, aSize)); // objects can not grow bigger than ViewSize GetDoc()->SetMaxObjSize(aSize); @@ -433,7 +433,7 @@ void DrawViewShell::SetupPage (Size &rSize, { if( bSize ) { - Rectangle aBorderRect(nLeft, nUpper, nRight, nLower); + ::tools::Rectangle aBorderRect(nLeft, nUpper, nRight, nLower); pPage->ScaleObjects(rSize, aBorderRect, bScaleAll); pPage->SetSize(rSize); @@ -466,7 +466,7 @@ void DrawViewShell::SetupPage (Size &rSize, { if( bSize ) { - Rectangle aBorderRect(nLeft, nUpper, nRight, nLower); + ::tools::Rectangle aBorderRect(nLeft, nUpper, nRight, nLower); pPage->ScaleObjects(rSize, aBorderRect, bScaleAll); pPage->SetSize(rSize); } @@ -509,7 +509,7 @@ void DrawViewShell::SetupPage (Size &rSize, aVisAreaPos = GetDocSh()->GetVisArea(ASPECT_CONTENT).TopLeft(); } - GetView()->SetWorkArea(Rectangle(Point() - aVisAreaPos - aPageOrg, aSize)); + GetView()->SetWorkArea(::tools::Rectangle(Point() - aVisAreaPos - aPageOrg, aSize)); UpdateScrollBars(); @@ -585,7 +585,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) aPagePos.X() -= aPageSize.Width() / 2; - Rectangle aFullPageZoomRect( aPagePos, aPageSize ); + ::tools::Rectangle aFullPageZoomRect( aPagePos, aPageSize ); aZoomItem.AddSnappingPoint( pActiveWindow->GetZoomForRect( aFullPageZoomRect ) ); } aZoomItem.AddSnappingPoint(100); @@ -605,7 +605,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) // position- and size items if ( mpDrawView->IsAction() ) { - Rectangle aRect; + ::tools::Rectangle aRect; mpDrawView->TakeActionRect( aRect ); if ( aRect.IsEmpty() ) @@ -627,7 +627,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) { if ( mpDrawView->AreObjectsMarked() ) { - Rectangle aRect = mpDrawView->GetAllMarkedRect(); + ::tools::Rectangle aRect = mpDrawView->GetAllMarkedRect(); pPageView->LogicToPagePos(aRect); // Show the position of the selected shape(s) diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 8885953bf0e4..0c9eb63b06a7 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -276,12 +276,12 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq) if(pNewDBField) { - Rectangle aVisArea = GetActiveWindow()->PixelToLogic(Rectangle(Point(0,0), GetActiveWindow()->GetOutputSizePixel())); + ::tools::Rectangle aVisArea = GetActiveWindow()->PixelToLogic(::tools::Rectangle(Point(0,0), GetActiveWindow()->GetOutputSizePixel())); Point aObjPos(aVisArea.Center()); Size aObjSize(pNewDBField->GetLogicRect().GetSize()); aObjPos.X() -= aObjSize.Width() / 2; aObjPos.Y() -= aObjSize.Height() / 2; - Rectangle aNewObjectRectangle(aObjPos, aObjSize); + ::tools::Rectangle aNewObjectRectangle(aObjPos, aObjSize); pNewDBField->SetLogicRect(aNewObjectRectangle); @@ -589,11 +589,11 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq) sal_uInt32 nDefaultObjectSizeHeight(pOptions->GetDefaultObjectSizeHeight()); // calc position and size - Rectangle aVisArea = GetActiveWindow()->PixelToLogic(Rectangle(Point(0,0), GetActiveWindow()->GetOutputSizePixel())); + ::tools::Rectangle aVisArea = GetActiveWindow()->PixelToLogic(::tools::Rectangle(Point(0,0), GetActiveWindow()->GetOutputSizePixel())); Point aPagePos = aVisArea.Center(); aPagePos.X() -= nDefaultObjectSizeWidth / 2; aPagePos.Y() -= nDefaultObjectSizeHeight / 2; - Rectangle aNewObjectRectangle(aPagePos, Size(nDefaultObjectSizeWidth, nDefaultObjectSizeHeight)); + ::tools::Rectangle aNewObjectRectangle(aPagePos, Size(nDefaultObjectSizeWidth, nDefaultObjectSizeHeight)); SdrPageView* pPageView = mpDrawView->GetSdrPageView(); if(pPageView) @@ -896,7 +896,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) if (aDataHelper.GetTransferable().is()) { mpDrawView->InsertData( aDataHelper, - GetActiveWindow()->PixelToLogic( Rectangle( Point(), GetActiveWindow()->GetOutputSizePixel() ).Center() ), + GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(), GetActiveWindow()->GetOutputSizePixel() ).Center() ), nAction, false, SotClipboardFormatId::STRING); } } @@ -923,7 +923,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) sal_Int8 nAction = DND_ACTION_COPY; if( !mpDrawView->InsertData( aDataHelper, - GetActiveWindow()->PixelToLogic( Rectangle( Point(), GetActiveWindow()->GetOutputSizePixel() ).Center() ), + GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(), GetActiveWindow()->GetOutputSizePixel() ).Center() ), nAction, false, nFormat ) ) { INetBookmark aINetBookmark( "", "" ); @@ -1106,9 +1106,9 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) aPagePos.X() -= aPageSize.Width() / 2; - SetZoomRect( Rectangle( aPagePos, aPageSize ) ); + SetZoomRect( ::tools::Rectangle( aPagePos, aPageSize ) ); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), GetActiveWindow()->GetOutputSizePixel()) ); mpZoomList->InsertZoomRect(aVisAreaWin); } @@ -1123,7 +1123,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) { mbZoomOnPage = false; SetZoom( 100 ); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), GetActiveWindow()->GetOutputSizePixel()) ); mpZoomList->InsertZoomRect(aVisAreaWin); Invalidate( SID_ZOOM_IN ); @@ -1137,7 +1137,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) { mbZoomOnPage = false; SetZoom( std::max( (long) ( GetActiveWindow()->GetZoom() / 2 ), (long) GetActiveWindow()->GetMinZoom() ) ); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), GetActiveWindow()->GetOutputSizePixel()) ); mpZoomList->InsertZoomRect(aVisAreaWin); Invalidate( SID_ZOOM_IN ); @@ -1151,7 +1151,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) { mbZoomOnPage = false; SetZoom( std::min( (long) ( GetActiveWindow()->GetZoom() * 2 ), (long) GetActiveWindow()->GetMaxZoom() ) ); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), GetActiveWindow()->GetOutputSizePixel()) ); mpZoomList->InsertZoomRect(aVisAreaWin); Invalidate( SID_ZOOM_IN ); @@ -1162,7 +1162,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) case SID_SIZE_VISAREA: { - Rectangle aVisArea = mpFrameView->GetVisArea(); + ::tools::Rectangle aVisArea = mpFrameView->GetVisArea(); Size aVisAreaSize = aVisArea.GetSize(); if (aVisAreaSize.Height()!=0 && aVisAreaSize.Width()!=0) @@ -1192,9 +1192,9 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) aPos.Y() -= nH / 2; if ( nW && nH ) { - SetZoomRect(Rectangle(aPos, Size(nW, nH))); + SetZoomRect(::tools::Rectangle(aPos, Size(nW, nH))); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), GetActiveWindow()->GetOutputSizePixel()) ); mpZoomList->InsertZoomRect(aVisAreaWin); } @@ -1215,7 +1215,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) if( pPageView ) { - Rectangle aBoundRect( pPageView->GetObjList()->GetAllObjBoundRect() ); + ::tools::Rectangle aBoundRect( pPageView->GetObjList()->GetAllObjBoundRect() ); long nW = (long) (aBoundRect.GetWidth() * 1.03); long nH = (long) (aBoundRect.GetHeight() * 1.03); @@ -1224,9 +1224,9 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) aPos.Y() -= nH / 2; if ( nW && nH ) { - SetZoomRect( Rectangle( aPos, Size( nW, nH ) ) ); + SetZoomRect( ::tools::Rectangle( aPos, Size( nW, nH ) ) ); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), GetActiveWindow()->GetOutputSizePixel()) ); mpZoomList->InsertZoomRect(aVisAreaWin); } @@ -1454,13 +1454,13 @@ void DrawViewShell::InsertURLField(const OUString& rURL, const OUString& rText, pOutl->SetUpdateMode( false ); Point aPos; - Rectangle aRect(aPos, GetActiveWindow()->GetOutputSizePixel() ); + ::tools::Rectangle aRect(aPos, GetActiveWindow()->GetOutputSizePixel() ); aPos = aRect.Center(); aPos = GetActiveWindow()->PixelToLogic(aPos); aPos.X() -= aSize.Width() / 2; aPos.Y() -= aSize.Height() / 2; - Rectangle aLogicRect(aPos, aSize); + ::tools::Rectangle aLogicRect(aPos, aSize); pRectObj->SetLogicRect(aLogicRect); pRectObj->SetOutlinerParaObject( pOutlParaObject ); mpDrawView->InsertObjectAtView(pRectObj, *mpDrawView->GetSdrPageView()); @@ -1544,14 +1544,14 @@ void DrawViewShell::InsertURLButton(const OUString& rURL, const OUString& rText, } else { - aPos = Rectangle(aPos, GetActiveWindow()->GetOutputSizePixel()).Center(); + aPos = ::tools::Rectangle(aPos, GetActiveWindow()->GetOutputSizePixel()).Center(); aPos = GetActiveWindow()->PixelToLogic(aPos); } Size aSize(4000, 1000); aPos.X() -= aSize.Width() / 2; aPos.Y() -= aSize.Height() / 2; - pUnoCtrl->SetLogicRect(Rectangle(aPos, aSize)); + pUnoCtrl->SetLogicRect(::tools::Rectangle(aPos, aSize)); SdrInsertFlags nOptions = SdrInsertFlags::SETDEFLAYER; diff --git a/sd/source/ui/view/drviewsh.cxx b/sd/source/ui/view/drviewsh.cxx index 2a3dd490dd6d..6fb9e8ac0576 100644 --- a/sd/source/ui/view/drviewsh.cxx +++ b/sd/source/ui/view/drviewsh.cxx @@ -58,7 +58,7 @@ void DrawViewShell::GotoBookmark(const OUString& rBookmark) |* \************************************************************************/ -void DrawViewShell::MakeVisible(const Rectangle& rRect, vcl::Window& rWin) +void DrawViewShell::MakeVisible(const ::tools::Rectangle& rRect, vcl::Window& rWin) { // tdf#98646 check if Rectangle which contains the bounds of the region to // be shown eventually contains values that cause overflows when processing @@ -87,7 +87,7 @@ void DrawViewShell::MakeVisible(const Rectangle& rRect, vcl::Window& rWin) rWin.Push(PushFlags::MAPMODE); rWin.EnableMapMode(); } - Rectangle aVisArea(rWin.PixelToLogic(Rectangle(Point(0,0), aVisSizePixel))); + ::tools::Rectangle aVisArea(rWin.PixelToLogic(::tools::Rectangle(Point(0,0), aVisSizePixel))); if (bTiledRendering) rWin.Pop(); Size aVisAreaSize(aVisArea.GetSize()); @@ -100,7 +100,7 @@ void DrawViewShell::MakeVisible(const Rectangle& rRect, vcl::Window& rWin) // allow a mode for move-only visibility without zooming. const sal_Int32 nPercentBorder(30); - const Rectangle aInnerRectangle( + const ::tools::Rectangle aInnerRectangle( aVisArea.Left() + ((aVisAreaSize.Width() * nPercentBorder) / 200), aVisArea.Top() + ((aVisAreaSize.Height() * nPercentBorder) / 200), aVisArea.Right() - ((aVisAreaSize.Width() * nPercentBorder) / 200), diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx index 357623295654..df7efde02afa 100644 --- a/sd/source/ui/view/frmview.cxx +++ b/sd/source/ui/view/frmview.cxx @@ -205,7 +205,7 @@ FrameView::FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView /* = NULK * SetActiveLayer( SD_RESSTR(STR_LAYER_LAYOUT) ); mbNoColors = true; mbNoAttribs = false; - maVisArea = Rectangle( Point(), Size(0, 0) ); + maVisArea = ::tools::Rectangle( Point(), Size(0, 0) ); mePageKind = PageKind::Standard; mePageKindOnLoad = PageKind::Standard; mnSelectedPage = 0; @@ -427,7 +427,7 @@ void FrameView::WriteUserDataSequence ( css::uno::Sequence < css::beans::Propert // aUserData.addValue( sUNO_View_EditModeHandout, makeAny( (sal_Int32)GetViewShEditMode( PageKind::Handout ) ) ); { - const Rectangle aVisArea = GetVisArea(); + const ::tools::Rectangle aVisArea = GetVisArea(); aUserData.addValue( sUNO_View_VisibleAreaTop, makeAny( (sal_Int32)aVisArea.Top() ) ); aUserData.addValue( sUNO_View_VisibleAreaLeft, makeAny( (sal_Int32)aVisArea.Left() ) ); @@ -658,7 +658,7 @@ void FrameView::ReadUserDataSequence ( const css::uno::Sequence < css::beans::Pr sal_Int32 nTop = 0; if( pValue->Value >>= nTop ) { - Rectangle aVisArea( GetVisArea() ); + ::tools::Rectangle aVisArea( GetVisArea() ); aVisArea.Bottom() += nTop - aVisArea.Top(); aVisArea.Top() = nTop; SetVisArea( aVisArea ); @@ -669,7 +669,7 @@ void FrameView::ReadUserDataSequence ( const css::uno::Sequence < css::beans::Pr sal_Int32 nLeft = 0; if( pValue->Value >>= nLeft ) { - Rectangle aVisArea( GetVisArea() ); + ::tools::Rectangle aVisArea( GetVisArea() ); aVisArea.Right() += nLeft - aVisArea.Left(); aVisArea.Left() = nLeft; SetVisArea( aVisArea ); @@ -680,7 +680,7 @@ void FrameView::ReadUserDataSequence ( const css::uno::Sequence < css::beans::Pr sal_Int32 nWidth = 0; if( pValue->Value >>= nWidth ) { - Rectangle aVisArea( GetVisArea() ); + ::tools::Rectangle aVisArea( GetVisArea() ); aVisArea.Right() = aVisArea.Left() + nWidth - 1; SetVisArea( aVisArea ); } @@ -690,7 +690,7 @@ void FrameView::ReadUserDataSequence ( const css::uno::Sequence < css::beans::Pr sal_Int32 nHeight = 0; if( pValue->Value >>= nHeight ) { - Rectangle aVisArea( GetVisArea() ); + ::tools::Rectangle aVisArea( GetVisArea() ); aVisArea.Bottom() = nHeight + aVisArea.Top() - 1; SetVisArea( aVisArea ); } diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx index 5e7ee9db9493..fc1ac93e8383 100644 --- a/sd/source/ui/view/outlnvs2.cxx +++ b/sd/source/ui/view/outlnvs2.cxx @@ -143,7 +143,7 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq) case SID_ZOOM_OUT: { SetZoom( std::min( (long) ( GetActiveWindow()->GetZoom() * 2 ), (long) GetActiveWindow()->GetMaxZoom() ) ); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), GetActiveWindow()->GetOutputSizePixel()) ); mpZoomList->InsertZoomRect(aVisAreaWin); Invalidate( SID_ATTR_ZOOM ); @@ -157,7 +157,7 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq) case SID_SIZE_REAL: { SetZoom( 100 ); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), GetActiveWindow()->GetOutputSizePixel()) ); mpZoomList->InsertZoomRect(aVisAreaWin); Invalidate( SID_ATTR_ZOOM ); @@ -170,7 +170,7 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq) case SID_ZOOM_IN: { SetZoom( std::max( (long) ( GetActiveWindow()->GetZoom() / 2 ), (long) GetActiveWindow()->GetMinZoom() ) ); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), GetActiveWindow()->GetOutputSizePixel()) ); mpZoomList->InsertZoomRect(aVisAreaWin); Invalidate( SID_ATTR_ZOOM ); diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index 78400790dde2..470a7eed34bc 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -233,7 +233,7 @@ void OutlineViewShell::Shutdown() * Paint method: the event gets forwarded from pWindow to the Viewshell * and the current function */ -void OutlineViewShell::Paint(const Rectangle& rRect, ::sd::Window* pWin) +void OutlineViewShell::Paint(const ::tools::Rectangle& rRect, ::sd::Window* pWin) { if (pOlView) { @@ -260,14 +260,14 @@ void OutlineViewShell::ArrangeGUIElements () // change OuputArea of the OutlinerView OutlinerView* pOutlinerView = pOlView->GetViewByWindow(pWindow); - Rectangle aWin(Point(0,0), pWindow->GetOutputSizePixel()); + ::tools::Rectangle aWin(Point(0,0), pWindow->GetOutputSizePixel()); aWin = pWindow->PixelToLogic(aWin); pOutlinerView->SetOutputArea(aWin); - Rectangle aVis = pOutlinerView->GetVisArea(); + ::tools::Rectangle aVis = pOutlinerView->GetVisArea(); - Rectangle aText = Rectangle(Point(0,0), + ::tools::Rectangle aText = ::tools::Rectangle(Point(0,0), Size(pOlView->GetPaperWidth(), pOlView->GetOutliner().GetTextHeight())); if (aWin.GetHeight() > aText.Bottom()) @@ -499,7 +499,7 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq) if (aDataHelper.GetTransferable().is()) { pOlView->InsertData( aDataHelper, - GetActiveWindow()->PixelToLogic( Rectangle( Point(), GetActiveWindow()->GetOutputSizePixel() ).Center() ), + GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(), GetActiveWindow()->GetOutputSizePixel() ).Center() ), nAction, false, SotClipboardFormatId::STRING); } } @@ -1129,7 +1129,7 @@ void OutlineViewShell::SetZoom(long nZoom) { // change OutputArea of OutlinerView OutlinerView* pOutlinerView = pOlView->GetViewByWindow(pWindow); - Rectangle aWin(Point(0,0), pWindow->GetOutputSizePixel()); + ::tools::Rectangle aWin(Point(0,0), pWindow->GetOutputSizePixel()); aWin = pWindow->PixelToLogic(aWin); pOutlinerView->SetOutputArea(aWin); } @@ -1141,7 +1141,7 @@ void OutlineViewShell::SetZoom(long nZoom) /** * Zoom with zoom rectangle. Inform OutlinerView */ -void OutlineViewShell::SetZoomRect(const Rectangle& rZoomRect) +void OutlineViewShell::SetZoomRect(const ::tools::Rectangle& rZoomRect) { ViewShell::SetZoomRect(rZoomRect); @@ -1150,7 +1150,7 @@ void OutlineViewShell::SetZoomRect(const Rectangle& rZoomRect) { // change OutputArea of OutlinerView OutlinerView* pOutlinerView = pOlView->GetViewByWindow(pWindow); - Rectangle aWin(Point(0,0), pWindow->GetOutputSizePixel()); + ::tools::Rectangle aWin(Point(0,0), pWindow->GetOutputSizePixel()); aWin = pWindow->PixelToLogic(aWin); pOutlinerView->SetOutputArea(aWin); } @@ -1822,7 +1822,7 @@ void OutlineViewShell::ReadUserDataSequence ( const css::uno::Sequence < css::be ReadFrameViewData( mpFrameView ); } -void OutlineViewShell::VisAreaChanged(const Rectangle& rRect) +void OutlineViewShell::VisAreaChanged(const ::tools::Rectangle& rRect) { ViewShell::VisAreaChanged( rRect ); diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index 723e5ff0e5e0..ac3ebfc5d973 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -114,7 +114,7 @@ OutlineView::OutlineView( DrawDocShell& rDocSh, vcl::Window* pWindow, OutlineVie } mpOutlinerView[0] = new OutlinerView(&mrOutliner, pWindow); - Rectangle aNullRect; + ::tools::Rectangle aNullRect; mpOutlinerView[0]->SetOutputArea(aNullRect); mrOutliner.SetUpdateMode(false); mrOutliner.InsertView(mpOutlinerView[0], EE_APPEND); @@ -213,7 +213,7 @@ void OutlineView::DisconnectFromApplication() Application::RemoveEventListener(LINK(this, OutlineView, AppEventListenerHdl)); } -void OutlineView::Paint(const Rectangle& rRect, ::sd::Window* pWin) +void OutlineView::Paint(const ::tools::Rectangle& rRect, ::sd::Window* pWin) { OutlinerView* pOlView = GetViewByWindow(pWin); @@ -232,7 +232,7 @@ void OutlineView::AddWindowToPaintView(OutputDevice* pWin, vcl::Window* pWindow) { bool bAdded = false; bool bValidArea = false; - Rectangle aOutputArea; + ::tools::Rectangle aOutputArea; const Color aWhiteColor( COL_WHITE ); sal_uInt16 nView = 0; @@ -770,11 +770,11 @@ IMPL_LINK_NOARG(OutlineView, StatusEventHdl, EditStatus&, void) { ::sd::Window* pWin = mrOutlineViewShell.GetActiveWindow(); OutlinerView* pOutlinerView = GetViewByWindow(pWin); - Rectangle aVis = pOutlinerView->GetVisArea(); - Rectangle aText = Rectangle(Point(0,0), + ::tools::Rectangle aVis = pOutlinerView->GetVisArea(); + ::tools::Rectangle aText = ::tools::Rectangle(Point(0,0), Size(mnPaperWidth, mrOutliner.GetTextHeight())); - Rectangle aWin(Point(0,0), pWin->GetOutputSizePixel()); + ::tools::Rectangle aWin(Point(0,0), pWin->GetOutputSizePixel()); aWin = pWin->PixelToLogic(aWin); if (!aVis.IsEmpty()) // not when opening diff --git a/sd/source/ui/view/presvish.cxx b/sd/source/ui/view/presvish.cxx index 7d78cddacbcc..a9c63d886caf 100644 --- a/sd/source/ui/view/presvish.cxx +++ b/sd/source/ui/view/presvish.cxx @@ -140,7 +140,7 @@ void PresentationViewShell::Activate( bool bIsMDIActivate ) GetDocSh()->Connect( this ); } -void PresentationViewShell::Paint( const Rectangle& rRect, ::sd::Window* ) +void PresentationViewShell::Paint( const ::tools::Rectangle& rRect, ::sd::Window* ) { rtl::Reference< SlideShow > xSlideShow( SlideShow::GetSlideShow( GetViewShellBase() ) ); if( xSlideShow.is() ) diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index 34d3ae3cf4bc..2856afa6355c 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -707,7 +707,7 @@ bool View::SdrBeginTextEdit( { if (OutlinerView* pView = GetTextEditOutlinerView()) { - Rectangle aRectangle = pView->GetOutputArea(); + ::tools::Rectangle aRectangle = pView->GetOutputArea(); if (pWin && pWin->GetMapMode().GetMapUnit() == MapUnit::Map100thMM) aRectangle = OutputDevice::LogicToLogic(aRectangle, MapUnit::Map100thMM, MapUnit::MapTwip); OString sRectangle = aRectangle.toString(); @@ -894,7 +894,7 @@ void View::SetMarkedOriginalSize() if ( bOK ) { - Rectangle aDrawRect( pObj->GetLogicRect() ); + ::tools::Rectangle aDrawRect( pObj->GetLogicRect() ); pUndoGroup->AddAction( mrDoc.GetSdrUndoFactory().CreateUndoGeoObject( *pObj ) ); pObj->Resize( aDrawRect.TopLeft(), Fraction( aOleSize.Width(), aDrawRect.GetWidth() ), @@ -907,7 +907,7 @@ void View::SetMarkedOriginalSize() const SdrGrafObj* pSdrGrafObj = static_cast< const SdrGrafObj* >(pObj); const Size aSize = pSdrGrafObj->getOriginalSize( ); pUndoGroup->AddAction( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj ) ); - Rectangle aRect( pObj->GetLogicRect() ); + ::tools::Rectangle aRect( pObj->GetLogicRect() ); aRect.SetSize( aSize ); pObj->SetLogicRect( aRect ); bOK = true; @@ -939,7 +939,7 @@ void View::DoConnect(SdrOle2Obj* pObj) if ( !pSdClient ) { pSdClient = new Client(pObj, mpViewSh, pWindow); - Rectangle aRect = pObj->GetLogicRect(); + ::tools::Rectangle aRect = pObj->GetLogicRect(); { // TODO/LEAN: working with visual area can switch object to running state Size aDrawSize = aRect.GetSize(); @@ -1177,7 +1177,7 @@ bool View::MarkPoint(SdrHdl& rHdl, bool bUnmark ) return FmFormView::MarkPoint( rHdl, bUnmark ); } -bool View::MarkPoints(const Rectangle* pRect, bool bUnmark) +bool View::MarkPoints(const ::tools::Rectangle* pRect, bool bUnmark) { if( maSmartTags.MarkPoints( pRect, bUnmark ) ) return true; diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx index 0b1cab132db3..c6e7721fd303 100644 --- a/sd/source/ui/view/sdview2.cxx +++ b/sd/source/ui/view/sdview2.cxx @@ -99,7 +99,7 @@ css::uno::Reference< css::datatransfer::XTransferable > View::CreateClipboardDat // #112978# need to use GetAllMarkedBoundRect instead of GetAllMarkedRect to get // fat lines correctly - const Rectangle aMarkRect( GetAllMarkedBoundRect() ); + const ::tools::Rectangle aMarkRect( GetAllMarkedBoundRect() ); TransferableObjectDescriptor aObjDesc; SdrOle2Obj* pSdrOleObj = nullptr; SdrPageView* pPgView = GetSdrPageView(); @@ -200,7 +200,7 @@ css::uno::Reference< css::datatransfer::XTransferable > View::CreateSelectionDat SdTransferable* pTransferable = new SdTransferable( &mrDoc, pWorkView, true ); css::uno::Reference< css::datatransfer::XTransferable > xRet( pTransferable ); TransferableObjectDescriptor aObjDesc; - const Rectangle aMarkRect( GetAllMarkedRect() ); + const ::tools::Rectangle aMarkRect( GetAllMarkedRect() ); OUString aDisplayName; SD_MOD()->pTransferSelection = pTransferable; @@ -319,7 +319,7 @@ void View::DoPaste (vcl::Window* pWindow) sal_Int8 nDnDAction = DND_ACTION_COPY; if( pWindow ) - aPos = pWindow->PixelToLogic( Rectangle( aPos, pWindow->GetOutputSizePixel() ).Center() ); + aPos = pWindow->PixelToLogic( ::tools::Rectangle( aPos, pWindow->GetOutputSizePixel() ).Center() ); DrawViewShell* pDrViewSh = static_cast<DrawViewShell*>( mpDocSh->GetViewShell() ); @@ -458,7 +458,7 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge if( pOLV ) { - Rectangle aRect( pOLV->GetOutputArea() ); + ::tools::Rectangle aRect( pOLV->GetOutputArea() ); if (GetMarkedObjectCount() == 1) { @@ -636,7 +636,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, if( pOLV ) { - Rectangle aRect( pOLV->GetOutputArea() ); + ::tools::Rectangle aRect( pOLV->GetOutputArea() ); if( GetMarkedObjectCount() == 1 ) { diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index e6fadb143d45..9ae250f5ad36 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -114,11 +114,11 @@ SdrObject* ImpGetClone(std::vector<ImpRememberOrigAndClone*>& aConnectorContaine } // restrict movement to WorkArea -void ImpCheckInsertPos(Point& rPos, const Size& rSize, const Rectangle& rWorkArea) +void ImpCheckInsertPos(Point& rPos, const Size& rSize, const ::tools::Rectangle& rWorkArea) { if(!rWorkArea.IsEmpty()) { - Rectangle aMarkRect(Point(rPos.X() - (rSize.Width() / 2), rPos.Y() - (rSize.Height() / 2)), rSize); + ::tools::Rectangle aMarkRect(Point(rPos.X() - (rSize.Width() / 2), rPos.Y() - (rSize.Height() / 2)), rSize); if(!aMarkRect.IsInside(rWorkArea)) { @@ -465,7 +465,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, // source objects, if necessary (#103207) if( pOwnData == SD_MOD()->pTransferSelection ) { - Rectangle aCurBoundRect; + ::tools::Rectangle aCurBoundRect; if( pMarkList->TakeBoundRect( pPV, aCurBoundRect ) ) aCurPos = aCurBoundRect.TopLeft(); @@ -715,10 +715,10 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, { // replace object SdrObject* pNewObj = pObj->Clone(); - Rectangle aPickObjRect( pPickObj2->GetCurrentBoundRect() ); + ::tools::Rectangle aPickObjRect( pPickObj2->GetCurrentBoundRect() ); Size aPickObjSize( aPickObjRect.GetSize() ); Point aVec( aPickObjRect.TopLeft() ); - Rectangle aObjRect( pNewObj->GetCurrentBoundRect() ); + ::tools::Rectangle aObjRect( pNewObj->GetCurrentBoundRect() ); Size aObjSize( aObjRect.GetSize() ); Fraction aScaleWidth( aPickObjSize.Width(), aObjSize.Width() ); @@ -841,7 +841,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, if( pObj ) { - Rectangle aRect( pObj->GetLogicRect() ); + ::tools::Rectangle aRect( pObj->GetLogicRect() ); Size aSize( aRect.GetSize() ); maDropPos.X() -= ( aSize.Width() >> 1 ); @@ -994,7 +994,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, maDropPos.X() -= std::min( aSize.Width(), aMaxSize.Width() ) >> 1; maDropPos.Y() -= std::min( aSize.Height(), aMaxSize.Height() ) >> 1; - Rectangle aRect( maDropPos, aSize ); + ::tools::Rectangle aRect( maDropPos, aSize ); SdrOle2Obj* pObj = new SdrOle2Obj( aObjRef, aName, aRect ); SdrPageView* pPV = GetSdrPageView(); SdrInsertFlags nOptions = SdrInsertFlags::SETDEFLAYER; @@ -1164,7 +1164,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, maDropPos.X() -= std::min( aSize.Width(), aMaxSize.Width() ) >> 1; maDropPos.Y() -= std::min( aSize.Height(), aMaxSize.Height() ) >> 1; - Rectangle aRect( maDropPos, aSize ); + ::tools::Rectangle aRect( maDropPos, aSize ); SdrOle2Obj* pObj = new SdrOle2Obj( aObjRef, aName, aRect ); SdrPageView* pPV = GetSdrPageView(); SdrInsertFlags nOptions = SdrInsertFlags::SETDEFLAYER; @@ -1404,7 +1404,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, if( pOLV ) { - Rectangle aRect( pOLV->GetOutputArea() ); + ::tools::Rectangle aRect( pOLV->GetOutputArea() ); Point aPos( pOLV->GetWindow()->PixelToLogic( maDropPos ) ); if( aRect.IsInside( aPos ) || ( !bDrag && IsTextEdit() ) ) @@ -1440,7 +1440,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, if( pOLV ) { - Rectangle aRect( pOLV->GetOutputArea() ); + ::tools::Rectangle aRect( pOLV->GetOutputArea() ); Point aPos( pOLV->GetWindow()->PixelToLogic( maDropPos ) ); if( aRect.IsInside( aPos ) || ( !bDrag && IsTextEdit() ) ) diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx index 060760ce4948..972ec47696a9 100644 --- a/sd/source/ui/view/sdview4.cxx +++ b/sd/source/ui/view/sdview4.cxx @@ -125,7 +125,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction, if ( pNewGrafObj->IsEmptyPresObj() ) { - Rectangle aRect( pNewGrafObj->GetLogicRect() ); + ::tools::Rectangle aRect( pNewGrafObj->GetLogicRect() ); pNewGrafObj->AdjustToMaxRect( aRect ); pNewGrafObj->SetOutlinerParaObject(nullptr); pNewGrafObj->SetEmptyPresObj(false); @@ -192,12 +192,12 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction, MapMode( MapUnit::Map100thMM ) ); } - pNewGrafObj = new SdrGrafObj( rGraphic, Rectangle( rPos, aSize ) ); + pNewGrafObj = new SdrGrafObj( rGraphic, ::tools::Rectangle( rPos, aSize ) ); SdrPage* pPage = pPV->GetPage(); Size aPageSize( pPage->GetSize() ); aPageSize.Width() -= pPage->GetLftBorder() + pPage->GetRgtBorder(); aPageSize.Height() -= pPage->GetUppBorder() + pPage->GetLwrBorder(); - pNewGrafObj->AdjustToMaxRect( Rectangle( Point(), aPageSize ), true ); + pNewGrafObj->AdjustToMaxRect( ::tools::Rectangle( Point(), aPageSize ), true ); SdrInsertFlags nOptions = SdrInsertFlags::SETDEFLAYER; bool bIsPresTarget = false; @@ -223,9 +223,9 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction, if (pImageMap) pNewGrafObj->AppendUserData(new SdIMapInfo(*pImageMap)); - Rectangle aPickObjRect(pPickObj->GetCurrentBoundRect()); + ::tools::Rectangle aPickObjRect(pPickObj->GetCurrentBoundRect()); Size aPickObjSize(aPickObjRect.GetSize()); - Rectangle aObjRect(pNewGrafObj->GetCurrentBoundRect()); + ::tools::Rectangle aObjRect(pNewGrafObj->GetCurrentBoundRect()); Size aObjSize(aObjRect.GetSize()); Fraction aScaleWidth(aPickObjSize.Width(), aObjSize.Width()); @@ -340,7 +340,7 @@ SdrMediaObj* View::InsertMediaObj( const OUString& rMediaURL, const OUString& rM } else if( pPV ) { - Rectangle aRect( rPos, rSize ); + ::tools::Rectangle aRect( rPos, rSize ); if( pPickObj ) aRect = pPickObj->GetLogicRect(); @@ -528,7 +528,7 @@ IMPL_LINK_NOARG(View, DropInsertFileHdl, Timer *, void) } Size aSize( aSz.Width, aSz.Height ); - Rectangle aRect; + ::tools::Rectangle aRect; if (!aSize.Width() || !aSize.Height()) { @@ -536,7 +536,7 @@ IMPL_LINK_NOARG(View, DropInsertFileHdl, Timer *, void) aSize.Height() = 1000; } - aRect = Rectangle( maDropPos, aSize ); + aRect = ::tools::Rectangle( maDropPos, aSize ); SdrOle2Obj* pOleObj = new SdrOle2Obj( svt::EmbeddedObjectRef( xObj, nAspect ), aName, aRect ); SdrInsertFlags nOptions = SdrInsertFlags::SETDEFLAYER; diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx index b6fc0dafa2ae..9d13093e6144 100644 --- a/sd/source/ui/view/sdwindow.cxx +++ b/sd/source/ui/view/sdwindow.cxx @@ -214,7 +214,7 @@ void Window::PrePaint(vcl::RenderContext& /*rRenderContext*/) mpViewShell->PrePaint(); } -void Window::Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect) +void Window::Paint(vcl::RenderContext& /*rRenderContext*/, const ::tools::Rectangle& rRect) { if ( mpViewShell ) mpViewShell->Paint(rRect, this); @@ -386,7 +386,7 @@ void Window::SetZoomIntegral(long nZoom) SetZoomFactor(nZoom); } -long Window::GetZoomForRect( const Rectangle& rZoomRect ) +long Window::GetZoomForRect( const ::tools::Rectangle& rZoomRect ) { long nRetZoom = 100; @@ -445,7 +445,7 @@ long Window::GetZoomForRect( const Rectangle& rZoomRect ) is displayed centered and as large as possible while still being fully visible in the window. */ -long Window::SetZoomRect (const Rectangle& rZoomRect) +long Window::SetZoomRect (const ::tools::Rectangle& rZoomRect) { long nNewZoom = 100; @@ -996,7 +996,7 @@ Selection Window::GetSurroundingTextSelection() const } } -void Window::LogicInvalidate(const Rectangle* pRectangle) +void Window::LogicInvalidate(const ::tools::Rectangle* pRectangle) { DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(mpViewShell); if (pDrawViewShell && pDrawViewShell->IsInSwitchPage()) @@ -1007,7 +1007,7 @@ void Window::LogicInvalidate(const Rectangle* pRectangle) sRectangle = "EMPTY"; else { - Rectangle aRectangle(*pRectangle); + ::tools::Rectangle aRectangle(*pRectangle); if (GetMapMode().GetMapUnit() == MapUnit::Map100thMM) aRectangle = OutputDevice::LogicToLogic(aRectangle, MapUnit::Map100thMM, MapUnit::MapTwip); sRectangle = aRectangle.toString(); diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx index 476593a36f64..44aa1f59e3d0 100644 --- a/sd/source/ui/view/viewoverlaymanager.cxx +++ b/sd/source/ui/view/viewoverlaymanager.cxx @@ -190,7 +190,7 @@ void ImageButtonHdl::onMouseEnter(const MouseEvent& rMEvt) aResId.SetRT( RSC_STRING ); OUString aHelpText( aResId ); - Rectangle aScreenRect( pDev->LogicToPixel( GetPos() ), maImageSize ); + ::tools::Rectangle aScreenRect( pDev->LogicToPixel( GetPos() ), maImageSize ); Help::ShowQuickHelp(static_cast< vcl::Window* >( pHdlList->GetView()->GetFirstOutputDevice() ), aScreenRect, aHelpText); } Touch(); @@ -319,7 +319,7 @@ BitmapEx ChangePlaceholderTag::createOverlayImage( int nHighlight ) { SdrObject* pPlaceholder = mxPlaceholderObj.get(); SmartTagReference xThis( this ); - const Rectangle& rSnapRect = pPlaceholder->GetSnapRect(); + const ::tools::Rectangle& rSnapRect = pPlaceholder->GetSnapRect(); OutputDevice* pDev = mrView.GetFirstOutputDevice(); if( pDev == nullptr ) @@ -334,14 +334,14 @@ BitmapEx ChangePlaceholderTag::createOverlayImage( int nHighlight ) aRet.SetSizePixel( Size( aSize.Width() << 1, aSize.Height() << 1 ) ); - const Rectangle aRectSrc( Point( 0, 0 ), aSize ); + const ::tools::Rectangle aRectSrc( Point( 0, 0 ), aSize ); aRet = *(getButtonImage((nHighlight == 0) ? 4 : 0, bLarge)); aRet.Expand( aSize.Width(), aSize.Height(), true ); - aRet.CopyPixel( Rectangle( Point( aSize.Width(), 0 ), aSize ), aRectSrc, getButtonImage((nHighlight == 1) ? 5 : 1, bLarge) ); - aRet.CopyPixel( Rectangle( Point( 0, aSize.Height() ), aSize ), aRectSrc, getButtonImage((nHighlight == 2) ? 6 : 2, bLarge) ); - aRet.CopyPixel( Rectangle( Point( aSize.Width(), aSize.Height() ), aSize ), aRectSrc, getButtonImage((nHighlight == 3) ? 7 : 3, bLarge) ); + aRet.CopyPixel( ::tools::Rectangle( Point( aSize.Width(), 0 ), aSize ), aRectSrc, getButtonImage((nHighlight == 1) ? 5 : 1, bLarge) ); + aRet.CopyPixel( ::tools::Rectangle( Point( 0, aSize.Height() ), aSize ), aRectSrc, getButtonImage((nHighlight == 2) ? 6 : 2, bLarge) ); + aRet.CopyPixel( ::tools::Rectangle( Point( aSize.Width(), aSize.Height() ), aSize ), aRectSrc, getButtonImage((nHighlight == 3) ? 7 : 3, bLarge) ); } return aRet; @@ -353,7 +353,7 @@ void ChangePlaceholderTag::addCustomHandles( SdrHdlList& rHandlerList ) { SdrObject* pPlaceholder = mxPlaceholderObj.get(); SmartTagReference xThis( this ); - const Rectangle& rSnapRect = pPlaceholder->GetSnapRect(); + const ::tools::Rectangle& rSnapRect = pPlaceholder->GetSnapRect(); const Point aPoint; OutputDevice* pDev = mrView.GetFirstOutputDevice(); diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx index e556e5ef2f2c..c59680375463 100644 --- a/sd/source/ui/view/viewshe2.cxx +++ b/sd/source/ui/view/viewshe2.cxx @@ -162,13 +162,13 @@ void ViewShell::VirtHScrollHdl(ScrollBar* pHScroll) mpContentWindow->SetVisibleXY(fX, -1); - Rectangle aVisArea = GetDocSh()->GetVisArea(ASPECT_CONTENT); + ::tools::Rectangle aVisArea = GetDocSh()->GetVisArea(ASPECT_CONTENT); Point aVisAreaPos = GetActiveWindow()->PixelToLogic( Point(0,0) ); aVisArea.SetPos(aVisAreaPos); GetDocSh()->SetVisArea(aVisArea); Size aVisSizePixel = GetActiveWindow()->GetOutputSizePixel(); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), aVisSizePixel) ); + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), aVisSizePixel) ); VisAreaChanged(aVisAreaWin); if (pView) @@ -221,13 +221,13 @@ void ViewShell::VirtVScrollHdl(ScrollBar* pVScroll) mpContentWindow->SetVisibleXY(-1, fY); - Rectangle aVisArea = GetDocSh()->GetVisArea(ASPECT_CONTENT); + ::tools::Rectangle aVisArea = GetDocSh()->GetVisArea(ASPECT_CONTENT); Point aVisAreaPos = GetActiveWindow()->PixelToLogic( Point(0,0) ); aVisArea.SetPos(aVisAreaPos); GetDocSh()->SetVisArea(aVisArea); Size aVisSizePixel = GetActiveWindow()->GetOutputSizePixel(); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), aVisSizePixel) ); + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), aVisSizePixel) ); VisAreaChanged(aVisAreaWin); if (pView) @@ -299,13 +299,13 @@ void ViewShell::Scroll(long nScrollX, long nScrollY) GetActiveWindow()->SetVisibleXY(fX, fY); - Rectangle aVisArea = GetDocSh()->GetVisArea(ASPECT_CONTENT); + ::tools::Rectangle aVisArea = GetDocSh()->GetVisArea(ASPECT_CONTENT); Point aVisAreaPos = GetActiveWindow()->PixelToLogic( Point(0,0) ); aVisArea.SetPos(aVisAreaPos); GetDocSh()->SetVisArea(aVisArea); Size aVisSizePixel = GetActiveWindow()->GetOutputSizePixel(); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), aVisSizePixel) ); + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), aVisSizePixel) ); VisAreaChanged(aVisAreaWin); ::sd::View* pView = GetView(); @@ -347,7 +347,7 @@ void ViewShell::SetZoom(long nZoom) } Size aVisSizePixel = GetActiveWindow()->GetOutputSizePixel(); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), aVisSizePixel) ); + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), aVisSizePixel) ); VisAreaChanged(aVisAreaWin); ::sd::View* pView = GetView(); @@ -373,7 +373,7 @@ long ViewShell::GetZoom() const * Set zoom rectangle for active window. Sets all split windows to the same zoom * factor. */ -void ViewShell::SetZoomRect(const Rectangle& rZoomRect) +void ViewShell::SetZoomRect(const ::tools::Rectangle& rZoomRect) { long nZoom = GetActiveWindow()->SetZoomRect(rZoomRect); Fraction aUIScale(nZoom, 100); @@ -403,7 +403,7 @@ void ViewShell::SetZoomRect(const Rectangle& rZoomRect) } Size aVisSizePixel = GetActiveWindow()->GetOutputSizePixel(); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), aVisSizePixel) ); + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), aVisSizePixel) ); VisAreaChanged(aVisAreaWin); ::sd::View* pView = GetView(); @@ -435,7 +435,7 @@ void ViewShell::InitWindows(const Point& rViewOrigin, const Size& rViewSize, } Size aVisSizePixel = GetActiveWindow()->GetOutputSizePixel(); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), aVisSizePixel) ); + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), aVisSizePixel) ); VisAreaChanged(aVisAreaWin); ::sd::View* pView = GetView(); @@ -457,7 +457,7 @@ void ViewShell::InvalidateWindows() /** * Draw a selection rectangle with the ?provided pen on all split windows. */ -void ViewShell::DrawMarkRect(const Rectangle& rRect) const +void ViewShell::DrawMarkRect(const ::tools::Rectangle& rRect) const { if (mpContentWindow.get() != nullptr) { @@ -507,7 +507,7 @@ void ViewShell::SetPageSizeAndBorder(PageKind ePageKind, const Size& rNewSize, if (rNewSize.Width() > 0 || nLeft >= 0 || nRight >= 0 || nUpper >= 0 || nLower >= 0) { - Rectangle aNewBorderRect(nLeft, nUpper, nRight, nLower); + ::tools::Rectangle aNewBorderRect(nLeft, nUpper, nRight, nLower); pPage->ScaleObjects(rNewSize, aNewBorderRect, bScaleAll); if (rNewSize.Width() > 0) @@ -555,7 +555,7 @@ void ViewShell::SetPageSizeAndBorder(PageKind ePageKind, const Size& rNewSize, if (rNewSize.Width() > 0 || nLeft >= 0 || nRight >= 0 || nUpper >= 0 || nLower >= 0) { - Rectangle aNewBorderRect(nLeft, nUpper, nRight, nLower); + ::tools::Rectangle aNewBorderRect(nLeft, nUpper, nRight, nLower); pPage->ScaleObjects(rNewSize, aNewBorderRect, bScaleAll); if (rNewSize.Width() > 0) @@ -606,7 +606,7 @@ void ViewShell::SetPageSizeAndBorder(PageKind ePageKind, const Size& rNewSize, ::sd::View* pView = GetView(); if (pView) { - pView->SetWorkArea(Rectangle(Point() - aVisAreaPos - aPageOrg, aViewSize)); + pView->SetWorkArea(::tools::Rectangle(Point() - aVisAreaPos - aPageOrg, aViewSize)); } UpdateScrollBars(); @@ -794,7 +794,7 @@ bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb) pObj->SetObjRef(xObj); } - Rectangle aRect = pObj->GetLogicRect(); + ::tools::Rectangle aRect = pObj->GetLogicRect(); if ( pObj->GetAspect() != embed::Aspects::MSOLE_ICON ) { @@ -832,12 +832,12 @@ bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb) pSdClient = new Client(pObj, this, GetActiveWindow()); } - Rectangle aRect = pObj->GetLogicRect(); + ::tools::Rectangle aRect = pObj->GetLogicRect(); { // #i118485# center on BoundRect for activation, // OLE may be sheared/rotated now - const Rectangle& rBoundRect = pObj->GetCurrentBoundRect(); + const ::tools::Rectangle& rBoundRect = pObj->GetCurrentBoundRect(); const Point aDelta(rBoundRect.Center() - aRect.Center()); aRect.Move(aDelta.X(), aDelta.Y()); } @@ -883,7 +883,7 @@ bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb) /** * @returns enclosing rectangle of all (split-) windows. */ -const Rectangle& ViewShell::GetAllWindowRect() +const ::tools::Rectangle& ViewShell::GetAllWindowRect() { maAllWindowRectangle.SetPos( mpContentWindow->OutputToScreenPixel(Point(0,0))); @@ -984,7 +984,7 @@ void ViewShell::ReadUserDataSequence ( const css::uno::Sequence < css::beans::Pr mpFrameView->ReadUserDataSequence( rSequence, bBrowse ); } -void ViewShell::VisAreaChanged(const Rectangle& rRect) +void ViewShell::VisAreaChanged(const ::tools::Rectangle& rRect) { OSL_ASSERT (GetViewShell()!=nullptr); GetViewShell()->VisAreaChanged(rRect); @@ -1009,7 +1009,7 @@ void ViewShell::SetWinViewPos(const Point& rWinPos) UpdateScrollBars(); Size aVisSizePixel = GetActiveWindow()->GetOutputSizePixel(); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), aVisSizePixel) ); + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), aVisSizePixel) ); VisAreaChanged(aVisAreaWin); ::sd::View* pView = GetView(); diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index c509e0b547e4..97b709768cb4 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -1088,7 +1088,7 @@ void ViewShell::ArrangeGUIElements() } // Windows in the center and rulers at the left and top side. - maAllWindowRectangle = Rectangle( + maAllWindowRectangle = ::tools::Rectangle( maViewPos, Size(maViewSize.Width()-maScrBarWH.Width(), maViewSize.Height()-maScrBarWH.Height())); @@ -1525,7 +1525,7 @@ void ViewShell::PrePaint() { } -void ViewShell::Paint (const Rectangle&, ::sd::Window* ) +void ViewShell::Paint (const ::tools::Rectangle&, ::sd::Window* ) { } diff --git a/sd/source/ui/view/zoomlist.cxx b/sd/source/ui/view/zoomlist.cxx index d4428537e469..f2e30ea8e5a9 100644 --- a/sd/source/ui/view/zoomlist.cxx +++ b/sd/source/ui/view/zoomlist.cxx @@ -36,7 +36,7 @@ ZoomList::ZoomList(ViewShell* pViewShell) { } -void ZoomList::InsertZoomRect(const Rectangle& rRect) +void ZoomList::InsertZoomRect(const ::tools::Rectangle& rRect) { size_t nRectCount = maRectangles.size(); @@ -54,7 +54,7 @@ void ZoomList::InsertZoomRect(const Rectangle& rRect) rBindings.Invalidate( SID_ZOOM_PREV ); } -Rectangle ZoomList::GetNextZoomRect() +::tools::Rectangle ZoomList::GetNextZoomRect() { mnCurPos++; size_t nRectCount = maRectangles.size(); @@ -69,7 +69,7 @@ Rectangle ZoomList::GetNextZoomRect() return maRectangles[mnCurPos]; } -Rectangle ZoomList::GetPreviousZoomRect() +::tools::Rectangle ZoomList::GetPreviousZoomRect() { if (mnCurPos > 0) mnCurPos--; |