diff options
Diffstat (limited to 'sc/source')
176 files changed, 1110 insertions, 1110 deletions
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx index 413cc8687c24..d237e539507a 100644 --- a/sc/source/core/data/documen3.cxx +++ b/sc/source/core/data/documen3.cxx @@ -1653,9 +1653,9 @@ void ScDocument::GetEmbedded( ScRange& rRange ) const rRange = aEmbedRange; } -Rectangle ScDocument::GetEmbeddedRect() const // 1/100 mm +tools::Rectangle ScDocument::GetEmbeddedRect() const // 1/100 mm { - Rectangle aRect; + tools::Rectangle aRect; ScTable* pTable = nullptr; if ( aEmbedRange.aStart.Tab() < static_cast<SCTAB>(maTabs.size()) ) pTable = maTabs[aEmbedRange.aStart.Tab()]; @@ -1745,7 +1745,7 @@ static bool lcl_AddTwipsWhile( long & rTwips, long nStopTwips, SCROW & rPosY, SC return bAdded; } -ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect, bool bHiddenAsZero ) const +ScRange ScDocument::GetRange( SCTAB nTab, const tools::Rectangle& rMMRect, bool bHiddenAsZero ) const { ScTable* pTable = nullptr; if (nTab < static_cast<SCTAB>(maTabs.size())) @@ -1758,7 +1758,7 @@ ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect, bool bHidden return ScRange(); } - Rectangle aPosRect = rMMRect; + tools::Rectangle aPosRect = rMMRect; if ( IsNegativePage( nTab ) ) ScDrawLayer::MirrorRectRTL( aPosRect ); // Always with positive (LTR) values @@ -1818,7 +1818,7 @@ ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect, bool bHidden return ScRange( nX1,nY1,nTab, nX2,nY2,nTab ); } -void ScDocument::SetEmbedded( SCTAB nTab, const Rectangle& rRect ) // From VisArea (1/100 mm) +void ScDocument::SetEmbedded( SCTAB nTab, const tools::Rectangle& rRect ) // From VisArea (1/100 mm) { bIsEmbedded = true; aEmbedRange = GetRange( nTab, rRect ); @@ -1930,16 +1930,16 @@ void ScDocument::SetLanguage( LanguageType eLatin, LanguageType eCjk, LanguageTy UpdateDrawLanguages(); // Set edit engine defaults in drawing layer pool } -Rectangle ScDocument::GetMMRect( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero ) const +tools::Rectangle ScDocument::GetMMRect( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero ) const { if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(maTabs.size()) || !maTabs[nTab]) { OSL_FAIL("GetMMRect: wrong table"); - return Rectangle(0,0,0,0); + return tools::Rectangle(0,0,0,0); } SCCOL i; - Rectangle aRect; + tools::Rectangle aRect; for (i=0; i<nStartCol; i++) aRect.Left() += GetColWidth(i,nTab, bHiddenAsZero ); diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx index d05af1653510..077691579c3f 100644 --- a/sc/source/core/data/documen9.cxx +++ b/sc/source/core/data/documen9.cxx @@ -295,7 +295,7 @@ bool ScDocument::HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* p { if ( !pTabMark || pTabMark->GetTableSelect(nTab) ) { - Rectangle aMMRect = GetMMRect( rRange.aStart.Col(), rRange.aStart.Row(), + tools::Rectangle aMMRect = GetMMRect( rRange.aStart.Col(), rRange.aStart.Row(), rRange.aEnd.Col(), rRange.aEnd.Row(), nTab ); SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab)); @@ -336,7 +336,7 @@ void ScDocument::StartAnimations( SCTAB nTab, vcl::Window* pWin ) { if ( pGrafObj->IsAnimated() ) { - const Rectangle& rRect = pGrafObj->GetCurrentBoundRect(); + const tools::Rectangle& rRect = pGrafObj->GetCurrentBoundRect(); pGrafObj->StartAnimation( pWin, rRect.TopLeft(), rRect.GetSize() ); } } @@ -344,7 +344,7 @@ void ScDocument::StartAnimations( SCTAB nTab, vcl::Window* pWin ) } } -bool ScDocument::HasBackgroundDraw( SCTAB nTab, const Rectangle& rMMRect ) const +bool ScDocument::HasBackgroundDraw( SCTAB nTab, const tools::Rectangle& rMMRect ) const { // Are there objects in the background layer who are (partly) affected by rMMRect // (for Drawing optimization, no deletion in front of the background @@ -369,7 +369,7 @@ bool ScDocument::HasBackgroundDraw( SCTAB nTab, const Rectangle& rMMRect ) const return bFound; } -bool ScDocument::HasAnyDraw( SCTAB nTab, const Rectangle& rMMRect ) const +bool ScDocument::HasAnyDraw( SCTAB nTab, const tools::Rectangle& rMMRect ) const { // Are there any objects at all who are (partly) affected by rMMRect? // (To detect blank pages when printing) @@ -438,7 +438,7 @@ SdrObject* ScDocument::GetObjectAtPoint( SCTAB nTab, const Point& rPos ) bool ScDocument::IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool bLeftIsEmpty, - ScRange* pLastRange, Rectangle* pLastMM ) const + ScRange* pLastRange, tools::Rectangle* pLastMM ) const { if (!IsBlockEmpty( nTab, nStartCol, nStartRow, nEndCol, nEndRow )) return false; @@ -447,7 +447,7 @@ bool ScDocument::IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, // We want to print sheets with borders even if there is no cell content. return false; - Rectangle aMMRect; + tools::Rectangle aMMRect; if ( pLastRange && pLastMM && nTab == pLastRange->aStart.Tab() && nStartRow == pLastRange->aStart.Row() && nEndRow == pLastRange->aEnd.Row() ) { diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 64bad940eb65..0c680fe9faa3 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -2198,7 +2198,7 @@ void ScDocument::CopyToClip(const ScClipParam& rClipParam, if (pDrawLayer && bIncludeObjects) { // also copy drawing objects - Rectangle aObjRect = GetMMRect( + tools::Rectangle aObjRect = GetMMRect( aClipRange.aStart.Col(), aClipRange.aStart.Row(), aClipRange.aEnd.Col(), aClipRange.aEnd.Row(), i); pDrawLayer->CopyToClip(pClipDoc, i, aObjRect); } @@ -2340,9 +2340,9 @@ void ScDocument::TransposeClip( ScDocument* pTransClip, InsertDeleteFlags nFlags // are drawing objects to copy) pTransClip->InitDrawLayer(); - Rectangle aSourceRect = GetMMRect( aClipRange.aStart.Col(), aClipRange.aStart.Row(), + tools::Rectangle aSourceRect = GetMMRect( aClipRange.aStart.Col(), aClipRange.aStart.Row(), aClipRange.aEnd.Col(), aClipRange.aEnd.Row(), i ); - Rectangle aDestRect = pTransClip->GetMMRect( 0, 0, + tools::Rectangle aDestRect = pTransClip->GetMMRect( 0, 0, static_cast<SCCOL>(aClipRange.aEnd.Row() - aClipRange.aStart.Row()), static_cast<SCROW>(aClipRange.aEnd.Col() - aClipRange.aStart.Col()), i ); pTransClip->pDrawLayer->CopyFromClip( pDrawLayer, i, aSourceRect, ScAddress(0,0,i), aDestRect ); @@ -2590,9 +2590,9 @@ void ScDocument::CopyBlockFromClip( // (copied in an extra step before pasting, or updated after pasting cells, but // before pasting objects). - Rectangle aSourceRect = rCxt.getClipDoc()->GetMMRect( + tools::Rectangle aSourceRect = rCxt.getClipDoc()->GetMMRect( nCol1-nDx, nRow1-nDy, nCol2-nDx, nRow2-nDy, nClipTab ); - Rectangle aDestRect = GetMMRect( nCol1, nRow1, nCol2, nRow2, i ); + tools::Rectangle aDestRect = GetMMRect( nCol1, nRow1, nCol2, nRow2, i ); pDrawLayer->CopyFromClip(rCxt.getClipDoc()->pDrawLayer, nClipTab, aSourceRect, ScAddress( nCol1, nRow1, i ), aDestRect ); } diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index 1e315bf75d36..957d16fa20f7 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -1430,7 +1430,7 @@ long ScDPObject::GetHeaderDim( const ScAddress& rPos, sal_uInt16& rOrient ) } bool ScDPObject::GetHeaderDrag( const ScAddress& rPos, bool bMouseLeft, bool bMouseTop, long nDragDim, - Rectangle& rPosRect, sal_uInt16& rOrient, long& rDimPos ) + tools::Rectangle& rPosRect, sal_uInt16& rOrient, long& rDimPos ) { CreateOutput(); // create xSource and pOutput if not already done diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx index 188bc8af4fbf..6795a29c53db 100644 --- a/sc/source/core/data/dpoutput.cxx +++ b/sc/source/core/data/dpoutput.cxx @@ -1619,7 +1619,7 @@ long ScDPOutput::GetHeaderDim( const ScAddress& rPos, sal_uInt16& rOrient ) bool ScDPOutput::GetHeaderDrag( const ScAddress& rPos, bool bMouseLeft, bool bMouseTop, long nDragDim, - Rectangle& rPosRect, sal_uInt16& rOrient, long& rDimPos ) + tools::Rectangle& rPosRect, sal_uInt16& rOrient, long& rDimPos ) { // Rectangle instead of ScRange for rPosRect to allow for negative values @@ -1646,7 +1646,7 @@ bool ScDPOutput::GetHeaderDrag( const ScAddress& rPos, bool bMouseLeft, bool bMo } //TODO: find start of dimension - rPosRect = Rectangle( nDataStartCol, nMemberStartRow + nField, + rPosRect = tools::Rectangle( nDataStartCol, nMemberStartRow + nField, nTabEndCol, nMemberStartRow + nField -1 ); bool bFound = false; // is this within the same orientation? @@ -1700,7 +1700,7 @@ bool ScDPOutput::GetHeaderDrag( const ScAddress& rPos, bool bMouseLeft, bool bMo long nField = nCol - nTabStartCol; //TODO: find start of dimension - rPosRect = Rectangle( nTabStartCol + nField, nDataStartRow - 1, + rPosRect = tools::Rectangle( nTabStartCol + nField, nDataStartRow - 1, nTabStartCol + nField - 1, nTabEndRow ); bool bFound = false; // is this within the same orientation? @@ -1756,7 +1756,7 @@ bool ScDPOutput::GetHeaderDrag( const ScAddress& rPos, bool bMouseLeft, bool bMo } //TODO: find start of dimension - rPosRect = Rectangle( aStartPos.Col(), nPageStartRow + nField, + rPosRect = tools::Rectangle( aStartPos.Col(), nPageStartRow + nField, nTabEndCol, nPageStartRow + nField - 1 ); bool bFound = false; // is this within the same orientation? diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index c18c869a84cb..6d43f59c4f14 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -223,7 +223,7 @@ inline void ReverseTwipsToMM( long& nVal ) nVal = HmmToTwips (nVal); } -static void lcl_ReverseTwipsToMM( Rectangle& rRect ) +static void lcl_ReverseTwipsToMM( tools::Rectangle& rRect ) { ReverseTwipsToMM( rRect.Left() ); ReverseTwipsToMM( rRect.Right() ); @@ -605,9 +605,9 @@ void ScDrawLayer::SetPageSize( sal_uInt16 nPageNo, const Size& rSize, bool bUpda namespace { //Can't have a zero width dimension - Rectangle lcl_makeSafeRectangle(const Rectangle &rNew) + tools::Rectangle lcl_makeSafeRectangle(const tools::Rectangle &rNew) { - Rectangle aRect = rNew; + tools::Rectangle aRect = rNew; if (aRect.Bottom() == aRect.Top()) aRect.Bottom() = aRect.Top()+1; if (aRect.Right() == aRect.Left()) @@ -627,11 +627,11 @@ namespace return aAvailableDiff; } - Rectangle lcl_UpdateCalcPoly(basegfx::B2DPolygon &rCalcPoly, int nWhichPoint, const Point &rPos) + tools::Rectangle lcl_UpdateCalcPoly(basegfx::B2DPolygon &rCalcPoly, int nWhichPoint, const Point &rPos) { rCalcPoly.setB2DPoint(nWhichPoint, basegfx::B2DPoint(rPos.X(), rPos.Y())); basegfx::B2DRange aRange(basegfx::tools::getRange(rCalcPoly)); - return Rectangle(static_cast<long>(aRange.getMinX()), static_cast<long>(aRange.getMinY()), + return tools::Rectangle(static_cast<long>(aRange.getMinX()), static_cast<long>(aRange.getMinY()), static_cast<long>(aRange.getMaxX()), static_cast<long>(aRange.getMaxY())); } } @@ -656,7 +656,7 @@ void ScDrawLayer::ResizeLastRectFromAnchor( SdrObject* pObj, ScDrawObjData& rDat TwipsToMM( aEnd.Y() ); aEnd += lcl_calcAvailableDiff(*pDoc, nCol2, nRow2, nTab2, rData.maEndOffset); - Rectangle aNew = Rectangle( aPos, aEnd ); + tools::Rectangle aNew = tools::Rectangle( aPos, aEnd ); if ( bNegativePage ) MirrorRectRTL( aNew ); @@ -716,7 +716,7 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati Size aSize( (long)( TwipsToHmm( pDoc->GetColWidth( nCol1, nTab1) ) ), (long)( TwipsToHmm( pDoc->GetRowHeight( nRow1, nTab1) ) ) ); - Rectangle aRect( aPos, aSize ); + tools::Rectangle aRect( aPos, aSize ); aRect.Left() -= 250; aRect.Right() += 250; aRect.Top() -= 70; @@ -841,7 +841,7 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati double fShearX(0.0); Point aPoint; - Rectangle aRect; + tools::Rectangle aRect; basegfx::B2DTuple aScale; basegfx::B2DTuple aTranslate; @@ -891,7 +891,7 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati // is guaranteed to get consistent results) ResizeLastRectFromAnchor( pObj, rData, true, bNegativePage, bCanResize, false ); // aFullRect contains the unrotated size and position of the shape (regardless of any hidden row/columns) - Rectangle aFullRect = rData.maLastRect; + tools::Rectangle aFullRect = rData.maLastRect; // get current size and position from the anchor for use later ResizeLastRectFromAnchor( pObj, rNoRotatedAnchor, true, bNegativePage, bCanResize ); @@ -912,11 +912,11 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati if( bCanResize ) { - Rectangle aNew = rData.maLastRect; + tools::Rectangle aNew = rData.maLastRect; if ( pObj->GetSnapRect() != aNew ) { - Rectangle aOld(pObj->GetSnapRect()); + tools::Rectangle aOld(pObj->GetSnapRect()); if (bRecording) AddCalcUndo( new SdrUndoGeoObj( *pObj ) ); @@ -1026,7 +1026,7 @@ bool ScDrawLayer::GetPrintArea( ScRange& rRange, bool bSetHor, bool bSetVer ) co { //TODO: test Flags (hidden?) - Rectangle aObjRect = pObject->GetCurrentBoundRect(); + tools::Rectangle aObjRect = pObject->GetCurrentBoundRect(); bool bFit = true; if ( !bSetHor && ( aObjRect.Right() < nStartX || aObjRect.Left() > nEndX ) ) bFit = false; @@ -1149,7 +1149,7 @@ void ScDrawLayer::MoveArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCR bool bNegativePage = pDoc->IsNegativePage( nTab ); - Rectangle aRect = pDoc->GetMMRect( nCol1, nRow1, nCol2, nRow2, nTab ); + tools::Rectangle aRect = pDoc->GetMMRect( nCol1, nRow1, nCol2, nRow2, nTab ); lcl_ReverseTwipsToMM( aRect ); //TODO: use twips directly? @@ -1198,7 +1198,7 @@ bool ScDrawLayer::HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndRow ) if (!pPage->GetObjCount()) return false; - Rectangle aTestRect; + tools::Rectangle aTestRect; aTestRect.Top() += pDoc->GetRowHeight( 0, nStartRow-1, nTab); @@ -1222,7 +1222,7 @@ bool ScDrawLayer::HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndRow ) bool bFound = false; - Rectangle aObjRect; + tools::Rectangle aObjRect; SdrObjListIter aIter( *pPage ); SdrObject* pObject = aIter.Next(); while ( pObject && !bFound ) @@ -1255,7 +1255,7 @@ void ScDrawLayer::DeleteObjectsInArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1, if (nObjCount) { size_t nDelCount = 0; - Rectangle aDelRect = pDoc->GetMMRect( nCol1, nRow1, nCol2, nRow2, nTab ); + tools::Rectangle aDelRect = pDoc->GetMMRect( nCol1, nRow1, nCol2, nRow2, nTab ); std::unique_ptr<SdrObject*[]> ppObj(new SdrObject*[nObjCount]); @@ -1267,7 +1267,7 @@ void ScDrawLayer::DeleteObjectsInArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1, // TODO: detective objects are still deleted, is this desired? if (!IsNoteCaption( pObject )) { - Rectangle aObjRect = pObject->GetCurrentBoundRect(); + tools::Rectangle aObjRect = pObject->GetCurrentBoundRect(); if ( aDelRect.IsInside( aObjRect ) ) ppObj[nDelCount++] = pObject; } @@ -1310,7 +1310,7 @@ void ScDrawLayer::DeleteObjectsInSelection( const ScMarkData& rMark ) { size_t nDelCount = 0; // Rectangle around the whole selection - Rectangle aMarkBound = pDoc->GetMMRect( + tools::Rectangle aMarkBound = pDoc->GetMMRect( aMarkRange.aStart.Col(), aMarkRange.aStart.Row(), aMarkRange.aEnd.Col(), aMarkRange.aEnd.Row(), nTab ); @@ -1324,7 +1324,7 @@ void ScDrawLayer::DeleteObjectsInSelection( const ScMarkData& rMark ) // TODO: detective objects are still deleted, is this desired? if (!IsNoteCaption( pObject )) { - Rectangle aObjRect = pObject->GetCurrentBoundRect(); + tools::Rectangle aObjRect = pObject->GetCurrentBoundRect(); if ( aMarkBound.IsInside( aObjRect ) ) { ScRange aRange = pDoc->GetRange( nTab, aObjRect ); @@ -1353,7 +1353,7 @@ void ScDrawLayer::DeleteObjectsInSelection( const ScMarkData& rMark ) } } -void ScDrawLayer::CopyToClip( ScDocument* pClipDoc, SCTAB nTab, const Rectangle& rRange ) +void ScDrawLayer::CopyToClip( ScDocument* pClipDoc, SCTAB nTab, const tools::Rectangle& rRange ) { // copy everything in the specified range into the same page (sheet) in the clipboard doc @@ -1367,7 +1367,7 @@ void ScDrawLayer::CopyToClip( ScDocument* pClipDoc, SCTAB nTab, const Rectangle& SdrObject* pOldObject = aIter.Next(); while (pOldObject) { - Rectangle aObjRect = pOldObject->GetCurrentBoundRect(); + tools::Rectangle aObjRect = pOldObject->GetCurrentBoundRect(); // do not copy internal objects (detective) and note captions if ( rRange.IsInside( aObjRect ) && (pOldObject->GetLayer() != SC_LAYER_INTERN) && !IsNoteCaption( pOldObject ) ) { @@ -1457,8 +1457,8 @@ static bool lcl_MoveRanges( ::std::vector< ScRangeList >& rRangesVector, const S return bChanged; } -void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const Rectangle& rSourceRange, - const ScAddress& rDestPos, const Rectangle& rDestRange ) +void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const tools::Rectangle& rSourceRange, + const ScAddress& rDestPos, const tools::Rectangle& rDestRange ) { OSL_ENSURE( pDoc, "ScDrawLayer::CopyFromClip without document" ); if ( !pDoc ) @@ -1477,7 +1477,7 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const rDestRange.Left() > 0 && rDestRange.Right() > 0 ) || ( rSourceRange.Left() > 0 && rSourceRange.Right() > 0 && rDestRange.Left() < 0 && rDestRange.Right() < 0 ); - Rectangle aMirroredSource = rSourceRange; + tools::Rectangle aMirroredSource = rSourceRange; if ( bMirrorObj ) MirrorRectRTL( aMirroredSource ); @@ -1550,7 +1550,7 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const while (pOldObject) { - Rectangle aObjRect = pOldObject->GetCurrentBoundRect(); + tools::Rectangle aObjRect = pOldObject->GetCurrentBoundRect(); // do not copy internal objects (detective) and note captions if ( rSourceRange.IsInside( aObjRect ) && (pOldObject->GetLayer() != SC_LAYER_INTERN) && !IsNoteCaption( pOldObject ) ) { @@ -1685,7 +1685,7 @@ void ScDrawLayer::MirrorRTL( SdrObject* pObj ) // Move instead of mirroring: // New start position is negative of old end position // -> move by sum of start and end position - Rectangle aObjRect = pObj->GetLogicRect(); + tools::Rectangle aObjRect = pObj->GetLogicRect(); Size aMoveSize( -(aObjRect.Left() + aObjRect.Right()), 0 ); if (bRecording) AddCalcUndo( new SdrUndoMoveObj( *pObj, aMoveSize ) ); @@ -1693,7 +1693,7 @@ void ScDrawLayer::MirrorRTL( SdrObject* pObj ) } } -void ScDrawLayer::MirrorRectRTL( Rectangle& rRect ) +void ScDrawLayer::MirrorRectRTL( tools::Rectangle& rRect ) { // mirror and swap left/right long nTemp = rRect.Left(); @@ -1701,9 +1701,9 @@ void ScDrawLayer::MirrorRectRTL( Rectangle& rRect ) rRect.Right() = -nTemp; } -Rectangle ScDrawLayer::GetCellRect( ScDocument& rDoc, const ScAddress& rPos, bool bMergedCell ) +tools::Rectangle ScDrawLayer::GetCellRect( ScDocument& rDoc, const ScAddress& rPos, bool bMergedCell ) { - Rectangle aCellRect; + tools::Rectangle aCellRect; OSL_ENSURE( ValidColRowTab( rPos.Col(), rPos.Row(), rPos.Tab() ), "ScDrawLayer::GetCellRect - invalid cell address" ); if( ValidColRowTab( rPos.Col(), rPos.Row(), rPos.Tab() ) ) { @@ -1735,7 +1735,7 @@ Rectangle ScDrawLayer::GetCellRect( ScDocument& rDoc, const ScAddress& rPos, boo aBotRight.X() = static_cast< long >( aBotRight.X() * HMM_PER_TWIPS ); aBotRight.Y() = static_cast< long >( aBotRight.Y() * HMM_PER_TWIPS ); - aCellRect = Rectangle( aTopLeft, aBotRight ); + aCellRect = tools::Rectangle( aTopLeft, aBotRight ); if( rDoc.IsNegativePage( rPos.Tab() ) ) MirrorRectRTL( aCellRect ); } @@ -1914,10 +1914,10 @@ void ScDrawLayer::SetCellAnchoredFromPosition( SdrObject &rObj, const ScDocument void ScDrawLayer::GetCellAnchorFromPosition( SdrObject &rObj, ScDrawObjData &rAnchor, const ScDocument &rDoc, SCTAB nTab, bool bUseLogicRect, bool bHiddenAsZero ) { - Rectangle aObjRect( bUseLogicRect ? rObj.GetLogicRect() : rObj.GetSnapRect() ); + tools::Rectangle aObjRect( bUseLogicRect ? rObj.GetLogicRect() : rObj.GetSnapRect() ); ScRange aRange = rDoc.GetRange( nTab, aObjRect, bHiddenAsZero ); - Rectangle aCellRect; + tools::Rectangle aCellRect; rAnchor.maStart = aRange.aStart; aCellRect = rDoc.GetMMRect( aRange.aStart.Col(), aRange.aStart.Row(), @@ -1941,13 +1941,13 @@ void ScDrawLayer::GetCellAnchorFromPosition( SdrObject &rObj, ScDrawObjData &rAn void ScDrawLayer::UpdateCellAnchorFromPositionEnd( SdrObject &rObj, ScDrawObjData &rAnchor, const ScDocument &rDoc, SCTAB nTab, bool bUseLogicRect ) { - Rectangle aObjRect(bUseLogicRect ? rObj.GetLogicRect() : rObj.GetSnapRect()); + tools::Rectangle aObjRect(bUseLogicRect ? rObj.GetLogicRect() : rObj.GetSnapRect()); ScRange aRange = rDoc.GetRange( nTab, aObjRect ); ScDrawObjData* pAnchor = &rAnchor; pAnchor->maEnd = aRange.aEnd; - Rectangle aCellRect; + tools::Rectangle aCellRect; aCellRect = rDoc.GetMMRect( aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aEnd.Tab() ); pAnchor->maEndOffset.Y() = aObjRect.Bottom()-aCellRect.Top(); @@ -2046,7 +2046,7 @@ IMapObject* ScDrawLayer::GetHitIMapObject( SdrObject* pObj, const MapMode aMap100( MapUnit::Map100thMM ); MapMode aWndMode = rCmpWnd.GetMapMode(); Point aRelPoint( rCmpWnd.LogicToLogic( rWinPoint, &aWndMode, &aMap100 ) ); - Rectangle aLogRect = rCmpWnd.LogicToLogic( pObj->GetLogicRect(), &aWndMode, &aMap100 ); + tools::Rectangle aLogRect = rCmpWnd.LogicToLogic( pObj->GetLogicRect(), &aWndMode, &aMap100 ); ScIMapInfo* pIMapInfo = GetIMapInfo( pObj ); IMapObject* pIMapObj = nullptr; diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx index 2f1763266ce1..1bb1f89e506d 100644 --- a/sc/source/core/data/postit.cxx +++ b/sc/source/core/data/postit.cxx @@ -169,9 +169,9 @@ public: ScCaptionPtr GetCaption() { return mxCaption; } /** Moves the caption inside the passed rectangle. Uses page area if 0 is passed. */ - void FitCaptionToRect( const Rectangle* pVisRect = nullptr ); + void FitCaptionToRect( const tools::Rectangle* pVisRect = nullptr ); /** Places the caption inside the passed rectangle, tries to keep the cell rectangle uncovered. Uses page area if 0 is passed. */ - void AutoPlaceCaption( const Rectangle* pVisRect = nullptr ); + void AutoPlaceCaption( const tools::Rectangle* pVisRect = nullptr ); /** Updates caption tail and textbox according to current cell position. Uses page area if 0 is passed. */ void UpdateCaptionPos(); @@ -188,14 +188,14 @@ private: /** Initializes all members. */ void Initialize(); /** Returns the passed rectangle if existing, page rectangle otherwise. */ - const Rectangle& GetVisRect( const Rectangle* pVisRect ) const { return pVisRect ? *pVisRect : maPageRect; } + const tools::Rectangle& GetVisRect( const tools::Rectangle* pVisRect ) const { return pVisRect ? *pVisRect : maPageRect; } private: ScDocument& mrDoc; ScAddress maPos; ScCaptionPtr mxCaption; - Rectangle maPageRect; - Rectangle maCellRect; + tools::Rectangle maPageRect; + tools::Rectangle maCellRect; bool mbNegPage; }; @@ -228,9 +228,9 @@ SdrPage* ScCaptionCreator::GetDrawPage() return pDrawLayer ? pDrawLayer->GetPage( static_cast< sal_uInt16 >( maPos.Tab() ) ) : nullptr; } -void ScCaptionCreator::FitCaptionToRect( const Rectangle* pVisRect ) +void ScCaptionCreator::FitCaptionToRect( const tools::Rectangle* pVisRect ) { - const Rectangle& rVisRect = GetVisRect( pVisRect ); + const tools::Rectangle& rVisRect = GetVisRect( pVisRect ); // tail position Point aTailPos = mxCaption->GetTailPos(); @@ -239,7 +239,7 @@ void ScCaptionCreator::FitCaptionToRect( const Rectangle* pVisRect ) mxCaption->SetTailPos( aTailPos ); // caption rectangle - Rectangle aCaptRect = mxCaption->GetLogicRect(); + tools::Rectangle aCaptRect = mxCaption->GetLogicRect(); Point aCaptPos = aCaptRect.TopLeft(); // move textbox inside right border of visible area aCaptPos.X() = ::std::min< long >( aCaptPos.X(), rVisRect.Right() - aCaptRect.GetWidth() ); @@ -254,12 +254,12 @@ void ScCaptionCreator::FitCaptionToRect( const Rectangle* pVisRect ) mxCaption->SetLogicRect( aCaptRect ); } -void ScCaptionCreator::AutoPlaceCaption( const Rectangle* pVisRect ) +void ScCaptionCreator::AutoPlaceCaption( const tools::Rectangle* pVisRect ) { - const Rectangle& rVisRect = GetVisRect( pVisRect ); + const tools::Rectangle& rVisRect = GetVisRect( pVisRect ); // caption rectangle - Rectangle aCaptRect = mxCaption->GetLogicRect(); + tools::Rectangle aCaptRect = mxCaption->GetLogicRect(); long nWidth = aCaptRect.GetWidth(); long nHeight = aCaptRect.GetHeight(); @@ -334,7 +334,7 @@ void ScCaptionCreator::UpdateCaptionPos() if( pDrawLayer && pDrawLayer->IsRecording() ) pDrawLayer->AddCalcUndo( new SdrUndoGeoObj( *mxCaption ) ); // calculate new caption rectangle (#i98141# handle LTR<->RTL switch correctly) - Rectangle aCaptRect = mxCaption->GetLogicRect(); + tools::Rectangle aCaptRect = mxCaption->GetLogicRect(); long nDiffX = (rOldTailPos.X() >= 0) ? (aCaptRect.Left() - rOldTailPos.X()) : (rOldTailPos.X() - aCaptRect.Right()); if( mbNegPage ) nDiffX = -nDiffX - aCaptRect.GetWidth(); long nDiffY = aCaptRect.Top() - rOldTailPos.Y(); @@ -372,7 +372,7 @@ Point ScCaptionCreator::CalcTailPos( bool bTailFront ) void ScCaptionCreator::CreateCaption( bool bShown, bool bTailFront ) { // create the caption drawing object - Rectangle aTextRect( Point( 0 , 0 ), Size( SC_NOTECAPTION_WIDTH, SC_NOTECAPTION_HEIGHT ) ); + tools::Rectangle aTextRect( Point( 0 , 0 ), Size( SC_NOTECAPTION_WIDTH, SC_NOTECAPTION_HEIGHT ) ); Point aTailPos = CalcTailPos( bTailFront ); mxCaption.reset( new SdrCaptionObj( aTextRect, aTailPos )); // basic caption settings @@ -385,7 +385,7 @@ void ScCaptionCreator::Initialize() mbNegPage = mrDoc.IsNegativePage( maPos.Tab() ); if( SdrPage* pDrawPage = GetDrawPage() ) { - maPageRect = Rectangle( Point( 0, 0 ), pDrawPage->GetSize() ); + maPageRect = tools::Rectangle( Point( 0, 0 ), pDrawPage->GetSize() ); /* #i98141# SdrPage::GetSize() returns negative width in RTL mode. The call to Rectangle::Adjust() orders left/right coordinate accordingly. */ @@ -1011,11 +1011,11 @@ void ScPostIt::CreateCaptionFromInitData( const ScAddress& rPos ) const } else { - Rectangle aCellRect = ScDrawLayer::GetCellRect( mrDoc, rPos, true ); + tools::Rectangle aCellRect = ScDrawLayer::GetCellRect( mrDoc, rPos, true ); bool bNegPage = mrDoc.IsNegativePage( rPos.Tab() ); long nPosX = bNegPage ? (aCellRect.Left() - rInitData.maCaptionOffset.X()) : (aCellRect.Right() + rInitData.maCaptionOffset.X()); long nPosY = aCellRect.Top() + rInitData.maCaptionOffset.Y(); - Rectangle aCaptRect( Point( nPosX, nPosY ), rInitData.maCaptionSize ); + tools::Rectangle aCaptRect( Point( nPosX, nPosY ), rInitData.maCaptionSize ); maNoteData.mxCaption->SetLogicRect( aCaptRect ); aCreator.FitCaptionToRect(); } @@ -1054,7 +1054,7 @@ void ScPostIt::CreateCaption( const ScAddress& rPos, const SdrCaptionObj* pCapti // copy formatting items (after text has been copied to apply font formatting) maNoteData.mxCaption->SetMergedItemSetAndBroadcast( pCaption->GetMergedItemSet() ); // move textbox position relative to new cell, copy textbox size - Rectangle aCaptRect = pCaption->GetLogicRect(); + tools::Rectangle aCaptRect = pCaption->GetLogicRect(); Point aDist = maNoteData.mxCaption->GetTailPos() - pCaption->GetTailPos(); aCaptRect.Move( aDist.X(), aDist.Y() ); maNoteData.mxCaption->SetLogicRect( aCaptRect ); @@ -1111,7 +1111,7 @@ void ScPostIt::RemoveCaption() ScCaptionPtr ScNoteUtil::CreateTempCaption( ScDocument& rDoc, const ScAddress& rPos, SdrPage& rDrawPage, - const OUString& rUserText, const Rectangle& rVisRect, bool bTailFront ) + const OUString& rUserText, const tools::Rectangle& rVisRect, bool bTailFront ) { OUStringBuffer aBuffer( rUserText ); // add plain text of invisible (!) cell note (no formatting etc.) @@ -1129,7 +1129,7 @@ ScCaptionPtr ScNoteUtil::CreateTempCaption( return ScCaptionPtr(); // prepare visible rectangle (add default distance to all borders) - Rectangle aVisRect( + tools::Rectangle aVisRect( rVisRect.Left() + SC_NOTECAPTION_BORDERDIST_TEMP, rVisRect.Top() + SC_NOTECAPTION_BORDERDIST_TEMP, rVisRect.Right() - SC_NOTECAPTION_BORDERDIST_TEMP, @@ -1150,7 +1150,7 @@ ScCaptionPtr ScNoteUtil::CreateTempCaption( pCaption->SetOutlinerParaObject( new OutlinerParaObject( *pOPO ) ); // set formatting (must be done after setting text) and resize the box to fit the text pCaption->SetMergedItemSetAndBroadcast( pNoteCaption->GetMergedItemSet() ); - Rectangle aCaptRect( pCaption->GetLogicRect().TopLeft(), pNoteCaption->GetLogicRect().GetSize() ); + tools::Rectangle aCaptRect( pCaption->GetLogicRect().TopLeft(), pNoteCaption->GetLogicRect().GetSize() ); pCaption->SetLogicRect( aCaptRect ); } else @@ -1192,7 +1192,7 @@ ScPostIt* ScNoteUtil::CreateNoteFromCaption( ScPostIt* ScNoteUtil::CreateNoteFromObjectData( ScDocument& rDoc, const ScAddress& rPos, SfxItemSet* pItemSet, - OutlinerParaObject* pOutlinerObj, const Rectangle& rCaptionRect, + OutlinerParaObject* pOutlinerObj, const tools::Rectangle& rCaptionRect, bool bShown, bool bAlwaysCreateCaption ) { OSL_ENSURE( pItemSet && pOutlinerObj, "ScNoteUtil::CreateNoteFromObjectData - item set and outliner object expected" ); @@ -1206,7 +1206,7 @@ ScPostIt* ScNoteUtil::CreateNoteFromObjectData( rInitData.mbDefaultPosSize = rCaptionRect.IsEmpty(); if( !rInitData.mbDefaultPosSize ) { - Rectangle aCellRect = ScDrawLayer::GetCellRect( rDoc, rPos, true ); + tools::Rectangle aCellRect = ScDrawLayer::GetCellRect( rDoc, rPos, true ); bool bNegPage = rDoc.IsNegativePage( rPos.Tab() ); rInitData.maCaptionOffset.X() = bNegPage ? (aCellRect.Left() - rCaptionRect.Right()) : (rCaptionRect.Left() - aCellRect.Right()); rInitData.maCaptionOffset.Y() = rCaptionRect.Top() - aCellRect.Top(); diff --git a/sc/source/core/tool/charthelper.cxx b/sc/source/core/tool/charthelper.cxx index cb6b9f5ad980..5ccc1b1541d3 100644 --- a/sc/source/core/tool/charthelper.cxx +++ b/sc/source/core/tool/charthelper.cxx @@ -427,7 +427,7 @@ void ScChartHelper::CreateProtectedChartListenersAndNotify( ScDocument* pDoc, Sd if ( pModelObj && pModelObj->HasChangesListeners() ) { - Rectangle aRectangle = pSdrOle2Obj->GetSnapRect(); + tools::Rectangle aRectangle = pSdrOle2Obj->GetSnapRect(); ScRange aRange( pDoc->GetRange( nTab, aRectangle ) ); ScRangeList aChangeRanges; aChangeRanges.Append( aRange ); diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx index 0186c0ce5586..9544fb20453c 100644 --- a/sc/source/core/tool/detfunc.cxx +++ b/sc/source/core/tool/detfunc.cxx @@ -337,16 +337,16 @@ Point ScDetectiveFunc::GetDrawPos( SCCOL nCol, SCROW nRow, DrawPosMode eMode ) c return aPos; } -Rectangle ScDetectiveFunc::GetDrawRect( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) const +tools::Rectangle ScDetectiveFunc::GetDrawRect( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) const { - Rectangle aRect( + tools::Rectangle aRect( GetDrawPos( ::std::min( nCol1, nCol2 ), ::std::min( nRow1, nRow2 ), DrawPosMode::TopLeft ), GetDrawPos( ::std::max( nCol1, nCol2 ), ::std::max( nRow1, nRow2 ), DrawPosMode::BottomRight ) ); aRect.Justify(); // reorder left/right in RTL sheets return aRect; } -Rectangle ScDetectiveFunc::GetDrawRect( SCCOL nCol, SCROW nRow ) const +tools::Rectangle ScDetectiveFunc::GetDrawRect( SCCOL nCol, SCROW nRow ) const { return GetDrawRect( nCol, nRow, nCol, nRow ); } @@ -381,8 +381,8 @@ bool ScDetectiveFunc::HasArrow( const ScAddress& rStart, return true; } - Rectangle aStartRect; - Rectangle aEndRect; + tools::Rectangle aStartRect; + tools::Rectangle aEndRect; if (!bStartAlien) aStartRect = GetDrawRect( rStart.Col(), rStart.Row() ); if (!bEndAlien) @@ -455,7 +455,7 @@ bool ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow, { // insert the rectangle before the arrow - this is relied on in FindFrameForObject - Rectangle aRect = GetDrawRect( nRefStartCol, nRefStartRow, nRefEndCol, nRefEndRow ); + tools::Rectangle aRect = GetDrawRect( nRefStartCol, nRefStartRow, nRefEndCol, nRefEndRow ); SdrRectObj* pBox = new SdrRectObj( aRect ); pBox->SetMergedItemSetAndBroadcast(rData.GetBoxSet()); @@ -498,7 +498,7 @@ bool ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow, aTempPoly.append(basegfx::B2DPoint(aStartPos.X(), aStartPos.Y())); aTempPoly.append(basegfx::B2DPoint(aEndPos.X(), aEndPos.Y())); SdrPathObj* pArrow = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aTempPoly)); - pArrow->NbcSetLogicRect(Rectangle(aStartPos,aEndPos)); //TODO: needed ??? + pArrow->NbcSetLogicRect(tools::Rectangle(aStartPos,aEndPos)); //TODO: needed ??? pArrow->SetMergedItemSetAndBroadcast(rAttrSet); pArrow->SetLayer( SC_LAYER_INTERN ); @@ -528,7 +528,7 @@ bool ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow, bool bArea = ( nStartCol != nEndCol || nStartRow != nEndRow ); if (bArea) { - Rectangle aRect = GetDrawRect( nStartCol, nStartRow, nEndCol, nEndRow ); + tools::Rectangle aRect = GetDrawRect( nStartCol, nStartRow, nEndCol, nEndRow ); SdrRectObj* pBox = new SdrRectObj( aRect ); pBox->SetMergedItemSetAndBroadcast(rData.GetBoxSet()); @@ -563,7 +563,7 @@ bool ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow, aTempPoly.append(basegfx::B2DPoint(aStartPos.X(), aStartPos.Y())); aTempPoly.append(basegfx::B2DPoint(aEndPos.X(), aEndPos.Y())); SdrPathObj* pArrow = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aTempPoly)); - pArrow->NbcSetLogicRect(Rectangle(aStartPos,aEndPos)); //TODO: needed ??? + pArrow->NbcSetLogicRect(tools::Rectangle(aStartPos,aEndPos)); //TODO: needed ??? pArrow->SetMergedItemSetAndBroadcast(rAttrSet); @@ -622,7 +622,7 @@ void ScDetectiveFunc::DrawCircle( SCCOL nCol, SCROW nRow, ScDetectiveData& rData ScDrawLayer* pModel = pDoc->GetDrawLayer(); SdrPage* pPage = pModel->GetPage(static_cast<sal_uInt16>(nTab)); - Rectangle aRect = GetDrawRect( nCol, nRow ); + tools::Rectangle aRect = GetDrawRect( nCol, nRow ); aRect.Left() -= 250; aRect.Right() += 250; aRect.Top() -= 70; @@ -647,7 +647,7 @@ void ScDetectiveFunc::DrawCircle( SCCOL nCol, SCROW nRow, ScDetectiveData& rData void ScDetectiveFunc::DeleteArrowsAt( SCCOL nCol, SCROW nRow, bool bDestPnt ) { - Rectangle aRect = GetDrawRect( nCol, nRow ); + tools::Rectangle aRect = GetDrawRect( nCol, nRow ); ScDrawLayer* pModel = pDoc->GetDrawLayer(); SdrPage* pPage = pModel->GetPage(static_cast<sal_uInt16>(nTab)); @@ -701,7 +701,7 @@ void ScDetectiveFunc::DeleteArrowsAt( SCCOL nCol, SCROW nRow, bool bDestPnt ) #define SC_DET_TOLERANCE 50 -inline bool RectIsPoints( const Rectangle& rRect, const Point& rStart, const Point& rEnd ) +inline bool RectIsPoints( const tools::Rectangle& rRect, const Point& rStart, const Point& rEnd ) { return rRect.Left() >= rStart.X() - SC_DET_TOLERANCE && rRect.Left() <= rStart.X() + SC_DET_TOLERANCE @@ -717,10 +717,10 @@ inline bool RectIsPoints( const Rectangle& rRect, const Point& rStart, const Poi void ScDetectiveFunc::DeleteBox( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) { - Rectangle aCornerRect = GetDrawRect( nCol1, nRow1, nCol2, nRow2 ); + tools::Rectangle aCornerRect = GetDrawRect( nCol1, nRow1, nCol2, nRow2 ); Point aStartCorner = aCornerRect.TopLeft(); Point aEndCorner = aCornerRect.BottomRight(); - Rectangle aObjRect; + tools::Rectangle aObjRect; ScDrawLayer* pModel = pDoc->GetDrawLayer(); SdrPage* pPage = pModel->GetPage(static_cast<sal_uInt16>(nTab)); diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx index 8f44941be3dd..94a762a9f7ca 100644 --- a/sc/source/core/tool/editutil.cxx +++ b/sc/source/core/tool/editutil.cxx @@ -277,7 +277,7 @@ OUString ScEditUtil::GetCellFieldValue( return aRet; } -Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, bool bForceToTop ) +tools::Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, bool bForceToTop ) { // bForceToTop = always align to top, for editing // (sal_False for querying URLs etc.) @@ -365,7 +365,7 @@ Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, bool bForceToT aStartPos.X() -= nCellX - 2; // excluding grid on both sides // -1 -> don't overwrite grid - return Rectangle( aStartPos, Size(nCellX-1,nCellY-1) ); + return tools::Rectangle( aStartPos, Size(nCellX-1,nCellY-1) ); } ScEditAttrTester::ScEditAttrTester( ScEditEngineDefaulter* pEng ) : diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx index c7db4c085302..5a4509946dd4 100644 --- a/sc/source/filter/excel/xechart.cxx +++ b/sc/source/filter/excel/xechart.cxx @@ -329,7 +329,7 @@ const XclChFormatInfo& XclExpChRoot::GetFormatInfo( XclChObjectType eObjType ) c return mxChData->mxFmtInfoProv->GetFormatInfo( eObjType ); } -void XclExpChRoot::InitConversion( css::uno::Reference< css::chart2::XChartDocument > const & xChartDoc, const Rectangle& rChartRect ) const +void XclExpChRoot::InitConversion( css::uno::Reference< css::chart2::XChartDocument > const & xChartDoc, const tools::Rectangle& rChartRect ) const { mxChData->InitConversion( GetRoot(), xChartDoc, rChartRect ); } @@ -3308,7 +3308,7 @@ static void lcl_getChartSubTitle(const Reference<XChartDocument>& xChartDoc, } XclExpChChart::XclExpChChart( const XclExpRoot& rRoot, - Reference< XChartDocument > const & xChartDoc, const Rectangle& rChartRect ) : + Reference< XChartDocument > const & xChartDoc, const tools::Rectangle& rChartRect ) : XclExpChGroupBase( XclExpChRoot( rRoot, *this ), EXC_CHFRBLOCK_TYPE_CHART, EXC_ID_CHCHART, 16 ) { Size aPtSize = OutputDevice::LogicToLogic( rChartRect.GetSize(), MapMode( MapUnit::Map100thMM ), MapMode( MapUnit::MapPoint ) ); @@ -3468,7 +3468,7 @@ void XclExpChartDrawing::Save( XclExpStream& rStrm ) mxObjRecs->Save( rStrm ); } -XclExpChart::XclExpChart( const XclExpRoot& rRoot, Reference< XModel > const & xModel, const Rectangle& rChartRect ) : +XclExpChart::XclExpChart( const XclExpRoot& rRoot, Reference< XModel > const & xModel, const tools::Rectangle& rChartRect ) : XclExpSubStream( EXC_BOF_CHART ), XclExpRoot( rRoot ) { diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx index 9c3999b9de65..b6ef37881da8 100644 --- a/sc/source/filter/excel/xeescher.cxx +++ b/sc/source/filter/excel/xeescher.cxx @@ -138,7 +138,7 @@ const char *ToVertAlign( SdrTextVertAdjust eAdjust ) } } -void lcl_WriteAnchorVertex( sax_fastparser::FSHelperPtr const & rComments, Rectangle &aRect ) +void lcl_WriteAnchorVertex( sax_fastparser::FSHelperPtr const & rComments, tools::Rectangle &aRect ) { rComments->startElement( FSNS( XML_xdr, XML_col ), FSEND ); rComments->writeEscaped( OUString::number( aRect.Left() ) ); @@ -154,7 +154,7 @@ void lcl_WriteAnchorVertex( sax_fastparser::FSHelperPtr const & rComments, Recta rComments->endElement( FSNS( XML_xdr, XML_rowOff ) ); } -void lcl_GetFromTo( const XclExpRoot& rRoot, const Rectangle &aRect, sal_Int32 nTab, Rectangle &aFrom, Rectangle &aTo ) +void lcl_GetFromTo( const XclExpRoot& rRoot, const tools::Rectangle &aRect, sal_Int32 nTab, tools::Rectangle &aFrom, tools::Rectangle &aTo ) { sal_Int32 nCol = 0, nRow = 0; sal_Int32 nColOff = 0, nRowOff= 0; @@ -164,7 +164,7 @@ void lcl_GetFromTo( const XclExpRoot& rRoot, const Rectangle &aRect, sal_Int32 n { while(true) { - Rectangle r = rRoot.GetDocRef().GetMMRect( nCol,nRow,nCol,nRow,nTab ); + tools::Rectangle r = rRoot.GetDocRef().GetMMRect( nCol,nRow,nCol,nRow,nTab ); if( r.Left() <= aRect.Left() ) { nCol++; @@ -177,7 +177,7 @@ void lcl_GetFromTo( const XclExpRoot& rRoot, const Rectangle &aRect, sal_Int32 n } if( r.Left() > aRect.Left() && r.Top() > aRect.Top() ) { - aFrom = Rectangle( nCol-1, lcl_hmm2px( nColOff ), + aFrom = tools::Rectangle( nCol-1, lcl_hmm2px( nColOff ), nRow-1, lcl_hmm2px( nRowOff ) ); break; } @@ -187,7 +187,7 @@ void lcl_GetFromTo( const XclExpRoot& rRoot, const Rectangle &aRect, sal_Int32 n { while(true) { - Rectangle r = rRoot.GetDocRef().GetMMRect( nCol,nRow,nCol,nRow,nTab ); + tools::Rectangle r = rRoot.GetDocRef().GetMMRect( nCol,nRow,nCol,nRow,nTab ); if( r.Left() >= aRect.Left() ) { nCol++; @@ -200,7 +200,7 @@ void lcl_GetFromTo( const XclExpRoot& rRoot, const Rectangle &aRect, sal_Int32 n } if( r.Left() < aRect.Left() && r.Top() > aRect.Top() ) { - aFrom = Rectangle( nCol-1, lcl_hmm2px( nColOff ), + aFrom = tools::Rectangle( nCol-1, lcl_hmm2px( nColOff ), nRow-1, lcl_hmm2px( nRowOff ) ); break; } @@ -210,14 +210,14 @@ void lcl_GetFromTo( const XclExpRoot& rRoot, const Rectangle &aRect, sal_Int32 n { while(true) { - Rectangle r = rRoot.GetDocRef().GetMMRect( nCol,nRow,nCol,nRow,nTab ); + tools::Rectangle r = rRoot.GetDocRef().GetMMRect( nCol,nRow,nCol,nRow,nTab ); if( r.Right() < aRect.Right() ) nCol++; if( r.Bottom() < aRect.Bottom() ) nRow++; if( r.Right() >= aRect.Right() && r.Bottom() >= aRect.Bottom() ) { - aTo = Rectangle( nCol, lcl_hmm2px( aRect.Right() - r.Left() ), + aTo = tools::Rectangle( nCol, lcl_hmm2px( aRect.Right() - r.Left() ), nRow, lcl_hmm2px( aRect.Bottom() - r.Top() )); break; } @@ -227,14 +227,14 @@ void lcl_GetFromTo( const XclExpRoot& rRoot, const Rectangle &aRect, sal_Int32 n { while(true) { - Rectangle r = rRoot.GetDocRef().GetMMRect( nCol,nRow,nCol,nRow,nTab ); + tools::Rectangle r = rRoot.GetDocRef().GetMMRect( nCol,nRow,nCol,nRow,nTab ); if( r.Right() >= aRect.Right() ) nCol++; if( r.Bottom() < aRect.Bottom() ) nRow++; if( r.Right() < aRect.Right() && r.Bottom() >= aRect.Bottom() ) { - aTo = Rectangle( nCol, lcl_hmm2px( r.Left() - aRect.Right() ), + aTo = tools::Rectangle( nCol, lcl_hmm2px( r.Left() - aRect.Right() ), nRow, lcl_hmm2px( aRect.Bottom() - r.Top() )); break; } @@ -270,7 +270,7 @@ void XclExpDffAnchorBase::WriteDffData( EscherEx& rEscherEx ) const WriteXclObjAnchor( rEscherEx.GetStream(), maAnchor ); } -void XclExpDffAnchorBase::WriteData( EscherEx& rEscherEx, const Rectangle& rRect ) +void XclExpDffAnchorBase::WriteData( EscherEx& rEscherEx, const tools::Rectangle& rRect ) { // the passed rectangle is in twips ImplCalcAnchorRect( rRect, MapUnit::MapTwip ); @@ -282,7 +282,7 @@ void XclExpDffAnchorBase::ImplSetFlags( const SdrObject& ) OSL_FAIL( "XclExpDffAnchorBase::ImplSetFlags - not implemented" ); } -void XclExpDffAnchorBase::ImplCalcAnchorRect( const Rectangle&, MapUnit ) +void XclExpDffAnchorBase::ImplCalcAnchorRect( const tools::Rectangle&, MapUnit ) { OSL_FAIL( "XclExpDffAnchorBase::ImplCalcAnchorRect - not implemented" ); } @@ -302,7 +302,7 @@ void XclExpDffSheetAnchor::ImplSetFlags( const SdrObject& rSdrObj ) mnFlags = EXC_ESC_ANCHOR_LOCKED; } -void XclExpDffSheetAnchor::ImplCalcAnchorRect( const Rectangle& rRect, MapUnit eMapUnit ) +void XclExpDffSheetAnchor::ImplCalcAnchorRect( const tools::Rectangle& rRect, MapUnit eMapUnit ) { maAnchor.SetRect( GetRoot(), mnScTab, rRect, eMapUnit ); } @@ -321,12 +321,12 @@ void XclExpDffEmbeddedAnchor::ImplSetFlags( const SdrObject& /*rSdrObj*/ ) // TODO (unsupported feature): fixed size } -void XclExpDffEmbeddedAnchor::ImplCalcAnchorRect( const Rectangle& rRect, MapUnit eMapUnit ) +void XclExpDffEmbeddedAnchor::ImplCalcAnchorRect( const tools::Rectangle& rRect, MapUnit eMapUnit ) { maAnchor.SetRect( maPageSize, mnScaleX, mnScaleY, rRect, eMapUnit ); } -XclExpDffNoteAnchor::XclExpDffNoteAnchor( const XclExpRoot& rRoot, const Rectangle& rRect ) : +XclExpDffNoteAnchor::XclExpDffNoteAnchor( const XclExpRoot& rRoot, const tools::Rectangle& rRect ) : XclExpDffAnchorBase( rRoot, EXC_ESC_ANCHOR_SIZELOCKED ) { maAnchor.SetRect( rRoot, rRoot.GetCurrScTab(), rRect, MapUnit::Map100thMM ); @@ -534,7 +534,7 @@ void XclExpControlHelper::WriteFormulaSubRec( XclExpStream& rStrm, sal_uInt16 nS //#if EXC_EXP_OCX_CTRL XclExpOcxControlObj::XclExpOcxControlObj( XclExpObjectManager& rObjMgr, Reference< XShape > const & xShape, - const Rectangle* pChildAnchor, const OUString& rClassName, sal_uInt32 nStrmStart, sal_uInt32 nStrmSize ) : + const tools::Rectangle* pChildAnchor, const OUString& rClassName, sal_uInt32 nStrmStart, sal_uInt32 nStrmSize ) : XclObj( rObjMgr, EXC_OBJTYPE_PICTURE, true ), XclExpControlHelper( rObjMgr.GetRoot() ), maClassName( rClassName ), @@ -552,7 +552,7 @@ XclExpOcxControlObj::XclExpOcxControlObj( XclExpObjectManager& rObjMgr, Referenc // fill DFF property set mrEscherEx.OpenContainer( ESCHER_SpContainer ); mrEscherEx.AddShape( ESCHER_ShpInst_HostControl, SHAPEFLAG_HAVESPT | SHAPEFLAG_HAVEANCHOR | SHAPEFLAG_OLESHAPE ); - Rectangle aDummyRect; + tools::Rectangle aDummyRect; EscherPropertyContainer aPropOpt( mrEscherEx.GetGraphicProvider(), mrEscherEx.QueryPictureStream(), aDummyRect ); aPropOpt.AddOpt( ESCHER_Prop_FitTextToShape, 0x00080008 ); // bool field aPropOpt.AddOpt( ESCHER_Prop_lineColor, 0x08000040 ); @@ -638,7 +638,7 @@ void XclExpOcxControlObj::WriteSubRecs( XclExpStream& rStrm ) //#else -XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference< XShape > const & xShape , const Rectangle* pChildAnchor ) : +XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference< XShape > const & xShape , const tools::Rectangle* pChildAnchor ) : XclObj( rRoot, EXC_OBJTYPE_UNKNOWN, true ), XclMacroHelper( rRoot ), meEventType( EXC_TBX_EVENT_ACTION ), @@ -1067,7 +1067,7 @@ void XclExpTbxControlObj::WriteSbs( XclExpStream& rStrm ) //#endif -XclExpChartObj::XclExpChartObj( XclExpObjectManager& rObjMgr, Reference< XShape > const & xShape, const Rectangle* pChildAnchor ) : +XclExpChartObj::XclExpChartObj( XclExpObjectManager& rObjMgr, Reference< XShape > const & xShape, const tools::Rectangle* pChildAnchor ) : XclObj( rObjMgr, EXC_OBJTYPE_CHART ), XclExpRoot( rObjMgr.GetRoot() ), mxShape( xShape ) { @@ -1106,7 +1106,7 @@ XclExpChartObj::XclExpChartObj( XclExpObjectManager& rObjMgr, Reference< XShape mxChartDoc.set( xModel,UNO_QUERY ); css::awt::Rectangle aBoundRect; aShapeProp.GetProperty( aBoundRect, "BoundRect" ); - Rectangle aChartRect( Point( aBoundRect.X, aBoundRect.Y ), Size( aBoundRect.Width, aBoundRect.Height ) ); + tools::Rectangle aChartRect( Point( aBoundRect.X, aBoundRect.Y ), Size( aBoundRect.Width, aBoundRect.Height ) ); mxChart.reset( new XclExpChart( GetRoot(), xModel, aChartRect ) ); } diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx index 4f178d716425..dc751dca62a9 100644 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -257,7 +257,7 @@ Color XclImpChRoot::GetSeriesFillAutoColor( sal_uInt16 nFormatIdx ) const return ScfTools::GetMixedColor( aColor, rPal.GetColor( EXC_COLOR_CHWINDOWBACK ), nTrans ); } -void XclImpChRoot::InitConversion( const Reference<XChartDocument>& xChartDoc, const Rectangle& rChartRect ) const +void XclImpChRoot::InitConversion( const Reference<XChartDocument>& xChartDoc, const tools::Rectangle& rChartRect ) const { // create formatting object tables mxChData->InitConversion( GetRoot(), xChartDoc, rChartRect ); @@ -3908,7 +3908,7 @@ bool XclImpChChart::IsManualPlotArea() const } void XclImpChChart::Convert( const Reference<XChartDocument>& xChartDoc, - XclImpDffConverter& rDffConv, const OUString& rObjName, const Rectangle& rChartRect ) const + XclImpDffConverter& rDffConv, const OUString& rObjName, const tools::Rectangle& rChartRect ) const { // initialize conversion (locks the model to suppress any internal updates) InitConversion( xChartDoc, rChartRect ); @@ -4171,7 +4171,7 @@ XclImpChartDrawing::XclImpChartDrawing( const XclImpRoot& rRoot, bool bOwnTab ) } void XclImpChartDrawing::ConvertObjects( XclImpDffConverter& rDffConv, - const Reference< XModel >& rxModel, const Rectangle& rChartRect ) + const Reference< XModel >& rxModel, const tools::Rectangle& rChartRect ) { maChartRect = rChartRect; // needed in CalcAnchorRect() callback @@ -4202,12 +4202,12 @@ void XclImpChartDrawing::ConvertObjects( XclImpDffConverter& rDffConv, ImplConvertObjects( rDffConv, *pSdrModel, *pSdrPage ); } -Rectangle XclImpChartDrawing::CalcAnchorRect( const XclObjAnchor& rAnchor, bool bDffAnchor ) const +tools::Rectangle XclImpChartDrawing::CalcAnchorRect( const XclObjAnchor& rAnchor, bool bDffAnchor ) const { /* In objects with DFF client anchor, the position of the shape is stored in the cell address components of the client anchor. In old BIFF3-BIFF5 objects, the position is stored in the offset components of the anchor. */ - Rectangle aRect( + tools::Rectangle aRect( static_cast< long >( static_cast< double >( bDffAnchor ? rAnchor.maFirst.mnCol : rAnchor.mnLX ) / EXC_CHART_TOTALUNITS * maChartRect.GetWidth() + 0.5 ), static_cast< long >( static_cast< double >( bDffAnchor ? rAnchor.maFirst.mnRow : rAnchor.mnTY ) / EXC_CHART_TOTALUNITS * maChartRect.GetHeight() + 0.5 ), static_cast< long >( static_cast< double >( bDffAnchor ? rAnchor.maLast.mnCol : rAnchor.mnRX ) / EXC_CHART_TOTALUNITS * maChartRect.GetWidth() + 0.5 ), @@ -4327,7 +4327,7 @@ std::size_t XclImpChart::GetProgressSize() const (mxChartDrawing ? mxChartDrawing->GetProgressSize() : 0); } -void XclImpChart::Convert( Reference< XModel > const & xModel, XclImpDffConverter& rDffConv, const OUString& rObjName, const Rectangle& rChartRect ) const +void XclImpChart::Convert( Reference< XModel > const & xModel, XclImpDffConverter& rDffConv, const OUString& rObjName, const tools::Rectangle& rChartRect ) const { Reference< XChartDocument > xChartDoc( xModel, UNO_QUERY ); if( xChartDoc.is() ) diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 227cdead15ef..aeb46ac33e33 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -387,7 +387,7 @@ const XclObjAnchor* XclImpDrawObjBase::GetAnchor() const return mbHasAnchor ? &maAnchor : nullptr; } -bool XclImpDrawObjBase::IsValidSize( const Rectangle& rAnchorRect ) const +bool XclImpDrawObjBase::IsValidSize( const tools::Rectangle& rAnchorRect ) const { // XclObjAnchor rounds up the width, width of 3 is the result of an Excel width of 0 return mbAreaObj ? @@ -415,7 +415,7 @@ std::size_t XclImpDrawObjBase::GetProgressSize() const return DoGetProgressSize(); } -SdrObjectPtr XclImpDrawObjBase::CreateSdrObject( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect, bool bIsDff ) const +SdrObjectPtr XclImpDrawObjBase::CreateSdrObject( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect, bool bIsDff ) const { SdrObjectPtr xSdrObj; if( bIsDff && !mbCustomDff ) @@ -795,7 +795,7 @@ std::size_t XclImpDrawObjBase::DoGetProgressSize() const return 1; } -SdrObjectPtr XclImpDrawObjBase::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& ) const +SdrObjectPtr XclImpDrawObjBase::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& ) const { rDffConv.Progress( GetProgressSize() ); return nullptr; @@ -1011,7 +1011,7 @@ std::size_t XclImpGroupObj::DoGetProgressSize() const return XclImpDrawObjBase::DoGetProgressSize() + maChildren.GetProgressSize(); } -SdrObjectPtr XclImpGroupObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& /*rAnchorRect*/ ) const +SdrObjectPtr XclImpGroupObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& /*rAnchorRect*/ ) const { std::unique_ptr<SdrObjGroup, SdrObjectFree> xSdrObj( new SdrObjGroup ); // child objects in BIFF2-BIFF5 have absolute size, not needed to pass own anchor rectangle @@ -1058,7 +1058,7 @@ void XclImpLineObj::DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uI ReadMacro5( rStrm, nMacroSize ); } -SdrObjectPtr XclImpLineObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const +SdrObjectPtr XclImpLineObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const { ::basegfx::B2DPolygon aB2DPolygon; switch( mnStartPoint ) @@ -1194,7 +1194,7 @@ void XclImpRectObj::DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uI ReadMacro5( rStrm, nMacroSize ); } -SdrObjectPtr XclImpRectObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const +SdrObjectPtr XclImpRectObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const { SdrObjectPtr xSdrObj( new SdrRectObj( rAnchorRect ) ); ConvertRectStyle( *xSdrObj ); @@ -1207,7 +1207,7 @@ XclImpOvalObj::XclImpOvalObj( const XclImpRoot& rRoot ) : { } -SdrObjectPtr XclImpOvalObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const +SdrObjectPtr XclImpOvalObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const { SdrObjectPtr xSdrObj( new SdrCircObj( OBJ_CIRC, rAnchorRect ) ); ConvertRectStyle( *xSdrObj ); @@ -1247,9 +1247,9 @@ void XclImpArcObj::DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uIn ReadMacro5( rStrm, nMacroSize ); } -SdrObjectPtr XclImpArcObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const +SdrObjectPtr XclImpArcObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const { - Rectangle aNewRect = rAnchorRect; + tools::Rectangle aNewRect = rAnchorRect; long nStartAngle = 0; long nEndAngle = 0; switch( mnQuadrant ) @@ -1336,7 +1336,7 @@ void XclImpPolygonObj::DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal namespace { -::basegfx::B2DPoint lclGetPolyPoint( const Rectangle& rAnchorRect, const Point& rPoint ) +::basegfx::B2DPoint lclGetPolyPoint( const tools::Rectangle& rAnchorRect, const Point& rPoint ) { return ::basegfx::B2DPoint( rAnchorRect.Left() + static_cast< sal_Int32 >( ::std::min< double >( rPoint.X(), 16384.0 ) / 16384.0 * rAnchorRect.GetWidth() + 0.5 ), @@ -1345,7 +1345,7 @@ namespace { } // namespace -SdrObjectPtr XclImpPolygonObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const +SdrObjectPtr XclImpPolygonObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const { SdrObjectPtr xSdrObj; if( maCoords.size() >= 2 ) @@ -1419,7 +1419,7 @@ void XclImpTextObj::DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uI maTextData.ReadFormats( rStrm ); } -SdrObjectPtr XclImpTextObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const +SdrObjectPtr XclImpTextObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const { std::unique_ptr<SdrObjCustomShape, SdrObjectFree> xSdrObj( new SdrObjCustomShape ); xSdrObj->NbcSetSnapRect( rAnchorRect ); @@ -1686,7 +1686,7 @@ std::size_t XclImpChartObj::DoGetProgressSize() const return mxChart ? mxChart->GetProgressSize() : 1; } -SdrObjectPtr XclImpChartObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const +SdrObjectPtr XclImpChartObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const { SdrObjectPtr xSdrObj; SfxObjectShell* pDocShell = GetDocShell(); @@ -1766,7 +1766,7 @@ void XclImpChartObj::FinalizeTabChart() // create the object anchor XclObjAnchor aAnchor; - aAnchor.SetRect( GetRoot(), GetCurrScTab(), Rectangle( 1000, 500, nWidth, nHeight ), MapUnit::Map100thMM ); + aAnchor.SetRect( GetRoot(), GetCurrScTab(), tools::Rectangle( 1000, 500, nWidth, nHeight ), MapUnit::Map100thMM ); SetAnchor( aAnchor ); } @@ -1815,7 +1815,7 @@ XclImpControlHelper::~XclImpControlHelper() } SdrObjectPtr XclImpControlHelper::CreateSdrObjectFromShape( - const Reference< XShape >& rxShape, const Rectangle& rAnchorRect ) const + const Reference< XShape >& rxShape, const tools::Rectangle& rAnchorRect ) const { mxShape = rxShape; SdrObjectPtr xSdrObj( SdrObject::getSdrObjectFromXShape( rxShape ) ); @@ -2060,7 +2060,7 @@ void XclImpTbxObjBase::ConvertLabel( ScfPropertySet& rPropSet ) const ConvertFont( rPropSet ); } -SdrObjectPtr XclImpTbxObjBase::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const +SdrObjectPtr XclImpTbxObjBase::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const { SdrObjectPtr xSdrObj( rDffConv.CreateSdrObject( *this, rAnchorRect ) ); rDffConv.Progress(); @@ -2934,7 +2934,7 @@ void XclImpPictureObj::DoReadObj8SubRec( XclImpStream& rStrm, sal_uInt16 nSubRec } } -SdrObjectPtr XclImpPictureObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const +SdrObjectPtr XclImpPictureObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const { // try to create an OLE object or form control SdrObjectPtr xSdrObj( rDffConv.CreateSdrObject( *this, rAnchorRect ) ); @@ -3307,7 +3307,7 @@ void XclImpDffConverter::ProcessObject( SdrObjList& rObjList, const XclImpDrawOb { if( const XclObjAnchor* pAnchor = rDrawObj.GetAnchor() ) { - Rectangle aAnchorRect = GetConvData().mrDrawing.CalcAnchorRect( *pAnchor, false ); + tools::Rectangle aAnchorRect = GetConvData().mrDrawing.CalcAnchorRect( *pAnchor, false ); if( rDrawObj.IsValidSize( aAnchorRect ) ) { // CreateSdrObject() recursively creates embedded child objects @@ -3351,7 +3351,7 @@ void XclImpDffConverter::FinalizeDrawing() SetModel( &maDataStack.back()->mrSdrModel, 1440 ); } -SdrObjectPtr XclImpDffConverter::CreateSdrObject( const XclImpTbxObjBase& rTbxObj, const Rectangle& rAnchorRect ) +SdrObjectPtr XclImpDffConverter::CreateSdrObject( const XclImpTbxObjBase& rTbxObj, const tools::Rectangle& rAnchorRect ) { SdrObjectPtr xSdrObj; @@ -3385,7 +3385,7 @@ SdrObjectPtr XclImpDffConverter::CreateSdrObject( const XclImpTbxObjBase& rTbxOb return xSdrObj; } -SdrObjectPtr XclImpDffConverter::CreateSdrObject( const XclImpPictureObj& rPicObj, const Rectangle& rAnchorRect ) +SdrObjectPtr XclImpDffConverter::CreateSdrObject( const XclImpPictureObj& rPicObj, const tools::Rectangle& rAnchorRect ) { SdrObjectPtr xSdrObj; @@ -3429,7 +3429,7 @@ SdrObjectPtr XclImpDffConverter::CreateSdrObject( const XclImpPictureObj& rPicOb { // first try to resolve graphic from DFF storage Graphic aGraphic; - Rectangle aVisArea; + tools::Rectangle aVisArea; if( !GetBLIP( GetPropertyValue( DFF_Prop_pib, 0 ), aGraphic, &aVisArea ) ) { // if not found, use graphic from object (imported from IMGDATA record) @@ -3484,7 +3484,7 @@ void XclImpDffConverter::ProcessClientAnchor2( SvStream& rDffStrm, } SdrObject* XclImpDffConverter::ProcessObj( SvStream& rDffStrm, DffObjData& rDffObjData, - void* pClientData, Rectangle& /*rTextRect*/, SdrObject* pOldSdrObj ) + void* pClientData, tools::Rectangle& /*rTextRect*/, SdrObject* pOldSdrObj ) { XclImpDffConvData& rConvData = GetConvData(); @@ -3495,7 +3495,7 @@ SdrObject* XclImpDffConverter::ProcessObj( SvStream& rDffStrm, DffObjData& rDffO // find the OBJ record data related to the processed shape XclImpDrawObjRef xDrawObj = rConvData.mrDrawing.FindDrawObj( rDffObjData.rSpHd ); - const Rectangle& rAnchorRect = rDffObjData.aChildAnchor; + const tools::Rectangle& rAnchorRect = rDffObjData.aChildAnchor; // Do not process the global page group shape (flag SP_FPATRIARCH) bool bGlobalPageGroup = ::get_flag< sal_uInt32 >( rDffObjData.nSpFlags, SP_FPATRIARCH ); @@ -3746,7 +3746,7 @@ void XclImpDffConverter::ProcessSolverContainer( SvStream& rDffStrm, const DffRe void XclImpDffConverter::ProcessShContainer( SvStream& rDffStrm, const DffRecordHeader& rShHeader ) { rShHeader.SeekToBegOfRecord( rDffStrm ); - Rectangle aDummy; + tools::Rectangle aDummy; const XclImpDrawObjBase* pDrawObj = nullptr; /* The call to ImportObj() creates and returns a new SdrObject for the processed shape. We take ownership of the returned object here. If the @@ -4125,7 +4125,7 @@ void XclImpSheetDrawing::ConvertObjects( XclImpDffConverter& rDffConv ) ImplConvertObjects( rDffConv, *pSdrModel, *pSdrPage ); } -Rectangle XclImpSheetDrawing::CalcAnchorRect( const XclObjAnchor& rAnchor, bool /*bDffAnchor*/ ) const +tools::Rectangle XclImpSheetDrawing::CalcAnchorRect( const XclObjAnchor& rAnchor, bool /*bDffAnchor*/ ) const { return rAnchor.GetRect( GetRoot(), maScUsedArea.aStart.Tab(), MapUnit::Map100thMM ); } diff --git a/sc/source/filter/excel/xlchart.cxx b/sc/source/filter/excel/xlchart.cxx index c78811f10987..655d4abce789 100644 --- a/sc/source/filter/excel/xlchart.cxx +++ b/sc/source/filter/excel/xlchart.cxx @@ -1237,7 +1237,7 @@ XclChRootData::~XclChRootData() { } -void XclChRootData::InitConversion( const XclRoot& rRoot, const Reference< XChartDocument >& rxChartDoc, const Rectangle& rChartRect ) +void XclChRootData::InitConversion( const XclRoot& rRoot, const Reference< XChartDocument >& rxChartDoc, const tools::Rectangle& rChartRect ) { // remember chart document reference and chart shape position/size OSL_ENSURE( rxChartDoc.is(), "XclChRootData::InitConversion - missing chart document" ); diff --git a/sc/source/filter/excel/xlescher.cxx b/sc/source/filter/excel/xlescher.cxx index de02aaab6ac0..dc25c1bdc0d7 100644 --- a/sc/source/filter/excel/xlescher.cxx +++ b/sc/source/filter/excel/xlescher.cxx @@ -119,7 +119,7 @@ void lclGetRowFromY( } /** Mirrors a rectangle (from LTR to RTL layout or vice versa). */ -void lclMirrorRectangle( Rectangle& rRect ) +void lclMirrorRectangle( tools::Rectangle& rRect ) { long nLeft = rRect.Left(); rRect.Left() = -rRect.Right(); @@ -141,11 +141,11 @@ XclObjAnchor::XclObjAnchor() : { } -Rectangle XclObjAnchor::GetRect( const XclRoot& rRoot, SCTAB nScTab, MapUnit eMapUnit ) const +tools::Rectangle XclObjAnchor::GetRect( const XclRoot& rRoot, SCTAB nScTab, MapUnit eMapUnit ) const { ScDocument& rDoc = rRoot.GetDoc(); double fScale = lclGetTwipsScale( eMapUnit ); - Rectangle aRect( + tools::Rectangle aRect( lclGetXFromCol( rDoc, nScTab, maFirst.mnCol, mnLX, fScale ), lclGetYFromRow( rDoc, nScTab, maFirst.mnRow, mnTY, fScale ), lclGetXFromCol( rDoc, nScTab, maLast.mnCol, mnRX + 1, fScale ), @@ -157,14 +157,14 @@ Rectangle XclObjAnchor::GetRect( const XclRoot& rRoot, SCTAB nScTab, MapUnit eMa return aRect; } -void XclObjAnchor::SetRect( const XclRoot& rRoot, SCTAB nScTab, const Rectangle& rRect, MapUnit eMapUnit ) +void XclObjAnchor::SetRect( const XclRoot& rRoot, SCTAB nScTab, const tools::Rectangle& rRect, MapUnit eMapUnit ) { ScDocument& rDoc = rRoot.GetDoc(); sal_uInt16 nXclMaxCol = rRoot.GetXclMaxPos().Col(); sal_uInt16 nXclMaxRow = static_cast<sal_uInt16>( rRoot.GetXclMaxPos().Row()); // adjust coordinates in mirrored sheets - Rectangle aRect( rRect ); + tools::Rectangle aRect( rRect ); if( rDoc.IsLayoutRTL( nScTab ) ) lclMirrorRectangle( aRect ); @@ -178,7 +178,7 @@ void XclObjAnchor::SetRect( const XclRoot& rRoot, SCTAB nScTab, const Rectangle& } void XclObjAnchor::SetRect( const Size& rPageSize, sal_Int32 nScaleX, sal_Int32 nScaleY, - const Rectangle& rRect, MapUnit eMapUnit ) + const tools::Rectangle& rRect, MapUnit eMapUnit ) { double fScale = 1.0; switch( eMapUnit ) diff --git a/sc/source/filter/html/htmlexp2.cxx b/sc/source/filter/html/htmlexp2.cxx index d61cadaa2eae..9b751d3b7ee3 100644 --- a/sc/source/filter/html/htmlexp2.cxx +++ b/sc/source/filter/html/htmlexp2.cxx @@ -69,14 +69,14 @@ void ScHTMLExport::FillGraphList( const SdrPage* pPage, SCTAB nTab, { if ( pPage->GetObjCount() ) { - Rectangle aRect; + tools::Rectangle aRect; if ( !bAll ) aRect = pDoc->GetMMRect( nStartCol, nStartRow, nEndCol, nEndRow, nTab ); SdrObjListIter aIter( *pPage, SdrIterMode::Flat ); SdrObject* pObject = aIter.Next(); while ( pObject ) { - Rectangle aObjRect = pObject->GetCurrentBoundRect(); + tools::Rectangle aObjRect = pObject->GetCurrentBoundRect(); if ( (bAll || aRect.IsInside( aObjRect )) && !ScDrawLayer::IsNoteCaption(pObject) ) { Size aSpace; @@ -96,7 +96,7 @@ void ScHTMLExport::FillGraphList( const SdrPage* pPage, SCTAB nTab, == static_cast< SCSIZE >( nRow2 - nRow1 )); // rows-1 ! if ( bInCell ) { // Spacing in spanning cell - Rectangle aCellRect = pDoc->GetMMRect( + tools::Rectangle aCellRect = pDoc->GetMMRect( nCol1, nRow1, nCol2, nRow2, nTab ); aSpace = MMToPixel( Size( aCellRect.GetWidth() - aObjRect.GetWidth(), diff --git a/sc/source/filter/inc/scfobj.hxx b/sc/source/filter/inc/scfobj.hxx index 1c2a117bc65e..84824ae4b741 100644 --- a/sc/source/filter/inc/scfobj.hxx +++ b/sc/source/filter/inc/scfobj.hxx @@ -21,12 +21,12 @@ #define INCLUDED_SC_SOURCE_FILTER_INC_SCFOBJ_HXX class ScDocument; -class Rectangle; +namespace tools { class Rectangle; } class Sc10InsertObject { public: - static void InsertChart( ScDocument* pDoc, SCTAB nDestTab, const Rectangle& rRect, + static void InsertChart( ScDocument* pDoc, SCTAB nDestTab, const tools::Rectangle& rRect, SCTAB nSrcTab, sal_uInt16 nX1, sal_uInt16 nY1, sal_uInt16 nX2, sal_uInt16 nY2 ); }; diff --git a/sc/source/filter/inc/xcl97esc.hxx b/sc/source/filter/inc/xcl97esc.hxx index c63ce77e0d8c..b8bc241e3700 100644 --- a/sc/source/filter/inc/xcl97esc.hxx +++ b/sc/source/filter/inc/xcl97esc.hxx @@ -93,7 +93,7 @@ public: virtual EscherExHostAppData* StartShape( const css::uno::Reference< css::drawing::XShape>& rxShape, - const Rectangle* pChildAnchor ) override; + const tools::Rectangle* pChildAnchor ) override; virtual void EndShape( sal_uInt16 nShapeType, sal_uInt32 nShapeID ) override; virtual EscherExHostAppData* EnterAdditionalTextGroup() override; @@ -103,14 +103,14 @@ public: @descr Writes the form control data to the 'Ctls' stream. */ std::unique_ptr<XclExpOcxControlObj> CreateOCXCtrlObj( css::uno::Reference< css::drawing::XShape > const & xShape, - const Rectangle* pChildAnchor ); + const tools::Rectangle* pChildAnchor ); private: tools::SvRef<SotStorageStream> mxCtlsStrm; /// The 'Ctls' stream. /** Creates a TBX form control OBJ record from the passed form control. */ std::unique_ptr<XclExpTbxControlObj> CreateTBXCtrlObj( css::uno::Reference< css::drawing::XShape > const & xShape, - const Rectangle* pChildAnchor ); + const tools::Rectangle* pChildAnchor ); private: /** Tries to get the name of a Basic macro from a control. */ diff --git a/sc/source/filter/inc/xcl97rec.hxx b/sc/source/filter/inc/xcl97rec.hxx index 1782b4d80450..40d9b98bc6fa 100644 --- a/sc/source/filter/inc/xcl97rec.hxx +++ b/sc/source/filter/inc/xcl97rec.hxx @@ -104,7 +104,7 @@ protected: See SetOwnEscher() for details. */ explicit XclObj( XclExpObjectManager& rObjMgr, sal_uInt16 nObjType, bool bOwnEscher = false ); - void ImplWriteAnchor( const XclExpRoot& rRoot, const SdrObject* pSdrObj, const Rectangle* pChildAnchor ); + void ImplWriteAnchor( const XclExpRoot& rRoot, const SdrObject* pSdrObj, const tools::Rectangle* pChildAnchor ); // overwritten for writing MSODRAWING record virtual void WriteBody( XclExpStream& rStrm ) override; @@ -159,18 +159,18 @@ class XclObjComment : public XclObj std::unique_ptr< SdrCaptionObj > mpCaption; bool mbVisible; - Rectangle maFrom; - Rectangle maTo; + tools::Rectangle maFrom; + tools::Rectangle maTo; public: XclObjComment( XclExpObjectManager& rObjMgr, - const Rectangle& rRect, const EditTextObject& rEditObj, SdrCaptionObj* pCaption, bool bVisible, const ScAddress& rAddress, Rectangle &rFrom, Rectangle &To ); + const tools::Rectangle& rRect, const EditTextObject& rEditObj, SdrCaptionObj* pCaption, bool bVisible, const ScAddress& rAddress, tools::Rectangle &rFrom, tools::Rectangle &To ); virtual ~XclObjComment() override; /** c'tor process for formatted text objects above . @descr used to construct the MSODRAWING Escher object properties. */ void ProcessEscherObj( const XclExpRoot& rRoot, - const Rectangle& rRect, SdrObject* pCaption, bool bVisible ); + const tools::Rectangle& rRect, SdrObject* pCaption, bool bVisible ); virtual void Save( XclExpStream& rStrm ) override; virtual void SaveXml( XclExpXmlStream& rStrm ) override; diff --git a/sc/source/filter/inc/xechart.hxx b/sc/source/filter/inc/xechart.hxx index f4e05de6f3b3..9514869d1e8f 100644 --- a/sc/source/filter/inc/xechart.hxx +++ b/sc/source/filter/inc/xechart.hxx @@ -31,7 +31,7 @@ #include <map> class Size; -class Rectangle; +namespace tools { class Rectangle; } namespace com { namespace sun { namespace star { namespace awt @@ -100,7 +100,7 @@ public: /** Starts the API chart document conversion. Must be called once before all API conversion. */ void InitConversion( css::uno::Reference< css::chart2::XChartDocument > const & xChartDoc, - const Rectangle& rChartRect ) const; + const tools::Rectangle& rChartRect ) const; /** Finishes the API chart document conversion. Must be called once after all API conversion. */ void FinishConversion() const; @@ -1127,7 +1127,7 @@ class XclExpChChart : public XclExpChGroupBase public: explicit XclExpChChart( const XclExpRoot& rRoot, css::uno::Reference< css::chart2::XChartDocument > const & xChartDoc, - const Rectangle& rChartRect ); + const tools::Rectangle& rChartRect ); /** Creates, registers and returns a new data series object. */ XclExpChSeriesRef CreateSeries(); @@ -1183,7 +1183,7 @@ class XclExpChart : public XclExpSubStream, protected XclExpRoot public: explicit XclExpChart( const XclExpRoot& rRoot, css::uno::Reference< css::frame::XModel > const & xModel, - const Rectangle& rChartRect ); + const tools::Rectangle& rChartRect ); }; #endif diff --git a/sc/source/filter/inc/xeescher.hxx b/sc/source/filter/inc/xeescher.hxx index f3a98cfddd6b..24b87a75dc0d 100644 --- a/sc/source/filter/inc/xeescher.hxx +++ b/sc/source/filter/inc/xeescher.hxx @@ -54,11 +54,11 @@ public: /** Called from SVX DFF converter. @param rRect The object anchor rectangle to be exported (in twips). */ - virtual void WriteData( EscherEx& rEscherEx, const Rectangle& rRect ) override; + virtual void WriteData( EscherEx& rEscherEx, const tools::Rectangle& rRect ) override; private: virtual void ImplSetFlags( const SdrObject& rSdrObj ); - virtual void ImplCalcAnchorRect( const Rectangle& rRect, MapUnit eMapUnit ); + virtual void ImplCalcAnchorRect( const tools::Rectangle& rRect, MapUnit eMapUnit ); protected: // for access in derived classes XclObjAnchor maAnchor; /// The client anchor data. @@ -73,7 +73,7 @@ public: private: virtual void ImplSetFlags( const SdrObject& rSdrObj ) override; - virtual void ImplCalcAnchorRect( const Rectangle& rRect, MapUnit eMapUnit ) override; + virtual void ImplCalcAnchorRect( const tools::Rectangle& rRect, MapUnit eMapUnit ) override; private: SCTAB mnScTab; /// Calc sheet index. @@ -88,7 +88,7 @@ public: private: virtual void ImplSetFlags( const SdrObject& rSdrObj ) override; - virtual void ImplCalcAnchorRect( const Rectangle& rRect, MapUnit eMapUnit ) override; + virtual void ImplCalcAnchorRect( const tools::Rectangle& rRect, MapUnit eMapUnit ) override; private: Size maPageSize; @@ -100,7 +100,7 @@ private: class XclExpDffNoteAnchor : public XclExpDffAnchorBase { public: - explicit XclExpDffNoteAnchor( const XclExpRoot& rRoot, const Rectangle& rRect ); + explicit XclExpDffNoteAnchor( const XclExpRoot& rRoot, const tools::Rectangle& rRect ); }; /** Represents the position (anchor) of a cell dropdown object. */ @@ -227,7 +227,7 @@ public: explicit XclExpOcxControlObj( XclExpObjectManager& rObjMgr, css::uno::Reference< css::drawing::XShape > const & xShape, - const Rectangle* pChildAnchor, + const tools::Rectangle* pChildAnchor, const OUString& rClassName, sal_uInt32 nStrmStart, sal_uInt32 nStrmSize ); @@ -249,7 +249,7 @@ public: explicit XclExpTbxControlObj( XclExpObjectManager& rObjMgr, css::uno::Reference< css::drawing::XShape > const & xShape, - const Rectangle* pChildAnchor ); + const tools::Rectangle* pChildAnchor ); /** Sets the name of a macro attached to this control. @return true = The passed event descriptor was valid, macro name has been found. */ @@ -292,7 +292,7 @@ public: explicit XclExpChartObj( XclExpObjectManager& rObjMgr, css::uno::Reference< css::drawing::XShape > const & xShape, - const Rectangle* pChildAnchor ); + const tools::Rectangle* pChildAnchor ); virtual ~XclExpChartObj() override; /** Writes the OBJ record and the entire chart substream. */ @@ -357,8 +357,8 @@ private: bool mbAutoFill; /// Auto Fill Style bool mbColHidden; /// Column containing the comment is hidden bool mbRowHidden; /// Row containing the comment is hidden - Rectangle maCommentFrom; /// From and From Offset - Rectangle maCommentTo; /// To and To Offsets + tools::Rectangle maCommentFrom; /// From and From Offset + tools::Rectangle maCommentTo; /// To and To Offsets }; class XclExpComments : public XclExpRecord diff --git a/sc/source/filter/inc/xichart.hxx b/sc/source/filter/inc/xichart.hxx index 7d72bf89ddd3..d4be01621e23 100644 --- a/sc/source/filter/inc/xichart.hxx +++ b/sc/source/filter/inc/xichart.hxx @@ -107,7 +107,7 @@ public: /** Starts the API chart document conversion. Must be called once before all API conversion. */ void InitConversion( const css::uno::Reference< css::chart2::XChartDocument>& xChartDoc, - const Rectangle& rChartRect ) const; + const tools::Rectangle& rChartRect ) const; /** Finishes the API chart document conversion. Must be called once after all API conversion. */ void FinishConversion( XclImpDffConverter& rDffConv ) const; @@ -1298,7 +1298,7 @@ public: const css::uno::Reference< css::chart2::XChartDocument>& xChartDoc, XclImpDffConverter& rDffConv, const OUString& rObjName, - const Rectangle& rChartRect ) const; + const tools::Rectangle& rChartRect ) const; private: /** Reads a CHSERIES group (data series source and formatting). */ @@ -1352,15 +1352,15 @@ public: void ConvertObjects( XclImpDffConverter& rDffConv, const css::uno::Reference< css::frame::XModel >& rxModel, - const Rectangle& rChartRect ); + const tools::Rectangle& rChartRect ); /** Calculate the resulting rectangle of the passed anchor. */ - virtual Rectangle CalcAnchorRect( const XclObjAnchor& rAnchor, bool bDffAnchor ) const override; + virtual tools::Rectangle CalcAnchorRect( const XclObjAnchor& rAnchor, bool bDffAnchor ) const override; /** Called whenever an object has been inserted into the draw page. */ virtual void OnObjectInserted( const XclImpDrawObjBase& rDrawObj ) override; private: - Rectangle maChartRect; /// Position and size of the chart shape in 1/100 mm. + tools::Rectangle maChartRect; /// Position and size of the chart shape in 1/100 mm. SCTAB mnScTab; /// Index of the sheet that contains the chart. bool mbOwnTab; /// True = own sheet, false = embedded object. }; @@ -1389,7 +1389,7 @@ public: void Convert( css::uno::Reference< css::frame::XModel > const & xModel, XclImpDffConverter& rDffConv, const OUString& rObjName, - const Rectangle& rChartRect ) const; + const tools::Rectangle& rChartRect ) const; private: /** Returns (initially creates) the drawing container for embedded shapes. **/ diff --git a/sc/source/filter/inc/xiescher.hxx b/sc/source/filter/inc/xiescher.hxx index b564a8e26e71..d1a359e4c7b9 100644 --- a/sc/source/filter/inc/xiescher.hxx +++ b/sc/source/filter/inc/xiescher.hxx @@ -115,7 +115,7 @@ public: /** Returns the object anchor if existing, null otherwise. */ const XclObjAnchor* GetAnchor() const; /** Returns true, if the passed size is valid for this object. */ - bool IsValidSize( const Rectangle& rAnchorRect ) const; + bool IsValidSize( const tools::Rectangle& rAnchorRect ) const; /** Returns the range in the sheet covered by this object. */ ScRange GetUsedArea( SCTAB nScTab ) const; @@ -127,7 +127,7 @@ public: /** Returns the needed size on the progress bar (calls virtual DoGetProgressSize() function). */ std::size_t GetProgressSize() const; /** Creates and returns an SdrObject from the contained data. Caller takes ownership! */ - SdrObjectPtr CreateSdrObject( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect, bool bIsDff ) const; + SdrObjectPtr CreateSdrObject( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect, bool bIsDff ) const; /** Additional processing for the passed SdrObject before insertion into the drawing page (calls virtual DoPreProcessSdrObj() function). */ void PreProcessSdrObject( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const; @@ -172,7 +172,7 @@ protected: /** Derived classes may return a progress bar size different from 1. */ virtual std::size_t DoGetProgressSize() const; /** Derived classes create and return a new SdrObject from the contained data. Caller takes ownership! */ - virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const; + virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const; /** Derived classes may perform additional processing for the passed SdrObject before insertion. */ virtual void DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const; /** Derived classes may perform additional processing for the passed SdrObject after insertion. */ @@ -254,7 +254,7 @@ protected: /** Returns a progress bar size that takes all group children into account. */ virtual std::size_t DoGetProgressSize() const override; /** Creates and returns a new SdrObject from the contained data. Caller takes ownership! */ - virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const override; + virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override; protected: XclImpDrawObjVector maChildren; /// Grouped objects. @@ -275,7 +275,7 @@ protected: /** Reads the contents of the a BIFF5 OBJ record from the passed stream. */ virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override; /** Creates and returns a new SdrObject from the contained data. Caller takes ownership! */ - virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const override; + virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override; protected: XclObjLineData maLineData; /// BIFF5 line formatting. @@ -303,7 +303,7 @@ protected: /** Reads the contents of the a BIFF5 OBJ record from the passed stream. */ virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override; /** Creates and returns a new SdrObject from the contained data. Caller takes ownership! */ - virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const override; + virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override; protected: XclObjFillData maFillData; /// BIFF5 fill formatting. @@ -319,7 +319,7 @@ public: protected: /** Creates and returns a new SdrObject from the contained data. Caller takes ownership! */ - virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const override; + virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override; }; /** An arc object. */ @@ -336,7 +336,7 @@ protected: /** Reads the contents of the a BIFF5 OBJ record from the passed stream. */ virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override; /** Creates and returns a new SdrObject from the contained data. Caller takes ownership! */ - virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const override; + virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override; protected: XclObjFillData maFillData; /// BIFF5 fill formatting. @@ -359,7 +359,7 @@ protected: /** Reads the contents of the a BIFF5 OBJ record from the passed stream. */ virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override; /** Creates and returns a new SdrObject from the contained data. Caller takes ownership! */ - virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const override; + virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override; protected: typedef std::vector< Point > PointVector; @@ -396,7 +396,7 @@ protected: /** Reads the contents of the a BIFF5 OBJ record from the passed stream. */ virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override; /** Creates and returns a new SdrObject from the contained data. Caller takes ownership! */ - virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const override; + virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override; /** Inserts the contained text data at the passed object. */ virtual void DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const override; @@ -426,7 +426,7 @@ protected: /** Returns the needed size on the progress bar. */ virtual std::size_t DoGetProgressSize() const override; /** Creates and returns a new SdrObject from the contained data. Caller takes ownership! */ - virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const override; + virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override; /** Converts the chart document. */ virtual void DoPostProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const override; @@ -472,7 +472,7 @@ public: /** Returns the SdrObject from the passed control shape and sets the bounding rectangle. */ SdrObjectPtr CreateSdrObjectFromShape( const css::uno::Reference< css::drawing::XShape >& rxShape, - const Rectangle& rAnchorRect ) const; + const tools::Rectangle& rAnchorRect ) const; /** Sets additional properties to the form control model, calls virtual DoProcessControl(). */ void ProcessControl( const XclImpDrawObjBase& rDrawObj ) const; @@ -524,7 +524,7 @@ protected: void ConvertLabel( ScfPropertySet& rPropSet ) const; /** Creates and returns a new SdrObject from the contained data. Caller takes ownership! */ - virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const override; + virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override; /** Additional processing on the SdrObject, calls new virtual function DoProcessControl(). */ virtual void DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const override; @@ -823,7 +823,7 @@ public: const Graphic& GetGraphic() const { return maGraphic; } /** Returns the visible area of the imported graphic. */ - const Rectangle& GetVisArea() const { return maVisArea; } + const tools::Rectangle& GetVisArea() const { return maVisArea; } /** Returns true, if the OLE object will be shown as symbol. */ bool IsSymbol() const { return mbSymbol; } @@ -847,7 +847,7 @@ protected: /** Reads the contents of the specified subrecord of a BIFF8 OBJ record from stream. */ virtual void DoReadObj8SubRec( XclImpStream& rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize ) override; /** Creates and returns a new SdrObject from the contained data. Caller takes ownership! */ - virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const override; + virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override; /** Override to do additional processing on the SdrObject. */ virtual void DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const override; @@ -861,7 +861,7 @@ private: private: Graphic maGraphic; /// Picture or OLE placeholder graphic. - Rectangle maVisArea; /// Size of graphic. + tools::Rectangle maVisArea; /// Size of graphic. OUString maClassName; /// Class name of embedded OLE object. sal_uInt32 mnStorageId; /// Identifier of the storage for this object. std::size_t mnCtlsStrmPos; /// Position in 'Ctls' stream for this control. @@ -955,9 +955,9 @@ public: void FinalizeDrawing(); /** Creates the SdrObject for the passed Excel TBX form control object. */ - SdrObjectPtr CreateSdrObject( const XclImpTbxObjBase& rTbxObj, const Rectangle& rAnchorRect ); + SdrObjectPtr CreateSdrObject( const XclImpTbxObjBase& rTbxObj, const tools::Rectangle& rAnchorRect ); /** Creates the SdrObject for the passed Excel OLE object or OCX form control object. */ - SdrObjectPtr CreateSdrObject( const XclImpPictureObj& rPicObj, const Rectangle& rAnchorRect ); + SdrObjectPtr CreateSdrObject( const XclImpPictureObj& rPicObj, const tools::Rectangle& rAnchorRect ); /** Returns true, if the conversion of OLE objects is supported. */ bool SupportsOleObjects() const; @@ -978,7 +978,7 @@ private: SvStream& rDffStrm, DffObjData& rDffObjData, void* pClientData, - Rectangle& rTextRect, + tools::Rectangle& rTextRect, SdrObject* pOldSdrObj ) override; /** Finalize a DFF object, sets anchor after nested objs have been loaded. */ @@ -1082,7 +1082,7 @@ public: std::size_t GetProgressSize() const; /** Derived classes calculate the resulting rectangle of the passed anchor. */ - virtual Rectangle CalcAnchorRect( const XclObjAnchor& rAnchor, bool bDffAnchor ) const = 0; + virtual tools::Rectangle CalcAnchorRect( const XclObjAnchor& rAnchor, bool bDffAnchor ) const = 0; /** Called whenever an object has been inserted into the draw page. */ virtual void OnObjectInserted( const XclImpDrawObjBase& rDrawObj ) = 0; @@ -1138,7 +1138,7 @@ public: void ConvertObjects( XclImpDffConverter& rDffConv ); /** Calculate the resulting rectangle of the passed anchor. */ - virtual Rectangle CalcAnchorRect( const XclObjAnchor& rAnchor, bool bDffAnchor ) const override; + virtual tools::Rectangle CalcAnchorRect( const XclObjAnchor& rAnchor, bool bDffAnchor ) const override; /** On call, updates the used area of the sheet. */ virtual void OnObjectInserted( const XclImpDrawObjBase& rDrawObj ) override; diff --git a/sc/source/filter/inc/xlchart.hxx b/sc/source/filter/inc/xlchart.hxx index 8640b348c856..32bbc177e926 100644 --- a/sc/source/filter/inc/xlchart.hxx +++ b/sc/source/filter/inc/xlchart.hxx @@ -1400,7 +1400,7 @@ struct XclChRootData css::uno::Reference< css::chart2::XChartDocument > mxChartDoc; /// The chart document. - Rectangle maChartRect; /// Position and size of the chart shape. + tools::Rectangle maChartRect; /// Position and size of the chart shape. XclChTypeProvRef mxTypeInfoProv; /// Provides info about chart types. XclChFmtInfoProvRef mxFmtInfoProv; /// Provides info about auto formatting. XclChObjectTableRef mxLineDashTable; /// Container for line dash styles. @@ -1420,7 +1420,7 @@ struct XclChRootData void InitConversion( const XclRoot& rRoot, const css::uno::Reference< css::chart2::XChartDocument >& rxChartDoc, - const Rectangle& rChartRect ); + const tools::Rectangle& rChartRect ); /** Finishes the API chart document conversion. Must be called once before any API access. */ void FinishConversion(); diff --git a/sc/source/filter/inc/xlescher.hxx b/sc/source/filter/inc/xlescher.hxx index 7ad4d40b9606..95672abf679f 100644 --- a/sc/source/filter/inc/xlescher.hxx +++ b/sc/source/filter/inc/xlescher.hxx @@ -33,7 +33,7 @@ namespace com { namespace sun { namespace star { namespace script { struct ScriptEventDescriptor; } } } } -class Rectangle; +namespace tools { class Rectangle; } // Constants and Enumerations ================================================= @@ -294,13 +294,13 @@ struct XclObjAnchor : public XclRange explicit XclObjAnchor(); /** Calculates a rectangle from the contained coordinates. */ - Rectangle GetRect( const XclRoot& rRoot, SCTAB nScTab, MapUnit eMapUnit ) const; + tools::Rectangle GetRect( const XclRoot& rRoot, SCTAB nScTab, MapUnit eMapUnit ) const; /** Initializes the anchor coordinates for a sheet. */ - void SetRect( const XclRoot& rRoot, SCTAB nScTab, const Rectangle& rRect, MapUnit eMapUnit ); + void SetRect( const XclRoot& rRoot, SCTAB nScTab, const tools::Rectangle& rRect, MapUnit eMapUnit ); /** Initializes the anchor coordinates for an embedded draw page. */ void SetRect( const Size& rPageSize, sal_Int32 nScaleX, sal_Int32 nScaleY, - const Rectangle& rRect, MapUnit eMapUnit ); + const tools::Rectangle& rRect, MapUnit eMapUnit ); }; inline SvStream& operator>>( SvStream& rStrm, XclObjAnchor& rAnchor ) diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx index 926efdd480c9..28bb57bde052 100644 --- a/sc/source/filter/rtf/eeimpars.cxx +++ b/sc/source/filter/rtf/eeimpars.cxx @@ -588,7 +588,7 @@ void ScEEImport::InsertGraphic( SCCOL nCol, SCROW nRow, SCTAB nTab, if ( pI->pGraphic ) { - Rectangle aRect ( aInsertPos, aLogicSize ); + tools::Rectangle aRect ( aInsertPos, aLogicSize ); SdrGrafObj* pObj = new SdrGrafObj( *pI->pGraphic, aRect ); // calling SetGraphicLink here doesn't work pObj->SetName( pI->aURL ); diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx index 0f7f337bedbf..2d7128be907b 100644 --- a/sc/source/filter/starcalc/scflt.cxx +++ b/sc/source/filter/starcalc/scflt.cxx @@ -2379,7 +2379,7 @@ void Sc10Import::LoadObjects() lcl_ReadChartTypeData(rStream, *pTypeData); - Rectangle aRect( Point(nStartX,nStartY), Size(nSizeX,nSizeY) ); + tools::Rectangle aRect( Point(nStartX,nStartY), Size(nSizeX,nSizeY) ); Sc10InsertObject::InsertChart( pDoc, static_cast<SCTAB>(GraphHeader.CarretZ), aRect, static_cast<SCTAB>(GraphHeader.CarretZ), ChartSheetData.DataX1, ChartSheetData.DataY1, diff --git a/sc/source/filter/starcalc/scfobj.cxx b/sc/source/filter/starcalc/scfobj.cxx index 38f6a3054bd6..f05b52a16c3f 100644 --- a/sc/source/filter/starcalc/scfobj.cxx +++ b/sc/source/filter/starcalc/scfobj.cxx @@ -39,7 +39,7 @@ using namespace com::sun::star; #include "drwlayer.hxx" #include "chartarr.hxx" -void Sc10InsertObject::InsertChart( ScDocument* pDoc, SCTAB nDestTab, const Rectangle& rRect, +void Sc10InsertObject::InsertChart( ScDocument* pDoc, SCTAB nDestTab, const tools::Rectangle& rRect, SCTAB nSrcTab, sal_uInt16 nX1, sal_uInt16 nY1, sal_uInt16 nX2, sal_uInt16 nY2 ) { // if Chart is not installed, SCH_MOD cannot be used! diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx index 4a1438f0052f..568e8ef6f4cd 100644 --- a/sc/source/filter/xcl97/xcl97esc.cxx +++ b/sc/source/filter/xcl97/xcl97esc.cxx @@ -184,7 +184,7 @@ bool lcl_IsFontwork( const SdrObject* pObj ) } // namespace -EscherExHostAppData* XclEscherEx::StartShape( const Reference< XShape >& rxShape, const Rectangle* pChildAnchor ) +EscherExHostAppData* XclEscherEx::StartShape( const Reference< XShape >& rxShape, const tools::Rectangle* pChildAnchor ) { if ( nAdditionalText ) nAdditionalText++; @@ -405,7 +405,7 @@ void XclEscherEx::EndDocument() mpOutStrm->Seek( 0 ); } -std::unique_ptr<XclExpOcxControlObj> XclEscherEx::CreateOCXCtrlObj( Reference< XShape > const & xShape, const Rectangle* pChildAnchor ) +std::unique_ptr<XclExpOcxControlObj> XclEscherEx::CreateOCXCtrlObj( Reference< XShape > const & xShape, const tools::Rectangle* pChildAnchor ) { ::std::unique_ptr< XclExpOcxControlObj > xOcxCtrl; @@ -435,7 +435,7 @@ std::unique_ptr<XclExpOcxControlObj> XclEscherEx::CreateOCXCtrlObj( Reference< X return xOcxCtrl; } -std::unique_ptr<XclExpTbxControlObj> XclEscherEx::CreateTBXCtrlObj( Reference< XShape > const & xShape, const Rectangle* pChildAnchor ) +std::unique_ptr<XclExpTbxControlObj> XclEscherEx::CreateTBXCtrlObj( Reference< XShape > const & xShape, const tools::Rectangle* pChildAnchor ) { ::std::unique_ptr< XclExpTbxControlObj > xTbxCtrl( new XclExpTbxControlObj( mrObjMgr, xShape, pChildAnchor ) ); if( xTbxCtrl->GetObjType() == EXC_OBJTYPE_UNKNOWN ) diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx index db77e64f573f..541dd7fdcfeb 100644 --- a/sc/source/filter/xcl97/xcl97rec.cxx +++ b/sc/source/filter/xcl97/xcl97rec.cxx @@ -102,7 +102,7 @@ XclExpObjList::XclExpObjList( const XclExpRoot& rRoot, XclEscherEx& rEscherEx ) pMsodrawingPerSheet = new XclExpMsoDrawing( rEscherEx ); // open the DGCONTAINER and the patriarch group shape mrEscherEx.OpenContainer( ESCHER_DgContainer ); - Rectangle aRect( 0, 0, 0, 0 ); + tools::Rectangle aRect( 0, 0, 0, 0 ); mrEscherEx.EnterGroup( &aRect ); mrEscherEx.UpdateDffFragmentEnd(); } @@ -364,7 +364,7 @@ XclObj::~XclObj() delete pTxo; } -void XclObj::ImplWriteAnchor( const XclExpRoot& /*rRoot*/, const SdrObject* pSdrObj, const Rectangle* pChildAnchor ) +void XclObj::ImplWriteAnchor( const XclExpRoot& /*rRoot*/, const SdrObject* pSdrObj, const tools::Rectangle* pChildAnchor ) { if( pChildAnchor ) { @@ -493,7 +493,7 @@ void XclObj::SaveTextRecs( XclExpStream& rStrm ) // --- class XclObjComment ------------------------------------------ -XclObjComment::XclObjComment( XclExpObjectManager& rObjMgr, const Rectangle& rRect, const EditTextObject& rEditObj, SdrCaptionObj* pCaption, bool bVisible, const ScAddress& rAddress, Rectangle &rFrom, Rectangle &rTo ) : +XclObjComment::XclObjComment( XclExpObjectManager& rObjMgr, const tools::Rectangle& rRect, const EditTextObject& rEditObj, SdrCaptionObj* pCaption, bool bVisible, const ScAddress& rAddress, tools::Rectangle &rFrom, tools::Rectangle &rTo ) : XclObj( rObjMgr, EXC_OBJTYPE_NOTE, true ) , maScPos( rAddress ) , mpCaption( pCaption->Clone() ) @@ -555,7 +555,7 @@ static void lcl_FillProps( EscherPropertyContainer& rPropOpt, SdrObject* pCaptio rPropOpt.AddOpt( ESCHER_Prop_fPrint, nFlags ); // bool field } -void XclObjComment::ProcessEscherObj( const XclExpRoot& rRoot, const Rectangle& rRect, SdrObject* pCaption, const bool bVisible ) +void XclObjComment::ProcessEscherObj( const XclExpRoot& rRoot, const tools::Rectangle& rRect, SdrObject* pCaption, const bool bVisible ) { EscherPropertyContainer aPropOpt; @@ -594,13 +594,13 @@ class VmlCommentExporter : public VMLExport ScAddress maScPos; SdrCaptionObj* mpCaption; bool mbVisible; - Rectangle maFrom; - Rectangle maTo; + tools::Rectangle maFrom; + tools::Rectangle maTo; public: - VmlCommentExporter ( sax_fastparser::FSHelperPtr p, ScAddress aScPos, SdrCaptionObj* pCaption, bool bVisible, Rectangle &aFrom, Rectangle &aTo ); + VmlCommentExporter ( sax_fastparser::FSHelperPtr p, ScAddress aScPos, SdrCaptionObj* pCaption, bool bVisible, tools::Rectangle &aFrom, tools::Rectangle &aTo ); protected: - virtual void Commit( EscherPropertyContainer& rProps, const Rectangle& rRect ) override; + virtual void Commit( EscherPropertyContainer& rProps, const tools::Rectangle& rRect ) override; using VMLExport::StartShape; virtual sal_Int32 StartShape() override; using VMLExport::EndShape; @@ -608,7 +608,7 @@ protected: }; VmlCommentExporter::VmlCommentExporter( sax_fastparser::FSHelperPtr p, ScAddress aScPos, SdrCaptionObj* pCaption, - bool bVisible, Rectangle &aFrom, Rectangle &aTo ) + bool bVisible, tools::Rectangle &aFrom, tools::Rectangle &aTo ) : VMLExport( p ) , maScPos( aScPos ) , mpCaption( pCaption ) @@ -618,7 +618,7 @@ VmlCommentExporter::VmlCommentExporter( sax_fastparser::FSHelperPtr p, ScAddress { } -void VmlCommentExporter::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect ) +void VmlCommentExporter::Commit( EscherPropertyContainer& rProps, const tools::Rectangle& rRect ) { lcl_FillProps( rProps, mpCaption, mbVisible ); rProps.AddOpt( ESCHER_Prop_fHidden, sal_uInt32(mbVisible) ); // bool field @@ -1015,9 +1015,9 @@ void XclObjAny::WriteFromTo( XclExpXmlStream& rStrm, const Reference< XShape >& awt::Point aTopLeft = rShape->getPosition(); awt::Size aSize = rShape->getSize(); - Rectangle aLocation( aTopLeft.X, aTopLeft.Y, aTopLeft.X + aSize.Width, aTopLeft.Y + aSize.Height ); + tools::Rectangle aLocation( aTopLeft.X, aTopLeft.Y, aTopLeft.X + aSize.Width, aTopLeft.Y + aSize.Height ); ScRange aRange = rStrm.GetRoot().GetDoc().GetRange( nTab, aLocation ); - Rectangle aRangeRect = rStrm.GetRoot().GetDoc().GetMMRect( aRange.aStart.Col(), aRange.aStart.Row(), + tools::Rectangle aRangeRect = rStrm.GetRoot().GetDoc().GetMMRect( aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col()-1, aRange.aEnd.Row()-1, nTab ); diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index d800c4bad8f1..a91995b1168b 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -881,7 +881,7 @@ void ScXMLTableRowCellContext::SetAnnotation(const ScAddress& rPos) ::std::unique_ptr< OutlinerParaObject > xOutlinerObj; if( OutlinerParaObject* pOutlinerObj = pObject->GetOutlinerParaObject() ) xOutlinerObj.reset( new OutlinerParaObject( *pOutlinerObj ) ); - Rectangle aCaptionRect; + tools::Rectangle aCaptionRect; if( mxAnnotationData->mbUseShapePos ) aCaptionRect = pObject->GetLogicRect(); // remove the shape from the drawing page, this invalidates pObject diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 56be7c58bf3f..6198cc4a037c 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -3502,7 +3502,7 @@ void ScXMLExport::WriteShapes(const ScMyCell& rMyCell) if( rMyCell.bHasShape && !rMyCell.aShapeList.empty() && pDoc ) { awt::Point aPoint; - Rectangle aRect = pDoc->GetMMRect(rMyCell.maCellAddress.Col(), rMyCell.maCellAddress.Row(), + tools::Rectangle aRect = pDoc->GetMMRect(rMyCell.maCellAddress.Col(), rMyCell.maCellAddress.Row(), rMyCell.maCellAddress.Col(), rMyCell.maCellAddress.Row(), rMyCell.maCellAddress.Tab()); bool bNegativePage = pDoc->IsNegativePage(rMyCell.maCellAddress.Tab()); if (bNegativePage) @@ -4835,7 +4835,7 @@ void ScXMLExport::GetViewSettings(uno::Sequence<beans::PropertyValue>& rProps) SfxObjectShell* pEmbeddedObj = pDocObj->GetEmbeddedObject(); if (pEmbeddedObj) { - Rectangle aRect(pEmbeddedObj->GetVisArea()); + tools::Rectangle aRect(pEmbeddedObj->GetVisArea()); sal_uInt16 i(0); pProps[i].Name = "VisibleAreaTop"; pProps[i].Value <<= static_cast<sal_Int32>(aRect.getY()); diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index 54b7ace010f4..a5ac5011d485 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -2646,7 +2646,7 @@ void ScXMLImport::SetViewSettings(const uno::Sequence<beans::PropertyValue>& aVi SfxObjectShell* pEmbeddedObj = pDocObj->GetEmbeddedObject(); if (pEmbeddedObj) { - Rectangle aRect; + tools::Rectangle aRect; aRect.setX( nLeft ); aRect.setY( nTop ); aRect.setWidth( nWidth ); diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx index d566abfe8d19..dbb9a5f76cf7 100644 --- a/sc/source/ui/Accessibility/AccessibleCell.cxx +++ b/sc/source/ui/Accessibility/AccessibleCell.cxx @@ -150,15 +150,15 @@ void SAL_CALL ScAccessibleCell::grabFocus( ) } } -Rectangle ScAccessibleCell::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleCell::GetBoundingBoxOnScreen() const { - Rectangle aCellRect(GetBoundingBox()); + tools::Rectangle aCellRect(GetBoundingBox()); if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindowByPos(meSplitPos); if (pWindow) { - Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); + tools::Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); aCellRect.setX(aCellRect.getX() + aRect.getX()); aCellRect.setY(aCellRect.getY() + aRect.getY()); } @@ -166,9 +166,9 @@ Rectangle ScAccessibleCell::GetBoundingBoxOnScreen() const return aCellRect; } -Rectangle ScAccessibleCell::GetBoundingBox() const +tools::Rectangle ScAccessibleCell::GetBoundingBox() const { - Rectangle aCellRect; + tools::Rectangle aCellRect; if (mpViewShell) { long nSizeX, nSizeY; @@ -180,7 +180,7 @@ Rectangle ScAccessibleCell::GetBoundingBox() const vcl::Window* pWindow = mpViewShell->GetWindowByPos(meSplitPos); if (pWindow) { - Rectangle aRect(pWindow->GetWindowExtentsRelative(pWindow->GetAccessibleParentWindow())); + tools::Rectangle aRect(pWindow->GetWindowExtentsRelative(pWindow->GetAccessibleParentWindow())); aRect.Move(-aRect.Left(), -aRect.Top()); aCellRect = aRect.Intersection(aCellRect); } @@ -196,7 +196,7 @@ Rectangle ScAccessibleCell::GetBoundingBox() const mpDoc->GetAttr( maCellAddress.Col(), maCellAddress.Row(), maCellAddress.Tab(), ATTR_ROTATE_VALUE ) ); if( pItem && (pItem->GetValue() != 0) ) { - Rectangle aParaRect = GetParagraphBoundingBox(); + tools::Rectangle aParaRect = GetParagraphBoundingBox(); if( !aParaRect.IsEmpty() && (aCellRect.GetWidth() < aParaRect.GetWidth()) ) aCellRect.SetSize( Size( aParaRect.GetWidth(), aCellRect.GetHeight() ) ); } diff --git a/sc/source/ui/Accessibility/AccessibleContextBase.cxx b/sc/source/ui/Accessibility/AccessibleContextBase.cxx index 13b541f4e891..383ede495fef 100644 --- a/sc/source/ui/Accessibility/AccessibleContextBase.cxx +++ b/sc/source/ui/Accessibility/AccessibleContextBase.cxx @@ -146,7 +146,7 @@ sal_Bool SAL_CALL ScAccessibleContextBase::containsPoint(const awt::Point& rPoin { SolarMutexGuard aGuard; IsObjectValid(); - return Rectangle (Point(), GetBoundingBox().GetSize()).IsInside(VCLPoint(rPoint)); + return tools::Rectangle (Point(), GetBoundingBox().GetSize()).IsInside(VCLPoint(rPoint)); } uno::Reference< XAccessible > SAL_CALL ScAccessibleContextBase::getAccessibleAtPoint( @@ -194,8 +194,8 @@ bool SAL_CALL ScAccessibleContextBase::isShowing( ) uno::Reference<XAccessibleComponent> xParentComponent (mxParent->getAccessibleContext(), uno::UNO_QUERY); if (xParentComponent.is()) { - Rectangle aParentBounds(VCLRectangle(xParentComponent->getBounds())); - Rectangle aBounds(VCLRectangle(getBounds())); + tools::Rectangle aParentBounds(VCLRectangle(xParentComponent->getBounds())); + tools::Rectangle aBounds(VCLRectangle(getBounds())); bShowing = aBounds.IsOver(aParentBounds); } } @@ -496,16 +496,16 @@ void ScAccessibleContextBase::CommitFocusLost() const vcl::unohelper::NotifyAccessibleStateEventGlobally(aEvent); } -Rectangle ScAccessibleContextBase::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleContextBase::GetBoundingBoxOnScreen() const { OSL_FAIL("not implemented"); - return Rectangle(); + return tools::Rectangle(); } -Rectangle ScAccessibleContextBase::GetBoundingBox() const +tools::Rectangle ScAccessibleContextBase::GetBoundingBox() const { OSL_FAIL("not implemented"); - return Rectangle(); + return tools::Rectangle(); } void ScAccessibleContextBase::IsObjectValid() const diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx index ccc46e40b673..463f55e3c2f8 100644 --- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx +++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx @@ -171,14 +171,14 @@ void ScAccessibleCsvControl::SendRemoveColumnEvent( sal_uInt32 /* nFirstColumn * // helpers -------------------------------------------------------------------- -Rectangle ScAccessibleCsvControl::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleCsvControl::GetBoundingBoxOnScreen() const { SolarMutexGuard aGuard; ensureAlive(); return implGetControl().GetWindowExtentsRelative( nullptr ); } -Rectangle ScAccessibleCsvControl::GetBoundingBox() const +tools::Rectangle ScAccessibleCsvControl::GetBoundingBox() const { SolarMutexGuard aGuard; ensureAlive(); @@ -1466,16 +1466,16 @@ OUString SAL_CALL ScAccessibleCsvCell::getImplementationName() // helpers -------------------------------------------------------------------- -Rectangle ScAccessibleCsvCell::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleCsvCell::GetBoundingBoxOnScreen() const { SolarMutexGuard aGuard; ensureAlive(); - Rectangle aRect( implGetBoundingBox() ); + tools::Rectangle aRect( implGetBoundingBox() ); aRect.SetPos( implGetAbsPos( aRect.TopLeft() ) ); return aRect; } -Rectangle ScAccessibleCsvCell::GetBoundingBox() const +tools::Rectangle ScAccessibleCsvCell::GetBoundingBox() const { SolarMutexGuard aGuard; ensureAlive(); @@ -1519,10 +1519,10 @@ Size ScAccessibleCsvCell::implGetRealSize() const (mnLine == CSV_LINE_HEADER) ? rGrid.GetHdrHeight() : rGrid.GetLineHeight() ); } -Rectangle ScAccessibleCsvCell::implGetBoundingBox() const +tools::Rectangle ScAccessibleCsvCell::implGetBoundingBox() const { ScCsvGrid& rGrid = implGetGrid(); - Rectangle aClipRect( Point( 0, 0 ), rGrid.GetSizePixel() ); + tools::Rectangle aClipRect( Point( 0, 0 ), rGrid.GetSizePixel() ); if( mnColumn != CSV_COLUMN_HEADER ) { aClipRect.Left() = rGrid.GetFirstX(); @@ -1531,7 +1531,7 @@ Rectangle ScAccessibleCsvCell::implGetBoundingBox() const if( mnLine != CSV_LINE_HEADER ) aClipRect.Top() = rGrid.GetHdrHeight(); - Rectangle aRect( implGetRealPos(), implGetRealSize() ); + tools::Rectangle aRect( implGetRealPos(), implGetRealSize() ); aRect.Intersection( aClipRect ); if( (aRect.GetWidth() <= 0) || (aRect.GetHeight() <= 0) ) aRect.SetSize( Size( -1, -1 ) ); @@ -1541,7 +1541,7 @@ Rectangle ScAccessibleCsvCell::implGetBoundingBox() const ::std::unique_ptr< SvxEditSource > ScAccessibleCsvCell::implCreateEditSource() { ScCsvGrid& rGrid = implGetGrid(); - Rectangle aBoundRect( implGetBoundingBox() ); + tools::Rectangle aBoundRect( implGetBoundingBox() ); aBoundRect -= implGetRealPos(); ::std::unique_ptr< SvxEditSource > pEditSource( new ScAccessibilityEditSource( o3tl::make_unique<ScAccessibleCsvTextData>(&rGrid, rGrid.GetEditEngine(), maCellText, aBoundRect, implGetRealSize()) ) ); diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx index be2bdb1789e8..f85637dcedcd 100644 --- a/sc/source/ui/Accessibility/AccessibleDocument.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx @@ -1613,7 +1613,7 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) } else if ((rHint.GetId() == SfxHintId::ScAccVisAreaChanged) || (rHint.GetId() == SfxHintId::ScAccWindowResized)) { - Rectangle aOldVisArea(maVisArea); + tools::Rectangle aOldVisArea(maVisArea); maVisArea = GetVisibleArea_Impl(); if (maVisArea != aOldVisArea) @@ -1718,7 +1718,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleDocument::getAccessibleAtPoin uno::Reference< XAccessibleComponent > xComp(xCont, uno::UNO_QUERY); if (xComp.is()) { - Rectangle aBound(VCLRectangle(xComp->getBounds())); + tools::Rectangle aBound(VCLRectangle(xComp->getBounds())); if (aBound.IsInside(VCLPoint(rPoint))) xAccessible = mxTempAcc; } @@ -2063,9 +2063,9 @@ uno::Sequence<sal_Int8> SAL_CALL ///===== IAccessibleViewForwarder ======================================== -Rectangle ScAccessibleDocument::GetVisibleArea_Impl() const +tools::Rectangle ScAccessibleDocument::GetVisibleArea_Impl() const { - Rectangle aVisRect(GetBoundingBox()); + tools::Rectangle aVisRect(GetBoundingBox()); if (mpViewShell) { @@ -2082,7 +2082,7 @@ Rectangle ScAccessibleDocument::GetVisibleArea_Impl() const return aVisRect; } -Rectangle ScAccessibleDocument::GetVisibleArea() const +tools::Rectangle ScAccessibleDocument::GetVisibleArea() const { SolarMutexGuard aGuard; IsObjectValid(); @@ -2142,9 +2142,9 @@ OUString SAL_CALL return sName; } -Rectangle ScAccessibleDocument::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleDocument::GetBoundingBoxOnScreen() const { - Rectangle aRect; + tools::Rectangle aRect; if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindowByPos(meSplitPos); @@ -2154,9 +2154,9 @@ Rectangle ScAccessibleDocument::GetBoundingBoxOnScreen() const return aRect; } -Rectangle ScAccessibleDocument::GetBoundingBox() const +tools::Rectangle ScAccessibleDocument::GetBoundingBox() const { - Rectangle aRect; + tools::Rectangle aRect; if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindowByPos(meSplitPos); diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx index 18e19a7e557c..65a702fc4902 100644 --- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx @@ -69,7 +69,7 @@ typedef std::list< uno::Reference< XAccessible > > ScXAccList; struct ScAccNote { OUString maNoteText; - Rectangle maRect; + tools::Rectangle maRect; ScAddress maNoteCell; ::accessibility::AccessibleTextHelper* mpTextHelper; sal_Int32 mnParaCount; @@ -88,13 +88,13 @@ class ScNotesChildren public: ScNotesChildren(ScPreviewShell* pViewShell, ScAccessibleDocumentPagePreview* pAccDoc); ~ScNotesChildren(); - void Init(const Rectangle& rVisRect, sal_Int32 nOffset); + void Init(const tools::Rectangle& rVisRect, sal_Int32 nOffset); sal_Int32 GetChildrenCount() const { return mnParagraphs;} uno::Reference<XAccessible> GetChild(sal_Int32 nIndex) const; uno::Reference<XAccessible> GetAt(const awt::Point& rPoint) const; - void DataChanged(const Rectangle& rVisRect); + void DataChanged(const tools::Rectangle& rVisRect); private: ScPreviewShell* mpViewShell; @@ -105,12 +105,12 @@ private: sal_Int32 mnParagraphs; sal_Int32 mnOffset; - ::accessibility::AccessibleTextHelper* CreateTextHelper(const OUString& rString, const Rectangle& rVisRect, const ScAddress& aCellPos, bool bMarkNote, sal_Int32 nChildOffset) const; - sal_Int32 AddNotes(const ScPreviewLocationData& rData, const Rectangle& rVisRect, bool bMark, ScAccNotes& rNotes); + ::accessibility::AccessibleTextHelper* CreateTextHelper(const OUString& rString, const tools::Rectangle& rVisRect, const ScAddress& aCellPos, bool bMarkNote, sal_Int32 nChildOffset) const; + sal_Int32 AddNotes(const ScPreviewLocationData& rData, const tools::Rectangle& rVisRect, bool bMark, ScAccNotes& rNotes); static sal_Int8 CompareCell(const ScAddress& aCell1, const ScAddress& aCell2); static void CollectChildren(const ScAccNote& rNote, ScXAccList& rList); - sal_Int32 CheckChanges(const ScPreviewLocationData& rData, const Rectangle& rVisRect, + sal_Int32 CheckChanges(const ScPreviewLocationData& rData, const tools::Rectangle& rVisRect, bool bMark, ScAccNotes& rOldNotes, ScAccNotes& rNewNotes, ScXAccList& rOldParas, ScXAccList& rNewParas); @@ -140,7 +140,7 @@ ScNotesChildren::~ScNotesChildren() std::for_each(maMarks.begin(), maMarks.end(), DeleteAccNote()); } -::accessibility::AccessibleTextHelper* ScNotesChildren::CreateTextHelper(const OUString& rString, const Rectangle& rVisRect, const ScAddress& aCellPos, bool bMarkNote, sal_Int32 nChildOffset) const +::accessibility::AccessibleTextHelper* ScNotesChildren::CreateTextHelper(const OUString& rString, const tools::Rectangle& rVisRect, const ScAddress& aCellPos, bool bMarkNote, sal_Int32 nChildOffset) const { ::accessibility::AccessibleTextHelper* pTextHelper = new ::accessibility::AccessibleTextHelper(o3tl::make_unique<ScAccessibilityEditSource>(o3tl::make_unique<ScAccessibleNoteTextData>(mpViewShell, rString, aCellPos, bMarkNote))); pTextHelper->SetEventSource(mpAccDoc); @@ -150,7 +150,7 @@ ScNotesChildren::~ScNotesChildren() return pTextHelper; } -sal_Int32 ScNotesChildren::AddNotes(const ScPreviewLocationData& rData, const Rectangle& rVisRect, bool bMark, ScAccNotes& rNotes) +sal_Int32 ScNotesChildren::AddNotes(const ScPreviewLocationData& rData, const tools::Rectangle& rVisRect, bool bMark, ScAccNotes& rNotes) { sal_Int32 nCount = rData.GetNoteCountInRange(rVisRect, bMark); @@ -189,7 +189,7 @@ sal_Int32 ScNotesChildren::AddNotes(const ScPreviewLocationData& rData, const Re return nParagraphs; } -void ScNotesChildren::Init(const Rectangle& rVisRect, sal_Int32 nOffset) +void ScNotesChildren::Init(const tools::Rectangle& rVisRect, sal_Int32 nOffset) { if (mpViewShell && !mnParagraphs) { @@ -259,7 +259,7 @@ uno::Reference<XAccessible> ScNotesChildren::GetChild(sal_Int32 nIndex) const struct ScPointFound { - Rectangle maPoint; + tools::Rectangle maPoint; sal_Int32 mnParagraphs; explicit ScPointFound(const Point& rPoint) : maPoint(rPoint, Size(0, 0)), mnParagraphs(0) {} bool operator() (const ScAccNote& rNote) @@ -318,7 +318,7 @@ void ScNotesChildren::CollectChildren(const ScAccNote& rNote, ScXAccList& rList) } sal_Int32 ScNotesChildren::CheckChanges(const ScPreviewLocationData& rData, - const Rectangle& rVisRect, bool bMark, ScAccNotes& rOldNotes, + const tools::Rectangle& rVisRect, bool bMark, ScAccNotes& rOldNotes, ScAccNotes& rNewNotes, ScXAccList& rOldParas, ScXAccList& rNewParas) { sal_Int32 nCount = rData.GetNoteCountInRange(rVisRect, bMark); @@ -451,7 +451,7 @@ struct ScChildNew } }; -void ScNotesChildren::DataChanged(const Rectangle& rVisRect) +void ScNotesChildren::DataChanged(const tools::Rectangle& rVisRect) { if (mpViewShell && mpAccDoc) { @@ -487,7 +487,7 @@ public: ///===== IAccessibleViewForwarder ======================================== - virtual Rectangle GetVisibleArea() const override; + virtual tools::Rectangle GetVisibleArea() const override; virtual Point LogicToPixel (const Point& rPoint) const override; virtual Size LogicToPixel (const Size& rSize) const override; @@ -513,10 +513,10 @@ ScIAccessibleViewForwarder::ScIAccessibleViewForwarder(ScPreviewShell* pViewShel ///===== IAccessibleViewForwarder ======================================== -Rectangle ScIAccessibleViewForwarder::GetVisibleArea() const +tools::Rectangle ScIAccessibleViewForwarder::GetVisibleArea() const { SolarMutexGuard aGuard; - Rectangle aVisRect; + tools::Rectangle aVisRect; vcl::Window* pWin = mpViewShell->GetWindow(); if (pWin) { @@ -536,7 +536,7 @@ Point ScIAccessibleViewForwarder::LogicToPixel (const Point& rPoint) const vcl::Window* pWin = mpViewShell->GetWindow(); if (pWin && mpAccDoc) { - Rectangle aRect(mpAccDoc->GetBoundingBoxOnScreen()); + tools::Rectangle aRect(mpAccDoc->GetBoundingBoxOnScreen()); aPoint = pWin->LogicToPixel(rPoint, maMapMode) + aRect.TopLeft(); } @@ -599,7 +599,7 @@ struct ScShapeRange ScShapeChildVec maBackShapes; ScShapeChildVec maForeShapes; // inclusive internal shapes ScShapeChildVec maControls; - Rectangle maPixelRect; + tools::Rectangle maPixelRect; MapMode maMapMode; ScIAccessibleViewForwarder maViewForwarder; }; @@ -652,7 +652,7 @@ private: void FindChanged(ScShapeRange& aOld, ScShapeRange& aNew) const; ::accessibility::AccessibleShape* GetAccShape(const ScShapeChild& rShape) const; ::accessibility::AccessibleShape* GetAccShape(const ScShapeChildVec& rShapes, sal_Int32 nIndex) const; - void FillShapes(const Rectangle& aPixelPaintRect, const MapMode& aMapMode, sal_uInt8 nRangeId); + void FillShapes(const tools::Rectangle& aPixelPaintRect, const MapMode& aMapMode, sal_uInt8 nRangeId); // void AddShape(const uno::Reference<drawing::XShape>& xShape, SdrLayerID aLayerID); // void RemoveShape(const uno::Reference<drawing::XShape>& xShape, SdrLayerID aLayerID); @@ -839,7 +839,7 @@ void ScShapeChildren::Init() { const ScPreviewLocationData& rData = mpViewShell->GetLocationData(); MapMode aMapMode; - Rectangle aPixelPaintRect; + tools::Rectangle aPixelPaintRect; sal_uInt8 nRangeId; sal_uInt16 nCount(rData.GetDrawRanges()); for (sal_uInt16 i = 0; i < nCount; ++i) @@ -1024,7 +1024,7 @@ uno::Reference<XAccessible> ScShapeChildren::GetBackgroundShapeAt(const awt::Poi return (GetAccShape(rShapes[nIndex])); } -void ScShapeChildren::FillShapes(const Rectangle& aPixelPaintRect, const MapMode& aMapMode, sal_uInt8 nRangeId) +void ScShapeChildren::FillShapes(const tools::Rectangle& aPixelPaintRect, const MapMode& aMapMode, sal_uInt8 nRangeId) { OSL_ENSURE(nRangeId < maShapeRanges.size(), "this is not a valid range for draw objects"); SdrPage* pPage = GetDrawPage(); @@ -1034,10 +1034,10 @@ void ScShapeChildren::FillShapes(const Rectangle& aPixelPaintRect, const MapMode bool bForeAdded(false); bool bBackAdded(false); bool bControlAdded(false); - Rectangle aClippedPixelPaintRect(aPixelPaintRect); + tools::Rectangle aClippedPixelPaintRect(aPixelPaintRect); if (mpAccDoc) { - Rectangle aRect2(Point(0,0), mpAccDoc->GetBoundingBoxOnScreen().GetSize()); + tools::Rectangle aRect2(Point(0,0), mpAccDoc->GetBoundingBoxOnScreen().GetSize()); aClippedPixelPaintRect = aPixelPaintRect.GetIntersection(aRect2); } maShapeRanges[nRangeId].maPixelRect = aClippedPixelPaintRect; @@ -1053,7 +1053,7 @@ void ScShapeChildren::FillShapes(const Rectangle& aPixelPaintRect, const MapMode uno::Reference< drawing::XShape > xShape(pObj->getUnoShape(), uno::UNO_QUERY); if (xShape.is()) { - Rectangle aRect(pWin->LogicToPixel(VCLPoint(xShape->getPosition()), aMapMode), pWin->LogicToPixel(VCLSize(xShape->getSize()), aMapMode)); + tools::Rectangle aRect(pWin->LogicToPixel(VCLPoint(xShape->getPosition()), aMapMode), pWin->LogicToPixel(VCLSize(xShape->getSize()), aMapMode)); if(!aClippedPixelPaintRect.GetIntersection(aRect).IsEmpty()) { ScShapeChild aShape; @@ -1117,7 +1117,7 @@ struct ScPagePreviewCountData { // order is background shapes, header, table or notes, footer, foreground shapes, controls - Rectangle aVisRect; + tools::Rectangle aVisRect; long nBackShapes; long nHeaders; long nTables; @@ -1150,9 +1150,9 @@ ScPagePreviewCountData::ScPagePreviewCountData( const ScPreviewLocationData& rDa if ( pSizeWindow ) aOutputSize = pSizeWindow->GetOutputSizePixel(); Point aPoint; - aVisRect = Rectangle( aPoint, aOutputSize ); + aVisRect = tools::Rectangle( aPoint, aOutputSize ); - Rectangle aObjRect; + tools::Rectangle aObjRect; if ( rData.GetHeaderPosition( aObjRect ) && aObjRect.IsOver( aVisRect ) ) nHeaders = 1; @@ -1259,7 +1259,7 @@ void ScAccessibleDocumentPagePreview::Notify( SfxBroadcaster& rBC, const SfxHint if ( pSizeWindow ) aOutputSize = pSizeWindow->GetOutputSizePixel(); Point aPoint; - Rectangle aVisRect( aPoint, aOutputSize ); + tools::Rectangle aVisRect( aPoint, aOutputSize ); GetNotesChildren()->DataChanged(aVisRect); GetShapeChildren()->DataChanged(); @@ -1296,7 +1296,7 @@ void ScAccessibleDocumentPagePreview::Notify( SfxBroadcaster& rBC, const SfxHint if ( pSizeWindow ) aOutputSize = pSizeWindow->GetOutputSizePixel(); Point aPoint; - Rectangle aVisRect( aPoint, aOutputSize ); + tools::Rectangle aVisRect( aPoint, aOutputSize ); GetNotesChildren()->DataChanged(aVisRect); GetShapeChildren()->VisAreaChanged(); @@ -1532,9 +1532,9 @@ OUString SAL_CALL ScAccessibleDocumentPagePreview::createAccessibleName() return sName; } -Rectangle ScAccessibleDocumentPagePreview::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleDocumentPagePreview::GetBoundingBoxOnScreen() const { - Rectangle aRect; + tools::Rectangle aRect; if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindow(); @@ -1544,9 +1544,9 @@ Rectangle ScAccessibleDocumentPagePreview::GetBoundingBoxOnScreen() const return aRect; } -Rectangle ScAccessibleDocumentPagePreview::GetBoundingBox() const +tools::Rectangle ScAccessibleDocumentPagePreview::GetBoundingBox() const { - Rectangle aRect; + tools::Rectangle aRect; if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindow(); diff --git a/sc/source/ui/Accessibility/AccessibleEditObject.cxx b/sc/source/ui/Accessibility/AccessibleEditObject.cxx index 6393c872f253..1a84a230e14a 100644 --- a/sc/source/ui/Accessibility/AccessibleEditObject.cxx +++ b/sc/source/ui/Accessibility/AccessibleEditObject.cxx @@ -167,9 +167,9 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleEditObject::getAccessibleAtPo return xRet; } -Rectangle ScAccessibleEditObject::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleEditObject::GetBoundingBoxOnScreen() const { - Rectangle aScreenBounds; + tools::Rectangle aScreenBounds; if ( mpWindow ) { @@ -180,7 +180,7 @@ Rectangle ScAccessibleEditObject::GetBoundingBoxOnScreen() const MapMode aMapMode( mpEditView->GetEditEngine()->GetRefMapMode() ); aScreenBounds = mpWindow->LogicToPixel( mpEditView->GetOutputArea(), aMapMode ); Point aCellLoc = aScreenBounds.TopLeft(); - Rectangle aWindowRect = mpWindow->GetWindowExtentsRelative( nullptr ); + tools::Rectangle aWindowRect = mpWindow->GetWindowExtentsRelative( nullptr ); Point aWindowLoc = aWindowRect.TopLeft(); Point aPos( aCellLoc.getX() + aWindowLoc.getX(), aCellLoc.getY() + aWindowLoc.getY() ); aScreenBounds.SetPos( aPos ); @@ -195,9 +195,9 @@ Rectangle ScAccessibleEditObject::GetBoundingBoxOnScreen() const return aScreenBounds; } -Rectangle ScAccessibleEditObject::GetBoundingBox() const +tools::Rectangle ScAccessibleEditObject::GetBoundingBox() const { - Rectangle aBounds( GetBoundingBoxOnScreen() ); + tools::Rectangle aBounds( GetBoundingBoxOnScreen() ); if ( mpWindow ) { diff --git a/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx b/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx index ca38874eb626..76c96eb554e4 100644 --- a/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx +++ b/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx @@ -236,46 +236,46 @@ Sequence<sal_Int8> ScAccessibleFilterMenu::getImplementationId() return css::uno::Sequence<sal_Int8>(); } -Rectangle ScAccessibleFilterMenu::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleFilterMenu::GetBoundingBoxOnScreen() const { if (mnMenuPos == ScMenuFloatingWindow::MENU_NOT_SELECTED) - return Rectangle(); + return tools::Rectangle(); // Menu object's bounding box is the bounding box of the menu item that // launches the menu, which belongs to the parent window. ScMenuFloatingWindow* pParentWin = mpWindow->getParentMenuWindow(); if (!pParentWin) - return Rectangle(); + return tools::Rectangle(); if (!pParentWin->IsVisible()) - return Rectangle(); + return tools::Rectangle(); Point aPos = pParentWin->OutputToAbsoluteScreenPixel(Point(0,0)); Point aMenuPos; Size aMenuSize; pParentWin->getMenuItemPosSize(mnMenuPos, aMenuPos, aMenuSize); - Rectangle aRect(aPos + aMenuPos, aMenuSize); + tools::Rectangle aRect(aPos + aMenuPos, aMenuSize); return aRect; } -Rectangle ScAccessibleFilterMenu::GetBoundingBox() const +tools::Rectangle ScAccessibleFilterMenu::GetBoundingBox() const { if (mnMenuPos == ScMenuFloatingWindow::MENU_NOT_SELECTED) - return Rectangle(); + return tools::Rectangle(); // Menu object's bounding box is the bounding box of the menu item that // launches the menu, which belongs to the parent window. ScMenuFloatingWindow* pParentWin = mpWindow->getParentMenuWindow(); if (!pParentWin) - return Rectangle(); + return tools::Rectangle(); if (!pParentWin->IsVisible()) - return Rectangle(); + return tools::Rectangle(); Point aMenuPos; Size aMenuSize; pParentWin->getMenuItemPosSize(mnMenuPos, aMenuPos, aMenuSize); - Rectangle aRect(aMenuPos, aMenuSize); + tools::Rectangle aRect(aMenuPos, aMenuSize); return aRect; } diff --git a/sc/source/ui/Accessibility/AccessibleFilterMenuItem.cxx b/sc/source/ui/Accessibility/AccessibleFilterMenuItem.cxx index 1b2174ecbdcb..2712649ab159 100644 --- a/sc/source/ui/Accessibility/AccessibleFilterMenuItem.cxx +++ b/sc/source/ui/Accessibility/AccessibleFilterMenuItem.cxx @@ -126,28 +126,28 @@ void ScAccessibleFilterMenuItem::setEnabled(bool bEnabled) mbEnabled = bEnabled; } -Rectangle ScAccessibleFilterMenuItem::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleFilterMenuItem::GetBoundingBoxOnScreen() const { if (!mpWindow->IsVisible()) - return Rectangle(); + return tools::Rectangle(); Point aPos = mpWindow->OutputToAbsoluteScreenPixel(Point(0,0)); Point aMenuPos; Size aMenuSize; mpWindow->getMenuItemPosSize(mnMenuPos, aMenuPos, aMenuSize); - Rectangle aRect(aPos + aMenuPos, aMenuSize); + tools::Rectangle aRect(aPos + aMenuPos, aMenuSize); return aRect; } -Rectangle ScAccessibleFilterMenuItem::GetBoundingBox() const +tools::Rectangle ScAccessibleFilterMenuItem::GetBoundingBox() const { if (!mpWindow->IsVisible()) - return Rectangle(); + return tools::Rectangle(); Point aMenuPos; Size aMenuSize; mpWindow->getMenuItemPosSize(mnMenuPos, aMenuPos, aMenuSize); - Rectangle aRect(aMenuPos, aMenuSize); + tools::Rectangle aRect(aMenuPos, aMenuSize); return aRect; } diff --git a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx index aa7015cbbc36..9eee1276c5ac 100644 --- a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx +++ b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx @@ -307,15 +307,15 @@ OUString SAL_CALL ScAccessiblePageHeader::createAccessibleName() return sName.replaceFirst("%1", SC_RESSTR(SCSTR_UNKNOWN)); } -Rectangle ScAccessiblePageHeader::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessiblePageHeader::GetBoundingBoxOnScreen() const { - Rectangle aCellRect(GetBoundingBox()); + tools::Rectangle aCellRect(GetBoundingBox()); if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindow(); if (pWindow) { - Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); + tools::Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); aCellRect.setX(aCellRect.getX() + aRect.getX()); aCellRect.setY(aCellRect.getY() + aRect.getY()); } @@ -323,9 +323,9 @@ Rectangle ScAccessiblePageHeader::GetBoundingBoxOnScreen() const return aCellRect; } -Rectangle ScAccessiblePageHeader::GetBoundingBox() const +tools::Rectangle ScAccessiblePageHeader::GetBoundingBox() const { - Rectangle aRect; + tools::Rectangle aRect; if (mpViewShell) { const ScPreviewLocationData& rData = mpViewShell->GetLocationData(); @@ -335,7 +335,7 @@ Rectangle ScAccessiblePageHeader::GetBoundingBox() const rData.GetFooterPosition( aRect ); // the Rectangle could contain negative coordinates so it should be clipped - Rectangle aClipRect(Point(0, 0), aRect.GetSize()); + tools::Rectangle aClipRect(Point(0, 0), aRect.GetSize()); vcl::Window* pWindow = mpViewShell->GetWindow(); if (pWindow) aClipRect = pWindow->GetWindowExtentsRelative(pWindow->GetAccessibleParentWindow()); diff --git a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx index 26715505cf37..cbfdc5a57f09 100644 --- a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx +++ b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx @@ -243,9 +243,9 @@ OUString SAL_CALL ScAccessiblePageHeaderArea::createAccessibleName() return sName; } -Rectangle ScAccessiblePageHeaderArea::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessiblePageHeaderArea::GetBoundingBoxOnScreen() const { - Rectangle aRect; + tools::Rectangle aRect; if (mxParent.is()) { uno::Reference<XAccessibleContext> xContext = mxParent->getAccessibleContext(); @@ -253,15 +253,15 @@ Rectangle ScAccessiblePageHeaderArea::GetBoundingBoxOnScreen() const if (xComp.is()) { // has the same size and position on screen like the parent - aRect = Rectangle(VCLPoint(xComp->getLocationOnScreen()), VCLRectangle(xComp->getBounds()).GetSize()); + aRect = tools::Rectangle(VCLPoint(xComp->getLocationOnScreen()), VCLRectangle(xComp->getBounds()).GetSize()); } } return aRect; } -Rectangle ScAccessiblePageHeaderArea::GetBoundingBox() const +tools::Rectangle ScAccessiblePageHeaderArea::GetBoundingBox() const { - Rectangle aRect; + tools::Rectangle aRect; if (mxParent.is()) { uno::Reference<XAccessibleContext> xContext = mxParent->getAccessibleContext(); @@ -269,7 +269,7 @@ Rectangle ScAccessiblePageHeaderArea::GetBoundingBox() const if (xComp.is()) { // has the same size and position on screen like the parent and so the pos is (0, 0) - Rectangle aNewRect(Point(0, 0), VCLRectangle(xComp->getBounds()).GetSize()); + tools::Rectangle aNewRect(Point(0, 0), VCLRectangle(xComp->getBounds()).GetSize()); aRect = aNewRect; } } diff --git a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx index a931018fd28f..8ca2ff72865b 100644 --- a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx +++ b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx @@ -201,16 +201,16 @@ uno::Sequence<sal_Int8> SAL_CALL //==== internal ========================================================= -Rectangle ScAccessiblePreviewCell::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessiblePreviewCell::GetBoundingBoxOnScreen() const { - Rectangle aCellRect; + tools::Rectangle aCellRect; if (mpViewShell) { mpViewShell->GetLocationData().GetCellPosition( maCellAddress, aCellRect ); vcl::Window* pWindow = mpViewShell->GetWindow(); if (pWindow) { - Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); + tools::Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); aCellRect.setX(aCellRect.getX() + aRect.getX()); aCellRect.setY(aCellRect.getY() + aRect.getY()); } @@ -218,9 +218,9 @@ Rectangle ScAccessiblePreviewCell::GetBoundingBoxOnScreen() const return aCellRect; } -Rectangle ScAccessiblePreviewCell::GetBoundingBox() const +tools::Rectangle ScAccessiblePreviewCell::GetBoundingBox() const { - Rectangle aCellRect; + tools::Rectangle aCellRect; if (mpViewShell) { mpViewShell->GetLocationData().GetCellPosition( maCellAddress, aCellRect ); @@ -231,7 +231,7 @@ Rectangle ScAccessiblePreviewCell::GetBoundingBox() const uno::Reference<XAccessibleComponent> xAccParentComp (xAccParentContext, uno::UNO_QUERY); if (xAccParentComp.is()) { - Rectangle aParentRect (VCLRectangle(xAccParentComp->getBounds())); + tools::Rectangle aParentRect (VCLRectangle(xAccParentComp->getBounds())); aCellRect.setX(aCellRect.getX() - aParentRect.getX()); aCellRect.setY(aCellRect.getY() - aParentRect.getY()); } diff --git a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx index 2f83e3f60535..cb71f3d3c534 100644 --- a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx +++ b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx @@ -308,9 +308,9 @@ uno::Sequence<sal_Int8> SAL_CALL //==== internal ========================================================= -Rectangle ScAccessiblePreviewHeaderCell::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessiblePreviewHeaderCell::GetBoundingBoxOnScreen() const { - Rectangle aCellRect; + tools::Rectangle aCellRect; FillTableInfo(); @@ -319,7 +319,7 @@ Rectangle ScAccessiblePreviewHeaderCell::GetBoundingBoxOnScreen() const const ScPreviewColRowInfo& rColInfo = mpTableInfo->GetColInfo()[maCellPos.Col()]; const ScPreviewColRowInfo& rRowInfo = mpTableInfo->GetRowInfo()[maCellPos.Row()]; - aCellRect = Rectangle( rColInfo.nPixelStart, rRowInfo.nPixelStart, rColInfo.nPixelEnd, rRowInfo.nPixelEnd ); + aCellRect = tools::Rectangle( rColInfo.nPixelStart, rRowInfo.nPixelStart, rColInfo.nPixelEnd, rRowInfo.nPixelEnd ); } if (mpViewShell) @@ -327,7 +327,7 @@ Rectangle ScAccessiblePreviewHeaderCell::GetBoundingBoxOnScreen() const vcl::Window* pWindow = mpViewShell->GetWindow(); if (pWindow) { - Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); + tools::Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); aCellRect.setX(aCellRect.getX() + aRect.getX()); aCellRect.setY(aCellRect.getY() + aRect.getY()); } @@ -335,7 +335,7 @@ Rectangle ScAccessiblePreviewHeaderCell::GetBoundingBoxOnScreen() const return aCellRect; } -Rectangle ScAccessiblePreviewHeaderCell::GetBoundingBox() const +tools::Rectangle ScAccessiblePreviewHeaderCell::GetBoundingBox() const { FillTableInfo(); @@ -344,7 +344,7 @@ Rectangle ScAccessiblePreviewHeaderCell::GetBoundingBox() const const ScPreviewColRowInfo& rColInfo = mpTableInfo->GetColInfo()[maCellPos.Col()]; const ScPreviewColRowInfo& rRowInfo = mpTableInfo->GetRowInfo()[maCellPos.Row()]; - Rectangle aCellRect( rColInfo.nPixelStart, rRowInfo.nPixelStart, rColInfo.nPixelEnd, rRowInfo.nPixelEnd ); + tools::Rectangle aCellRect( rColInfo.nPixelStart, rRowInfo.nPixelStart, rColInfo.nPixelEnd, rRowInfo.nPixelEnd ); uno::Reference<XAccessible> xAccParent = const_cast<ScAccessiblePreviewHeaderCell*>(this)->getAccessibleParent(); if (xAccParent.is()) { @@ -352,14 +352,14 @@ Rectangle ScAccessiblePreviewHeaderCell::GetBoundingBox() const uno::Reference<XAccessibleComponent> xAccParentComp (xAccParentContext, uno::UNO_QUERY); if (xAccParentComp.is()) { - Rectangle aParentRect (VCLRectangle(xAccParentComp->getBounds())); + tools::Rectangle aParentRect (VCLRectangle(xAccParentComp->getBounds())); aCellRect.setX(aCellRect.getX() - aParentRect.getX()); aCellRect.setY(aCellRect.getY() - aParentRect.getY()); } } return aCellRect; } - return Rectangle(); + return tools::Rectangle(); } OUString SAL_CALL ScAccessiblePreviewHeaderCell::createAccessibleDescription() @@ -423,7 +423,7 @@ void ScAccessiblePreviewHeaderCell::FillTableInfo() const if ( pWindow ) aOutputSize = pWindow->GetOutputSizePixel(); Point aPoint; - Rectangle aVisRect( aPoint, aOutputSize ); + tools::Rectangle aVisRect( aPoint, aOutputSize ); mpTableInfo = new ScPreviewTableInfo; mpViewShell->GetLocationData().GetTableInfo( aVisRect, *mpTableInfo ); diff --git a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx index 00e367e3c193..19ea2bd621ee 100644 --- a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx +++ b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx @@ -430,7 +430,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewTable::getAccessibleAt const ScPreviewColRowInfo* pColInfo = mpTableInfo->GetColInfo(); const ScPreviewColRowInfo* pRowInfo = mpTableInfo->GetRowInfo(); - Rectangle aScreenRect(GetBoundingBox()); + tools::Rectangle aScreenRect(GetBoundingBox()); awt::Point aMovedPoint = aPoint; aMovedPoint.X += aScreenRect.Left(); @@ -602,15 +602,15 @@ OUString SAL_CALL ScAccessiblePreviewTable::createAccessibleName() return sName; } -Rectangle ScAccessiblePreviewTable::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessiblePreviewTable::GetBoundingBoxOnScreen() const { - Rectangle aCellRect(GetBoundingBox()); + tools::Rectangle aCellRect(GetBoundingBox()); if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindow(); if (pWindow) { - Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); + tools::Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); aCellRect.setX(aCellRect.getX() + aRect.getX()); aCellRect.setY(aCellRect.getY() + aRect.getY()); } @@ -618,11 +618,11 @@ Rectangle ScAccessiblePreviewTable::GetBoundingBoxOnScreen() const return aCellRect; } -Rectangle ScAccessiblePreviewTable::GetBoundingBox() const +tools::Rectangle ScAccessiblePreviewTable::GetBoundingBox() const { FillTableInfo(); - Rectangle aRect; + tools::Rectangle aRect; if ( mpTableInfo ) { SCCOL nColumns = mpTableInfo->GetCols(); @@ -632,7 +632,7 @@ Rectangle ScAccessiblePreviewTable::GetBoundingBox() const const ScPreviewColRowInfo* pColInfo = mpTableInfo->GetColInfo(); const ScPreviewColRowInfo* pRowInfo = mpTableInfo->GetRowInfo(); - aRect = Rectangle( pColInfo[0].nPixelStart, + aRect = tools::Rectangle( pColInfo[0].nPixelStart, pRowInfo[0].nPixelStart, pColInfo[nColumns-1].nPixelEnd, pRowInfo[nRows-1].nPixelEnd ); @@ -656,7 +656,7 @@ void ScAccessiblePreviewTable::FillTableInfo() const if ( pWindow ) aOutputSize = pWindow->GetOutputSizePixel(); Point aPoint; - Rectangle aVisRect( aPoint, aOutputSize ); + tools::Rectangle aVisRect( aPoint, aOutputSize ); mpTableInfo = new ScPreviewTableInfo; mpViewShell->GetLocationData().GetTableInfo( aVisRect, *mpTableInfo ); diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx index ee9f22a3d5e4..fa2733e51e8b 100644 --- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx +++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx @@ -1310,9 +1310,9 @@ void SAL_CALL ScAccessibleSpreadsheet::addAccessibleEventListener(const uno::Ref //==== internal ========================================================= -Rectangle ScAccessibleSpreadsheet::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleSpreadsheet::GetBoundingBoxOnScreen() const { - Rectangle aRect; + tools::Rectangle aRect; if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindowByPos(meSplitPos); @@ -1322,9 +1322,9 @@ Rectangle ScAccessibleSpreadsheet::GetBoundingBoxOnScreen() const return aRect; } -Rectangle ScAccessibleSpreadsheet::GetBoundingBox() const +tools::Rectangle ScAccessibleSpreadsheet::GetBoundingBox() const { - Rectangle aRect; + tools::Rectangle aRect; if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindowByPos(meSplitPos); @@ -1393,9 +1393,9 @@ ScDocument* ScAccessibleSpreadsheet::GetDocument(ScTabViewShell* pViewShell) return pDoc; } -Rectangle ScAccessibleSpreadsheet::GetVisArea(ScTabViewShell* pViewShell, ScSplitPos eSplitPos) +tools::Rectangle ScAccessibleSpreadsheet::GetVisArea(ScTabViewShell* pViewShell, ScSplitPos eSplitPos) { - Rectangle aVisArea; + tools::Rectangle aVisArea; if (pViewShell) { vcl::Window* pWindow = pViewShell->GetWindowByPos(eSplitPos); @@ -1408,7 +1408,7 @@ Rectangle ScAccessibleSpreadsheet::GetVisArea(ScTabViewShell* pViewShell, ScSpli return aVisArea; } -Rectangle ScAccessibleSpreadsheet::GetVisCells(const Rectangle& rVisArea) +tools::Rectangle ScAccessibleSpreadsheet::GetVisCells(const tools::Rectangle& rVisArea) { if (mpViewShell) { @@ -1418,10 +1418,10 @@ Rectangle ScAccessibleSpreadsheet::GetVisCells(const Rectangle& rVisArea) mpViewShell->GetViewData().GetPosFromPixel( 1, 1, meSplitPos, nStartX, nStartY); mpViewShell->GetViewData().GetPosFromPixel( rVisArea.GetWidth(), rVisArea.GetHeight(), meSplitPos, nEndX, nEndY); - return Rectangle(nStartX, nStartY, nEndX, nEndY); + return tools::Rectangle(nStartX, nStartY, nEndX, nEndY); } else - return Rectangle(); + return tools::Rectangle(); } sal_Bool SAL_CALL ScAccessibleSpreadsheet::selectRow( sal_Int32 row ) diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx index 2878d60e91d2..d4b339a970db 100644 --- a/sc/source/ui/Accessibility/AccessibleText.cxx +++ b/sc/source/ui/Accessibility/AccessibleText.cxx @@ -54,7 +54,7 @@ public: ScViewForwarder(ScTabViewShell* pViewShell, ScSplitPos eSplitPos, const ScAddress& rCell); 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; @@ -74,9 +74,9 @@ bool ScViewForwarder::IsValid() const return mpViewShell != nullptr; } -Rectangle ScViewForwarder::GetVisArea() const +tools::Rectangle ScViewForwarder::GetVisArea() const { - Rectangle aVisArea; + tools::Rectangle aVisArea; if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindowByPos(meSplitPos); @@ -147,7 +147,7 @@ public: const EditView* _pEditView); 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; @@ -167,12 +167,12 @@ bool ScEditObjectViewForwarder::IsValid() const return (mpWindow != nullptr); } -Rectangle ScEditObjectViewForwarder::GetVisArea() const +tools::Rectangle ScEditObjectViewForwarder::GetVisArea() const { - Rectangle aVisArea; + tools::Rectangle aVisArea; if (mpWindow) { - Rectangle aVisRect(mpWindow->GetWindowExtentsRelative(mpWindow->GetAccessibleParentWindow())); + tools::Rectangle aVisRect(mpWindow->GetWindowExtentsRelative(mpWindow->GetAccessibleParentWindow())); aVisRect.SetPos(Point(0, 0)); @@ -194,7 +194,7 @@ Point ScEditObjectViewForwarder::LogicToPixel( const Point& rPoint, const MapMod Point aPoint( rPoint ); if ( mpEditView ) { - Rectangle aEditViewVisArea( mpEditView->GetVisArea() ); + tools::Rectangle aEditViewVisArea( mpEditView->GetVisArea() ); aPoint += aEditViewVisArea.TopLeft(); } return mpWindow->LogicToPixel( aPoint, rMapMode ); @@ -215,7 +215,7 @@ Point ScEditObjectViewForwarder::PixelToLogic( const Point& rPoint, const MapMod Point aPoint( mpWindow->PixelToLogic( rPoint, rMapMode ) ); if ( mpEditView ) { - Rectangle aEditViewVisArea( mpEditView->GetVisArea() ); + tools::Rectangle aEditViewVisArea( mpEditView->GetVisArea() ); aPoint -= aEditViewVisArea.TopLeft(); } return aPoint; @@ -240,16 +240,16 @@ public: explicit ScPreviewViewForwarder(ScPreviewShell* pViewShell); 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; void SetInvalid(); - Rectangle GetVisRect() const; + tools::Rectangle GetVisRect() const; // clips the VisArea and calculates with the negativ coordinates - Rectangle CorrectVisArea(const Rectangle& rVisArea) const; + tools::Rectangle CorrectVisArea(const tools::Rectangle& rVisArea) const; }; ScPreviewViewForwarder::ScPreviewViewForwarder(ScPreviewShell* pViewShell) @@ -262,9 +262,9 @@ bool ScPreviewViewForwarder::IsValid() const return mpViewShell != nullptr; } -Rectangle ScPreviewViewForwarder::GetVisArea() const +tools::Rectangle ScPreviewViewForwarder::GetVisArea() const { - Rectangle aVisArea; + tools::Rectangle aVisArea; OSL_FAIL("should be implemented in an abrevated class"); return aVisArea; } @@ -316,7 +316,7 @@ void ScPreviewViewForwarder::SetInvalid() mpViewShell = nullptr; } -Rectangle ScPreviewViewForwarder::GetVisRect() const +tools::Rectangle ScPreviewViewForwarder::GetVisRect() const { if ( mpViewShell ) { @@ -325,15 +325,15 @@ Rectangle ScPreviewViewForwarder::GetVisRect() const if ( pWindow ) aOutputSize = pWindow->GetOutputSizePixel(); Point aPoint; - Rectangle aVisRect( aPoint, aOutputSize ); + tools::Rectangle aVisRect( aPoint, aOutputSize ); return aVisRect; } - return Rectangle(); + return tools::Rectangle(); } -Rectangle ScPreviewViewForwarder::CorrectVisArea(const Rectangle& rVisArea) const +tools::Rectangle ScPreviewViewForwarder::CorrectVisArea(const tools::Rectangle& rVisArea) const { - Rectangle aVisArea(rVisArea); + tools::Rectangle aVisArea(rVisArea); Point aPos = aVisArea.TopLeft(); // get first the position to remember negative positions after clipping vcl::Window* pWin = mpViewShell->GetWindow(); @@ -362,7 +362,7 @@ class ScPreviewHeaderFooterViewForwarder : public ScPreviewViewForwarder public: ScPreviewHeaderFooterViewForwarder(ScPreviewShell* pViewShell, bool bHeader); - virtual Rectangle GetVisArea() const override; + virtual tools::Rectangle GetVisArea() const override; }; ScPreviewHeaderFooterViewForwarder::ScPreviewHeaderFooterViewForwarder(ScPreviewShell* pViewShell, bool bHeader) @@ -372,9 +372,9 @@ ScPreviewHeaderFooterViewForwarder::ScPreviewHeaderFooterViewForwarder(ScPreview { } -Rectangle ScPreviewHeaderFooterViewForwarder::GetVisArea() const +tools::Rectangle ScPreviewHeaderFooterViewForwarder::GetVisArea() const { - Rectangle aVisArea; + tools::Rectangle aVisArea; if (mpViewShell) { const ScPreviewLocationData& rData = mpViewShell->GetLocationData(); @@ -399,7 +399,7 @@ public: ScPreviewCellViewForwarder(ScPreviewShell* pViewShell, ScAddress aCellPos); - virtual Rectangle GetVisArea() const override; + virtual tools::Rectangle GetVisArea() const override; }; ScPreviewCellViewForwarder::ScPreviewCellViewForwarder(ScPreviewShell* pViewShell, @@ -410,9 +410,9 @@ ScPreviewCellViewForwarder::ScPreviewCellViewForwarder(ScPreviewShell* pViewShel { } -Rectangle ScPreviewCellViewForwarder::GetVisArea() const +tools::Rectangle ScPreviewCellViewForwarder::GetVisArea() const { - Rectangle aVisArea; + tools::Rectangle aVisArea; if (mpViewShell) { const ScPreviewLocationData& rData = mpViewShell->GetLocationData(); @@ -436,7 +436,7 @@ public: ScAddress aCellPos, bool bColHeader); - virtual Rectangle GetVisArea() const override; + virtual tools::Rectangle GetVisArea() const override; }; ScPreviewHeaderCellViewForwarder::ScPreviewHeaderCellViewForwarder(ScPreviewShell* pViewShell, @@ -449,9 +449,9 @@ ScPreviewHeaderCellViewForwarder::ScPreviewHeaderCellViewForwarder(ScPreviewShel { } -Rectangle ScPreviewHeaderCellViewForwarder::GetVisArea() const +tools::Rectangle ScPreviewHeaderCellViewForwarder::GetVisArea() const { - Rectangle aVisArea; + tools::Rectangle aVisArea; if (mpViewShell) { const ScPreviewLocationData& rData = mpViewShell->GetLocationData(); @@ -475,7 +475,7 @@ public: ScAddress aCellPos, bool bNoteMark); - virtual Rectangle GetVisArea() const override; + virtual tools::Rectangle GetVisArea() const override; }; ScPreviewNoteViewForwarder::ScPreviewNoteViewForwarder(ScPreviewShell* pViewShell, @@ -488,9 +488,9 @@ ScPreviewNoteViewForwarder::ScPreviewNoteViewForwarder(ScPreviewShell* pViewShel { } -Rectangle ScPreviewNoteViewForwarder::GetVisArea() const +tools::Rectangle ScPreviewNoteViewForwarder::GetVisArea() const { - Rectangle aVisArea; + tools::Rectangle aVisArea; if (mpViewShell) { const ScPreviewLocationData& rData = mpViewShell->GetLocationData(); @@ -513,7 +513,7 @@ public: ScEditViewForwarder(EditView* pEditView, vcl::Window* pWin); 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; virtual bool GetSelection( ESelection& rSelection ) const override; @@ -536,9 +536,9 @@ bool ScEditViewForwarder::IsValid() const return mpWindow && mpEditView; } -Rectangle ScEditViewForwarder::GetVisArea() const +tools::Rectangle ScEditViewForwarder::GetVisArea() const { - Rectangle aVisArea; + tools::Rectangle aVisArea; if (IsValid() && mpEditView->GetEditEngine()) { MapMode aMapMode(mpEditView->GetEditEngine()->GetRefMapMode()); @@ -1287,7 +1287,7 @@ SvxTextForwarder* ScAccessiblePreviewHeaderCellTextData::GetTextForwarder() if ( pWindow ) aOutputSize = pWindow->GetOutputSizePixel(); Point aPoint; - Rectangle aVisRect( aPoint, aOutputSize ); + tools::Rectangle aVisRect( aPoint, aOutputSize ); Size aSize(mpViewShell->GetLocationData().GetHeaderCellOutputRect(aVisRect, aCellPos, mbColHeader).GetSize()); if (pWindow) aSize = pWindow->PixelToLogic(aSize, pEditEngine->GetRefMapMode()); @@ -1409,7 +1409,7 @@ SvxTextForwarder* ScAccessibleHeaderTextData::GetTextForwarder() if ( mpViewShell ) { - Rectangle aVisRect; + tools::Rectangle aVisRect; mpViewShell->GetLocationData().GetHeaderPosition(aVisRect); Size aSize(aVisRect.GetSize()); vcl::Window* pWin = mpViewShell->GetWindow(); @@ -1514,7 +1514,7 @@ SvxTextForwarder* ScAccessibleNoteTextData::GetTextForwarder() if ( pWindow ) aOutputSize = pWindow->GetOutputSizePixel(); Point aPoint; - Rectangle aVisRect( aPoint, aOutputSize ); + tools::Rectangle aVisRect( aPoint, aOutputSize ); Size aSize(mpViewShell->GetLocationData().GetNoteInRangeOutputRect(aVisRect, mbMarkNote, maCellPos).GetSize()); if (pWindow) aSize = pWindow->PixelToLogic(aSize, mpEditEngine->GetRefMapMode()); @@ -1541,21 +1541,21 @@ SvxViewForwarder* ScAccessibleNoteTextData::GetViewForwarder() class ScCsvViewForwarder : public SvxViewForwarder { - Rectangle maBoundBox; + tools::Rectangle maBoundBox; VclPtr<vcl::Window> mpWindow; public: - explicit ScCsvViewForwarder( vcl::Window* pWindow, const Rectangle& rBoundBox ); + explicit ScCsvViewForwarder( vcl::Window* pWindow, const tools::Rectangle& rBoundBox ); 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; void SetInvalid(); }; -ScCsvViewForwarder::ScCsvViewForwarder( vcl::Window* pWindow, const Rectangle& rBoundBox ) : +ScCsvViewForwarder::ScCsvViewForwarder( vcl::Window* pWindow, const tools::Rectangle& rBoundBox ) : maBoundBox( rBoundBox ), mpWindow( pWindow ) { @@ -1566,7 +1566,7 @@ bool ScCsvViewForwarder::IsValid() const return mpWindow != nullptr; } -Rectangle ScCsvViewForwarder::GetVisArea() const +tools::Rectangle ScCsvViewForwarder::GetVisArea() const { return maBoundBox; } @@ -1590,7 +1590,7 @@ void ScCsvViewForwarder::SetInvalid() ScAccessibleCsvTextData::ScAccessibleCsvTextData( vcl::Window* pWindow, EditEngine* pEditEngine, - const OUString& rCellText, const Rectangle& rBoundBox, const Size& rCellSize ) : + const OUString& rCellText, const tools::Rectangle& rBoundBox, const Size& rCellSize ) : mpWindow( pWindow ), mpEditEngine( pEditEngine ), maCellText( rCellText ), diff --git a/sc/source/ui/app/client.cxx b/sc/source/ui/app/client.cxx index 83e9b922c30c..9713669bf8b6 100644 --- a/sc/source/ui/app/client.cxx +++ b/sc/source/ui/app/client.cxx @@ -77,7 +77,7 @@ SdrOle2Obj* ScClient::GetDrawObj() return pOle2Obj; } -void ScClient::RequestNewObjectArea( Rectangle& aLogicRect ) +void ScClient::RequestNewObjectArea( tools::Rectangle& aLogicRect ) { SfxViewShell* pSfxViewSh = GetViewShell(); ScTabViewShell* pViewSh = dynamic_cast<ScTabViewShell*>( pSfxViewSh ); @@ -87,7 +87,7 @@ void ScClient::RequestNewObjectArea( Rectangle& aLogicRect ) return; } - Rectangle aOldRect = GetObjArea(); + tools::Rectangle aOldRect = GetObjArea(); SdrOle2Obj* pDrawObj = GetDrawObj(); if ( pDrawObj ) { @@ -109,7 +109,7 @@ void ScClient::RequestNewObjectArea( Rectangle& aLogicRect ) aPos.X() = aSize.Width() + 1; // negative aSize.Width() = -aSize.Width(); // positive } - Rectangle aPageRect( aPos, aSize ); + tools::Rectangle aPageRect( aPos, aSize ); if (aLogicRect.Right() > aPageRect.Right()) { @@ -153,7 +153,7 @@ void ScClient::ObjectAreaChanged() SdrOle2Obj* pDrawObj = GetDrawObj(); if (pDrawObj) { - Rectangle aNewRectangle(GetScaledObjArea()); + tools::Rectangle aNewRectangle(GetScaledObjArea()); // #i118524# if sheared/rotated, center to non-rotated LogicRect pDrawObj->setSuppressSetVisAreaSize(true); @@ -162,7 +162,7 @@ void ScClient::ObjectAreaChanged() { pDrawObj->SetLogicRect( aNewRectangle ); - const Rectangle& rBoundRect = pDrawObj->GetCurrentBoundRect(); + const tools::Rectangle& rBoundRect = pDrawObj->GetCurrentBoundRect(); const Point aDelta(aNewRectangle.Center() - rBoundRect.Center()); aNewRectangle.Move(aDelta.X(), aDelta.Y()); @@ -212,7 +212,7 @@ void ScClient::ViewChanged() SdrOle2Obj* pDrawObj = GetDrawObj(); if (pDrawObj) { - Rectangle aLogicRect = pDrawObj->GetLogicRect(); + tools::Rectangle aLogicRect = pDrawObj->GetLogicRect(); Fraction aFractX = GetScaleWidth(); Fraction aFractY = GetScaleHeight(); aFractX *= aVisSize.Width(); diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx index d2f3deb9e7cd..fc81f99cd695 100644 --- a/sc/source/ui/app/drwtrans.cxx +++ b/sc/source/ui/app/drwtrans.cxx @@ -753,7 +753,7 @@ void ScDrawTransferObj::InitDocShell() } Point aTmpPoint; - Rectangle aDestArea( aTmpPoint, aSrcSize ); + tools::Rectangle aDestArea( aTmpPoint, aSrcSize ); pDocSh->SetVisArea( aDestArea ); ScViewOptions aViewOpt( rDestDoc.GetViewOptions() ); diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 52987d1a3fcf..18e9f342650c 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -1084,7 +1084,7 @@ void ScInputHandler::ShowTip( const OUString& rText ) if (pCur) aPos = pTipVisibleParent->LogicToPixel( pCur->GetPos() ); aPos = pTipVisibleParent->OutputToScreenPixel( aPos ); - Rectangle aRect( aPos, aPos ); + tools::Rectangle aRect( aPos, aPos ); QuickHelpFlags nAlign = QuickHelpFlags::Left|QuickHelpFlags::Bottom; nTipVisible = Help::ShowPopover(pTipVisibleParent, aRect, rText, nAlign); @@ -1109,7 +1109,7 @@ void ScInputHandler::ShowTipBelow( const OUString& rText ) aPos = pTipVisibleSecParent->LogicToPixel( aLogicPos ); } aPos = pTipVisibleSecParent->OutputToScreenPixel( aPos ); - Rectangle aRect( aPos, aPos ); + tools::Rectangle aRect( aPos, aPos ); QuickHelpFlags nAlign = QuickHelpFlags::Left | QuickHelpFlags::Top | QuickHelpFlags::NoEvadePointer; nTipVisibleSec = Help::ShowPopover(pTipVisibleSecParent, aRect, rText, nAlign); pTipVisibleSecParent->AddEventListener( LINK( this, ScInputHandler, ShowHideTipVisibleSecParentListener ) ); diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index f9e03970f103..be4ab18234c0 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -411,7 +411,7 @@ void ScInputWindow::Select() } } -void ScInputWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void ScInputWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { ToolBox::Paint(rRenderContext, rRect); @@ -979,7 +979,7 @@ void ScInputBarGroup::TextGrabFocus() maTextWnd->TextGrabFocus(); } -void ScTextWnd::Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) +void ScTextWnd::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) { EditView* pView = GetEditView(); if (pView) @@ -1033,7 +1033,7 @@ void ScTextWnd::Resize() if (mpEditView) { Size aOutputSize = GetOutputSizePixel(); - Rectangle aOutputArea = PixelToLogic( Rectangle( Point(), aOutputSize )); + tools::Rectangle aOutputArea = PixelToLogic( tools::Rectangle( Point(), aOutputSize )); mpEditView->SetOutputArea( aOutputArea ); // Don't leave an empty area at the bottom if we can move the text down. @@ -1150,7 +1150,7 @@ static void lcl_ModifyRTLDefaults( SfxItemSet& rSet ) static void lcl_ModifyRTLVisArea( EditView* pEditView ) { - Rectangle aVisArea = pEditView->GetVisArea(); + tools::Rectangle aVisArea = pEditView->GetVisArea(); Size aPaper = pEditView->GetEditEngine()->GetPaperSize(); long nDiff = aPaper.Width() - aVisArea.Right(); aVisArea.Left() += nDiff; @@ -1634,7 +1634,7 @@ void ScTextWnd::SetTextString( const OUString& rNewString ) if ( nDifPos == aString.getLength() ) // only new characters appended nFlags = InvalidateFlags::NoErase; // then background is already clear - Invalidate( Rectangle( nInvPos, 0, nStartPos+nTextSize, GetOutputSize().Height()-1 ), nFlags ); + Invalidate( tools::Rectangle( nInvPos, 0, nStartPos+nTextSize, GetOutputSize().Height()-1 ), nFlags ); } } else @@ -2048,7 +2048,7 @@ void ScPosWnd::Modify() if (pCur) aPos = pWin->LogicToPixel( pCur->GetPos() ); aPos = pWin->OutputToScreenPixel( aPos ); - Rectangle aRect( aPos, aPos ); + tools::Rectangle aRect( aPos, aPos ); OUString aText = ScGlobal::GetRscString( nStrId ); QuickHelpFlags nAlign = QuickHelpFlags::Left|QuickHelpFlags::Bottom; diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx index 990be1b5bde8..ee615ff36a07 100644 --- a/sc/source/ui/app/transobj.cxx +++ b/sc/source/ui/app/transobj.cxx @@ -102,7 +102,7 @@ void ScTransferObj::PaintToDev( OutputDevice* pDev, ScDocument* pDoc, double nPr return; Point aPoint; - Rectangle aBound( aPoint, pDev->GetOutputSize() ); //! use size from clip area? + tools::Rectangle aBound( aPoint, pDev->GetOutputSize() ); //! use size from clip area? ScViewData aViewData(nullptr,nullptr); aViewData.InitData( pDoc ); @@ -174,7 +174,7 @@ ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const TransferableObjectDesc aBlock = ScRange( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 ); nVisibleTab = nTab1; // valid table as default - Rectangle aMMRect = pDoc->GetMMRect( nCol1,nRow1, nCol2,nRow2, nTab1 ); + tools::Rectangle aMMRect = pDoc->GetMMRect( nCol1,nRow1, nCol2,nRow2, nTab1 ); aObjDesc.maSize = aMMRect.GetSize(); PrepareOLE( aObjDesc ); } @@ -348,7 +348,7 @@ bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor, const OUSt } else if ( nFormat == SotClipboardFormatId::BITMAP || nFormat == SotClipboardFormatId::PNG ) { - Rectangle aMMRect = pDoc->GetMMRect( aBlock.aStart.Col(), aBlock.aStart.Row(), + tools::Rectangle aMMRect = pDoc->GetMMRect( aBlock.aStart.Col(), aBlock.aStart.Row(), aBlock.aEnd.Col(), aBlock.aEnd.Row(), aBlock.aStart.Tab() ); ScopedVclPtrInstance< VirtualDevice > pVirtDev; @@ -374,7 +374,7 @@ bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor, const OUSt GDIMetaFile aMtf; ScopedVclPtrInstance< VirtualDevice > pVDev; MapMode aMapMode( pEmbObj->GetMapUnit() ); - Rectangle aVisArea( pEmbObj->GetVisArea( ASPECT_CONTENT ) ); + tools::Rectangle aVisArea( pEmbObj->GetVisArea( ASPECT_CONTENT ) ); pVDev->EnableOutput( false ); pVDev->SetMapMode( aMapMode ); @@ -742,7 +742,7 @@ void ScTransferObj::InitDocShell(bool bLimitToPageSize) // pDocSh->SetVisAreaSize( Size(nSizeX,nSizeY) ); - Rectangle aNewArea( Point(nPosX,nPosY), Size(nSizeX,nSizeY) ); + tools::Rectangle aNewArea( Point(nPosX,nPosY), Size(nSizeX,nSizeY) ); //TODO/LATER: why twice?! //pDocSh->SvInPlaceObject::SetVisArea( aNewArea ); pDocSh->SetVisArea( aNewArea ); diff --git a/sc/source/ui/cctrl/cbuttonw.cxx b/sc/source/ui/cctrl/cbuttonw.cxx index f7d9729512d2..4fa281c4734a 100644 --- a/sc/source/ui/cctrl/cbuttonw.cxx +++ b/sc/source/ui/cctrl/cbuttonw.cxx @@ -61,13 +61,13 @@ void ScDDComboBoxButton::Draw( const Point& rAt, Color aOldLine = pOut->GetLineColor(); bool bOldEnable = pOut->IsMapModeEnabled(); - Rectangle aBtnRect( rAt, rSize ); + tools::Rectangle aBtnRect( rAt, rSize ); pOut->EnableMapMode( false ); DecorationView aDecoView( pOut); - Rectangle aInnerRect=aDecoView.DrawButton( aBtnRect, DrawButtonFlags::Default ); + tools::Rectangle aInnerRect=aDecoView.DrawButton( aBtnRect, DrawButtonFlags::Default ); aInnerRect.Left() += 1; aInnerRect.Top() += 1; @@ -94,11 +94,11 @@ void ScDDComboBoxButton::Draw( const Point& rAt, pOut->SetFillColor(); } -void ScDDComboBoxButton::ImpDrawArrow( const Rectangle& rRect ) +void ScDDComboBoxButton::ImpDrawArrow( const tools::Rectangle& rRect ) { // no need to save old line and fill color here (is restored after the call) - Rectangle aPixRect = rRect; + tools::Rectangle aPixRect = rRect; Point aCenter = aPixRect.Center(); Size aSize = aPixRect.GetSize(); @@ -110,7 +110,7 @@ void ScDDComboBoxButton::ImpDrawArrow( const Rectangle& rRect ) aSize4.Width() = aSize.Width() >> 2; aSize4.Height() = aSize.Height() >> 2; - Rectangle aTempRect = aPixRect; + tools::Rectangle aTempRect = aPixRect; const StyleSettings& rSett = Application::GetSettings().GetStyleSettings(); Color aColor( rSett.GetButtonTextColor().GetColor() ); diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index 9023b0f296a3..cf4d20082181 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -238,7 +238,7 @@ void ScMenuFloatingWindow::KeyInput(const KeyEvent& rKEvt) Window::KeyInput(rKEvt); } -void ScMenuFloatingWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) +void ScMenuFloatingWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) { const StyleSettings& rStyle = GetSettings().GetStyleSettings(); @@ -247,7 +247,7 @@ void ScMenuFloatingWindow::Paint(vcl::RenderContext& rRenderContext, const Recta Color aBackColor = rStyle.GetMenuColor(); Color aBorderColor = rStyle.GetShadowColor(); - Rectangle aCtrlRect(Point(0, 0), GetOutputSizePixel()); + tools::Rectangle aCtrlRect(Point(0, 0), GetOutputSizePixel()); // Window background bool bNativeDrawn = true; @@ -373,7 +373,7 @@ void ScMenuFloatingWindow::drawMenuItem(vcl::RenderContext& rRenderContext, size aMarkerPos.Y() += aSize.Height() / 2 - nFontHeight / 4 + 1; aMarkerPos.X() += aSize.Width() - nFontHeight + nFontHeight / 4; Size aMarkerSize(nFontHeight / 2, nFontHeight / 2); - aDecoView.DrawSymbol(Rectangle(aMarkerPos, aMarkerSize), SymbolType::SPIN_RIGHT, GetTextColor()); + aDecoView.DrawSymbol(tools::Rectangle(aMarkerPos, aMarkerSize), SymbolType::SPIN_RIGHT, GetTextColor()); } } @@ -382,13 +382,13 @@ void ScMenuFloatingWindow::drawSeparator(vcl::RenderContext& rRenderContext, siz Point aPos; Size aSize; getMenuItemPosSize(nPos, aPos, aSize); - Rectangle aRegion(aPos,aSize); + tools::Rectangle aRegion(aPos,aSize); if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::Entire)) { rRenderContext.Push(PushFlags::CLIPREGION); rRenderContext.IntersectClipRegion(aRegion); - Rectangle aCtrlRect(Point(0,0), GetOutputSizePixel()); + tools::Rectangle aCtrlRect(Point(0,0), GetOutputSizePixel()); rRenderContext.DrawNativeControl(ControlType::MenuPopup, ControlPart::Entire, aCtrlRect, ControlState::ENABLED, ImplControlValue(), OUString()); @@ -565,7 +565,7 @@ void ScMenuFloatingWindow::launchSubMenu(bool bSetMenuPos) SetPopupModeFlags(nOldFlags | FloatWinPopupFlags::NoAppFocusClose); pSubMenu->resizeToFitMenuItems(); // set the size before launching the popup to get it positioned correctly. pSubMenu->StartPopupMode( - Rectangle(aPos,aSize), (FloatWinPopupFlags::Right | FloatWinPopupFlags::GrabFocus)); + tools::Rectangle(aPos,aSize), (FloatWinPopupFlags::Right | FloatWinPopupFlags::GrabFocus)); pSubMenu->AddPopupModeWindow(this); if (bSetMenuPos) pSubMenu->setSelectedMenuItem(0, false, false); // select menu item after the popup becomes fully visible. @@ -675,13 +675,13 @@ void ScMenuFloatingWindow::highlightMenuItem(vcl::RenderContext& rRenderContext, Point aPos; Size aSize; getMenuItemPosSize(nPos, aPos, aSize); - Rectangle aRegion(aPos,aSize); + tools::Rectangle aRegion(aPos,aSize); if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::Entire)) { rRenderContext.Push(PushFlags::CLIPREGION); - rRenderContext.IntersectClipRegion(Rectangle(aPos, aSize)); - Rectangle aCtrlRect(Point(0,0), GetOutputSizePixel()); + rRenderContext.IntersectClipRegion(tools::Rectangle(aPos, aSize)); + tools::Rectangle aCtrlRect(Point(0,0), GetOutputSizePixel()); rRenderContext.DrawNativeControl(ControlType::MenuPopup, ControlPart::Entire, aCtrlRect, ControlState::ENABLED, ImplControlValue(), OUString()); rRenderContext.Pop(); @@ -707,7 +707,7 @@ void ScMenuFloatingWindow::highlightMenuItem(vcl::RenderContext& rRenderContext, rRenderContext.SetFillColor(aBackColor); rRenderContext.SetLineColor(aBackColor); } - rRenderContext.DrawRect(Rectangle(aPos,aSize)); + rRenderContext.DrawRect(tools::Rectangle(aPos,aSize)); } Color aTextColor = bSelected ? rStyle.GetMenuHighlightTextColor() : rStyle.GetMenuTextColor(); @@ -744,7 +744,7 @@ size_t ScMenuFloatingWindow::getEnclosingMenuItem(const Point& rPos) const Point aPos; Size aSize; getMenuItemPosSize(i, aPos, aSize); - Rectangle aRect(aPos, aSize); + tools::Rectangle aRect(aPos, aSize); if (aRect.IsInside(rPos)) return maMenuItems[i].mbSeparator ? MENU_NOT_SELECTED : i; } @@ -815,7 +815,7 @@ void ScMenuFloatingWindow::ensureSubMenuVisible(ScMenuFloatingWindow* pSubMenu) SetPopupModeFlags(nOldFlags | FloatWinPopupFlags::NoAppFocusClose); pSubMenu->resizeToFitMenuItems(); // set the size before launching the popup to get it positioned correctly. pSubMenu->StartPopupMode( - Rectangle(aPos,aSize), (FloatWinPopupFlags::Right | FloatWinPopupFlags::GrabFocus)); + tools::Rectangle(aPos,aSize), (FloatWinPopupFlags::Right | FloatWinPopupFlags::GrabFocus)); pSubMenu->AddPopupModeWindow(this); SetPopupModeFlags(nOldFlags); } @@ -1337,7 +1337,7 @@ bool ScCheckListMenuWindow::EventNotify(NotifyEvent& rNEvt) return ScMenuFloatingWindow::EventNotify(rNEvt); } -void ScCheckListMenuWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void ScCheckListMenuWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { ScMenuFloatingWindow::Paint(rRenderContext, rRect); @@ -1352,12 +1352,12 @@ void ScCheckListMenuWindow::Paint(vcl::RenderContext& rRenderContext, const Rect // Member list box background rRenderContext.SetFillColor(aMemberBackColor); rRenderContext.SetLineColor(aBorderColor); - rRenderContext.DrawRect(Rectangle(aPos,aSize)); + rRenderContext.DrawRect(tools::Rectangle(aPos,aSize)); // Single-action button box getSectionPosSize(aPos, aSize, SINGLE_BTN_AREA); rRenderContext.SetFillColor(rStyle.GetMenuColor()); - rRenderContext.DrawRect(Rectangle(aPos,aSize)); + rRenderContext.DrawRect(tools::Rectangle(aPos,aSize)); } void ScCheckListMenuWindow::updateMemberParents( SvTreeListEntry* pLeaf, size_t nIdx ) @@ -1930,14 +1930,14 @@ void ScCheckListMenuWindow::getResult(ResultType& rResult) rResult.swap(aResult); } -void ScCheckListMenuWindow::launch(const Rectangle& rRect) +void ScCheckListMenuWindow::launch(const tools::Rectangle& rRect) { packWindow(); if (!maConfig.mbAllowEmptySet) // We need to have at least one member selected. maBtnOk->Enable(maChecks->GetCheckedEntryCount() != 0); - Rectangle aRect(rRect); + tools::Rectangle aRect(rRect); if (maConfig.mbRTL) { // In RTL mode, the logical "left" is visual "right". diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx index cc0aaf972e61..deb422163e9f 100644 --- a/sc/source/ui/cctrl/dpcontrol.cxx +++ b/sc/source/ui/cctrl/dpcontrol.cxx @@ -98,7 +98,7 @@ void ScDPFieldButton::draw() if (mbBaseButton) { // Background - Rectangle aRect(maPos, maSize); + tools::Rectangle aRect(maPos, maSize); mpOutDev->SetLineColor(mpStyle->GetFaceColor()); mpOutDev->SetFillColor(mpStyle->GetFaceColor()); mpOutDev->DrawRect(aRect); @@ -176,7 +176,7 @@ void ScDPFieldButton::drawPopupButton() mpOutDev->SetLineColor(COL_BLACK); Color aBackgroundColor = mbPopupPressed ? mpStyle->GetShadowColor() : mpStyle->GetFaceColor(); mpOutDev->SetFillColor(aBackgroundColor); - mpOutDev->DrawRect(Rectangle(aPos, aSize)); + mpOutDev->DrawRect(tools::Rectangle(aPos, aSize)); // the arrowhead Color aArrowColor = mbHasHiddenMember ? mpStyle->GetHighlightLinkColor() : mpStyle->GetButtonTextColor(); @@ -198,7 +198,7 @@ void ScDPFieldButton::drawPopupButton() // tiny little box to display in presence of hidden member(s). Point aBoxPos(aPos.X() + aSize.Width() - 5 * fScaleFactor, aPos.Y() + aSize.Height() - 5 * fScaleFactor); Size aBoxSize(3 * fScaleFactor, 3 * fScaleFactor); - mpOutDev->DrawRect(Rectangle(aBoxPos, aBoxSize)); + mpOutDev->DrawRect(tools::Rectangle(aBoxPos, aBoxSize)); } } diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx index 2c09eaedda54..15d0e88d44d6 100644 --- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx +++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx @@ -274,7 +274,7 @@ void ScZoomSliderWnd::MouseButtonDown( const MouseEvent& rMEvt ) if( nOldZoom == mpImpl->mnCurrentZoom ) return ; - Rectangle aRect( Point( 0, 0 ), aSliderWindowSize ); + tools::Rectangle aRect( Point( 0, 0 ), aSliderWindowSize ); Invalidate(aRect); mpImpl->mbOmitPaint = true; @@ -308,7 +308,7 @@ void ScZoomSliderWnd::MouseMove( const MouseEvent& rMEvt ) { mpImpl->mnCurrentZoom = Offset2Zoom( aPoint.X() ); - Rectangle aRect(Point(0, 0), aSliderWindowSize); + tools::Rectangle aRect(Point(0, 0), aSliderWindowSize); Invalidate(aRect); mpImpl->mbOmitPaint = true; // optimization: paint before executing command, @@ -374,45 +374,45 @@ void ScZoomSliderWnd::UpdateFromItem( const SvxZoomSliderItem* pZoomSliderItem ) } Size aSliderWindowSize = GetOutputSizePixel(); - Rectangle aRect(Point(0, 0), aSliderWindowSize); + tools::Rectangle aRect(Point(0, 0), aSliderWindowSize); if ( !mpImpl->mbOmitPaint ) Invalidate(aRect); } -void ScZoomSliderWnd::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void ScZoomSliderWnd::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { DoPaint(rRenderContext, rRect); } -void ScZoomSliderWnd::DoPaint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) +void ScZoomSliderWnd::DoPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) { if (mpImpl->mbOmitPaint) return; Size aSliderWindowSize(GetOutputSizePixel()); - Rectangle aRect(Point(0, 0), aSliderWindowSize); + tools::Rectangle aRect(Point(0, 0), aSliderWindowSize); ScopedVclPtrInstance< VirtualDevice > pVDev(rRenderContext); pVDev->SetOutputSizePixel(aSliderWindowSize); - Rectangle aSlider = aRect; + tools::Rectangle aSlider = aRect; aSlider.Top() += (aSliderWindowSize.Height() - nSliderHeight) / 2 - 1; aSlider.Bottom() = aSlider.Top() + nSliderHeight; aSlider.Left() += nSliderXOffset; aSlider.Right() -= nSliderXOffset; - Rectangle aFirstLine(aSlider); + tools::Rectangle aFirstLine(aSlider); aFirstLine.Bottom() = aFirstLine.Top(); - Rectangle aSecondLine(aSlider); + tools::Rectangle aSecondLine(aSlider); aSecondLine.Top() = aSecondLine.Bottom(); - Rectangle aLeft(aSlider); + tools::Rectangle aLeft(aSlider); aLeft.Right() = aLeft.Left(); - Rectangle aRight(aSlider); + tools::Rectangle aRight(aSlider); aRight.Left() = aRight.Right(); // draw VirtualDevice's background color @@ -446,7 +446,7 @@ void ScZoomSliderWnd::DoPaint(vcl::RenderContext& rRenderContext, const Rectangl ++aSnappingPointIter) { pVDev->SetLineColor(Color(COL_GRAY)); - Rectangle aSnapping(aRect); + tools::Rectangle aSnapping(aRect); aSnapping.Bottom() = aSlider.Top(); aSnapping.Top() = aSnapping.Bottom() - nSnappingHeight; aSnapping.Left() += *aSnappingPointIter; diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index 1fe49bc81774..8689c0be7115 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -241,7 +241,7 @@ void ScCondFormatList::RecalcAll() void ScCondFormatList::DoScroll(long nDelta) { Point aNewPoint = mpScrollBar->GetPosPixel(); - Rectangle aRect(Point(), GetOutputSize()); + tools::Rectangle aRect(Point(), GetOutputSize()); aRect.Right() -= mpScrollBar->GetSizePixel().Width(); Scroll( 0, -nDelta, aRect ); mpScrollBar->SetPosPixel(aNewPoint); diff --git a/sc/source/ui/dbgui/csvcontrol.cxx b/sc/source/ui/dbgui/csvcontrol.cxx index f70aec78e579..4d0fa54d66c7 100644 --- a/sc/source/ui/dbgui/csvcontrol.cxx +++ b/sc/source/ui/dbgui/csvcontrol.cxx @@ -256,7 +256,7 @@ sal_Int32 ScCsvControl::GetLineFromY( sal_Int32 nY ) const // static helpers ------------------------------------------------------------- -void ScCsvControl::ImplInvertRect( OutputDevice& rOutDev, const Rectangle& rRect ) +void ScCsvControl::ImplInvertRect( OutputDevice& rOutDev, const tools::Rectangle& rRect ) { rOutDev.Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR | PushFlags::RASTEROP ); rOutDev.SetLineColor( Color( COL_BLACK ) ); diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx index 89982b3923b8..d9490d97d503 100644 --- a/sc/source/ui/dbgui/csvgrid.cxx +++ b/sc/source/ui/dbgui/csvgrid.cxx @@ -986,7 +986,7 @@ void ScCsvGrid::Command( const CommandEvent& rCEvt ) case CommandEventId::Wheel: { Point aPoint; - Rectangle aRect( aPoint, maWinSize ); + tools::Rectangle aRect( aPoint, maWinSize ); if( aRect.IsInside( rCEvt.GetMousePosPixel() ) ) { const CommandWheelData* pData = rCEvt.GetWheelData(); @@ -1020,7 +1020,7 @@ void ScCsvGrid::ConfigurationChanged( utl::ConfigurationBroadcaster*, Configurat // painting ------------------------------------------------------------------- -void ScCsvGrid::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& ) +void ScCsvGrid::Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& ) { Repaint(); } @@ -1047,7 +1047,7 @@ EditEngine* ScCsvGrid::GetEditEngine() void ScCsvGrid::ImplSetColumnClipRegion( OutputDevice& rOutDev, sal_uInt32 nColIndex ) { - rOutDev.SetClipRegion( vcl::Region( Rectangle( + rOutDev.SetClipRegion( vcl::Region( tools::Rectangle( std::max( GetColumnX( nColIndex ), GetFirstX() ) + 1, 0, std::min( GetColumnX( nColIndex + 1 ), GetLastX() ), GetHeight() - 1 ) ) ); } @@ -1060,7 +1060,7 @@ void ScCsvGrid::ImplDrawColumnHeader( OutputDevice& rOutDev, sal_uInt32 nColInde rOutDev.SetLineColor(); rOutDev.SetFillColor( aFillColor ); - rOutDev.DrawRect( Rectangle( nX1, 0, nX2, nHdrHt ) ); + rOutDev.DrawRect( tools::Rectangle( nX1, 0, nX2, nHdrHt ) ); rOutDev.SetFont( maHeaderFont ); rOutDev.SetTextColor( maHeaderTextColor ); @@ -1150,7 +1150,7 @@ void ScCsvGrid::ImplDrawColumnBackgr( sal_uInt32 nColIndex ) sal_Int32 nX2 = GetColumnX( nColIndex + 1 ); sal_Int32 nY2 = GetY( GetLastVisLine() + 1 ); sal_Int32 nHdrHt = GetHdrHeight(); - Rectangle aRect( nX1, nHdrHt, nX2, nY2 ); + tools::Rectangle aRect( nX1, nHdrHt, nX2, nY2 ); mpBackgrDev->DrawRect( aRect ); mpBackgrDev->SetLineColor( maGridColor ); mpBackgrDev->DrawGrid( aRect, Size( 1, GetLineHeight() ), DrawGridFlags::HorzLines ); @@ -1188,7 +1188,7 @@ void ScCsvGrid::ImplDrawRowHeaders() mpBackgrDev->SetLineColor(); mpBackgrDev->SetFillColor( maAppBackColor ); Point aPoint( GetHdrX(), 0 ); - Rectangle aRect( aPoint, Size( GetHdrWidth() + 1, GetHeight() ) ); + tools::Rectangle aRect( aPoint, Size( GetHdrWidth() + 1, GetHeight() ) ); mpBackgrDev->DrawRect( aRect ); mpBackgrDev->SetFillColor( maHeaderBackColor ); @@ -1224,7 +1224,7 @@ void ScCsvGrid::ImplDrawBackgrDev() { mpBackgrDev->SetLineColor(); mpBackgrDev->SetFillColor( maAppBackColor ); - mpBackgrDev->DrawRect( Rectangle( + mpBackgrDev->DrawRect( tools::Rectangle( Point( GetFirstX() + 1, 0 ), Size( GetWidth() - GetHdrWidth(), GetHeight() ) ) ); sal_uInt32 nLastCol = GetLastVisColumn(); @@ -1248,7 +1248,7 @@ void ScCsvGrid::ImplDrawColumnSelection( sal_uInt32 nColIndex ) sal_Int32 nX2 = GetColumnX( nColIndex + 1 ); // header - Rectangle aRect( nX1, 0, nX2, GetHdrHeight() ); + tools::Rectangle aRect( nX1, 0, nX2, GetHdrHeight() ); mpGridDev->SetLineColor(); if( maHeaderBackColor.IsDark() ) // redraw with light gray background in dark mode @@ -1261,7 +1261,7 @@ void ScCsvGrid::ImplDrawColumnSelection( sal_uInt32 nColIndex ) } // column selection - aRect = Rectangle( nX1, GetHdrHeight() + 1, nX2, GetY( GetLastVisLine() + 1 ) - 1 ); + aRect = tools::Rectangle( nX1, GetHdrHeight() + 1, nX2, GetY( GetLastVisLine() + 1 ) - 1 ); ImplInvertRect( *mpGridDev.get(), aRect ); } @@ -1315,7 +1315,7 @@ void ScCsvGrid::ImplDrawHorzScrolled( sal_Int32 nOldPos ) } ImplInvertCursor( GetRulerCursorPos() + (nPos - nOldPos) ); - Rectangle aRectangle( GetFirstX(), 0, GetLastX(), GetHeight() - 1 ); + tools::Rectangle aRectangle( GetFirstX(), 0, GetLastX(), GetHeight() - 1 ); vcl::Region aClipReg( aRectangle ); mpBackgrDev->SetClipRegion( aClipReg ); mpBackgrDev->CopyArea( aDest, aSrc, maWinSize ); @@ -1331,7 +1331,7 @@ void ScCsvGrid::ImplDrawHorzScrolled( sal_Int32 nOldPos ) sal_Int32 nLastX = GetX( GetPosCount() ) + 1; if( nLastX <= GetLastX() ) { - Rectangle aRect( nLastX, 0, GetLastX(), GetHeight() - 1 ); + tools::Rectangle aRect( nLastX, 0, GetLastX(), GetHeight() - 1 ); mpBackgrDev->SetLineColor(); mpBackgrDev->SetFillColor( maAppBackColor ); mpBackgrDev->DrawRect( aRect ); @@ -1346,7 +1346,7 @@ void ScCsvGrid::ImplInvertCursor( sal_Int32 nPos ) if( IsVisibleSplitPos( nPos ) ) { sal_Int32 nX = GetX( nPos ) - 1; - Rectangle aRect( Point( nX, 0 ), Size( 3, GetHdrHeight() ) ); + tools::Rectangle aRect( Point( nX, 0 ), Size( 3, GetHdrHeight() ) ); ImplInvertRect( *mpGridDev.get(), aRect ); aRect.Top() = GetHdrHeight() + 1; aRect.Bottom() = GetY( GetLastVisLine() + 1 ); @@ -1361,7 +1361,7 @@ void ScCsvGrid::ImplDrawTrackingRect( sal_uInt32 nColIndex ) sal_Int32 nX1 = std::max( GetColumnX( nColIndex ), GetFirstX() ) + 1; sal_Int32 nX2 = std::min( GetColumnX( nColIndex + 1 ) - sal_Int32( 1 ), GetLastX() ); sal_Int32 nY2 = std::min( GetY( GetLastVisLine() + 1 ), GetHeight() ) - 1; - InvertTracking( Rectangle( nX1, 0, nX2, nY2 ), ShowTrackFlags::Small | ShowTrackFlags::TrackWindow ); + InvertTracking( tools::Rectangle( nX1, 0, nX2, nY2 ), ShowTrackFlags::Small | ShowTrackFlags::TrackWindow ); } } diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx index c3406cc992a8..23881dbda146 100644 --- a/sc/source/ui/dbgui/csvruler.cxx +++ b/sc/source/ui/dbgui/csvruler.cxx @@ -411,7 +411,7 @@ void ScCsvRuler::MouseMove( const MouseEvent& rMEvt ) else { Point aPoint; - Rectangle aRect( aPoint, maWinSize ); + tools::Rectangle aRect( aPoint, maWinSize ); if( !IsVisibleSplitPos( nPos ) || !aRect.IsInside( rMEvt.GetPosPixel() ) ) // if focused, keep old cursor position for key input nPos = HasFocus() ? GetRulerCursorPos() : CSV_POS_INVALID; @@ -514,7 +514,7 @@ void ScCsvRuler::EndMouseTracking( bool bApply ) // painting ------------------------------------------------------------------- -void ScCsvRuler::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& ) +void ScCsvRuler::Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& ) { Repaint(); } @@ -532,7 +532,7 @@ void ScCsvRuler::ImplRedraw() DrawOutDev( Point(), maWinSize, Point(), maWinSize, *maRulerDev.get() ); /* Draws directly tracking rectangle to the column with the specified index. */ if( HasFocus() ) - InvertTracking( Rectangle( 0, 0, GetWidth() - 1, GetHeight() - 2 ), + InvertTracking( tools::Rectangle( 0, 0, GetWidth() - 1, GetHeight() - 2 ), ShowTrackFlags::Small | ShowTrackFlags::TrackWindow ); } } @@ -540,7 +540,7 @@ void ScCsvRuler::ImplRedraw() void ScCsvRuler::ImplDrawArea( sal_Int32 nPosX, sal_Int32 nWidth ) { maBackgrDev->SetLineColor(); - Rectangle aRect( Point( nPosX, 0 ), Size( nWidth, GetHeight() ) ); + tools::Rectangle aRect( Point( nPosX, 0 ), Size( nWidth, GetHeight() ) ); maBackgrDev->SetFillColor( maBackColor ); maBackgrDev->DrawRect( aRect ); @@ -600,7 +600,7 @@ void ScCsvRuler::ImplDrawSplit( sal_Int32 nPos ) Size aSize( mnSplitSize, mnSplitSize ); maRulerDev->SetLineColor( maTextColor ); maRulerDev->SetFillColor( maSplitColor ); - maRulerDev->DrawEllipse( Rectangle( aPos, aSize ) ); + maRulerDev->DrawEllipse( tools::Rectangle( aPos, aSize ) ); maRulerDev->DrawPixel( Point( GetX( nPos ), GetHeight() - 2 ) ); } } @@ -633,7 +633,7 @@ void ScCsvRuler::ImplInvertCursor( sal_Int32 nPos ) { if( IsVisibleSplitPos( nPos ) ) { - ImplInvertRect( *maRulerDev.get(), Rectangle( Point( GetX( nPos ) - 1, 0 ), Size( 3, GetHeight() - 1 ) ) ); + ImplInvertRect( *maRulerDev.get(), tools::Rectangle( Point( GetX( nPos ) - 1, 0 ), Size( 3, GetHeight() - 1 ) ) ); if( HasSplit( nPos ) ) ImplDrawSplit( nPos ); } diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 44ae2e3e8677..3fc6d41bd1cb 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -1619,7 +1619,7 @@ ScDocShell::PrepareSaveGuard::PrepareSaveGuard( ScDocShell& rDocShell ) } } if (mrDocShell.GetCreateMode()== SfxObjectCreateMode::STANDARD) - mrDocShell.SfxObjectShell::SetVisArea( Rectangle() ); // "Normally" worked on => no VisArea. + mrDocShell.SfxObjectShell::SetVisArea( tools::Rectangle() ); // "Normally" worked on => no VisArea. } ScDocShell::PrepareSaveGuard::~PrepareSaveGuard() @@ -2231,7 +2231,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) if (pAutoStyleList) pAutoStyleList->ExecuteAllNow(); // Execute template timeouts now if (GetCreateMode()== SfxObjectCreateMode::STANDARD) - SfxObjectShell::SetVisArea( Rectangle() ); // Edited normally -> no VisArea + SfxObjectShell::SetVisArea( tools::Rectangle() ); // Edited normally -> no VisArea OSL_ENSURE( rMed.GetFilter(), "Filter == 0" ); diff --git a/sc/source/ui/docshell/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx index 4aaa39a29403..9dc8cd2b319d 100644 --- a/sc/source/ui/docshell/docsh2.cxx +++ b/sc/source/ui/docshell/docsh2.cxx @@ -50,7 +50,7 @@ bool ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) Size aSize( (long) ( STD_COL_WIDTH * HMM_PER_TWIPS * OLE_STD_CELLS_X ), (long) ( ScGlobal::nStdRowHeight * HMM_PER_TWIPS * OLE_STD_CELLS_Y ) ); // Also adjust start here - SetVisAreaOrSize( Rectangle( Point(), aSize ) ); + SetVisAreaOrSize( tools::Rectangle( Point(), aSize ) ); } // InitOptions sets the document languages, must be called before CreateStandardStyles diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index fa4cc7f676fd..521dd0dfa8bd 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -1915,7 +1915,7 @@ void ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, sal_uI if ( nAspect == ASPECT_THUMBNAIL ) { - Rectangle aBoundRect = GetVisArea( ASPECT_THUMBNAIL ); + tools::Rectangle aBoundRect = GetVisArea( ASPECT_THUMBNAIL ); ScViewData aTmpData( this, nullptr ); aTmpData.SetTabNo(nVisTab); SnapVisArea( aBoundRect ); @@ -1924,7 +1924,7 @@ void ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, sal_uI } else { - Rectangle aBoundRect = SfxObjectShell::GetVisArea(); + tools::Rectangle aBoundRect = SfxObjectShell::GetVisArea(); ScViewData aTmpData( this, nullptr ); aTmpData.SetTabNo(nVisTab); SnapVisArea( aBoundRect ); @@ -1935,14 +1935,14 @@ void ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, sal_uI pDev->SetLayoutMode( nOldLayoutMode ); } -Rectangle ScDocShell::GetVisArea( sal_uInt16 nAspect ) const +tools::Rectangle ScDocShell::GetVisArea( sal_uInt16 nAspect ) const { SfxObjectCreateMode eShellMode = GetCreateMode(); if ( eShellMode == SfxObjectCreateMode::ORGANIZER ) { // without contents we also don't know how large are the contents; // return empty rectangle, it will then be calculated after the loading - return Rectangle(); + return tools::Rectangle(); } if( nAspect == ASPECT_THUMBNAIL ) @@ -1956,7 +1956,7 @@ Rectangle ScDocShell::GetVisArea( sal_uInt16 nAspect ) const Size aSize = aDocument.GetPageSize(nVisTab); const long SC_PREVIEW_SIZE_X = 10000; const long SC_PREVIEW_SIZE_Y = 12400; - Rectangle aArea( 0,0, SC_PREVIEW_SIZE_X, SC_PREVIEW_SIZE_Y); + tools::Rectangle aArea( 0,0, SC_PREVIEW_SIZE_X, SC_PREVIEW_SIZE_Y); if (aSize.Width() > aSize.Height()) { aArea.Right() = SC_PREVIEW_SIZE_Y; @@ -1989,7 +1989,7 @@ Rectangle ScDocShell::GetVisArea( sal_uInt16 nAspect ) const nStartCol = nEndCol; if (nStartRow>nEndRow) nStartRow = nEndRow; - Rectangle aNewArea = ((ScDocument&)aDocument) + tools::Rectangle aNewArea = ((ScDocument&)aDocument) .GetMMRect( nStartCol,nStartRow, nEndCol,nEndRow, nVisTab ); //TODO/LATER: different methods for setting VisArea?! const_cast<ScDocShell*>(this)->SfxObjectShell::SetVisArea( aNewArea ); @@ -2059,7 +2059,7 @@ void SnapVer( const ScDocument& rDoc, SCTAB nTab, long& rVal, SCROW& rStartRow ) } -void ScDocShell::SnapVisArea( Rectangle& rRect ) const +void ScDocShell::SnapVisArea( tools::Rectangle& rRect ) const { SCTAB nTab = aDocument.GetVisibleTab(); bool bNegativePage = aDocument.IsNegativePage( nTab ); @@ -2270,7 +2270,7 @@ void ScDocShell::LOKCommentNotify(LOKCommentNotificationType nType, const ScDocu const double fPPTX = pViewData->GetPPTX(); const double fPPTY = pViewData->GetPPTY(); - Rectangle aRect(Point(aScrPos.getX() / fPPTX, aScrPos.getY() / fPPTY), + tools::Rectangle aRect(Point(aScrPos.getX() / fPPTX, aScrPos.getY() / fPPTY), Size(nSizeXPix / fPPTX, nSizeYPix / fPPTY)); aAnnotation.put("cellPos", aRect.toString()); diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx index 66ecd7182b85..7c9353497a63 100644 --- a/sc/source/ui/docshell/docsh6.cxx +++ b/sc/source/ui/docshell/docsh6.cxx @@ -53,14 +53,14 @@ struct ScStylePair // Ole -void ScDocShell::SetVisArea( const Rectangle & rVisArea ) +void ScDocShell::SetVisArea( const tools::Rectangle & rVisArea ) { // with the SnapVisArea call in SetVisAreaOrSize, it's safe to always // use both the size and position of the VisArea SetVisAreaOrSize( rVisArea ); } -static void lcl_SetTopRight( Rectangle& rRect, const Point& rPos ) +static void lcl_SetTopRight( tools::Rectangle& rRect, const Point& rPos ) { Size aSize = rRect.GetSize(); rRect.Right() = rPos.X(); @@ -69,11 +69,11 @@ static void lcl_SetTopRight( Rectangle& rRect, const Point& rPos ) rRect.Bottom() = rPos.Y() + aSize.Height() - 1; } -void ScDocShell::SetVisAreaOrSize( const Rectangle& rVisArea ) +void ScDocShell::SetVisAreaOrSize( const tools::Rectangle& rVisArea ) { bool bNegativePage = aDocument.IsNegativePage( aDocument.GetVisibleTab() ); - Rectangle aArea = rVisArea; + tools::Rectangle aArea = rVisArea; // when loading, don't check for negative values, because the sheet orientation // might be set later if ( !aDocument.IsImportingXML() ) @@ -158,8 +158,8 @@ void ScDocShell::UpdateOle( const ScViewData* pViewData, bool bSnapSize ) OSL_ENSURE(pViewData,"pViewData==0 bei ScDocShell::UpdateOle"); - Rectangle aOldArea = SfxObjectShell::GetVisArea(); - Rectangle aNewArea = aOldArea; + tools::Rectangle aOldArea = SfxObjectShell::GetVisArea(); + tools::Rectangle aNewArea = aOldArea; bool bEmbedded = aDocument.IsEmbedded(); if (bEmbedded) @@ -173,7 +173,7 @@ void ScDocShell::UpdateOle( const ScViewData* pViewData, bool bSnapSize ) bool bNegativePage = aDocument.IsNegativePage( nTab ); SCCOL nX = pViewData->GetPosX(SC_SPLIT_LEFT); SCROW nY = pViewData->GetPosY(SC_SPLIT_BOTTOM); - Rectangle aMMRect = aDocument.GetMMRect( nX,nY, nX,nY, nTab ); + tools::Rectangle aMMRect = aDocument.GetMMRect( nX,nY, nX,nY, nTab ); if (bNegativePage) lcl_SetTopRight( aNewArea, aMMRect.TopRight() ); else diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx index 8bdf4b493582..b9ea261c7696 100644 --- a/sc/source/ui/drawfunc/drawsh2.cxx +++ b/sc/source/ui/drawfunc/drawsh2.cxx @@ -308,7 +308,7 @@ void ScDrawShell::GetDrawAttrState( SfxItemSet& rSet ) bool bActionItem = false; if ( pDrView->IsAction() ) // action rectangle { - Rectangle aRect; + tools::Rectangle aRect; pDrView->TakeActionRect( aRect ); if ( !aRect.IsEmpty() ) { @@ -323,7 +323,7 @@ void ScDrawShell::GetDrawAttrState( SfxItemSet& rSet ) { if ( pDrView->AreObjectsMarked() ) // selected objects { - Rectangle aRect = pDrView->GetAllMarkedRect(); + tools::Rectangle aRect = pDrView->GetAllMarkedRect(); pPV->LogicToPagePos(aRect); rSet.Put( SfxPointItem( SID_ATTR_POSITION, aRect.TopLeft() ) ); Size aSize( aRect.Right() - aRect.Left(), aRect.Bottom() - aRect.Top() ); diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index 560183b53521..e891c27b1397 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -800,7 +800,7 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq ) OutlinerView* pOutView = pView->IsTextEdit() ? pView->GetTextEditOutlinerView() : nullptr; if ( pOutView ) - pOutView->Paint( Rectangle() ); + pOutView->Paint( tools::Rectangle() ); SfxItemSet aEmptyAttr( *aEditAttr.GetPool(), EE_ITEMS_START, EE_ITEMS_END ); pView->SetAttributes( aEmptyAttr, true ); diff --git a/sc/source/ui/drawfunc/fuconarc.cxx b/sc/source/ui/drawfunc/fuconarc.cxx index 2fdbafb4a75e..b6f3f66d6177 100644 --- a/sc/source/ui/drawfunc/fuconarc.cxx +++ b/sc/source/ui/drawfunc/fuconarc.cxx @@ -152,7 +152,7 @@ void FuConstArc::Deactivate() } // Create default drawing objects via keyboard -SdrObject* FuConstArc::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) +SdrObject* FuConstArc::CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle& rRectangle) { // case SID_DRAW_ARC: // case SID_DRAW_PIE: @@ -166,7 +166,7 @@ SdrObject* FuConstArc::CreateDefaultObject(const sal_uInt16 nID, const Rectangle { if(dynamic_cast<const SdrCircObj*>( pObj) != nullptr) { - Rectangle aRect(rRectangle); + tools::Rectangle aRect(rRectangle); if(SID_DRAW_ARC == nID || SID_DRAW_CIRCLECUT == nID) { diff --git a/sc/source/ui/drawfunc/fuconcustomshape.cxx b/sc/source/ui/drawfunc/fuconcustomshape.cxx index 299236908121..45c562a4048f 100644 --- a/sc/source/ui/drawfunc/fuconcustomshape.cxx +++ b/sc/source/ui/drawfunc/fuconcustomshape.cxx @@ -159,14 +159,14 @@ void FuConstCustomShape::Deactivate() } // Create default drawing objects via keyboard -SdrObject* FuConstCustomShape::CreateDefaultObject(const sal_uInt16 /* nID */, const Rectangle& rRectangle) +SdrObject* FuConstCustomShape::CreateDefaultObject(const sal_uInt16 /* nID */, const tools::Rectangle& rRectangle) { SdrObject* pObj = SdrObjFactory::MakeNewObject( pView->GetCurrentObjInventor(), pView->GetCurrentObjIdentifier(), nullptr, pDrDoc); if( pObj ) { - Rectangle aRectangle( rRectangle ); + tools::Rectangle aRectangle( rRectangle ); SetAttributes( pObj ); if ( SdrObjCustomShape::doConstructOrthogonal( aCustomShape ) ) ImpForceQuadratic( aRectangle ); diff --git a/sc/source/ui/drawfunc/fuconpol.cxx b/sc/source/ui/drawfunc/fuconpol.cxx index 5bf7345d0aaa..a92d1ef73bdc 100644 --- a/sc/source/ui/drawfunc/fuconpol.cxx +++ b/sc/source/ui/drawfunc/fuconpol.cxx @@ -215,7 +215,7 @@ void FuConstPolygon::Deactivate() } // Create default drawing objects via keyboard -SdrObject* FuConstPolygon::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) +SdrObject* FuConstPolygon::CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle& rRectangle) { // case SID_DRAW_XPOLYGON: // case SID_DRAW_XPOLYGON_NOFILL: diff --git a/sc/source/ui/drawfunc/fuconrec.cxx b/sc/source/ui/drawfunc/fuconrec.cxx index d76b1ef7c9d9..08cbcdc2f031 100644 --- a/sc/source/ui/drawfunc/fuconrec.cxx +++ b/sc/source/ui/drawfunc/fuconrec.cxx @@ -389,7 +389,7 @@ void FuConstRectangle::Deactivate() } // Create default drawing objects via keyboard -SdrObject* FuConstRectangle::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) +SdrObject* FuConstRectangle::CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle& rRectangle) { SdrObject* pObj = SdrObjFactory::MakeNewObject( pView->GetCurrentObjInventor(), pView->GetCurrentObjIdentifier(), @@ -397,7 +397,7 @@ SdrObject* FuConstRectangle::CreateDefaultObject(const sal_uInt16 nID, const Rec if(pObj) { - Rectangle aRect(rRectangle); + tools::Rectangle aRect(rRectangle); Point aStart = aRect.TopLeft(); Point aEnd = aRect.BottomRight(); diff --git a/sc/source/ui/drawfunc/fuconstr.cxx b/sc/source/ui/drawfunc/fuconstr.cxx index 343262832353..f93fa34c8b6c 100644 --- a/sc/source/ui/drawfunc/fuconstr.cxx +++ b/sc/source/ui/drawfunc/fuconstr.cxx @@ -74,7 +74,7 @@ Point FuConstruct::CurrentGridSyncOffsetAndPos( Point& rInOutPos ) // that's the actual correct position for the object (when you // restore the zoom. bool bNegative = pDoc->IsNegativePage(pView->GetTab()); - Rectangle aObjRect( rInOutPos, rInOutPos ); + tools::Rectangle aObjRect( rInOutPos, rInOutPos ); ScRange aRange = pDoc->GetRange( pView->GetTab(), aObjRect ); ScAddress aOldStt = aRange.aStart; Point aOldPos( pDoc->GetColOffset( aOldStt.Col(), aOldStt.Tab() ), pDoc->GetRowOffset( aOldStt.Row(), aOldStt.Tab() ) ); diff --git a/sc/source/ui/drawfunc/fuconuno.cxx b/sc/source/ui/drawfunc/fuconuno.cxx index dfb4f0f09b0e..416d24ad0609 100644 --- a/sc/source/ui/drawfunc/fuconuno.cxx +++ b/sc/source/ui/drawfunc/fuconuno.cxx @@ -142,7 +142,7 @@ void FuConstUnoControl::Deactivate() } // Create default drawing objects via keyboard -SdrObject* FuConstUnoControl::CreateDefaultObject(const sal_uInt16 /* nID */, const Rectangle& rRectangle) +SdrObject* FuConstUnoControl::CreateDefaultObject(const sal_uInt16 /* nID */, const tools::Rectangle& rRectangle) { // case SID_FM_CREATE_CONTROL: diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx index 16cf0a6b4830..ef4f06d41784 100644 --- a/sc/source/ui/drawfunc/fudraw.cxx +++ b/sc/source/ui/drawfunc/fudraw.cxx @@ -345,7 +345,7 @@ bool FuDraw::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)); pView->MakeVisible(aVisRect, *pWindow); } @@ -489,11 +489,11 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt) if(pView->IsMoveAllowed()) { // restrict movement to WorkArea - const Rectangle& rWorkArea = pView->GetWorkArea(); + const tools::Rectangle& rWorkArea = pView->GetWorkArea(); if(!rWorkArea.IsEmpty()) { - Rectangle aMarkRect(pView->GetMarkedObjRect()); + tools::Rectangle aMarkRect(pView->GetMarkedObjRect()); aMarkRect.Move(nX, nY); if(!aMarkRect.IsInside(rWorkArea)) @@ -564,7 +564,7 @@ bool FuDraw::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)); pView->MakeVisible(aVisRect, *pWindow); bReturn = true; diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx index 6235ededa0ce..12b6b75614cc 100644 --- a/sc/source/ui/drawfunc/fuins1.cxx +++ b/sc/source/ui/drawfunc/fuins1.cxx @@ -150,7 +150,7 @@ static void lcl_InsertGraphic( const Graphic& rGraphic, ScLimitSizeOnDrawPage( aLogicSize, aInsertPos, pPage->GetSize() ); - Rectangle aRect ( aInsertPos, aLogicSize ); + tools::Rectangle aRect ( aInsertPos, aLogicSize ); SdrGrafObj* pObj = new SdrGrafObj( rGraphic, aRect ); @@ -211,7 +211,7 @@ static void lcl_InsertMedia( const OUString& rMediaURL, bool bApi, if (!bRet) { return; } } - SdrMediaObj* pObj = new SdrMediaObj( Rectangle( aInsertPos, aSize ) ); + SdrMediaObj* pObj = new SdrMediaObj( tools::Rectangle( aInsertPos, aSize ) ); pObj->SetModel(rData.GetDocument()->GetDrawLayer()); // set before setURL pObj->setURL( realURL, ""/*TODO?*/ ); diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx index e9e63046bdea..f4859a00fe59 100644 --- a/sc/source/ui/drawfunc/fuins2.cxx +++ b/sc/source/ui/drawfunc/fuins2.cxx @@ -336,7 +336,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* Point aPnt = pViewSh->GetInsertPos(); if ( rData.GetDocument()->IsNegativePage( rData.GetTabNo() ) ) aPnt.X() -= aSize.Width(); // move position to left edge - Rectangle aRect (aPnt, aSize); + tools::Rectangle aRect (aPnt, aSize); SdrOle2Obj* pObj = new SdrOle2Obj( aObjRef, aName, aRect); SdrPageView* pPV = pView->GetSdrPageView(); pView->InsertObjectAtView(pObj, *pPV); @@ -472,7 +472,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawV xChartModel->lockControllers(); ScRangeListRef aDummy; - Rectangle aMarkDest; + tools::Rectangle aMarkDest; SCTAB nMarkTab; bool bDrawRect = pViewShell->GetChartArea( aDummy, aMarkDest, nMarkTab ); @@ -581,7 +581,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawV aStart = pViewSh->GetChartInsertPos( aSize, aPositionRange ); } - Rectangle aRect (aStart, aSize); + tools::Rectangle aRect (aStart, aSize); SdrOle2Obj* pObj = new SdrOle2Obj( svt::EmbeddedObjectRef( xObj, nAspect ), aName, aRect); SdrPageView* pPV = pView->GetSdrPageView(); @@ -747,7 +747,7 @@ FuInsertChartFromFile::FuInsertChartFromFile( ScTabViewShell* pViewSh, vcl::Wind ScRange aPositionRange = pViewSh->GetViewData().GetCurPos(); Point aStart = pViewSh->GetChartInsertPos( aSize, aPositionRange ); - Rectangle aRect (aStart, aSize); + tools::Rectangle aRect (aStart, aSize); SdrOle2Obj* pObj = new SdrOle2Obj( svt::EmbeddedObjectRef( xObj, nAspect ), aName, aRect); SdrPageView* pPV = pView->GetSdrPageView(); diff --git a/sc/source/ui/drawfunc/fupoor.cxx b/sc/source/ui/drawfunc/fupoor.cxx index b5632ea7a02d..f6f071dc40ae 100644 --- a/sc/source/ui/drawfunc/fupoor.cxx +++ b/sc/source/ui/drawfunc/fupoor.cxx @@ -255,23 +255,23 @@ void FuPoor::StopDragTimer() |* \************************************************************************/ -SdrObject* FuPoor::CreateDefaultObject(const sal_uInt16 /* nID */, const Rectangle& /* rRectangle */) +SdrObject* FuPoor::CreateDefaultObject(const sal_uInt16 /* nID */, const tools::Rectangle& /* rRectangle */) { // 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/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx index f672ce2894c3..d6202d55d41a 100644 --- a/sc/source/ui/drawfunc/futext.cxx +++ b/sc/source/ui/drawfunc/futext.cxx @@ -643,7 +643,7 @@ void FuText::SetInEditMode(SdrObject* pObj, const Point* pMousePixel, } // Create default drawing objects via keyboard -SdrObject* FuText::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) +SdrObject* FuText::CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle& rRectangle) { // case SID_DRAW_TEXT: // case SID_DRAW_TEXT_VERTICAL: diff --git a/sc/source/ui/inc/AccessibleCell.hxx b/sc/source/ui/inc/AccessibleCell.hxx index ec9a125ea823..9f6652d26e60 100644 --- a/sc/source/ui/inc/AccessibleCell.hxx +++ b/sc/source/ui/inc/AccessibleCell.hxx @@ -91,10 +91,10 @@ public: protected: /// Return the object's current bounding box relative to the desktop. - virtual Rectangle GetBoundingBoxOnScreen() const override; + virtual tools::Rectangle GetBoundingBoxOnScreen() const override; /// Return the object's current bounding box relative to the parent object. - virtual Rectangle GetBoundingBox() const override; + virtual tools::Rectangle GetBoundingBox() const override; public: ///===== XAccessibleContext ============================================== diff --git a/sc/source/ui/inc/AccessibleContextBase.hxx b/sc/source/ui/inc/AccessibleContextBase.hxx index bb444c2e984e..f1f204b2df65 100644 --- a/sc/source/ui/inc/AccessibleContextBase.hxx +++ b/sc/source/ui/inc/AccessibleContextBase.hxx @@ -41,7 +41,7 @@ #include <cppuhelper/implbase1.hxx> #include <comphelper/servicehelper.hxx> -class Rectangle; +namespace tools { class Rectangle; } /** @descr This base class provides an implementation of the @@ -237,12 +237,12 @@ protected: /// Return the object's current bounding box relative to the desktop. /// /// @throws css::uno::RuntimeException - virtual Rectangle GetBoundingBoxOnScreen() const; + virtual tools::Rectangle GetBoundingBoxOnScreen() const; /// Return the object's current bounding box relative to the parent object. /// /// @throws css::uno::RuntimeException - virtual Rectangle GetBoundingBox() const; + virtual tools::Rectangle GetBoundingBox() const; public: /// Calls all Listener to tell they the change. diff --git a/sc/source/ui/inc/AccessibleCsvControl.hxx b/sc/source/ui/inc/AccessibleCsvControl.hxx index 234ca326f784..8f0fad53b70f 100644 --- a/sc/source/ui/inc/AccessibleCsvControl.hxx +++ b/sc/source/ui/inc/AccessibleCsvControl.hxx @@ -83,9 +83,9 @@ public: // helpers ---------------------------------------------------------------- protected: /** Returns this object's current bounding box relative to the desktop. */ - virtual Rectangle GetBoundingBoxOnScreen() const override; + virtual tools::Rectangle GetBoundingBoxOnScreen() const override; /** Returns this object's current bounding box relative to the parent object. */ - virtual Rectangle GetBoundingBox() const override; + virtual tools::Rectangle GetBoundingBox() const override; /** Returns whether the object is alive. Must be called with locked mutex. */ bool implIsAlive() const { return !rBHelper.bDisposed && !rBHelper.bInDispose && mpControl; } @@ -527,9 +527,9 @@ public: // helpers ---------------------------------------------------------------- protected: /** Returns this object's current bounding box relative to the desktop. */ - virtual Rectangle GetBoundingBoxOnScreen() const override; + virtual tools::Rectangle GetBoundingBoxOnScreen() const override; /** Returns this object's current bounding box relative to the parent object. */ - virtual Rectangle GetBoundingBox() const override; + virtual tools::Rectangle GetBoundingBox() const override; private: /** Returns this object's name. */ @@ -546,7 +546,7 @@ private: /** Returns the pixel size of the cell, regardless of visibility. */ Size implGetRealSize() const; /** Returns the bounding box of the cell relative in the table. */ - Rectangle implGetBoundingBox() const; + tools::Rectangle implGetBoundingBox() const; /** Creates the edit source the text helper needs. */ ::std::unique_ptr< SvxEditSource > implCreateEditSource(); diff --git a/sc/source/ui/inc/AccessibleDocument.hxx b/sc/source/ui/inc/AccessibleDocument.hxx index 6a01e699a197..d37befd53e48 100644 --- a/sc/source/ui/inc/AccessibleDocument.hxx +++ b/sc/source/ui/inc/AccessibleDocument.hxx @@ -178,7 +178,7 @@ public: The rectangle of the visible part of the document. The values are, contrary to the base class, in internal coordinates. */ - virtual Rectangle GetVisibleArea() const override; + virtual tools::Rectangle GetVisibleArea() const override; /** Transform the specified point from internal coordinates to an absolute screen position. @@ -220,10 +220,10 @@ protected: createAccessibleName() override; /// Return the object's current bounding box relative to the desktop. - virtual Rectangle GetBoundingBoxOnScreen() const override; + virtual tools::Rectangle GetBoundingBoxOnScreen() const override; /// Return the object's current bounding box relative to the parent object. - virtual Rectangle GetBoundingBox() const override; + virtual tools::Rectangle GetBoundingBox() const override; private: ScTabViewShell* mpViewShell; @@ -232,7 +232,7 @@ private: ScChildrenShapes* mpChildrenShapes; ScAccessibleEditObject* mpTempAccEdit; css::uno::Reference<css::accessibility::XAccessible> mxTempAcc; - Rectangle maVisArea; + tools::Rectangle maVisArea; bool mbCompleteSheetSelected; public: @@ -252,7 +252,7 @@ private: OUString GetCurrentCellName() const; static OUString GetCurrentCellDescription(); - Rectangle GetVisibleArea_Impl() const; + tools::Rectangle GetVisibleArea_Impl() const; css::uno::Sequence< css::uno::Any > GetScAccFlowToSequence(); public: ScDocument *GetDocument() const ; diff --git a/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx b/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx index 450c51c1ed0e..1d55304708a3 100644 --- a/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx +++ b/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx @@ -109,11 +109,11 @@ protected: public: // needed in ScShapeChildren /// Return the object's current bounding box relative to the desktop. - virtual Rectangle GetBoundingBoxOnScreen() const override; + virtual tools::Rectangle GetBoundingBoxOnScreen() const override; protected: /// Return the object's current bounding box relative to the parent object. - virtual Rectangle GetBoundingBox() const override; + virtual tools::Rectangle GetBoundingBox() const override; private: ScPreviewShell* mpViewShell; diff --git a/sc/source/ui/inc/AccessibleEditObject.hxx b/sc/source/ui/inc/AccessibleEditObject.hxx index 962a36af1daa..2220e9a3433b 100644 --- a/sc/source/ui/inc/AccessibleEditObject.hxx +++ b/sc/source/ui/inc/AccessibleEditObject.hxx @@ -85,10 +85,10 @@ public: protected: /// Return the object's current bounding box relative to the desktop. - virtual Rectangle GetBoundingBoxOnScreen() const override; + virtual tools::Rectangle GetBoundingBoxOnScreen() const override; /// Return the object's current bounding box relative to the parent object. - virtual Rectangle GetBoundingBox() const override; + virtual tools::Rectangle GetBoundingBox() const override; public: ///===== XAccessibleContext ============================================== diff --git a/sc/source/ui/inc/AccessiblePageHeader.hxx b/sc/source/ui/inc/AccessiblePageHeader.hxx index a5ad2cec6aa2..20c9285f2ed5 100644 --- a/sc/source/ui/inc/AccessiblePageHeader.hxx +++ b/sc/source/ui/inc/AccessiblePageHeader.hxx @@ -72,8 +72,8 @@ protected: virtual OUString SAL_CALL createAccessibleDescription() override; virtual OUString SAL_CALL createAccessibleName() override; - virtual Rectangle GetBoundingBoxOnScreen() const override; - virtual Rectangle GetBoundingBox() const override; + virtual tools::Rectangle GetBoundingBoxOnScreen() const override; + virtual tools::Rectangle GetBoundingBox() const override; private: ScPreviewShell* mpViewShell; diff --git a/sc/source/ui/inc/AccessiblePageHeaderArea.hxx b/sc/source/ui/inc/AccessiblePageHeaderArea.hxx index c66d84a80dfe..a2f87adc44eb 100644 --- a/sc/source/ui/inc/AccessiblePageHeaderArea.hxx +++ b/sc/source/ui/inc/AccessiblePageHeaderArea.hxx @@ -100,8 +100,8 @@ protected: virtual OUString SAL_CALL createAccessibleDescription() override; virtual OUString SAL_CALL createAccessibleName() override; - virtual Rectangle GetBoundingBoxOnScreen() const override; - virtual Rectangle GetBoundingBox() const override; + virtual tools::Rectangle GetBoundingBoxOnScreen() const override; + virtual tools::Rectangle GetBoundingBox() const override; private: EditTextObject* mpEditObj; diff --git a/sc/source/ui/inc/AccessiblePreviewCell.hxx b/sc/source/ui/inc/AccessiblePreviewCell.hxx index ba9212ead0b5..e40f0faad7cd 100644 --- a/sc/source/ui/inc/AccessiblePreviewCell.hxx +++ b/sc/source/ui/inc/AccessiblePreviewCell.hxx @@ -79,8 +79,8 @@ public: getImplementationId() override; protected: - virtual Rectangle GetBoundingBoxOnScreen() const override; - virtual Rectangle GetBoundingBox() const override; + virtual tools::Rectangle GetBoundingBoxOnScreen() const override; + virtual tools::Rectangle GetBoundingBox() const override; private: ScPreviewShell* mpViewShell; diff --git a/sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx b/sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx index 381b45032711..de9bb7834086 100644 --- a/sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx +++ b/sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx @@ -109,8 +109,8 @@ protected: virtual OUString SAL_CALL createAccessibleDescription() override; virtual OUString SAL_CALL createAccessibleName() override; - virtual Rectangle GetBoundingBoxOnScreen() const override; - virtual Rectangle GetBoundingBox() const override; + virtual tools::Rectangle GetBoundingBoxOnScreen() const override; + virtual tools::Rectangle GetBoundingBox() const override; private: ScPreviewShell* mpViewShell; diff --git a/sc/source/ui/inc/AccessiblePreviewTable.hxx b/sc/source/ui/inc/AccessiblePreviewTable.hxx index adb5b5908a15..638dcdcbd8ae 100644 --- a/sc/source/ui/inc/AccessiblePreviewTable.hxx +++ b/sc/source/ui/inc/AccessiblePreviewTable.hxx @@ -118,8 +118,8 @@ protected: virtual OUString SAL_CALL createAccessibleDescription() override; virtual OUString SAL_CALL createAccessibleName() override; - virtual Rectangle GetBoundingBoxOnScreen() const override; - virtual Rectangle GetBoundingBox() const override; + virtual tools::Rectangle GetBoundingBoxOnScreen() const override; + virtual tools::Rectangle GetBoundingBox() const override; private: ScPreviewShell* mpViewShell; diff --git a/sc/source/ui/inc/AccessibleSpreadsheet.hxx b/sc/source/ui/inc/AccessibleSpreadsheet.hxx index 5cc6a6baf9af..14eef752fc77 100644 --- a/sc/source/ui/inc/AccessibleSpreadsheet.hxx +++ b/sc/source/ui/inc/AccessibleSpreadsheet.hxx @@ -211,16 +211,16 @@ private: protected: /// Return the object's current bounding box relative to the desktop. - virtual Rectangle GetBoundingBoxOnScreen() const override; + virtual tools::Rectangle GetBoundingBoxOnScreen() const override; /// Return the object's current bounding box relative to the parent object. - virtual Rectangle GetBoundingBox() const override; + virtual tools::Rectangle GetBoundingBox() const override; private: ScTabViewShell* mpViewShell; ScRangeList* mpMarkedRanges; ScAccessibleDocument* mpAccDoc; rtl::Reference<ScAccessibleCell> mpAccCell; - Rectangle maVisCells; + tools::Rectangle maVisCells; ScSplitPos meSplitPos; ScAddress maActiveCell; SCTAB mnTab; @@ -239,8 +239,8 @@ private: void SelectCell(sal_Int32 nRow, sal_Int32 nCol, bool bDeselect); static ScDocument* GetDocument(ScTabViewShell* pViewShell); - static Rectangle GetVisArea(ScTabViewShell* pViewShell, ScSplitPos eSplitPos); - Rectangle GetVisCells(const Rectangle& rVisArea); + static tools::Rectangle GetVisArea(ScTabViewShell* pViewShell, ScSplitPos eSplitPos); + tools::Rectangle GetVisCells(const tools::Rectangle& rVisArea); typedef std::vector<ScMyAddress> VEC_MYADDR; typedef std::map<ScMyAddress,css::uno::Reference< css::accessibility::XAccessible > > diff --git a/sc/source/ui/inc/AccessibleText.hxx b/sc/source/ui/inc/AccessibleText.hxx index 80e24952ef6d..c6d21fa9a690 100644 --- a/sc/source/ui/inc/AccessibleText.hxx +++ b/sc/source/ui/inc/AccessibleText.hxx @@ -265,7 +265,7 @@ private: TextForwarderPtr mpTextForwarder; ViewForwarderPtr mpViewForwarder; OUString maCellText; - Rectangle maBoundBox; + tools::Rectangle maBoundBox; Size maCellSize; public: @@ -273,7 +273,7 @@ public: vcl::Window* pWindow, EditEngine* pEditEngine, const OUString& rCellText, - const Rectangle& rBoundBox, + const tools::Rectangle& rBoundBox, const Size& rCellSize ); virtual ~ScAccessibleCsvTextData() override; diff --git a/sc/source/ui/inc/autofmt.hxx b/sc/source/ui/inc/autofmt.hxx index c274eefcf145..8df8a45c3a64 100644 --- a/sc/source/ui/inc/autofmt.hxx +++ b/sc/source/ui/inc/autofmt.hxx @@ -51,7 +51,7 @@ public: void NotifyChange( ScAutoFormatData* pNewData ); protected: - 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; private: @@ -76,7 +76,7 @@ private: SvNumberFormatter* pNumFmt; SAL_DLLPRIVATE void Init(); - SAL_DLLPRIVATE void DoPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect); + SAL_DLLPRIVATE void DoPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect); SAL_DLLPRIVATE void CalcCellArray(bool bFitWidth); SAL_DLLPRIVATE void CalcLineMap(); SAL_DLLPRIVATE void PaintCells(vcl::RenderContext& rRenderContext); diff --git a/sc/source/ui/inc/cbutton.hxx b/sc/source/ui/inc/cbutton.hxx index 7c229399ff68..ece8f4a58ba9 100644 --- a/sc/source/ui/inc/cbutton.hxx +++ b/sc/source/ui/inc/cbutton.hxx @@ -48,7 +48,7 @@ public: const Size& GetSizePixel() const { return aBtnSize; } private: - void ImpDrawArrow( const Rectangle& rRect ); + void ImpDrawArrow( const tools::Rectangle& rRect ); protected: VclPtr<OutputDevice> pOut; diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx index 061d358edf6a..9c1a1f3fd07f 100644 --- a/sc/source/ui/inc/checklistmenu.hxx +++ b/sc/source/ui/inc/checklistmenu.hxx @@ -57,7 +57,7 @@ public: virtual void MouseButtonDown(const MouseEvent& rMEvt) override; virtual void MouseButtonUp(const MouseEvent& rMEvt) override; virtual void KeyInput(const KeyEvent& rKEvt) override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; void addMenuItem(const OUString& rText, Action* pAction); @@ -332,7 +332,7 @@ public: virtual void MouseMove(const MouseEvent& rMEvt) override; virtual bool EventNotify(NotifyEvent& rNEvt) override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; void setMemberSize(size_t n); @@ -344,7 +344,7 @@ public: bool isAllSelected() const; void getResult(ResultType& rResult); - void launch(const Rectangle& rRect); + void launch(const tools::Rectangle& rRect); void close(bool bOK); /** diff --git a/sc/source/ui/inc/client.hxx b/sc/source/ui/inc/client.hxx index b112dfd6459b..13d2a198c109 100644 --- a/sc/source/ui/inc/client.hxx +++ b/sc/source/ui/inc/client.hxx @@ -34,7 +34,7 @@ private: SdrGrafObj* pGrafEdit; virtual void ObjectAreaChanged() override; - virtual void RequestNewObjectArea( Rectangle& ) override; + virtual void RequestNewObjectArea( tools::Rectangle& ) override; virtual void ViewChanged() override; public: diff --git a/sc/source/ui/inc/csvcontrol.hxx b/sc/source/ui/inc/csvcontrol.hxx index 6aec2addad75..7ba7cf218828 100644 --- a/sc/source/ui/inc/csvcontrol.hxx +++ b/sc/source/ui/inc/csvcontrol.hxx @@ -362,7 +362,7 @@ public: // static helpers --------------------------------------------------------- /** Inverts a rectangle in the specified output device. */ - static void ImplInvertRect( OutputDevice& rOutDev, const Rectangle& rRect ); + static void ImplInvertRect( OutputDevice& rOutDev, const tools::Rectangle& rRect ); /** Returns direction code for the keys LEFT, RIGHT, HOME, END. @param bHomeEnd false = ignore HOME and END key. */ diff --git a/sc/source/ui/inc/csvgrid.hxx b/sc/source/ui/inc/csvgrid.hxx index c75f8ef32272..bdf91264c097 100644 --- a/sc/source/ui/inc/csvgrid.hxx +++ b/sc/source/ui/inc/csvgrid.hxx @@ -258,7 +258,7 @@ protected: // painting --------------------------------------------------------------- protected: - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) override; public: /** Redraws the entire data grid. */ diff --git a/sc/source/ui/inc/csvruler.hxx b/sc/source/ui/inc/csvruler.hxx index 709817c1711f..4caf30e36e31 100644 --- a/sc/source/ui/inc/csvruler.hxx +++ b/sc/source/ui/inc/csvruler.hxx @@ -49,7 +49,7 @@ private: bool mbPosMTMoved; /// Tracking: Anytime moved to another position? Size maWinSize; /// Size of the control. - Rectangle maActiveRect; /// The active area of the ruler. + tools::Rectangle maActiveRect; /// The active area of the ruler. sal_Int32 mnSplitSize; /// Size of a split circle. public: @@ -141,7 +141,7 @@ private: // painting --------------------------------------------------------------- protected: - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) override; public: /** Redraws the entire ruler. */ diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index a9349b4a54a9..d61ebac6e45a 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -209,16 +209,16 @@ public: virtual void Draw( OutputDevice *, const JobSetup & rSetup, sal_uInt16 nAspect = ASPECT_CONTENT ) override; - virtual void SetVisArea( const Rectangle & rVisArea ) override; + virtual void SetVisArea( const tools::Rectangle & rVisArea ) override; using SfxObjectShell::GetVisArea; - virtual Rectangle GetVisArea( sal_uInt16 nAspect ) const override; + virtual tools::Rectangle GetVisArea( sal_uInt16 nAspect ) const override; virtual Printer* GetDocumentPrinter() override; virtual void SetModified( bool = true ) override; - void SetVisAreaOrSize( const Rectangle& rVisArea ); + void SetVisAreaOrSize( const tools::Rectangle& rVisArea ); virtual VclPtr<SfxDocumentInfoDialog> CreateDocumentInfoDialog( const SfxItemSet &rSet ) override; @@ -424,7 +424,7 @@ public: virtual void SetProtectionPassword( const OUString &rPassword ) override; virtual bool GetProtectionHash( /*out*/ css::uno::Sequence< sal_Int8 > &rPasswordHash ) override; - void SnapVisArea( Rectangle& rRect ) const; + void SnapVisArea( tools::Rectangle& rRect ) const; void SetIsInUcalc(); }; diff --git a/sc/source/ui/inc/drawview.hxx b/sc/source/ui/inc/drawview.hxx index ea0813e6c978..f60d99d83e28 100644 --- a/sc/source/ui/inc/drawview.hxx +++ b/sc/source/ui/inc/drawview.hxx @@ -65,7 +65,7 @@ public: virtual void DoConnect(SdrOle2Obj* pOleObj) override; - virtual void MakeVisible( const Rectangle& rRect, vcl::Window& rWin ) override; + virtual void MakeVisible( const tools::Rectangle& rRect, vcl::Window& rWin ) override; virtual void DeleteMarked() override; diff --git a/sc/source/ui/inc/fuconarc.hxx b/sc/source/ui/inc/fuconarc.hxx index b0c1a63132cd..3612edd676f3 100644 --- a/sc/source/ui/inc/fuconarc.hxx +++ b/sc/source/ui/inc/fuconarc.hxx @@ -38,7 +38,7 @@ class FuConstArc : public FuConstruct virtual void Deactivate() override; // Create default drawing objects via keyboard - virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) override; + virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle& rRectangle) override; }; #endif // _SD_FUCONARC_HXX diff --git a/sc/source/ui/inc/fuconcustomshape.hxx b/sc/source/ui/inc/fuconcustomshape.hxx index 4b40eaa2e3ed..5f5c34d91330 100644 --- a/sc/source/ui/inc/fuconcustomshape.hxx +++ b/sc/source/ui/inc/fuconcustomshape.hxx @@ -41,7 +41,7 @@ public: virtual void Deactivate() override; // Create default drawing objects via keyboard - 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/sc/source/ui/inc/fuconpol.hxx b/sc/source/ui/inc/fuconpol.hxx index 73f843c05a81..acfaf8a16e5f 100644 --- a/sc/source/ui/inc/fuconpol.hxx +++ b/sc/source/ui/inc/fuconpol.hxx @@ -39,7 +39,7 @@ class FuConstPolygon : public FuConstruct virtual void Deactivate() override; // Create default drawing objects via keyboard - virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) override; + virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle& rRectangle) override; }; #endif // _FUCONPOL_HXX diff --git a/sc/source/ui/inc/fuconrec.hxx b/sc/source/ui/inc/fuconrec.hxx index d69d0e3def20..a44201151b05 100644 --- a/sc/source/ui/inc/fuconrec.hxx +++ b/sc/source/ui/inc/fuconrec.hxx @@ -39,7 +39,7 @@ class FuConstRectangle : public FuConstruct static void SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj, sal_uInt16 nSlotId); // Create default drawing objects via keyboard - virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) override; + virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle& rRectangle) override; }; #endif // _SD_FUCONREC_HXX diff --git a/sc/source/ui/inc/fuconuno.hxx b/sc/source/ui/inc/fuconuno.hxx index b17cc84b5cc6..1d6e26f4a02f 100644 --- a/sc/source/ui/inc/fuconuno.hxx +++ b/sc/source/ui/inc/fuconuno.hxx @@ -44,7 +44,7 @@ public: virtual void Deactivate() override; // Create default drawing objects via keyboard - virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) override; + virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle& rRectangle) override; }; #endif // _SD_FUCONCTL_HXX diff --git a/sc/source/ui/inc/fupoor.hxx b/sc/source/ui/inc/fupoor.hxx index 9d82989071f0..5c3ba4fbf03d 100644 --- a/sc/source/ui/inc/fupoor.hxx +++ b/sc/source/ui/inc/fupoor.hxx @@ -97,10 +97,10 @@ public: void StopDragTimer(); // Create default drawing objects via keyboard - virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle); + virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle& rRectangle); protected: - static void ImpForceQuadratic(Rectangle& rRect); + static void ImpForceQuadratic(tools::Rectangle& rRect); public: // #i33136# diff --git a/sc/source/ui/inc/futext.hxx b/sc/source/ui/inc/futext.hxx index d7ec42084552..9863fc987036 100644 --- a/sc/source/ui/inc/futext.hxx +++ b/sc/source/ui/inc/futext.hxx @@ -53,7 +53,7 @@ public: void StopEditMode(); // Create default drawing objects via keyboard - virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) override; + virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle& rRectangle) override; private: SdrOutliner* MakeOutliner(); diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx index 93f50dc83516..a9c33ea6555f 100644 --- a/sc/source/ui/inc/gridwin.hxx +++ b/sc/source/ui/inc/gridwin.hxx @@ -101,7 +101,7 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou std::unique_ptr<sdr::overlay::OverlayObjectList> mpOOHeader; std::unique_ptr<sdr::overlay::OverlayObjectList> mpOOShrink; - std::unique_ptr<Rectangle> mpAutoFillRect; + std::unique_ptr<tools::Rectangle> mpAutoFillRect; struct MouseEventState; @@ -172,12 +172,12 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou Point aCurMousePos; sal_uInt16 nPaintCount; - Rectangle aRepaintPixel; + tools::Rectangle aRepaintPixel; ScAddress aAutoMarkPos; ScAddress aListValPos; - Rectangle aInvertRect; + tools::Rectangle aInvertRect; RfCorner aRFSelectedCorned; @@ -220,7 +220,7 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou void PagebreakMove( const MouseEvent& rMEvt, bool bUp ); - void UpdateDragRect( bool bShowRange, const Rectangle& rPosRect ); + void UpdateDragRect( bool bShowRange, const tools::Rectangle& rPosRect ); bool IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab ); void FilterSelect( sal_uLong nSel ); @@ -250,9 +250,9 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou bool IsMyModel(SdrEditView* pSdrView); void DrawRedraw( ScOutputData& rOutputData, sal_uLong nLayer ); - void DrawSdrGrid( const Rectangle& rDrawingRect, OutputDevice* pContentDev ); + void DrawSdrGrid( const tools::Rectangle& rDrawingRect, OutputDevice* pContentDev ); void DrawAfterScroll(); - Rectangle GetListValButtonRect( const ScAddress& rButtonPos ); + tools::Rectangle GetListValButtonRect( const ScAddress& rButtonPos ); void DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, vcl::RenderContext& rRenderContext); @@ -279,12 +279,12 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou void SelectForContextMenu( const Point& rPosPixel, SCsCOL nCellX, SCsROW nCellY ); - void GetSelectionRects( ::std::vector< Rectangle >& rPixelRects ); + void GetSelectionRects( ::std::vector< tools::Rectangle >& rPixelRects ); protected: 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 GetFocus() override; virtual void LoseFocus() override; @@ -321,14 +321,14 @@ public: long nTileWidth, long nTileHeight ); /// @see OutputDevice::LogicInvalidate(). - void LogicInvalidate(const Rectangle* pRectangle) override; + void LogicInvalidate(const tools::Rectangle* pRectangle) override; /// Update the cell selection according to what handles have been dragged. /// @see vcl::ITiledRenderable::setTextSelection() for the values of nType. /// Coordinates are in pixels. void SetCellSelectionPixel(int nType, int nPixelX, int nPixelY); /// Get the cell selection, coordinates are in logic units. - void GetCellSelection(std::vector<Rectangle>& rLogicRects); + void GetCellSelection(std::vector<tools::Rectangle>& rLogicRects); virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; @@ -391,7 +391,7 @@ public: bool NeedsRepaint() { return bNeedsRepaint; } - void DoInvertRect( const Rectangle& rPixel ); + void DoInvertRect( const tools::Rectangle& rPixel ); void CheckNeedsRepaint(); diff --git a/sc/source/ui/inc/hdrcont.hxx b/sc/source/ui/inc/hdrcont.hxx index c1d8ca93a13a..6410e2ce142c 100644 --- a/sc/source/ui/inc/hdrcont.hxx +++ b/sc/source/ui/inc/hdrcont.hxx @@ -75,7 +75,7 @@ protected: // Window overrides - 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; diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx index b53d794d5fbf..5d77877a9a82 100644 --- a/sc/source/ui/inc/inputwin.hxx +++ b/sc/source/ui/inc/inputwin.hxx @@ -106,7 +106,7 @@ public: DECL_LINK(ModifyHdl, LinkParamNone*, void); protected: - 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; @@ -228,7 +228,7 @@ public: virtual ~ScInputWindow() override; virtual void dispose() override; - 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; virtual void Select() override; diff --git a/sc/source/ui/inc/invmerge.hxx b/sc/source/ui/inc/invmerge.hxx index 952b8d7d58af..695261434ec5 100644 --- a/sc/source/ui/inc/invmerge.hxx +++ b/sc/source/ui/inc/invmerge.hxx @@ -27,18 +27,18 @@ class ScInvertMerger { private: - ::std::vector< Rectangle >* pRects; - Rectangle aTotalRect; - Rectangle aLineRect; + ::std::vector< tools::Rectangle >* pRects; + tools::Rectangle aTotalRect; + tools::Rectangle aLineRect; void FlushLine(); void FlushTotal(); public: - ScInvertMerger( ::std::vector< Rectangle >* pRectangles ); + ScInvertMerger( ::std::vector< tools::Rectangle >* pRectangles ); ~ScInvertMerger(); - void AddRect( const Rectangle& rRect ); + void AddRect( const tools::Rectangle& rRect ); void Flush(); }; diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx index 3007d29ec0bc..fcc2351c987d 100644 --- a/sc/source/ui/inc/navipi.hxx +++ b/sc/source/ui/inc/navipi.hxx @@ -99,7 +99,7 @@ public: } protected: - 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; private: diff --git a/sc/source/ui/inc/notemark.hxx b/sc/source/ui/inc/notemark.hxx index b02bf812f623..bf427a66de0e 100644 --- a/sc/source/ui/inc/notemark.hxx +++ b/sc/source/ui/inc/notemark.hxx @@ -38,13 +38,13 @@ private: ScDocument* pDoc; ScAddress aDocPos; OUString aUserText; - Rectangle aVisRect; + tools::Rectangle aVisRect; Timer aTimer; MapMode aMapMode; bool bLeft; bool bByKeyboard; - Rectangle aRect; + tools::Rectangle aRect; SdrModel* pModel; ScCaptionPtr mxObject; bool bVisible; diff --git a/sc/source/ui/inc/olinewin.hxx b/sc/source/ui/inc/olinewin.hxx index cd9f49183e1a..6e8cc64417ca 100644 --- a/sc/source/ui/inc/olinewin.hxx +++ b/sc/source/ui/inc/olinewin.hxx @@ -49,7 +49,7 @@ private: bool mbMTActive; /// Mouse tracking active? bool mbMTPressed; /// Mouse tracking: Button currently drawed pressed? - Rectangle maFocusRect; /// Focus rectangle on screen. + tools::Rectangle maFocusRect; /// Focus rectangle on screen. size_t mnFocusLevel; /// Level of focused button. size_t mnFocusEntry; /// Entry index of focused button. bool mbDontDrawFocus; /// Do not redraw focus in next Paint(). @@ -98,7 +98,7 @@ private: /** Returns the point in the window of the specified position. */ Point GetPoint( long nLevelPos, long nEntryPos ) const; /** Returns the rectangle in the window of the specified position. */ - Rectangle GetRectangle( + tools::Rectangle GetRectangle( long nLevelStart, long nEntryStart, long nLevelEnd, long nEntryEnd ) const; @@ -206,7 +206,7 @@ private: void ScrollRel( long nEntryDiff, long nEntryStart, long nEntryEnd ); protected: - 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; virtual void GetFocus() override; diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx index 8012790c2376..26dad1add045 100644 --- a/sc/source/ui/inc/output.hxx +++ b/sc/source/ui/inc/output.hxx @@ -35,7 +35,7 @@ namespace editeng { struct MisspellRanges; } -class Rectangle; +namespace tools { class Rectangle; } namespace vcl { class Font; } class OutputDevice; class EditEngine; @@ -64,8 +64,8 @@ friend class ScGridWindow; private: struct OutputAreaParam { - Rectangle maAlignRect; - Rectangle maClipRect; + tools::Rectangle maAlignRect; + tools::Rectangle maClipRect; long mnColWidth; long mnLeftClipLength; /// length of the string getting cut off on the left. long mnRightClipLength; /// length of the string getting cut off on the right. @@ -113,7 +113,7 @@ private: bool readCellContent(ScDocument* pDoc, bool bShowNullValues, bool bShowFormulas, bool bSyntaxMode, bool bUseStyleColor, bool bForceAutoColor, bool& rWrapFields); void setPatternToEngine(bool bUseStyleColor); void calcMargins(long& rTop, long& rLeft, long& rBottom, long& rRight, double nPPTX, double nPPTY) const; - void calcPaperSize(Size& rPaperSize, const Rectangle& rAlignRect, double nPPTX, double nPPTY) const; + void calcPaperSize(Size& rPaperSize, const tools::Rectangle& rAlignRect, double nPPTX, double nPPTY) const; void getEngineSize(ScFieldEditEngine* pEngine, long& rWidth, long& rHeight) const; bool hasLineBreak() const; bool isHyperlinkCell() const; @@ -226,7 +226,7 @@ private: bool bBreak, bool bOverwrite, OutputAreaParam& rParam ); - void ShrinkEditEngine( EditEngine& rEngine, const Rectangle& rAlignRect, + void ShrinkEditEngine( EditEngine& rEngine, const tools::Rectangle& rAlignRect, long nLeftM, long nTopM, long nRightM, long nBottomM, bool bWidth, sal_uInt16 nOrient, long nAttrRotate, bool bPixelToLogic, long& rEngineWidth, long& rEngineHeight, long& rNeededPixel, @@ -297,7 +297,7 @@ public: void DrawStrings( bool bPixelToLogic = false ); /// Draw all strings, or provide Rectangle where the text (defined by rAddress) would be drawn. - Rectangle LayoutStrings(bool bPixelToLogic, bool bPaint = true, const ScAddress &rAddress = ScAddress()); + tools::Rectangle LayoutStrings(bool bPixelToLogic, bool bPaint = true, const ScAddress &rAddress = ScAddress()); void DrawDocumentBackground(); void DrawBackground(vcl::RenderContext& rRenderContext); diff --git a/sc/source/ui/inc/pfuncache.hxx b/sc/source/ui/inc/pfuncache.hxx index c727b192a2b3..40a41dec0342 100644 --- a/sc/source/ui/inc/pfuncache.hxx +++ b/sc/source/ui/inc/pfuncache.hxx @@ -69,12 +69,12 @@ struct ScPrintPageLocation { long nPage; ScRange aCellRange; - Rectangle aRectangle; // pixels + tools::Rectangle aRectangle; // pixels ScPrintPageLocation() : nPage(-1) {} // default: invalid - ScPrintPageLocation( long nP, const ScRange& rRange, const Rectangle& rRect ) : + ScPrintPageLocation( long nP, const ScRange& rRange, const tools::Rectangle& rRect ) : nPage(nP), aCellRange(rRange), aRectangle(rRect) {} }; diff --git a/sc/source/ui/inc/preview.hxx b/sc/source/ui/inc/preview.hxx index 1e47c34debb2..e0f14b8f069f 100644 --- a/sc/source/ui/inc/preview.hxx +++ b/sc/source/ui/inc/preview.hxx @@ -103,7 +103,7 @@ private: using Window::SetZoom; protected: - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void Command( const CommandEvent& rCEvt ) override; virtual void KeyInput( const KeyEvent& rKEvt ) override; virtual void MouseMove( const MouseEvent& rMEvt ) override; diff --git a/sc/source/ui/inc/prevloc.hxx b/sc/source/ui/inc/prevloc.hxx index 56a5326635bb..419deb6e003c 100644 --- a/sc/source/ui/inc/prevloc.hxx +++ b/sc/source/ui/inc/prevloc.hxx @@ -38,7 +38,7 @@ #define SC_PREVIEW_RANGE_TAB 3 class OutputDevice; -class Rectangle; +namespace tools { class Rectangle; } class ScAddress; class ScRange; class ScDocument; @@ -81,7 +81,7 @@ public: void SetTab( SCTAB nNewTab ); void SetColInfo( SCCOL nCount, ScPreviewColRowInfo* pNewInfo ); void SetRowInfo( SCROW nCount, ScPreviewColRowInfo* pNewInfo ); - void LimitToArea( const Rectangle& rPixelArea ); + void LimitToArea( const tools::Rectangle& rPixelArea ); }; class ScPreviewLocationData @@ -93,13 +93,13 @@ private: ScDocument* pDoc; MapMode aCellMapMode; MapMode aDrawMapMode[SC_PREVIEW_MAXRANGES]; - Rectangle aDrawRectangle[SC_PREVIEW_MAXRANGES]; + tools::Rectangle aDrawRectangle[SC_PREVIEW_MAXRANGES]; sal_uInt8 aDrawRangeId[SC_PREVIEW_MAXRANGES]; sal_uInt16 nDrawRanges; SCTAB nPrintTab; Entries_t m_Entries; - Rectangle GetOffsetPixel( const ScAddress& rCellPos, const ScRange& rRange ) const; + tools::Rectangle GetOffsetPixel( const ScAddress& rCellPos, const ScRange& rRange ) const; public: ScPreviewLocationData( ScDocument* pDocument, OutputDevice* pWin ); @@ -108,47 +108,47 @@ public: void SetCellMapMode( const MapMode& rMapMode ); void SetPrintTab( SCTAB nNew ); void Clear(); - void AddCellRange( const Rectangle& rRect, const ScRange& rRange, bool bRepCol, bool bRepRow, + void AddCellRange( const tools::Rectangle& rRect, const ScRange& rRange, bool bRepCol, bool bRepRow, const MapMode& rDrawMap ); - void AddColHeaders( const Rectangle& rRect, SCCOL nStartCol, SCCOL nEndCol, bool bRepCol ); - void AddRowHeaders( const Rectangle& rRect, SCROW nStartRow, SCROW nEndRow, bool bRepRow ); - void AddHeaderFooter( const Rectangle& rRect, bool bHeader, bool bLeft ); - void AddNoteMark( const Rectangle& rRect, const ScAddress& rPos ); - void AddNoteText( const Rectangle& rRect, const ScAddress& rPos ); + void AddColHeaders( const tools::Rectangle& rRect, SCCOL nStartCol, SCCOL nEndCol, bool bRepCol ); + void AddRowHeaders( const tools::Rectangle& rRect, SCROW nStartRow, SCROW nEndRow, bool bRepRow ); + void AddHeaderFooter( const tools::Rectangle& rRect, bool bHeader, bool bLeft ); + void AddNoteMark( const tools::Rectangle& rRect, const ScAddress& rPos ); + void AddNoteText( const tools::Rectangle& rRect, const ScAddress& rPos ); SCTAB GetPrintTab() const { return nPrintTab; } // Get info on visible columns/rows in the visible area - void GetTableInfo( const Rectangle& rVisiblePixel, ScPreviewTableInfo& rInfo ) const; + void GetTableInfo( const tools::Rectangle& rVisiblePixel, ScPreviewTableInfo& rInfo ) const; sal_uInt16 GetDrawRanges() const { return nDrawRanges; } - void GetDrawRange( sal_uInt16 nPos, Rectangle& rPixelRect, MapMode& rMapMode, sal_uInt8& rRangeId ) const; + void GetDrawRange( sal_uInt16 nPos, tools::Rectangle& rPixelRect, MapMode& rMapMode, sal_uInt8& rRangeId ) const; - bool GetHeaderPosition( Rectangle& rHeaderRect ) const; - bool GetFooterPosition( Rectangle& rFooterRect ) const; + bool GetHeaderPosition( tools::Rectangle& rHeaderRect ) const; + bool GetFooterPosition( tools::Rectangle& rFooterRect ) const; bool IsHeaderLeft() const; bool IsFooterLeft() const; - long GetNoteCountInRange( const Rectangle& rVisiblePixel, bool bNoteMarks ) const; - bool GetNoteInRange( const Rectangle& rVisiblePixel, long nIndex, bool bNoteMarks, - ScAddress& rCellPos, Rectangle& rNoteRect ) const; - Rectangle GetNoteInRangeOutputRect(const Rectangle& rVisiblePixel, bool bNoteMarks, + long GetNoteCountInRange( const tools::Rectangle& rVisiblePixel, bool bNoteMarks ) const; + bool GetNoteInRange( const tools::Rectangle& rVisiblePixel, long nIndex, bool bNoteMarks, + ScAddress& rCellPos, tools::Rectangle& rNoteRect ) const; + tools::Rectangle GetNoteInRangeOutputRect(const tools::Rectangle& rVisiblePixel, bool bNoteMarks, const ScAddress& aCellPos) const; // Check if any cells (including column/row headers) are in the visible area - bool HasCellsInRange( const Rectangle& rVisiblePixel ) const; + bool HasCellsInRange( const tools::Rectangle& rVisiblePixel ) const; - void GetCellPosition( const ScAddress& rCellPos, Rectangle& rCellRect ) const; + void GetCellPosition( const ScAddress& rCellPos, tools::Rectangle& rCellRect ) const; // returns the rectangle where the EditEngine draws the text of a Header Cell // if bColHeader is true it returns the rectangle of the header of the column in rCellPos // otherwise of the header of the row in rCellPos - Rectangle GetHeaderCellOutputRect(const Rectangle& rVisRect, const ScAddress& rCellPos, bool bColHeader) const; - Rectangle GetCellOutputRect(const ScAddress& rCellPos) const; + tools::Rectangle GetHeaderCellOutputRect(const tools::Rectangle& rVisRect, const ScAddress& rCellPos, bool bColHeader) const; + tools::Rectangle GetCellOutputRect(const ScAddress& rCellPos) const; // Query the range and rectangle of the main (non-repeat) cell range. // Returns sal_False if not contained. - bool GetMainCellRange( ScRange& rRange, Rectangle& rPixRect ) const; + bool GetMainCellRange( ScRange& rRange, tools::Rectangle& rPixRect ) const; }; #endif diff --git a/sc/source/ui/inc/printfun.hxx b/sc/source/ui/inc/printfun.hxx index b162cb559380..56360a178625 100644 --- a/sc/source/ui/inc/printfun.hxx +++ b/sc/source/ui/inc/printfun.hxx @@ -181,7 +181,7 @@ private: long nTabPages; long nTotalPages; - Rectangle aPageRect; // Document Twips + tools::Rectangle aPageRect; // Document Twips MapMode aLogicMode; // Set in DoPrint MapMode aOffsetMode; @@ -237,7 +237,7 @@ public: ~ScPrintFunc(); static void DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double nPrintFactor, - const Rectangle& rBound, ScViewData* pViewData, bool bMetaFile ); + const tools::Rectangle& rBound, ScViewData* pViewData, bool bMetaFile ); void SetDrawView( FmFormView* pNew ); diff --git a/sc/source/ui/inc/tabsplit.hxx b/sc/source/ui/inc/tabsplit.hxx index 08d4fbfa7c28..206adb70b1d6 100644 --- a/sc/source/ui/inc/tabsplit.hxx +++ b/sc/source/ui/inc/tabsplit.hxx @@ -39,7 +39,7 @@ public: virtual ~ScTabSplitter() override; void SetFixed(bool bSet); - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rPaintRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rPaintRect ) override; }; #endif diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx index d33303426341..b217c5ba0b2a 100644 --- a/sc/source/ui/inc/tabview.hxx +++ b/sc/source/ui/inc/tabview.hxx @@ -67,7 +67,7 @@ private: bool bAdd; protected: - 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; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; public: @@ -170,7 +170,7 @@ private: ScExtraEditViewManager aExtraEditViewManager; sal_uLong nTipVisible; - Rectangle aTipRectangle; + tools::Rectangle aTipRectangle; QuickHelpFlags nTipAlign; OUString sTipString; VclPtr<vcl::Window> sTopParent; @@ -388,7 +388,7 @@ public: Point GetInsertPos(); Point GetChartInsertPos( const Size& rSize, const ScRange& rCellRange ); - Point GetChartDialogPos( const Size& rDialogSize, const Rectangle& rLogicChart ); + Point GetChartDialogPos( const Size& rDialogSize, const tools::Rectangle& rLogicChart ); void UpdateAutoFillMark(); @@ -451,7 +451,7 @@ public: bool ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos ); void ScrollToObject( SdrObject* pDrawObj ); - void MakeVisible( const Rectangle& rHMMRect ); + void MakeVisible( const tools::Rectangle& rHMMRect ); // Zeichnen @@ -589,7 +589,7 @@ public: void ResetAutoSpell(); void SetAutoSpellData( SCCOL nPosX, SCROW nPosY, const std::vector<editeng::MisspellRanges>* pRanges ); /// @see ScModelObj::getRowColumnHeaders(). - OUString getRowColumnHeaders(const Rectangle& rRectangle); + OUString getRowColumnHeaders(const tools::Rectangle& rRectangle); static void OnLOKNoteStateChanged(const ScPostIt* pNote); }; diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx index 1b6551f1e82c..253ae20da05a 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -159,7 +159,7 @@ private: bool bInDispose; ScRangeListRef aChartSource; - Rectangle aChartPos; + tools::Rectangle aChartPos; SCTAB nChartDestTab; sal_uInt16 nCurRefDlgId; @@ -200,7 +200,7 @@ protected: virtual void OuterResizePixel( const Point &rOfs, const Size &rSize ) override; virtual void SetZoomFactor( const Fraction &rZoomX, const Fraction &rZoomY ) override; - virtual void QueryObjAreaPixel( Rectangle& rRect ) const override; + virtual void QueryObjAreaPixel( tools::Rectangle& rRect ) const override; virtual OUString GetSelectionText( bool bWholeWord = false ) override; virtual bool HasSelection( bool bText = true ) const override; @@ -317,7 +317,7 @@ public: void FillFieldData( ScHeaderFieldData& rData ); - bool GetChartArea( ScRangeListRef& rSource, Rectangle& rDest, SCTAB& rTab ) const; + bool GetChartArea( ScRangeListRef& rSource, tools::Rectangle& rDest, SCTAB& rTab ) const; virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; diff --git a/sc/source/ui/inc/tbzoomsliderctrl.hxx b/sc/source/ui/inc/tbzoomsliderctrl.hxx index d5b39e1a55c8..faa56f6e5ba0 100644 --- a/sc/source/ui/inc/tbzoomsliderctrl.hxx +++ b/sc/source/ui/inc/tbzoomsliderctrl.hxx @@ -47,7 +47,7 @@ private: sal_uInt16 Offset2Zoom(long nOffset) const; long Zoom2Offset(sal_uInt16 nZoom) const; - void DoPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect); + void DoPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect); public: ScZoomSliderWnd(vcl::Window* pParent, const css::uno::Reference<css::frame::XDispatchProvider >& rDispatchProvider, @@ -59,7 +59,7 @@ public: protected: virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void MouseMove( 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; }; #endif diff --git a/sc/source/ui/inc/tphfedit.hxx b/sc/source/ui/inc/tphfedit.hxx index e63b00d8161c..da7a5f9199ab 100644 --- a/sc/source/ui/inc/tphfedit.hxx +++ b/sc/source/ui/inc/tphfedit.hxx @@ -75,7 +75,7 @@ public: void SetLocation(ScEditWindowLocation eLoc) { eLocation = eLoc; } protected: - 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 MouseButtonUp( const MouseEvent& rMEvt ) override; diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx index 60fd14eaed3a..9c54b3d2a02f 100644 --- a/sc/source/ui/inc/viewdata.hxx +++ b/sc/source/ui/inc/viewdata.hxx @@ -474,7 +474,7 @@ public: SCCOL GetEditEndCol() const { return nEditEndCol; } SCROW GetEditEndRow() const { return nEditEndRow; } - Rectangle GetEditArea( ScSplitPos eWhich, SCCOL nPosX, SCROW nPosY, vcl::Window* pWin, + tools::Rectangle GetEditArea( ScSplitPos eWhich, SCCOL nPosX, SCROW nPosY, vcl::Window* pWin, const ScPatternAttr* pPattern, bool bForceToTop ); void SetTabNo( SCTAB nNewTab ); @@ -495,7 +495,7 @@ public: bool IsOle(); void SetScreen( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ); - void SetScreen( const Rectangle& rVisArea ); + void SetScreen( const tools::Rectangle& rVisArea ); void SetScreenPos( const Point& rVisAreaStart ); void UpdateScreenZoom( const Fraction& rNewX, const Fraction& rNewY ); diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx index a20c4729cc0c..c6faad76523f 100644 --- a/sc/source/ui/miscdlgs/autofmt.cxx +++ b/sc/source/ui/miscdlgs/autofmt.cxx @@ -250,7 +250,7 @@ void ScAutoFmtPreview::DrawString(vcl::RenderContext& rRenderContext, size_t nCo Size aStrSize; sal_uInt16 nFmtIndex = GetFormatIndex( nCol, nRow ); - Rectangle cellRect = maArray.GetCellRect( nCol, nRow ); + tools::Rectangle cellRect = maArray.GetCellRect( nCol, nRow ); Point aPos = cellRect.TopLeft(); sal_uInt16 nRightX = 0; bool bJustify = pCurData->GetIncludeJustify(); @@ -478,10 +478,10 @@ void ScAutoFmtPreview::NotifyChange( ScAutoFormatData* pNewData ) CalcCellArray( bFitWidth ); CalcLineMap(); - Invalidate(Rectangle(Point(0,0), GetSizePixel())); + Invalidate(tools::Rectangle(Point(0,0), GetSizePixel())); } -void ScAutoFmtPreview::DoPaint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) +void ScAutoFmtPreview::DoPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) { DrawModeFlags nOldDrawMode = aVD->GetDrawMode(); @@ -489,7 +489,7 @@ void ScAutoFmtPreview::DoPaint(vcl::RenderContext& rRenderContext, const Rectang vcl::Font aFont(aVD->GetFont()); Color aBackCol(rRenderContext.GetSettings().GetStyleSettings().GetWindowColor()); Point aTmpPoint; - Rectangle aRect(aTmpPoint, aWndSize); + tools::Rectangle aRect(aTmpPoint, aWndSize); aFont.SetTransparent( true ); aVD->SetFont(aFont); @@ -511,7 +511,7 @@ void ScAutoFmtPreview::DoPaint(vcl::RenderContext& rRenderContext, const Rectang aVD->SetDrawMode(nOldDrawMode); } -void ScAutoFmtPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void ScAutoFmtPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { DoPaint(rRenderContext, rRect); } diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index e9b6e9be7135..d8519c45cd7e 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -699,7 +699,7 @@ void ScContentTree::RequestHelp( const HelpEvent& rHEvt ) aPos = OutputToScreenPixel(aPos); Size aSize( pItem->GetSize( this, pEntry ) ); - Rectangle aItemRect( aPos, aSize ); + tools::Rectangle aItemRect( aPos, aSize ); Help::ShowQuickHelp( this, aItemRect, aHelpText ); bDone = true; } diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx index cc887a6f3f84..71c40d913146 100644 --- a/sc/source/ui/navipi/scenwnd.cxx +++ b/sc/source/ui/navipi/scenwnd.cxx @@ -237,7 +237,7 @@ void ScScenarioWindow::dispose() vcl::Window::dispose(); } -void ScScenarioWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void ScScenarioWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); Color aBgColor = rStyleSettings.GetFaceColor(); diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx index 6232b14f3f79..1a05f543edc6 100644 --- a/sc/source/ui/pagedlg/tphfedit.cxx +++ b/sc/source/ui/pagedlg/tphfedit.cxx @@ -94,7 +94,7 @@ ScEditWindow::ScEditWindow( vcl::Window* pParent, WinBits nBits, ScEditWindowLoc pEdEngine->SetDefaultHorizontalTextDirection(EE_HTEXTDIR_R2L); pEdView = new EditView( pEdEngine, this ); - pEdView->SetOutputArea( Rectangle( Point(0,0), GetOutputSize() ) ); + pEdView->SetOutputArea( tools::Rectangle( Point(0,0), GetOutputSize() ) ); pEdView->SetBackgroundColor( aBgColor ); pEdEngine->InsertView( pEdView ); @@ -106,7 +106,7 @@ void ScEditWindow::Resize() Size aSize(aOutputSize); aSize.Height() *= 4; pEdEngine->SetPaperSize(aSize); - pEdView->SetOutputArea(Rectangle(Point(0,0), aOutputSize)); + pEdView->SetOutputArea(tools::Rectangle(Point(0,0), aOutputSize)); Control::Resize(); } @@ -216,7 +216,7 @@ void ScEditWindow::SetCharAttributes() } } -void ScEditWindow::Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) +void ScEditWindow::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) { const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); Color aBgColor = rStyleSettings.GetWindowColor(); diff --git a/sc/source/ui/sidebar/CellLineStyleValueSet.cxx b/sc/source/ui/sidebar/CellLineStyleValueSet.cxx index 77509827ed8f..74628c74b007 100644 --- a/sc/source/ui/sidebar/CellLineStyleValueSet.cxx +++ b/sc/source/ui/sidebar/CellLineStyleValueSet.cxx @@ -73,7 +73,7 @@ void CellLineStyleValueSet::SetSelItem(sal_uInt16 nSel) void CellLineStyleValueSet::UserDraw( const UserDrawEvent& rUDEvt ) { - Rectangle aRect = rUDEvt.GetRect(); + tools::Rectangle aRect = rUDEvt.GetRect(); vcl::RenderContext* pDev = rUDEvt.GetRenderContext(); sal_uInt16 nItemId = rUDEvt.GetItemId(); @@ -93,7 +93,7 @@ void CellLineStyleValueSet::UserDraw( const UserDrawEvent& rUDEvt ) if( nSelItem == nItemId ) { Color aBackColor(50,107,197); - Rectangle aBackRect = aRect; + tools::Rectangle aBackRect = aRect; aBackRect.Top() += 3; aBackRect.Bottom() -= 2; pDev->SetFillColor(aBackColor); @@ -136,27 +136,27 @@ void CellLineStyleValueSet::UserDraw( const UserDrawEvent& rUDEvt ) case 2: case 3: case 4: - pDev->DrawRect(Rectangle(nTLX, nTLY , nTRX, nTRY + nItemId * 2 - 1 )); + pDev->DrawRect(tools::Rectangle(nTLX, nTLY , nTRX, nTRY + nItemId * 2 - 1 )); break; case 5: - pDev->DrawRect(Rectangle(nTLX, nTLY , nTRX, nTRY + 1 )); - pDev->DrawRect(Rectangle(nTLX, nTLY + 3 , nTRX, nTRY + 4 )); + pDev->DrawRect(tools::Rectangle(nTLX, nTLY , nTRX, nTRY + 1 )); + pDev->DrawRect(tools::Rectangle(nTLX, nTLY + 3 , nTRX, nTRY + 4 )); break; case 6: - pDev->DrawRect(Rectangle(nTLX, nTLY , nTRX, nTRY + 1 )); - pDev->DrawRect(Rectangle(nTLX, nTLY + 5 , nTRX, nTRY + 6 )); + pDev->DrawRect(tools::Rectangle(nTLX, nTLY , nTRX, nTRY + 1 )); + pDev->DrawRect(tools::Rectangle(nTLX, nTLY + 5 , nTRX, nTRY + 6 )); break; case 7: - pDev->DrawRect(Rectangle(nTLX, nTLY , nTRX, nTRY + 1 )); - pDev->DrawRect(Rectangle(nTLX, nTLY + 3 , nTRX, nTRY + 6 )); + pDev->DrawRect(tools::Rectangle(nTLX, nTLY , nTRX, nTRY + 1 )); + pDev->DrawRect(tools::Rectangle(nTLX, nTLY + 3 , nTRX, nTRY + 6 )); break; case 8: - pDev->DrawRect(Rectangle(nTLX, nTLY , nTRX, nTRY + 3 )); - pDev->DrawRect(Rectangle(nTLX, nTLY + 5 , nTRX, nTRY + 6 )); + pDev->DrawRect(tools::Rectangle(nTLX, nTLY , nTRX, nTRY + 3 )); + pDev->DrawRect(tools::Rectangle(nTLX, nTLY + 5 , nTRX, nTRY + 6 )); break; case 9: - pDev->DrawRect(Rectangle(nTLX, nTLY , nTRX, nTRY + 3 )); - pDev->DrawRect(Rectangle(nTLX, nTLY + 5 , nTRX, nTRY + 8 )); + pDev->DrawRect(tools::Rectangle(nTLX, nTLY , nTRX, nTRY + 3 )); + pDev->DrawRect(tools::Rectangle(nTLX, nTLY + 5 , nTRX, nTRY + 8 )); break; } diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index c2ce3570f501..81f713ab645d 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -5889,7 +5889,7 @@ void ScCellRangeObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEnt if (pDocSh) { // GetMMRect converts using HMM_PER_TWIPS, like the DrawingLayer - Rectangle aMMRect(pDocSh->GetDocument().GetMMRect( + tools::Rectangle aMMRect(pDocSh->GetDocument().GetMMRect( aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aStart.Tab() )); awt::Point aPos( aMMRect.Left(), aMMRect.Top() ); @@ -5902,7 +5902,7 @@ void ScCellRangeObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEnt if (pDocSh) { // GetMMRect converts using HMM_PER_TWIPS, like the DrawingLayer - Rectangle aMMRect = pDocSh->GetDocument().GetMMRect( + tools::Rectangle aMMRect = pDocSh->GetDocument().GetMMRect( aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aStart.Tab() ); Size aSize(aMMRect.GetSize()); diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx index b0b2da480e7d..78152703066f 100644 --- a/sc/source/ui/unoobj/chartuno.cxx +++ b/sc/source/ui/unoobj/chartuno.cxx @@ -225,7 +225,7 @@ void SAL_CALL ScChartsObj::addNewByName( const OUString& rName, if (aRectSize.Height() <= 0) aRectSize.Height() = 5000; - Rectangle aInsRect( aRectPos, aRectSize ); + tools::Rectangle aInsRect( aRectPos, aRectSize ); sal_Int64 nAspect(embed::Aspects::MSOLE_CONTENT); MapUnit aMapUnit(VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) )); diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 36a275c7d926..31c0e1123624 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -903,7 +903,7 @@ void ScModelObj::setClientZoom(int nTilePixelWidth_, int nTilePixelHeight_, int mnTileTwipHeight = nTileTwipHeight_; } -OUString ScModelObj::getRowColumnHeaders(const Rectangle& rRectangle) +OUString ScModelObj::getRowColumnHeaders(const tools::Rectangle& rRectangle) { ScViewData* pViewData = ScDocShell::GetViewData(); @@ -966,7 +966,7 @@ OUString ScModelObj::getTrackedChanges() return aRet; } -void ScModelObj::setClientVisibleArea(const Rectangle& rRectangle) +void ScModelObj::setClientVisibleArea(const tools::Rectangle& rRectangle) { ScViewData* pViewData = ScDocShell::GetViewData(); if (!pViewData) @@ -1012,7 +1012,7 @@ OUString ScModelObj::getPostIts() double fPPTX = pViewData->GetPPTX(); double fPPTY = pViewData->GetPPTY(); - Rectangle aRect(Point(aScrPos.getX() / fPPTX, aScrPos.getY() / fPPTY), + tools::Rectangle aRect(Point(aScrPos.getX() / fPPTX, aScrPos.getY() / fPPTY), Size(nSizeXPix / fPPTX, nSizeYPix / fPPTY)); aAnnotation.put("cellPos", aRect.toString()); @@ -1263,7 +1263,7 @@ static OutputDevice* lcl_GetRenderDevice( const uno::Sequence<beans::PropertyVal return pRet; } -static bool lcl_ParseTarget( const OUString& rTarget, ScRange& rTargetRange, Rectangle& rTargetRect, +static bool lcl_ParseTarget( const OUString& rTarget, ScRange& rTargetRange, tools::Rectangle& rTargetRect, bool& rIsSheet, ScDocument* pDoc, SCTAB nSourceTab ) { // test in same order as in SID_CURRENTCELL execute @@ -1456,7 +1456,7 @@ bool ScModelObj::FillRenderMarkData( const uno::Any& aSelection, ScDocument& rDoc = pDocShell->GetDocument(); if( pSdrObj ) { - Rectangle aObjRect = pSdrObj->GetCurrentBoundRect(); + tools::Rectangle aObjRect = pSdrObj->GetCurrentBoundRect(); SCTAB nCurrentTab = ScDocShell::GetCurTab(); ScRange aRange = rDoc.GetRange( nCurrentTab, aObjRect ); rMark.SetMarkArea( aRange ); @@ -1749,7 +1749,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec if ( pPDFData && pPDFData->GetIsExportBookmarks() ) { // the sheet starts at the top of the page - Rectangle aArea( pDev->PixelToLogic( Rectangle( 0,0,0,0 ) ) ); + tools::Rectangle aArea( pDev->PixelToLogic( tools::Rectangle( 0,0,0,0 ) ) ); sal_Int32 nDestID = pPDFData->CreateDest( aArea ); OUString aTabName; rDoc.GetName( nTab, aTabName ); @@ -1759,7 +1759,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec // #i56629# add the named destination stuff if( pPDFData && pPDFData->GetIsExportNamedDestinations() ) { - Rectangle aArea( pDev->PixelToLogic( Rectangle( 0,0,0,0 ) ) ); + tools::Rectangle aArea( pDev->PixelToLogic( tools::Rectangle( 0,0,0,0 ) ) ); OUString aTabName; rDoc.GetName( nTab, aTabName ); //need the PDF page number here @@ -1788,20 +1788,20 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec OUString aTarget( aBookmark.copy( 1 ) ); ScRange aTargetRange; - Rectangle aTargetRect; // 1/100th mm + tools::Rectangle aTargetRect; // 1/100th mm bool bIsSheet = false; bool bValid = lcl_ParseTarget( aTarget, aTargetRange, aTargetRect, bIsSheet, &rDoc, nTab ); if ( bValid ) { sal_Int32 nPage = -1; - Rectangle aArea; + tools::Rectangle aArea; if ( bIsSheet ) { // Get first page for sheet (if nothing from that sheet is printed, // this page can show a different sheet) nPage = pPrintFuncCache->GetTabStart( aTargetRange.aStart.Tab() ); - aArea = pDev->PixelToLogic( Rectangle( 0,0,0,0 ) ); + aArea = pDev->PixelToLogic( tools::Rectangle( 0,0,0,0 ) ); } else { @@ -1814,11 +1814,11 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec // get the rectangle of the page's cell range in 1/100th mm ScRange aLocRange = aLocation.aCellRange; - Rectangle aLocationMM = rDoc.GetMMRect( + tools::Rectangle aLocationMM = rDoc.GetMMRect( aLocRange.aStart.Col(), aLocRange.aStart.Row(), aLocRange.aEnd.Col(), aLocRange.aEnd.Row(), aLocRange.aStart.Tab() ); - Rectangle aLocationPixel = aLocation.aRectangle; + tools::Rectangle aLocationPixel = aLocation.aRectangle; // Scale and move the target rectangle from aLocationMM to aLocationPixel, // to get the target rectangle in pixels. @@ -1844,7 +1844,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec // the time of the CreateDest call, so PixelToLogic can be used here, // regardless of the MapMode that is actually selected. - aArea = pDev->PixelToLogic( Rectangle( nX1, nY1, nX2, nY2 ) ); + aArea = pDev->PixelToLogic( tools::Rectangle( nX1, nY1, nX2, nY2 ) ); } } diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx index 8c08a3aad1db..68d2f123fecc 100644 --- a/sc/source/ui/unoobj/shapeuno.cxx +++ b/sc/source/ui/unoobj/shapeuno.cxx @@ -290,7 +290,7 @@ static ScRange lcl_GetAnchorCell( uno::Reference< drawing::XShape >& xShape, ScD if (rCaptionPoint.Y < 0) rUnoPoint.Y += rCaptionPoint.Y; } - aReturn = pDoc->GetRange( nTab, Rectangle( VCLPoint(rUnoPoint), VCLPoint(rUnoPoint) )); + aReturn = pDoc->GetRange( nTab, tools::Rectangle( VCLPoint(rUnoPoint), VCLPoint(rUnoPoint) )); } else { @@ -301,7 +301,7 @@ static ScRange lcl_GetAnchorCell( uno::Reference< drawing::XShape >& xShape, ScD if (rCaptionPoint.Y < 0) rUnoPoint.Y += rCaptionPoint.Y; } - aReturn = pDoc->GetRange( nTab, Rectangle( VCLPoint(rUnoPoint), VCLPoint(rUnoPoint) )); + aReturn = pDoc->GetRange( nTab, tools::Rectangle( VCLPoint(rUnoPoint), VCLPoint(rUnoPoint) )); } return aReturn; @@ -312,7 +312,7 @@ static awt::Point lcl_GetRelativePos( uno::Reference< drawing::XShape >& xShape, { awt::Point aUnoPoint; rRange = lcl_GetAnchorCell(xShape, pDoc, nTab, aUnoPoint, rUnoSize, rCaptionPoint); - Rectangle aRect(pDoc->GetMMRect( rRange.aStart.Col(), rRange.aStart.Row(), rRange.aEnd.Col(), rRange.aEnd.Row(), rRange.aStart.Tab() )); + tools::Rectangle aRect(pDoc->GetMMRect( rRange.aStart.Col(), rRange.aStart.Row(), rRange.aEnd.Col(), rRange.aEnd.Row(), rRange.aStart.Tab() )); Point aPoint = pDoc->IsNegativePage(nTab) ? aRect.TopRight() : aRect.TopLeft(); aUnoPoint.X -= aPoint.X(); aUnoPoint.Y -= aPoint.Y(); @@ -349,7 +349,7 @@ void SAL_CALL ScShapeObj::setPropertyValue(const OUString& aPropertyName, const table::CellRangeAddress aAddress = xRangeAdd->getRangeAddress(); if (nTab == aAddress.Sheet) { - Rectangle aRect(pDoc->GetMMRect( static_cast<SCCOL>(aAddress.StartColumn), static_cast<SCROW>(aAddress.StartRow), + tools::Rectangle aRect(pDoc->GetMMRect( static_cast<SCCOL>(aAddress.StartColumn), static_cast<SCROW>(aAddress.StartRow), static_cast<SCCOL>(aAddress.EndColumn), static_cast<SCROW>(aAddress.EndRow), aAddress.Sheet )); awt::Point aRelPoint; uno::Reference<drawing::XShape> xShape( mxShapeAgg, uno::UNO_QUERY ); @@ -513,7 +513,7 @@ void SAL_CALL ScShapeObj::setPropertyValue(const OUString& aPropertyName, const awt::Point aCaptionPoint; ScRange aRange; awt::Point aUnoPoint(lcl_GetRelativePos( xShape, pDoc, nTab, aRange, aUnoSize, aCaptionPoint )); - Rectangle aRect(pDoc->GetMMRect( aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aStart.Tab() )); + tools::Rectangle aRect(pDoc->GetMMRect( aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aStart.Tab() )); if (pDoc->IsNegativePage(nTab)) { aUnoPoint.X = -nPos; @@ -597,7 +597,7 @@ void SAL_CALL ScShapeObj::setPropertyValue(const OUString& aPropertyName, const awt::Point aCaptionPoint; ScRange aRange; awt::Point aUnoPoint(lcl_GetRelativePos( xShape, pDoc, nTab, aRange, aUnoSize, aCaptionPoint )); - Rectangle aRect(pDoc->GetMMRect( aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aStart.Tab() )); + tools::Rectangle aRect(pDoc->GetMMRect( aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aStart.Tab() )); Point aPoint(aRect.TopRight()); Point aEndPoint(aRect.BottomLeft()); aUnoPoint.Y = nPos; @@ -1014,7 +1014,7 @@ uno::Reference<text::XTextRange> SAL_CALL ScShapeObj::getAnchor() if ( lcl_GetPageNum( pPage, *pModel, nTab ) ) { Point aPos(pObj->GetCurrentBoundRect().TopLeft()); - ScRange aRange(pDoc->GetRange( nTab, Rectangle( aPos, aPos ) )); + ScRange aRange(pDoc->GetRange( nTab, tools::Rectangle( aPos, aPos ) )); // anchor is always the cell diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx index 3ed0583819dc..661617800cad 100644 --- a/sc/source/ui/unoobj/viewuno.cxx +++ b/sc/source/ui/unoobj/viewuno.cxx @@ -392,7 +392,7 @@ awt::Rectangle ScViewPaneBase::GetVisArea() const ScAddress aCell(pViewShell->GetViewData().GetPosX(eWhichH), pViewShell->GetViewData().GetPosY(eWhichV), pViewShell->GetViewData().GetTabNo()); - Rectangle aCellRect( pDoc->GetMMRect( aCell.Col(), aCell.Row(), aCell.Col(), aCell.Row(), aCell.Tab() ) ); + tools::Rectangle aCellRect( pDoc->GetMMRect( aCell.Col(), aCell.Row(), aCell.Col(), aCell.Row(), aCell.Tab() ) ); Size aVisSize( pWindow->PixelToLogic( pWindow->GetSizePixel(), pWindow->GetDrawMapMode( true ) ) ); Point aVisPos( aCellRect.TopLeft() ); if ( pDoc->IsLayoutRTL( aCell.Tab() ) ) @@ -400,7 +400,7 @@ awt::Rectangle ScViewPaneBase::GetVisArea() const aVisPos = aCellRect.TopRight(); aVisPos.X() -= aVisSize.Width(); } - Rectangle aVisRect( aVisPos, aVisSize ); + tools::Rectangle aVisRect( aVisPos, aVisSize ); aVisArea = AWTRectangle(aVisRect); } } @@ -1918,7 +1918,7 @@ uno::Any SAL_CALL ScTabViewObj::getPropertyValue( const OUString& aPropertyName vcl::Window* pActiveWin = rViewData.GetActiveWin(); if ( pActiveWin ) { - Rectangle aRect = pActiveWin->GetWindowExtentsRelative( nullptr ); + tools::Rectangle aRect = pActiveWin->GetWindowExtentsRelative( nullptr ); aRet <<= AWTRectangle( aRect ); } } diff --git a/sc/source/ui/view/colrowba.cxx b/sc/source/ui/view/colrowba.cxx index 70c40c466754..45b4aa855375 100644 --- a/sc/source/ui/view/colrowba.cxx +++ b/sc/source/ui/view/colrowba.cxx @@ -187,7 +187,7 @@ bool ScColBar::ResizeAllowed() const void ScColBar::DrawInvert( long nDragPosP ) { - Rectangle aRect( nDragPosP,0, nDragPosP+HDR_SLIDERSIZE-1,GetOutputSizePixel().Width()-1 ); + tools::Rectangle aRect( nDragPosP,0, nDragPosP+HDR_SLIDERSIZE-1,GetOutputSizePixel().Width()-1 ); Update(); Invert(aRect); @@ -346,7 +346,7 @@ bool ScRowBar::ResizeAllowed() const void ScRowBar::DrawInvert( long nDragPosP ) { - Rectangle aRect( 0,nDragPosP, GetOutputSizePixel().Width()-1,nDragPosP+HDR_SLIDERSIZE-1 ); + tools::Rectangle aRect( 0,nDragPosP, GetOutputSizePixel().Width()-1,nDragPosP+HDR_SLIDERSIZE-1 ); Update(); Invert(aRect); diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx index e9be96c7d5f1..18a82ae2ed00 100644 --- a/sc/source/ui/view/drawvie4.cxx +++ b/sc/source/ui/view/drawvie4.cxx @@ -92,7 +92,7 @@ void ScDrawView::BeginDrag( vcl::Window* pWindow, const Point& rStartPos ) { BrkAction(); - Rectangle aMarkedRect = GetAllMarkedRect(); + tools::Rectangle aMarkedRect = GetAllMarkedRect(); vcl::Region aRegion( aMarkedRect ); aDragStartDiff = rStartPos - aMarkedRect.TopLeft(); @@ -522,7 +522,7 @@ void ScDrawView::SetMarkedOriginalSize() if ( bDo ) { - Rectangle aDrawRect = pObj->GetLogicRect(); + tools::Rectangle aDrawRect = pObj->GetLogicRect(); pUndoGroup->AddAction( new SdrUndoGeoObj( *pObj ) ); pObj->Resize( aDrawRect.TopLeft(), Fraction( aOriginalSize.Width(), aDrawRect.GetWidth() ), diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx index e05ff462cee1..1758f7d8a062 100644 --- a/sc/source/ui/view/drawview.cxx +++ b/sc/source/ui/view/drawview.cxx @@ -267,7 +267,7 @@ void ScDrawView::UpdateWorkArea() { Point aPos; Size aPageSize( pPage->GetSize() ); - Rectangle aNewArea( aPos, aPageSize ); + tools::Rectangle aNewArea( aPos, aPageSize ); if ( aPageSize.Width() < 0 ) { // RTL: from max.negative (left) to zero (right) @@ -558,7 +558,7 @@ bool ScDrawView::SdrBeginTextEdit( { if (OutlinerView* pView = GetTextEditOutlinerView()) { - Rectangle aRectangle = pView->GetOutputArea(); + tools::Rectangle aRectangle = pView->GetOutputArea(); if (pWinL && pWinL->GetMapMode().GetMapUnit() == MapUnit::Map100thMM) aRectangle = OutputDevice::LogicToLogic(aRectangle, MapUnit::Map100thMM, MapUnit::MapTwip); OString sRectangle = aRectangle.toString(); @@ -836,7 +836,7 @@ void ScDrawView::LockCalcLayer( SdrLayerID nLayer, bool bLock ) SetLayerLocked( pLockLayer->GetName(), bLock ); } -void ScDrawView::MakeVisible( const Rectangle& rRect, vcl::Window& rWin ) +void ScDrawView::MakeVisible( const tools::Rectangle& rRect, vcl::Window& rWin ) { //! Evaluate rWin properly //! change zoom if necessary diff --git a/sc/source/ui/view/gridmerg.cxx b/sc/source/ui/view/gridmerg.cxx index abb6493a3d84..aead9ccbb345 100644 --- a/sc/source/ui/view/gridmerg.cxx +++ b/sc/source/ui/view/gridmerg.cxx @@ -200,7 +200,7 @@ void ScGridMerger::Flush() nVarStart = nVarEnd; nVarEnd = nTemp; } - pDev->DrawGrid( Rectangle( nVarStart, nFixStart, nVarEnd, nFixEnd ), + pDev->DrawGrid( tools::Rectangle( nVarStart, nFixStart, nVarEnd, nFixEnd ), Size( nVarDiff, nFixEnd - nFixStart ), DrawGridFlags::VertLines ); } @@ -212,7 +212,7 @@ void ScGridMerger::Flush() else { long nVarEnd = nVarStart + ( nCount - 1 ) * nVarDiff; - pDev->DrawGrid( Rectangle( nFixStart, nVarStart, nFixEnd, nVarEnd ), + pDev->DrawGrid( tools::Rectangle( nFixStart, nVarStart, nFixEnd, nVarEnd ), Size( nFixEnd - nFixStart, nVarDiff ), DrawGridFlags::HorzLines ); } diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index c590bc336b0d..d0c878b52bb6 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -415,7 +415,7 @@ ScGridWindow::ScGridWindow( vcl::Window* pParent, ScViewData* pData, ScSplitPos mpOODragRect(), mpOOHeader(), mpOOShrink(), - mpAutoFillRect(static_cast<Rectangle*>(nullptr)), + mpAutoFillRect(static_cast<tools::Rectangle*>(nullptr)), pViewData( pData ), eWhich( eWhichPos ), mpNoteMarker(), @@ -635,7 +635,7 @@ void ScGridWindow::LaunchAutoFilterMenu(SCCOL nCol, SCROW nRow) long nSizeX = 0; long nSizeY = 0; pViewData->GetMergeSizePixel(nCol, nRow, nSizeX, nSizeY); - Rectangle aCellRect(OutputToScreenPixel(aPos), Size(nSizeX, nSizeY)); + tools::Rectangle aCellRect(OutputToScreenPixel(aPos), Size(nSizeX, nSizeY)); ScDBData* pDBData = pDoc->GetDBAtCursor(nCol, nRow, nTab, ScDBDataPortion::AREA); if (!pDBData) @@ -902,7 +902,7 @@ void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange ) Point aPos = pViewData->GetScrPos( nCol, nRow, eWhich ); if ( bLayoutRTL ) aPos.X() -= nSizeX; - Rectangle aCellRect( OutputToScreenPixel(aPos), Size(nSizeX,nSizeY) ); + tools::Rectangle aCellRect( OutputToScreenPixel(aPos), Size(nSizeX,nSizeY) ); aCellRect.Top() -= nSizeY; aCellRect.Bottom() -= nSizeY - 1; // Place the ListBox directly below the black line of the cell grid @@ -1027,7 +1027,7 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow ) if ( bLayoutRTL ) aPos.X() -= nSizeX; - Rectangle aCellRect( OutputToScreenPixel(aPos), Size(nSizeX,nSizeY) ); + tools::Rectangle aCellRect( OutputToScreenPixel(aPos), Size(nSizeX,nSizeY) ); aPos.X() -= 1; aPos.Y() += nSizeY - 1; @@ -1393,7 +1393,7 @@ bool ScGridWindow::IsCellCoveredByText(SCsCOL nPosX, SCsROW nPosY, SCTAB nTab, S // obtain the bounding box of the text in first non-empty cell // to the left - Rectangle aRect(aOutputData.LayoutStrings(false, false, ScAddress(nNonEmptyX, nPosY, nTab))); + tools::Rectangle aRect(aOutputData.LayoutStrings(false, false, ScAddress(nNonEmptyX, nPosY, nTab))); SetMapMode(aCurrentMapMode); @@ -1550,7 +1550,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta ScViewSelectionEngine* pSelEng = pViewData->GetView()->GetSelEngine(); pSelEng->SetWindow(this); pSelEng->SetWhich(eWhich); - pSelEng->SetVisibleArea( Rectangle(Point(), GetOutputSizePixel()) ); + pSelEng->SetVisibleArea( tools::Rectangle(Point(), GetOutputSizePixel()) ); } if (bEditMode && (pViewData->GetRefTabNo() == pViewData->GetTabNo())) @@ -1697,7 +1697,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta if ( bListValButton ) { - Rectangle aButtonRect = GetListValButtonRect( aListValPos ); + tools::Rectangle aButtonRect = GetListValButtonRect( aListValPos ); if ( aButtonRect.IsInside( aPos ) ) { LaunchDataSelectMenu( aListValPos.Col(), aListValPos.Row() ); @@ -1752,7 +1752,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta ScViewSelectionEngine* pSelEng = pViewData->GetView()->GetSelEngine(); pSelEng->SetWindow(this); pSelEng->SetWhich(eWhich); - pSelEng->SetVisibleArea( Rectangle(Point(), GetOutputSizePixel()) ); + pSelEng->SetVisibleArea( tools::Rectangle(Point(), GetOutputSizePixel()) ); // SelMouseButtonDown on the View is still setting the bMoveIsShift flag if ( pViewData->GetView()->SelMouseButtonDown( rMEvt ) ) @@ -2293,7 +2293,7 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt ) if (nMouseStatus == SC_GM_FILTER && mpFilterBox) { Point aRelPos = mpFilterBox->ScreenToOutputPixel( OutputToScreenPixel( rMEvt.GetPosPixel() ) ); - if ( Rectangle(Point(), mpFilterBox->GetOutputSizePixel()).IsInside(aRelPos) ) + if ( tools::Rectangle(Point(), mpFilterBox->GetOutputSizePixel()).IsInside(aRelPos) ) { nButtonDown = 0; nMouseStatus = SC_GM_NONE; @@ -2623,7 +2623,7 @@ static void lcl_SetTextCursorPos( ScViewData* pViewData, ScSplitPos eWhich, vcl: { SCCOL nCol = pViewData->GetCurX(); SCROW nRow = pViewData->GetCurY(); - Rectangle aEditArea = pViewData->GetEditArea( eWhich, nCol, nRow, pWin, nullptr, true ); + tools::Rectangle aEditArea = pViewData->GetEditArea( eWhich, nCol, nRow, pWin, nullptr, true ); aEditArea.Right() = aEditArea.Left(); aEditArea = pWin->PixelToLogic( aEditArea ); pWin->SetCursorRect( &aEditArea ); @@ -2895,7 +2895,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt ) if (pDrawView && pDrawView->AreObjectsMarked()) { // #100442#; the context menu should open in the middle of the selected objects - Rectangle aSelectRect(LogicToPixel(pDrawView->GetAllMarkedBoundRect())); + tools::Rectangle aSelectRect(LogicToPixel(pDrawView->GetAllMarkedBoundRect())); aMenuPos = aSelectRect.Center(); } } @@ -2934,8 +2934,8 @@ void ScGridWindow::SelectForContextMenu( const Point& rPosPixel, SCsCOL nCellX, EditView* pEditView = pViewData->GetEditView( eWhich ); // not NULL (HasEditView) EditEngine* pEditEngine = pEditView->GetEditEngine(); - Rectangle aOutputArea = pEditView->GetOutputArea(); - Rectangle aVisArea = pEditView->GetVisArea(); + tools::Rectangle aOutputArea = pEditView->GetOutputArea(); + tools::Rectangle aVisArea = pEditView->GetVisArea(); Point aTextPos = PixelToLogic( rPosPixel ); if ( pEditEngine->IsVertical() ) // have to manually transform position @@ -2977,14 +2977,14 @@ void ScGridWindow::SelectForContextMenu( const Point& rPosPixel, SCsCOL nCellX, if ( pDrawView && pDrawView->GetTextEditObject() && pDrawView->GetTextEditOutlinerView() ) { OutlinerView* pOlView = pDrawView->GetTextEditOutlinerView(); - Rectangle aOutputArea = pOlView->GetOutputArea(); + tools::Rectangle aOutputArea = pOlView->GetOutputArea(); if ( aOutputArea.IsInside( aLogicPos ) ) { // handle selection within the OutlinerView Outliner* pOutliner = pOlView->GetOutliner(); const EditEngine& rEditEngine = pOutliner->GetEditEngine(); - Rectangle aVisArea = pOlView->GetVisArea(); + tools::Rectangle aVisArea = pOlView->GetVisArea(); Point aTextPos = aLogicPos; if ( pOutliner->IsVertical() ) // have to manually transform position @@ -4395,7 +4395,7 @@ void ScGridWindow::UpdateEditViewPos() if (bHide) { - Rectangle aRect = pView->GetOutputArea(); + tools::Rectangle aRect = pView->GetOutputArea(); long nHeight = aRect.Bottom() - aRect.Top(); aRect.Top() = PixelToLogic(GetOutputSizePixel(), pViewData->GetLogicMode()). Height() * 2; @@ -4406,10 +4406,10 @@ void ScGridWindow::UpdateEditViewPos() else { // bForceToTop = sal_True for editing - Rectangle aPixRect = pViewData->GetEditArea( eWhich, nCol, nRow, this, nullptr, true ); + tools::Rectangle aPixRect = pViewData->GetEditArea( eWhich, nCol, nRow, this, nullptr, true ); Point aScrPos = PixelToLogic( aPixRect.TopLeft(), pViewData->GetLogicMode() ); - Rectangle aRect = pView->GetOutputArea(); + tools::Rectangle aRect = pView->GetOutputArea(); aRect.SetPos( aScrPos ); pView->SetOutputArea( aRect ); pView->ShowCursor(); @@ -4447,7 +4447,7 @@ void ScGridWindow::UpdateFormulas() // (then at least the MapMode would no longer be right) bNeedsRepaint = true; // -> at end of paint run Invalidate on all - aRepaintPixel = Rectangle(); // All + aRepaintPixel = tools::Rectangle(); // All return; } @@ -5062,7 +5062,7 @@ bool ScGridWindow::GetEditUrl( const Point& rPos, const ScPatternAttr* pPattern = rDoc.GetPattern( nPosX, nPosY, nTab ); // bForceToTop = sal_False, use the cell's real position - Rectangle aEditRect = pViewData->GetEditArea( eWhich, nPosX, nPosY, this, pPattern, false ); + tools::Rectangle aEditRect = pViewData->GetEditArea( eWhich, nPosX, nPosY, this, pPattern, false ); if (rPos.Y() < aEditRect.Top()) return false; @@ -5082,7 +5082,7 @@ bool ScGridWindow::GetEditUrl( const Point& rPos, std::shared_ptr<ScFieldEditEngine> pEngine = createEditEngine(pDocSh, *pPattern); MapMode aEditMode = pViewData->GetLogicMode(eWhich); // without draw scaleing - Rectangle aLogicEdit = PixelToLogic( aEditRect, aEditMode ); + tools::Rectangle aLogicEdit = PixelToLogic( aEditRect, aEditMode ); long nThisColLogic = aLogicEdit.Right() - aLogicEdit.Left() + 1; Size aPaperSize( 1000000, 1000000 ); if (aCell.meType == CELLTYPE_FORMULA) @@ -5180,7 +5180,7 @@ bool ScGridWindow::IsSpellErrorAtPos( const Point& rPos, SCCOL nCol1, SCROW nRow const ScPatternAttr* pPattern = rDoc.GetPattern(nCol1, nRow, nTab); - Rectangle aEditRect = pViewData->GetEditArea(eWhich, nCol1, nRow, this, pPattern, false); + tools::Rectangle aEditRect = pViewData->GetEditArea(eWhich, nCol1, nRow, this, pPattern, false); if (rPos.Y() < aEditRect.Top()) return false; @@ -5197,7 +5197,7 @@ bool ScGridWindow::IsSpellErrorAtPos( const Point& rPos, SCCOL nCol1, SCROW nRow long nTextWidth = static_cast<long>(pEngine->CalcTextWidth()); MapMode aEditMode = pViewData->GetLogicMode(eWhich); - Rectangle aLogicEdit = PixelToLogic(aEditRect, aEditMode); + tools::Rectangle aLogicEdit = PixelToLogic(aEditRect, aEditMode); Point aLogicClick = PixelToLogic(rPos, aEditMode); aLogicEdit.setWidth(nTextWidth + 1); @@ -5265,7 +5265,7 @@ bool ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScenRang else aButtonPos.X() -= nBWidth - nHSpace; // same for top or bottom - Rectangle aButRect( aButtonPos, Size(nBWidth,nBHeight) ); + tools::Rectangle aButRect( aButtonPos, Size(nBWidth,nBHeight) ); if ( aButRect.IsInside( rPosPixel ) ) { rScenRange = aRange; @@ -5538,7 +5538,7 @@ OString ScGridWindow::getCellCursor(const Fraction& rZoomX, const Fraction& rZoo double fPPTX = pViewData->GetPPTX(); double fPPTY = pViewData->GetPPTY(); - Rectangle aRect(Point(rtl::math::round(aScrPos.getX() / fPPTX), rtl::math::round(aScrPos.getY() / fPPTY)), + tools::Rectangle aRect(Point(rtl::math::round(aScrPos.getX() / fPPTX), rtl::math::round(aScrPos.getY() / fPPTY)), Size(rtl::math::round(nSizeXPix / fPPTX), rtl::math::round(nSizeYPix / fPPTY))); pViewData->SetZoom(defaultZoomX, defaultZoomY, true); @@ -5657,11 +5657,11 @@ void ScGridWindow::UpdateCopySourceOverlay() long nSizeXPix = aClipEndScrPos.X() - aClipStartScrPos.X(); long nSizeYPix = aClipEndScrPos.Y() - aClipStartScrPos.Y(); - Rectangle aRect( aClipStartScrPos, Size(nSizeXPix, nSizeYPix) ); + tools::Rectangle aRect( aClipStartScrPos, Size(nSizeXPix, nSizeYPix) ); Color aHighlight = GetSettings().GetStyleSettings().GetHighlightColor(); - Rectangle aLogic = PixelToLogic(aRect, aDrawMode); + tools::Rectangle aLogic = PixelToLogic(aRect, aDrawMode); ::basegfx::B2DRange aRange(aLogic.Left(), aLogic.Top(), aLogic.Right(), aLogic.Bottom()); ScOverlayDashedBorder* pDashedBorder = new ScOverlayDashedBorder(aRange, aHighlight); xOverlayManager->add(*pDashedBorder); @@ -5677,7 +5677,7 @@ void ScGridWindow::UpdateCopySourceOverlay() * * @param pLogicRects - if not 0, then don't invoke the callback, just collect the rectangles in the pointed vector. */ -static void updateLibreOfficeKitSelection(ScViewData* pViewData, const std::vector<Rectangle>& rRectangles, std::vector<Rectangle>* pLogicRects = nullptr) +static void updateLibreOfficeKitSelection(ScViewData* pViewData, const std::vector<tools::Rectangle>& rRectangles, std::vector<tools::Rectangle>* pLogicRects = nullptr) { if (!comphelper::LibreOfficeKit::isActive()) return; @@ -5685,20 +5685,20 @@ static void updateLibreOfficeKitSelection(ScViewData* pViewData, const std::vect double nPPTX = pViewData->GetPPTX(); double nPPTY = pViewData->GetPPTY(); - Rectangle aBoundingBox; + tools::Rectangle aBoundingBox; std::vector<OString> aRectangles; for (const auto& rRectangle : rRectangles) { // We explicitly create a copy, since we need to expand // the rectangle before coordinate conversion - Rectangle aRectangle(rRectangle); + tools::Rectangle aRectangle(rRectangle); aRectangle.Right() += 1; aRectangle.Bottom() += 1; aBoundingBox.Union(aRectangle); - Rectangle aRect(aRectangle.Left() / nPPTX, aRectangle.Top() / nPPTY, + tools::Rectangle aRect(aRectangle.Left() / nPPTX, aRectangle.Top() / nPPTY, aRectangle.Right() / nPPTX, aRectangle.Bottom() / nPPTY); if (pLogicRects) pLogicRects->push_back(aRect); @@ -5710,11 +5710,11 @@ static void updateLibreOfficeKitSelection(ScViewData* pViewData, const std::vect return; // selection start handle - Rectangle aStart(aBoundingBox.Left() / nPPTX, aBoundingBox.Top() / nPPTY, + tools::Rectangle aStart(aBoundingBox.Left() / nPPTX, aBoundingBox.Top() / nPPTY, aBoundingBox.Left() / nPPTX, (aBoundingBox.Top() / nPPTY) + 256); // selection end handle - Rectangle aEnd(aBoundingBox.Right() / nPPTX, (aBoundingBox.Bottom() / nPPTY) - 256, + tools::Rectangle aEnd(aBoundingBox.Right() / nPPTX, (aBoundingBox.Bottom() / nPPTY) - 256, aBoundingBox.Right() / nPPTX, aBoundingBox.Bottom() / nPPTY); // the selection itself @@ -5741,7 +5741,7 @@ void ScGridWindow::UpdateCursorOverlay() DeleteCursorOverlay(); - std::vector<Rectangle> aPixelRects; + std::vector<tools::Rectangle> aPixelRects; // determine the cursor rectangles in pixels (moved from ScGridWindow::DrawCursor) @@ -5814,29 +5814,29 @@ void ScGridWindow::UpdateCursorOverlay() aScrPos.X() -= nSizeXPix - 2; // move instead of mirroring // show the cursor as 4 (thin) rectangles - Rectangle aRect(aScrPos, Size(nSizeXPix - 1, nSizeYPix - 1)); + tools::Rectangle aRect(aScrPos, Size(nSizeXPix - 1, nSizeYPix - 1)); float fScaleFactor = GetDPIScaleFactor(); long aCursorWidth = 1 * fScaleFactor; - Rectangle aLeft = Rectangle(aRect); + tools::Rectangle aLeft = tools::Rectangle(aRect); aLeft.Top() -= aCursorWidth; aLeft.Bottom() += aCursorWidth; aLeft.Right() = aLeft.Left(); aLeft.Left() -= aCursorWidth; - Rectangle aRight = Rectangle(aRect); + tools::Rectangle aRight = tools::Rectangle(aRect); aRight.Top() -= aCursorWidth; aRight.Bottom() += aCursorWidth; aRight.Left() = aRight.Right(); aRight.Right() += aCursorWidth; - Rectangle aTop = Rectangle(aRect); + tools::Rectangle aTop = tools::Rectangle(aRect); aTop.Bottom() = aTop.Top(); aTop.Top() -= aCursorWidth; - Rectangle aBottom = Rectangle(aRect); + tools::Rectangle aBottom = tools::Rectangle(aRect); aBottom.Top() = aBottom.Bottom(); aBottom.Bottom() += aCursorWidth; @@ -5868,7 +5868,7 @@ void ScGridWindow::UpdateCursorOverlay() std::vector< basegfx::B2DRange > aRanges; const basegfx::B2DHomMatrix aTransform(GetInverseViewTransformation()); - for(const Rectangle & rRA : aPixelRects) + for(const tools::Rectangle & rRA : aPixelRects) { basegfx::B2DRange aRB(rRA.Left(), rRA.Top(), rRA.Right() + 1, rRA.Bottom() + 1); aRB.transform(aTransform); @@ -5895,9 +5895,9 @@ void ScGridWindow::UpdateCursorOverlay() SetMapMode( aOldMode ); } -void ScGridWindow::GetCellSelection(std::vector<Rectangle>& rLogicRects) +void ScGridWindow::GetCellSelection(std::vector<tools::Rectangle>& rLogicRects) { - std::vector<Rectangle> aPixelRects; + std::vector<tools::Rectangle> aPixelRects; GetSelectionRects(aPixelRects); updateLibreOfficeKitSelection(pViewData, aPixelRects, &rLogicRects); } @@ -5915,7 +5915,7 @@ void ScGridWindow::UpdateSelectionOverlay() SetMapMode( aDrawMode ); DeleteSelectionOverlay(); - std::vector<Rectangle> aPixelRects; + std::vector<tools::Rectangle> aPixelRects; GetSelectionRects( aPixelRects ); if (!aPixelRects.empty() && pViewData->IsActive()) @@ -5931,7 +5931,7 @@ void ScGridWindow::UpdateSelectionOverlay() SCTAB nTab = pViewData->GetTabNo(); bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); - for(const Rectangle & rRA : aPixelRects) + for(const tools::Rectangle & rRA : aPixelRects) { if (bLayoutRTL) { @@ -6024,10 +6024,10 @@ void ScGridWindow::UpdateAutoFillOverlay() aFillPos.Y() += nSizeYPix; aFillPos.Y() -= (aFillHandleSize.Height() / 2); - Rectangle aFillRect(aFillPos, aFillHandleSize); + tools::Rectangle aFillRect(aFillPos, aFillHandleSize); // expand rect to increase hit area - mpAutoFillRect.reset(new Rectangle(aFillRect.Left() - fScaleFactor, + mpAutoFillRect.reset(new tools::Rectangle(aFillRect.Left() - fScaleFactor, aFillRect.Top() - fScaleFactor, aFillRect.Right() + fScaleFactor, aFillRect.Bottom() + fScaleFactor)); @@ -6082,7 +6082,7 @@ void ScGridWindow::UpdateDragRectOverlay() if ( bDragRect || bPagebreakDrawn ) { - std::vector<Rectangle> aPixelRects; + std::vector<tools::Rectangle> aPixelRects; SCCOL nX1 = bDragRect ? nDragStartX : aPagebreakDrag.aStart.Col(); SCROW nY1 = bDragRect ? nDragStartY : aPagebreakDrag.aStart.Row(); @@ -6130,7 +6130,7 @@ void ScGridWindow::UpdateDragRectOverlay() aScrPos.X() -= 2 * nLayoutSign; aScrPos.Y() -= 2; - Rectangle aRect( aScrPos.X(), aScrPos.Y(), + tools::Rectangle aRect( aScrPos.X(), aScrPos.Y(), aScrPos.X() + ( nSizeXPix + 2 ) * nLayoutSign, aScrPos.Y() + nSizeYPix + 2 ); if ( bLayoutRTL ) { @@ -6140,24 +6140,24 @@ void ScGridWindow::UpdateDragRectOverlay() if ( meDragInsertMode == INS_CELLSDOWN ) { - aPixelRects.push_back( Rectangle( aRect.Left()+1, aRect.Top()+3, aRect.Left()+1, aRect.Bottom()-2 ) ); - aPixelRects.push_back( Rectangle( aRect.Right()-1, aRect.Top()+3, aRect.Right()-1, aRect.Bottom()-2 ) ); - aPixelRects.push_back( Rectangle( aRect.Left()+1, aRect.Top(), aRect.Right()-1, aRect.Top()+2 ) ); - aPixelRects.push_back( Rectangle( aRect.Left()+1, aRect.Bottom()-1, aRect.Right()-1, aRect.Bottom()-1 ) ); + aPixelRects.push_back( tools::Rectangle( aRect.Left()+1, aRect.Top()+3, aRect.Left()+1, aRect.Bottom()-2 ) ); + aPixelRects.push_back( tools::Rectangle( aRect.Right()-1, aRect.Top()+3, aRect.Right()-1, aRect.Bottom()-2 ) ); + aPixelRects.push_back( tools::Rectangle( aRect.Left()+1, aRect.Top(), aRect.Right()-1, aRect.Top()+2 ) ); + aPixelRects.push_back( tools::Rectangle( aRect.Left()+1, aRect.Bottom()-1, aRect.Right()-1, aRect.Bottom()-1 ) ); } else if ( meDragInsertMode == INS_CELLSRIGHT ) { - aPixelRects.push_back( Rectangle( aRect.Left(), aRect.Top()+1, aRect.Left()+2, aRect.Bottom()-1 ) ); - aPixelRects.push_back( Rectangle( aRect.Right()-1, aRect.Top()+1, aRect.Right()-1, aRect.Bottom()-1 ) ); - aPixelRects.push_back( Rectangle( aRect.Left()+3, aRect.Top()+1, aRect.Right()-2, aRect.Top()+1 ) ); - aPixelRects.push_back( Rectangle( aRect.Left()+3, aRect.Bottom()-1, aRect.Right()-2, aRect.Bottom()-1 ) ); + aPixelRects.push_back( tools::Rectangle( aRect.Left(), aRect.Top()+1, aRect.Left()+2, aRect.Bottom()-1 ) ); + aPixelRects.push_back( tools::Rectangle( aRect.Right()-1, aRect.Top()+1, aRect.Right()-1, aRect.Bottom()-1 ) ); + aPixelRects.push_back( tools::Rectangle( aRect.Left()+3, aRect.Top()+1, aRect.Right()-2, aRect.Top()+1 ) ); + aPixelRects.push_back( tools::Rectangle( aRect.Left()+3, aRect.Bottom()-1, aRect.Right()-2, aRect.Bottom()-1 ) ); } else { - aPixelRects.push_back( Rectangle( aRect.Left(), aRect.Top(), aRect.Left()+2, aRect.Bottom() ) ); - aPixelRects.push_back( Rectangle( aRect.Right()-2, aRect.Top(), aRect.Right(), aRect.Bottom() ) ); - aPixelRects.push_back( Rectangle( aRect.Left()+3, aRect.Top(), aRect.Right()-3, aRect.Top()+2 ) ); - aPixelRects.push_back( Rectangle( aRect.Left()+3, aRect.Bottom()-2, aRect.Right()-3, aRect.Bottom() ) ); + aPixelRects.push_back( tools::Rectangle( aRect.Left(), aRect.Top(), aRect.Left()+2, aRect.Bottom() ) ); + aPixelRects.push_back( tools::Rectangle( aRect.Right()-2, aRect.Top(), aRect.Right(), aRect.Bottom() ) ); + aPixelRects.push_back( tools::Rectangle( aRect.Left()+3, aRect.Top(), aRect.Right()-3, aRect.Top()+2 ) ); + aPixelRects.push_back( tools::Rectangle( aRect.Left()+3, aRect.Bottom()-2, aRect.Right()-3, aRect.Bottom() ) ); } // #i70788# get the OverlayManager safely @@ -6168,7 +6168,7 @@ void ScGridWindow::UpdateDragRectOverlay() std::vector< basegfx::B2DRange > aRanges; const basegfx::B2DHomMatrix aTransform(GetInverseViewTransformation()); - for(const Rectangle & rRA : aPixelRects) + for(const tools::Rectangle & rRA : aPixelRects) { basegfx::B2DRange aRB(rRA.Left(), rRA.Top(), rRA.Right() + 1, rRA.Bottom() + 1); aRB.transform(aTransform); @@ -6253,7 +6253,7 @@ void ScGridWindow::UpdateShrinkOverlay() // get the rectangle in pixels - Rectangle aPixRect; + tools::Rectangle aPixRect; ScRange aRange; SCTAB nTab = pViewData->GetTabNo(); if ( pViewData->IsRefMode() && nTab >= pViewData->GetRefStartZ() && nTab <= pViewData->GetRefEndZ() && @@ -6270,7 +6270,7 @@ void ScGridWindow::UpdateShrinkOverlay() aEnd.X() -= 1; aEnd.Y() -= 1; - aPixRect = Rectangle( aStart,aEnd ); + aPixRect = tools::Rectangle( aStart,aEnd ); } } diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx index 59d70bdb2164..91936ae35c0e 100644 --- a/sc/source/ui/view/gridwin2.cxx +++ b/sc/source/ui/view/gridwin2.cxx @@ -128,7 +128,7 @@ bool ScGridWindow::DoAutoFilterButton( SCCOL nCol, SCROW nRow, const MouseEvent& Point aPopupPos; Size aPopupSize; mpFilterButton->getPopupBoundingBox(aPopupPos, aPopupSize); - Rectangle aRect(aPopupPos, aPopupSize); + tools::Rectangle aRect(aPopupPos, aPopupSize); if (aRect.IsInside(rMEvt.GetPosPixel())) { if ( DoPageFieldSelection( nCol, nRow ) ) @@ -256,7 +256,7 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, bool bMove ) nDy = 1; if ( nDx != 0 || nDy != 0 ) { - UpdateDragRect( false, Rectangle() ); + UpdateDragRect( false, tools::Rectangle() ); if ( nDx != 0) pViewData->GetView()->ScrollX( nDx, WhichH(eWhich) ); @@ -275,7 +275,7 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, bool bMove ) ScAddress aPos( nPosX, nPosY, pViewData->GetTabNo() ); - Rectangle aPosRect; + tools::Rectangle aPosRect; sal_uInt16 nOrient; long nDimPos; bool bHasRange = pDragDPObj->GetHeaderDrag( aPos, bMouseLeft, bMouseTop, nDPField, @@ -360,7 +360,7 @@ bool ScGridWindow::DPTestFieldPopupArrow( Point aPopupPos; Size aPopupSize; aBtn.getPopupBoundingBox(aPopupPos, aPopupSize); - Rectangle aRect(aPopupPos, aPopupSize); + tools::Rectangle aRect(aPopupPos, aPopupSize); if (aRect.IsInside(rMEvt.GetPosPixel())) { // Mouse cursor inside the popup arrow box. Launch the field menu. @@ -527,7 +527,7 @@ void ScGridWindow::DPLaunchFieldPopupMenu(const Point& rScrPos, const Size& rScr } } - Rectangle aCellRect(rScrPos, rScrSize); + tools::Rectangle aCellRect(rScrPos, rScrSize); mpDPFieldPopup->SetPopupModeEndHdl( LINK(this, ScGridWindow, PopupModeEndHdl) ); ScCheckListMenuWindow::Config aConfig; @@ -655,7 +655,7 @@ void ScGridWindow::DPMouseButtonUp( const MouseEvent& rMEvt ) SetPointer( Pointer( PointerStyle::Arrow ) ); } -void ScGridWindow::UpdateDragRect( bool bShowRange, const Rectangle& rPosRect ) +void ScGridWindow::UpdateDragRect( bool bShowRange, const tools::Rectangle& rPosRect ) { SCCOL nStartX = ( rPosRect.Left() >= 0 ) ? static_cast<SCCOL>(rPosRect.Left()) : SCCOL_MAX; SCROW nStartY = ( rPosRect.Top() >= 0 ) ? static_cast<SCROW>(rPosRect.Top()) : SCROW_MAX; diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx index 8bfc22fc773f..cb15a6a40476 100644 --- a/sc/source/ui/view/gridwin3.cxx +++ b/sc/source/ui/view/gridwin3.cxx @@ -210,7 +210,7 @@ void ScGridWindow::DrawRedraw( ScOutputData& rOutputData, sal_uLong nLayer ) } } -void ScGridWindow::DrawSdrGrid( const Rectangle& rDrawingRect, OutputDevice* pContentDev ) +void ScGridWindow::DrawSdrGrid( const tools::Rectangle& rDrawingRect, OutputDevice* pContentDev ) { // Draw grid lines @@ -342,7 +342,7 @@ void ScGridWindow::UpdateStatusPosSize() bool bActionItem = false; if ( pDrView->IsAction() ) // action rectangle { - Rectangle aRect; + tools::Rectangle aRect; pDrView->TakeActionRect( aRect ); if ( !aRect.IsEmpty() ) { @@ -361,7 +361,7 @@ void ScGridWindow::UpdateStatusPosSize() { if ( pDrView->AreObjectsMarked() ) // selected objects { - Rectangle aRect = pDrView->GetAllMarkedRect(); + tools::Rectangle aRect = pDrView->GetAllMarkedRect(); // mouse position will have been adjusted for offset // at current position and zoom, restore that adjustment here // so status shows correct value diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index c8387a336bae..67b0d76fafcd 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -67,7 +67,7 @@ #include <vcl/virdev.hxx> #include <svx/sdrpaintwindow.hxx> -static void lcl_LimitRect( Rectangle& rRect, const Rectangle& rVisible ) +static void lcl_LimitRect( tools::Rectangle& rRect, const tools::Rectangle& rVisible ) { if ( rRect.Top() < rVisible.Top()-1 ) rRect.Top() = rVisible.Top()-1; if ( rRect.Bottom() > rVisible.Bottom()+1 ) rRect.Bottom() = rVisible.Bottom()+1; @@ -77,7 +77,7 @@ static void lcl_LimitRect( Rectangle& rRect, const Rectangle& rVisible ) // When it is far away, then lcl_DrawOneFrame is not even called. } -static void lcl_DrawOneFrame( vcl::RenderContext* pDev, const Rectangle& rInnerPixel, +static void lcl_DrawOneFrame( vcl::RenderContext* pDev, const tools::Rectangle& rInnerPixel, const OUString& rTitle, const Color& rColor, bool bTextBelow, double nPPTX, double nPPTY, const Fraction& rZoomY, ScDocument* pDoc, ScViewData* pButtonViewData, bool bLayoutRTL ) @@ -85,17 +85,17 @@ static void lcl_DrawOneFrame( vcl::RenderContext* pDev, const Rectangle& rInnerP // pButtonViewData is only used to set the button size, // can otherwise be NULL! - Rectangle aInner = rInnerPixel; + tools::Rectangle aInner = rInnerPixel; if ( bLayoutRTL ) { aInner.Left() = rInnerPixel.Right(); aInner.Right() = rInnerPixel.Left(); } - Rectangle aVisible( Point(0,0), pDev->GetOutputSizePixel() ); + tools::Rectangle aVisible( Point(0,0), pDev->GetOutputSizePixel() ); lcl_LimitRect( aInner, aVisible ); - Rectangle aOuter = aInner; + tools::Rectangle aOuter = aInner; long nHor = (long) ( SC_SCENARIO_HSPACE * nPPTX ); long nVer = (long) ( SC_SCENARIO_VSPACE * nPPTY ); aOuter.Left() -= nHor; @@ -125,10 +125,10 @@ static void lcl_DrawOneFrame( vcl::RenderContext* pDev, const Rectangle& rInnerP pDev->SetLineColor(); pDev->SetFillColor( rColor ); // left, top, right, bottom - pDev->DrawRect( Rectangle( aOuter.Left(), aOuter.Top(), aInner.Left(), aOuter.Bottom() ) ); - pDev->DrawRect( Rectangle( aOuter.Left(), aOuter.Top(), aOuter.Right(), aInner.Top() ) ); - pDev->DrawRect( Rectangle( aInner.Right(), aOuter.Top(), aOuter.Right(), aOuter.Bottom() ) ); - pDev->DrawRect( Rectangle( aOuter.Left(), aInner.Bottom(), aOuter.Right(), aOuter.Bottom() ) ); + pDev->DrawRect( tools::Rectangle( aOuter.Left(), aOuter.Top(), aInner.Left(), aOuter.Bottom() ) ); + pDev->DrawRect( tools::Rectangle( aOuter.Left(), aOuter.Top(), aOuter.Right(), aInner.Top() ) ); + pDev->DrawRect( tools::Rectangle( aInner.Right(), aOuter.Top(), aOuter.Right(), aOuter.Bottom() ) ); + pDev->DrawRect( tools::Rectangle( aOuter.Left(), aInner.Bottom(), aOuter.Right(), aOuter.Bottom() ) ); long nButtonY = bTextBelow ? aInner.Bottom() : aOuter.Top(); @@ -157,7 +157,7 @@ static void lcl_DrawOneFrame( vcl::RenderContext* pDev, const Rectangle& rInnerP } long nClipStartX = bLayoutRTL ? aOuter.Left() + nBWidth : aInner.Left(); long nClipEndX = bLayoutRTL ? aInner.Right() : aOuter.Right() - nBWidth; - pDev->SetClipRegion( vcl::Region(Rectangle( nClipStartX, nButtonY + nVer/2, + pDev->SetClipRegion( vcl::Region(tools::Rectangle( nClipStartX, nButtonY + nVer/2, nClipEndX, nButtonY + nVer/2 + aTextSize.Height())) ); } @@ -243,7 +243,7 @@ static void lcl_DrawScenarioFrames( OutputDevice* pDev, ScViewData* pViewData, S //! Own text "(None)" instead of "(Empty)" ??? - lcl_DrawOneFrame( pDev, Rectangle( aStartPos, aEndPos ), + lcl_DrawOneFrame( pDev, tools::Rectangle( aStartPos, aEndPos ), aCurrent, aColor, bTextBelow, pViewData->GetPPTX(), pViewData->GetPPTY(), pViewData->GetZoomY(), pDoc, pViewData, bLayoutRTL ); @@ -270,10 +270,10 @@ static void lcl_DrawHighlight( ScOutputData& rOutputData, ScViewData* pViewData, } } -void ScGridWindow::DoInvertRect( const Rectangle& rPixel ) +void ScGridWindow::DoInvertRect( const tools::Rectangle& rPixel ) { if ( rPixel == aInvertRect ) - aInvertRect = Rectangle(); // Cancel + aInvertRect = tools::Rectangle(); // Cancel else { OSL_ENSURE( aInvertRect.IsEmpty(), "DoInvertRect no pairs" ); @@ -300,7 +300,7 @@ void ScGridWindow::PrePaint(vcl::RenderContext& /*rRenderContext*/) } } -void ScGridWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect ) +void ScGridWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rRect ) { ScDocument* pDoc = pViewData->GetDocument(); if ( pDoc->IsInInterpreter() ) @@ -311,7 +311,7 @@ void ScGridWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangl if ( bNeedsRepaint ) { //! Merge Rectangle? - aRepaintPixel = Rectangle(); // multiple -> paint all + aRepaintPixel = tools::Rectangle(); // multiple -> paint all } else { @@ -330,7 +330,7 @@ void ScGridWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangl bIsInPaint = true; - Rectangle aPixRect = LogicToPixel( rRect ); + tools::Rectangle aPixRect = LogicToPixel( rRect ); SCCOL nX1 = pViewData->GetPosX(eHWhich); SCROW nY1 = pViewData->GetPosY(eVWhich); @@ -340,7 +340,7 @@ void ScGridWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangl double nPPTX = pViewData->GetPPTX(); double nPPTY = pViewData->GetPPTY(); - Rectangle aMirroredPixel = aPixRect; + tools::Rectangle aMirroredPixel = aPixRect; if ( pDoc->IsLayoutRTL( nTab ) ) { // mirror and swap @@ -596,12 +596,12 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI // See also ScGridWindow::GetDrawMapMode() for the rest of this hack aDrawMode.SetOrigin(PixelToLogic(Point(nScrX, nScrY), aDrawMode)); } - Rectangle aDrawingRectLogic; + tools::Rectangle aDrawingRectLogic; bool bLayoutRTL = rDoc.IsLayoutRTL( nTab ); { // get drawing pixel rect - Rectangle aDrawingRectPixel(Point(nScrX, nScrY), Size(aOutputData.GetScrW(), aOutputData.GetScrH())); + tools::Rectangle aDrawingRectPixel(Point(nScrX, nScrY), Size(aOutputData.GetScrW(), aOutputData.GetScrH())); // correct for border (left/right) if(MAXCOL == nX2) @@ -666,12 +666,12 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI MapMode aCurrentMapMode(pContentDev->GetMapMode()); pContentDev->SetMapMode(MapUnit::MapPixel); - Rectangle aPixRect = Rectangle( Point(), GetOutputSizePixel() ); + tools::Rectangle aPixRect = tools::Rectangle( Point(), GetOutputSizePixel() ); pContentDev->SetFillColor( rColorCfg.GetColorValue(svtools::APPBACKGROUND).nColor ); pContentDev->SetLineColor(); if ( nX2==MAXCOL ) { - Rectangle aDrawRect( aPixRect ); + tools::Rectangle aDrawRect( aPixRect ); if ( bLayoutRTL ) aDrawRect.Right() = nScrX - 1; else @@ -681,7 +681,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI } if ( nY2==MAXROW ) { - Rectangle aDrawRect( aPixRect ); + tools::Rectangle aDrawRect( aPixRect ); aDrawRect.Top() = nScrY + aOutputData.GetScrH(); if ( nX2==MAXCOL ) { @@ -935,7 +935,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI aEnd.X() -= 2 * nLayoutSign; aEnd.Y() -= 2; - Rectangle aBackground(aStart, aEnd); + tools::Rectangle aBackground(aStart, aEnd); // Need to draw the background in absolute coords. Point aOrigin = aOriginalMode.GetOrigin(); @@ -954,7 +954,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI // paint the background rDevice.DrawRect(rDevice.PixelToLogic(aBackground)); - Rectangle aEditRect(Point(nScreenX, nScreenY), Size(nScreenW, nScreenH)); + tools::Rectangle aEditRect(Point(nScreenX, nScreenY), Size(nScreenW, nScreenH)); pOtherEditView->Paint(rDevice.PixelToLogic(aEditRect), &rDevice); rDevice.SetMapMode(MapUnit::MapPixel); } @@ -998,7 +998,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI pCrsr->Hide(); // set the correct mapmode - Rectangle aBackground(aStart, aEnd); + tools::Rectangle aBackground(aStart, aEnd); if (bIsTiledRendering) { // Need to draw the background in absolute coords. @@ -1028,7 +1028,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI rDevice.DrawRect(rDevice.PixelToLogic(aBackground)); // paint the editeng text - Rectangle aEditRect(Point(nScrX, nScrY), Size(aOutputData.GetScrW(), aOutputData.GetScrH())); + tools::Rectangle aEditRect(Point(nScrX, nScrY), Size(aOutputData.GetScrW(), aOutputData.GetScrH())); pEditView->Paint(rDevice.PixelToLogic(aEditRect), &rDevice); rDevice.SetMapMode(MapUnit::MapPixel); @@ -1205,14 +1205,14 @@ void ScGridWindow::PaintTile( VirtualDevice& rDevice, rDevice.SetMapMode(aOriginalMode); } -void ScGridWindow::LogicInvalidate(const Rectangle* pRectangle) +void ScGridWindow::LogicInvalidate(const tools::Rectangle* pRectangle) { OString sRectangle; if (!pRectangle) sRectangle = "EMPTY"; else { - Rectangle aRectangle(*pRectangle); + tools::Rectangle aRectangle(*pRectangle); // When dragging shapes the map mode is disabled. if (IsMapModeEnabled()) { @@ -1308,7 +1308,7 @@ void ScGridWindow::CheckNeedsRepaint() Invalidate(); else Invalidate(PixelToLogic(aRepaintPixel)); - aRepaintPixel = Rectangle(); + aRepaintPixel = tools::Rectangle(); // selection function in status bar might also be invalid SfxBindings& rBindings = pViewData->GetBindings(); @@ -1392,10 +1392,10 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, if ( aEnd.Y() > aWinSize.Height() + 10 ) aEnd.Y() = aWinSize.Height() + 10; - rRenderContext.DrawRect( Rectangle( aStart, Point(aEnd.X(),aStart.Y()+2) ) ); - rRenderContext.DrawRect( Rectangle( aStart, Point(aStart.X()+2,aEnd.Y()) ) ); - rRenderContext.DrawRect( Rectangle( Point(aStart.X(),aEnd.Y()-2), aEnd ) ); - rRenderContext.DrawRect( Rectangle( Point(aEnd.X()-2,aStart.Y()), aEnd ) ); + rRenderContext.DrawRect( tools::Rectangle( aStart, Point(aEnd.X(),aStart.Y()+2) ) ); + rRenderContext.DrawRect( tools::Rectangle( aStart, Point(aStart.X()+2,aEnd.Y()) ) ); + rRenderContext.DrawRect( tools::Rectangle( Point(aStart.X(),aEnd.Y()-2), aEnd ) ); + rRenderContext.DrawRect( tools::Rectangle( Point(aEnd.X()-2,aStart.Y()), aEnd ) ); // Page breaks //! Display differently (dashed ????) @@ -1415,7 +1415,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, rRenderContext.SetFillColor( aAutomatic ); Point aBreak = pViewData->GetScrPos( nBreak, aRange.aStart.Row(), eWhich, true ); - rRenderContext.DrawRect( Rectangle( aBreak.X()-1, aStart.Y(), aBreak.X(), aEnd.Y() ) ); + rRenderContext.DrawRect( tools::Rectangle( aBreak.X()-1, aStart.Y(), aBreak.X(), aEnd.Y() ) ); } } @@ -1434,7 +1434,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, rRenderContext.SetFillColor( aAutomatic ); Point aBreak = pViewData->GetScrPos( aRange.aStart.Col(), nBreak, eWhich, true ); - rRenderContext.DrawRect( Rectangle( aStart.X(), aBreak.Y()-1, aEnd.X(), aBreak.Y() ) ); + rRenderContext.DrawRect( tools::Rectangle( aStart.X(), aBreak.Y()-1, aEnd.X(), aBreak.Y() ) ); } } @@ -1657,7 +1657,7 @@ void ScGridWindow::DrawButtons(SCCOL nX1, SCCOL nX2, const ScTableInfo& rTabInfo if ( bListValButton && pRowInfo[nArrY].nRowNo == aListValPos.Row() && pRowInfo[nArrY].bChanged ) { - Rectangle aRect = GetListValButtonRect( aListValPos ); + tools::Rectangle aRect = GetListValButtonRect( aListValPos ); aComboButton.SetPosPixel( aRect.TopLeft() ); aComboButton.SetSizePixel( aRect.GetSize() ); pContentDev->SetClipRegion(vcl::Region(aRect)); @@ -1672,7 +1672,7 @@ void ScGridWindow::DrawButtons(SCCOL nX1, SCCOL nX2, const ScTableInfo& rTabInfo aComboButton.SetOutputDevice( this ); } -Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos ) +tools::Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos ) { ScDocument* pDoc = pViewData->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); @@ -1719,7 +1719,7 @@ Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos ) if ( bLayoutRTL ) aPos.X() -= aBtnSize.Width()-1; // align right edge of button with cell border - return Rectangle( aPos, aBtnSize ); + return tools::Rectangle( aPos, aBtnSize ); } bool ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab ) @@ -1759,7 +1759,7 @@ bool ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab ) return ( bSimpleQuery && bColumnFound ); } -void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects ) +void ScGridWindow::GetSelectionRects( ::std::vector< tools::Rectangle >& rPixelRects ) { ScMarkData aMultiMark( pViewData->GetMarkData() ); aMultiMark.SetMarking( false ); @@ -1927,13 +1927,13 @@ void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects ) nThisY + pMerge->GetRowMerge(), eWhich ); if ( aEndPos.X() * nLayoutSign > nScrX * nLayoutSign && aEndPos.Y() > nScrY ) { - aInvert.AddRect( Rectangle( nScrX,nScrY, + aInvert.AddRect( tools::Rectangle( nScrX,nScrY, aEndPos.X()-nLayoutSign,aEndPos.Y()-1 ) ); } } else if ( nEndX * nLayoutSign >= nScrX * nLayoutSign && nEndY >= nScrY ) { - aInvert.AddRect( Rectangle( nScrX,nScrY,nEndX,nEndY ) ); + aInvert.AddRect( tools::Rectangle( nScrX,nScrY,nEndX,nEndY ) ); } } } @@ -1943,7 +1943,7 @@ void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects ) if ( aMultiMark.IsCellMarked( nX, nY, true ) == bRepeat && nEndX * nLayoutSign >= nScrX * nLayoutSign && nEndY >= nScrY ) { - aInvert.AddRect( Rectangle( nScrX,nScrY,nEndX,nEndY ) ); + aInvert.AddRect( tools::Rectangle( nScrX,nScrY,nEndX,nEndY ) ); } } diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx index c6d0af8a4c42..32d95f2855aa 100644 --- a/sc/source/ui/view/gridwin5.cxx +++ b/sc/source/ui/view/gridwin5.cxx @@ -292,7 +292,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt) if ( bHelpEnabled && !bDone && !nButtonDown ) // only without pressed button { OUString aHelpText; - Rectangle aPixRect; + tools::Rectangle aPixRect; Point aPosPixel = ScreenToOutputPixel( rHEvt.GetMousePosPixel() ); if ( pDrView ) // URL / Image-Map @@ -406,7 +406,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt) if ( !aHelpText.isEmpty() ) { - Rectangle aScreenRect(OutputToScreenPixel(aPixRect.TopLeft()), + tools::Rectangle aScreenRect(OutputToScreenPixel(aPixRect.TopLeft()), OutputToScreenPixel(aPixRect.BottomRight())); if ( rHEvt.GetMode() & HelpEventMode::BALLOON ) diff --git a/sc/source/ui/view/gridwin_dbgutil.cxx b/sc/source/ui/view/gridwin_dbgutil.cxx index 54050a4287ee..36e7f85faa01 100644 --- a/sc/source/ui/view/gridwin_dbgutil.cxx +++ b/sc/source/ui/view/gridwin_dbgutil.cxx @@ -105,8 +105,8 @@ void ScGridWindow::dumpGraphicInformation() if (pObjData) dumpScDrawObjData(*this, *pObjData, pDrawLayer->GetScaleUnit()); - const Rectangle& rRect = pObj->GetSnapRect(); - Rectangle aRect = LogicToPixel(rRect, MapMode(pDrawLayer->GetScaleUnit())); + const tools::Rectangle& rRect = pObj->GetSnapRect(); + tools::Rectangle aRect = LogicToPixel(rRect, MapMode(pDrawLayer->GetScaleUnit())); std::cout << "Snap Rectangle (in pixel): " << aRect << std::endl; } } diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx index 2fd99256b093..e63f539b56fd 100644 --- a/sc/source/ui/view/hdrcont.cxx +++ b/sc/source/ui/view/hdrcont.cxx @@ -115,7 +115,7 @@ void ScHeaderControl::DoPaint( SCCOLROW nStart, SCCOLROW nEnd ) bool bLayoutRTL = IsLayoutRTL(); long nLayoutSign = bLayoutRTL ? -1 : 1; - Rectangle aRect( Point(0,0), GetOutputSizePixel() ); + tools::Rectangle aRect( Point(0,0), GetOutputSizePixel() ); if ( bVertical ) { aRect.Top() = GetScrPos( nStart )-nLayoutSign; // extra pixel for line at top of selection @@ -224,22 +224,22 @@ void ScHeaderControl::DrawShadedRect( long nStart, long nEnd, const Color& rBase SetLineColor(); SetFillColor( aOuter ); if (bVertical) - DrawRect( Rectangle( 0, nStart, nCenterPos-1, nEnd ) ); + DrawRect( tools::Rectangle( 0, nStart, nCenterPos-1, nEnd ) ); else - DrawRect( Rectangle( nStart, 0, nEnd, nCenterPos-1 ) ); + DrawRect( tools::Rectangle( nStart, 0, nEnd, nCenterPos-1 ) ); SetFillColor( aCenter ); if (bVertical) - DrawRect( Rectangle( nCenterPos, nStart, nCenterPos, nEnd ) ); + DrawRect( tools::Rectangle( nCenterPos, nStart, nCenterPos, nEnd ) ); else - DrawRect( Rectangle( nStart, nCenterPos, nEnd, nCenterPos ) ); + DrawRect( tools::Rectangle( nStart, nCenterPos, nEnd, nCenterPos ) ); SetFillColor( aInner ); if (bVertical) - DrawRect( Rectangle( nCenterPos+1, nStart, nBarSize-1, nEnd ) ); + DrawRect( tools::Rectangle( nCenterPos+1, nStart, nBarSize-1, nEnd ) ); else - DrawRect( Rectangle( nStart, nCenterPos+1, nEnd, nBarSize-1 ) ); + DrawRect( tools::Rectangle( nStart, nCenterPos+1, nEnd, nBarSize-1 ) ); } -void ScHeaderControl::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect ) +void ScHeaderControl::Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rRect ) { // It is important for VCL to have few calls, that is why the outer lines are // grouped together @@ -336,7 +336,7 @@ void ScHeaderControl::Paint( vcl::RenderContext& /*rRenderContext*/, const Recta // background is different for entry area and behind the entries - Rectangle aFillRect; + tools::Rectangle aFillRect; SetLineColor(); if ( nLineEnd * nLayoutSign >= nInitScrPos * nLayoutSign ) @@ -346,9 +346,9 @@ void ScHeaderControl::Paint( vcl::RenderContext& /*rRenderContext*/, const Recta // high contrast: single-color background SetFillColor( rStyleSettings.GetFaceColor() ); if ( bVertical ) - aFillRect = Rectangle( 0, nInitScrPos, nBarSize-1, nLineEnd ); + aFillRect = tools::Rectangle( 0, nInitScrPos, nBarSize-1, nLineEnd ); else - aFillRect = Rectangle( nInitScrPos, 0, nLineEnd, nBarSize-1 ); + aFillRect = tools::Rectangle( nInitScrPos, 0, nLineEnd, nBarSize-1 ); DrawRect( aFillRect ); } else @@ -362,9 +362,9 @@ void ScHeaderControl::Paint( vcl::RenderContext& /*rRenderContext*/, const Recta { SetFillColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::APPBACKGROUND).nColor ); if ( bVertical ) - aFillRect = Rectangle( 0, nLineEnd+nLayoutSign, nBarSize-1, nPEnd ); + aFillRect = tools::Rectangle( 0, nLineEnd+nLayoutSign, nBarSize-1, nPEnd ); else - aFillRect = Rectangle( nLineEnd+nLayoutSign, 0, nPEnd, nBarSize-1 ); + aFillRect = tools::Rectangle( nLineEnd+nLayoutSign, 0, nPEnd, nBarSize-1 ); DrawRect( aFillRect ); } @@ -381,9 +381,9 @@ void ScHeaderControl::Paint( vcl::RenderContext& /*rRenderContext*/, const Recta SetLineColor(); SetFillColor( COL_LIGHTGRAY ); if (bVertical) - DrawRect( Rectangle( 0, nTransStart, nBarSize-1, nTransEnd ) ); + DrawRect( tools::Rectangle( 0, nTransStart, nBarSize-1, nTransEnd ) ); else - DrawRect( Rectangle( nTransStart, 0, nTransEnd, nBarSize-1 ) ); + DrawRect( tools::Rectangle( nTransStart, 0, nTransEnd, nBarSize-1 ) ); } } else @@ -450,11 +450,11 @@ void ScHeaderControl::Paint( vcl::RenderContext& /*rRenderContext*/, const Recta // The window's background color (SetBackground) has to be the background // of the cell area, for the contrast comparison in DrawSelectionBackground. - Rectangle aTransRect; + tools::Rectangle aTransRect; if (bVertical) - aTransRect = Rectangle( 0, nTransStart, nBarSize-1, nTransEnd ); + aTransRect = tools::Rectangle( 0, nTransStart, nBarSize-1, nTransEnd ); else - aTransRect = Rectangle( nTransStart, 0, nTransEnd, nBarSize-1 ); + aTransRect = tools::Rectangle( nTransStart, 0, nTransEnd, nBarSize-1 ); SetBackground( Color( rStyleSettings.GetFaceColor() ) ); DrawSelectionBackground( aTransRect, 0, true, false ); SetBackground(); @@ -708,7 +708,7 @@ void ScHeaderControl::MouseButtonDown( const MouseEvent& rMEvt ) { pSelEngine->SetWindow( this ); Point aPoint; - Rectangle aVis( aPoint,GetOutputSizePixel() ); + tools::Rectangle aVis( aPoint,GetOutputSizePixel() ); if (bVertical) { aVis.Left() = LONG_MIN; @@ -949,7 +949,7 @@ void ScHeaderControl::ShowDragHelp() Point aMousePos = OutputToScreenPixel(GetPointerPosPixel()); - Rectangle aRect; + tools::Rectangle aRect; QuickHelpFlags nAlign; if (!bVertical) { diff --git a/sc/source/ui/view/invmerge.cxx b/sc/source/ui/view/invmerge.cxx index 8ac68bffeec5..e0e176186320 100644 --- a/sc/source/ui/view/invmerge.cxx +++ b/sc/source/ui/view/invmerge.cxx @@ -21,7 +21,7 @@ #include "invmerge.hxx" -ScInvertMerger::ScInvertMerger( ::std::vector< Rectangle >* pRectangles ) : +ScInvertMerger::ScInvertMerger( ::std::vector< tools::Rectangle >* pRectangles ) : pRects( pRectangles ) { // collect rectangles instead of inverting @@ -47,13 +47,13 @@ void ScInvertMerger::Flush() size_t nComparePos = 0; while ( nComparePos < pRects->size() ) { - Rectangle aCompRect = (*pRects)[nComparePos]; + tools::Rectangle aCompRect = (*pRects)[nComparePos]; sal_Int32 nBottom = aCompRect.Bottom(); size_t nOtherPos = nComparePos + 1; while ( nOtherPos < pRects->size() ) { - Rectangle aOtherRect = (*pRects)[nOtherPos]; + tools::Rectangle aOtherRect = (*pRects)[nOtherPos]; if ( aOtherRect.Top() > nBottom + 1 ) { // rectangles are sorted, so we can stop searching @@ -121,9 +121,9 @@ void ScInvertMerger::FlushLine() aLineRect.SetEmpty(); } -void ScInvertMerger::AddRect( const Rectangle& rRect ) +void ScInvertMerger::AddRect( const tools::Rectangle& rRect ) { - Rectangle aJustified = rRect; + tools::Rectangle aJustified = rRect; if ( rRect.Left() > rRect.Right() ) // switch for RTL layout { aJustified.Left() = rRect.Right(); diff --git a/sc/source/ui/view/notemark.cxx b/sc/source/ui/view/notemark.cxx index 5a27c3112912..a55cc917ab80 100644 --- a/sc/source/ui/view/notemark.cxx +++ b/sc/source/ui/view/notemark.cxx @@ -55,7 +55,7 @@ ScNoteMarker::ScNoteMarker( vcl::Window* pWin, vcl::Window* pRight, vcl::Window* aSizePixel.Width() += pRightWin->GetOutputSizePixel().Width(); if( pBottomWin ) aSizePixel.Height() += pBottomWin->GetOutputSizePixel().Height(); - Rectangle aVisPixel( Point( 0, 0 ), aSizePixel ); + tools::Rectangle aVisPixel( Point( 0, 0 ), aSizePixel ); aVisRect = pWindow->PixelToLogic( aVisPixel, aMapMode ); aTimer.SetInvokeHandler( LINK( this, ScNoteMarker, TimeHdl ) ); diff --git a/sc/source/ui/view/olinewin.cxx b/sc/source/ui/view/olinewin.cxx index 614fa6cfb895..daa983f18e11 100644 --- a/sc/source/ui/view/olinewin.cxx +++ b/sc/source/ui/view/olinewin.cxx @@ -136,7 +136,7 @@ void ScOutlineWindow::ScrollPixel( long nDiff ) void ScOutlineWindow::ScrollRel( long nEntryDiff, long nEntryStart, long nEntryEnd ) { - Rectangle aRect( GetRectangle( 0, nEntryStart, GetOutputSizeLevel() - 1, nEntryEnd ) ); + tools::Rectangle aRect( GetRectangle( 0, nEntryStart, GetOutputSizeLevel() - 1, nEntryEnd ) ); if ( mbHoriz ) Scroll( nEntryDiff, 0, aRect ); else @@ -210,10 +210,10 @@ Point ScOutlineWindow::GetPoint( long nLevelPos, long nEntryPos ) const return mbHoriz ? Point( nEntryPos, nLevelPos ) : Point( nLevelPos, nEntryPos ); } -Rectangle ScOutlineWindow::GetRectangle( +tools::Rectangle ScOutlineWindow::GetRectangle( long nLevelStart, long nEntryStart, long nLevelEnd, long nEntryEnd ) const { - return Rectangle( GetPoint( nLevelStart, nEntryStart ), GetPoint( nLevelEnd, nEntryEnd ) ); + return tools::Rectangle( GetPoint( nLevelStart, nEntryStart ), GetPoint( nLevelEnd, nEntryEnd ) ); } long ScOutlineWindow::GetOutputSizeLevel() const @@ -510,7 +510,7 @@ void ScOutlineWindow::DataChanged( const DataChangedEvent& rDCEvt ) void ScOutlineWindow::SetEntryAreaClipRegion() { - SetClipRegion( vcl::Region(Rectangle( + SetClipRegion( vcl::Region(tools::Rectangle( GetPoint( 0, mnMainFirstPos ), GetPoint( GetOutputSizeLevel() - 1, mnMainLastPos )))); } @@ -541,7 +541,7 @@ void ScOutlineWindow::DrawImageRel(long nLevelPos, long nEntryPos, sal_uInt16 nI SetLineColor(); SetFillColor( GetBackground().GetColor() ); Point aPos( GetPoint( nLevelPos, nEntryPos ) ); - DrawRect( Rectangle( aPos, rImage.GetSizePixel() ) ); + DrawRect( tools::Rectangle( aPos, rImage.GetSizePixel() ) ); DrawImage( aPos, rImage ); } @@ -574,7 +574,7 @@ void ScOutlineWindow::ShowFocus() if ( GetImagePos( mnFocusLevel, mnFocusEntry, aPos ) ) { aPos += Point( 1, 1 ); - maFocusRect = Rectangle( aPos, Size( SC_OL_BITMAPSIZE - 2, SC_OL_BITMAPSIZE - 2 ) ); + maFocusRect = tools::Rectangle( aPos, Size( SC_OL_BITMAPSIZE - 2, SC_OL_BITMAPSIZE - 2 ) ); bool bClip = (mnFocusEntry != SC_OL_HEADERENTRY); if ( bClip ) SetEntryAreaClipRegion(); @@ -600,7 +600,7 @@ void ScOutlineWindow::HideFocus() } } -void ScOutlineWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& /* rRect */ ) +void ScOutlineWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& /* rRect */ ) { long nEntriesSign = mbMirrorEntries ? -1 : 1; long nLevelsSign = mbMirrorLevels ? -1 : 1; diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx index c7ffa95b37d8..943b4af8fe0e 100644 --- a/sc/source/ui/view/output.cxx +++ b/sc/source/ui/view/output.cxx @@ -812,17 +812,17 @@ void ScOutputData::DrawDocumentBackground() Point aScreenPos = mpDev->PixelToLogic(Point(nScrX, nScrY)); Size aScreenSize = mpDev->PixelToLogic(Size(nScrW - 1,nScrH - 1)); - mpDev->DrawRect(Rectangle(aScreenPos, aScreenSize)); + mpDev->DrawRect(tools::Rectangle(aScreenPos, aScreenSize)); } namespace { static const double lclCornerRectTransparency = 40.0; -void drawDataBars(vcl::RenderContext& rRenderContext, const ScDataBarInfo* pOldDataBarInfo, const Rectangle& rRect, long nOneX, long nOneY) +void drawDataBars(vcl::RenderContext& rRenderContext, const ScDataBarInfo* pOldDataBarInfo, const tools::Rectangle& rRect, long nOneX, long nOneY) { long nPosZero = 0; - Rectangle aPaintRect = rRect; + tools::Rectangle aPaintRect = rRect; aPaintRect.Top() += 2 * nOneY; aPaintRect.Bottom() -= 2 * nOneY; aPaintRect.Left() += 2 * nOneX; @@ -895,7 +895,7 @@ const BitmapEx& getIcon(sc::IconSetBitmapMap & rIconSetBitmapMap, ScIconSetType return ScIconSetFormat::getBitmap(rIconSetBitmapMap, eType, nIndex); } -void drawIconSets(vcl::RenderContext& rRenderContext, const ScIconSetInfo* pOldIconSetInfo, const Rectangle& rRect, long nOneX, long nOneY, +void drawIconSets(vcl::RenderContext& rRenderContext, const ScIconSetInfo* pOldIconSetInfo, const tools::Rectangle& rRect, long nOneX, long nOneY, sc::IconSetBitmapMap & rIconSetBitmapMap) { //long nSize = 16; @@ -907,7 +907,7 @@ void drawIconSets(vcl::RenderContext& rRenderContext, const ScIconSetInfo* pOldI } void drawCells(vcl::RenderContext& rRenderContext, const Color* pColor, const SvxBrushItem* pBackground, const Color*& pOldColor, const SvxBrushItem*& pOldBackground, - Rectangle& rRect, long nPosX, long nLayoutSign, long nOneX, long nOneY, const ScDataBarInfo* pDataBarInfo, const ScDataBarInfo*& pOldDataBarInfo, + tools::Rectangle& rRect, long nPosX, long nLayoutSign, long nOneX, long nOneY, const ScDataBarInfo* pDataBarInfo, const ScDataBarInfo*& pOldDataBarInfo, const ScIconSetInfo* pIconSetInfo, const ScIconSetInfo*& pOldIconSetInfo, sc::IconSetBitmapMap & rIconSetBitmapMap) { @@ -1005,7 +1005,7 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext) nOneY = nOneYLogic; } - Rectangle aRect; + tools::Rectangle aRect; long nLayoutSign = bLayoutRTL ? -1 : 1; @@ -1046,7 +1046,7 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext) if ( bLayoutRTL ) nPosX += nMirrorW - nOneX; - aRect = Rectangle(nPosX, nPosY - nOneY, nPosX, nPosY - nOneY + nRowHeight); + aRect = tools::Rectangle(nPosX, nPosY - nOneY, nPosX, nPosY - nOneY + nRowHeight); if (bWorksInPixels) aRect = rRenderContext.PixelToLogic(aRect); // internal data in pixels, but we'll be drawing in logic units @@ -1210,7 +1210,7 @@ void ScOutputData::DrawExtraShadow(bool bLeft, bool bTop, bool bRight, bool bBot } // rectangle is in logical orientation - Rectangle aRect( nPosX, nPosY, + tools::Rectangle aRect( nPosX, nPosY, nPosX + ( nThisWidth - 1 ) * nLayoutSign, nPosY + pRowInfo[nArrY].nHeight - 1 ); @@ -1287,7 +1287,7 @@ void ScOutputData::DrawExtraShadow(bool bLeft, bool bTop, bool bRight, bool bBot void ScOutputData::DrawClear() { - Rectangle aRect; + tools::Rectangle aRect; Size aOnePixel = mpDev->PixelToLogic(Size(1,1)); long nOneX = aOnePixel.Width(); long nOneY = aOnePixel.Height(); @@ -1318,7 +1318,7 @@ void ScOutputData::DrawClear() nRowHeight += pRowInfo[nArrY+nSkip].nHeight; // after incrementing } - aRect = Rectangle( Point( nScrX, nPosY ), + aRect = tools::Rectangle( Point( nScrX, nPosY ), Size( nScrW+1-nOneX, nRowHeight+1-nOneY) ); mpDev->DrawRect( aRect ); @@ -1558,7 +1558,7 @@ void ScOutputData::DrawRotatedFrame(vcl::RenderContext& rRenderContext, const Co } long nLayoutSign = bLayoutRTL ? -1 : 1; - Rectangle aClipRect( Point(nScrX, nScrY), Size(nScrW, nScrH) ); + tools::Rectangle aClipRect( Point(nScrX, nScrY), Size(nScrW, nScrH) ); if (bMetaFile) { rRenderContext.Push(); @@ -1903,7 +1903,7 @@ drawinglayer::processor2d::BaseProcessor2D* ScOutputData::CreateProcessor2D( ) vcl::Region ScOutputData::GetChangedAreaRegion() { vcl::Region aRegion; - Rectangle aDrawingRect; + tools::Rectangle aDrawingRect; bool bHad(false); long nPosY = nScrY; SCSIZE nArrY; @@ -1946,7 +1946,7 @@ bool ScOutputData::SetChangedClip() { tools::PolyPolygon aPoly; - Rectangle aDrawingRect; + tools::Rectangle aDrawingRect; aDrawingRect.Left() = nScrX; aDrawingRect.Right() = nScrX+nScrW-1; @@ -2120,7 +2120,7 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY, if (bTop && bBottom && bLeft && bRight) { mpDev->SetFillColor(); - mpDev->DrawRect( Rectangle( nMinX, nMinY, nMaxX, nMaxY ) ); + mpDev->DrawRect( tools::Rectangle( nMinX, nMinY, nMaxX, nMaxY ) ); } else { @@ -2151,10 +2151,10 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY, sal_Int32 aRectMinY2 = nMinY + aRadius; // Draw corner rectangles - Rectangle aLowerRight( aRectMaxX1, aRectMaxY1, aRectMaxX2, aRectMaxY2 ); - Rectangle aUpperLeft ( aRectMinX1, aRectMinY1, aRectMinX2, aRectMinY2 ); - Rectangle aLowerLeft ( aRectMinX1, aRectMaxY1, aRectMinX2, aRectMaxY2 ); - Rectangle aUpperRight( aRectMaxX1, aRectMinY1, aRectMaxX2, aRectMinY2 ); + tools::Rectangle aLowerRight( aRectMaxX1, aRectMaxY1, aRectMaxX2, aRectMaxY2 ); + tools::Rectangle aUpperLeft ( aRectMinX1, aRectMinY1, aRectMinX2, aRectMinY2 ); + tools::Rectangle aLowerLeft ( aRectMinX1, aRectMaxY1, aRectMinX2, aRectMaxY2 ); + tools::Rectangle aUpperRight( aRectMaxX1, aRectMinY1, aRectMaxX2, aRectMinY2 ); mpDev->DrawTransparent( tools::PolyPolygon( tools::Polygon( aLowerRight ) ), lclCornerRectTransparency ); mpDev->DrawTransparent( tools::PolyPolygon( tools::Polygon( aUpperLeft ) ), lclCornerRectTransparency ); @@ -2253,7 +2253,7 @@ void ScOutputData::DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY, if (bTop && bBottom && bLeft && bRight) { mpDev->SetFillColor(); - mpDev->DrawRect( Rectangle( nMinX, nMinY, nMaxX, nMaxY ) ); + mpDev->DrawRect( tools::Rectangle( nMinX, nMinY, nMaxX, nMaxY ) ); } else { @@ -2278,7 +2278,7 @@ void ScOutputData::DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY, { mpDev->SetLineColor(); mpDev->SetFillColor( rColor ); - mpDev->DrawRect( Rectangle( nMinX+nLayoutSign, nMinY+1, nMinX+3*nLayoutSign, nMinY+3 ) ); + mpDev->DrawRect( tools::Rectangle( nMinX+nLayoutSign, nMinY+1, nMinX+3*nLayoutSign, nMinY+3 ) ); } } } @@ -2411,7 +2411,7 @@ void ScOutputData::DrawNoteMarks(vcl::RenderContext& rRenderContext) } } if ( bLayoutRTL ? ( nMarkX >= 0 ) : ( nMarkX < nScrX+nScrW ) ) - rRenderContext.DrawRect( Rectangle( nMarkX-5*nLayoutSign,nPosY,nMarkX+1*nLayoutSign,nPosY+6 ) ); + rRenderContext.DrawRect( tools::Rectangle( nMarkX-5*nLayoutSign,nPosY,nMarkX+1*nLayoutSign,nPosY+6 ) ); } nPosX += pRowInfo[0].pCellInfo[nX+1].nWidth * nLayoutSign; @@ -2478,7 +2478,7 @@ void ScOutputData::AddPDFNotes() } if ( bLayoutRTL ? ( nMarkX >= 0 ) : ( nMarkX < nScrX+nScrW ) ) { - Rectangle aNoteRect( nMarkX, nPosY, nMarkX+nNoteWidth*nLayoutSign, nPosY+nNoteHeight ); + tools::Rectangle aNoteRect( nMarkX, nPosY, nMarkX+nNoteWidth*nLayoutSign, nPosY+nNoteHeight ); const ScPostIt* pNote = mpDoc->GetNote(nMergeX, nMergeY, nTab); // Note title is the cell address (as on printed note pages) @@ -2525,7 +2525,7 @@ void ScOutputData::DrawClipMarks() nInitPosX += nMirrorW - 1; // always in pixels long nLayoutSign = bLayoutRTL ? -1 : 1; - Rectangle aCellRect; + tools::Rectangle aCellRect; long nPosY = nScrY; for (SCSIZE nArrY=1; nArrY+1<nArrCount; nArrY++) { @@ -2575,7 +2575,7 @@ void ScOutputData::DrawClipMarks() if ( bLayoutRTL ) nStartPosX -= nOutWidth - 1; - aCellRect = Rectangle( Point( nStartPosX, nStartPosY ), Size( nOutWidth, nOutHeight ) ); + aCellRect = tools::Rectangle( Point( nStartPosX, nStartPosY ), Size( nOutWidth, nOutHeight ) ); } else { @@ -2599,7 +2599,7 @@ void ScOutputData::DrawClipMarks() if ( bLayoutRTL ) nStartPosX -= nOutWidth - 1; // #i80447# create aCellRect from two points in case nOutWidth is 0 - aCellRect = Rectangle( Point( nStartPosX, nPosY ), + aCellRect = tools::Rectangle( Point( nStartPosX, nPosY ), Point( nStartPosX+nOutWidth-1, nPosY+nOutHeight-1 ) ); } @@ -2615,14 +2615,14 @@ void ScOutputData::DrawClipMarks() if ( pInfo->nClipMark & ( bLayoutRTL ? ScClipMark::Right : ScClipMark::Left ) ) { // visually left - Rectangle aMarkRect = aCellRect; + tools::Rectangle aMarkRect = aCellRect; aMarkRect.Right() = aCellRect.Left()+nMarkPixel-1; SvxFont::DrawArrow( *mpDev, aMarkRect, aMarkSize, aArrowFillCol, true ); } if ( pInfo->nClipMark & ( bLayoutRTL ? ScClipMark::Left : ScClipMark::Right ) ) { // visually right - Rectangle aMarkRect = aCellRect; + tools::Rectangle aMarkRect = aCellRect; aMarkRect.Left() = aCellRect.Right()-nMarkPixel+1; SvxFont::DrawArrow( *mpDev, aMarkRect, aMarkSize, aArrowFillCol, false ); } diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index f0060f630b5b..54141905c549 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -831,7 +831,7 @@ double ScOutputData::GetStretch() // output strings -static void lcl_DoHyperlinkResult( OutputDevice* pDev, const Rectangle& rRect, ScRefCellValue& rCell ) +static void lcl_DoHyperlinkResult( OutputDevice* pDev, const tools::Rectangle& rRect, ScRefCellValue& rCell ) { vcl::PDFExtOutDevData* pPDFData = dynamic_cast< vcl::PDFExtOutDevData* >( pDev->GetExtOutDevData() ); @@ -1442,7 +1442,7 @@ void ScOutputData::DrawStrings( bool bPixelToLogic ) LayoutStrings(bPixelToLogic); } -Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScAddress &rAddress) +tools::Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScAddress &rAddress) { OSL_ENSURE( mpDev == mpRefDevice || mpDev->GetMapMode().GetMapUnit() == mpRefDevice->GetMapMode().GetMapUnit(), @@ -2070,7 +2070,7 @@ Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScA // the area of the text that covers the specified cell if (!bPaint && rAddress.Col() == nX) { - Rectangle aRect; + tools::Rectangle aRect; mpDev->GetTextBoundRect(aRect, aShort); aRect += aDrawTextPos; return aRect; @@ -2114,7 +2114,7 @@ Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScA bool bHasURL = pPDFData && aCell.meType == CELLTYPE_FORMULA && aCell.mpFormula->IsHyperLinkCell(); if (bPaint && bHasURL) { - Rectangle aURLRect( aURLStart, aVars.GetTextSize() ); + tools::Rectangle aURLRect( aURLStart, aVars.GetTextSize() ); lcl_DoHyperlinkResult(mpDev, aURLRect, aCell); } } @@ -2127,7 +2127,7 @@ Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScA if ( bProgress ) ScProgress::DeleteInterpretProgress(); - return Rectangle(); + return tools::Rectangle(); } ScFieldEditEngine* ScOutputData::CreateOutputEditEngine() @@ -2250,7 +2250,7 @@ static long lcl_GetEditSize( EditEngine& rEngine, bool bWidth, bool bSwap, long return rEngine.GetTextHeight(); } -void ScOutputData::ShrinkEditEngine( EditEngine& rEngine, const Rectangle& rAlignRect, +void ScOutputData::ShrinkEditEngine( EditEngine& rEngine, const tools::Rectangle& rAlignRect, long nLeftM, long nTopM, long nRightM, long nBottomM, bool bWidth, sal_uInt16 nOrient, long nAttrRotate, bool bPixelToLogic, long& rEngineWidth, long& rEngineHeight, long& rNeededPixel, bool& rLeftClip, bool& rRightClip ) @@ -2487,7 +2487,7 @@ void ScOutputData::DrawEditParam::calcMargins(long& rTopM, long& rLeftM, long& r } void ScOutputData::DrawEditParam::calcPaperSize( - Size& rPaperSize, const Rectangle& rAlignRect, double nPPTX, double nPPTY) const + Size& rPaperSize, const tools::Rectangle& rAlignRect, double nPPTX, double nPPTY) const { long nTopM, nLeftM, nBottomM, nRightM; calcMargins(nTopM, nLeftM, nBottomM, nRightM, nPPTX, nPPTY); @@ -2746,7 +2746,7 @@ void ScOutputData::DrawEditParam::adjustForHyperlinkInPDF(Point aURLStart, Outpu else if (mbAsianVertical) aURLStart.X() -= nURLWidth; - Rectangle aURLRect( aURLStart, Size( nURLWidth, nURLHeight ) ); + tools::Rectangle aURLRect( aURLStart, Size( nURLWidth, nURLHeight ) ); lcl_DoHyperlinkResult(pDev, aURLRect, maCell); } @@ -2832,7 +2832,7 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam) // use same GetEditArea call as in ScViewData::SetEditEngine Fraction aFract(1,1); - Rectangle aUtilRect = ScEditUtil( mpDoc, rParam.mnCellX, rParam.mnCellY, nTab, Point(0,0), pFmtDevice, + tools::Rectangle aUtilRect = ScEditUtil( mpDoc, rParam.mnCellX, rParam.mnCellY, nTab, Point(0,0), pFmtDevice, HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( rParam.mpPattern, false ); aLogicSize.Width() = aUtilRect.GetWidth(); } @@ -3063,7 +3063,7 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam) } } - Rectangle aLogicClip; + tools::Rectangle aLogicClip; if (bClip || bSimClip) { // Clip marks are already handled in GetOutputArea @@ -3249,7 +3249,7 @@ bool ScOutputData::Clip( DrawEditParam& rParam, const Size& aCellSize, ShowClipMarks( rParam, nEngineHeight, aCellSize, bMerged, aAreaParam); } - Rectangle aLogicClip; + tools::Rectangle aLogicClip; if (bClip || bSimClip) { // Clip marks are already handled in GetOutputArea @@ -3853,7 +3853,7 @@ void ScOutputData::DrawEditStacked(DrawEditParam& rParam) // use same GetEditArea call as in ScViewData::SetEditEngine Fraction aFract(1,1); - Rectangle aUtilRect = ScEditUtil( mpDoc, rParam.mnCellX, rParam.mnCellY, nTab, Point(0,0), pFmtDevice, + tools::Rectangle aUtilRect = ScEditUtil( mpDoc, rParam.mnCellX, rParam.mnCellY, nTab, Point(0,0), pFmtDevice, HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( rParam.mpPattern, false ); aLogicSize.Width() = aUtilRect.GetWidth(); } @@ -4038,7 +4038,7 @@ void ScOutputData::DrawEditStacked(DrawEditParam& rParam) } } - Rectangle aLogicClip; + tools::Rectangle aLogicClip; if (bClip || bSimClip) { // Clip marks are already handled in GetOutputArea @@ -4207,7 +4207,7 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam) // use same GetEditArea call as in ScViewData::SetEditEngine Fraction aFract(1,1); - Rectangle aUtilRect = ScEditUtil( mpDoc, rParam.mnCellX, rParam.mnCellY, nTab, Point(0,0), pFmtDevice, + tools::Rectangle aUtilRect = ScEditUtil( mpDoc, rParam.mnCellX, rParam.mnCellY, nTab, Point(0,0), pFmtDevice, HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( rParam.mpPattern, false ); aLogicSize.Width() = aUtilRect.GetWidth(); } @@ -4385,7 +4385,7 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam) } } - Rectangle aLogicClip; + tools::Rectangle aLogicClip; if (bClip || bSimClip) { // Clip marks are already handled in GetOutputArea @@ -5113,10 +5113,10 @@ void ScOutputData::DrawRotated(bool bPixelToLogic) } if (bPixelToLogic) - aAreaParam.maClipRect = mpRefDevice->PixelToLogic( Rectangle( + aAreaParam.maClipRect = mpRefDevice->PixelToLogic( tools::Rectangle( Point(nClipStartX,nClipStartY), aClipSize ) ); else - aAreaParam.maClipRect = Rectangle(Point(nClipStartX, nClipStartY), + aAreaParam.maClipRect = tools::Rectangle(Point(nClipStartX, nClipStartY), aClipSize ); // Scale = 1 if (bMetaFile) diff --git a/sc/source/ui/view/output3.cxx b/sc/source/ui/view/output3.cxx index beb7e5fa532b..55f2aad1fa5f 100644 --- a/sc/source/ui/view/output3.cxx +++ b/sc/source/ui/view/output3.cxx @@ -38,7 +38,7 @@ // #i72502# Point ScOutputData::PrePrintDrawingLayer(long nLogStX, long nLogStY ) { - Rectangle aRect; + tools::Rectangle aRect; SCCOL nCol; Point aOffset; long nLayoutSign(bLayoutRTL ? -1 : 1); diff --git a/sc/source/ui/view/pfuncache.cxx b/sc/source/ui/view/pfuncache.cxx index 4c4024d187f9..c73a1df51436 100644 --- a/sc/source/ui/view/pfuncache.cxx +++ b/sc/source/ui/view/pfuncache.cxx @@ -116,7 +116,7 @@ void ScPrintFuncCache::InitLocations( const ScMarkData& rMark, OutputDevice* pDe aFunc.DoPrint( aPage, nTabStart, nDisplayStart, false, &aLocData ); ScRange aCellRange; - Rectangle aPixRect; + tools::Rectangle aPixRect; if ( aLocData.GetMainCellRange( aCellRange, aPixRect ) ) aLocations.push_back( ScPrintPageLocation( nRenderer, aCellRange, aPixRect ) ); diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx index 81af4b4273fe..132267515eb6 100644 --- a/sc/source/ui/view/preview.cxx +++ b/sc/source/ui/view/preview.cxx @@ -372,9 +372,9 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) Size aWinSize = GetOutputSize(); if ( aOffset.X() < 0 ) - DrawRect(Rectangle( 0, 0, -aOffset.X(), aWinSize.Height() )); + DrawRect(tools::Rectangle( 0, 0, -aOffset.X(), aWinSize.Height() )); if ( aOffset.Y() < 0 ) - DrawRect(Rectangle( 0, 0, aWinSize.Width(), -aOffset.Y() )); + DrawRect(tools::Rectangle( 0, 0, aWinSize.Width(), -aOffset.Y() )); } long nLeftMargin = 0; @@ -430,9 +430,9 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) if ( bDoPrint && bPageMargin && pLocationData ) // don't make use of pLocationData while filling it { - Rectangle aPixRect; - Rectangle aRectCellPosition; - Rectangle aRectPosition; + tools::Rectangle aPixRect; + tools::Rectangle aRectCellPosition; + tools::Rectangle aRectPosition; pLocationData->GetMainCellRange( aPageArea, aPixRect ); if( !bLayoutRTL ) { @@ -503,7 +503,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) // Draw background first. SetLineColor(); SetFillColor(aBackColor); - DrawRect(Rectangle(0, 0, aWinEnd.X(), aWinEnd.Y())); + DrawRect(tools::Rectangle(0, 0, aWinEnd.X(), aWinEnd.Y())); const ScPatternAttr& rDefPattern = static_cast<const ScPatternAttr&>( @@ -565,7 +565,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) Point aColumnTop = LogicToPixel( Point( 0, -aOffset.Y() ) ,aMMMode ); SetLineColor( COL_BLACK ); SetFillColor( COL_BLACK ); - DrawRect( Rectangle( Point( nRight[i] - 2, aColumnTop.Y() ),Point( nRight[i] + 2 , 4 + aColumnTop.Y()) )); + DrawRect( tools::Rectangle( Point( nRight[i] - 2, aColumnTop.Y() ),Point( nRight[i] + 2 , 4 + aColumnTop.Y()) )); DrawLine( Point( nRight[i], aColumnTop.Y() ), Point( nRight[i], 10 + aColumnTop.Y()) ); } SetMapMode( aMMMode ); @@ -577,13 +577,13 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) SetLineColor(); SetFillColor(aBackColor); if (bRight) - DrawRect(Rectangle(nPageEndX,0, aWinEnd.X(),aWinEnd.Y())); + DrawRect(tools::Rectangle(nPageEndX,0, aWinEnd.X(),aWinEnd.Y())); if (bBottom) { if (bRight) - DrawRect(Rectangle(0,nPageEndY, nPageEndX,aWinEnd.Y())); // Corner not duplicated + DrawRect(tools::Rectangle(0,nPageEndY, nPageEndX,aWinEnd.Y())); // Corner not duplicated else - DrawRect(Rectangle(0,nPageEndY, aWinEnd.X(),aWinEnd.Y())); + DrawRect(tools::Rectangle(0,nPageEndY, aWinEnd.X(),aWinEnd.Y())); } } @@ -598,7 +598,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) SetLineColor( aBorderColor ); SetFillColor(); - Rectangle aPixel( LogicToPixel( Rectangle( -aOffset.X(), -aOffset.Y(), nPageEndX, nPageEndY ) ) ); + tools::Rectangle aPixel( LogicToPixel( tools::Rectangle( -aOffset.X(), -aOffset.Y(), nPageEndX, nPageEndY ) ) ); --aPixel.Right(); --aPixel.Bottom(); DrawRect( PixelToLogic( aPixel ) ); @@ -609,15 +609,15 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) SetLineColor(); SetFillColor( aBorderColor ); - Rectangle aPixel; + tools::Rectangle aPixel; - aPixel = LogicToPixel( Rectangle( nPageEndX, -aOffset.Y(), nPageEndX, nPageEndY ) ); + aPixel = LogicToPixel( tools::Rectangle( nPageEndX, -aOffset.Y(), nPageEndX, nPageEndY ) ); aPixel.Top() += SC_PREVIEW_SHADOWSIZE; aPixel.Right() += SC_PREVIEW_SHADOWSIZE - 1; aPixel.Bottom() += SC_PREVIEW_SHADOWSIZE - 1; DrawRect( PixelToLogic( aPixel ) ); - aPixel = LogicToPixel( Rectangle( -aOffset.X(), nPageEndY, nPageEndX, nPageEndY ) ); + aPixel = LogicToPixel( tools::Rectangle( -aOffset.X(), nPageEndY, nPageEndX, nPageEndY ) ); aPixel.Left() += SC_PREVIEW_SHADOWSIZE; aPixel.Right() += SC_PREVIEW_SHADOWSIZE - 1; aPixel.Bottom() += SC_PREVIEW_SHADOWSIZE - 1; @@ -626,7 +626,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) } } -void ScPreview::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& /* rRect */ ) +void ScPreview::Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& /* rRect */ ) { bool bWasInPaint = bInPaint; // nested calls shouldn't be necessary, but allow for now bInPaint = true; @@ -1082,17 +1082,17 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) if(( bLeftRulerChange || bRightRulerChange ) && ( aButtonUpPt.X() <= ( 0 - aOffset.X() ) || aButtonUpPt.X() > nWidth * HMM_PER_TWIPS - aOffset.X() ) ) { bMoveRulerAction = false; - Invalidate(Rectangle(0, 0, 10000, 10000)); + Invalidate(tools::Rectangle(0, 0, 10000, 10000)); } else if( bLeftRulerChange && ( aButtonUpPt.X() / HMM_PER_TWIPS > nWidth - aLRItem.GetRight() - aOffset.X() / HMM_PER_TWIPS ) ) { bMoveRulerAction = false; - Invalidate(Rectangle(0, 0, 10000, 10000)); + Invalidate(tools::Rectangle(0, 0, 10000, 10000)); } else if( bRightRulerChange && ( aButtonUpPt.X() / HMM_PER_TWIPS < aLRItem.GetLeft() - aOffset.X() / HMM_PER_TWIPS ) ) { bMoveRulerAction = false; - Invalidate(Rectangle(0, 0, 10000, 10000)); + Invalidate(tools::Rectangle(0, 0, 10000, 10000)); } else if( aButtonDownPt.X() == aButtonUpPt.X() ) { @@ -1130,7 +1130,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) aPrintFunc.UpdatePages(); } - Rectangle aRect(0,0,10000,10000); + tools::Rectangle aRect(0,0,10000,10000); Invalidate(aRect); aModificator.SetDocumentModified(); bLeftRulerChange = false; @@ -1149,7 +1149,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) if( ( bTopRulerChange || bBottomRulerChange || bHeaderRulerChange || bFooterRulerChange ) && ( aButtonUpPt.Y() <= ( 0 - aOffset.Y() ) || aButtonUpPt.Y() > nHeight * HMM_PER_TWIPS -aOffset.Y() ) ) { bMoveRulerAction = false; - Invalidate(Rectangle(0, 0, 10000, 10000)); + Invalidate(tools::Rectangle(0, 0, 10000, 10000)); } else if( aButtonDownPt.Y() == aButtonUpPt.Y() ) { @@ -1232,7 +1232,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) aPrintFunc.UpdatePages(); } - Rectangle aRect(0, 0, 10000, 10000); + tools::Rectangle aRect(0, 0, 10000, 10000); Invalidate(aRect); aModificator.SetDocumentModified(); bTopRulerChange = false; @@ -1289,7 +1289,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) ScPrintFunc aPrintFunc( this, pDocShell, nTab ); aPrintFunc.UpdatePages(); } - Rectangle aRect(0, 0, 10000, 10000); + tools::Rectangle aRect(0, 0, 10000, 10000); Invalidate(aRect); } bColRulerMove = false; @@ -1567,12 +1567,12 @@ void ScPreview::DrawInvert( long nDragPos, PointerStyle nFlags ) long nWidth = (long) lcl_GetDocPageSize( &pDocShell->GetDocument(), nTab ).Width(); if( nFlags == PointerStyle::HSizeBar || nFlags == PointerStyle::HSplit ) { - Rectangle aRect( nDragPos, -aOffset.Y(), nDragPos + 1,(long)( ( nHeight * HMM_PER_TWIPS ) - aOffset.Y())); + tools::Rectangle aRect( nDragPos, -aOffset.Y(), nDragPos + 1,(long)( ( nHeight * HMM_PER_TWIPS ) - aOffset.Y())); Invert( aRect, InvertFlags::N50 ); } else if( nFlags == PointerStyle::VSizeBar ) { - Rectangle aRect( -aOffset.X(), nDragPos,(long)( ( nWidth * HMM_PER_TWIPS ) - aOffset.X() ), nDragPos + 1 ); + tools::Rectangle aRect( -aOffset.X(), nDragPos,(long)( ( nWidth * HMM_PER_TWIPS ) - aOffset.X() ), nDragPos + 1 ); Invert( aRect, InvertFlags::N50 ); } } diff --git a/sc/source/ui/view/prevloc.cxx b/sc/source/ui/view/prevloc.cxx index 2a562262997c..4c9f6ed18450 100644 --- a/sc/source/ui/view/prevloc.cxx +++ b/sc/source/ui/view/prevloc.cxx @@ -40,12 +40,12 @@ enum ScPreviewLocationType struct ScPreviewLocationEntry { ScPreviewLocationType eType; - Rectangle aPixelRect; + tools::Rectangle aPixelRect; ScRange aCellRange; bool bRepeatCol; bool bRepeatRow; - ScPreviewLocationEntry( ScPreviewLocationType eNewType, const Rectangle& rPixel, const ScRange& rRange, + ScPreviewLocationEntry( ScPreviewLocationType eNewType, const tools::Rectangle& rPixel, const ScRange& rRange, bool bRepCol, bool bRepRow ) : eType( eNewType ), aPixelRect( rPixel ), @@ -90,7 +90,7 @@ void ScPreviewTableInfo::SetRowInfo( SCROW nCount, ScPreviewColRowInfo* pNewInfo nRows = nCount; } -void ScPreviewTableInfo::LimitToArea( const Rectangle& rPixelArea ) +void ScPreviewTableInfo::LimitToArea( const tools::Rectangle& rPixelArea ) { if ( pColInfo ) { @@ -177,10 +177,10 @@ void ScPreviewLocationData::Clear() nDrawRanges = 0; } -void ScPreviewLocationData::AddCellRange( const Rectangle& rRect, const ScRange& rRange, bool bRepCol, bool bRepRow, +void ScPreviewLocationData::AddCellRange( const tools::Rectangle& rRect, const ScRange& rRange, bool bRepCol, bool bRepRow, const MapMode& rDrawMap ) { - Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); + tools::Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); m_Entries.push_front( o3tl::make_unique<ScPreviewLocationEntry>(SC_PLOC_CELLRANGE, aPixelRect, rRange, bRepCol, bRepRow) ); OSL_ENSURE( nDrawRanges < SC_PREVIEW_MAXRANGES, "too many ranges" ); @@ -209,28 +209,28 @@ void ScPreviewLocationData::AddCellRange( const Rectangle& rRect, const ScRange& } } -void ScPreviewLocationData::AddColHeaders( const Rectangle& rRect, SCCOL nStartCol, SCCOL nEndCol, bool bRepCol ) +void ScPreviewLocationData::AddColHeaders( const tools::Rectangle& rRect, SCCOL nStartCol, SCCOL nEndCol, bool bRepCol ) { SCTAB nTab = 0; //! ? ScRange aRange( nStartCol, 0, nTab, nEndCol, 0, nTab ); - Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); + tools::Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); m_Entries.push_front( o3tl::make_unique<ScPreviewLocationEntry>(SC_PLOC_COLHEADER, aPixelRect, aRange, bRepCol, false) ); } -void ScPreviewLocationData::AddRowHeaders( const Rectangle& rRect, SCROW nStartRow, SCROW nEndRow, bool bRepRow ) +void ScPreviewLocationData::AddRowHeaders( const tools::Rectangle& rRect, SCROW nStartRow, SCROW nEndRow, bool bRepRow ) { SCTAB nTab = 0; //! ? ScRange aRange( 0, nStartRow, nTab, 0, nEndRow, nTab ); - Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); + tools::Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); m_Entries.push_front( o3tl::make_unique<ScPreviewLocationEntry>(SC_PLOC_ROWHEADER, aPixelRect, aRange, false, bRepRow) ); } -void ScPreviewLocationData::AddHeaderFooter( const Rectangle& rRect, bool bHeader, bool bLeft ) +void ScPreviewLocationData::AddHeaderFooter( const tools::Rectangle& rRect, bool bHeader, bool bLeft ) { ScRange aRange; //! ? - Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); + tools::Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); ScPreviewLocationType eType = bHeader ? ( bLeft ? SC_PLOC_LEFTHEADER : SC_PLOC_RIGHTHEADER ) : @@ -239,23 +239,23 @@ void ScPreviewLocationData::AddHeaderFooter( const Rectangle& rRect, bool bHeade m_Entries.push_front( o3tl::make_unique<ScPreviewLocationEntry>(eType, aPixelRect, aRange, false, false) ); } -void ScPreviewLocationData::AddNoteMark( const Rectangle& rRect, const ScAddress& rPos ) +void ScPreviewLocationData::AddNoteMark( const tools::Rectangle& rRect, const ScAddress& rPos ) { ScRange aRange( rPos ); - Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); + tools::Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); m_Entries.push_front( o3tl::make_unique<ScPreviewLocationEntry>(SC_PLOC_NOTEMARK, aPixelRect, aRange, false, false) ); } -void ScPreviewLocationData::AddNoteText( const Rectangle& rRect, const ScAddress& rPos ) +void ScPreviewLocationData::AddNoteText( const tools::Rectangle& rRect, const ScAddress& rPos ) { ScRange aRange( rPos ); - Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); + tools::Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); m_Entries.push_front( o3tl::make_unique<ScPreviewLocationEntry>(SC_PLOC_NOTETEXT, aPixelRect, aRange, false, false) ); } -void ScPreviewLocationData::GetDrawRange( sal_uInt16 nPos, Rectangle& rPixelRect, MapMode& rMapMode, sal_uInt8& rRangeId ) const +void ScPreviewLocationData::GetDrawRange( sal_uInt16 nPos, tools::Rectangle& rPixelRect, MapMode& rMapMode, sal_uInt8& rRangeId ) const { OSL_ENSURE( nPos < nDrawRanges, "wrong position" ); if ( nPos < nDrawRanges ) @@ -279,7 +279,7 @@ static ScPreviewLocationEntry* lcl_GetEntryByAddress( return nullptr; } -Rectangle ScPreviewLocationData::GetOffsetPixel( const ScAddress& rCellPos, const ScRange& rRange ) const +tools::Rectangle ScPreviewLocationData::GetOffsetPixel( const ScAddress& rCellPos, const ScRange& rRange ) const { const double nScaleX = HMM_PER_TWIPS; const double nScaleY = HMM_PER_TWIPS; @@ -305,23 +305,23 @@ Rectangle ScPreviewLocationData::GetOffsetPixel( const ScAddress& rCellPos, cons Size aOffsetPixel = pWindow->LogicToPixel( aOffsetLogic, aCellMapMode ); Size aSizePixel = pWindow->LogicToPixel( aSizeLogic, aCellMapMode ); - return Rectangle( Point( aOffsetPixel.Width(), aOffsetPixel.Height() ), aSizePixel ); + return tools::Rectangle( Point( aOffsetPixel.Width(), aOffsetPixel.Height() ), aSizePixel ); } -void ScPreviewLocationData::GetCellPosition( const ScAddress& rCellPos, Rectangle& rCellRect ) const +void ScPreviewLocationData::GetCellPosition( const ScAddress& rCellPos, tools::Rectangle& rCellRect ) const { ScPreviewLocationEntry* pEntry = lcl_GetEntryByAddress( m_Entries, rCellPos, SC_PLOC_CELLRANGE ); if ( pEntry ) { - Rectangle aOffsetRect = GetOffsetPixel( rCellPos, pEntry->aCellRange ); - rCellRect = Rectangle( aOffsetRect.Left() + pEntry->aPixelRect.Left(), + tools::Rectangle aOffsetRect = GetOffsetPixel( rCellPos, pEntry->aCellRange ); + rCellRect = tools::Rectangle( aOffsetRect.Left() + pEntry->aPixelRect.Left(), aOffsetRect.Top() + pEntry->aPixelRect.Top(), aOffsetRect.Right() + pEntry->aPixelRect.Left(), aOffsetRect.Bottom() + pEntry->aPixelRect.Top() ); } } -bool ScPreviewLocationData::HasCellsInRange( const Rectangle& rVisiblePixel ) const +bool ScPreviewLocationData::HasCellsInRange( const tools::Rectangle& rVisiblePixel ) const { for (auto const& it : m_Entries) { @@ -333,7 +333,7 @@ bool ScPreviewLocationData::HasCellsInRange( const Rectangle& rVisiblePixel ) co return false; } -bool ScPreviewLocationData::GetHeaderPosition( Rectangle& rRect ) const +bool ScPreviewLocationData::GetHeaderPosition( tools::Rectangle& rRect ) const { for (auto const& it : m_Entries) { @@ -347,7 +347,7 @@ bool ScPreviewLocationData::GetHeaderPosition( Rectangle& rRect ) const return false; } -bool ScPreviewLocationData::GetFooterPosition( Rectangle& rRect ) const +bool ScPreviewLocationData::GetFooterPosition( tools::Rectangle& rRect ) const { for (auto const& it : m_Entries) { @@ -389,7 +389,7 @@ bool ScPreviewLocationData::IsFooterLeft() const return false; } -long ScPreviewLocationData::GetNoteCountInRange( const Rectangle& rVisiblePixel, bool bNoteMarks ) const +long ScPreviewLocationData::GetNoteCountInRange( const tools::Rectangle& rVisiblePixel, bool bNoteMarks ) const { ScPreviewLocationType eType = bNoteMarks ? SC_PLOC_NOTEMARK : SC_PLOC_NOTETEXT; @@ -403,8 +403,8 @@ long ScPreviewLocationData::GetNoteCountInRange( const Rectangle& rVisiblePixel, return nRet; } -bool ScPreviewLocationData::GetNoteInRange( const Rectangle& rVisiblePixel, long nIndex, bool bNoteMarks, - ScAddress& rCellPos, Rectangle& rNoteRect ) const +bool ScPreviewLocationData::GetNoteInRange( const tools::Rectangle& rVisiblePixel, long nIndex, bool bNoteMarks, + ScAddress& rCellPos, tools::Rectangle& rNoteRect ) const { ScPreviewLocationType eType = bNoteMarks ? SC_PLOC_NOTEMARK : SC_PLOC_NOTETEXT; @@ -426,7 +426,7 @@ bool ScPreviewLocationData::GetNoteInRange( const Rectangle& rVisiblePixel, long return false; } -Rectangle ScPreviewLocationData::GetNoteInRangeOutputRect(const Rectangle& rVisiblePixel, bool bNoteMarks, const ScAddress& aCellPos) const +tools::Rectangle ScPreviewLocationData::GetNoteInRangeOutputRect(const tools::Rectangle& rVisiblePixel, bool bNoteMarks, const ScAddress& aCellPos) const { ScPreviewLocationType eType = bNoteMarks ? SC_PLOC_NOTEMARK : SC_PLOC_NOTETEXT; @@ -441,10 +441,10 @@ Rectangle ScPreviewLocationData::GetNoteInRangeOutputRect(const Rectangle& rVisi } } - return Rectangle(); + return tools::Rectangle(); } -void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPreviewTableInfo& rInfo ) const +void ScPreviewLocationData::GetTableInfo( const tools::Rectangle& rVisiblePixel, ScPreviewTableInfo& rInfo ) const { const double nScaleX = HMM_PER_TWIPS; const double nScaleY = HMM_PER_TWIPS; @@ -467,7 +467,7 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev SCROW nMainRowStart = 0; SCROW nMainRowEnd = 0; - Rectangle aHeaderRect, aRepeatRect, aMainRect; + tools::Rectangle aHeaderRect, aRepeatRect, aMainRect; SCTAB nTab = 0; for (auto const& it : m_Entries) @@ -665,11 +665,11 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev rInfo.LimitToArea( rVisiblePixel ); } -Rectangle ScPreviewLocationData::GetHeaderCellOutputRect(const Rectangle& rVisRect, const ScAddress& rCellPos, bool bColHeader) const +tools::Rectangle ScPreviewLocationData::GetHeaderCellOutputRect(const tools::Rectangle& rVisRect, const ScAddress& rCellPos, bool bColHeader) const { // first a stupid implementation // NN says here should be done more - Rectangle aClipRect; + tools::Rectangle aClipRect; ScPreviewTableInfo aTableInfo; GetTableInfo( rVisRect, aTableInfo ); @@ -687,23 +687,23 @@ Rectangle ScPreviewLocationData::GetHeaderCellOutputRect(const Rectangle& rVisRe const ScPreviewColRowInfo& rRowInfo = aTableInfo.GetRowInfo()[nRow]; if ( rColInfo.bIsHeader || rRowInfo.bIsHeader ) - aClipRect = Rectangle( rColInfo.nPixelStart, rRowInfo.nPixelStart, rColInfo.nPixelEnd, rRowInfo.nPixelEnd ); + aClipRect = tools::Rectangle( rColInfo.nPixelStart, rRowInfo.nPixelStart, rColInfo.nPixelEnd, rRowInfo.nPixelEnd ); } return aClipRect; } -Rectangle ScPreviewLocationData::GetCellOutputRect(const ScAddress& rCellPos) const +tools::Rectangle ScPreviewLocationData::GetCellOutputRect(const ScAddress& rCellPos) const { // first a stupid implementation // NN says here should be done more - Rectangle aRect; + tools::Rectangle aRect; GetCellPosition(rCellPos, aRect); return aRect; } // GetMainCellRange is used for links in PDF export -bool ScPreviewLocationData::GetMainCellRange( ScRange& rRange, Rectangle& rPixRect ) const +bool ScPreviewLocationData::GetMainCellRange( ScRange& rRange, tools::Rectangle& rPixRect ) const { for (auto const& it : m_Entries) { diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index 6f6465da4f34..810e60c5fc55 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -440,7 +440,7 @@ IMPL_LINK( ScPreviewShell, ScrollHandler, ScrollBar*, pScroll, void ) Point aMousePos = pScroll->OutputToNormalizedScreenPixel( pScroll->GetPointerPosPixel() ); Point aPos = pScroll->GetParent()->OutputToNormalizedScreenPixel( pScroll->GetPosPixel() ); OUString aHelpStr; - Rectangle aRect; + tools::Rectangle aRect; QuickHelpFlags nAlign; if( nDelta < 0 ) diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx index 35bde37f9074..6a9b4a35a2f9 100644 --- a/sc/source/ui/view/printfun.cxx +++ b/sc/source/ui/view/printfun.cxx @@ -409,7 +409,7 @@ static void lcl_HidePrint( ScTableInfo& rTabInfo, SCCOL nX1, SCCOL nX2 ) // - Preview of templates void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPrintFactor */, - const Rectangle& rBound, ScViewData* pViewData, bool bMetaFile ) + const tools::Rectangle& rBound, ScViewData* pViewData, bool bMetaFile ) { //! evaluate nPrintFactor !!! @@ -437,10 +437,10 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr MapMode aMode = pDev->GetMapMode(); - Rectangle aRect = rBound; + tools::Rectangle aRect = rBound; if (aRect.Right() < aRect.Left() || aRect.Bottom() < aRect.Top()) - aRect = Rectangle( Point(), pDev->GetOutputSize() ); + aRect = tools::Rectangle( Point(), pDev->GetOutputSize() ); SCCOL nX1 = 0; SCROW nY1 = 0; @@ -475,7 +475,7 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr long nDevSizeX = aRect.Right()-aRect.Left()+1; long nDevSizeY = aRect.Bottom()-aRect.Top()+1; - Rectangle aLines; + tools::Rectangle aLines; ScRange aRange( nX1,nY1,nTab, nX2,nY2,nTab ); long nTwipsSizeX = 0; @@ -1085,7 +1085,7 @@ void ScPrintFunc::SetDateTime( const Date& rDate, const tools::Time& rTime ) } static void lcl_DrawGraphic( const Graphic &rGraphic, vcl::RenderContext *pOut, - const Rectangle &rGrf, const Rectangle &rOut ) + const tools::Rectangle &rGrf, const tools::Rectangle &rOut ) { const bool bNotInside = !rOut.IsInside( rGrf ); if ( bNotInside ) @@ -1101,7 +1101,7 @@ static void lcl_DrawGraphic( const Graphic &rGraphic, vcl::RenderContext *pOut, } static void lcl_DrawGraphic( const SvxBrushItem &rBrush, vcl::RenderContext *pOut, OutputDevice* pRefDev, - const Rectangle &rOrg, const Rectangle &rOut, + const tools::Rectangle &rOrg, const tools::Rectangle &rOut, OUString const & referer ) { Size aGrfSize(0,0); @@ -1216,7 +1216,7 @@ static void lcl_DrawGraphic( const SvxBrushItem &rBrush, vcl::RenderContext *pOu default: OSL_ENSURE( !pOut, "new Graphic position?" ); } - Rectangle aGrf( aPos,aDrawSize ); + tools::Rectangle aGrf( aPos,aDrawSize ); if ( bDraw && aGrf.IsOver( rOut ) ) { lcl_DrawGraphic( *pGraphic, pOut, aGrf, rOut ); @@ -1252,7 +1252,7 @@ void ScPrintFunc::DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH, nTop += (long) ( pShadow->CalcShadowSpace(SvxShadowItemSide::TOP) * nScaleY ); nBottom += (long) ( pShadow->CalcShadowSpace(SvxShadowItemSide::BOTTOM) * nScaleY ); } - Rectangle aFrameRect( Point(nScrX+nLeft, nScrY+nTop), + tools::Rectangle aFrameRect( Point(nScrX+nLeft, nScrY+nTop), Size(nScrW-nLeft-nRight, nScrH-nTop-nBottom) ); // center of frame, to paint lines through OutputData @@ -1300,34 +1300,34 @@ void ScPrintFunc::DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH, switch (pShadow->GetLocation()) { case SvxShadowLocation::TopLeft: - pDev->DrawRect( Rectangle( + pDev->DrawRect( tools::Rectangle( aFrameRect.Left()-nShadowX, aFrameRect.Top()-nShadowY, aFrameRect.Right()-nShadowX, aFrameRect.Top() ) ); - pDev->DrawRect( Rectangle( + pDev->DrawRect( tools::Rectangle( aFrameRect.Left()-nShadowX, aFrameRect.Top()-nShadowY, aFrameRect.Left(), aFrameRect.Bottom()-nShadowY ) ); break; case SvxShadowLocation::TopRight: - pDev->DrawRect( Rectangle( + pDev->DrawRect( tools::Rectangle( aFrameRect.Left()+nShadowX, aFrameRect.Top()-nShadowY, aFrameRect.Right()+nShadowX, aFrameRect.Top() ) ); - pDev->DrawRect( Rectangle( + pDev->DrawRect( tools::Rectangle( aFrameRect.Right(), aFrameRect.Top()-nShadowY, aFrameRect.Right()+nShadowX, aFrameRect.Bottom()-nShadowY ) ); break; case SvxShadowLocation::BottomLeft: - pDev->DrawRect( Rectangle( + pDev->DrawRect( tools::Rectangle( aFrameRect.Left()-nShadowX, aFrameRect.Bottom(), aFrameRect.Right()-nShadowX, aFrameRect.Bottom()+nShadowY ) ); - pDev->DrawRect( Rectangle( + pDev->DrawRect( tools::Rectangle( aFrameRect.Left()-nShadowX, aFrameRect.Top()+nShadowY, aFrameRect.Left(), aFrameRect.Bottom()+nShadowY ) ); break; case SvxShadowLocation::BottomRight: - pDev->DrawRect( Rectangle( + pDev->DrawRect( tools::Rectangle( aFrameRect.Left()+nShadowX, aFrameRect.Bottom(), aFrameRect.Right()+nShadowX, aFrameRect.Bottom()+nShadowY ) ); - pDev->DrawRect( Rectangle( + pDev->DrawRect( tools::Rectangle( aFrameRect.Right(), aFrameRect.Top()+nShadowY, aFrameRect.Right()+nShadowX, aFrameRect.Bottom()+nShadowY ) ); break; @@ -1395,7 +1395,7 @@ void ScPrintFunc::PrintColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY ) long nWidth = (long) (nDocW * nScaleX); long nEndX = nPosX + nWidth * nLayoutSign; - pDev->DrawRect( Rectangle( nPosX,nPosY,nEndX,nEndY ) ); + pDev->DrawRect( tools::Rectangle( nPosX,nPosY,nEndX,nEndY ) ); aText = ::ScColToAlpha( nCol); long nTextWidth = pDev->GetTextWidth(aText); @@ -1439,7 +1439,7 @@ void ScPrintFunc::PrintRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY ) long nHeight = (long) (nDocH * nScaleY); long nEndY = nPosY + nHeight; - pDev->DrawRect( Rectangle( nPosX,nPosY,nEndX,nEndY ) ); + pDev->DrawRect( tools::Rectangle( nPosX,nPosY,nEndX,nEndY ) ); aText = OUString::number( nRow+1 ); long nTextWidth = pDev->GetTextWidth(aText); @@ -1470,7 +1470,7 @@ void ScPrintFunc::LocateColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY, if (nDocW) nPosX += (long) (nDocW * nScaleX); } - Rectangle aCellRect( nScrX, nScrY, nPosX, nEndY ); + tools::Rectangle aCellRect( nScrX, nScrY, nPosX, nEndY ); rLocationData.AddColHeaders( aCellRect, nX1, nX2, bRepCol ); } @@ -1490,7 +1490,7 @@ void ScPrintFunc::LocateRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY, long nPosY = nScrY - nOneY; nPosY += pDoc->GetScaledRowHeight( nY1, nY2, nPrintTab, nScaleY); - Rectangle aCellRect( nScrX, nScrY, nEndX, nPosY ); + tools::Rectangle aCellRect( nScrX, nScrY, nEndX, nPosY ); rLocationData.AddRowHeaders( aCellRect, nY1, nY2, bRepRow ); } @@ -1532,7 +1532,7 @@ void ScPrintFunc::LocateArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, long nPosY = nScrY - nOneY; nPosY += pDoc->GetScaledRowHeight( nY1, nY2, nPrintTab, nScaleY); - Rectangle aCellRect( nScrX, nScrY, nPosX, nPosY ); + tools::Rectangle aCellRect( nScrX, nScrY, nPosX, nPosY ); rLocationData.AddCellRange( aCellRect, ScRange( nX1,nY1,nPrintTab, nX2,nY2,nPrintTab ), bRepCol, bRepRow, aDrawMapMode ); } @@ -1615,7 +1615,7 @@ void ScPrintFunc::PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, if( aTableParam.bCellContent ) aOutputData.DrawBackground(*pDev); - pDev->SetClipRegion(vcl::Region(Rectangle( + pDev->SetClipRegion(vcl::Region(tools::Rectangle( aPos, Size(aOutputData.GetScrW(), aOutputData.GetScrH())))); pDev->SetClipRegion(); @@ -1794,7 +1794,7 @@ void ScPrintFunc::PrintHF( long nPageNo, bool bHeader, long nStartY, // Clipping for Text - pDev->SetClipRegion(vcl::Region(Rectangle(aStart, aPaperSize))); + pDev->SetClipRegion(vcl::Region(tools::Rectangle(aStart, aPaperSize))); // left @@ -1843,7 +1843,7 @@ void ScPrintFunc::PrintHF( long nPageNo, bool bHeader, long nStartY, if ( pLocationData ) { - Rectangle aHeaderRect( aBorderStart, aBorderSize ); + tools::Rectangle aHeaderRect( aBorderStart, aBorderSize ); pLocationData->AddHeaderFooter( aHeaderRect, bHeader, bLeft ); } } @@ -1904,9 +1904,9 @@ long ScPrintFunc::DoNotes( long nNoteStart, bool bDoPrint, ScPreviewLocationData if ( pLocationData ) { - Rectangle aTextRect( Point( nPosX, nPosY ), Size( aDataSize.Width(), nTextHeight ) ); + tools::Rectangle aTextRect( Point( nPosX, nPosY ), Size( aDataSize.Width(), nTextHeight ) ); pLocationData->AddNoteText( aTextRect, rPos ); - Rectangle aMarkRect( Point( aPageRect.Left(), nPosY ), Size( nMarkLen, nTextHeight ) ); + tools::Rectangle aMarkRect( Point( aPageRect.Left(), nPosY ), Size( nMarkLen, nTextHeight ) ); pLocationData->AddNoteMark( aMarkRect, rPos ); } @@ -1939,14 +1939,14 @@ long ScPrintFunc::PrintNotes( long nPageNo, long nNoteStart, bool bDoPrint, ScPr pDev->SetMapMode(aOffsetMode); pDev->SetLineColor(); pDev->SetFillColor(aBackgroundColor); - pDev->DrawRect(Rectangle(Point(), + pDev->DrawRect(tools::Rectangle(Point(), Size((long)(aPageSize.Width() * nScaleX * 100 / nZoom), (long)(aPageSize.Height() * nScaleY * 100 / nZoom)))); } // adjust aPageRect for left/right page - Rectangle aTempRect = Rectangle( Point(), aPageSize ); + tools::Rectangle aTempRect = tools::Rectangle( Point(), aPageSize ); if (IsMirror(nPageNo)) { aPageRect.Left() = ( aTempRect.Left() + nRightMargin ) * 100 / nZoom; @@ -2008,14 +2008,14 @@ void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCRO pDev->SetMapMode(aOffsetMode); pDev->SetLineColor(); pDev->SetFillColor(aBackgroundColor); - pDev->DrawRect(Rectangle(Point(), + pDev->DrawRect(tools::Rectangle(Point(), Size((long)(aPageSize.Width() * nScaleX * 100 / nZoom), (long)(aPageSize.Height() * nScaleY * 100 / nZoom)))); } // adjust aPageRect for left/right page - Rectangle aTempRect = Rectangle( Point(), aPageSize ); + tools::Rectangle aTempRect = tools::Rectangle( Point(), aPageSize ); if (IsMirror(nPageNo)) { aPageRect.Left() = ( aTempRect.Left() + nRightMargin ) * 100 / nZoom; @@ -2322,7 +2322,7 @@ void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCRO pDev->SetMapMode(aOffsetMode); pDev->SetLineColor( aGridColor ); pDev->SetFillColor(); - pDev->DrawRect( Rectangle( nLeftX, nTopY, nRightX, nBottomY ) ); + pDev->DrawRect( tools::Rectangle( nLeftX, nTopY, nRightX, nBottomY ) ); // nEndX/Y without frame-adaption } @@ -2905,7 +2905,7 @@ Size ScPrintFunc::GetDocPageSize() // Page size in Document-Twips // Calculating Left / Right also in PrintPage - aPageRect = Rectangle( Point(), aPageSize ); + aPageRect = tools::Rectangle( Point(), aPageSize ); aPageRect.Left() = ( aPageRect.Left() + nLeftMargin ) * 100 / nZoom; aPageRect.Right() = ( aPageRect.Right() - nRightMargin ) * 100 / nZoom; aPageRect.Top() = ( aPageRect.Top() + nTopMargin ) * 100 / nZoom + aHdr.nHeight; @@ -2953,7 +2953,7 @@ static void lcl_SetHidden( ScDocument* pDoc, SCTAB nPrintTab, ScPageRowEntry& rP bool bLeftIsEmpty = false; ScRange aTempRange; - Rectangle aTempRect = pDoc->GetMMRect( 0,0, 0,0, 0 ); + tools::Rectangle aTempRect = pDoc->GetMMRect( 0,0, 0,0, 0 ); for (size_t i=0; i<nPagesX; i++) { diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx index 014bd6371450..8fd89540a1ff 100644 --- a/sc/source/ui/view/select.cxx +++ b/sc/source/ui/view/select.cxx @@ -64,7 +64,7 @@ sal_uLong ScViewFunctionSet::CalcUpdateInterval( const Size& rWinSize, const Poi { sal_uLong nUpdateInterval = SELENG_AUTOREPEAT_INTERVAL_MAX; vcl::Window* pWin = pEngine->GetWindow(); - Rectangle aScrRect = pWin->GetDesktopRectPixel(); + tools::Rectangle aScrRect = pWin->GetDesktopRectPixel(); Point aRootPos = pWin->OutputToAbsoluteScreenPixel(Point(0,0)); if (bRightScroll) { @@ -318,7 +318,7 @@ bool ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, bool /* bDon pViewData->GetPosFromPixel( aEffPos.X(), aEffPos.Y(), GetWhich(), nPosX, nPosY, true, true ); // with Repair - Rectangle aEditArea = pViewData->GetEditArea(GetWhich(), nPosX, nPosY, + tools::Rectangle aEditArea = pViewData->GetEditArea(GetWhich(), nPosX, nPosY, pEngine->GetWindow(), nullptr, false); diff --git a/sc/source/ui/view/spelldialog.cxx b/sc/source/ui/view/spelldialog.cxx index b01c9de1158b..96d00dcc3935 100644 --- a/sc/source/ui/view/spelldialog.cxx +++ b/sc/source/ui/view/spelldialog.cxx @@ -245,7 +245,7 @@ void ScSpellDialogChildWindow::Init() mpViewShell->MakeEditView( mxEngine.get(), nCol, nRow ); EditView* pEditView = mpViewData->GetEditView( mpViewData->GetActivePart() ); mpViewData->SetSpellingView( pEditView ); - Rectangle aRect( Point( 0, 0 ), Point( 0, 0 ) ); + tools::Rectangle aRect( Point( 0, 0 ), Point( 0, 0 ) ); pEditView->SetOutputArea( aRect ); mxEngine->SetControlWord( EEControlBits::USECHARATTRIBS ); mxEngine->EnableUndo( false ); diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx index c492df811bd3..c6aa46fb4a97 100644 --- a/sc/source/ui/view/tabcont.cxx +++ b/sc/source/ui/view/tabcont.cxx @@ -461,7 +461,7 @@ void ScTabControl::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel ) if (!bDisable) { - vcl::Region aRegion( Rectangle(0,0,0,0) ); + vcl::Region aRegion( tools::Rectangle(0,0,0,0) ); CommandEvent aCEvt( rPosPixel, CommandEventId::StartDrag, true ); // needed for StartDrag if (TabBar::StartDrag( aCEvt, aRegion )) DoDrag( aRegion ); @@ -644,7 +644,7 @@ void ScTabControl::Mirror() TabBar::Mirror(); if( nSelPageIdByMouse != TabBar::PAGE_NOT_FOUND ) { - Rectangle aRect( GetPageRect( GetCurPageId() ) ); + tools::Rectangle aRect( GetPageRect( GetCurPageId() ) ); if( !aRect.IsEmpty() ) SetPointerPosPixel( aRect.Center() ); nSelPageIdByMouse = TabBar::PAGE_NOT_FOUND; // only once after a Select() diff --git a/sc/source/ui/view/tabsplit.cxx b/sc/source/ui/view/tabsplit.cxx index 2ba86b514965..b242a90557cc 100644 --- a/sc/source/ui/view/tabsplit.cxx +++ b/sc/source/ui/view/tabsplit.cxx @@ -54,7 +54,7 @@ void ScTabSplitter::SetFixed(bool bSet) SetPointer(PointerStyle::VSplit); } -void ScTabSplitter::Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) +void ScTabSplitter::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) { rRenderContext.Push(PushFlags::FILLCOLOR | PushFlags::LINECOLOR); const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); @@ -67,7 +67,7 @@ void ScTabSplitter::Paint( vcl::RenderContext& rRenderContext, const Rectangle& { rRenderContext.SetLineColor(rStyleSettings.GetShadowColor()); rRenderContext.SetFillColor(rStyleSettings.GetShadowColor()); - rRenderContext.DrawRect(Rectangle(rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom())); + rRenderContext.DrawRect(tools::Rectangle(rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom())); // Draw handle rRenderContext.SetLineColor(Color(COL_BLACK)); @@ -76,14 +76,14 @@ void ScTabSplitter::Paint( vcl::RenderContext& rRenderContext, const Rectangle& const long h4 = rRect.GetHeight() / 4; // First xc fraction is truncated, second one is rounded. This will draw a centered line // in handlers with odd width and a centered rectangle in those with even width. - rRenderContext.DrawRect(Rectangle(Point(xc / 2, rRect.Top() + h4), + rRenderContext.DrawRect(tools::Rectangle(Point(xc / 2, rRect.Top() + h4), Point((xc + 1) / 2, rRect.Bottom() - h4))); break; } case SC_SPLIT_NORMAL: rRenderContext.SetLineColor(rStyleSettings.GetShadowColor()); rRenderContext.SetFillColor(rStyleSettings.GetShadowColor()); - rRenderContext.DrawRect(Rectangle(rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom())); + rRenderContext.DrawRect(tools::Rectangle(rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom())); break; case SC_SPLIT_FIX: // Nothing to draw @@ -98,7 +98,7 @@ void ScTabSplitter::Paint( vcl::RenderContext& rRenderContext, const Rectangle& { rRenderContext.SetLineColor(rStyleSettings.GetShadowColor()); rRenderContext.SetFillColor(rStyleSettings.GetShadowColor()); - rRenderContext.DrawRect(Rectangle(rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom())); + rRenderContext.DrawRect(tools::Rectangle(rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom())); // Draw handle rRenderContext.SetLineColor(Color(COL_BLACK)); @@ -107,14 +107,14 @@ void ScTabSplitter::Paint( vcl::RenderContext& rRenderContext, const Rectangle& const long w4 = rRect.GetWidth() / 4; // First yc fraction is truncated, second one is rounded. This will draw a centered line // in handlers with odd height and a centered rectangle in those with even height. - DrawRect(Rectangle(Point(rRect.Left() + w4, yc / 2), + DrawRect(tools::Rectangle(Point(rRect.Left() + w4, yc / 2), Point(rRect.Right() - w4, (yc + 1) / 2))); break; } case SC_SPLIT_NORMAL: rRenderContext.SetLineColor(rStyleSettings.GetShadowColor()); rRenderContext.SetFillColor(rStyleSettings.GetShadowColor()); - rRenderContext.DrawRect(Rectangle(rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom())); + rRenderContext.DrawRect(tools::Rectangle(rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom())); break; case SC_SPLIT_FIX: // Nothing to draw diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index 117ffbaba80d..c4b50413736b 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -79,7 +79,7 @@ ScCornerButton::~ScCornerButton() { } -void ScCornerButton::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void ScCornerButton::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); SetBackground(rStyleSettings.GetFaceColor()); @@ -109,14 +109,14 @@ void ScCornerButton::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRenderContext.SetLineColor(); rRenderContext.SetFillColor(aCenter); - rRenderContext.DrawRect(Rectangle(nCenterX, nCenterY, nCenterX, nPosY)); - rRenderContext.DrawRect(Rectangle(nCenterX, nCenterY, nDarkX, nCenterY)); + rRenderContext.DrawRect(tools::Rectangle(nCenterX, nCenterY, nCenterX, nPosY)); + rRenderContext.DrawRect(tools::Rectangle(nCenterX, nCenterY, nDarkX, nCenterY)); rRenderContext.SetFillColor(aOuter); - rRenderContext.DrawRect(Rectangle(0, 0, nPosX, nCenterY - 1)); + rRenderContext.DrawRect(tools::Rectangle(0, 0, nPosX, nCenterY - 1)); if (bLayoutRTL) - rRenderContext.DrawRect(Rectangle(nCenterX + 1, nCenterY, nPosX, nPosY)); + rRenderContext.DrawRect(tools::Rectangle(nCenterX + 1, nCenterY, nPosX, nPosY)); else - rRenderContext.DrawRect(Rectangle(0, nCenterY, nCenterX - 1, nPosY)); + rRenderContext.DrawRect(tools::Rectangle(0, nCenterY, nCenterX - 1, nPosY)); } // both buttons have the same look now - only dark right/bottom lines @@ -533,10 +533,10 @@ void ScTabView::DoResize( const Point& rOffset, const Size& rSize, bool bInner ) // SetDragRectPixel also without Scrollbars etc., when already split if ( bHScroll || aViewData.GetHSplitMode() != SC_SPLIT_NONE ) pHSplitter->SetDragRectPixel( - Rectangle( nPosX, nPosY, nPosX+nSizeX, nPosY+nSizeY ), pFrameWin ); + tools::Rectangle( nPosX, nPosY, nPosX+nSizeX, nPosY+nSizeY ), pFrameWin ); if ( bVScroll || aViewData.GetVSplitMode() != SC_SPLIT_NONE ) pVSplitter->SetDragRectPixel( - Rectangle( nPosX, nPosY, nPosX+nSizeX, nPosY+nSizeY ), pFrameWin ); + tools::Rectangle( nPosX, nPosY, nPosX+nSizeX, nPosY+nSizeY ), pFrameWin ); if (bTabControl && ! bHScroll ) { @@ -1080,7 +1080,7 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll, void ) long nScrollPos = GetScrollBarPos( *pScroll ) + nScrollMin; OUString aHelpStr; - Rectangle aRect; + tools::Rectangle aRect; QuickHelpFlags nAlign; if (bHoriz) { @@ -1728,7 +1728,7 @@ Point ScTabView::GetChartInsertPos( const Size& rSize, const ScRange& rCellRange // get the visible rectangle in logic units MapMode aDrawMode = pWin->GetDrawMapMode(); - Rectangle aVisible( pWin->PixelToLogic( Rectangle( Point(0,0), pWin->GetOutputSizePixel() ), aDrawMode ) ); + tools::Rectangle aVisible( pWin->PixelToLogic( tools::Rectangle( Point(0,0), pWin->GetOutputSizePixel() ), aDrawMode ) ); ScDocument* pDoc = aViewData.GetDocument(); SCTAB nTab = aViewData.GetTabNo(); @@ -1749,7 +1749,7 @@ Point ScTabView::GetChartInsertPos( const Size& rSize, const ScRange& rCellRange // get the logic position of the selection - Rectangle aSelection = pDoc->GetMMRect( rCellRange.aStart.Col(), rCellRange.aStart.Row(), + tools::Rectangle aSelection = pDoc->GetMMRect( rCellRange.aStart.Col(), rCellRange.aStart.Row(), rCellRange.aEnd.Col(), rCellRange.aEnd.Row(), nTab ); long nLeftSpace = aSelection.Left() - aVisible.Left(); @@ -1803,7 +1803,7 @@ Point ScTabView::GetChartInsertPos( const Size& rSize, const ScRange& rCellRange // move the position if the object doesn't fit in the screen - Rectangle aCompareRect( aInsertPos, Size( nNeededWidth, nNeededHeight ) ); + tools::Rectangle aCompareRect( aInsertPos, Size( nNeededWidth, nNeededHeight ) ); if ( aCompareRect.Right() > aVisible.Right() ) aInsertPos.X() -= aCompareRect.Right() - aVisible.Right(); if ( aCompareRect.Bottom() > aVisible.Bottom() ) @@ -1823,7 +1823,7 @@ Point ScTabView::GetChartInsertPos( const Size& rSize, const ScRange& rCellRange return aInsertPos; } -Point ScTabView::GetChartDialogPos( const Size& rDialogSize, const Rectangle& rLogicChart ) +Point ScTabView::GetChartDialogPos( const Size& rDialogSize, const tools::Rectangle& rLogicChart ) { // rDialogSize must be in pixels, rLogicChart in 1/100 mm. Return value is in pixels. @@ -1841,11 +1841,11 @@ Point ScTabView::GetChartDialogPos( const Size& rDialogSize, const Rectangle& rL if (pWin) { MapMode aDrawMode = pWin->GetDrawMapMode(); - Rectangle aObjPixel = pWin->LogicToPixel( rLogicChart, aDrawMode ); - Rectangle aObjAbs( pWin->OutputToAbsoluteScreenPixel( aObjPixel.TopLeft() ), + tools::Rectangle aObjPixel = pWin->LogicToPixel( rLogicChart, aDrawMode ); + tools::Rectangle aObjAbs( pWin->OutputToAbsoluteScreenPixel( aObjPixel.TopLeft() ), pWin->OutputToAbsoluteScreenPixel( aObjPixel.BottomRight() ) ); - Rectangle aDesktop = pWin->GetDesktopRectPixel(); + tools::Rectangle aDesktop = pWin->GetDesktopRectPixel(); Size aSpace = pWin->LogicToPixel( Size( 8, 12 ), MapUnit::MapAppFont ); ScDocument* pDoc = aViewData.GetDocument(); @@ -2154,7 +2154,7 @@ void ScTabView::SetNewVisArea() vcl::Window* pActive = pGridWin[aViewData.GetActivePart()]; if (pActive) aViewData.GetViewShell()->VisAreaChanged( - pActive->PixelToLogic(Rectangle(Point(),pActive->GetOutputSizePixel())) ); + pActive->PixelToLogic(tools::Rectangle(Point(),pActive->GetOutputSizePixel())) ); if (pDrawView) pDrawView->VisAreaChanged(); // no window passed on -> for all windows @@ -2305,7 +2305,7 @@ void ScTabView::SetAutoSpellData( SCCOL nPosX, SCROW nPosY, const std::vector<ed } } -OUString ScTabView::getRowColumnHeaders(const Rectangle& rRectangle) +OUString ScTabView::getRowColumnHeaders(const tools::Rectangle& rRectangle) { ScDocument* pDoc = aViewData.GetDocument(); if (!pDoc) @@ -2395,7 +2395,7 @@ OUString ScTabView::getRowColumnHeaders(const Rectangle& rRectangle) // New area extended to the bottom of the sheet after last row // excluding overlapping area with aNewColArea - Rectangle aNewRowArea(0, aOldSize.getHeight(), aOldSize.getWidth(), aNewSize.getHeight()); + tools::Rectangle aNewRowArea(0, aOldSize.getHeight(), aOldSize.getWidth(), aNewSize.getHeight()); // Only invalidate if spreadsheet extended to the bottom if (aNewRowArea.getHeight()) @@ -2521,7 +2521,7 @@ OUString ScTabView::getRowColumnHeaders(const Rectangle& rRectangle) // New area extended to the right of the sheet after last column // including overlapping area with aNewRowArea - Rectangle aNewColArea(aOldSize.getWidth(), 0, aNewSize.getWidth(), aNewSize.getHeight()); + tools::Rectangle aNewColArea(aOldSize.getWidth(), 0, aNewSize.getWidth(), aNewSize.getHeight()); // Only invalidate if spreadsheet extended to the bottom if (aNewColArea.getWidth()) diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index 9c63bdb7d242..84c56659065e 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -389,10 +389,10 @@ void ScTabView::SetCursor( SCCOL nPosX, SCROW nPosY, bool bNew ) // New area extended to the right of the sheet after last column // including overlapping area with aNewRowArea - Rectangle aNewColArea(aOldSize.getWidth(), 0, aNewSize.getWidth(), aNewSize.getHeight()); + tools::Rectangle aNewColArea(aOldSize.getWidth(), 0, aNewSize.getWidth(), aNewSize.getHeight()); // New area extended to the bottom of the sheet after last row // excluding overlapping area with aNewColArea - Rectangle aNewRowArea(0, aOldSize.getHeight(), aOldSize.getWidth(), aNewSize.getHeight()); + tools::Rectangle aNewRowArea(0, aOldSize.getHeight(), aOldSize.getWidth(), aNewSize.getHeight()); // Only invalidate if spreadsheet extended to the right if (aNewColArea.getWidth()) @@ -903,7 +903,7 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode, if (pCare) { bool bLimit = false; - Rectangle aDlgPixel; + tools::Rectangle aDlgPixel; Size aWinSize; vcl::Window* pWin = GetActiveWin(); if (pWin) @@ -922,7 +922,7 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode, Point aStart = aViewData.GetScrPos( nCurX, nCurY, eAlign ); long nCSX, nCSY; aViewData.GetMergeSizePixel( nCurX, nCurY, nCSX, nCSY ); - Rectangle aCursor( aStart, Size( nCSX, nCSY ) ); + tools::Rectangle aCursor( aStart, Size( nCSX, nCSY ) ); if ( aCursor.IsOver( aDlgPixel ) ) bLimit = true; // cell is covered by the dialog } @@ -1873,7 +1873,7 @@ void ScTabView::SetTabNo( SCTAB nTab, bool bNew, bool bExtendSelection, bool bSa ScClient* pClient = static_cast<ScClient*>(aViewData.GetViewShell()->GetIPClient()); if ( pClient && pClient->IsObjectInPlaceActive() ) { - Rectangle aObjArea = pClient->GetObjArea(); + tools::Rectangle aObjArea = pClient->GetObjArea(); if ( nTab == aViewData.GetRefTabNo() ) { // move to its original position @@ -1881,7 +1881,7 @@ void ScTabView::SetTabNo( SCTAB nTab, bool bNew, bool bExtendSelection, bool bSa SdrOle2Obj* pDrawObj = pClient->GetDrawObj(); if ( pDrawObj ) { - Rectangle aRect = pDrawObj->GetLogicRect(); + tools::Rectangle aRect = pDrawObj->GetLogicRect(); MapMode aMapMode( MapUnit::Map100thMM ); Size aOleSize = pDrawObj->GetOrigObjSize( &aMapMode ); aRect.SetSize( aOleSize ); @@ -2090,7 +2090,7 @@ void ScTabView::KillEditView( bool bNoPaint ) SCROW nRow2 = aViewData.GetEditEndRow(); bool bPaint[4]; bool bNotifyAcc = false; - Rectangle aRectangle[4]; + tools::Rectangle aRectangle[4]; bool bExtended = nRow1 != nRow2; // column is painted to the end anyway @@ -2124,7 +2124,7 @@ void ScTabView::KillEditView( bool bNoPaint ) if (comphelper::LibreOfficeKit::isActive()) { - const Rectangle& rInvRect = aRectangle[i]; + const tools::Rectangle& rInvRect = aRectangle[i]; pGridWin[i]->Invalidate(rInvRect); // invalidate other views @@ -2317,7 +2317,7 @@ void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO } } - pGridWin[i]->Invalidate( pGridWin[i]->PixelToLogic( Rectangle( aStart,aEnd ) ) ); + pGridWin[i]->Invalidate( pGridWin[i]->PixelToLogic( tools::Rectangle( aStart,aEnd ) ) ); } // #i79909# Calling UpdateAllOverlays here isn't necessary and would lead to overlay calls from a timer, @@ -2560,7 +2560,7 @@ void ScTabView::PaintTopArea( SCCOL nStartCol, SCCOL nEndCol ) else nEndX = aViewData.GetScrPos( nEndCol+1, 0, eWhich ).X() - nLayoutSign; pColBar[eWhich]->Invalidate( - Rectangle( nStartX, 0, nEndX, aWinSize.Height()-1 ) ); + tools::Rectangle( nStartX, 0, nEndX, aWinSize.Height()-1 ) ); } if (pColOutline[eWhich]) pColOutline[eWhich]->Invalidate(); @@ -2612,7 +2612,7 @@ void ScTabView::PaintLeftArea( SCROW nStartRow, SCROW nEndRow ) else nEndY = aViewData.GetScrPos( 0, nEndRow+1, eWhich ).Y() - 1; pRowBar[eWhich]->Invalidate( - Rectangle( 0, nStartY, aWinSize.Width()-1, nEndY ) ); + tools::Rectangle( 0, nStartY, aWinSize.Width()-1, nEndY ) ); } if (pRowOutline[eWhich]) pRowOutline[eWhich]->Invalidate(); @@ -2773,7 +2773,7 @@ void ScTabView::ActivatePart( ScSplitPos eWhich ) pSelEngine->SetWindow(pGridWin[eWhich]); pSelEngine->SetWhich(eWhich); - pSelEngine->SetVisibleArea( Rectangle(Point(), pGridWin[eWhich]->GetOutputSizePixel()) ); + pSelEngine->SetVisibleArea( tools::Rectangle(Point(), pGridWin[eWhich]->GetOutputSizePixel()) ); pGridWin[eOld]->MoveMouseStatus(*pGridWin[eWhich]); @@ -2792,7 +2792,7 @@ void ScTabView::ActivatePart( ScSplitPos eWhich ) pColBar[eNewH]->SetIgnoreMove(false); pHdrSelEng->SetWindow( pColBar[eNewH] ); long nWidth = pColBar[eNewH]->GetOutputSizePixel().Width(); - pHdrSelEng->SetVisibleArea( Rectangle( 0, LONG_MIN, nWidth-1, LONG_MAX ) ); + pHdrSelEng->SetVisibleArea( tools::Rectangle( 0, LONG_MIN, nWidth-1, LONG_MAX ) ); pColBar[eNewH]->CaptureMouse(); } if ( bLeftCap && pRowBar[eNewV] ) @@ -2801,7 +2801,7 @@ void ScTabView::ActivatePart( ScSplitPos eWhich ) pRowBar[eNewV]->SetIgnoreMove(false); pHdrSelEng->SetWindow( pRowBar[eNewV] ); long nHeight = pRowBar[eNewV]->GetOutputSizePixel().Height(); - pHdrSelEng->SetVisibleArea( Rectangle( LONG_MIN, 0, LONG_MAX, nHeight-1 ) ); + pHdrSelEng->SetVisibleArea( tools::Rectangle( LONG_MIN, 0, LONG_MAX, nHeight-1 ) ); pRowBar[eNewV]->CaptureMouse(); } aHdrFunc.SetWhich(eWhich); diff --git a/sc/source/ui/view/tabview4.cxx b/sc/source/ui/view/tabview4.cxx index b93fab31f717..7cfb8ff8fc93 100644 --- a/sc/source/ui/view/tabview4.cxx +++ b/sc/source/ui/view/tabview4.cxx @@ -39,7 +39,7 @@ void ScTabView::HideTip() vcl::Window* pWin = pGridWin[eWhich]; Help::HidePopover(pWin, nTipVisible); nTipVisible = 0; - aTipRectangle = Rectangle(); + aTipRectangle = tools::Rectangle(); nTipAlign = QuickHelpFlags::NONE; sTipString.clear(); sTopParent.clear(); @@ -89,7 +89,7 @@ void ScTabView::ShowRefTip() nFlags = ( nFlags & ~QuickHelpFlags::Top ) | QuickHelpFlags::Bottom; } - Rectangle aRect( pWin->OutputToScreenPixel( aPos ), Size(1,1) ); + tools::Rectangle aRect( pWin->OutputToScreenPixel( aPos ), Size(1,1) ); // Test if changed. if (!nTipVisible || nFlags != nTipAlign || aRect != aTipRectangle || sTipString != aHelp || sTopParent != pWin) @@ -142,7 +142,7 @@ void ScTabView::StopRefMode() { pSelEngine->SetWindow( pGridWin[ eNew ] ); pSelEngine->SetWhich( eNew ); - pSelEngine->SetVisibleArea( Rectangle(Point(), + pSelEngine->SetVisibleArea( tools::Rectangle(Point(), pGridWin[eNew]->GetOutputSizePixel()) ); pGridWin[eOld]->MoveMouseStatus(*pGridWin[eNew]); } @@ -284,7 +284,7 @@ void ScTabView::UpdateRef( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ ) aPos.X() += 8; aPos.Y() += 4; aPos = pWin->OutputToScreenPixel( aPos ); - Rectangle aRect( aPos, aPos ); + tools::Rectangle aRect( aPos, aPos ); QuickHelpFlags nAlign = QuickHelpFlags::Left|QuickHelpFlags::Top; if (!nTipVisible || nAlign != nTipAlign || aRect != aTipRectangle || sTipString != aHelpStr || sTopParent != pWin) { @@ -460,7 +460,7 @@ void ScTabView::InvertHorizontal( ScVSplitPos eWhich, long nDragPos ) ScGridWindow* pWin = pGridWin[i].get(); if (pWin) { - Rectangle aRect( 0,nDragPos, pWin->GetOutputSizePixel().Width()-1,nDragPos+HDR_SLIDERSIZE-1 ); + tools::Rectangle aRect( 0,nDragPos, pWin->GetOutputSizePixel().Width()-1,nDragPos+HDR_SLIDERSIZE-1 ); pWin->Update(); pWin->DoInvertRect( aRect ); // Pixel } @@ -475,7 +475,7 @@ void ScTabView::InvertVertical( ScHSplitPos eWhich, long nDragPos ) ScGridWindow* pWin = pGridWin[i].get(); if (pWin) { - Rectangle aRect( nDragPos,0, nDragPos+HDR_SLIDERSIZE-1,pWin->GetOutputSizePixel().Height()-1 ); + tools::Rectangle aRect( nDragPos,0, nDragPos+HDR_SLIDERSIZE-1,pWin->GetOutputSizePixel().Height()-1 ); pWin->Update(); pWin->DoInvertRect( aRect ); // Pixel } diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx index a17a1451c078..4c68fbf8d052 100644 --- a/sc/source/ui/view/tabview5.cxx +++ b/sc/source/ui/view/tabview5.cxx @@ -536,13 +536,13 @@ void ScTabView::ScrollToObject( SdrObject* pDrawObj ) } } -void ScTabView::MakeVisible( const Rectangle& rHMMRect ) +void ScTabView::MakeVisible( const tools::Rectangle& rHMMRect ) { vcl::Window* pWin = GetActiveWin(); Size aWinSize = pWin->GetOutputSizePixel(); SCTAB nTab = aViewData.GetTabNo(); - Rectangle aRect = pWin->LogicToPixel( rHMMRect ); + tools::Rectangle aRect = pWin->LogicToPixel( rHMMRect ); long nScrollX=0, nScrollY=0; // Pixel @@ -655,9 +655,9 @@ void ScTabView::OnLOKNoteStateChanged(const ScPostIt* pNote) const SdrCaptionObj* pCaption = pNote->GetCaption(); if (!pCaption) return; - Rectangle aRect = pCaption->GetLogicRect(); + tools::Rectangle aRect = pCaption->GetLogicRect(); basegfx::B2DRange aTailRange = pCaption->getTailPolygon().getB2DRange(); - Rectangle aTailRect(aTailRange.getMinX(), aTailRange.getMinY(), + tools::Rectangle aTailRect(aTailRange.getMinX(), aTailRange.getMinY(), aTailRange.getMaxX(), aTailRange.getMaxY()); aRect.Union( aTailRect ); @@ -666,7 +666,7 @@ void ScTabView::OnLOKNoteStateChanged(const ScPostIt* pNote) // The value used below is enough to get the tile, where the arrow tip is // placed, invalidated. const int nBorderSize = 200; - Rectangle aInvalidRect = aRect; + tools::Rectangle aInvalidRect = aRect; aInvalidRect.Left() -= nBorderSize; aInvalidRect.Right() += nBorderSize; aInvalidRect.Top() -= nBorderSize; diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx index 8f161ed95494..494290092b42 100644 --- a/sc/source/ui/view/tabvwsh2.cxx +++ b/sc/source/ui/view/tabvwsh2.cxx @@ -319,11 +319,11 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) sal_uInt32 nDefaultObjectSizeHeight = rAppOpt.GetDefaultObjectSizeHeight(); // calc position and size - Rectangle aVisArea = pWin->PixelToLogic(Rectangle(Point(0,0), pWin->GetOutputSizePixel())); + tools::Rectangle aVisArea = pWin->PixelToLogic(tools::Rectangle(Point(0,0), pWin->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)); ScDrawView* pDrView = GetScDrawView(); diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index 6d7c050402a5..07e63223d429 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -423,7 +423,7 @@ void ScTabViewShell::SetZoomFactor( const Fraction &rZoomX, const Fraction &rZoo SfxViewShell::SetZoomFactor( rZoomX, rZoomY ); } -void ScTabViewShell::QueryObjAreaPixel( Rectangle& rRect ) const +void ScTabViewShell::QueryObjAreaPixel( tools::Rectangle& rRect ) const { // adjust to entire cells (in 1/100 mm) @@ -439,7 +439,7 @@ void ScTabViewShell::QueryObjAreaPixel( Rectangle& rRect ) const SCTAB nTab = rViewData.GetTabNo(); bool bNegativePage = pDoc->IsNegativePage( nTab ); - Rectangle aLogicRect = pDoc->GetMMRect( nCol, nRow, nCol, nRow, nTab ); + tools::Rectangle aLogicRect = pDoc->GetMMRect( nCol, nRow, nCol, nRow, nTab ); if ( bNegativePage ) { // use right edge of aLogicRect, and aLogicSize @@ -1464,7 +1464,7 @@ void ScTabViewShell::Construct( TriState nForceDesignMode ) if ( pDocSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED ) { //TODO/LATER: is there a difference between the two GetVisArea methods? - Rectangle aVisArea = static_cast<const SfxObjectShell*>(pDocSh)->GetVisArea(); + tools::Rectangle aVisArea = static_cast<const SfxObjectShell*>(pDocSh)->GetVisArea(); SCTAB nVisTab = rDoc.GetVisibleTab(); if (!rDoc.HasTable(nVisTab)) @@ -1825,7 +1825,7 @@ void ScTabViewShell::FillFieldData( ScHeaderFieldData& rData ) // eNumType is known by the dialog } -bool ScTabViewShell::GetChartArea( ScRangeListRef& rSource, Rectangle& rDest, SCTAB& rTab ) const +bool ScTabViewShell::GetChartArea( ScRangeListRef& rSource, tools::Rectangle& rDest, SCTAB& rTab ) const { rSource = aChartSource; rDest = aChartPos; diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx index ee81fab78563..3dced2749fd7 100644 --- a/sc/source/ui/view/tabvwshb.cxx +++ b/sc/source/ui/view/tabvwshb.cxx @@ -79,7 +79,7 @@ void ScTabViewShell::ConnectObject( SdrOle2Obj* pObj ) if ( !pClient ) { pClient = new ScClient( this, pWin, GetSdrView()->GetModel(), pObj ); - Rectangle aRect = pObj->GetLogicRect(); + tools::Rectangle aRect = pObj->GetLogicRect(); Size aDrawSize = aRect.GetSize(); Size aOleSize = pObj->GetOrigObjSize(); @@ -113,7 +113,7 @@ public: // XCallback virtual void SAL_CALL notify(const css::uno::Any& /*aData*/) override { - Rectangle aRect = m_pObject->GetLogicRect(); + tools::Rectangle aRect = m_pObject->GetLogicRect(); m_pViewShell->DoDPFieldPopup(aRect.TopLeft(), aRect.GetSize()); } }; @@ -135,12 +135,12 @@ void ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb ) if ( !(nErr & ERRCODE_ERROR_MASK) && xObj.is() ) { - 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()); } @@ -353,7 +353,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq) { const SfxRectangleItem& rRect = static_cast<const SfxRectangleItem&>(rReq.GetArgs()->Get(SID_OBJECTRESIZE)); - Rectangle aRect( pWin->PixelToLogic( rRect.GetValue() ) ); + tools::Rectangle aRect( pWin->PixelToLogic( rRect.GetValue() ) ); if ( pView->AreObjectsMarked() ) { @@ -411,12 +411,12 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq) if(pNewDBField) { - Rectangle aVisArea = pWin->PixelToLogic(Rectangle(Point(0,0), pWin->GetOutputSizePixel())); + tools::Rectangle aVisArea = pWin->PixelToLogic(tools::Rectangle(Point(0,0), pWin->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); diff --git a/sc/source/ui/view/tabvwshg.cxx b/sc/source/ui/view/tabvwshg.cxx index 5b2a4dcbcb18..7b739b8be0bd 100644 --- a/sc/source/ui/view/tabvwshg.cxx +++ b/sc/source/ui/view/tabvwshg.cxx @@ -102,7 +102,7 @@ void ScTabViewShell::InsertURLButton( const OUString& rName, const OUString& rUR if ( pDoc->IsNegativePage(nTab) ) aPos.X() -= aSize.Width(); - pObj->SetLogicRect(Rectangle(aPos, aSize)); + pObj->SetLogicRect(tools::Rectangle(aPos, aSize)); // for the old VC-Button the position/size had to be set explicitly once more // that seems not to be needed with UnoControls diff --git a/sc/source/ui/view/tabvwshh.cxx b/sc/source/ui/view/tabvwshh.cxx index 6aa43f3c2ebd..98e125292cc7 100644 --- a/sc/source/ui/view/tabvwshh.cxx +++ b/sc/source/ui/view/tabvwshh.cxx @@ -113,7 +113,7 @@ void ScTabViewShell::ExecuteObject( SfxRequest& rReq ) if (rMarkList.GetMarkCount() == 1) { SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); - Rectangle aRect = pObj->GetLogicRect(); + tools::Rectangle aRect = pObj->GetLogicRect(); if ( nSlotId == SID_OBJECT_LEFT ) pDrView->MoveMarkedObj( Size( nNewVal - aRect.Left(), 0 ) ); @@ -194,7 +194,7 @@ void ScTabViewShell::GetObjectState( SfxItemSet& rSet ) if (rMarkList.GetMarkCount() == 1) { SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); - Rectangle aRect = pObj->GetLogicRect(); + tools::Rectangle aRect = pObj->GetLogicRect(); long nVal; if ( nWhich == SID_OBJECT_LEFT ) diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index 188d0631f289..0da60a9de675 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -959,7 +959,7 @@ void ScViewData::ResetOldCursor() pThisTab->mbOldCursorValid = false; } -Rectangle ScViewData::GetEditArea( ScSplitPos eWhich, SCCOL nPosX, SCROW nPosY, +tools::Rectangle ScViewData::GetEditArea( ScSplitPos eWhich, SCCOL nPosX, SCROW nPosY, vcl::Window* pWin, const ScPatternAttr* pPattern, bool bForceToTop ) { @@ -1046,7 +1046,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich, bool bAsianVertical = pNewEngine->IsVertical(); // set by InputHandler - Rectangle aPixRect = ScEditUtil( pDoc, nNewX,nNewY,nTabNo, GetScrPos(nNewX,nNewY,eWhich), + tools::Rectangle aPixRect = ScEditUtil( pDoc, nNewX,nNewY,nTabNo, GetScrPos(nNewX,nNewY,eWhich), pWin, nPPTX,nPPTY,GetZoomX(),GetZoomY() ). GetEditArea( pPattern, true ); @@ -1055,7 +1055,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich, if ( GetEditAdjust() == SvxAdjust::Right || bAsianVertical ) aPixRect.Right() += 1; - Rectangle aOutputArea = pWin->PixelToLogic( aPixRect, GetLogicMode() ); + tools::Rectangle aOutputArea = pWin->PixelToLogic( aPixRect, GetLogicMode() ); pEditView[eWhich]->SetOutputArea( aOutputArea ); if ( bActive && eWhich == GetActivePart() ) @@ -1118,7 +1118,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich, // (and same line breaks) as for output. Fraction aFract(1,1); - Rectangle aUtilRect = ScEditUtil( pDoc,nNewX,nNewY,nTabNo, Point(0,0), pWin, + tools::Rectangle aUtilRect = ScEditUtil( pDoc,nNewX,nNewY,nTabNo, Point(0,0), pWin, HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( pPattern, false ); aPaperSize.Width() = aUtilRect.GetWidth(); } @@ -1126,7 +1126,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich, // sichtbarer Ausschnitt Size aPaper = pNewEngine->GetPaperSize(); - Rectangle aVis = pEditView[eWhich]->GetVisArea(); + tools::Rectangle aVis = pEditView[eWhich]->GetVisArea(); long nDiff = aVis.Right() - aVis.Left(); if ( GetEditAdjust() == SvxAdjust::Right ) { @@ -1233,7 +1233,7 @@ void ScViewData::EditGrowX() SCCOL nRight = nLeft + VisibleCellsX(eHWhich); Size aSize = pEngine->GetPaperSize(); - Rectangle aArea = pCurView->GetOutputArea(); + tools::Rectangle aArea = pCurView->GetOutputArea(); long nOldRight = aArea.Right(); // Margin is already included in the original width. @@ -1341,7 +1341,7 @@ void ScViewData::EditGrowX() { if ( bMoveArea || bGrowCentered || bGrowBackwards || bLayoutRTL ) { - Rectangle aVis = pCurView->GetVisArea(); + tools::Rectangle aVis = pCurView->GetVisArea(); if ( bGrowCentered ) { @@ -1427,7 +1427,7 @@ void ScViewData::EditGrowY( bool bInitial ) SCROW nBottom = GetPosY(eVWhich) + VisibleCellsY(eVWhich); Size aSize = pEngine->GetPaperSize(); - Rectangle aArea = pCurView->GetOutputArea(); + tools::Rectangle aArea = pCurView->GetOutputArea(); long nOldBottom = aArea.Bottom(); long nTextHeight = pEngine->GetTextHeight(); @@ -1496,7 +1496,7 @@ void ScViewData::ResetEditView() lcl_LOKRemoveWindow(GetViewShell(), (ScSplitPos)(i)); pEngine = pEditView[i]->GetEditEngine(); pEngine->RemoveView(pEditView[i]); - pEditView[i]->SetOutputArea( Rectangle() ); + pEditView[i]->SetOutputArea( tools::Rectangle() ); } bEditActive[i] = false; } @@ -2164,7 +2164,7 @@ void ScViewData::SetScreenPos( const Point& rVisAreaStart ) SetCurY( nY1 ); } -void ScViewData::SetScreen( const Rectangle& rVisArea ) +void ScViewData::SetScreen( const tools::Rectangle& rVisArea ) { SetScreenPos( rVisArea.TopLeft() ); diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index e0d381df6419..a84cc588401d 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -1894,7 +1894,7 @@ bool ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem, if (pGridWindow) { - std::vector<Rectangle> aLogicRects; + std::vector<tools::Rectangle> aLogicRects; pGridWindow->GetCellSelection(aLogicRects); boost::property_tree::ptree aTree; @@ -1902,7 +1902,7 @@ bool ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem, aTree.put("highlightAll", nCommand == SvxSearchCmd::FIND_ALL); boost::property_tree::ptree aSelections; - for (const Rectangle& rLogicRect : aLogicRects) + for (const tools::Rectangle& rLogicRect : aLogicRects) { boost::property_tree::ptree aSelection; aSelection.put("part", OString::number(nTab).getStr()); diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx index 02de4e9966a7..1f8bdf5fd9fc 100644 --- a/sc/source/ui/view/viewfun4.cxx +++ b/sc/source/ui/view/viewfun4.cxx @@ -97,7 +97,7 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow, pEngine->SetPaperSize(Size(100000,100000)); ScopedVclPtrInstance< vcl::Window > aWin( pActWin ); EditView aEditView( pEngine.get(), aWin.get() ); - aEditView.SetOutputArea(Rectangle(0,0,100000,100000)); + aEditView.SetOutputArea(tools::Rectangle(0,0,100000,100000)); // same method now for clipboard or drag&drop // mba: clipboard always must contain absolute URLs (could be from alien source) @@ -519,7 +519,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam ) // simulate dummy cell: pEditView = rViewData.GetEditView( rViewData.GetActivePart() ); rViewData.SetSpellingView( pEditView ); - Rectangle aRect( Point( 0, 0 ), Point( 0, 0 ) ); + tools::Rectangle aRect( Point( 0, 0 ), Point( 0, 0 ) ); pEditView->SetOutputArea( aRect ); pEngine->SetControlWord( EEControlBits::USECHARATTRIBS ); pEngine->EnableUndo( false ); @@ -639,7 +639,7 @@ bool ScViewFunc::PasteFile( const Point& rPos, const OUString& rFile, bool bLink if (bLink) // for bLink everything, which is not graphics, as URL { - Rectangle aRect( rPos, Size(0,0) ); + tools::Rectangle aRect( rPos, Size(0,0) ); ScRange aRange = GetViewData().GetDocument()-> GetRange( GetViewData().GetTabNo(), aRect ); SCCOL nPosX = aRange.aStart.Col(); diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx index 6034d8990fc8..37dd4b2ac28b 100644 --- a/sc/source/ui/view/viewfun5.cxx +++ b/sc/source/ui/view/viewfun5.cxx @@ -424,7 +424,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId, if (pObj) { Point aInsPos = aPos; - Rectangle aRect(pObj->GetLogicRect()); + tools::Rectangle aRect(pObj->GetLogicRect()); aInsPos.X() -= aRect.GetSize().Width() / 2; aInsPos.Y() -= aRect.GetSize().Height() / 2; if ( aInsPos.X() < 0 ) aInsPos.X() = 0; diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx index af59f931450a..66049684ddef 100644 --- a/sc/source/ui/view/viewfun7.cxx +++ b/sc/source/ui/view/viewfun7.cxx @@ -347,7 +347,7 @@ bool ScViewFunc::PasteObject( const Point& rPos, const uno::Reference < embed::X Point aInsPos = rPos; if ( GetViewData().GetDocument()->IsNegativePage( GetViewData().GetTabNo() ) ) aInsPos.X() -= aSize.Width(); - Rectangle aRect( aInsPos, aSize ); + tools::Rectangle aRect( aInsPos, aSize ); ScDrawView* pDrView = GetScDrawView(); SdrOle2Obj* pSdrObj = new SdrOle2Obj( aObjRef, aName, aRect ); @@ -428,7 +428,7 @@ bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic, aPos.X() -= aSize.Width(); GetViewData().GetViewShell()->SetDrawShell( true ); - Rectangle aRect(aPos, aSize); + tools::Rectangle aRect(aPos, aSize); SdrGrafObj* pGrafObj = new SdrGrafObj(rGraphic, aRect); // path was the name of the graphic in history |