[Libreoffice-commits] core.git: drawinglayer/source include/drawinglayer svx/source

Tomaž Vajngerl (via logerrit) logerrit at kemper.freedesktop.org
Sat Jul 31 04:36:21 UTC 2021


 drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx |    2 
 drawinglayer/source/geometry/viewinformation2d.cxx           |  284 ++++-------
 drawinglayer/source/primitive2d/Tools.cxx                    |    6 
 drawinglayer/source/primitive2d/baseprimitive2d.cxx          |    4 
 drawinglayer/source/processor2d/baseprocessor2d.cxx          |    4 
 include/drawinglayer/geometry/viewinformation2d.hxx          |   38 -
 svx/source/sdr/contact/objectcontact.cxx                     |    2 
 svx/source/sdr/overlay/overlaymanager.cxx                    |    2 
 svx/source/sdr/primitive2d/sdrdecompositiontools.cxx         |    3 
 9 files changed, 141 insertions(+), 204 deletions(-)

New commits:
commit d5765ae2f9236c8ce32d61f05f46d9d76b991544
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Fri Jul 23 16:31:02 2021 +0900
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Sat Jul 31 06:35:49 2021 +0200

    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 at gmail.com>
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx b/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
index 63b4ffd6986d..98ca81433f12 100644
--- a/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
+++ b/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
@@ -117,7 +117,7 @@ namespace drawinglayer::unorenderer
                         MaximumQuadraticPixels = 500000;
                     }
 
-                    const geometry::ViewInformation2D aViewInformation2D(aViewInformationSequence);
+                    const auto aViewInformation2D = geometry::createViewInformation2D(aViewInformationSequence);
                     const sal_uInt32 nDiscreteWidth(basegfx::fround(o3tl::convert(fWidth, eRangeUnit, o3tl::Length::in) * DPI_X));
                     const sal_uInt32 nDiscreteHeight(basegfx::fround(o3tl::convert(fHeight, eRangeUnit, o3tl::Length::in) * DPI_Y));
 
diff --git a/drawinglayer/source/geometry/viewinformation2d.cxx b/drawinglayer/source/geometry/viewinformation2d.cxx
index 5b276cf52a59..94def8eda93c 100644
--- a/drawinglayer/source/geometry/viewinformation2d.cxx
+++ b/drawinglayer/source/geometry/viewinformation2d.cxx
@@ -84,162 +84,24 @@ protected:
     // Viewport, VisualizedPage or ViewTime
     uno::Sequence<beans::PropertyValue> mxExtendedInformation;
 
