summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2020-05-29 08:36:34 +0200
committerTomaž Vajngerl <quikee@gmail.com>2020-06-03 07:41:29 +0200
commitbeb0fc465163e5edc0b7f978ad46c6ad0cd9e2de (patch)
tree228b449ea568a3b38ecf5038c830cb6a570de5bb
parent78da6e80efb009b28625fb081617c8044b20f790 (diff)
sd: use b2DRectangleFromRectangle from canvastools.hxx
Change-Id: I8604b80f887a2c3a1143b8a9bc70f429576512f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95350 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
-rw-r--r--sd/source/ui/view/Outliner.cxx14
1 files changed, 3 insertions, 11 deletions
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 9e81a826bfb9..f1ff9742ec1c 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>
@@ -683,15 +684,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)
@@ -704,7 +696,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
@@ -742,7 +734,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