diff options
Diffstat (limited to 'sc/source/ui/view')
40 files changed, 392 insertions, 392 deletions
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 |