-    void impInterpretPropertyValues(const uno::Sequence<beans::PropertyValue>& rViewParameters)
-    {
-        if (!rViewParameters.hasElements())
-            return;
-
-        const sal_Int32 nCount(rViewParameters.getLength());
-        sal_Int32 nExtendedInsert(0);
-
-        // prepare extended information for filtering. Maximum size is nCount
-        mxExtendedInformation.realloc(nCount);
-
-        for (sal_Int32 a(0); a < nCount; a++)
-        {
-            const beans::PropertyValue& rProp = rViewParameters[a];
-
-            if (rProp.Name == g_PropertyName_ReducedDisplayQuality)
-            {
-                // extra information; add to filtered information
-                mxExtendedInformation[nExtendedInsert++] = rProp;
-
-                // for performance reasons, also cache content locally
-                bool bSalBool(false);
-                rProp.Value >>= bSalBool;
-                mbReducedDisplayQuality = bSalBool;
-            }
-            else if (rProp.Name == g_PropertyName_ObjectTransformation)
-            {
-                css::geometry::AffineMatrix2D aAffineMatrix2D;
-                rProp.Value >>= aAffineMatrix2D;
-                basegfx::unotools::homMatrixFromAffineMatrix(maObjectTransformation,
-                                                             aAffineMatrix2D);
-            }
-            else if (rProp.Name == g_PropertyName_ViewTransformation)
-            {
-                css::geometry::AffineMatrix2D aAffineMatrix2D;
-                rProp.Value >>= aAffineMatrix2D;
-                basegfx::unotools::homMatrixFromAffineMatrix(maViewTransformation, aAffineMatrix2D);
-            }
-            else if (rProp.Name == g_PropertyName_Viewport)
-            {
-                css::geometry::RealRectangle2D aViewport;
-                rProp.Value >>= aViewport;
-                maViewport = basegfx::unotools::b2DRectangleFromRealRectangle2D(aViewport);
-            }
-            else if (rProp.Name == g_PropertyName_Time)
-            {
-                rProp.Value >>= mfViewTime;
-            }
-            else if (rProp.Name == g_PropertyName_VisualizedPage)
-            {
-                rProp.Value >>= mxVisualizedPage;
-            }
-            else
-            {
-                // extra information; add to filtered information
-                mxExtendedInformation[nExtendedInsert++] = rProp;
-            }
-        }
-
-        // extra information size is now known; realloc to final size
-        mxExtendedInformation.realloc(nExtendedInsert);
-    }
-
-    void impFillViewInformationFromContent()
-    {
-        const bool bObjectTransformationUsed(!maObjectTransformation.isIdentity());
-        const bool bViewTransformationUsed(!maViewTransformation.isIdentity());
-        const bool bViewportUsed(!maViewport.isEmpty());
-        const bool bTimeUsed(0.0 < mfViewTime);
-        const bool bVisualizedPageUsed(mxVisualizedPage.is());
-        const bool bReducedDisplayQualityUsed(mbReducedDisplayQuality);
-        const bool bExtraInformation(mxExtendedInformation.hasElements());
-        sal_uInt32 nIndex(0);
-        const sal_uInt32 nCount((bObjectTransformationUsed ? 1 : 0)
-                                + (bViewTransformationUsed ? 1 : 0) + (bViewportUsed ? 1 : 0)
-                                + (bTimeUsed ? 1 : 0) + (bVisualizedPageUsed ? 1 : 0)
-                                + (bReducedDisplayQualityUsed ? 1 : 0)
-                                + (bExtraInformation ? mxExtendedInformation.getLength() : 0));
-
-        mxViewInformation.realloc(nCount);
-
-        if (bObjectTransformationUsed)
-        {
-            css::geometry::AffineMatrix2D aAffineMatrix2D;
-            basegfx::unotools::affineMatrixFromHomMatrix(aAffineMatrix2D, maObjectTransformation);
-            mxViewInformation[nIndex].Name = g_PropertyName_ObjectTransformation;
-            mxViewInformation[nIndex].Value <<= aAffineMatrix2D;
-            nIndex++;
-        }
-
-        if (bViewTransformationUsed)
-        {
-            css::geometry::AffineMatrix2D aAffineMatrix2D;
-            basegfx::unotools::affineMatrixFromHomMatrix(aAffineMatrix2D, maViewTransformation);
-            mxViewInformation[nIndex].Name = g_PropertyName_ViewTransformation;
-            mxViewInformation[nIndex].Value <<= aAffineMatrix2D;
-            nIndex++;
-        }
-
-        if (bViewportUsed)
-        {
-            const css::geometry::RealRectangle2D aViewport(
-                basegfx::unotools::rectangle2DFromB2DRectangle(maViewport));
-            mxViewInformation[nIndex].Name = g_PropertyName_Viewport;
-            mxViewInformation[nIndex].Value <<= aViewport;
-            nIndex++;
-        }
-
-        if (bTimeUsed)
-        {
-            mxViewInformation[nIndex].Name = g_PropertyName_Time;
-            mxViewInformation[nIndex].Value <<= mfViewTime;
-            nIndex++;
-        }
-
-        if (bVisualizedPageUsed)
-        {
-            mxViewInformation[nIndex].Name = g_PropertyName_VisualizedPage;
-            mxViewInformation[nIndex].Value <<= mxVisualizedPage;
-            nIndex++;
-        }
-
-        if (bExtraInformation)
-        {
-            const sal_Int32 nExtra(mxExtendedInformation.getLength());
-
-            for (sal_Int32 a(0); a < nExtra; a++)
-            {
-                mxViewInformation[nIndex++] = mxExtendedInformation[a];
-            }
-        }
-    }
-
 public:
     ImpViewInformation2D(const basegfx::B2DHomMatrix& rObjectTransformation,
                          const basegfx::B2DHomMatrix& rViewTransformation,
                          const basegfx::B2DRange& rViewport,
-                         const uno::Reference<drawing::XDrawPage>& rxDrawPage, double fViewTime)
+                         const uno::Reference<drawing::XDrawPage>& rxDrawPage, double fViewTime,
+                         bool bReducedDisplayQuality)
         : maObjectTransformation(rObjectTransformation)
         , maViewTransformation(rViewTransformation)
         , maViewport(rViewport)
         , mxVisualizedPage(rxDrawPage)
         , mfViewTime(fViewTime)
