diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-03-30 20:27:55 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-03-31 06:27:11 +0000 |
commit | a5a571307fb3306b74ab46b085cde6388270a770 (patch) | |
tree | 66d4ce12bb5236c50ab6a5d253bc8c6d8b5d292d /sc/source/ui/Accessibility | |
parent | 17d821af6bb9df93569836a92f6bed975587fc6c (diff) |
tdf#82580 tools: rename Rectangle to tools::Rectangle
Mostly generated using
make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle"
Except some modules have their own foo::tools namespace, so there have
to use ::tools::Rectangle. This commit just moves the class from the
global namespace, it does not update pre/postwin.h yet.
Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2
Reviewed-on: https://gerrit.libreoffice.org/35923
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sc/source/ui/Accessibility')
15 files changed, 172 insertions, 172 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx index d566abfe8d19..dbb9a5f76cf7 100644 --- a/sc/source/ui/Accessibility/AccessibleCell.cxx +++ b/sc/source/ui/Accessibility/AccessibleCell.cxx @@ -150,15 +150,15 @@ void SAL_CALL ScAccessibleCell::grabFocus( ) } } -Rectangle ScAccessibleCell::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleCell::GetBoundingBoxOnScreen() const { - Rectangle aCellRect(GetBoundingBox()); + tools::Rectangle aCellRect(GetBoundingBox()); if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindowByPos(meSplitPos); if (pWindow) { - Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); + tools::Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); aCellRect.setX(aCellRect.getX() + aRect.getX()); aCellRect.setY(aCellRect.getY() + aRect.getY()); } @@ -166,9 +166,9 @@ Rectangle ScAccessibleCell::GetBoundingBoxOnScreen() const return aCellRect; } -Rectangle ScAccessibleCell::GetBoundingBox() const +tools::Rectangle ScAccessibleCell::GetBoundingBox() const { - Rectangle aCellRect; + tools::Rectangle aCellRect; if (mpViewShell) { long nSizeX, nSizeY; @@ -180,7 +180,7 @@ Rectangle ScAccessibleCell::GetBoundingBox() const vcl::Window* pWindow = mpViewShell->GetWindowByPos(meSplitPos); if (pWindow) { - Rectangle aRect(pWindow->GetWindowExtentsRelative(pWindow->GetAccessibleParentWindow())); + tools::Rectangle aRect(pWindow->GetWindowExtentsRelative(pWindow->GetAccessibleParentWindow())); aRect.Move(-aRect.Left(), -aRect.Top()); aCellRect = aRect.Intersection(aCellRect); } @@ -196,7 +196,7 @@ Rectangle ScAccessibleCell::GetBoundingBox() const mpDoc->GetAttr( maCellAddress.Col(), maCellAddress.Row(), maCellAddress.Tab(), ATTR_ROTATE_VALUE ) ); if( pItem && (pItem->GetValue() != 0) ) { - Rectangle aParaRect = GetParagraphBoundingBox(); + tools::Rectangle aParaRect = GetParagraphBoundingBox(); if( !aParaRect.IsEmpty() && (aCellRect.GetWidth() < aParaRect.GetWidth()) ) aCellRect.SetSize( Size( aParaRect.GetWidth(), aCellRect.GetHeight() ) ); } diff --git a/sc/source/ui/Accessibility/AccessibleContextBase.cxx b/sc/source/ui/Accessibility/AccessibleContextBase.cxx index 13b541f4e891..383ede495fef 100644 --- a/sc/source/ui/Accessibility/AccessibleContextBase.cxx +++ b/sc/source/ui/Accessibility/AccessibleContextBase.cxx @@ -146,7 +146,7 @@ sal_Bool SAL_CALL ScAccessibleContextBase::containsPoint(const awt::Point& rPoin { SolarMutexGuard aGuard; IsObjectValid(); - return Rectangle (Point(), GetBoundingBox().GetSize()).IsInside(VCLPoint(rPoint)); + return tools::Rectangle (Point(), GetBoundingBox().GetSize()).IsInside(VCLPoint(rPoint)); } uno::Reference< XAccessible > SAL_CALL ScAccessibleContextBase::getAccessibleAtPoint( @@ -194,8 +194,8 @@ bool SAL_CALL ScAccessibleContextBase::isShowing( ) uno::Reference<XAccessibleComponent> xParentComponent (mxParent->getAccessibleContext(), uno::UNO_QUERY); if (xParentComponent.is()) { - Rectangle aParentBounds(VCLRectangle(xParentComponent->getBounds())); - Rectangle aBounds(VCLRectangle(getBounds())); + tools::Rectangle aParentBounds(VCLRectangle(xParentComponent->getBounds())); + tools::Rectangle aBounds(VCLRectangle(getBounds())); bShowing = aBounds.IsOver(aParentBounds); } } @@ -496,16 +496,16 @@ void ScAccessibleContextBase::CommitFocusLost() const vcl::unohelper::NotifyAccessibleStateEventGlobally(aEvent); } -Rectangle ScAccessibleContextBase::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleContextBase::GetBoundingBoxOnScreen() const { OSL_FAIL("not implemented"); - return Rectangle(); + return tools::Rectangle(); } -Rectangle ScAccessibleContextBase::GetBoundingBox() const +tools::Rectangle ScAccessibleContextBase::GetBoundingBox() const { OSL_FAIL("not implemented"); - return Rectangle(); + return tools::Rectangle(); } void ScAccessibleContextBase::IsObjectValid() const diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx index ccc46e40b673..463f55e3c2f8 100644 --- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx +++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx @@ -171,14 +171,14 @@ void ScAccessibleCsvControl::SendRemoveColumnEvent( sal_uInt32 /* nFirstColumn * // helpers -------------------------------------------------------------------- -Rectangle ScAccessibleCsvControl::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleCsvControl::GetBoundingBoxOnScreen() const { SolarMutexGuard aGuard; ensureAlive(); return implGetControl().GetWindowExtentsRelative( nullptr ); } -Rectangle ScAccessibleCsvControl::GetBoundingBox() const +tools::Rectangle ScAccessibleCsvControl::GetBoundingBox() const { SolarMutexGuard aGuard; ensureAlive(); @@ -1466,16 +1466,16 @@ OUString SAL_CALL ScAccessibleCsvCell::getImplementationName() // helpers -------------------------------------------------------------------- -Rectangle ScAccessibleCsvCell::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleCsvCell::GetBoundingBoxOnScreen() const { SolarMutexGuard aGuard; ensureAlive(); - Rectangle aRect( implGetBoundingBox() ); + tools::Rectangle aRect( implGetBoundingBox() ); aRect.SetPos( implGetAbsPos( aRect.TopLeft() ) ); return aRect; } -Rectangle ScAccessibleCsvCell::GetBoundingBox() const +tools::Rectangle ScAccessibleCsvCell::GetBoundingBox() const { SolarMutexGuard aGuard; ensureAlive(); @@ -1519,10 +1519,10 @@ Size ScAccessibleCsvCell::implGetRealSize() const (mnLine == CSV_LINE_HEADER) ? rGrid.GetHdrHeight() : rGrid.GetLineHeight() ); } -Rectangle ScAccessibleCsvCell::implGetBoundingBox() const +tools::Rectangle ScAccessibleCsvCell::implGetBoundingBox() const { ScCsvGrid& rGrid = implGetGrid(); - Rectangle aClipRect( Point( 0, 0 ), rGrid.GetSizePixel() ); + tools::Rectangle aClipRect( Point( 0, 0 ), rGrid.GetSizePixel() ); if( mnColumn != CSV_COLUMN_HEADER ) { aClipRect.Left() = rGrid.GetFirstX(); @@ -1531,7 +1531,7 @@ Rectangle ScAccessibleCsvCell::implGetBoundingBox() const if( mnLine != CSV_LINE_HEADER ) aClipRect.Top() = rGrid.GetHdrHeight(); - Rectangle aRect( implGetRealPos(), implGetRealSize() ); + tools::Rectangle aRect( implGetRealPos(), implGetRealSize() ); aRect.Intersection( aClipRect ); if( (aRect.GetWidth() <= 0) || (aRect.GetHeight() <= 0) ) aRect.SetSize( Size( -1, -1 ) ); @@ -1541,7 +1541,7 @@ Rectangle ScAccessibleCsvCell::implGetBoundingBox() const ::std::unique_ptr< SvxEditSource > ScAccessibleCsvCell::implCreateEditSource() { ScCsvGrid& rGrid = implGetGrid(); - Rectangle aBoundRect( implGetBoundingBox() ); + tools::Rectangle aBoundRect( implGetBoundingBox() ); aBoundRect -= implGetRealPos(); ::std::unique_ptr< SvxEditSource > pEditSource( new ScAccessibilityEditSource( o3tl::make_unique<ScAccessibleCsvTextData>(&rGrid, rGrid.GetEditEngine(), maCellText, aBoundRect, implGetRealSize()) ) ); diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx index be2bdb1789e8..f85637dcedcd 100644 --- a/sc/source/ui/Accessibility/AccessibleDocument.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx @@ -1613,7 +1613,7 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) } else if ((rHint.GetId() == SfxHintId::ScAccVisAreaChanged) || (rHint.GetId() == SfxHintId::ScAccWindowResized)) { - Rectangle aOldVisArea(maVisArea); + tools::Rectangle aOldVisArea(maVisArea); maVisArea = GetVisibleArea_Impl(); if (maVisArea != aOldVisArea) @@ -1718,7 +1718,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleDocument::getAccessibleAtPoin uno::Reference< XAccessibleComponent > xComp(xCont, uno::UNO_QUERY); if (xComp.is()) { - Rectangle aBound(VCLRectangle(xComp->getBounds())); + tools::Rectangle aBound(VCLRectangle(xComp->getBounds())); if (aBound.IsInside(VCLPoint(rPoint))) xAccessible = mxTempAcc; } @@ -2063,9 +2063,9 @@ uno::Sequence<sal_Int8> SAL_CALL ///===== IAccessibleViewForwarder ======================================== -Rectangle ScAccessibleDocument::GetVisibleArea_Impl() const +tools::Rectangle ScAccessibleDocument::GetVisibleArea_Impl() const { - Rectangle aVisRect(GetBoundingBox()); + tools::Rectangle aVisRect(GetBoundingBox()); if (mpViewShell) { @@ -2082,7 +2082,7 @@ Rectangle ScAccessibleDocument::GetVisibleArea_Impl() const return aVisRect; } -Rectangle ScAccessibleDocument::GetVisibleArea() const +tools::Rectangle ScAccessibleDocument::GetVisibleArea() const { SolarMutexGuard aGuard; IsObjectValid(); @@ -2142,9 +2142,9 @@ OUString SAL_CALL return sName; } -Rectangle ScAccessibleDocument::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleDocument::GetBoundingBoxOnScreen() const { - Rectangle aRect; + tools::Rectangle aRect; if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindowByPos(meSplitPos); @@ -2154,9 +2154,9 @@ Rectangle ScAccessibleDocument::GetBoundingBoxOnScreen() const return aRect; } -Rectangle ScAccessibleDocument::GetBoundingBox() const +tools::Rectangle ScAccessibleDocument::GetBoundingBox() const { - Rectangle aRect; + tools::Rectangle aRect; if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindowByPos(meSplitPos); diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx index 18e19a7e557c..65a702fc4902 100644 --- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx @@ -69,7 +69,7 @@ typedef std::list< uno::Reference< XAccessible > > ScXAccList; struct ScAccNote { OUString maNoteText; - Rectangle maRect; + tools::Rectangle maRect; ScAddress maNoteCell; ::accessibility::AccessibleTextHelper* mpTextHelper; sal_Int32 mnParaCount; @@ -88,13 +88,13 @@ class ScNotesChildren public: ScNotesChildren(ScPreviewShell* pViewShell, ScAccessibleDocumentPagePreview* pAccDoc); ~ScNotesChildren(); - void Init(const Rectangle& rVisRect, sal_Int32 nOffset); + void Init(const tools::Rectangle& rVisRect, sal_Int32 nOffset); sal_Int32 GetChildrenCount() const { return mnParagraphs;} uno::Reference<XAccessible> GetChild(sal_Int32 nIndex) const; uno::Reference<XAccessible> GetAt(const awt::Point& rPoint) const; - void DataChanged(const Rectangle& rVisRect); + void DataChanged(const tools::Rectangle& rVisRect); private: ScPreviewShell* mpViewShell; @@ -105,12 +105,12 @@ private: sal_Int32 mnParagraphs; sal_Int32 mnOffset; - ::accessibility::AccessibleTextHelper* CreateTextHelper(const OUString& rString, const Rectangle& rVisRect, const ScAddress& aCellPos, bool bMarkNote, sal_Int32 nChildOffset) const; - sal_Int32 AddNotes(const ScPreviewLocationData& rData, const Rectangle& rVisRect, bool bMark, ScAccNotes& rNotes); + ::accessibility::AccessibleTextHelper* CreateTextHelper(const OUString& rString, const tools::Rectangle& rVisRect, const ScAddress& aCellPos, bool bMarkNote, sal_Int32 nChildOffset) const; + sal_Int32 AddNotes(const ScPreviewLocationData& rData, const tools::Rectangle& rVisRect, bool bMark, ScAccNotes& rNotes); static sal_Int8 CompareCell(const ScAddress& aCell1, const ScAddress& aCell2); static void CollectChildren(const ScAccNote& rNote, ScXAccList& rList); - sal_Int32 CheckChanges(const ScPreviewLocationData& rData, const Rectangle& rVisRect, + sal_Int32 CheckChanges(const ScPreviewLocationData& rData, const tools::Rectangle& rVisRect, bool bMark, ScAccNotes& rOldNotes, ScAccNotes& rNewNotes, ScXAccList& rOldParas, ScXAccList& rNewParas); @@ -140,7 +140,7 @@ ScNotesChildren::~ScNotesChildren() std::for_each(maMarks.begin(), maMarks.end(), DeleteAccNote()); } -::accessibility::AccessibleTextHelper* ScNotesChildren::CreateTextHelper(const OUString& rString, const Rectangle& rVisRect, const ScAddress& aCellPos, bool bMarkNote, sal_Int32 nChildOffset) const +::accessibility::AccessibleTextHelper* ScNotesChildren::CreateTextHelper(const OUString& rString, const tools::Rectangle& rVisRect, const ScAddress& aCellPos, bool bMarkNote, sal_Int32 nChildOffset) const { ::accessibility::AccessibleTextHelper* pTextHelper = new ::accessibility::AccessibleTextHelper(o3tl::make_unique<ScAccessibilityEditSource>(o3tl::make_unique<ScAccessibleNoteTextData>(mpViewShell, rString, aCellPos, bMarkNote))); pTextHelper->SetEventSource(mpAccDoc); @@ -150,7 +150,7 @@ ScNotesChildren::~ScNotesChildren() return pTextHelper; } -sal_Int32 ScNotesChildren::AddNotes(const ScPreviewLocationData& rData, const Rectangle& rVisRect, bool bMark, ScAccNotes& rNotes) +sal_Int32 ScNotesChildren::AddNotes(const ScPreviewLocationData& rData, const tools::Rectangle& rVisRect, bool bMark, ScAccNotes& rNotes) { sal_Int32 nCount = rData.GetNoteCountInRange(rVisRect, bMark); @@ -189,7 +189,7 @@ sal_Int32 ScNotesChildren::AddNotes(const ScPreviewLocationData& rData, const Re return nParagraphs; } -void ScNotesChildren::Init(const Rectangle& rVisRect, sal_Int32 nOffset) +void ScNotesChildren::Init(const tools::Rectangle& rVisRect, sal_Int32 nOffset) { if (mpViewShell && !mnParagraphs) { @@ -259,7 +259,7 @@ uno::Reference<XAccessible> ScNotesChildren::GetChild(sal_Int32 nIndex) const struct ScPointFound { - Rectangle maPoint; + tools::Rectangle maPoint; sal_Int32 mnParagraphs; explicit ScPointFound(const Point& rPoint) : maPoint(rPoint, Size(0, 0)), mnParagraphs(0) {} bool operator() (const ScAccNote& rNote) @@ -318,7 +318,7 @@ void ScNotesChildren::CollectChildren(const ScAccNote& rNote, ScXAccList& rList) } sal_Int32 ScNotesChildren::CheckChanges(const ScPreviewLocationData& rData, - const Rectangle& rVisRect, bool bMark, ScAccNotes& rOldNotes, + const tools::Rectangle& rVisRect, bool bMark, ScAccNotes& rOldNotes, ScAccNotes& rNewNotes, ScXAccList& rOldParas, ScXAccList& rNewParas) { sal_Int32 nCount = rData.GetNoteCountInRange(rVisRect, bMark); @@ -451,7 +451,7 @@ struct ScChildNew } }; -void ScNotesChildren::DataChanged(const Rectangle& rVisRect) +void ScNotesChildren::DataChanged(const tools::Rectangle& rVisRect) { if (mpViewShell && mpAccDoc) { @@ -487,7 +487,7 @@ public: ///===== IAccessibleViewForwarder ======================================== - virtual Rectangle GetVisibleArea() const override; + virtual tools::Rectangle GetVisibleArea() const override; virtual Point LogicToPixel (const Point& rPoint) const override; virtual Size LogicToPixel (const Size& rSize) const override; @@ -513,10 +513,10 @@ ScIAccessibleViewForwarder::ScIAccessibleViewForwarder(ScPreviewShell* pViewShel ///===== IAccessibleViewForwarder ======================================== -Rectangle ScIAccessibleViewForwarder::GetVisibleArea() const +tools::Rectangle ScIAccessibleViewForwarder::GetVisibleArea() const { SolarMutexGuard aGuard; - Rectangle aVisRect; + tools::Rectangle aVisRect; vcl::Window* pWin = mpViewShell->GetWindow(); if (pWin) { @@ -536,7 +536,7 @@ Point ScIAccessibleViewForwarder::LogicToPixel (const Point& rPoint) const vcl::Window* pWin = mpViewShell->GetWindow(); if (pWin && mpAccDoc) { - Rectangle aRect(mpAccDoc->GetBoundingBoxOnScreen()); + tools::Rectangle aRect(mpAccDoc->GetBoundingBoxOnScreen()); aPoint = pWin->LogicToPixel(rPoint, maMapMode) + aRect.TopLeft(); } @@ -599,7 +599,7 @@ struct ScShapeRange ScShapeChildVec maBackShapes; ScShapeChildVec maForeShapes; // inclusive internal shapes ScShapeChildVec maControls; - Rectangle maPixelRect; + tools::Rectangle maPixelRect; MapMode maMapMode; ScIAccessibleViewForwarder maViewForwarder; }; @@ -652,7 +652,7 @@ private: void FindChanged(ScShapeRange& aOld, ScShapeRange& aNew) const; ::accessibility::AccessibleShape* GetAccShape(const ScShapeChild& rShape) const; ::accessibility::AccessibleShape* GetAccShape(const ScShapeChildVec& rShapes, sal_Int32 nIndex) const; - void FillShapes(const Rectangle& aPixelPaintRect, const MapMode& aMapMode, sal_uInt8 nRangeId); + void FillShapes(const tools::Rectangle& aPixelPaintRect, const MapMode& aMapMode, sal_uInt8 nRangeId); // void AddShape(const uno::Reference<drawing::XShape>& xShape, SdrLayerID aLayerID); // void RemoveShape(const uno::Reference<drawing::XShape>& xShape, SdrLayerID aLayerID); @@ -839,7 +839,7 @@ void ScShapeChildren::Init() { const ScPreviewLocationData& rData = mpViewShell->GetLocationData(); MapMode aMapMode; - Rectangle aPixelPaintRect; + tools::Rectangle aPixelPaintRect; sal_uInt8 nRangeId; sal_uInt16 nCount(rData.GetDrawRanges()); for (sal_uInt16 i = 0; i < nCount; ++i) @@ -1024,7 +1024,7 @@ uno::Reference<XAccessible> ScShapeChildren::GetBackgroundShapeAt(const awt::Poi return (GetAccShape(rShapes[nIndex])); } -void ScShapeChildren::FillShapes(const Rectangle& aPixelPaintRect, const MapMode& aMapMode, sal_uInt8 nRangeId) +void ScShapeChildren::FillShapes(const tools::Rectangle& aPixelPaintRect, const MapMode& aMapMode, sal_uInt8 nRangeId) { OSL_ENSURE(nRangeId < maShapeRanges.size(), "this is not a valid range for draw objects"); SdrPage* pPage = GetDrawPage(); @@ -1034,10 +1034,10 @@ void ScShapeChildren::FillShapes(const Rectangle& aPixelPaintRect, const MapMode bool bForeAdded(false); bool bBackAdded(false); bool bControlAdded(false); - Rectangle aClippedPixelPaintRect(aPixelPaintRect); + tools::Rectangle aClippedPixelPaintRect(aPixelPaintRect); if (mpAccDoc) { - Rectangle aRect2(Point(0,0), mpAccDoc->GetBoundingBoxOnScreen().GetSize()); + tools::Rectangle aRect2(Point(0,0), mpAccDoc->GetBoundingBoxOnScreen().GetSize()); aClippedPixelPaintRect = aPixelPaintRect.GetIntersection(aRect2); } maShapeRanges[nRangeId].maPixelRect = aClippedPixelPaintRect; @@ -1053,7 +1053,7 @@ void ScShapeChildren::FillShapes(const Rectangle& aPixelPaintRect, const MapMode uno::Reference< drawing::XShape > xShape(pObj->getUnoShape(), uno::UNO_QUERY); if (xShape.is()) { - Rectangle aRect(pWin->LogicToPixel(VCLPoint(xShape->getPosition()), aMapMode), pWin->LogicToPixel(VCLSize(xShape->getSize()), aMapMode)); + tools::Rectangle aRect(pWin->LogicToPixel(VCLPoint(xShape->getPosition()), aMapMode), pWin->LogicToPixel(VCLSize(xShape->getSize()), aMapMode)); if(!aClippedPixelPaintRect.GetIntersection(aRect).IsEmpty()) { ScShapeChild aShape; @@ -1117,7 +1117,7 @@ struct ScPagePreviewCountData { // order is background shapes, header, table or notes, footer, foreground shapes, controls - Rectangle aVisRect; + tools::Rectangle aVisRect; long nBackShapes; long nHeaders; long nTables; @@ -1150,9 +1150,9 @@ ScPagePreviewCountData::ScPagePreviewCountData( const ScPreviewLocationData& rDa if ( pSizeWindow ) aOutputSize = pSizeWindow->GetOutputSizePixel(); Point aPoint; - aVisRect = Rectangle( aPoint, aOutputSize ); + aVisRect = tools::Rectangle( aPoint, aOutputSize ); - Rectangle aObjRect; + tools::Rectangle aObjRect; if ( rData.GetHeaderPosition( aObjRect ) && aObjRect.IsOver( aVisRect ) ) nHeaders = 1; @@ -1259,7 +1259,7 @@ void ScAccessibleDocumentPagePreview::Notify( SfxBroadcaster& rBC, const SfxHint if ( pSizeWindow ) aOutputSize = pSizeWindow->GetOutputSizePixel(); Point aPoint; - Rectangle aVisRect( aPoint, aOutputSize ); + tools::Rectangle aVisRect( aPoint, aOutputSize ); GetNotesChildren()->DataChanged(aVisRect); GetShapeChildren()->DataChanged(); @@ -1296,7 +1296,7 @@ void ScAccessibleDocumentPagePreview::Notify( SfxBroadcaster& rBC, const SfxHint if ( pSizeWindow ) aOutputSize = pSizeWindow->GetOutputSizePixel(); Point aPoint; - Rectangle aVisRect( aPoint, aOutputSize ); + tools::Rectangle aVisRect( aPoint, aOutputSize ); GetNotesChildren()->DataChanged(aVisRect); GetShapeChildren()->VisAreaChanged(); @@ -1532,9 +1532,9 @@ OUString SAL_CALL ScAccessibleDocumentPagePreview::createAccessibleName() return sName; } -Rectangle ScAccessibleDocumentPagePreview::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleDocumentPagePreview::GetBoundingBoxOnScreen() const { - Rectangle aRect; + tools::Rectangle aRect; if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindow(); @@ -1544,9 +1544,9 @@ Rectangle ScAccessibleDocumentPagePreview::GetBoundingBoxOnScreen() const return aRect; } -Rectangle ScAccessibleDocumentPagePreview::GetBoundingBox() const +tools::Rectangle ScAccessibleDocumentPagePreview::GetBoundingBox() const { - Rectangle aRect; + tools::Rectangle aRect; if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindow(); diff --git a/sc/source/ui/Accessibility/AccessibleEditObject.cxx b/sc/source/ui/Accessibility/AccessibleEditObject.cxx index 6393c872f253..1a84a230e14a 100644 --- a/sc/source/ui/Accessibility/AccessibleEditObject.cxx +++ b/sc/source/ui/Accessibility/AccessibleEditObject.cxx @@ -167,9 +167,9 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleEditObject::getAccessibleAtPo return xRet; } -Rectangle ScAccessibleEditObject::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleEditObject::GetBoundingBoxOnScreen() const { - Rectangle aScreenBounds; + tools::Rectangle aScreenBounds; if ( mpWindow ) { @@ -180,7 +180,7 @@ Rectangle ScAccessibleEditObject::GetBoundingBoxOnScreen() const MapMode aMapMode( mpEditView->GetEditEngine()->GetRefMapMode() ); aScreenBounds = mpWindow->LogicToPixel( mpEditView->GetOutputArea(), aMapMode ); Point aCellLoc = aScreenBounds.TopLeft(); - Rectangle aWindowRect = mpWindow->GetWindowExtentsRelative( nullptr ); + tools::Rectangle aWindowRect = mpWindow->GetWindowExtentsRelative( nullptr ); Point aWindowLoc = aWindowRect.TopLeft(); Point aPos( aCellLoc.getX() + aWindowLoc.getX(), aCellLoc.getY() + aWindowLoc.getY() ); aScreenBounds.SetPos( aPos ); @@ -195,9 +195,9 @@ Rectangle ScAccessibleEditObject::GetBoundingBoxOnScreen() const return aScreenBounds; } -Rectangle ScAccessibleEditObject::GetBoundingBox() const +tools::Rectangle ScAccessibleEditObject::GetBoundingBox() const { - Rectangle aBounds( GetBoundingBoxOnScreen() ); + tools::Rectangle aBounds( GetBoundingBoxOnScreen() ); if ( mpWindow ) { diff --git a/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx b/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx index ca38874eb626..76c96eb554e4 100644 --- a/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx +++ b/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx @@ -236,46 +236,46 @@ Sequence<sal_Int8> ScAccessibleFilterMenu::getImplementationId() return css::uno::Sequence<sal_Int8>(); } -Rectangle ScAccessibleFilterMenu::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleFilterMenu::GetBoundingBoxOnScreen() const { if (mnMenuPos == ScMenuFloatingWindow::MENU_NOT_SELECTED) - return Rectangle(); + return tools::Rectangle(); // Menu object's bounding box is the bounding box of the menu item that // launches the menu, which belongs to the parent window. ScMenuFloatingWindow* pParentWin = mpWindow->getParentMenuWindow(); if (!pParentWin) - return Rectangle(); + return tools::Rectangle(); if (!pParentWin->IsVisible()) - return Rectangle(); + return tools::Rectangle(); Point aPos = pParentWin->OutputToAbsoluteScreenPixel(Point(0,0)); Point aMenuPos; Size aMenuSize; pParentWin->getMenuItemPosSize(mnMenuPos, aMenuPos, aMenuSize); - Rectangle aRect(aPos + aMenuPos, aMenuSize); + tools::Rectangle aRect(aPos + aMenuPos, aMenuSize); return aRect; } -Rectangle ScAccessibleFilterMenu::GetBoundingBox() const +tools::Rectangle ScAccessibleFilterMenu::GetBoundingBox() const { if (mnMenuPos == ScMenuFloatingWindow::MENU_NOT_SELECTED) - return Rectangle(); + return tools::Rectangle(); // Menu object's bounding box is the bounding box of the menu item that // launches the menu, which belongs to the parent window. ScMenuFloatingWindow* pParentWin = mpWindow->getParentMenuWindow(); if (!pParentWin) - return Rectangle(); + return tools::Rectangle(); if (!pParentWin->IsVisible()) - return Rectangle(); + return tools::Rectangle(); Point aMenuPos; Size aMenuSize; pParentWin->getMenuItemPosSize(mnMenuPos, aMenuPos, aMenuSize); - Rectangle aRect(aMenuPos, aMenuSize); + tools::Rectangle aRect(aMenuPos, aMenuSize); return aRect; } diff --git a/sc/source/ui/Accessibility/AccessibleFilterMenuItem.cxx b/sc/source/ui/Accessibility/AccessibleFilterMenuItem.cxx index 1b2174ecbdcb..2712649ab159 100644 --- a/sc/source/ui/Accessibility/AccessibleFilterMenuItem.cxx +++ b/sc/source/ui/Accessibility/AccessibleFilterMenuItem.cxx @@ -126,28 +126,28 @@ void ScAccessibleFilterMenuItem::setEnabled(bool bEnabled) mbEnabled = bEnabled; } -Rectangle ScAccessibleFilterMenuItem::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleFilterMenuItem::GetBoundingBoxOnScreen() const { if (!mpWindow->IsVisible()) - return Rectangle(); + return tools::Rectangle(); Point aPos = mpWindow->OutputToAbsoluteScreenPixel(Point(0,0)); Point aMenuPos; Size aMenuSize; mpWindow->getMenuItemPosSize(mnMenuPos, aMenuPos, aMenuSize); - Rectangle aRect(aPos + aMenuPos, aMenuSize); + tools::Rectangle aRect(aPos + aMenuPos, aMenuSize); return aRect; } -Rectangle ScAccessibleFilterMenuItem::GetBoundingBox() const +tools::Rectangle ScAccessibleFilterMenuItem::GetBoundingBox() const { if (!mpWindow->IsVisible()) - return Rectangle(); + return tools::Rectangle(); Point aMenuPos; Size aMenuSize; mpWindow->getMenuItemPosSize(mnMenuPos, aMenuPos, aMenuSize); - Rectangle aRect(aMenuPos, aMenuSize); + tools::Rectangle aRect(aMenuPos, aMenuSize); return aRect; } diff --git a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx index aa7015cbbc36..9eee1276c5ac 100644 --- a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx +++ b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx @@ -307,15 +307,15 @@ OUString SAL_CALL ScAccessiblePageHeader::createAccessibleName() return sName.replaceFirst("%1", SC_RESSTR(SCSTR_UNKNOWN)); } -Rectangle ScAccessiblePageHeader::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessiblePageHeader::GetBoundingBoxOnScreen() const { - Rectangle aCellRect(GetBoundingBox()); + tools::Rectangle aCellRect(GetBoundingBox()); if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindow(); if (pWindow) { - Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); + tools::Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); aCellRect.setX(aCellRect.getX() + aRect.getX()); aCellRect.setY(aCellRect.getY() + aRect.getY()); } @@ -323,9 +323,9 @@ Rectangle ScAccessiblePageHeader::GetBoundingBoxOnScreen() const return aCellRect; } -Rectangle ScAccessiblePageHeader::GetBoundingBox() const +tools::Rectangle ScAccessiblePageHeader::GetBoundingBox() const { - Rectangle aRect; + tools::Rectangle aRect; if (mpViewShell) { const ScPreviewLocationData& rData = mpViewShell->GetLocationData(); @@ -335,7 +335,7 @@ Rectangle ScAccessiblePageHeader::GetBoundingBox() const rData.GetFooterPosition( aRect ); // the Rectangle could contain negative coordinates so it should be clipped - Rectangle aClipRect(Point(0, 0), aRect.GetSize()); + tools::Rectangle aClipRect(Point(0, 0), aRect.GetSize()); vcl::Window* pWindow = mpViewShell->GetWindow(); if (pWindow) aClipRect = pWindow->GetWindowExtentsRelative(pWindow->GetAccessibleParentWindow()); diff --git a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx index 26715505cf37..cbfdc5a57f09 100644 --- a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx +++ b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx @@ -243,9 +243,9 @@ OUString SAL_CALL ScAccessiblePageHeaderArea::createAccessibleName() return sName; } -Rectangle ScAccessiblePageHeaderArea::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessiblePageHeaderArea::GetBoundingBoxOnScreen() const { - Rectangle aRect; + tools::Rectangle aRect; if (mxParent.is()) { uno::Reference<XAccessibleContext> xContext = mxParent->getAccessibleContext(); @@ -253,15 +253,15 @@ Rectangle ScAccessiblePageHeaderArea::GetBoundingBoxOnScreen() const if (xComp.is()) { // has the same size and position on screen like the parent - aRect = Rectangle(VCLPoint(xComp->getLocationOnScreen()), VCLRectangle(xComp->getBounds()).GetSize()); + aRect = tools::Rectangle(VCLPoint(xComp->getLocationOnScreen()), VCLRectangle(xComp->getBounds()).GetSize()); } } return aRect; } -Rectangle ScAccessiblePageHeaderArea::GetBoundingBox() const +tools::Rectangle ScAccessiblePageHeaderArea::GetBoundingBox() const { - Rectangle aRect; + tools::Rectangle aRect; if (mxParent.is()) { uno::Reference<XAccessibleContext> xContext = mxParent->getAccessibleContext(); @@ -269,7 +269,7 @@ Rectangle ScAccessiblePageHeaderArea::GetBoundingBox() const if (xComp.is()) { // has the same size and position on screen like the parent and so the pos is (0, 0) - Rectangle aNewRect(Point(0, 0), VCLRectangle(xComp->getBounds()).GetSize()); + tools::Rectangle aNewRect(Point(0, 0), VCLRectangle(xComp->getBounds()).GetSize()); aRect = aNewRect; } } diff --git a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx index a931018fd28f..8ca2ff72865b 100644 --- a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx +++ b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx @@ -201,16 +201,16 @@ uno::Sequence<sal_Int8> SAL_CALL //==== internal ========================================================= -Rectangle ScAccessiblePreviewCell::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessiblePreviewCell::GetBoundingBoxOnScreen() const { - Rectangle aCellRect; + tools::Rectangle aCellRect; if (mpViewShell) { mpViewShell->GetLocationData().GetCellPosition( maCellAddress, aCellRect ); vcl::Window* pWindow = mpViewShell->GetWindow(); if (pWindow) { - Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); + tools::Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); aCellRect.setX(aCellRect.getX() + aRect.getX()); aCellRect.setY(aCellRect.getY() + aRect.getY()); } @@ -218,9 +218,9 @@ Rectangle ScAccessiblePreviewCell::GetBoundingBoxOnScreen() const return aCellRect; } -Rectangle ScAccessiblePreviewCell::GetBoundingBox() const +tools::Rectangle ScAccessiblePreviewCell::GetBoundingBox() const { - Rectangle aCellRect; + tools::Rectangle aCellRect; if (mpViewShell) { mpViewShell->GetLocationData().GetCellPosition( maCellAddress, aCellRect ); @@ -231,7 +231,7 @@ Rectangle ScAccessiblePreviewCell::GetBoundingBox() const uno::Reference<XAccessibleComponent> xAccParentComp (xAccParentContext, uno::UNO_QUERY); if (xAccParentComp.is()) { - Rectangle aParentRect (VCLRectangle(xAccParentComp->getBounds())); + tools::Rectangle aParentRect (VCLRectangle(xAccParentComp->getBounds())); aCellRect.setX(aCellRect.getX() - aParentRect.getX()); aCellRect.setY(aCellRect.getY() - aParentRect.getY()); } diff --git a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx index 2f83e3f60535..cb71f3d3c534 100644 --- a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx +++ b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx @@ -308,9 +308,9 @@ uno::Sequence<sal_Int8> SAL_CALL //==== internal ========================================================= -Rectangle ScAccessiblePreviewHeaderCell::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessiblePreviewHeaderCell::GetBoundingBoxOnScreen() const { - Rectangle aCellRect; + tools::Rectangle aCellRect; FillTableInfo(); @@ -319,7 +319,7 @@ Rectangle ScAccessiblePreviewHeaderCell::GetBoundingBoxOnScreen() const const ScPreviewColRowInfo& rColInfo = mpTableInfo->GetColInfo()[maCellPos.Col()]; const ScPreviewColRowInfo& rRowInfo = mpTableInfo->GetRowInfo()[maCellPos.Row()]; - aCellRect = Rectangle( rColInfo.nPixelStart, rRowInfo.nPixelStart, rColInfo.nPixelEnd, rRowInfo.nPixelEnd ); + aCellRect = tools::Rectangle( rColInfo.nPixelStart, rRowInfo.nPixelStart, rColInfo.nPixelEnd, rRowInfo.nPixelEnd ); } if (mpViewShell) @@ -327,7 +327,7 @@ Rectangle ScAccessiblePreviewHeaderCell::GetBoundingBoxOnScreen() const vcl::Window* pWindow = mpViewShell->GetWindow(); if (pWindow) { - Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); + tools::Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); aCellRect.setX(aCellRect.getX() + aRect.getX()); aCellRect.setY(aCellRect.getY() + aRect.getY()); } @@ -335,7 +335,7 @@ Rectangle ScAccessiblePreviewHeaderCell::GetBoundingBoxOnScreen() const return aCellRect; } -Rectangle ScAccessiblePreviewHeaderCell::GetBoundingBox() const +tools::Rectangle ScAccessiblePreviewHeaderCell::GetBoundingBox() const { FillTableInfo(); @@ -344,7 +344,7 @@ Rectangle ScAccessiblePreviewHeaderCell::GetBoundingBox() const const ScPreviewColRowInfo& rColInfo = mpTableInfo->GetColInfo()[maCellPos.Col()]; const ScPreviewColRowInfo& rRowInfo = mpTableInfo->GetRowInfo()[maCellPos.Row()]; - Rectangle aCellRect( rColInfo.nPixelStart, rRowInfo.nPixelStart, rColInfo.nPixelEnd, rRowInfo.nPixelEnd ); + tools::Rectangle aCellRect( rColInfo.nPixelStart, rRowInfo.nPixelStart, rColInfo.nPixelEnd, rRowInfo.nPixelEnd ); uno::Reference<XAccessible> xAccParent = const_cast<ScAccessiblePreviewHeaderCell*>(this)->getAccessibleParent(); if (xAccParent.is()) { @@ -352,14 +352,14 @@ Rectangle ScAccessiblePreviewHeaderCell::GetBoundingBox() const uno::Reference<XAccessibleComponent> xAccParentComp (xAccParentContext, uno::UNO_QUERY); if (xAccParentComp.is()) { - Rectangle aParentRect (VCLRectangle(xAccParentComp->getBounds())); + tools::Rectangle aParentRect (VCLRectangle(xAccParentComp->getBounds())); aCellRect.setX(aCellRect.getX() - aParentRect.getX()); aCellRect.setY(aCellRect.getY() - aParentRect.getY()); } } return aCellRect; } - return Rectangle(); + return tools::Rectangle(); } OUString SAL_CALL ScAccessiblePreviewHeaderCell::createAccessibleDescription() @@ -423,7 +423,7 @@ void ScAccessiblePreviewHeaderCell::FillTableInfo() const if ( pWindow ) aOutputSize = pWindow->GetOutputSizePixel(); Point aPoint; - Rectangle aVisRect( aPoint, aOutputSize ); + tools::Rectangle aVisRect( aPoint, aOutputSize ); mpTableInfo = new ScPreviewTableInfo; mpViewShell->GetLocationData().GetTableInfo( aVisRect, *mpTableInfo ); diff --git a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx index 00e367e3c193..19ea2bd621ee 100644 --- a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx +++ b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx @@ -430,7 +430,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewTable::getAccessibleAt const ScPreviewColRowInfo* pColInfo = mpTableInfo->GetColInfo(); const ScPreviewColRowInfo* pRowInfo = mpTableInfo->GetRowInfo(); - Rectangle aScreenRect(GetBoundingBox()); + tools::Rectangle aScreenRect(GetBoundingBox()); awt::Point aMovedPoint = aPoint; aMovedPoint.X += aScreenRect.Left(); @@ -602,15 +602,15 @@ OUString SAL_CALL ScAccessiblePreviewTable::createAccessibleName() return sName; } -Rectangle ScAccessiblePreviewTable::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessiblePreviewTable::GetBoundingBoxOnScreen() const { - Rectangle aCellRect(GetBoundingBox()); + tools::Rectangle aCellRect(GetBoundingBox()); if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindow(); if (pWindow) { - Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); + tools::Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); aCellRect.setX(aCellRect.getX() + aRect.getX()); aCellRect.setY(aCellRect.getY() + aRect.getY()); } @@ -618,11 +618,11 @@ Rectangle ScAccessiblePreviewTable::GetBoundingBoxOnScreen() const return aCellRect; } -Rectangle ScAccessiblePreviewTable::GetBoundingBox() const +tools::Rectangle ScAccessiblePreviewTable::GetBoundingBox() const { FillTableInfo(); - Rectangle aRect; + tools::Rectangle aRect; if ( mpTableInfo ) { SCCOL nColumns = mpTableInfo->GetCols(); @@ -632,7 +632,7 @@ Rectangle ScAccessiblePreviewTable::GetBoundingBox() const const ScPreviewColRowInfo* pColInfo = mpTableInfo->GetColInfo(); const ScPreviewColRowInfo* pRowInfo = mpTableInfo->GetRowInfo(); - aRect = Rectangle( pColInfo[0].nPixelStart, + aRect = tools::Rectangle( pColInfo[0].nPixelStart, pRowInfo[0].nPixelStart, pColInfo[nColumns-1].nPixelEnd, pRowInfo[nRows-1].nPixelEnd ); @@ -656,7 +656,7 @@ void ScAccessiblePreviewTable::FillTableInfo() const if ( pWindow ) aOutputSize = pWindow->GetOutputSizePixel(); Point aPoint; - Rectangle aVisRect( aPoint, aOutputSize ); + tools::Rectangle aVisRect( aPoint, aOutputSize ); mpTableInfo = new ScPreviewTableInfo; mpViewShell->GetLocationData().GetTableInfo( aVisRect, *mpTableInfo ); diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx index ee9f22a3d5e4..fa2733e51e8b 100644 --- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx +++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx @@ -1310,9 +1310,9 @@ void SAL_CALL ScAccessibleSpreadsheet::addAccessibleEventListener(const uno::Ref //==== internal ========================================================= -Rectangle ScAccessibleSpreadsheet::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleSpreadsheet::GetBoundingBoxOnScreen() const { - Rectangle aRect; + tools::Rectangle aRect; if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindowByPos(meSplitPos); @@ -1322,9 +1322,9 @@ Rectangle ScAccessibleSpreadsheet::GetBoundingBoxOnScreen() const return aRect; } -Rectangle ScAccessibleSpreadsheet::GetBoundingBox() const +tools::Rectangle ScAccessibleSpreadsheet::GetBoundingBox() const { - Rectangle aRect; + tools::Rectangle aRect; if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindowByPos(meSplitPos); @@ -1393,9 +1393,9 @@ ScDocument* ScAccessibleSpreadsheet::GetDocument(ScTabViewShell* pViewShell) return pDoc; } -Rectangle ScAccessibleSpreadsheet::GetVisArea(ScTabViewShell* pViewShell, ScSplitPos eSplitPos) +tools::Rectangle ScAccessibleSpreadsheet::GetVisArea(ScTabViewShell* pViewShell, ScSplitPos eSplitPos) { - Rectangle aVisArea; + tools::Rectangle aVisArea; if (pViewShell) { vcl::Window* pWindow = pViewShell->GetWindowByPos(eSplitPos); @@ -1408,7 +1408,7 @@ Rectangle ScAccessibleSpreadsheet::GetVisArea(ScTabViewShell* pViewShell, ScSpli return aVisArea; } -Rectangle ScAccessibleSpreadsheet::GetVisCells(const Rectangle& rVisArea) +tools::Rectangle ScAccessibleSpreadsheet::GetVisCells(const tools::Rectangle& rVisArea) { if (mpViewShell) { @@ -1418,10 +1418,10 @@ Rectangle ScAccessibleSpreadsheet::GetVisCells(const Rectangle& rVisArea) mpViewShell->GetViewData().GetPosFromPixel( 1, 1, meSplitPos, nStartX, nStartY); mpViewShell->GetViewData().GetPosFromPixel( rVisArea.GetWidth(), rVisArea.GetHeight(), meSplitPos, nEndX, nEndY); - return Rectangle(nStartX, nStartY, nEndX, nEndY); + return tools::Rectangle(nStartX, nStartY, nEndX, nEndY); } else - return Rectangle(); + return tools::Rectangle(); } sal_Bool SAL_CALL ScAccessibleSpreadsheet::selectRow( sal_Int32 row ) diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx index 2878d60e91d2..d4b339a970db 100644 --- a/sc/source/ui/Accessibility/AccessibleText.cxx +++ b/sc/source/ui/Accessibility/AccessibleText.cxx @@ -54,7 +54,7 @@ public: ScViewForwarder(ScTabViewShell* pViewShell, ScSplitPos eSplitPos, const ScAddress& rCell); virtual bool IsValid() const override; - virtual Rectangle GetVisArea() const override; + virtual tools::Rectangle GetVisArea() const override; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const override; virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const override; @@ -74,9 +74,9 @@ bool ScViewForwarder::IsValid() const return mpViewShell != nullptr; } -Rectangle ScViewForwarder::GetVisArea() const +tools::Rectangle ScViewForwarder::GetVisArea() const { - Rectangle aVisArea; + tools::Rectangle aVisArea; if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindowByPos(meSplitPos); @@ -147,7 +147,7 @@ public: const EditView* _pEditView); virtual bool IsValid() const override; - virtual Rectangle GetVisArea() const override; + virtual tools::Rectangle GetVisArea() const override; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const override; virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const override; @@ -167,12 +167,12 @@ bool ScEditObjectViewForwarder::IsValid() const return (mpWindow != nullptr); } -Rectangle ScEditObjectViewForwarder::GetVisArea() const +tools::Rectangle ScEditObjectViewForwarder::GetVisArea() const { - Rectangle aVisArea; + tools::Rectangle aVisArea; if (mpWindow) { - Rectangle aVisRect(mpWindow->GetWindowExtentsRelative(mpWindow->GetAccessibleParentWindow())); + tools::Rectangle aVisRect(mpWindow->GetWindowExtentsRelative(mpWindow->GetAccessibleParentWindow())); aVisRect.SetPos(Point(0, 0)); @@ -194,7 +194,7 @@ Point ScEditObjectViewForwarder::LogicToPixel( const Point& rPoint, const MapMod Point aPoint( rPoint ); if ( mpEditView ) { - Rectangle aEditViewVisArea( mpEditView->GetVisArea() ); + tools::Rectangle aEditViewVisArea( mpEditView->GetVisArea() ); aPoint += aEditViewVisArea.TopLeft(); } return mpWindow->LogicToPixel( aPoint, rMapMode ); @@ -215,7 +215,7 @@ Point ScEditObjectViewForwarder::PixelToLogic( const Point& rPoint, const MapMod Point aPoint( mpWindow->PixelToLogic( rPoint, rMapMode ) ); if ( mpEditView ) { - Rectangle aEditViewVisArea( mpEditView->GetVisArea() ); + tools::Rectangle aEditViewVisArea( mpEditView->GetVisArea() ); aPoint -= aEditViewVisArea.TopLeft(); } return aPoint; @@ -240,16 +240,16 @@ public: explicit ScPreviewViewForwarder(ScPreviewShell* pViewShell); virtual bool IsValid() const override; - virtual Rectangle GetVisArea() const override; + virtual tools::Rectangle GetVisArea() const override; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const override; virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const override; void SetInvalid(); - Rectangle GetVisRect() const; + tools::Rectangle GetVisRect() const; // clips the VisArea and calculates with the negativ coordinates - Rectangle CorrectVisArea(const Rectangle& rVisArea) const; + tools::Rectangle CorrectVisArea(const tools::Rectangle& rVisArea) const; }; ScPreviewViewForwarder::ScPreviewViewForwarder(ScPreviewShell* pViewShell) @@ -262,9 +262,9 @@ bool ScPreviewViewForwarder::IsValid() const return mpViewShell != nullptr; } -Rectangle ScPreviewViewForwarder::GetVisArea() const +tools::Rectangle ScPreviewViewForwarder::GetVisArea() const { - Rectangle aVisArea; + tools::Rectangle aVisArea; OSL_FAIL("should be implemented in an abrevated class"); return aVisArea; } @@ -316,7 +316,7 @@ void ScPreviewViewForwarder::SetInvalid() mpViewShell = nullptr; } -Rectangle ScPreviewViewForwarder::GetVisRect() const +tools::Rectangle ScPreviewViewForwarder::GetVisRect() const { if ( mpViewShell ) { @@ -325,15 +325,15 @@ Rectangle ScPreviewViewForwarder::GetVisRect() const if ( pWindow ) aOutputSize = pWindow->GetOutputSizePixel(); Point aPoint; - Rectangle aVisRect( aPoint, aOutputSize ); + tools::Rectangle aVisRect( aPoint, aOutputSize ); return aVisRect; } - return Rectangle(); + return tools::Rectangle(); } -Rectangle ScPreviewViewForwarder::CorrectVisArea(const Rectangle& rVisArea) const +tools::Rectangle ScPreviewViewForwarder::CorrectVisArea(const tools::Rectangle& rVisArea) const { - Rectangle aVisArea(rVisArea); + tools::Rectangle aVisArea(rVisArea); Point aPos = aVisArea.TopLeft(); // get first the position to remember negative positions after clipping vcl::Window* pWin = mpViewShell->GetWindow(); @@ -362,7 +362,7 @@ class ScPreviewHeaderFooterViewForwarder : public ScPreviewViewForwarder public: ScPreviewHeaderFooterViewForwarder(ScPreviewShell* pViewShell, bool bHeader); - virtual Rectangle GetVisArea() const override; + virtual tools::Rectangle GetVisArea() const override; }; ScPreviewHeaderFooterViewForwarder::ScPreviewHeaderFooterViewForwarder(ScPreviewShell* pViewShell, bool bHeader) @@ -372,9 +372,9 @@ ScPreviewHeaderFooterViewForwarder::ScPreviewHeaderFooterViewForwarder(ScPreview { } -Rectangle ScPreviewHeaderFooterViewForwarder::GetVisArea() const +tools::Rectangle ScPreviewHeaderFooterViewForwarder::GetVisArea() const { - Rectangle aVisArea; + tools::Rectangle aVisArea; if (mpViewShell) { const ScPreviewLocationData& rData = mpViewShell->GetLocationData(); @@ -399,7 +399,7 @@ public: ScPreviewCellViewForwarder(ScPreviewShell* pViewShell, ScAddress aCellPos); - virtual Rectangle GetVisArea() const override; + virtual tools::Rectangle GetVisArea() const override; }; ScPreviewCellViewForwarder::ScPreviewCellViewForwarder(ScPreviewShell* pViewShell, @@ -410,9 +410,9 @@ ScPreviewCellViewForwarder::ScPreviewCellViewForwarder(ScPreviewShell* pViewShel { } -Rectangle ScPreviewCellViewForwarder::GetVisArea() const +tools::Rectangle ScPreviewCellViewForwarder::GetVisArea() const { - Rectangle aVisArea; + tools::Rectangle aVisArea; if (mpViewShell) { const ScPreviewLocationData& rData = mpViewShell->GetLocationData(); @@ -436,7 +436,7 @@ public: ScAddress aCellPos, bool bColHeader); - virtual Rectangle GetVisArea() const override; + virtual tools::Rectangle GetVisArea() const override; }; ScPreviewHeaderCellViewForwarder::ScPreviewHeaderCellViewForwarder(ScPreviewShell* pViewShell, @@ -449,9 +449,9 @@ ScPreviewHeaderCellViewForwarder::ScPreviewHeaderCellViewForwarder(ScPreviewShel { } -Rectangle ScPreviewHeaderCellViewForwarder::GetVisArea() const +tools::Rectangle ScPreviewHeaderCellViewForwarder::GetVisArea() const { - Rectangle aVisArea; + tools::Rectangle aVisArea; if (mpViewShell) { const ScPreviewLocationData& rData = mpViewShell->GetLocationData(); @@ -475,7 +475,7 @@ public: ScAddress aCellPos, bool bNoteMark); - virtual Rectangle GetVisArea() const override; + virtual tools::Rectangle GetVisArea() const override; }; ScPreviewNoteViewForwarder::ScPreviewNoteViewForwarder(ScPreviewShell* pViewShell, @@ -488,9 +488,9 @@ ScPreviewNoteViewForwarder::ScPreviewNoteViewForwarder(ScPreviewShell* pViewShel { } -Rectangle ScPreviewNoteViewForwarder::GetVisArea() const +tools::Rectangle ScPreviewNoteViewForwarder::GetVisArea() const { - Rectangle aVisArea; + tools::Rectangle aVisArea; if (mpViewShell) { const ScPreviewLocationData& rData = mpViewShell->GetLocationData(); @@ -513,7 +513,7 @@ public: ScEditViewForwarder(EditView* pEditView, vcl::Window* pWin); virtual bool IsValid() const override; - virtual Rectangle GetVisArea() const override; + virtual tools::Rectangle GetVisArea() const override; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const override; virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const override; virtual bool GetSelection( ESelection& rSelection ) const override; @@ -536,9 +536,9 @@ bool ScEditViewForwarder::IsValid() const return mpWindow && mpEditView; } -Rectangle ScEditViewForwarder::GetVisArea() const +tools::Rectangle ScEditViewForwarder::GetVisArea() const { - Rectangle aVisArea; + tools::Rectangle aVisArea; if (IsValid() && mpEditView->GetEditEngine()) { MapMode aMapMode(mpEditView->GetEditEngine()->GetRefMapMode()); @@ -1287,7 +1287,7 @@ SvxTextForwarder* ScAccessiblePreviewHeaderCellTextData::GetTextForwarder() if ( pWindow ) aOutputSize = pWindow->GetOutputSizePixel(); Point aPoint; - Rectangle aVisRect( aPoint, aOutputSize ); + tools::Rectangle aVisRect( aPoint, aOutputSize ); Size aSize(mpViewShell->GetLocationData().GetHeaderCellOutputRect(aVisRect, aCellPos, mbColHeader).GetSize()); if (pWindow) aSize = pWindow->PixelToLogic(aSize, pEditEngine->GetRefMapMode()); @@ -1409,7 +1409,7 @@ SvxTextForwarder* ScAccessibleHeaderTextData::GetTextForwarder() if ( mpViewShell ) { - Rectangle aVisRect; + tools::Rectangle aVisRect; mpViewShell->GetLocationData().GetHeaderPosition(aVisRect); Size aSize(aVisRect.GetSize()); vcl::Window* pWin = mpViewShell->GetWindow(); @@ -1514,7 +1514,7 @@ SvxTextForwarder* ScAccessibleNoteTextData::GetTextForwarder() if ( pWindow ) aOutputSize = pWindow->GetOutputSizePixel(); Point aPoint; - Rectangle aVisRect( aPoint, aOutputSize ); + tools::Rectangle aVisRect( aPoint, aOutputSize ); Size aSize(mpViewShell->GetLocationData().GetNoteInRangeOutputRect(aVisRect, mbMarkNote, maCellPos).GetSize()); if (pWindow) aSize = pWindow->PixelToLogic(aSize, mpEditEngine->GetRefMapMode()); @@ -1541,21 +1541,21 @@ SvxViewForwarder* ScAccessibleNoteTextData::GetViewForwarder() class ScCsvViewForwarder : public SvxViewForwarder { - Rectangle maBoundBox; + tools::Rectangle maBoundBox; VclPtr<vcl::Window> mpWindow; public: - explicit ScCsvViewForwarder( vcl::Window* pWindow, const Rectangle& rBoundBox ); + explicit ScCsvViewForwarder( vcl::Window* pWindow, const tools::Rectangle& rBoundBox ); virtual bool IsValid() const override; - virtual Rectangle GetVisArea() const override; + virtual tools::Rectangle GetVisArea() const override; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const override; virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const override; void SetInvalid(); }; -ScCsvViewForwarder::ScCsvViewForwarder( vcl::Window* pWindow, const Rectangle& rBoundBox ) : +ScCsvViewForwarder::ScCsvViewForwarder( vcl::Window* pWindow, const tools::Rectangle& rBoundBox ) : maBoundBox( rBoundBox ), mpWindow( pWindow ) { @@ -1566,7 +1566,7 @@ bool ScCsvViewForwarder::IsValid() const return mpWindow != nullptr; } -Rectangle ScCsvViewForwarder::GetVisArea() const +tools::Rectangle ScCsvViewForwarder::GetVisArea() const { return maBoundBox; } @@ -1590,7 +1590,7 @@ void ScCsvViewForwarder::SetInvalid() ScAccessibleCsvTextData::ScAccessibleCsvTextData( vcl::Window* pWindow, EditEngine* pEditEngine, - const OUString& rCellText, const Rectangle& rBoundBox, const Size& rCellSize ) : + const OUString& rCellText, const tools::Rectangle& rBoundBox, const Size& rCellSize ) : mpWindow( pWindow ), mpEditEngine( pEditEngine ), maCellText( rCellText ), |