diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2021-07-23 16:31:02 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-07-31 06:35:49 +0200 |
commit | d5765ae2f9236c8ce32d61f05f46d9d76b991544 (patch) | |
tree | 67c37ac6d07d4bbeae2b0e151985a0e1a707f39e /svx | |
parent | 13efd364c046b8064f03cb23bb232f42a892d601 (diff) |
drawinglayer: extract Prop. Value conversion from ViewInformation2D
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 <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sdr/contact/objectcontact.cxx | 2 | ||||
-rw-r--r-- | svx/source/sdr/overlay/overlaymanager.cxx | 2 | ||||
-rw-r--r-- | svx/source/sdr/primitive2d/sdrdecompositiontools.cxx | 3 |
3 files changed, 3 insertions, 4 deletions
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> 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)); |