[Libreoffice-commits] core.git: Branch 'feature/drawinglayercore' - 152 commits - android/source bin/update_pch_bisect bin/upload_symbols.py chart2/qa chart2/source compilerplugins/clang configure.ac cui/source dbaccess/source desktop/source distro-configs/Jenkins drawinglayer/CppunitTest_drawinglayer_border.mk drawinglayer/inc drawinglayer/Library_drawinglayercore.mk drawinglayer/Library_drawinglayer.mk drawinglayer/Module_drawinglayer.mk drawinglayer/source editeng/source emfio/CppunitTest_emfio_emf_test.mk emfio/Library_emfio.mk extensions/source external/skia extras/Module_extras.mk extras/Package_gallhtmlexpo.mk extras/Package_gallmytheme.mk extras/Package_gallwwwgraf.mk extras/source filter/Library_svgfilter.mk filter/qa filter/source forms/source framework/source helpcompiler/source helpcontent2 hwpfilter/source i18nlangtag/source i18npool/source icon-themes/breeze icon-themes/breeze_dark icon-themes/breeze_dark_svg icon-themes/breeze_svg icon-themes/colibre icon-themes/colibre_svg icon-th emes/elementary icon-themes/elementary_svg icon-themes/karasa_jaga icon-themes/karasa_jaga_svg icon-themes/sifr icon-themes/sifr_dark icon-themes/sifr_dark_svg icon-themes/sifr_svg icon-themes/sukapura icon-themes/sukapura_svg idlc/source idl/source include/drawinglayer include/LibreOfficeKit include/sfx2 include/svx include/toolkit include/vcl include/xmloff io/source jvmfwk/plugins jvmfwk/source l10ntools/source librelogo/source lingucomponent/source linguistic/source lotuswordpro/source offapi/com oox/source pyuno/inc pyuno/qa pyuno/source qadevOOo/qa readlicense_oo/license reportdesign/source Repository.mk sc/CppunitTest_sc_ucalc.mk schema/libreoffice sc/inc sc/Library_sc.mk sc/qa scripting/source sc/source sd/CppunitTest_sd_uimpress.mk sdext/source sd/Library_sd.mk sd/Package_web.mk sd/qa sd/res sd/source sfx2/Library_sfx.mk sfx2/source solenv/bin solenv/clang-format solenv/gbuild starmath/source svgio/CppunitTest_svgio.mk svgio/Library_svgio.mk svgio/source svx/CppunitTest_svx _unit.mk svx/inc svx/Library_svxcore.mk svx/Library_svx.mk svx/source svx/uiconfig sw/CppunitTest_sw_uwriter.mk sw/Library_sw.mk sw/Library_swui.mk sw/qa sw/source test/source testtools/source toolkit/inc toolkit/source ucb/source uitest/libreoffice unotest/source uui/source vcl/headless vcl/inc vcl/Library_vcl.mk vcl/opengl vcl/skia vcl/source vcl/unx vcl/win wizards/source writerfilter/inc writerfilter/Library_writerfilter.mk writerfilter/source xmloff/inc xmloff/source xmloff/util xmlscript/source xmlsecurity/source

Tomaž Vajngerl (via logerrit) logerrit at kemper.freedesktop.org
Sat Apr 11 10:21:26 UTC 2020


Rebased ref, commits from common ancestor:
commit c1dc6fb21c8829a22067f90bc9aed2e9d05c72d3
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sat Apr 11 12:12:19 2020 +0200
Commit:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Sat Apr 11 12:19:40 2020 +0200

    remove {line,stroke}attribute.hxx from clang-format blacklist
    
    Change-Id: I4826b94da3982be8807c4eba63971cb7d3df9d8a

diff --git a/include/drawinglayer/attribute/lineattribute.hxx b/include/drawinglayer/attribute/lineattribute.hxx
index 90c50f904fe9..77828a15d21e 100644
--- a/include/drawinglayer/attribute/lineattribute.hxx
+++ b/include/drawinglayer/attribute/lineattribute.hxx
@@ -26,51 +26,50 @@
 #include <com/sun/star/drawing/LineCap.hpp>
 #include <o3tl/cow_wrapper.hxx>
 