-        , mbReducedDisplayQuality(false)
+        , mbReducedDisplayQuality(bReducedDisplayQuality)
     {
     }
 
-    explicit ImpViewInformation2D(const uno::Sequence<beans::PropertyValue>& rViewParameters)
-        : mbReducedDisplayQuality(false)
-        , mxViewInformation(rViewParameters)
-    {
-        impInterpretPropertyValues(rViewParameters);
-    }
-
     ImpViewInformation2D()
-        : mbReducedDisplayQuality(false)
+        : mfViewTime(0.0)
+        , mbReducedDisplayQuality(false)
     {
     }
 
@@ -294,16 +156,6 @@ public:
 
     bool getReducedDisplayQuality() const { return mbReducedDisplayQuality; }
 
-    const uno::Sequence<beans::PropertyValue>& getViewInformationSequence() const
-    {
-        if (!mxViewInformation.hasElements())
-        {
-            const_cast<ImpViewInformation2D*>(this)->impFillViewInformationFromContent();
-        }
-
-        return mxViewInformation;
-    }
-
     bool operator==(const ImpViewInformation2D& rCandidate) const
     {
         return (maObjectTransformation == rCandidate.maObjectTransformation
@@ -325,14 +177,10 @@ ViewInformation2D::ViewInformation2D(const basegfx::B2DHomMatrix& rObjectTransfo
                                      const basegfx::B2DHomMatrix& rViewTransformation,
                                      const basegfx::B2DRange& rViewport,
                                      const uno::Reference<drawing::XDrawPage>& rxDrawPage,
-                                     double fViewTime)
+                                     double fViewTime, bool bReducedDisplayQuality)
     : mpViewInformation2D(ImpViewInformation2D(rObjectTransformation, rViewTransformation,
-                                               rViewport, rxDrawPage, fViewTime))
-{
-}
-
-ViewInformation2D::ViewInformation2D(const uno::Sequence<beans::PropertyValue>& rViewParameters)
-    : mpViewInformation2D(ImpViewInformation2D(rViewParameters))
+                                               rViewport, rxDrawPage, fViewTime,
+                                               bReducedDisplayQuality))
 {
 }
 
@@ -398,9 +246,121 @@ bool ViewInformation2D::getReducedDisplayQuality() const
     return mpViewInformation2D->getReducedDisplayQuality();
 }
 
