From d5765ae2f9236c8ce32d61f05f46d9d76b991544 Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Fri, 23 Jul 2021 16:31:02 +0900 Subject: drawinglayer: extract Prop. Value conversion from ViewInformation2D MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ViewInformation2D doesn't need to know anything about the Sequence of PropertyValue that is used for parameters when constructing it through UNO API. This can be done outside of ViewInfromation2D and it doesn't need to be responsible for that internally inside the ViewInformation2D. With this we get ViewInformation2D, which is much simpler and isn't prone to YAGNI. Change-Id: I3836237a1d26e38145b52136c3204931ae7c6b79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119721 Tested-by: Tomaž Vajngerl Reviewed-by: Tomaž Vajngerl --- svx/source/sdr/contact/objectcontact.cxx | 2 +- svx/source/sdr/overlay/overlaymanager.cxx | 2 +- svx/source/sdr/primitive2d/sdrdecompositiontools.cxx | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) (limited to 'svx') diff --git a/svx/source/sdr/contact/objectcontact.cxx b/svx/source/sdr/contact/objectcontact.cxx index ee623c062590..0754af17ba86 100644 --- a/svx/source/sdr/contact/objectcontact.cxx +++ b/svx/source/sdr/contact/objectcontact.cxx @@ -50,7 +50,7 @@ ObjectContact::ObjectContact() : maViewObjectContactVector(), maPrimitiveAnimator(), mpViewObjectContactRedirector(nullptr), - maViewInformation2D(uno::Sequence< beans::PropertyValue >()), + maViewInformation2D(), mbIsPreviewRenderer(false) { } diff --git a/svx/source/sdr/overlay/overlaymanager.cxx b/svx/source/sdr/overlay/overlaymanager.cxx index 5d145687b3e0..7a8e1a62bd2e 100644 --- a/svx/source/sdr/overlay/overlaymanager.cxx +++ b/svx/source/sdr/overlay/overlaymanager.cxx @@ -127,7 +127,7 @@ namespace sdr::overlay uno::Sequence< beans::PropertyValue > xProperties(1); xProperties[0].Name = "ReducedDisplayQuality"; xProperties[0].Value <<= true; - maViewInformation2D = drawinglayer::geometry::ViewInformation2D(xProperties); + maViewInformation2D = drawinglayer::geometry::createViewInformation2D(xProperties); } rtl::Reference OverlayManager::create(OutputDevice& rOutputDevice) diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx index 9d19dd35def3..e75ad0a3c6a5 100644 --- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx +++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx @@ -446,8 +446,7 @@ basegfx::B2DRange getTextAnchorRange(const attribute::SdrTextAttribute& rText, // create neutral geometry::ViewInformation2D for local range and decompose calls. This is okay // since the decompose is view-independent - const uno::Sequence< beans::PropertyValue > xViewParameters; - geometry::ViewInformation2D aViewInformation2D(xViewParameters); + geometry::ViewInformation2D aViewInformation2D; // get range const basegfx::B2DRange aScaledRange(pNew->getB2DRange(aViewInformation2D)); -- cgit