diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-07-19 15:19:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-07-20 08:15:29 +0200 |
commit | 0e8b7dd7a013dffe080148baac926a698f36ad85 (patch) | |
tree | 940962b117c06943784aa94f1116bf748a2d057c /sd/source/ui | |
parent | 669d6ed4fa2e7a01c372a6e27dd5468ec8eb3077 (diff) |
split GetWindowExtentsRelative asunder
sometimes it returns a relative position, sometimes an absolute
position.
Rather have two different methods with names that match what
they return.
Change-Id: Ie1e73c6be1c797fd59934c96866d1fef1f972b35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154653
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui')
-rw-r--r-- | sd/source/ui/accessibility/AccessibleViewForwarder.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/presenter/PresenterCanvas.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/presenter/PresenterHelper.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/view/SlsToolTip.cxx | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/sd/source/ui/accessibility/AccessibleViewForwarder.cxx b/sd/source/ui/accessibility/AccessibleViewForwarder.cxx index 09225e27ff06..d28e69217ec2 100644 --- a/sd/source/ui/accessibility/AccessibleViewForwarder.cxx +++ b/sd/source/ui/accessibility/AccessibleViewForwarder.cxx @@ -79,7 +79,7 @@ Point AccessibleViewForwarder::LogicToPixel(const Point& rPoint) const { SdrPaintWindow* pPaintWindow = mpView->GetPaintWindow(static_cast<sal_uInt32>(mnWindowId)); OutputDevice& rOutDev = pPaintWindow->GetOutputDevice(); - ::tools::Rectangle aBBox(rOutDev.GetOwnerWindow()->GetWindowExtentsRelative(nullptr)); + ::tools::Rectangle aBBox(rOutDev.GetOwnerWindow()->GetWindowExtentsAbsolute()); return rOutDev.LogicToPixel(rPoint) + aBBox.TopLeft(); } else diff --git a/sd/source/ui/presenter/PresenterCanvas.cxx b/sd/source/ui/presenter/PresenterCanvas.cxx index e9031c66c57c..5791204c8fb8 100644 --- a/sd/source/ui/presenter/PresenterCanvas.cxx +++ b/sd/source/ui/presenter/PresenterCanvas.cxx @@ -565,7 +565,7 @@ awt::Point PresenterCanvas::GetOffset (const Reference<awt::XWindow>& rxBaseWind VclPtr<vcl::Window> pSharedWindow = VCLUnoHelper::GetWindow(rxBaseWindow); if (pWindow && pSharedWindow) { - ::tools::Rectangle aBox = pWindow->GetWindowExtentsRelative(pSharedWindow); + ::tools::Rectangle aBox = pWindow->GetWindowExtentsRelative(*pSharedWindow); // Calculate offset of this canvas with respect to the shared // canvas. @@ -591,7 +591,7 @@ awt::Point PresenterCanvas::GetOffset (const Reference<awt::XWindow>& rxBaseWind // Get the bounding box of the window and create a range in the // coordinate system of the child window. // Use the window extents. - ::tools::Rectangle aLocalClip = pWindow->GetWindowExtentsRelative(pSharedWindow); + ::tools::Rectangle aLocalClip = pWindow->GetWindowExtentsRelative(*pSharedWindow); // The local clip rectangle is used to clip the view state clipping // polygon. diff --git a/sd/source/ui/presenter/PresenterHelper.cxx b/sd/source/ui/presenter/PresenterHelper.cxx index cc85e6353f79..197afd5f404f 100644 --- a/sd/source/ui/presenter/PresenterHelper.cxx +++ b/sd/source/ui/presenter/PresenterHelper.cxx @@ -458,7 +458,7 @@ awt::Rectangle PresenterHelper::getWindowExtentsRelative ( VclPtr<vcl::Window> pParentWindow = VCLUnoHelper::GetWindow(rxParentWindow); if (pChildWindow && pParentWindow) { - ::tools::Rectangle aBox (pChildWindow->GetWindowExtentsRelative(pParentWindow)); + ::tools::Rectangle aBox (pChildWindow->GetWindowExtentsRelative(*pParentWindow)); return awt::Rectangle(aBox.Left(),aBox.Top(),aBox.GetWidth(),aBox.GetHeight()); } else diff --git a/sd/source/ui/slidesorter/view/SlsToolTip.cxx b/sd/source/ui/slidesorter/view/SlsToolTip.cxx index c266bbe3db8e..0bd9917e2619 100644 --- a/sd/source/ui/slidesorter/view/SlsToolTip.cxx +++ b/sd/source/ui/slidesorter/view/SlsToolTip.cxx @@ -123,7 +123,7 @@ void ToolTip::DoShow() vcl::Window* pParent (pWindow); while (pParent!=nullptr && pParent->GetParent()!=nullptr) pParent = pParent->GetParent(); - const Point aOffset (pWindow->GetWindowExtentsRelative(pParent).TopLeft()); + const Point aOffset (pWindow->GetWindowExtentsRelative(*pParent).TopLeft()); // We do not know how high the tool tip will be but want its top // edge not its bottom to be at a specific position (a little below |