-const uno::Sequence<beans::PropertyValue>& ViewInformation2D::getViewInformationSequence() const
+ViewInformation2D
+createViewInformation2D(const css::uno::Sequence<css::beans::PropertyValue>& rViewParameters)
 {
-    return mpViewInformation2D->getViewInformationSequence();
+    if (!rViewParameters.hasElements())
+        return ViewInformation2D();
+
+    bool bReducedDisplayQuality = false;
+    basegfx::B2DHomMatrix aObjectTransformation;
+    basegfx::B2DHomMatrix aViewTransformation;
+    basegfx::B2DRange aViewport;
+    double fViewTime = 0.0;
+    uno::Reference<drawing::XDrawPage> xVisualizedPage;
+
+    for (auto const& rPropertyValue : rViewParameters)
+    {
+        if (rPropertyValue.Name == g_PropertyName_ReducedDisplayQuality)
+        {
+            rPropertyValue.Value >>= bReducedDisplayQuality;
+        }
+        else if (rPropertyValue.Name == g_PropertyName_ObjectTransformation)
+        {
+            css::geometry::AffineMatrix2D aAffineMatrix2D;
+            rPropertyValue.Value >>= aAffineMatrix2D;
+            basegfx::unotools::homMatrixFromAffineMatrix(aObjectTransformation, aAffineMatrix2D);
+        }
+        else if (rPropertyValue.Name == g_PropertyName_ViewTransformation)
+        {
+            css::geometry::AffineMatrix2D aAffineMatrix2D;
+            rPropertyValue.Value >>= aAffineMatrix2D;
+            basegfx::unotools::homMatrixFromAffineMatrix(aViewTransformation, aAffineMatrix2D);
+        }
+        else if (rPropertyValue.Name == g_PropertyName_Viewport)
+        {
+            css::geometry::RealRectangle2D aUnoViewport;
+            rPropertyValue.Value >>= aUnoViewport;
+            aViewport = basegfx::unotools::b2DRectangleFromRealRectangle2D(aUnoViewport);
+        }
+        else if (rPropertyValue.Name == g_PropertyName_Time)
+        {
+            rPropertyValue.Value >>= fViewTime;
+        }
+        else if (rPropertyValue.Name == g_PropertyName_VisualizedPage)
+        {
+            rPropertyValue.Value >>= xVisualizedPage;
+        }
+    }
+
+    return ViewInformation2D(aObjectTransformation, aViewTransformation, aViewport, xVisualizedPage,
+                             fViewTime, bReducedDisplayQuality);
+}
+
+uno::Sequence<beans::PropertyValue>
+createPropertyValues(const ViewInformation2D& rViewInformation2D)
+{
+    const bool bObjectTransformationUsed(
+        !rViewInformation2D.getObjectTransformation().isIdentity());
+    const bool bViewTransformationUsed(!rViewInformation2D.getViewTransformation().isIdentity());
+    const bool bViewportUsed(!rViewInformation2D.getViewport().isEmpty());
+    const bool bTimeUsed(0.0 < rViewInformation2D.getViewTime());
+    const bool bVisualizedPageUsed(rViewInformation2D.getVisualizedPage().is());
+    const bool bReducedDisplayQualityUsed(rViewInformation2D.getReducedDisplayQuality());
+    uno::Sequence<beans::PropertyValue> aPropertyValues;
+
+    sal_uInt32 nIndex = 0;
+
+    const sal_uInt32 nCount((bObjectTransformationUsed ? 1 : 0) + (bViewTransformationUsed ? 1 : 0)
+                            + (bViewportUsed ? 1 : 0) + (bTimeUsed ? 1 : 0)
+                            + (bVisualizedPageUsed ? 1 : 0) + (bReducedDisplayQualityUsed ? 1 : 0));
+
+    aPropertyValues.realloc(nCount);
+
+    if (bObjectTransformationUsed)
+    {
+        css::geometry::AffineMatrix2D aAffineMatrix2D;
+        basegfx::unotools::affineMatrixFromHomMatrix(aAffineMatrix2D,
+                                                     rViewInformation2D.getObjectTransformation());
+        aPropertyValues[nIndex].Name = g_PropertyName_ObjectTransformation;
+        aPropertyValues[nIndex].Value <<= aAffineMatrix2D;
+        nIndex++;
+    }
+
+    if (bViewTransformationUsed)
+    {
+        css::geometry::AffineMatrix2D aAffineMatrix2D;
+        basegfx::unotools::affineMatrixFromHomMatrix(aAffineMatrix2D,
+                                                     rViewInformation2D.getViewTransformation());
+        aPropertyValues[nIndex].Name = g_PropertyName_ViewTransformation;
+        aPropertyValues[nIndex].Value <<= aAffineMatrix2D;
+        nIndex++;
+    }
+
+    if (bViewportUsed)
+    {
+        const css::geometry::RealRectangle2D aViewport(
+            basegfx::unotools::rectangle2DFromB2DRectangle(rViewInformation2D.getViewport()));
+        aPropertyValues[nIndex].Name = g_PropertyName_Viewport;
+        aPropertyValues[nIndex].Value <<= aViewport;
+        nIndex++;
+    }
+
+    if (bTimeUsed)
+    {
+        aPropertyValues[nIndex].Name = g_PropertyName_Time;
+        aPropertyValues[nIndex].Value <<= rViewInformation2D.getViewTime();
+        nIndex++;
+    }
+
+    if (bVisualizedPageUsed)
+    {
+        aPropertyValues[nIndex].Name = g_PropertyName_VisualizedPage;
+        aPropertyValues[nIndex].Value <<= rViewInformation2D.getVisualizedPage();
+        nIndex++;
+    }
+
+    return aPropertyValues;
 }
 
 } // end of namespace drawinglayer::geometry
