[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sd/source
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jun 9 13:25:03 UTC 2020
sd/source/ui/view/Outliner.cxx | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
New commits:
commit 2c402eb238ef375971b1604c5dbfe6c6eedc2000
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Fri May 29 08:36:34 2020 +0200
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Tue Jun 9 15:24:07 2020 +0200
sd: use b2DRectangleFromRectangle from canvastools.hxx
Change-Id: I8604b80f887a2c3a1143b8a9bc70f429576512f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95350
Tested-by: Tomaž Vajngerl <quikee at gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
(cherry picked from commit beb0fc465163e5edc0b7f978ad46c6ad0cd9e2de)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95925
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index f60748bb13a5..041f08c9b0a5 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -26,6 +26,7 @@
#include <svl/srchitem.hxx>
#include <svl/intitem.hxx>
#include <editeng/editstat.hxx>
+#include <vcl/canvastools.hxx>
#include <vcl/outdev.hxx>
#include <vcl/weld.hxx>
#include <sfx2/dispatch.hxx>
@@ -694,15 +695,6 @@ bool SdOutliner::SearchAndReplaceAll()
namespace
{
-basegfx::B2DRange b2DRectangleFromRectangle( const ::tools::Rectangle& rRect )
-{
- if (rRect.IsWidthEmpty() && rRect.IsHeightEmpty())
- return basegfx::B2DRange(basegfx::B2DTuple(rRect.Left(), rRect.Top()));
- return basegfx::B2DRectangle(rRect.Left(),
- rRect.Top(),
- rRect.IsWidthEmpty() ? rRect.Left() : rRect.Right(),
- rRect.IsHeightEmpty() ? rRect.Top() : rRect.Bottom());
-}
basegfx::B2DRectangle getPDFSelection(std::unique_ptr<VectorGraphicSearch> & rVectorGraphicSearch,
SdrObject* pObject)
@@ -715,7 +707,7 @@ basegfx::B2DRectangle getPDFSelection(std::unique_ptr<VectorGraphicSearch> & rVe
basegfx::B2DSize aPdfPageSizeHMM = rVectorGraphicSearch->pageSize();
- basegfx::B2DRectangle aObjectB2DRectHMM(b2DRectangleFromRectangle(pObject->GetLogicRect()));
+ basegfx::B2DRectangle aObjectB2DRectHMM(vcl::unotools::b2DRectangleFromRectangle(pObject->GetLogicRect()));
// Setup coordinate conversion matrix to convert the inner PDF
// coordinates to the page relative coordinates
@@ -753,7 +745,7 @@ void SdOutliner::sendLOKSearchResultCallback(std::shared_ptr<sd::ViewShell> & pV
basegfx::B2DSize aPdfPageSize = mpImpl->mpVectorGraphicSearch->pageSize();
tools::Rectangle aObjectRectTwip = OutputDevice::LogicToLogic(mpObj->GetLogicRect(), MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip));
- basegfx::B2DRectangle aObjectB2DRectTwip(b2DRectangleFromRectangle(aObjectRectTwip));
+ basegfx::B2DRectangle aObjectB2DRectTwip(vcl::unotools::b2DRectangleFromRectangle(aObjectRectTwip));
// Setup coordinate conversion matrix to convert the inner PDF
// coordinates to the page relative coordinates
More information about the Libreoffice-commits
mailing list