-namespace basegfx {
-    class BColor;
+namespace basegfx
+{
+class BColor;
 }
 
-namespace drawinglayer::attribute {
-    class ImpLineAttribute;
+namespace drawinglayer::attribute
+{
+class ImpLineAttribute;
 }
 
 namespace drawinglayer::attribute
 {
-        class DRAWINGLAYER_DLLPUBLIC LineAttribute
-        {
-        public:
-            typedef o3tl::cow_wrapper< ImpLineAttribute > ImplType;
+class DRAWINGLAYER_DLLPUBLIC LineAttribute
+{
+public:
+    typedef o3tl::cow_wrapper<ImpLineAttribute> ImplType;
 
-        private:
-            ImplType  mpLineAttribute;
+private:
+    ImplType mpLineAttribute;
 
-        public:
-            /// constructors/assignmentoperator/destructor
-            explicit LineAttribute(
-                const basegfx::BColor& rColor,
-                double fWidth = 0.0,
-                basegfx::B2DLineJoin aB2DLineJoin = basegfx::B2DLineJoin::Round,
-                css::drawing::LineCap aLineCap = css::drawing::LineCap_BUTT,
-                double fMiterMinimumAngle = basegfx::deg2rad(15.0));
-            LineAttribute();
-            LineAttribute(const LineAttribute&);
-            LineAttribute& operator=(const LineAttribute&);
-            ~LineAttribute();
+public:
+    /// constructors/assignmentoperator/destructor
+    explicit LineAttribute(const basegfx::BColor& rColor, double fWidth = 0.0,
+                           basegfx::B2DLineJoin aB2DLineJoin = basegfx::B2DLineJoin::Round,
+                           css::drawing::LineCap aLineCap = css::drawing::LineCap_BUTT,
+                           double fMiterMinimumAngle = basegfx::deg2rad(15.0));
+    LineAttribute();
+    LineAttribute(const LineAttribute&);
+    LineAttribute& operator=(const LineAttribute&);
+    ~LineAttribute();
 
-            // checks if the incarnation is default constructed
-            bool isDefault() const;
+    // checks if the incarnation is default constructed
+    bool isDefault() const;
 
-            // compare operator
-            bool operator==(const LineAttribute& rCandidate) const;
+    // compare operator
+    bool operator==(const LineAttribute& rCandidate) const;
 
-            // data read access
-            const basegfx::BColor& getColor() const;
-            double getWidth() const;
-            basegfx::B2DLineJoin getLineJoin() const;
-            css::drawing::LineCap getLineCap() const;
-            double getMiterMinimumAngle() const;
-        };
+    // data read access
+    const basegfx::BColor& getColor() const;
+    double getWidth() const;
+    basegfx::B2DLineJoin getLineJoin() const;
+    css::drawing::LineCap getLineCap() const;
+    double getMiterMinimumAngle() const;
+};
 } // end of namespace drawinglayer
 
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/drawinglayer/attribute/strokeattribute.hxx b/include/drawinglayer/attribute/strokeattribute.hxx
index fd9409e9519d..d5d825c54710 100644
--- a/include/drawinglayer/attribute/strokeattribute.hxx
+++ b/include/drawinglayer/attribute/strokeattribute.hxx
@@ -23,43 +23,42 @@
 #include <o3tl/cow_wrapper.hxx>
 #include <vector>
 
-namespace drawinglayer::attribute {
-    class ImpStrokeAttribute;
+namespace drawinglayer::attribute
+{
+class ImpStrokeAttribute;
 }
 
 namespace drawinglayer::attribute
 {
-        class DRAWINGLAYER_DLLPUBLIC StrokeAttribute
-        {
-        public:
-            typedef o3tl::cow_wrapper< ImpStrokeAttribute > ImplType;
+class DRAWINGLAYER_DLLPUBLIC StrokeAttribute
+{
+public:
+    typedef o3tl::cow_wrapper<ImpStrokeAttribute> ImplType;
 
-        private:
-            ImplType mpStrokeAttribute;
+private:
+    ImplType mpStrokeAttribute;
 
-        public:
-            /// constructors/assignmentoperator/destructor
-            explicit StrokeAttribute(
-                const ::std::vector< double >& rDotDashArray,
-                double fFullDotDashLen = 0.0);
-            StrokeAttribute();
-            StrokeAttribute(const StrokeAttribute&);
-            StrokeAttribute(StrokeAttribute&&);
-            StrokeAttribute& operator=(const StrokeAttribute&);
-            StrokeAttribute& operator=(StrokeAttribute&&);
-            ~StrokeAttribute();
+public:
+    /// constructors/assignmentoperator/destructor
+    explicit StrokeAttribute(const ::std::vector<double>& rDotDashArray,
+                             double fFullDotDashLen = 0.0);
+    StrokeAttribute();
+    StrokeAttribute(const StrokeAttribute&);
+    StrokeAttribute(StrokeAttribute&&);
+    StrokeAttribute& operator=(const StrokeAttribute&);
+    StrokeAttribute& operator=(StrokeAttribute&&);
+    ~StrokeAttribute();
 
-            // checks if the incarnation is default constructed
-            bool isDefault() const;
+    // checks if the incarnation is default constructed
+    bool isDefault() const;
 
-            // compare operator
-            bool operator==(const StrokeAttribute& rCandidate) const;
+    // compare operator
+    bool operator==(const StrokeAttribute& rCandidate) const;
 
-            // data read access
-            const ::std::vector< double >& getDotDashArray() const;
-            double getFullDotDashLen() const;
-        };
+    // data read access
+    const ::std::vector<double>& getDotDashArray() const;
+    double getFullDotDashLen() const;
+};
 } // end of namespace drawinglayer::attribute
 
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 95d4390ce95d..9c3867222c7a 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -5851,7 +5851,6 @@ include/drawinglayer/attribute/fillgradientattribute.hxx
 include/drawinglayer/attribute/fillgraphicattribute.hxx
 include/drawinglayer/attribute/fillhatchattribute.hxx
 include/drawinglayer/attribute/fontattribute.hxx
-include/drawinglayer/attribute/lineattribute.hxx
 include/drawinglayer/attribute/linestartendattribute.hxx
 include/drawinglayer/attribute/materialattribute3d.hxx
 include/drawinglayer/attribute/sdrallattribute3d.hxx
@@ -5864,7 +5863,6 @@ include/drawinglayer/attribute/sdrlinestartendattribute.hxx
 include/drawinglayer/attribute/sdrobjectattribute3d.hxx
 include/drawinglayer/attribute/sdrsceneattribute3d.hxx
 include/drawinglayer/attribute/sdrshadowattribute.hxx
-include/drawinglayer/attribute/strokeattribute.hxx
 include/drawinglayer/geometry/viewinformation3d.hxx
 include/drawinglayer/primitive2d/discretebitmapprimitive2d.hxx
 include/drawinglayer/primitive2d/discreteshadowprimitive2d.hxx
commit 247f057a673fb3c88820792d7d24341ee8ddbe10
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sat Apr 11 12:08:45 2020 +0200
Commit:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Sat Apr 11 12:19:40 2020 +0200

    clean-up NS and pragma once for LineAttribute, StrokeAttribute
    
    Change-Id: Ic914fcb9a0bf9b30feff40ec39c1002ac6eae1cb

diff --git a/include/drawinglayer/attribute/lineattribute.hxx b/include/drawinglayer/attribute/lineattribute.hxx
index 4f01c1f574cb..90c50f904fe9 100644
--- a/include/drawinglayer/attribute/lineattribute.hxx
+++ b/include/drawinglayer/attribute/lineattribute.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_LINEATTRIBUTE_HXX
-#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_LINEATTRIBUTE_HXX
+#pragma once
 
 #include <drawinglayer/drawinglayerdllapi.h>
 
@@ -27,22 +26,16 @@
 #include <com/sun/star/drawing/LineCap.hpp>
 #include <o3tl/cow_wrapper.hxx>
 
-
-// predefines
-
 namespace basegfx {
     class BColor;
 }
 
-namespace drawinglayer { namespace attribute {
+namespace drawinglayer::attribute {
     class ImpLineAttribute;
-}}
-
+}
 
-namespace drawinglayer
+namespace drawinglayer::attribute
 {
-    namespace attribute
-    {
         class DRAWINGLAYER_DLLPUBLIC LineAttribute
         {
         public:
@@ -77,10 +70,7 @@ namespace drawinglayer
             css::drawing::LineCap getLineCap() const;
             double getMiterMinimumAngle() const;
         };
-    } // end of namespace attribute
 } // end of namespace drawinglayer
 
 
-#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_LINEATTRIBUTE_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/drawinglayer/attribute/strokeattribute.hxx b/include/drawinglayer/attribute/strokeattribute.hxx
index 40e15707b25f..fd9409e9519d 100644
--- a/include/drawinglayer/attribute/strokeattribute.hxx
+++ b/include/drawinglayer/attribute/strokeattribute.hxx
@@ -17,25 +17,18 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_STROKEATTRIBUTE_HXX
-#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_STROKEATTRIBUTE_HXX
+#pragma once
 
 #include <drawinglayer/drawinglayerdllapi.h>
 #include <o3tl/cow_wrapper.hxx>
 #include <vector>
 
-
-// predefines
-
-namespace drawinglayer { namespace attribute {
+namespace drawinglayer::attribute {
     class ImpStrokeAttribute;
-}}
+}
 
-
-namespace drawinglayer
+namespace drawinglayer::attribute
 {
-    namespace attribute
-    {
         class DRAWINGLAYER_DLLPUBLIC StrokeAttribute
         {
         public:
@@ -66,10 +59,7 @@ namespace drawinglayer
             const ::std::vector< double >& getDotDashArray() const;
             double getFullDotDashLen() const;
         };
-    } // end of namespace attribute
-} // end of namespace drawinglayer
-
+} // end of namespace drawinglayer::attribute
 
-#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_STROKEATTRIBUTE_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit d9b5ab700376e130c36b234aad690af2161a0fe5
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sat Apr 11 12:02:47 2020 +0200
Commit:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Sat Apr 11 12:19:40 2020 +0200

    replace and remove VectorGraphicDataPtr typedef for the real type
    
    There is no need to hide std::shared_ptr<VectorGraphicData> type
    under an alias name. It doesn't make the code more understandble
    and it usually is the exact opposite because we know with what
    type we are dealing with.
    
    Change-Id: Iec80ee99697ff2fe3a8275fc2787b5370510ebe6

diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx
index b7e6bcb66e53..0440ac94e1c9 100644
--- a/filter/source/svg/svgfilter.cxx
+++ b/filter/source/svg/svgfilter.cxx
@@ -254,7 +254,7 @@ bool SVGFilter::filterImpressOrDraw( const Sequence< PropertyValue >& rDescripto
 
             // tdf#118232 Get the sequence of primitives and check if geometry is completely
             // hidden. If so, there is no need to add a SdrObject at all
-            const VectorGraphicDataPtr& rVectorGraphicData(aGraphic.getVectorGraphicData());
+            auto const & rVectorGraphicData(aGraphic.getVectorGraphicData());
             bool bContainsNoGeometry(false);
 
             if(bool(rVectorGraphicData) && VectorGraphicDataType::Svg == rVectorGraphicData->getVectorGraphicDataType())
diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx
index 6e70f66731ac..b304cfb7ac97 100644
--- a/include/vcl/graph.hxx
+++ b/include/vcl/graph.hxx
@@ -99,7 +99,7 @@ public:
                     Graphic( const Bitmap& rBmp );
                     Graphic( const Image& rImage );
                     Graphic( const BitmapEx& rBmpEx );
-                    Graphic( const VectorGraphicDataPtr& rVectorGraphicDataPtr );
+                    Graphic( const std::shared_ptr<VectorGraphicData>& rVectorGraphicDataPtr );
                     Graphic( const Animation& rAnimation );
                     Graphic( const GDIMetaFile& rMtf );
                     Graphic( const css::uno::Reference< css::graphic::XGraphic >& rxGraphic );
@@ -202,7 +202,7 @@ public:
 
 public:
 
-    const VectorGraphicDataPtr& getVectorGraphicData() const;
+    const std::shared_ptr<VectorGraphicData>& getVectorGraphicData() const;
 
     /// Get the page number of the multi-page source this Graphic is rendered from.
     sal_Int32 getPageNumber() const;
diff --git a/include/vcl/vectorgraphicdata.hxx b/include/vcl/vectorgraphicdata.hxx
index 7e272602f67f..f982537da67d 100644
--- a/include/vcl/vectorgraphicdata.hxx
+++ b/include/vcl/vectorgraphicdata.hxx
@@ -115,8 +115,6 @@ public:
     bool isPrimitiveSequenceCreated() const { return mbSequenceCreated; }
 };
 
-typedef std::shared_ptr< VectorGraphicData > VectorGraphicDataPtr;
-
 #endif // INCLUDED_VCL_VECTORGRAPHICDATA_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/core/graphichelper.cxx b/svx/source/core/graphichelper.cxx
index ab2b85786be9..e1278da3b5ab 100644
--- a/svx/source/core/graphichelper.cxx
+++ b/svx/source/core/graphichelper.cxx
@@ -67,11 +67,11 @@ namespace drawing = com::sun::star::drawing;
 void GraphicHelper::GetPreferredExtension( OUString& rExtension, const Graphic& rGraphic )
 {
     OUString aExtension = "png";
-    const VectorGraphicDataPtr& aVectorGraphicDataPtr(rGraphic.getVectorGraphicData());
+    auto const & rVectorGraphicDataPtr(rGraphic.getVectorGraphicData());
 
-    if (aVectorGraphicDataPtr.get() && aVectorGraphicDataPtr->getVectorGraphicDataArrayLength())
+    if (rVectorGraphicDataPtr && rVectorGraphicDataPtr->getVectorGraphicDataArrayLength())
     {
-        switch (aVectorGraphicDataPtr->getVectorGraphicDataType())
+        switch (rVectorGraphicDataPtr->getVectorGraphicDataType())
         {
         case VectorGraphicDataType::Wmf:
             aExtension = "wmf";
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 49c4c3175dd6..fc70e8bc1984 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -133,9 +133,9 @@ void SdrGrafObj::onGraphicChanged()
     if (!mpGraphicObject || !mpGraphicObject->GetGraphic().isAvailable())
         return;
 
-    const VectorGraphicDataPtr& rVectorGraphicDataPtr = mpGraphicObject->GetGraphic().getVectorGraphicData();
+    auto const & rVectorGraphicDataPtr = mpGraphicObject->GetGraphic().getVectorGraphicData();
 
-    if (!rVectorGraphicDataPtr.get())
+    if (!rVectorGraphicDataPtr)
         return;
 
     // Skip for PDF as it is only a bitmap primitive in a sequence and
@@ -282,9 +282,9 @@ const GraphicObject* SdrGrafObj::GetReplacementGraphicObject() const
 {
     if (!mpReplacementGraphicObject && mpGraphicObject)
     {
-        const VectorGraphicDataPtr& rVectorGraphicDataPtr = mpGraphicObject->GetGraphic().getVectorGraphicData();
+        auto const & rVectorGraphicDataPtr = mpGraphicObject->GetGraphic().getVectorGraphicData();
 
-        if (rVectorGraphicDataPtr.get())
+        if (rVectorGraphicDataPtr)
         {
             const_cast< SdrGrafObj* >(this)->mpReplacementGraphicObject.reset(new GraphicObject(rVectorGraphicDataPtr->getReplacement()));
         }
@@ -552,11 +552,11 @@ OUString SdrGrafObj::TakeObjNameSingul() const
     if (!mpGraphicObject)
         return OUString();
 
-    const VectorGraphicDataPtr& rVectorGraphicDataPtr = mpGraphicObject->GetGraphic().getVectorGraphicData();
+    auto const & rVectorGraphicDataPtr = mpGraphicObject->GetGraphic().getVectorGraphicData();
 
     OUStringBuffer sName;
 
-    if(rVectorGraphicDataPtr.get())
+    if (rVectorGraphicDataPtr)
     {
         switch (rVectorGraphicDataPtr->getVectorGraphicDataType())
         {
@@ -622,11 +622,11 @@ OUString SdrGrafObj::TakeObjNamePlural() const
     if (!mpGraphicObject)
         return OUString();
 
-    const VectorGraphicDataPtr& rVectorGraphicDataPtr = mpGraphicObject->GetGraphic().getVectorGraphicData();
+    auto const & rVectorGraphicDataPtr = mpGraphicObject->GetGraphic().getVectorGraphicData();
 
     OUStringBuffer sName;
 
-    if(rVectorGraphicDataPtr.get())
+    if (rVectorGraphicDataPtr)
     {
         switch (rVectorGraphicDataPtr->getVectorGraphicDataType())
         {
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index 7eadfe7cacc4..500a30375c62 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -130,15 +130,14 @@ ErrCode XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileName,
         }
 
         // #i121128# use shortcut to write Vector Graphic Data data in original form (if possible)
-        const VectorGraphicDataPtr& aVectorGraphicDataPtr(rGraphic.getVectorGraphicData());
+        auto const & rVectorGraphicDataPtr(rGraphic.getVectorGraphicData());
 
-        if(aVectorGraphicDataPtr.get()
-            && aVectorGraphicDataPtr->getVectorGraphicDataArrayLength())
+        if (rVectorGraphicDataPtr && rVectorGraphicDataPtr->getVectorGraphicDataArrayLength())
         {
-            const bool bIsSvg(rFilterName.equalsIgnoreAsciiCase("svg") && VectorGraphicDataType::Svg == aVectorGraphicDataPtr->getVectorGraphicDataType());
-            const bool bIsWmf(rFilterName.equalsIgnoreAsciiCase("wmf") && VectorGraphicDataType::Wmf == aVectorGraphicDataPtr->getVectorGraphicDataType());
-            const bool bIsEmf(rFilterName.equalsIgnoreAsciiCase("emf") && VectorGraphicDataType::Emf == aVectorGraphicDataPtr->getVectorGraphicDataType());
-            const bool bIsPdf(rFilterName.equalsIgnoreAsciiCase("pdf") && VectorGraphicDataType::Pdf == aVectorGraphicDataPtr->getVectorGraphicDataType());
+            const bool bIsSvg(rFilterName.equalsIgnoreAsciiCase("svg") && VectorGraphicDataType::Svg == rVectorGraphicDataPtr->getVectorGraphicDataType());
+            const bool bIsWmf(rFilterName.equalsIgnoreAsciiCase("wmf") && VectorGraphicDataType::Wmf == rVectorGraphicDataPtr->getVectorGraphicDataType());
+            const bool bIsEmf(rFilterName.equalsIgnoreAsciiCase("emf") && VectorGraphicDataType::Emf == rVectorGraphicDataPtr->getVectorGraphicDataType());
+            const bool bIsPdf(rFilterName.equalsIgnoreAsciiCase("pdf") && VectorGraphicDataType::Pdf == rVectorGraphicDataPtr->getVectorGraphicDataType());
 
             if (bIsSvg || bIsWmf || bIsEmf || bIsPdf)
             {
@@ -153,7 +152,7 @@ ErrCode XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileName,
 
                 if (pOStm)
                 {
-                    pOStm->WriteBytes(aVectorGraphicDataPtr->getVectorGraphicDataArray().getConstArray(), aVectorGraphicDataPtr->getVectorGraphicDataArrayLength());
+                    pOStm->WriteBytes(rVectorGraphicDataPtr->getVectorGraphicDataArray().getConstArray(), rVectorGraphicDataPtr->getVectorGraphicDataArrayLength());
                     aMedium.Commit();
 
                     if (!aMedium.GetError())
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 6e042765ab7c..bb39141cc49a 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -313,9 +313,9 @@ void SwGrfNode::onGraphicChanged()
         OUString aName;
         OUString aTitle;
         OUString aDesc;
-        const VectorGraphicDataPtr& rVectorGraphicDataPtr = GetGrf().getVectorGraphicData();
+        auto const & rVectorGraphicDataPtr = GetGrf().getVectorGraphicData();
 
-        if(rVectorGraphicDataPtr.get())
+        if (rVectorGraphicDataPtr)
         {
             const drawinglayer::primitive2d::Primitive2DContainer aSequence(rVectorGraphicDataPtr->getPrimitive2DSequence());
 
@@ -375,9 +375,9 @@ const GraphicObject* SwGrfNode::GetReplacementGrfObj() const
 {
     if(!mpReplacementGraphic)
     {
-        const VectorGraphicDataPtr& rVectorGraphicDataPtr = GetGrfObj().GetGraphic().getVectorGraphicData();
+        auto const & rVectorGraphicDataPtr = GetGrfObj().GetGraphic().getVectorGraphicData();
 
-        if(rVectorGraphicDataPtr.get())
+        if (rVectorGraphicDataPtr)
         {
             const_cast< SwGrfNode* >(this)->mpReplacementGraphic.reset( new GraphicObject(rVectorGraphicDataPtr->getReplacement()) );
         }
diff --git a/vcl/inc/graphic/Manager.hxx b/vcl/inc/graphic/Manager.hxx
index d127201266f5..bb52a0cfcf8f 100644
--- a/vcl/inc/graphic/Manager.hxx
+++ b/vcl/inc/graphic/Manager.hxx
@@ -62,7 +62,8 @@ public:
     std::shared_ptr<ImpGraphic> newInstance();
     std::shared_ptr<ImpGraphic> newInstance(const Bitmap& rBitmap);
     std::shared_ptr<ImpGraphic> newInstance(const BitmapEx& rBitmapEx);
-    std::shared_ptr<ImpGraphic> newInstance(const VectorGraphicDataPtr& rVectorGraphicDataPtr);
+    std::shared_ptr<ImpGraphic>
+    newInstance(const std::shared_ptr<VectorGraphicData>& rVectorGraphicDataPtr);
     std::shared_ptr<ImpGraphic> newInstance(const Animation& rAnimation);
     std::shared_ptr<ImpGraphic> newInstance(const GDIMetaFile& rMtf);
     std::shared_ptr<ImpGraphic> newInstance(const GraphicExternalLink& rGraphicLink);
diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx
index a5435ee73b39..eaf691c10f1b 100644
--- a/vcl/inc/impgraph.hxx
+++ b/vcl/inc/impgraph.hxx
@@ -65,7 +65,7 @@ private:
     mutable sal_uLong            mnSizeBytes;
     bool                         mbSwapOut;
     bool                         mbDummyContext;
-    VectorGraphicDataPtr         maVectorGraphicData;
+    std::shared_ptr<VectorGraphicData> maVectorGraphicData;
     // cache checksum computation
     mutable BitmapChecksum       mnChecksum = 0;
 
@@ -82,7 +82,7 @@ public:
     ImpGraphic( const GraphicExternalLink& rExternalLink);
     ImpGraphic( const Bitmap& rBmp );
     ImpGraphic( const BitmapEx& rBmpEx );
-    ImpGraphic(const VectorGraphicDataPtr& rVectorGraphicDataPtr);
+    ImpGraphic(const std::shared_ptr<VectorGraphicData>& rVectorGraphicDataPtr);
     ImpGraphic( const Animation& rAnimation );
     ImpGraphic( const GDIMetaFile& rMtf );
     ~ImpGraphic();
@@ -193,7 +193,7 @@ private:
     friend void         WriteImpGraphic(SvStream& rOStm, const ImpGraphic& rImpGraphic);
     friend void         ReadImpGraphic(SvStream& rIStm, ImpGraphic& rImpGraphic);
 
-    const VectorGraphicDataPtr& getVectorGraphicData() const;
+    const std::shared_ptr<VectorGraphicData>& getVectorGraphicData() const;
 
     bool ensureAvailable () const;
 
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 0cc0e3abf80c..9262a91592d9 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1576,7 +1576,7 @@ ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPath,
 
                         if(!aMemStream.GetError() )
                         {
-                            VectorGraphicDataPtr aVectorGraphicDataPtr = std::make_shared<VectorGraphicData>(aNewData, rPath, VectorGraphicDataType::Svg);
+                            auto aVectorGraphicDataPtr = std::make_shared<VectorGraphicData>(aNewData, rPath, VectorGraphicDataType::Svg);
                             rGraphic = Graphic(aVectorGraphicDataPtr);
                             bOkay = true;
                         }
@@ -1589,7 +1589,7 @@ ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPath,
 
                     if(!rIStream.GetError())
                     {
-                        VectorGraphicDataPtr aVectorGraphicDataPtr = std::make_shared<VectorGraphicData>(aNewData, rPath, VectorGraphicDataType::Svg);
+                        auto aVectorGraphicDataPtr = std::make_shared<VectorGraphicData>(aNewData, rPath, VectorGraphicDataType::Svg);
                         rGraphic = Graphic(aVectorGraphicDataPtr);
                         bOkay = true;
                     }
@@ -1659,7 +1659,7 @@ ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPath,
             {
                 const bool bIsWmf(aFilterName.equalsIgnoreAsciiCase(IMP_WMF));
                 const VectorGraphicDataType aDataType(bIsWmf ? VectorGraphicDataType::Wmf : VectorGraphicDataType::Emf);
-                VectorGraphicDataPtr aVectorGraphicDataPtr =
+                auto aVectorGraphicDataPtr =
                     std::make_shared<VectorGraphicData>(
                         aNewData,
                         rPath,
@@ -1927,13 +1927,13 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString& r
                 bool bDone(false);
 
                 // do we have a native Vector Graphic Data RenderGraphic, whose data can be written directly?
-                const VectorGraphicDataPtr& aVectorGraphicDataPtr(rGraphic.getVectorGraphicData());
+                auto const & rVectorGraphicDataPtr(rGraphic.getVectorGraphicData());
 
-                if (aVectorGraphicDataPtr.get()
-                    && aVectorGraphicDataPtr->getVectorGraphicDataArrayLength()
-                    && VectorGraphicDataType::Wmf == aVectorGraphicDataPtr->getVectorGraphicDataType())
+                if (rVectorGraphicDataPtr
+                    && rVectorGraphicDataPtr->getVectorGraphicDataArrayLength()
+                    && VectorGraphicDataType::Wmf == rVectorGraphicDataPtr->getVectorGraphicDataType())
                 {
-                    rOStm.WriteBytes(aVectorGraphicDataPtr->getVectorGraphicDataArray().getConstArray(), aVectorGraphicDataPtr->getVectorGraphicDataArrayLength());
+                    rOStm.WriteBytes(rVectorGraphicDataPtr->getVectorGraphicDataArray().getConstArray(), rVectorGraphicDataPtr->getVectorGraphicDataArrayLength());
 
                     if (rOStm.GetError())
                     {
@@ -1960,13 +1960,13 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString& r
                 bool bDone(false);
 
                 // do we have a native Vector Graphic Data RenderGraphic, whose data can be written directly?
-                const VectorGraphicDataPtr& aVectorGraphicDataPtr(rGraphic.getVectorGraphicData());
+                auto const & rVectorGraphicDataPtr(rGraphic.getVectorGraphicData());
 
-                if (aVectorGraphicDataPtr.get()
-                    && aVectorGraphicDataPtr->getVectorGraphicDataArrayLength()
-                    && VectorGraphicDataType::Emf == aVectorGraphicDataPtr->getVectorGraphicDataType())
+                if (rVectorGraphicDataPtr
+                    && rVectorGraphicDataPtr->getVectorGraphicDataArrayLength()
+                    && VectorGraphicDataType::Emf == rVectorGraphicDataPtr->getVectorGraphicDataType())
                 {
-                    rOStm.WriteBytes(aVectorGraphicDataPtr->getVectorGraphicDataArray().getConstArray(), aVectorGraphicDataPtr->getVectorGraphicDataArrayLength());
+                    rOStm.WriteBytes(rVectorGraphicDataPtr->getVectorGraphicDataArray().getConstArray(), rVectorGraphicDataPtr->getVectorGraphicDataArrayLength());
 
                     if (rOStm.GetError())
                     {
@@ -2054,13 +2054,13 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString& r
                 bool bDone(false);
 
                 // do we have a native Vector Graphic Data RenderGraphic, whose data can be written directly?
-                const VectorGraphicDataPtr& aVectorGraphicDataPtr(rGraphic.getVectorGraphicData());
+                auto const & rVectorGraphicDataPtr(rGraphic.getVectorGraphicData());
 
-                if (aVectorGraphicDataPtr.get()
-                    && aVectorGraphicDataPtr->getVectorGraphicDataArrayLength()
-                    && VectorGraphicDataType::Svg == aVectorGraphicDataPtr->getVectorGraphicDataType())
+                if (rVectorGraphicDataPtr
+                    && rVectorGraphicDataPtr->getVectorGraphicDataArrayLength()
+                    && VectorGraphicDataType::Svg == rVectorGraphicDataPtr->getVectorGraphicDataType())
                 {
-                    rOStm.WriteBytes(aVectorGraphicDataPtr->getVectorGraphicDataArray().getConstArray(), aVectorGraphicDataPtr->getVectorGraphicDataArrayLength());
+                    rOStm.WriteBytes(rVectorGraphicDataPtr->getVectorGraphicDataArray().getConstArray(), rVectorGraphicDataPtr->getVectorGraphicDataArrayLength());
 
                     if( rOStm.GetError() )
                     {
diff --git a/vcl/source/filter/wmf/wmf.cxx b/vcl/source/filter/wmf/wmf.cxx
index 3b9156ac84a1..7818309ed6d1 100644
--- a/vcl/source/filter/wmf/wmf.cxx
+++ b/vcl/source/filter/wmf/wmf.cxx
@@ -49,7 +49,7 @@ bool ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF )
         // Throw into VectorGraphicData to get the import. Do not care
         // too much for type, this will be checked there. Also no path
         // needed, it is a temporary object
-        VectorGraphicDataPtr aVectorGraphicDataPtr =
+        auto aVectorGraphicDataPtr =
             std::make_shared<VectorGraphicData>(
                 aNewData,
                 OUString(),
diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx
index 96414b43ad3a..ee7a8797cde9 100644
--- a/vcl/source/gdi/graph.cxx
+++ b/vcl/source/gdi/graph.cxx
@@ -222,7 +222,7 @@ Graphic::Graphic(const Image& rImage)
         mxImpGraphic->setOriginURL("private:graphicrepository/" + aStock);
 }
 
-Graphic::Graphic(const VectorGraphicDataPtr& rVectorGraphicDataPtr)
+Graphic::Graphic(const std::shared_ptr<VectorGraphicData>& rVectorGraphicDataPtr)
     : mxImpGraphic(vcl::graphic::Manager::get().newInstance(rVectorGraphicDataPtr))
 {
 }
@@ -555,7 +555,7 @@ void WriteGraphic( SvStream& rOStream, const Graphic& rGraphic )
     WriteImpGraphic(rOStream, *rGraphic.mxImpGraphic);
 }
 
-const VectorGraphicDataPtr& Graphic::getVectorGraphicData() const
+const std::shared_ptr<VectorGraphicData>& Graphic::getVectorGraphicData() const
 {
     return mxImpGraphic->getVectorGraphicData();
 }
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 5751ecba700c..45d13e71988b 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -154,7 +154,7 @@ ImpGraphic::ImpGraphic( const BitmapEx& rBitmapEx ) :
 {
 }
 
-ImpGraphic::ImpGraphic(const VectorGraphicDataPtr& rVectorGraphicDataPtr)
+ImpGraphic::ImpGraphic(const std::shared_ptr<VectorGraphicData>& rVectorGraphicDataPtr)
 :   meType( rVectorGraphicDataPtr.get() ? GraphicType::Bitmap : GraphicType::NONE ),
     mnSizeBytes( 0 ),
     mbSwapOut( false ),
@@ -323,7 +323,7 @@ bool ImpGraphic::operator==( const ImpGraphic& rImpGraphic ) const
     return bRet;
 }
 
-const VectorGraphicDataPtr& ImpGraphic::getVectorGraphicData() const
+const std::shared_ptr<VectorGraphicData>& ImpGraphic::getVectorGraphicData() const
 {
     ensureAvailable();
 
@@ -1758,7 +1758,7 @@ void ReadImpGraphic( SvStream& rIStm, ImpGraphic& rImpGraphic )
                             aDataType = VectorGraphicDataType::Pdf;
                         }
 
-                        VectorGraphicDataPtr aVectorGraphicDataPtr = std::make_shared<VectorGraphicData>(aNewData, aPath, aDataType);
+                        auto aVectorGraphicDataPtr = std::make_shared<VectorGraphicData>(aNewData, aPath, aDataType);
                         rImpGraphic = aVectorGraphicDataPtr;
                     }
                 }
diff --git a/vcl/source/graphic/GraphicID.cxx b/vcl/source/graphic/GraphicID.cxx
index 15de2a0d6f0f..96f256cf45da 100644
--- a/vcl/source/graphic/GraphicID.cxx
+++ b/vcl/source/graphic/GraphicID.cxx
@@ -30,9 +30,9 @@ GraphicID::GraphicID(ImpGraphic const& rGraphic)
 
     if (rGraphic.ImplGetType() == GraphicType::Bitmap)
     {
-        if (rGraphic.getVectorGraphicData().get())
+        auto const& rVectorGraphicDataPtr = rGraphic.getVectorGraphicData();
+        if (rVectorGraphicDataPtr)
         {
-            const VectorGraphicDataPtr& rVectorGraphicDataPtr = rGraphic.getVectorGraphicData();
             const basegfx::B2DRange& rRange = rVectorGraphicDataPtr->getRange();
 
             mnID1 |= rVectorGraphicDataPtr->getVectorGraphicDataArrayLength();
diff --git a/vcl/source/graphic/Manager.cxx b/vcl/source/graphic/Manager.cxx
index 783ff21f64e9..b019d5adceaa 100644
--- a/vcl/source/graphic/Manager.cxx
+++ b/vcl/source/graphic/Manager.cxx
@@ -199,7 +199,8 @@ std::shared_ptr<ImpGraphic> Manager::newInstance(const Animation& rAnimation)
     return pReturn;
 }
 
-std::shared_ptr<ImpGraphic> Manager::newInstance(const VectorGraphicDataPtr& rVectorGraphicDataPtr)
+std::shared_ptr<ImpGraphic>
+Manager::newInstance(const std::shared_ptr<VectorGraphicData>& rVectorGraphicDataPtr)
 {
     auto pReturn = std::make_shared<ImpGraphic>(rVectorGraphicDataPtr);
     registerGraphic(pReturn, "VectorGraphic");
commit b94689ccd1e38cc830d0ff6ab87a31fd3f9af0d4
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Wed Apr 1 13:00:25 2020 +0200
Commit:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Sat Apr 11 12:19:40 2020 +0200

    Add OutputDevice::drawPrimitive2D to OutputDevice
    
    Change-Id: Ifc22eca62df72bddd247ba097054f34756520614

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index e4430b2415f3..44aa8f821dae 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -49,6 +49,8 @@
 #include <com/sun/star/drawing/LineCap.hpp>
 #include <com/sun/star/uno/Reference.h>
 
+#include <drawinglayer/primitive2d/Primitive2DContainer.hxx>
+
 #include <memory>
 #include <vector>
 
@@ -1955,6 +1957,9 @@ public:
     ///@}
 
 
+    bool drawPrimitive2D(drawinglayer::primitive2d::Primitive2DContainer & rPrimitive2D);
+
+
     /** @name Native Widget Rendering functions
 
         These all just call through to the private mpGraphics functions of the same name.
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 25b2e7f66be1..6095bc856bb8 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -81,6 +81,7 @@ $(eval $(call gb_Library_use_libraries,vcl,\
     basegfx \
     comphelper \
     cppuhelper \
+    drawinglayercore \
     i18nlangtag \
     i18nutil \
     $(if $(filter OPENCL,$(BUILD_TYPE)),opencl) \
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index 0dcdd84a5d0a..52f31234caa3 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -713,4 +713,9 @@ bool OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize,
     return bDrawn;
 }
 
+bool OutputDevice::drawPrimitive2D(drawinglayer::primitive2d::Primitive2DContainer & rPrimitive2D)
+{
+    return false;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 84590cbc7d0643e26d56562a9409af7b03c33346
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sat Mar 7 14:33:43 2020 +0100
Commit:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Sat Apr 11 12:19:40 2020 +0200

    Separate core drawinglayer func. into drawinglayercore library
    
    This separates the drawinglayer core functionallity into a
    separate library, to keep a strict separation what is backend
    dependent and what is not. More strict separation can be done
    at a later date.
    
    This will make it possible to push part of drawinglayer
    (part of processor2d) directly into VCL.
    
    Change-Id: Ibc26580067e50bf20d7cdd37fa0e44eb10200878

diff --git a/Repository.mk b/Repository.mk
index c80fe356d6e1..d37713f63dd1 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -351,6 +351,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
 	$(call gb_Helper_optional,SCRIPTING,dlgprov) \
 	$(if $(filter WNT,$(OS)),directx9canvas) \
 	$(if $(ENABLE_OPENGL_CANVAS),oglcanvas) \
+	drawinglayercore \
 	drawinglayer \
 	editeng \
 	$(if $(filter WNT,$(OS)),emser) \
diff --git a/drawinglayer/CppunitTest_drawinglayer_border.mk b/drawinglayer/CppunitTest_drawinglayer_border.mk
index fa2f715590cd..e00006c18dba 100644
--- a/drawinglayer/CppunitTest_drawinglayer_border.mk
+++ b/drawinglayer/CppunitTest_drawinglayer_border.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_CppunitTest_use_libraries,drawinglayer_border, \
 	sal \
 	salhelper \
 	drawinglayer \
+	drawinglayercore \
 	vcl \
 	test \
 	tl \
diff --git a/drawinglayer/Library_drawinglayer.mk b/drawinglayer/Library_drawinglayer.mk
index 2a0f1030a789..46f21f56b6b6 100644
--- a/drawinglayer/Library_drawinglayer.mk
+++ b/drawinglayer/Library_drawinglayer.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_Library_use_externals,drawinglayer,\
 ))
 
 $(eval $(call gb_Library_use_libraries,drawinglayer,\
+    drawinglayercore \
     basegfx \
     canvastools \
     comphelper \
@@ -67,11 +68,9 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\
     drawinglayer/source/attribute/sdrsceneattribute3d \
     drawinglayer/source/attribute/sdrshadowattribute \
     drawinglayer/source/attribute/strokeattribute \
-    drawinglayer/source/geometry/viewinformation2d \
     drawinglayer/source/geometry/viewinformation3d \
     drawinglayer/source/primitive2d/animatedprimitive2d \
     drawinglayer/source/primitive2d/backgroundcolorprimitive2d \
-    drawinglayer/source/primitive2d/baseprimitive2d \
     drawinglayer/source/primitive2d/bitmapprimitive2d \
     drawinglayer/source/primitive2d/borderlineprimitive2d \
     drawinglayer/source/primitive2d/controlprimitive2d \
@@ -111,7 +110,6 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\
     drawinglayer/source/primitive2d/PolyPolygonGraphicPrimitive2D \
     drawinglayer/source/primitive2d/PolyPolygonSelectionPrimitive2D \
     drawinglayer/source/primitive2d/primitivetools2d \
-    drawinglayer/source/primitive2d/Primitive2DContainer \
     drawinglayer/source/primitive2d/sceneprimitive2d \
     drawinglayer/source/primitive2d/sdrdecompositiontools2d \
     drawinglayer/source/primitive2d/shadowprimitive2d \
@@ -126,7 +124,6 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\
     drawinglayer/source/primitive2d/textlineprimitive2d \
     drawinglayer/source/primitive2d/textprimitive2d \
     drawinglayer/source/primitive2d/textstrikeoutprimitive2d \
-    drawinglayer/source/primitive2d/Tools \
     drawinglayer/source/primitive2d/transformprimitive2d \
     drawinglayer/source/primitive2d/transparenceprimitive2d \
     drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d \
diff --git a/drawinglayer/Library_drawinglayercore.mk b/drawinglayer/Library_drawinglayercore.mk
new file mode 100644
index 000000000000..f1643d27014d
--- /dev/null
+++ b/drawinglayer/Library_drawinglayercore.mk
@@ -0,0 +1,49 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Library_Library,drawinglayercore))
+
+$(eval $(call gb_Library_set_include,drawinglayercore,\
+    $$(INCLUDE) \
+    -I$(SRCDIR)/drawinglayer/inc \
+))
+
+$(eval $(call gb_Library_add_defs,drawinglayercore,\
+    -DDRAWINGLAYERCORE_DLLIMPLEMENTATION \
+))
+
+$(eval $(call gb_Library_set_precompiled_header,drawinglayercore,drawinglayer/inc/pch/precompiled_drawinglayercore))
+
+$(eval $(call gb_Library_use_sdk_api,drawinglayercore))
+
+$(eval $(call gb_Library_use_externals,drawinglayercore,\
+    boost_headers \
+    libxml2 \
+))
+
+$(eval $(call gb_Library_use_libraries,drawinglayercore,\
+    basegfx \
+    comphelper \
+    cppu \
+    cppuhelper \
+    i18nlangtag \
+    sal \
+    salhelper \
+    svl \
+    tl \
+))
+
+$(eval $(call gb_Library_add_exception_objects,drawinglayercore,\
+    drawinglayer/source/primitive2d/baseprimitive2d \
+    drawinglayer/source/primitive2d/Primitive2DContainer \
+    drawinglayer/source/primitive2d/Tools \
+    drawinglayer/source/geometry/viewinformation2d \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/drawinglayer/Module_drawinglayer.mk b/drawinglayer/Module_drawinglayer.mk
index 6d329e95c60a..687cd9c2671f 100644
--- a/drawinglayer/Module_drawinglayer.mk
+++ b/drawinglayer/Module_drawinglayer.mk
@@ -10,6 +10,7 @@
 $(eval $(call gb_Module_Module,drawinglayer))
 
 $(eval $(call gb_Module_add_targets,drawinglayer,\
+    Library_drawinglayercore \
     Library_drawinglayer \
 ))
 
diff --git a/drawinglayer/inc/pch/precompiled_drawinglayer.hxx b/drawinglayer/inc/pch/precompiled_drawinglayer.hxx
index 25a23a7d3a9e..df6a684135ed 100644
--- a/drawinglayer/inc/pch/precompiled_drawinglayer.hxx
+++ b/drawinglayer/inc/pch/precompiled_drawinglayer.hxx
@@ -13,7 +13,7 @@
  manual changes will be rewritten by the next run of update_pch.sh (which presumably
  also fixes all possible problems, so it's usually better to use it).
 
- Generated on 2020-04-02 22:28:40 using:
+ Generated on 2020-04-03 17:41:44 using:
  ./bin/update_pch drawinglayer drawinglayer --cutoff=4 --exclude:system --exclude:module --exclude:local
 
  If after updating build fails, use the following command to locate conflicting headers:
@@ -92,7 +92,6 @@
 #include <basegfx/range/basicrange.hxx>
 #include <basegfx/tuple/b2dtuple.hxx>
 #include <basegfx/tuple/b3dtuple.hxx>
-#include <basegfx/utils/canvastools.hxx>
 #include <basegfx/vector/b2dvector.hxx>
 #include <basegfx/vector/b2enums.hxx>
 #include <basegfx/vector/b2ivector.hxx>
@@ -104,7 +103,7 @@
 #include <com/sun/star/drawing/TextureMode.hpp>
 #include <com/sun/star/drawing/TextureProjectionMode.hpp>
 #include <com/sun/star/graphic/XPrimitive3D.hpp>
-#include <com/sun/star/util/XAccounting.hpp>
+#include <com/sun/star/uno/Reference.hxx>
 #include <comphelper/comphelperdllapi.h>
 #include <comphelper/processfactory.hxx>
 #include <comphelper/sequence.hxx>
@@ -137,7 +136,6 @@
 #include <drawinglayer/drawinglayerdllapi.h>
 #include <drawinglayer/geometry/viewinformation2d.hxx>
 #include <drawinglayer/geometry/viewinformation3d.hxx>
-#include <drawinglayer/primitive2d/CommonTypes.hxx>
 #include <drawinglayer/primitive2d/PolyPolygonColorPrimitive2D.hxx>
 #include <drawinglayer/primitive2d/PolyPolygonGradientPrimitive2D.hxx>
 #include <drawinglayer/primitive2d/PolyPolygonGraphicPrimitive2D.hxx>
@@ -145,9 +143,6 @@
 #include <drawinglayer/primitive2d/PolyPolygonHatchPrimitive2D.hxx>
 #include <drawinglayer/primitive2d/PolyPolygonMarkerPrimitive2D.hxx>
 #include <drawinglayer/primitive2d/PolyPolygonStrokePrimitive2D.hxx>
-#include <drawinglayer/primitive2d/Primitive2DContainer.hxx>
-#include <drawinglayer/primitive2d/Primitive2DVisitor.hxx>
-#include <drawinglayer/primitive2d/Tools.hxx>
 #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
 #include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
 #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
diff --git a/drawinglayer/inc/pch/precompiled_drawinglayercore.cxx b/drawinglayer/inc/pch/precompiled_drawinglayercore.cxx
new file mode 100644
index 000000000000..4a8c23ea8e65
--- /dev/null
+++ b/drawinglayer/inc/pch/precompiled_drawinglayercore.cxx
@@ -0,0 +1,12 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "precompiled_drawinglayercore.hxx"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/drawinglayer/inc/pch/precompiled_drawinglayercore.hxx b/drawinglayer/inc/pch/precompiled_drawinglayercore.hxx
new file mode 100644
index 000000000000..4cc5ca4612c9
--- /dev/null
+++ b/drawinglayer/inc/pch/precompiled_drawinglayercore.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+/*
+ This file has been autogenerated by update_pch.sh. It is possible to edit it
+ manually (such as when an include file has been moved/renamed/removed). All such
+ manual changes will be rewritten by the next run of update_pch.sh (which presumably
+ also fixes all possible problems, so it's usually better to use it).
+
+ Generated on 2020-03-07 12:37:18 using:
+ ./bin/update_pch drawinglayer drawinglayercore --cutoff=4 --exclude:system --exclude:module --exclude:local
+
+ If after updating build fails, use the following command to locate conflicting headers:
+ ./bin/update_pch_bisect ./drawinglayer/inc/pch/precompiled_drawinglayercore.hxx "make drawinglayer.build" --find-conflicts
+*/
+
+#if PCH_LEVEL >= 1
+#include <ostream>
+#include <vector>
+#endif // PCH_LEVEL >= 1
+#if PCH_LEVEL >= 2
+#include <osl/diagnose.h>
+#include <osl/interlck.h>
+#include <sal/config.h>
+#include <sal/types.h>
+#endif // PCH_LEVEL >= 2
+#if PCH_LEVEL >= 3
+#include <basegfx/basegfxdllapi.h>
+#include <basegfx/point/b2dpoint.hxx>
+#include <basegfx/range/b2drange.hxx>
+#include <basegfx/range/basicrange.hxx>
+#include <basegfx/tuple/b2dtuple.hxx>
+#include <basegfx/utils/canvastools.hxx>
+#include <basegfx/vector/b2dvector.hxx>
+#endif // PCH_LEVEL >= 3
+#if PCH_LEVEL >= 4
+#include <drawinglayer/geometry/viewinformation2d.hxx>
+#endif // PCH_LEVEL >= 4
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/emfio/CppunitTest_emfio_emf_test.mk b/emfio/CppunitTest_emfio_emf_test.mk
index 123e4b3549bd..2679c0a604d9 100644
--- a/emfio/CppunitTest_emfio_emf_test.mk
+++ b/emfio/CppunitTest_emfio_emf_test.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_CppunitTest_use_sdk_api,emfio_emf))
 $(eval $(call gb_CppunitTest_use_libraries,emfio_emf,\
     basegfx \
     drawinglayer \
+    drawinglayercore \
     cppu \
     cppuhelper \
     comphelper \
diff --git a/emfio/Library_emfio.mk b/emfio/Library_emfio.mk
index 52fde14885b3..89add50b781a 100644
--- a/emfio/Library_emfio.mk
+++ b/emfio/Library_emfio.mk
@@ -41,6 +41,7 @@ $(eval $(call gb_Library_use_sdk_api,emfio))
 
 $(eval $(call gb_Library_use_libraries,emfio,\
     basegfx \
+    drawinglayercore \
     drawinglayer \
     cppu \
     cppuhelper \
diff --git a/filter/Library_svgfilter.mk b/filter/Library_svgfilter.mk
index 21318aa1fd03..1f0caf11758c 100644
--- a/filter/Library_svgfilter.mk
+++ b/filter/Library_svgfilter.mk
@@ -56,6 +56,7 @@ $(eval $(call gb_Library_use_libraries,svgfilter,\
 	sax \
 	salhelper \
 	comphelper \
+	drawinglayercore \
 	drawinglayer \
 	basegfx \
 	cppuhelper \
diff --git a/include/drawinglayer/drawinglayerdllapi.h b/include/drawinglayer/drawinglayerdllapi.h
index 0b3983504919..36a0d8abfea2 100644
--- a/include/drawinglayer/drawinglayerdllapi.h
+++ b/include/drawinglayer/drawinglayerdllapi.h
@@ -19,6 +19,12 @@
 #endif
 #define DRAWINGLAYER_DLLPRIVATE SAL_DLLPRIVATE
 
+#if defined(DRAWINGLAYERCORE_DLLIMPLEMENTATION)
+#define DRAWINGLAYERCORE_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define DRAWINGLAYERCORE_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/drawinglayer/geometry/viewinformation2d.hxx b/include/drawinglayer/geometry/viewinformation2d.hxx
index 95be29a72bda..06b17248d213 100644
--- a/include/drawinglayer/geometry/viewinformation2d.hxx
+++ b/include/drawinglayer/geometry/viewinformation2d.hxx
@@ -63,7 +63,7 @@ namespace drawinglayer::geometry
     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
+class DRAWINGLAYERCORE_DLLPUBLIC ViewInformation2D
 {
 public:
     typedef o3tl::cow_wrapper<ImpViewInformation2D, o3tl::ThreadSafeRefCountingPolicy> ImplType;
diff --git a/include/drawinglayer/primitive2d/Primitive2DContainer.hxx b/include/drawinglayer/primitive2d/Primitive2DContainer.hxx
index cca3a0a91485..c096e9a8cc2f 100644
--- a/include/drawinglayer/primitive2d/Primitive2DContainer.hxx
+++ b/include/drawinglayer/primitive2d/Primitive2DContainer.hxx
@@ -34,7 +34,7 @@ class ViewInformation2D;
 
 namespace drawinglayer::primitive2d
 {
-class SAL_WARN_UNUSED DRAWINGLAYER_DLLPUBLIC Primitive2DContainer
+class SAL_WARN_UNUSED DRAWINGLAYERCORE_DLLPUBLIC Primitive2DContainer
     : public std::deque<Primitive2DReference>,
       public Primitive2DDecompositionVisitor
 {
diff --git a/include/drawinglayer/primitive2d/Primitive2DVisitor.hxx b/include/drawinglayer/primitive2d/Primitive2DVisitor.hxx
index dfe04b32a320..e174d1e0878d 100644
--- a/include/drawinglayer/primitive2d/Primitive2DVisitor.hxx
+++ b/include/drawinglayer/primitive2d/Primitive2DVisitor.hxx
@@ -27,7 +27,7 @@ namespace drawinglayer::primitive2d
 class Primitive2DContainer;
 
 // Visitor class for walking a tree of Primitive2DReference
-class DRAWINGLAYER_DLLPUBLIC Primitive2DDecompositionVisitor
+class DRAWINGLAYERCORE_DLLPUBLIC Primitive2DDecompositionVisitor
 {
 public:
     virtual void append(const Primitive2DReference&) = 0;
diff --git a/include/drawinglayer/primitive2d/Tools.hxx b/include/drawinglayer/primitive2d/Tools.hxx
index fbb6f5717c01..1c30565c8c1b 100644
--- a/include/drawinglayer/primitive2d/Tools.hxx
+++ b/include/drawinglayer/primitive2d/Tools.hxx
@@ -31,16 +31,16 @@ class ViewInformation2D;
 namespace drawinglayer::primitive2d
 {
 /// get B2DRange from a given Primitive2DReference
-basegfx::B2DRange DRAWINGLAYER_DLLPUBLIC getB2DRangeFromPrimitive2DReference(
+basegfx::B2DRange DRAWINGLAYERCORE_DLLPUBLIC getB2DRangeFromPrimitive2DReference(
     const Primitive2DReference& rCandidate, const geometry::ViewInformation2D& aViewInformation);
 
 /** compare two Primitive2DReferences for equality, including trying to get implementations (BasePrimitive2D)
     and using compare operator
  */
-bool DRAWINGLAYER_DLLPUBLIC arePrimitive2DReferencesEqual(const Primitive2DReference& rA,
-                                                          const Primitive2DReference& rB);
+bool DRAWINGLAYERCORE_DLLPUBLIC arePrimitive2DReferencesEqual(const Primitive2DReference& rA,
+                                                              const Primitive2DReference& rB);
 
-OUString DRAWINGLAYER_DLLPUBLIC idToString(sal_uInt32 nId);
+OUString DRAWINGLAYERCORE_DLLPUBLIC idToString(sal_uInt32 nId);
 
 } // end of namespace drawinglayer::primitive2d
 
diff --git a/include/drawinglayer/primitive2d/baseprimitive2d.hxx b/include/drawinglayer/primitive2d/baseprimitive2d.hxx
index 5e1a96429ff3..8818cdd0bcde 100644
--- a/include/drawinglayer/primitive2d/baseprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/baseprimitive2d.hxx
@@ -121,8 +121,8 @@ typedef cppu::WeakComponentImplHelper<css::graphic::XPrimitive2D, css::util::XAc
     for view-independent primitives which are defined by not using ViewInformation2D
     in their get2DDecomposition/getB2DRange implementations.
 */
-class DRAWINGLAYER_DLLPUBLIC BasePrimitive2D : protected cppu::BaseMutex,
-                                               public BasePrimitive2DImplBase
+class DRAWINGLAYERCORE_DLLPUBLIC BasePrimitive2D : protected cppu::BaseMutex,
+                                                   public BasePrimitive2DImplBase
 {
     BasePrimitive2D(const BasePrimitive2D&) = delete;
     BasePrimitive2D& operator=(const BasePrimitive2D&) = delete;
@@ -200,7 +200,7 @@ public:
         to identify if a new decomposition is needed at the next call
     (f) return maBuffered2DDecomposition
  */
-class DRAWINGLAYER_DLLPUBLIC BufferedDecompositionPrimitive2D : public BasePrimitive2D
+class DRAWINGLAYERCORE_DLLPUBLIC BufferedDecompositionPrimitive2D : public BasePrimitive2D
 {
 private:
     /// a sequence used for buffering the last create2DDecomposition() result
diff --git a/sc/CppunitTest_sc_ucalc.mk b/sc/CppunitTest_sc_ucalc.mk
index 8943de7ab4c3..60fb6676dab9 100644
--- a/sc/CppunitTest_sc_ucalc.mk
+++ b/sc/CppunitTest_sc_ucalc.mk
@@ -49,6 +49,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sc_ucalc, \
     cppuhelper \
     dbtools \
     drawinglayer \
+    drawinglayercore \
     editeng \
     for \
     forui \
diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 997b14c0add9..b540b27c9834 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -70,6 +70,7 @@ $(eval $(call gb_Library_use_libraries,sc,\
     cppu \
     cppuhelper \
     dbtools \
+    drawinglayercore \
     drawinglayer \
     editeng \
     for \
diff --git a/sd/CppunitTest_sd_uimpress.mk b/sd/CppunitTest_sd_uimpress.mk
index 93426dfc3a55..63f143978231 100644
--- a/sd/CppunitTest_sd_uimpress.mk
+++ b/sd/CppunitTest_sd_uimpress.mk
@@ -27,6 +27,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sd_uimpress,\
     cppu \
     cppuhelper \
     drawinglayer \
+    drawinglayercore \
     editeng \
     i18nlangtag \
     i18nutil \
diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk
index 43b168be8d8c..24520633e77f 100644
--- a/sd/Library_sd.mk
+++ b/sd/Library_sd.mk
@@ -74,6 +74,7 @@ $(eval $(call gb_Library_use_libraries,sd,\
 	cppcanvas \
 	cppu \
 	cppuhelper \
+	drawinglayercore \
 	drawinglayer \
 	editeng \
 	i18nlangtag \
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index 0ca31c3d5357..d35ae8aaa76f 100644
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -49,6 +49,7 @@ $(eval $(call gb_Library_use_libraries,sfx,\
     comphelper \
     cppu \
     cppuhelper \
+    drawinglayercore \
     drawinglayer \
     fwe \
     i18nlangtag \
diff --git a/svgio/CppunitTest_svgio.mk b/svgio/CppunitTest_svgio.mk
index c6f4db91fc60..24fb7a39af32 100644
--- a/svgio/CppunitTest_svgio.mk
+++ b/svgio/CppunitTest_svgio.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_CppunitTest_use_library_objects,svgio,\
 $(eval $(call gb_CppunitTest_use_libraries,svgio,\
     basegfx \
     drawinglayer \
+    drawinglayercore \
     cppu \
     cppuhelper \
     comphelper \
diff --git a/svgio/Library_svgio.mk b/svgio/Library_svgio.mk
index 449c17f61196..7ef1aeb19513 100644
--- a/svgio/Library_svgio.mk
+++ b/svgio/Library_svgio.mk
@@ -33,6 +33,7 @@ $(eval $(call gb_Library_use_sdk_api,svgio))
 
 $(eval $(call gb_Library_use_libraries,svgio,\
     basegfx \
+    drawinglayercore \
     drawinglayer \
     comphelper \
     cppu \
diff --git a/svx/CppunitTest_svx_unit.mk b/svx/CppunitTest_svx_unit.mk
index 92feb45d6578..c78b8d7769eb 100644
--- a/svx/CppunitTest_svx_unit.mk
+++ b/svx/CppunitTest_svx_unit.mk
@@ -35,6 +35,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,svx_unit, \
 $(eval $(call gb_CppunitTest_use_libraries,svx_unit, \
 	basegfx \
 	drawinglayer \
+	drawinglayercore \
 	sal \
 	sfx \
 	svxcore \
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index d3eff20b6769..9ccba33a748c 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -50,6 +50,7 @@ $(eval $(call gb_Library_use_libraries,svx,\
 		crashreport) \
     $(call gb_Helper_optional,DBCONNECTIVITY, \
         dbtools) \
+    drawinglayercore \
     drawinglayer \
     editeng \
     fwe \
diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk
index 80fcdae920f3..fdf5f0165249 100644
--- a/svx/Library_svxcore.mk
+++ b/svx/Library_svxcore.mk
@@ -57,6 +57,7 @@ $(eval $(call gb_Library_use_libraries,svxcore,\
     cppu \
     $(call gb_Helper_optional,DBCONNECTIVITY, \
         dbtools) \
+    drawinglayercore \
     drawinglayer \
     editeng \
     fwe \
diff --git a/sw/CppunitTest_sw_uwriter.mk b/sw/CppunitTest_sw_uwriter.mk
index 6b9ffa4ba683..a881587735e4 100644
--- a/sw/CppunitTest_sw_uwriter.mk
+++ b/sw/CppunitTest_sw_uwriter.mk
@@ -33,6 +33,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_uwriter, \
     $(call gb_Helper_optional,DBCONNECTIVITY, \
         dbtools) \
     drawinglayer \
+    drawinglayercore \
     editeng \
     i18nlangtag \
     i18nutil \
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index b6d75fd890bf..d99c59a58a4b 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -58,6 +58,7 @@ $(eval $(call gb_Library_use_libraries,sw,\
     cppuhelper \
     $(call gb_Helper_optional,DBCONNECTIVITY, \
         dbtools) \
+    drawinglayercore \
     drawinglayer \
     editeng \
     i18nlangtag \
diff --git a/sw/Library_swui.mk b/sw/Library_swui.mk
index 99f1dd20ae3d..4c09d1cc4bda 100644
--- a/sw/Library_swui.mk
+++ b/sw/Library_swui.mk
@@ -75,6 +75,7 @@ $(eval $(call gb_Library_use_libraries,swui,\
     ucbhelper \
     utl \
     vcl \
+    drawinglayercore \
     drawinglayer \
 ))
 
commit da3922951be6e35852a47f1d2e27d044a8651d7c
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Sat Apr 11 09:00:34 2020 +0100
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sat Apr 11 11:07:29 2020 +0200

    Use range-based for loop
    
    Change-Id: I2ee332ffeb9004535882a7859f1821624ef5efa6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92017
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/chart2/source/tools/DataSourceHelper.cxx b/chart2/source/tools/DataSourceHelper.cxx
index 4b124aea28a4..3b6f08ef5420 100644
--- a/chart2/source/tools/DataSourceHelper.cxx
+++ b/chart2/source/tools/DataSourceHelper.cxx
@@ -66,9 +66,9 @@ void lcl_addDataSourceRanges(
 {
     if( xDataSource.is() )
     {
-        uno::Sequence< uno::Reference< data::XLabeledDataSequence > > aDataSequences( xDataSource->getDataSequences() );
-        for( sal_Int32 i=0; i<aDataSequences.getLength(); ++i)
-            lcl_addRanges( rOutResult, aDataSequences[i] );
+        const auto aDataSequences(xDataSource->getDataSequences());
+        for (const auto& rDataSequence : aDataSequences)
+            lcl_addRanges(rOutResult, rDataSequence);
     }
 }
 
commit dd2681813d02089c71a8b0f4dc4c8e2bf63d1791
Author:     Justin Luth <justin.luth at collabora.com>
AuthorDate: Fri Apr 10 20:02:20 2020 +0300
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Apr 11 10:10:45 2020 +0200

    NFC writerfilter: remove pointless asserts
    
    In an age where GDB (or whatever other platform debugger
    you prefer) is easy to use, there is no point in
    asserting something that is going to crash anyway, is there?
    
    Asserting is only good in these cases if you follow it using
    an _if_ statement. Noel informed me that it can also be used
    to silence false positive coverity warnings.
    
    Change-Id: I5a5cb7a22019768ec2807f6918d4a8ebb51194de
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92049
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 01eba34e62fa..98e9e77d6c34 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1983,7 +1983,6 @@ void DomainMapper_Impl::appendTextPortion( const OUString& rString, const Proper
                     {
                         m_bStartedTOC = true;
                         uno::Reference< text::XTextCursor > xTOCTextCursor = xTextAppend->getEnd()->getText( )->createTextCursor( );
-                        assert(xTOCTextCursor.is());
                         xTOCTextCursor->gotoEnd(false);
                         if (m_nStartGenericField != 0)
                         {
@@ -4287,7 +4286,6 @@ DomainMapper_Impl::StartIndexSectionChecked(const OUString& sServiceName)
             m_bStartedTOC = true;
             uno::Reference<text::XTextCursor> xTOCTextCursor
                 = xTextRange->getText()->createTextCursor();
-            assert(xTOCTextCursor.is());
             xTOCTextCursor->gotoEnd(false);
             m_aTextAppendStack.push(TextAppendContext(xTextAppend, xTOCTextCursor));
         }
@@ -6524,10 +6522,7 @@ void DomainMapper_Impl::SetCurrentRedlineIsRead()
 
 sal_Int32 DomainMapper_Impl::GetCurrentRedlineToken(  ) const
 {
-    sal_Int32 nToken = 0;
-    assert( m_currentRedline.get());
-    nToken = m_currentRedline->m_nToken;
-    return nToken;
+    return m_currentRedline->m_nToken;
 }
 
 void DomainMapper_Impl::SetCurrentRedlineAuthor( const OUString& sAuthor )
@@ -6579,13 +6574,11 @@ void DomainMapper_Impl::SetCurrentRedlineId( sal_Int32 sId )
 
 void DomainMapper_Impl::SetCurrentRedlineToken( sal_Int32 nToken )
 {
-    assert( m_currentRedline.get());
     m_currentRedline->m_nToken = nToken;
 }
 
 void DomainMapper_Impl::SetCurrentRedlineRevertProperties( const uno::Sequence<beans::PropertyValue>& aProperties )
 {
-    assert( m_currentRedline.get());
     m_currentRedline->m_aRevertProperties = aProperties;
 }
 
@@ -6806,7 +6799,6 @@ sal_Int32 DomainMapper_Impl::getNumberingProperty(const sal_Int32 nListId, sal_I
             nNumberingLevel = 0;
 
         auto const pList(GetListTable()->GetList(nListId));
-        assert(pList);
         const OUString aListName = pList->GetStyleName();
         const uno::Reference< style::XStyleFamiliesSupplier > xStylesSupplier(GetTextDocument(), uno::UNO_QUERY_THROW);
         const uno::Reference< container::XNameAccess > xStyleFamilies = xStylesSupplier->getStyleFamilies();
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 3de574e75c12..5429489304f6 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2113,7 +2113,6 @@ RTFReferenceTable::Entries_t RTFDocumentImpl::deduplicateStyleTable()
                 auto const pStyleType(
                     static_cast<RTFReferenceProperties&>(*pStyle).getAttributes().find(
                         NS_ooxml::LN_CT_Style_type));
-                assert(pStyleType);
                 int const nStyleType(pStyleType->getInt());
                 RTFSprms const sprms(
                     static_cast<RTFReferenceProperties&>(*pStyle).getSprms().cloneAndDeduplicate(
commit 822da642f1355f8ed1074737560430876d9ac932
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Fri Apr 10 21:27:50 2020 +0200
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Fri Apr 10 23:58:08 2020 +0200

    tdf#55417: Add unittest
    
    Change-Id: I1cf633ea0be39c58bf38026d5ea73ad89bec72bc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92052
    Tested-by: Jenkins
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/sc/qa/unit/data/xlsx/tdf55417.xlsx b/sc/qa/unit/data/xlsx/tdf55417.xlsx
new file mode 100644
index 000000000000..215c12d5976d
Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf55417.xlsx differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 385130d6fe83..e212fd9fe34b 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -194,6 +194,7 @@ public:
     void testPreserveTextWhitespaceXLSX();
     void testPreserveTextWhitespace2XLSX();
     void testTextDirectionXLSX();
+    void testTdf55417();
     void testTdf129985();
     void testTdf73063();
 
@@ -331,6 +332,7 @@ public:
     CPPUNIT_TEST(testMoveCellAnchoredShapesODS);
     CPPUNIT_TEST(testMatrixMultiplicationXLSX);
     CPPUNIT_TEST(testTextDirectionXLSX);
+    CPPUNIT_TEST(testTdf55417);
     CPPUNIT_TEST(testTdf129985);
     CPPUNIT_TEST(testTdf73063);
 
@@ -4010,6 +4012,19 @@ void ScExportTest::testTextDirectionXLSX()
     xDocSh->DoClose();
 }
 
+void ScExportTest::testTdf55417()
+{
+    ScDocShellRef xDocSh = loadDoc("tdf55417.", FORMAT_XLSX);
+    CPPUNIT_ASSERT(xDocSh.is());
+
+    xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/styles.xml", FORMAT_XLSX);
+    CPPUNIT_ASSERT(pDoc);
+    assertXPath(pDoc, "/x:styleSheet/x:cellXfs/x:xf[1]/x:alignment", 1);
+    assertXPath(pDoc, "/x:styleSheet/x:cellXfs/x:xf[2]/x:alignment", 1);
+
+    xDocSh->DoClose();
+}
+
 void ScExportTest::testTdf129985()
 {
     ScDocShellRef xDocSh = loadDoc("tdf129985.", FORMAT_XLSX);
commit 55ef1fdacb7b9d30a1443cfd5d88e3d735d6d95e
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Fri Apr 10 21:47:58 2020 +0200
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Fri Apr 10 23:57:11 2020 +0200

    tdf#73063: Add unittest
    
    Change-Id: I69beef7f6014af1940cd89749f1712a40c74e543
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92053
    Tested-by: Jenkins
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/sc/qa/unit/data/xlsx/tdf73063.xlsx b/sc/qa/unit/data/xlsx/tdf73063.xlsx
new file mode 100644
index 000000000000..1b680aa2e799
Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf73063.xlsx differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 28c7d4645ac4..385130d6fe83 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -195,6 +195,7 @@ public:
     void testPreserveTextWhitespace2XLSX();
     void testTextDirectionXLSX();
     void testTdf129985();
+    void testTdf73063();
 
     void testRefStringXLSX();
     void testRefStringConfigXLSX();
@@ -331,6 +332,7 @@ public:
     CPPUNIT_TEST(testMatrixMultiplicationXLSX);
     CPPUNIT_TEST(testTextDirectionXLSX);
     CPPUNIT_TEST(testTdf129985);
+    CPPUNIT_TEST(testTdf73063);
 
     CPPUNIT_TEST(testRefStringXLSX);
     CPPUNIT_TEST(testRefStringConfigXLSX);
@@ -4021,6 +4023,19 @@ void ScExportTest::testTdf129985()
     xDocSh->DoClose();
 }
 
+void ScExportTest::testTdf73063()
+{
+    ScDocShellRef xDocSh = loadDoc("tdf73063.", FORMAT_XLSX);
+    CPPUNIT_ASSERT(xDocSh.is());
+
+    xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/styles.xml", FORMAT_XLSX);
+    CPPUNIT_ASSERT(pDoc);
+
+    assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[2]", "formatCode", "[$-1C1A]dddd\", \"d\". \"mmmm\\ yyyy;@");
+
+    xDocSh->DoClose();
+}
+
 void ScExportTest::testTdf88657ODS()
 {
     ScDocShellRef xDocSh = loadDoc("tdf88657.", FORMAT_ODS);
commit aa064e9744a2b2d6de819c768f2120c826e0bdeb
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Fri Apr 10 21:49:23 2020 +0200
Commit:     Luboš Luňák <l.lunak at collabora.com>
CommitDate: Fri Apr 10 21:49:23 2020 +0200

    fix last commit
    
    Change-Id: Ib81a7d1c3330eced1680ba0966e49dbe063fb116

diff --git a/vcl/skia/win/gdiimpl.cxx b/vcl/skia/win/gdiimpl.cxx
index 1627eb2e0135..70ac8496ef83 100644
--- a/vcl/skia/win/gdiimpl.cxx
+++ b/vcl/skia/win/gdiimpl.cxx
@@ -120,7 +120,7 @@ HRESULT checkResult(HRESULT hr, const char* file, size_t line)
     {
         OUString sLocationString
             = OUString::createFromAscii(file) + ":" + OUString::number(line) + " ";
-        SAL_DETAIL_LOG_STREAM(SAL_DETAIL_ENABLE_LOG_INFO, ::SAL_DETAIL_LOG_LEVEL_WARN, "vcl.skia",
+        SAL_DETAIL_LOG_STREAM(SAL_DETAIL_ENABLE_LOG_INFO, ::SAL_DETAIL_LOG_LEVEL_INFO, "vcl.skia",
                               sLocationString.toUtf8().getStr(),
                               "HRESULT failed with: 0x" << OUString::number(hr, 16) << ": "
                                                         << WindowsErrorStringFromHRESULT(hr));
commit 2ade07d25c4fdd53d41e1829dd6f92955d14cd4f
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Fri Apr 10 21:38:00 2020 +0200
Commit:     Luboš Luňák <l.lunak at collabora.com>
CommitDate: Fri Apr 10 21:40:00 2020 +0200

    downgrade warning to an info message
    
    The errors are from DirectWrite not available, but I guess may happen
    in some setups? But no point in spamming warnings either way.
    
    Change-Id: Ic25ddcad474ccf007925ebf7afcd784da19f4b92

diff --git a/vcl/skia/win/gdiimpl.cxx b/vcl/skia/win/gdiimpl.cxx
index d197f1bc2b38..1627eb2e0135 100644
--- a/vcl/skia/win/gdiimpl.cxx
+++ b/vcl/skia/win/gdiimpl.cxx
@@ -113,14 +113,14 @@ bool WinSkiaSalGraphicsImpl::RenderAndCacheNativeControl(CompatibleDC& rWhite, C
     return true;
 }
 
-#ifdef SAL_LOG_WARN
+#ifdef SAL_LOG_INFO
 HRESULT checkResult(HRESULT hr, const char* file, size_t line)
 {
     if (FAILED(hr))
     {
         OUString sLocationString
             = OUString::createFromAscii(file) + ":" + OUString::number(line) + " ";
-        SAL_DETAIL_LOG_STREAM(SAL_DETAIL_ENABLE_LOG_WARN, ::SAL_DETAIL_LOG_LEVEL_WARN, "vcl.skia",
+        SAL_DETAIL_LOG_STREAM(SAL_DETAIL_ENABLE_LOG_INFO, ::SAL_DETAIL_LOG_LEVEL_WARN, "vcl.skia",
                               sLocationString.toUtf8().getStr(),
                               "HRESULT failed with: 0x" << OUString::number(hr, 16) << ": "
                                                         << WindowsErrorStringFromHRESULT(hr));
commit e3f5e49ac3aff3db9491b57e001579729f21bd56
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Thu Apr 9 15:47:34 2020 +0200
Commit:     Luboš Luňák <l.lunak at collabora.com>
CommitDate: Fri Apr 10 21:15:33 2020 +0200

    dump info about Skia and Vulkan drivers to a log file
    
    Apparently it's hard for users to find out the actual Vulkan driver
    version (as compared to the marketing version), which is needed
    for blacklisting. And raster performance is noticeably better
    if Skia is compiled using Clang. So just dump the info to
    <cachedir>/skia.log (where on Windows the <cachedir> should be
    AppData\Roaming\LibreOffice\4\cache).
    
    Change-Id: Iafbc32637579b831275c60554f064479a326b917
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91980
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>

diff --git a/vcl/inc/driverblocklist.hxx b/vcl/inc/driverblocklist.hxx
index c9b83b3f365e..8c1747be472f 100644
--- a/vcl/inc/driverblocklist.hxx
+++ b/vcl/inc/driverblocklist.hxx
@@ -36,6 +36,8 @@ const int DeviceVendorMax = VendorMicrosoft + 1;
 /// Returns vendor for the given vendor ID, or VendorAll if not known.
 VCL_DLLPUBLIC DeviceVendor GetVendorFromId(uint32_t id);
 
+VCL_DLLPUBLIC OUStringLiteral GetVendorNameFromId(uint32_t id);
+
 // The rest should be private (only for the unittest).
 
 struct InvalidFileException
diff --git a/vcl/skia/SkiaHelper.cxx b/vcl/skia/SkiaHelper.cxx
index 356570706f59..f0d2559d376f 100644
--- a/vcl/skia/SkiaHelper.cxx
+++ b/vcl/skia/SkiaHelper.cxx
@@ -29,6 +29,8 @@ bool isVCLSkiaEnabled() { return false; }
 #include <driverblocklist.hxx>
 #include <skia/utils.hxx>
 #include <config_folders.h>
+#include <osl/file.hxx>
+#include <tools/stream.hxx>
 
 #include <SkCanvas.h>
 #include <SkPaint.h>
@@ -40,8 +42,6 @@ bool isVCLSkiaEnabled() { return false; }
 
 namespace SkiaHelper
 {
-uint32_t vendorId = 0;
-
 static OUString getBlacklistFile()
 {
     OUString url("$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER);
@@ -50,25 +50,98 @@ static OUString getBlacklistFile()
     return url + "/skia/skia_blacklist_vulkan.xml";
 }
 
+static uint32_t driverVersion = 0;
+uint32_t vendorId = 0;
+
+static OUString versionAsString(uint32_t version)
+{
+    return OUString::number(version >> 22) + "." + OUString::number((version >> 12) & 0x3ff) + "."
+           + OUString::number(version & 0xfff);
+}
+
+static OUStringLiteral vendorAsString(uint32_t vendor)
+{
+    return DriverBlocklist::GetVendorNameFromId(vendor);
+}
+
+static OUString getCacheFolder()
+{
+    OUString url("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER
+                 "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/cache/");
+    rtl::Bootstrap::expandMacros(url);
+    osl::Directory::create(url);
+    return url;
+}
+
+static void writeToLog(SvStream& stream, const char* key, const char* value)
+{
+    stream.WriteCharPtr(key);
+    stream.WriteCharPtr(": ");
+    stream.WriteCharPtr(value);
+    stream.WriteChar('\n');
+}
+
+static void writeToLog(SvStream& stream, const char* key, const OUString& value)
+{
+    writeToLog(stream, key, OUStringToOString(value, RTL_TEXTENCODING_UTF8).getStr());
+}
+
+// Note that this function also logs system information about Vulkan.
 static bool isVulkanBlacklisted(const VkPhysicalDeviceProperties& props)
 {
     static const char* const types[]
         = { "other", "integrated", "discrete", "virtual", "cpu", "??" }; // VkPhysicalDeviceType
-    OUString driverVersion = OUString::number(props.driverVersion >> 22) + "."
-                             + OUString::number((props.driverVersion >> 12) & 0x3ff) + "."
-                             + OUString::number(props.driverVersion & 0xfff);
+    driverVersion = props.driverVersion;
     vendorId = props.vendorID;
     OUString vendorIdStr = "0x" + OUString::number(props.vendorID, 16);
     OUString deviceIdStr = "0x" + OUString::number(props.deviceID, 16);
+    OUString driverVersionString = versionAsString(driverVersion);
+    OUString apiVersion = versionAsString(props.apiVersion);
+    const char* deviceType = types[std::min<unsigned>(props.deviceType, SAL_N_ELEMENTS(types) - 1)];
+
+    CrashReporter::addKeyValue("VulkanVendor", vendorIdStr, CrashReporter::AddItem);
+    CrashReporter::addKeyValue("VulkanDevice", deviceIdStr, CrashReporter::AddItem);
+    CrashReporter::addKeyValue("VulkanAPI", apiVersion, CrashReporter::AddItem);
+    CrashReporter::addKeyValue("VulkanDriver", driverVersionString, CrashReporter::AddItem);
+    CrashReporter::addKeyValue("VulkanDeviceType", OUString::createFromAscii(deviceType),
+                               CrashReporter::AddItem);
+    CrashReporter::addKeyValue("VulkanDeviceName", OUString::createFromAscii(props.deviceName),
+                               CrashReporter::Write);
+
+    SvFileStream logFile(getCacheFolder() + "/skia.log", StreamMode::WRITE);
+    writeToLog(logFile, "RenderMethod", "vulkan");
+    writeToLog(logFile, "Vendor", vendorIdStr);
+    writeToLog(logFile, "Device", deviceIdStr);
+    writeToLog(logFile, "API", apiVersion);
+    writeToLog(logFile, "Driver", driverVersionString);
+    writeToLog(logFile, "DeviceType", deviceType);
+    writeToLog(logFile, "DeviceName", props.deviceName);
+
     SAL_INFO("vcl.skia",
-             "Vulkan API version: "
-                 << (props.apiVersion >> 22) << "." << ((props.apiVersion >> 12) & 0x3ff) << "."
-                 << (props.apiVersion & 0xfff) << ", driver version: " << driverVersion
-                 << ", vendor: " << vendorIdStr << ", device: " << deviceIdStr << ", type: "
-                 << types[std::min<unsigned>(props.deviceType, SAL_N_ELEMENTS(types) - 1)]
-                 << ", name: " << props.deviceName);
-    return DriverBlocklist::IsDeviceBlocked(getBlacklistFile(), driverVersion, vendorIdStr,
-                                            deviceIdStr);
+             "Vulkan API version: " << apiVersion << ", driver version: " << driverVersionString
+                                    << ", vendor: " << vendorIdStr << " ("
+                                    << vendorAsString(vendorId) << "), device: " << deviceIdStr
+                                    << ", type: " << deviceType << ", name: " << props.deviceName);
+    bool blacklisted = DriverBlocklist::IsDeviceBlocked(getBlacklistFile(), driverVersionString,
+                                                        vendorIdStr, deviceIdStr);
+    writeToLog(logFile, "Blacklisted", blacklisted ? "yes" : "no");
+    return blacklisted;
+}
+
+static void writeSkiaRasterInfo()
+{
+    SvFileStream logFile(getCacheFolder() + "/skia.log", StreamMode::WRITE);
+    writeToLog(logFile, "RenderMethod", "raster");
+    // Log compiler, Skia works best when compiled with Clang.
+#if defined __clang__
+    writeToLog(logFile, "Compiler", "Clang");
+#elif defined __GNUC__
+    writeToLog(logFile, "Compiler", "GCC");
+#elif defined _MSC_VER
+    writeToLog(logFile, "Compiler", "MSVC");
+#else
+    writeToLog(logFile, "Compiler", "?");
+#endif
 }
 
 static sk_app::VulkanWindowContext::SharedGrContext getTemporaryGrContext();
@@ -109,11 +182,15 @@ static void checkDeviceBlacklisted(bool blockDisable = false)
                 else
                     SAL_INFO("vcl.skia", "Vulkan could not be initialized");
                 if (blacklisted && !blockDisable)
+                {
                     disableRenderMethod(RenderVulkan);
+                    writeSkiaRasterInfo();
+                }
                 break;
             }
             case RenderRaster:
                 SAL_INFO("vcl.skia", "Using Skia raster mode");
+                writeSkiaRasterInfo();
                 return; // software, never blacklisted
         }
         done = true;
diff --git a/vcl/source/helper/driverblocklist.cxx b/vcl/source/helper/driverblocklist.cxx
index 1fe134eafed2..556eb7172fed 100644
--- a/vcl/source/helper/driverblocklist.cxx
+++ b/vcl/source/helper/driverblocklist.cxx
@@ -157,6 +157,23 @@ DeviceVendor GetVendorFromId(uint32_t id)
     }
 }
 
+OUStringLiteral GetVendorNameFromId(uint32_t id)
+{
+    switch (id)
+    {
+        case 0x8086:
+            return "Intel";
+        case 0x10de:
+            return "Nvidia";
+        case 0x1002:
+            return "AMD";
+        case 0x1414:
+            return "Microsoft";
+        default:
+            return "?";
+    }
+}
+
 Parser::Parser(const OUString& rURL, std::vector<DriverInfo>& rDriverList)
     : meBlockType(BlockType::UNKNOWN)
     , mrDriverList(rDriverList)
commit ad65fa305cc73ae0bbed44e140c11ad5638ce440
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Fri Apr 10 17:09:30 2020 +0200
Commit:     Luboš Luňák <l.lunak at collabora.com>
CommitDate: Fri Apr 10 21:15:01 2020 +0200

    fix lame local variable mistake
    
    Change-Id: I330f8393edf61b37ae12a372e6f43ff01e204395
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92047
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>

diff --git a/vcl/skia/win/gdiimpl.cxx b/vcl/skia/win/gdiimpl.cxx
index 7bf150a6ccee..d197f1bc2b38 100644
--- a/vcl/skia/win/gdiimpl.cxx
+++ b/vcl/skia/win/gdiimpl.cxx
@@ -137,15 +137,14 @@ sk_sp<SkTypeface> WinSkiaSalGraphicsImpl::createDirectWriteTypeface(const LOGFON
 {
     if (!dwriteDone)
     {
-        IDWriteFactory* factory;
         if (SUCCEEDED(
                 CHECKHR(DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, __uuidof(IDWriteFactory),
-                                            reinterpret_cast<IUnknown**>(&factory)))))
+                                            reinterpret_cast<IUnknown**>(&dwriteFactory)))))
         {
-            if (SUCCEEDED(CHECKHR(factory->GetGdiInterop(&dwriteGdiInterop))))
+            if (SUCCEEDED(CHECKHR(dwriteFactory->GetGdiInterop(&dwriteGdiInterop))))
                 dwriteFontMgr = SkFontMgr_New_DirectWrite(dwriteFactory);
             else
-                factory->Release();
+                dwriteFactory->Release();
         }
         dwriteDone = true;
     }
commit ae743c6fae4543282f8930dc78175cc510fabbb3
Author:     Armin Le Grand <armin.le.grand at me.com>
AuthorDate: Fri Apr 10 18:07:41 2020 +0200
Commit:     Armin Le Grand <Armin.Le.Grand at me.com>
CommitDate: Fri Apr 10 20:37:52 2020 +0200

    Make BitmapPrimitive2D vcl-independent
    
    as preparation to have drawinglayer module
    independent from vcl in the future
    
    Change-Id: Iaa01370f27b51cba5114a54f37d1ec73d0719918
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92048
    Tested-by: Jenkins
    Reviewed-by: Armin Le Grand <Armin.Le.Grand at me.com>

diff --git a/drawinglayer/source/primitive2d/bitmapprimitive2d.cxx b/drawinglayer/source/primitive2d/bitmapprimitive2d.cxx
index 1953a36a71ac..f495d531d8ff 100644
--- a/drawinglayer/source/primitive2d/bitmapprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/bitmapprimitive2d.cxx
@@ -19,15 +19,16 @@
 
 #include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
 #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
+#include <com/sun/star/awt/XBitmap.hpp>
 
 using namespace com::sun::star;
 
 namespace drawinglayer::primitive2d
 {
-BitmapPrimitive2D::BitmapPrimitive2D(const BitmapEx& rBitmapEx,
+BitmapPrimitive2D::BitmapPrimitive2D(const css::uno::Reference<css::awt::XBitmap>& rXBitmap,
                                      const basegfx::B2DHomMatrix& rTransform)
     : BasePrimitive2D()
-    , maBitmapEx(rBitmapEx)
+    , maXBitmap(rXBitmap)
     , maTransform(rTransform)
 {
 }
@@ -38,8 +39,7 @@ bool BitmapPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
     {
         const BitmapPrimitive2D& rCompare = static_cast<const BitmapPrimitive2D&>(rPrimitive);
 
-        return (getBitmapEx() == rCompare.getBitmapEx()
-                && getTransform() == rCompare.getTransform());
+        return (getXBitmap() == rCompare.getXBitmap() && getTransform() == rCompare.getTransform());
     }
 
     return false;
@@ -53,7 +53,22 @@ BitmapPrimitive2D::getB2DRange(const geometry::ViewInformation2D& /*rViewInforma
     return aRetval;
 }
 
-sal_Int64 SAL_CALL BitmapPrimitive2D::estimateUsage() { return getBitmapEx().GetSizeBytes(); }
+sal_Int64 SAL_CALL BitmapPrimitive2D::estimateUsage()
+{
+    if (!getXBitmap().is())
+    {
+        return 0;
+    }
+
+    uno::Reference<util::XAccounting> const xAcc(getXBitmap(), uno::UNO_QUERY);
+
+    if (!xAcc.is())
+    {
+        return 0;
+    }
+
+    return xAcc->estimateUsage();
+}
 
 // provide unique ID
 ImplPrimitive2DIDBlock(BitmapPrimitive2D, PRIMITIVE2D_ID_BITMAPPRIMITIVE2D)
diff --git a/drawinglayer/source/primitive2d/controlprimitive2d.cxx b/drawinglayer/source/primitive2d/controlprimitive2d.cxx
index a10f8810da73..600bb4be8a3f 100644
--- a/drawinglayer/source/primitive2d/controlprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/controlprimitive2d.cxx
@@ -37,6 +37,7 @@
 #include <toolkit/awt/vclxwindow.hxx>
 #include <vcl/window.hxx>
 #include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
 
 using namespace com::sun::star;
 
@@ -205,7 +206,9 @@ namespace drawinglayer::primitive2d
                                     aBitmapSizeLogic.getX(), aBitmapSizeLogic.getY(), aTranslate.getX(), aTranslate.getY()));
 
                                 // create primitive
-                                xRetval = new BitmapPrimitive2D(aContent, aBitmapTransform);
+                                xRetval = new BitmapPrimitive2D(
+                                    VCLUnoHelper::CreateVCLXBitmap(aContent),
+                                    aBitmapTransform);
                             }
                             catch( const uno::Exception& )
                             {
diff --git a/drawinglayer/source/primitive2d/discretebitmapprimitive2d.cxx b/drawinglayer/source/primitive2d/discretebitmapprimitive2d.cxx
index a61c4a39f7e8..bb73067a7d36 100644
--- a/drawinglayer/source/primitive2d/discretebitmapprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/discretebitmapprimitive2d.cxx
@@ -20,6 +20,7 @@
 #include <drawinglayer/primitive2d/discretebitmapprimitive2d.hxx>
 #include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
 #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
 
 
 namespace drawinglayer::primitive2d
@@ -62,7 +63,10 @@ namespace drawinglayer::primitive2d
                 aObjectTransform = aInverseObjectTransformation * aObjectTransform;
 
                 // create BitmapPrimitive2D with now object-local coordinate data
-                rContainer.push_back(new BitmapPrimitive2D(getBitmapEx(), aObjectTransform));
+                rContainer.push_back(
+                    new BitmapPrimitive2D(
+                        VCLUnoHelper::CreateVCLXBitmap(getBitmapEx()),
+                        aObjectTransform));
             }
         }
 
diff --git a/drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx b/drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx
index c3dd299148cf..116389383b4c 100644
--- a/drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx
@@ -23,6 +23,7 @@
 #include <basegfx/matrix/b2dhommatrixtools.hxx>
 #include <drawinglayer/primitive2d/transformprimitive2d.hxx>
 #include <drawinglayer/geometry/viewinformation2d.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
 
 
 namespace drawinglayer::primitive2d
@@ -176,7 +177,7 @@ namespace drawinglayer::primitive2d
                 // TopLeft
                 xRetval[0] = Primitive2DReference(
                     new BitmapPrimitive2D(
-                        getDiscreteShadow().getTopLeft(),
+                        VCLUnoHelper::CreateVCLXBitmap(getDiscreteShadow().getTopLeft()),
                         basegfx::utils::createScaleTranslateB2DHomMatrix(
                             fBigLenX,
                             fBigLenY,
@@ -186,7 +187,7 @@ namespace drawinglayer::primitive2d
                 // Top
                 xRetval[1] = Primitive2DReference(
                     new BitmapPrimitive2D(
-                        getDiscreteShadow().getTop(),
+                        VCLUnoHelper::CreateVCLXBitmap(getDiscreteShadow().getTop()),
                         basegfx::utils::createScaleTranslateB2DHomMatrix(
                             1.0 - (2.0 * (fBorderX + fSingleX)) + fSingleX,
                             fBorderY,
@@ -196,7 +197,7 @@ namespace drawinglayer::primitive2d
                 // TopRight
                 xRetval[2] = Primitive2DReference(
                     new BitmapPrimitive2D(
-                        getDiscreteShadow().getTopRight(),
+                        VCLUnoHelper::CreateVCLXBitmap(getDiscreteShadow().getTopRight()),
                         basegfx::utils::createScaleTranslateB2DHomMatrix(
                             fBigLenX,
                             fBigLenY,
@@ -206,7 +207,7 @@ namespace drawinglayer::primitive2d
                 // Right
                 xRetval[3] = Primitive2DReference(
                     new BitmapPrimitive2D(
-                        getDiscreteShadow().getRight(),
+                        VCLUnoHelper::CreateVCLXBitmap(getDiscreteShadow().getRight()),
                         basegfx::utils::createScaleTranslateB2DHomMatrix(
                             fBorderX,
                             1.0 - (2.0 * (fBorderY + fSingleY)) + fSingleY,
@@ -216,7 +217,7 @@ namespace drawinglayer::primitive2d
                 // BottomRight
                 xRetval[4] = Primitive2DReference(
                     new BitmapPrimitive2D(
-                        getDiscreteShadow().getBottomRight(),
+                        VCLUnoHelper::CreateVCLXBitmap(getDiscreteShadow().getBottomRight()),
                         basegfx::utils::createScaleTranslateB2DHomMatrix(
                             fBigLenX,
                             fBigLenY,
@@ -226,7 +227,7 @@ namespace drawinglayer::primitive2d
                 // Bottom
                 xRetval[5] = Primitive2DReference(
                     new BitmapPrimitive2D(
-                        getDiscreteShadow().getBottom(),
+                        VCLUnoHelper::CreateVCLXBitmap(getDiscreteShadow().getBottom()),
                         basegfx::utils::createScaleTranslateB2DHomMatrix(
                             1.0 - (2.0 * (fBorderX + fSingleX)) + fSingleX,
                             fBorderY,
@@ -236,7 +237,7 @@ namespace drawinglayer::primitive2d
                 // BottomLeft
                 xRetval[6] = Primitive2DReference(
                     new BitmapPrimitive2D(
-                        getDiscreteShadow().getBottomLeft(),
+                        VCLUnoHelper::CreateVCLXBitmap(getDiscreteShadow().getBottomLeft()),
                         basegfx::utils::createScaleTranslateB2DHomMatrix(
                             fBigLenX,
                             fBigLenY,
@@ -246,7 +247,7 @@ namespace drawinglayer::primitive2d
                 // Left
                 xRetval[7] = Primitive2DReference(
                     new BitmapPrimitive2D(
-                        getDiscreteShadow().getLeft(),
+                        VCLUnoHelper::CreateVCLXBitmap(getDiscreteShadow().getLeft()),
                         basegfx::utils::createScaleTranslateB2DHomMatrix(
                             fBorderX,
                             1.0 - (2.0 * (fBorderY + fSingleY)) + fSingleY,
diff --git a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
index 7c8597a14498..d301adc16a9c 100644
--- a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
+++ b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
@@ -40,6 +40,7 @@
 #include <vcl/graph.hxx>
 #include <vcl/virdev.hxx>
 #include <vcl/svapp.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
 
 namespace drawinglayer::primitive2d
 {
@@ -170,7 +171,7 @@ namespace drawinglayer::primitive2d
 
                 return Primitive2DReference(
                     new BitmapPrimitive2D(
-                        BitmapEx(aMainBitmap, aMaskBitmap),
+                        VCLUnoHelper::CreateVCLXBitmap(BitmapEx(aMainBitmap, aMaskBitmap)),
                         getTransform()));
             }
 
@@ -511,7 +512,7 @@ namespace drawinglayer::primitive2d
                     {
                         aRetval.resize(1);
                         aRetval[0] = new BitmapPrimitive2D(
-                            rGraphic.GetBitmapEx(),
+                            VCLUnoHelper::CreateVCLXBitmap(rGraphic.GetBitmapEx()),
                             rTransform);
                     }
 
diff --git a/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx b/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx
index 60e504bb63e0..d038353db9be 100644
--- a/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx
@@ -22,6 +22,7 @@
 #include <drawinglayer/geometry/viewinformation2d.hxx>
 #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
 #include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
 
 
 using namespace com::sun::star;
@@ -59,7 +60,10 @@ namespace drawinglayer::primitive2d
                         aTransform.set(0, 2, aRange.getMinX());
                         aTransform.set(1, 2, aRange.getMinY());
 
-                        rContainer.push_back(new BitmapPrimitive2D(getMarker(), aTransform));
+                        rContainer.push_back(
+                            new BitmapPrimitive2D(
+                                VCLUnoHelper::CreateVCLXBitmap(getMarker()),
+                                aTransform));
                     }
                 }
             }
diff --git a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
index e754a7f97e59..5ed50cf95ebd 100644
--- a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
@@ -26,6 +26,7 @@
 #include <texture/texture.hxx>
 #include <drawinglayer/primitive2d/maskprimitive2d.hxx>
 #include <drawinglayer/geometry/viewinformation2d.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
 
 #include <converters.hxx>
 
@@ -122,7 +123,7 @@ namespace drawinglayer::primitive2d
                     {
                         const primitive2d::Primitive2DReference xEmbedRefBitmap(
                             new primitive2d::BitmapPrimitive2D(
-                                aBitmapEx,
+                                VCLUnoHelper::CreateVCLXBitmap(aBitmapEx),
                                 basegfx::B2DHomMatrix()));
                         aContent = primitive2d::Primitive2DContainer { xEmbedRefBitmap };
                     }
diff --git a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
index 66264ae9a039..c0c0fec7d41a 100644
--- a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
@@ -33,6 +33,7 @@
 #include <basegfx/raster/bzpixelraster.hxx>
 #include <vcl/BitmapTools.hxx>
 #include <comphelper/threadpool.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
 
 using namespace com::sun::star;
 
@@ -468,7 +469,10 @@ namespace drawinglayer::primitive2d
                         aNew2DTransform *= aInverseOToV;
 
                         // create bitmap primitive and add
-                        rContainer.push_back(new BitmapPrimitive2D(maOldRenderedBitmap, aNew2DTransform));
+                        rContainer.push_back(
+                            new BitmapPrimitive2D(
+                                VCLUnoHelper::CreateVCLXBitmap(maOldRenderedBitmap),
+                                aNew2DTransform));
 
                         // test: Allow to add an outline in the debugger when tests are needed
                         static bool bAddOutlineToCreated3DSceneRepresentation(false); // loplugin:constvars:ignore
diff --git a/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx b/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx
index 921483861b60..d8926824f65a 100644
--- a/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx
@@ -26,6 +26,7 @@
 #include <drawinglayer/primitive2d/maskprimitive2d.hxx>
 #include <basegfx/matrix/b2dhommatrixtools.hxx>
 #include <vcl/graph.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
 
 
 namespace drawinglayer::primitive2d
@@ -53,7 +54,7 @@ namespace drawinglayer::primitive2d
 
                         Primitive2DReference xReference(
                             new BitmapPrimitive2D(
-                                getBitmapEx(),
+                                VCLUnoHelper::CreateVCLXBitmap(getBitmapEx()),
                                 aObjectTransform));
 
                         aRetval = xReference;
@@ -152,7 +153,7 @@ namespace drawinglayer::primitive2d
 
                             Primitive2DReference xReference(
                                 new BitmapPrimitive2D(
-                                    getBitmapEx(),
+                                    VCLUnoHelper::CreateVCLXBitmap(getBitmapEx()),
                                     aObjectTransform));
                             aRetval = xReference;
 
diff --git a/drawinglayer/source/processor2d/hittestprocessor2d.cxx b/drawinglayer/source/processor2d/hittestprocessor2d.cxx
index 525dceaef429..eb57052de924 100644
--- a/drawinglayer/source/processor2d/hittestprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/hittestprocessor2d.cxx
@@ -33,6 +33,7 @@
 #include <drawinglayer/primitive2d/hiddengeometryprimitive2d.hxx>
 #include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
 #include <comphelper/lok.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
 
 namespace drawinglayer::processor2d
 {
@@ -432,8 +433,8 @@ namespace drawinglayer::processor2d
                         if(!aRange.isEmpty())
                         {
                             const primitive2d::BitmapPrimitive2D& rBitmapCandidate(static_cast< const primitive2d::BitmapPrimitive2D& >(rCandidate));
-                            const BitmapEx& rBitmapEx = rBitmapCandidate.getBitmapEx();
-                            const Size& rSizePixel(rBitmapEx.GetSizePixel());
+                            const BitmapEx aBitmapEx(VCLUnoHelper::GetBitmap(rBitmapCandidate.getXBitmap()));
+                            const Size& rSizePixel(aBitmapEx.GetSizePixel());
 
                             // When tiled rendering, don't bother with the pixel size of the candidate.
                             if(rSizePixel.Width() && rSizePixel.Height() && !comphelper::LibreOfficeKit::isActive())
@@ -451,7 +452,7 @@ namespace drawinglayer::processor2d
                                     const sal_Int32 nX(basegfx::fround(aRelativePoint.getX() * rSizePixel.Width()));
                                     const sal_Int32 nY(basegfx::fround(aRelativePoint.getY() * rSizePixel.Height()));
 
-                                    mbHit = (0xff != rBitmapEx.GetTransparency(nX, nY));
+                                    mbHit = (0xff != aBitmapEx.GetTransparency(nX, nY));
                                 }
                             }
                             else
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index ced2cc96998c..34ff2992934f 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -66,6 +66,8 @@
 // for support of Title/Description in all apps when embedding pictures
 #include <drawinglayer/primitive2d/objectinfoprimitive2d.hxx>
 
+#include <toolkit/helper/vclunohelper.hxx>
+
 using namespace com::sun::star;
 
 namespace
@@ -346,7 +348,7 @@ namespace drawinglayer::processor2d
         // direct draw of transformed BitmapEx primitive
         void VclProcessor2D::RenderBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D& rBitmapCandidate)
         {
-            BitmapEx aBitmapEx(rBitmapCandidate.getBitmapEx());
+            BitmapEx aBitmapEx(VCLUnoHelper::GetBitmap(rBitmapCandidate.getXBitmap()));
             const basegfx::B2DHomMatrix aLocalTransform(maCurrentTransformation * rBitmapCandidate.getTransform());
 
             if(maBColorModifierStack.count())
diff --git a/drawinglayer/source/tools/emfphelperdata.cxx b/drawinglayer/source/tools/emfphelperdata.cxx
index 2758509f9856..bc04cd3e8df3 100644
--- a/drawinglayer/source/tools/emfphelperdata.cxx
+++ b/drawinglayer/source/tools/emfphelperdata.cxx
@@ -55,6 +55,7 @@
 #include <vcl/svapp.hxx>
 #include <vcl/settings.hxx>
 #include <i18nlangtag/languagetag.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
 
 #include <algorithm>
 
@@ -1510,7 +1511,9 @@ namespace emfplushelper
                                 if (aSize.Width() > 0 && aSize.Height() > 0)
                                 {
                                     mrTargetHolders.Current().append(
-                                        std::make_unique<drawinglayer::primitive2d::BitmapPrimitive2D>(aBmp, aTransformMatrix));
+                                        std::make_unique<drawinglayer::primitive2d::BitmapPrimitive2D>(
+                                            VCLUnoHelper::CreateVCLXBitmap(aBmp),
+                                            aTransformMatrix));
                                 }
                                 else
                                 {
diff --git a/drawinglayer/source/tools/wmfemfhelper.cxx b/drawinglayer/source/tools/wmfemfhelper.cxx
index bb4146ca9444..bef598449ce9 100644
--- a/drawinglayer/source/tools/wmfemfhelper.cxx
+++ b/drawinglayer/source/tools/wmfemfhelper.cxx
@@ -59,6 +59,7 @@
 #include <i18nlangtag/languagetag.hxx>
 #include <emfplushelper.hxx>
 #include <numeric>
+#include <toolkit/helper/vclunohelper.hxx>
 
 namespace drawinglayer::primitive2d
 {
@@ -661,7 +662,7 @@ namespace wmfemfhelper
 
             rTarget.append(
                 std::make_unique<drawinglayer::primitive2d::BitmapPrimitive2D>(
-                    rBitmapEx,
+                    VCLUnoHelper::CreateVCLXBitmap(rBitmapEx),
                     aObjectTransform));
         }
     }
diff --git a/filter/source/pdf/pdfdecomposer.cxx b/filter/source/pdf/pdfdecomposer.cxx
index a03e70bd5d1a..15e500343f8f 100644
--- a/filter/source/pdf/pdfdecomposer.cxx
+++ b/filter/source/pdf/pdfdecomposer.cxx
@@ -20,6 +20,7 @@
 #include <vcl/pdfread.hxx>

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list