diff --git a/drawinglayer/source/primitive2d/Tools.cxx b/drawinglayer/source/primitive2d/Tools.cxx
index 7db3a94c8d04..a6321cac1a89 100644
--- a/drawinglayer/source/primitive2d/Tools.cxx
+++ b/drawinglayer/source/primitive2d/Tools.cxx
@@ -47,10 +47,10 @@ getB2DRangeFromPrimitive2DReference(const Primitive2DReference& rCandidate,
         else
         {
             // use UNO API call instead
-            const uno::Sequence<beans::PropertyValue>& rViewParameters(
-                aViewInformation.getViewInformationSequence());
+            auto aViewParameters = geometry::createPropertyValues(aViewInformation);
+
             aRetval.expand(basegfx::unotools::b2DRectangleFromRealRectangle2D(
-                rCandidate->getRange(rViewParameters)));
+                rCandidate->getRange(aViewParameters)));
         }
     }
 
diff --git a/drawinglayer/source/primitive2d/baseprimitive2d.cxx b/drawinglayer/source/primitive2d/baseprimitive2d.cxx
index c0f879ec2f78..61cd0923ad3d 100644
--- a/drawinglayer/source/primitive2d/baseprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/baseprimitive2d.cxx
@@ -86,7 +86,7 @@ void BasePrimitive2D::get2DDecomposition(
 css::uno::Sequence<::css::uno::Reference<::css::graphic::XPrimitive2D>> SAL_CALL
 BasePrimitive2D::getDecomposition(const uno::Sequence<beans::PropertyValue>& rViewParameters)
 {
-    const geometry::ViewInformation2D aViewInformation(rViewParameters);
+    const auto aViewInformation = geometry::createViewInformation2D(rViewParameters);
     Primitive2DContainer aContainer;
     get2DDecomposition(aContainer, aViewInformation);
     return comphelper::containerToSequence(aContainer);
@@ -95,7 +95,7 @@ BasePrimitive2D::getDecomposition(const uno::Sequence<beans::PropertyValue>& rVi
 css::geometry::RealRectangle2D SAL_CALL
 BasePrimitive2D::getRange(const uno::Sequence<beans::PropertyValue>& rViewParameters)
 {
-    const geometry::ViewInformation2D aViewInformation(rViewParameters);
+    const auto aViewInformation = geometry::createViewInformation2D(rViewParameters);
     return basegfx::unotools::rectangle2DFromB2DRectangle(getB2DRange(aViewInformation));
 }
 
diff --git a/drawinglayer/source/processor2d/baseprocessor2d.cxx b/drawinglayer/source/processor2d/baseprocessor2d.cxx
index 9d1671dcf959..a7b079016747 100644
--- a/drawinglayer/source/processor2d/baseprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/baseprocessor2d.cxx
@@ -71,8 +71,8 @@ namespace drawinglayer::processor2d
                     else
                     {
                         // unknown implementation, use UNO API call instead and process recursively
-                        const uno::Sequence< beans::PropertyValue >& rViewParameters(getViewInformation2D().getViewInformationSequence());
-                        process(comphelper::sequenceToContainer<primitive2d::Primitive2DContainer>(xReference->getDecomposition(rViewParameters)));
+                        auto aViewParameters = geometry::createPropertyValues(getViewInformation2D());
+                        process(comphelper::sequenceToContainer<primitive2d::Primitive2DContainer>(xReference->getDecomposition(aViewParameters)));
                     }
                 }
             }
diff --git a/include/drawinglayer/geometry/viewinformation2d.hxx b/include/drawinglayer/geometry/viewinformation2d.hxx
index 20ef7c4de453..0cc385f1e49f 100644
--- a/include/drawinglayer/geometry/viewinformation2d.hxx
+++ b/include/drawinglayer/geometry/viewinformation2d.hxx
@@ -57,11 +57,8 @@ namespace drawinglayer::geometry
 {
 /** ViewInformation2D class
 
-    This class holds all view-relevant information for a 2d geometry. It works
-    together with UNO API definitions and supports holding a sequence of PropertyValues.
+    This class holds all view-relevant information for a 2d geometry.
     The most used data is for convenience offered directly using basegfx tooling classes.
-    It is an implementation to support the sequence of PropertyValues used in a
-    css::graphic::XPrimitive2D for C++ implementations working with those
 */
 class DRAWINGLAYER_DLLPUBLIC ViewInformation2D
 {
@@ -94,28 +91,13 @@ public:
         The time the view is defined for. Default is 0.0. This parameter is used e.g. for
         animated objects
 
-        @param rExtendedParameters
-        A sequence of property values which allows holding various other parameters besides
-        the obvious and needed ones above. For this constructor none of the other parameters
-        should be added as data. The constructor will parse the given parameters and if
-        data for the other parameters is given, the value in rExtendedParameters will
-        be preferred and overwrite the given parameter
+        @param rReducedDisplayQuality
     */
     ViewInformation2D(const basegfx::B2DHomMatrix& rObjectTransformation,
                       const basegfx::B2DHomMatrix& rViewTransformation,
                       const basegfx::B2DRange& rViewport,
                       const css::uno::Reference<css::drawing::XDrawPage>& rxDrawPage,
-                      double fViewTime);
-
-    /** Constructor: Create a ViewInformation2D
-
-        @param rViewParameters
-        A sequence of property values which allows holding any combination of local and various
-        other parameters. This constructor is fed completely with a sequence of PropertyValues
-        which will be parsed to be able to offer the most used ones in a convenient way.
-    */
-    explicit ViewInformation2D(
-        const css::uno::Sequence<css::beans::PropertyValue>& rViewParameters);
+                      double fViewTime, bool bReducedDisplayQuality = false);
 
     /// default (empty) constructor
     ViewInformation2D();
@@ -156,17 +138,13 @@ public:
         implementations of the primitives
      */
     bool getReducedDisplayQuality() const;
-
-    /** Get the uno::Sequence< beans::PropertyValue > which contains all ViewInformation
-
-        Use this call if You need to extract all contained ViewInformation. The ones
-        directly supported for convenience will be added to the ones only available
-        as PropertyValues. This set completely describes this ViewInformation2D and
-        can be used for complete information transport over UNO API.
-    */
-    const css::uno::Sequence<css::beans::PropertyValue>& getViewInformationSequence() const;
 };
 
+DRAWINGLAYER_DLLPUBLIC ViewInformation2D
+createViewInformation2D(const css::uno::Sequence<css::beans::PropertyValue>& rViewParameters);
+DRAWINGLAYER_DLLPUBLIC css::uno::Sequence<css::beans::PropertyValue>
+createPropertyValues(const ViewInformation2D& rViewInformation2D);
+
 } // end of namespace drawinglayer::geometry
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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));


More information about the Libreoffice-commits mailing list