[Libreoffice-commits] core.git: Branch 'feature/drawinglayercore' - 82 commits - chart2/inc chart2/qa chart2/source compilerplugins/clang config_host/config_skia.h.in cui/source dbaccess/qa dbaccess/source desktop/qa desktop/source download.lst drawinglayer/CppunitTest_drawinglayer_border.mk drawinglayer/inc drawinglayer/Library_drawinglayercore.mk drawinglayer/Library_drawinglayer.mk drawinglayer/Module_drawinglayer.mk drawinglayer/source emfio/CppunitTest_emfio_emf_test.mk emfio/Library_emfio.mk external/lxml external/skia extras/Gallery_arrows.mk extras/Gallery_diagrams.mk extras/Gallery_education.mk extras/Gallery_environment.mk extras/Gallery_finance.mk extras/Gallery_people.mk extras/Gallery_symbols.mk extras/Gallery_transportation.mk extras/Gallery_txtshapes.mk extras/Module_extras.mk extras/Package_gallmytheme.mk extras/source filter/Library_svgfilter.mk helpcontent2 icon-themes/colibre icon-themes/colibre_svg include/drawinglayer include/sfx2 include/svx include/vcl lotuswordpro/inc lotu swordpro/IwyuFilter_lotuswordpro.yaml lotuswordpro/source oox/source reportdesign/inc RepositoryExternal.mk Repository.mk sc/CppunitTest_sc_ucalc.mk sc/Library_sc.mk scp2/source scripting/source sc/source sd/CppunitTest_sd_uimpress.mk sd/inc sd/Library_sd.mk sd/qa sd/source sd/uiconfig sfx2/Library_sfx.mk sfx2/source solenv/bin solenv/clang-format solenv/gbuild solenv/sanitizers svgio/CppunitTest_svgio.mk svgio/Library_svgio.mk svtools/source svx/CppunitTest_svx_unit.mk svx/inc svx/Library_svxcore.mk svx/Library_svx.mk svx/source svx/uiconfig svx/UIConfig_svx.mk sw/CppunitTest_sw_core_txtnode.mk sw/CppunitTest_sw_uwriter.mk sw/Library_sw.mk sw/Library_swui.mk sw/Module_sw.mk sw/qa sw/source uitest/writer_tests4 vcl/inc vcl/Library_vcl.mk vcl/qa vcl/skia vcl/source vcl/unx writerfilter/source xmloff/source

Tomaž Vajngerl (via logerrit) logerrit at kemper.freedesktop.org
Tue Apr 7 07:11:04 UTC 2020


Rebased ref, commits from common ancestor:
commit e3ce731d0e3018c91da9c1b058bf4c43a969f43e
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: Tue Apr 7 09:08:56 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 39d99957883e..39f8c06400ac 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 7ac25334437155d304833dca1befc2fd8c839405
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: Tue Apr 7 09:08:56 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 cf905c970723..57e2dc547a5e 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 4b852f340a14..36e7656af80c 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 24933397d7d3..8fcc615ab7d2 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 3a85da62d820..4d9236c9fd67 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 a8d26a0bb40c101394ded8061d1b58048153631b
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Apr 6 21:02:30 2020 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Tue Apr 7 09:04:09 2020 +0200

    tdf#131490 sw btlr: fix handling of vertical text
    
    Latin text goes from l->r, then t->b. If we rotate to the right, then we
    get t->b, then r->l. Vertical text in vcl's Font means the individual
    glyphs are painted in a way that looks "non-rotated" in the tbrl case.
    
    btlr is not symmetric to this: if you rotate to the left, then Latin and
    vertical text is handled the same way, i.e. there is no compensation at
    a glyph level.
    
    This means that as far as vcl is concerned, the Font's vertical flag has
    to be true in the tbrl case, but no in the btlr one. Fix
    SwFont::SetVertical() to do this, which means that rotating at a
    character level or using the btlr text direction will result in the same
    rendering for a one-liner text.
    
    Regression from commit 89e5b431d468745da3a1eff14d48296107b9101b (sw btlr
    writing mode: implement DOC filter, 2019-03-28).
    
    Change-Id: I2619c77a3b2597dbf9feab6c7042e8d8c7454197
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91780
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/sw/CppunitTest_sw_core_txtnode.mk b/sw/CppunitTest_sw_core_txtnode.mk
new file mode 100644
index 000000000000..2f09165d86cb
--- /dev/null
+++ b/sw/CppunitTest_sw_core_txtnode.mk
@@ -0,0 +1,73 @@
+# -*- 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_CppunitTest_CppunitTest,sw_core_txtnode))
+
+$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_core_txtnode))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sw_core_txtnode, \
+    sw/qa/core/txtnode/txtnode \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sw_core_txtnode, \
+    comphelper \
+    cppu \
+    cppuhelper \
+    sal \
+    sfx \
+    svxcore \
+    sw \
+    test \
+    unotest \
+    utl \
+    vcl \
+    svt \
+    tl \
+    svl \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,sw_core_txtnode,\
+    boost_headers \
+    libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sw_core_txtnode,\
+    -I$(SRCDIR)/sw/inc \
+    -I$(SRCDIR)/sw/source/core/inc \
+    -I$(SRCDIR)/sw/source/uibase/inc \
+    -I$(SRCDIR)/sw/qa/inc \
+    $$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_api,sw_core_txtnode,\
+	udkapi \
+	offapi \
+	oovbaapi \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,sw_core_txtnode))
+$(eval $(call gb_CppunitTest_use_vcl,sw_core_txtnode))
+
+$(eval $(call gb_CppunitTest_use_rdb,sw_core_txtnode,services))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,sw_core_txtnode,\
+    officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,sw_core_txtnode))
+
+$(eval $(call gb_CppunitTest_use_uiconfigs,sw_core_txtnode, \
+    modules/swriter \
+))
+
+$(eval $(call gb_CppunitTest_use_more_fonts,sw_core_txtnode))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index 88c14c2fa51b..980f60d7a615 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -111,6 +111,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\
     CppunitTest_sw_core_accessibilitycheck \
     CppunitTest_sw_core_layout \
     CppunitTest_sw_core_frmedt \
+    CppunitTest_sw_core_txtnode \
 ))
 
 ifneq ($(DISABLE_GUI),TRUE)
diff --git a/sw/qa/core/txtnode/data/btlr-cell-chinese.doc b/sw/qa/core/txtnode/data/btlr-cell-chinese.doc
new file mode 100644
index 000000000000..a4a70f6779dd
Binary files /dev/null and b/sw/qa/core/txtnode/data/btlr-cell-chinese.doc differ
diff --git a/sw/qa/core/txtnode/txtnode.cxx b/sw/qa/core/txtnode/txtnode.cxx
new file mode 100644
index 000000000000..b6af5230faf8
--- /dev/null
+++ b/sw/qa/core/txtnode/txtnode.cxx
@@ -0,0 +1,54 @@
+/* -*- 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 <swmodeltestbase.hxx>
+
+#include <comphelper/classids.hxx>
+#include <svtools/embedhlp.hxx>
+#include <svx/svdpage.hxx>
+#include <tools/globname.hxx>
+#include <unotest/bootstrapfixturebase.hxx>
+#include <vcl/gdimtf.hxx>
+
+#include <wrtsh.hxx>
+#include <fmtanchr.hxx>
+#include <IDocumentDrawModelAccess.hxx>
+#include <drawdoc.hxx>
+#include <dcontact.hxx>
+
+static char const DATA_DIRECTORY[] = "/sw/qa/core/txtnode/data/";
+
+/// Covers sw/source/core/txtnode/ fixes.
+class SwCoreTxtnodeTest : public SwModelTestBase
+{
+};
+
+CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, testBtlrCellChinese)
+{
+    // Load a document with a table cell, with btlr cell direction.  The cell has text which is
+    // classified as vertical, i.e. the glyph has the same direction in both the lrtb ("Latin") and
+    // tbrl ("Chinese") directions. Make sure that Chinese text is handled the same way in the btlr
+    // case as it's handled in the Latin case.
+    load(DATA_DIRECTORY, "btlr-cell-chinese.doc");
+    SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+    SwDocShell* pShell = pTextDoc->GetDocShell();
+    std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+    MetafileXmlDump dumper;
+    xmlDocPtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+    assertXPath(pXmlDoc, "//font[1]", "orientation", "900");
+    // Without the accompanying fix in place, this test would have failed with:
+    // - Expected: false
+    // - Actual  : true
+    // i.e. the glyph was rotated further, so it was upside down.
+    assertXPath(pXmlDoc, "//font[1]", "vertical", "false");
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index b8789594bb84..97699a7a09f4 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -443,9 +443,10 @@ void SwFont::SetVertical(sal_uInt16 nDir, const bool bVertFormat, const bool bVe
     if( nDir != m_aSub[SwFontScript::Latin].GetOrientation() )
     {
         m_bFontChg = true;
-        m_aSub[SwFontScript::Latin].SetVertical( nDir, bVertFormat );
-        m_aSub[SwFontScript::CJK].SetVertical( nDir, bVertFormat );
-        m_aSub[SwFontScript::CTL].SetVertical( nDir, bVertFormat );
+        bool bVertical = bVertFormat && !bVertLayoutLRBT;
+        m_aSub[SwFontScript::Latin].SetVertical(nDir, bVertical);
+        m_aSub[SwFontScript::CJK].SetVertical(nDir, bVertical);
+        m_aSub[SwFontScript::CTL].SetVertical(nDir, bVertical);
     }
 }
 
diff --git a/vcl/source/gdi/mtfxmldump.cxx b/vcl/source/gdi/mtfxmldump.cxx
index efc8dfc5b999..8c242bcb7c21 100644
--- a/vcl/source/gdi/mtfxmldump.cxx
+++ b/vcl/source/gdi/mtfxmldump.cxx
@@ -1136,6 +1136,7 @@ void MetafileXmlDump::writeXml(const GDIMetaFile& rMetaFile, tools::XmlWriter& r
                 rWriter.attribute("height", aFont.GetFontSize().Height());
                 rWriter.attribute("orientation", aFont.GetOrientation());
                 rWriter.attribute("weight", convertFontWeigthToString(aFont.GetWeight()));
+                rWriter.attribute("vertical", aFont.IsVertical() ? "true" : "false");
 
                 rWriter.endElement();
             }
commit 5366cadd6cda9b3c7b4b549a0c9b8c895ea47843
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Apr 6 21:45:37 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Apr 7 08:31:20 2020 +0200

    loplugin:unusedvariableplus in chart2
    
    Change-Id: I8bb958718f71b52819755f3af6d5fcff4af1f596
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91782
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/chart2/qa/extras/charttest.hxx b/chart2/qa/extras/charttest.hxx
index db9a4ed63465..60a526be0b8a 100644
--- a/chart2/qa/extras/charttest.hxx
+++ b/chart2/qa/extras/charttest.hxx
@@ -379,7 +379,6 @@ uno::Sequence < OUString > getWriterChartColumnDescriptions( Reference< lang::XC
     xChartDoc.set( xPropertySet->getPropertyValue( "Model" ), uno::UNO_QUERY );
     CPPUNIT_ASSERT( xChartDoc.is() );
     CPPUNIT_ASSERT( xChartDoc->getDataProvider().is() );
-    uno::Reference<beans::XPropertySet> xProp(xChartDoc->getDataProvider(), uno::UNO_QUERY );
     uno::Reference< chart2::XAnyDescriptionAccess > xAnyDescriptionAccess ( xChartDoc->getDataProvider(), uno::UNO_QUERY_THROW );
     uno::Sequence< OUString > seriesList = xAnyDescriptionAccess->getColumnDescriptions();
     return seriesList;
diff --git a/chart2/source/tools/ObjectIdentifier.cxx b/chart2/source/tools/ObjectIdentifier.cxx
index 3c2c45a19e74..c0fc94ec1326 100644
--- a/chart2/source/tools/ObjectIdentifier.cxx
+++ b/chart2/source/tools/ObjectIdentifier.cxx
@@ -621,11 +621,10 @@ OUString ObjectIdentifier::createParticleForSeries(
     return aRet.makeStringAndClear();
 }
 
-OUString ObjectIdentifier::createParticleForLegend( ChartModel& rModel )
+OUString ObjectIdentifier::createParticleForLegend( ChartModel&  )
 {
     OUStringBuffer aRet;
 
-    Reference< XDiagram > xDiagram( rModel.getFirstDiagram() );
     //todo: if more than one diagram is implemented, find the correct diagram which is owner of the given legend
 
     aRet.append( ObjectIdentifier::createParticleForDiagram() );
@@ -637,11 +636,10 @@ OUString ObjectIdentifier::createParticleForLegend( ChartModel& rModel )
 }
 
 OUString ObjectIdentifier::createParticleForLegend(
-        const Reference< frame::XModel >& xChartModel )
+        const Reference< frame::XModel >& )
 {
     OUStringBuffer aRet;
 
-    Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( xChartModel ) );
     //todo: if more than one diagram is implemented, find the correct diagram which is owner of the given legend
 
     aRet.append( ObjectIdentifier::createParticleForDiagram() );
diff --git a/chart2/source/view/axes/VPolarAngleAxis.cxx b/chart2/source/view/axes/VPolarAngleAxis.cxx
index 2c171d8bb11d..cc2427a87581 100644
--- a/chart2/source/view/axes/VPolarAngleAxis.cxx
+++ b/chart2/source/view/axes/VPolarAngleAxis.cxx
@@ -162,9 +162,6 @@ void VPolarAngleAxis::createLabels()
 
     if( m_aAxisProperties.m_bDisplayLabels )
     {
-        //get the transformed screen values for all tickmarks in aAllTickInfos
-        std::unique_ptr< TickFactory > apTickFactory( createTickFactory() );
-
         //create tick mark text shapes
         //@todo: iterate through all tick depth which should be labeled
 
commit 2e45a11aa1340a07a13a463e765f741af594d731
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Apr 6 21:46:21 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Apr 7 08:31:00 2020 +0200

    loplugin:unusedvariableplus in writerfilter
    
    Change-Id: Idd0fd88dc55df6e916291d173c8f6fc1219fc111
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91783
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index ade6ee087e5a..21570269db42 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -1049,7 +1049,6 @@ void GraphicImport::ProcessShapeOptions(Value const & rValue)
 void GraphicImport::lcl_sprm(Sprm& rSprm)
 {
     sal_uInt32 nSprmId = rSprm.getId();
-    Value::Pointer_t pValue = rSprm.getValue();
 
     switch(nSprmId)
     {
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 3c927b828a2a..ef16116c4592 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -1062,7 +1062,6 @@ void ListsManager::lcl_sprm( Sprm& rSprm )
                     {
                         pLevel->Insert(
                             PROP_ADJUST, uno::makeAny( nValue ) );
-                        writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
                     }
                 }
             }
diff --git a/writerfilter/source/dmapper/TblStylePrHandler.cxx b/writerfilter/source/dmapper/TblStylePrHandler.cxx
index 85ea80ab780f..22a790644ebe 100644
--- a/writerfilter/source/dmapper/TblStylePrHandler.cxx
+++ b/writerfilter/source/dmapper/TblStylePrHandler.cxx
@@ -125,7 +125,6 @@ void TblStylePrHandler::lcl_sprm(Sprm & rSprm)
     TagLogger::getInstance().attribute("sprm", rSprm.toString());
 #endif
 
-    Value::Pointer_t pValue = rSprm.getValue();
     switch ( rSprm.getId( ) )
     {
         case NS_ooxml::LN_CT_PPrBase:
commit 5f626cc0fde4be1aaa039402ba095651259dde90
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Apr 6 20:55:34 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Apr 7 08:30:45 2020 +0200

    loplugin:unusedvariableplus in oox
    
    Change-Id: I742c0c9416a5cfaa1b2d471d25fbf6c7439f7ec8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91779
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/oox/source/drawingml/chart/axisconverter.cxx b/oox/source/drawingml/chart/axisconverter.cxx
index 5d1c94b875ba..9e62b61d73bc 100644
--- a/oox/source/drawingml/chart/axisconverter.cxx
+++ b/oox/source/drawingml/chart/axisconverter.cxx
@@ -410,6 +410,6 @@ void AxisDispUnitsConverter::convertFromModel( const Reference< XAxis >& rxAxis
     }
 }
 
-} // namespace oox
+} // namespace oox::drawingml::chart
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index ba0fdb3c94fd..16c4788b32b7 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -1998,7 +1998,6 @@ void ChartExport::exportScatterChartSeries( const Reference< chart2::XChartType
 
 void ChartExport::exportScatterChart( const Reference< chart2::XChartType >& xChartType )
 {
-    FSHelperPtr pFS = GetFS();
     std::vector<Sequence<Reference<chart2::XDataSeries> > > aSplitDataSeries = splitDataSeriesByAxis(xChartType);
     bool bExported = false;
     for (auto & splitDataSeries : aSplitDataSeries)
commit 95ec2e9b024ff12a3005777c902d7e0975460b1d
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Mon Apr 6 23:42:02 2020 +0200
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Tue Apr 7 01:47:30 2020 +0200

    split up polypolygonprimitive2d.cxx into separate files
    
    Change-Id: I39d1682f9d3781272590015f59ccafb33c0fd617
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91788
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/drawinglayer/Library_drawinglayer.mk b/drawinglayer/Library_drawinglayer.mk
index 0f93f8407b98..2a0f1030a789 100644
--- a/drawinglayer/Library_drawinglayer.mk
+++ b/drawinglayer/Library_drawinglayer.mk
@@ -102,7 +102,14 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\
     drawinglayer/source/primitive2d/patternfillprimitive2d \
     drawinglayer/source/primitive2d/pointarrayprimitive2d \
     drawinglayer/source/primitive2d/polygonprimitive2d \
-    drawinglayer/source/primitive2d/polypolygonprimitive2d \
+    drawinglayer/source/primitive2d/PolyPolygonHairlinePrimitive2D \
+    drawinglayer/source/primitive2d/PolyPolygonMarkerPrimitive2D \
+    drawinglayer/source/primitive2d/PolyPolygonStrokePrimitive2D \
+    drawinglayer/source/primitive2d/PolyPolygonColorPrimitive2D \
+    drawinglayer/source/primitive2d/PolyPolygonGradientPrimitive2D \
+    drawinglayer/source/primitive2d/PolyPolygonHatchPrimitive2D \
+    drawinglayer/source/primitive2d/PolyPolygonGraphicPrimitive2D \
+    drawinglayer/source/primitive2d/PolyPolygonSelectionPrimitive2D \
     drawinglayer/source/primitive2d/primitivetools2d \
     drawinglayer/source/primitive2d/Primitive2DContainer \
     drawinglayer/source/primitive2d/sceneprimitive2d \
diff --git a/drawinglayer/source/primitive2d/PolyPolygonColorPrimitive2D.cxx b/drawinglayer/source/primitive2d/PolyPolygonColorPrimitive2D.cxx
new file mode 100644
index 000000000000..aa48a965e692
--- /dev/null
+++ b/drawinglayer/source/primitive2d/PolyPolygonColorPrimitive2D.cxx
@@ -0,0 +1,66 @@
+/* -*- 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 incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawinglayer/primitive2d/PolyPolygonColorPrimitive2D.hxx>
+
+#include <basegfx/polygon/b2dpolypolygontools.hxx>
+#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
+
+using namespace com::sun::star;
+
+namespace drawinglayer::primitive2d
+{
+PolyPolygonColorPrimitive2D::PolyPolygonColorPrimitive2D(
+    const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::BColor& rBColor)
+    : BasePrimitive2D()
+    , maPolyPolygon(rPolyPolygon)
+    , maBColor(rBColor)
+{
+}
+
+bool PolyPolygonColorPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
+{
+    if (BasePrimitive2D::operator==(rPrimitive))
+    {
+        const PolyPolygonColorPrimitive2D& rCompare
+            = static_cast<const PolyPolygonColorPrimitive2D&>(rPrimitive);
+
+        return (getB2DPolyPolygon() == rCompare.getB2DPolyPolygon()
+                && getBColor() == rCompare.getBColor());
+    }
+
+    return false;
+}
+
+basegfx::B2DRange PolyPolygonColorPrimitive2D::getB2DRange(
+    const geometry::ViewInformation2D& /*rViewInformation*/) const
+{
+    // return range
+    return basegfx::utils::getRange(getB2DPolyPolygon());
+}
+
+// provide unique ID
+sal_uInt32 PolyPolygonColorPrimitive2D::getPrimitive2DID() const
+{
+    return PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D;
+}
+
+} // end drawinglayer::primitive2d namespace
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/drawinglayer/source/primitive2d/PolyPolygonGradientPrimitive2D.cxx b/drawinglayer/source/primitive2d/PolyPolygonGradientPrimitive2D.cxx
new file mode 100644
index 000000000000..076436b40655
--- /dev/null
+++ b/drawinglayer/source/primitive2d/PolyPolygonGradientPrimitive2D.cxx
@@ -0,0 +1,90 @@
+/* -*- 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 incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawinglayer/primitive2d/PolyPolygonGradientPrimitive2D.hxx>
+
+#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
+#include <drawinglayer/primitive2d/fillgradientprimitive2d.hxx>
+#include <drawinglayer/primitive2d/maskprimitive2d.hxx>
+
+using namespace com::sun::star;
+
+namespace drawinglayer::primitive2d
+{
+void PolyPolygonGradientPrimitive2D::create2DDecomposition(
+    Primitive2DContainer& rContainer, const geometry::ViewInformation2D& /*rViewInformation*/) const
+{
+    if (!getFillGradient().isDefault())
+    {
+        // create SubSequence with FillGradientPrimitive2D
+        const basegfx::B2DRange aPolyPolygonRange(getB2DPolyPolygon().getB2DRange());
+        FillGradientPrimitive2D* pNewGradient = new FillGradientPrimitive2D(
+            aPolyPolygonRange, getDefinitionRange(), getFillGradient());
+        const Primitive2DReference xSubRef(pNewGradient);
+        const Primitive2DContainer aSubSequence{ xSubRef };
+
+        // create mask primitive
+        rContainer.push_back(new MaskPrimitive2D(getB2DPolyPolygon(), aSubSequence));
+    }
+}
+
+PolyPolygonGradientPrimitive2D::PolyPolygonGradientPrimitive2D(
+    const basegfx::B2DPolyPolygon& rPolyPolygon,
+    const attribute::FillGradientAttribute& rFillGradient)
+    : BufferedDecompositionPrimitive2D()
+    , maPolyPolygon(rPolyPolygon)
+    , maDefinitionRange(rPolyPolygon.getB2DRange())
+    , maFillGradient(rFillGradient)
+{
+}
+
+PolyPolygonGradientPrimitive2D::PolyPolygonGradientPrimitive2D(
+    const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DRange& rDefinitionRange,
+    const attribute::FillGradientAttribute& rFillGradient)
+    : BufferedDecompositionPrimitive2D()
+    , maPolyPolygon(rPolyPolygon)
+    , maDefinitionRange(rDefinitionRange)
+    , maFillGradient(rFillGradient)
+{
+}
+
+bool PolyPolygonGradientPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
+{
+    if (BufferedDecompositionPrimitive2D::operator==(rPrimitive))
+    {
+        const PolyPolygonGradientPrimitive2D& rCompare
+            = static_cast<const PolyPolygonGradientPrimitive2D&>(rPrimitive);
+
+        return (getB2DPolyPolygon() == rCompare.getB2DPolyPolygon()
+                && getDefinitionRange() == rCompare.getDefinitionRange()
+                && getFillGradient() == rCompare.getFillGradient());
+    }
+
+    return false;
+}
+
+// provide unique ID
+sal_uInt32 PolyPolygonGradientPrimitive2D::getPrimitive2DID() const
+{
+    return PRIMITIVE2D_ID_POLYPOLYGONGRADIENTPRIMITIVE2D;
+}
+
+} // end drawinglayer::primitive2d namespace
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/drawinglayer/source/primitive2d/PolyPolygonGraphicPrimitive2D.cxx b/drawinglayer/source/primitive2d/PolyPolygonGraphicPrimitive2D.cxx
new file mode 100644
index 000000000000..00bea0ab10ea
--- /dev/null
+++ b/drawinglayer/source/primitive2d/PolyPolygonGraphicPrimitive2D.cxx
@@ -0,0 +1,135 @@
+/* -*- 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 incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawinglayer/primitive2d/PolyPolygonGraphicPrimitive2D.hxx>
+
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
+#include <drawinglayer/primitive2d/fillgraphicprimitive2d.hxx>
+#include <drawinglayer/primitive2d/maskprimitive2d.hxx>
+#include <vcl/graph.hxx>
+
+using namespace com::sun::star;
+
+namespace drawinglayer::primitive2d
+{
+void PolyPolygonGraphicPrimitive2D::create2DDecomposition(
+    Primitive2DContainer& rContainer, const geometry::ViewInformation2D& /*rViewInformation*/) const
+{
+    if (!getFillGraphic().isDefault())
+    {
+        const Graphic& rGraphic = getFillGraphic().getGraphic();
+        const GraphicType aType(rGraphic.GetType());
+
+        // is there a bitmap or a metafile (do we have content)?
+        if (GraphicType::Bitmap == aType || GraphicType::GdiMetafile == aType)
+        {
+            const Size aPrefSize(rGraphic.GetPrefSize());
+
+            // does content have a size?
+            if (aPrefSize.Width() && aPrefSize.Height())
+            {
+                // create SubSequence with FillGraphicPrimitive2D based on polygon range
+                const basegfx::B2DRange aOutRange(getB2DPolyPolygon().getB2DRange());
+                const basegfx::B2DHomMatrix aNewObjectTransform(
+                    basegfx::utils::createScaleTranslateB2DHomMatrix(aOutRange.getRange(),
+                                                                     aOutRange.getMinimum()));
+                Primitive2DReference xSubRef;
+
+                if (aOutRange != getDefinitionRange())
+                {
+                    // we want to paint (tiled) content which is defined relative to DefinitionRange
+                    // with the same tiling and offset(s) in the target range of the geometry (the
+                    // polygon). The range given in the local FillGraphicAttribute defines the position
+                    // of the graphic in unit coordinates relative to the DefinitionRange. Transform
+                    // this using DefinitionRange to get to the global definition and then with the
+                    // inverse transformation from the target range to go to unit coordinates relative
+                    // to that target coordinate system.
+                    basegfx::B2DRange aAdaptedRange(getFillGraphic().getGraphicRange());
+
+                    const basegfx::B2DHomMatrix aFromDefinitionRangeToGlobal(
+                        basegfx::utils::createScaleTranslateB2DHomMatrix(
+                            getDefinitionRange().getRange(), getDefinitionRange().getMinimum()));
+
+                    aAdaptedRange.transform(aFromDefinitionRangeToGlobal);
+
+                    basegfx::B2DHomMatrix aFromGlobalToOutRange(
+                        basegfx::utils::createScaleTranslateB2DHomMatrix(aOutRange.getRange(),
+                                                                         aOutRange.getMinimum()));
+                    aFromGlobalToOutRange.invert();
+
+                    aAdaptedRange.transform(aFromGlobalToOutRange);
+
+                    const drawinglayer::attribute::FillGraphicAttribute
+                        aAdaptedFillGraphicAttribute(getFillGraphic().getGraphic(), aAdaptedRange,
+                                                     getFillGraphic().getTiling(),
+                                                     getFillGraphic().getOffsetX(),
+                                                     getFillGraphic().getOffsetY());
+
+                    xSubRef = new FillGraphicPrimitive2D(aNewObjectTransform,
+                                                         aAdaptedFillGraphicAttribute);
+                }
+                else
+                {
+                    xSubRef = new FillGraphicPrimitive2D(aNewObjectTransform, getFillGraphic());
+                }
+
+                // embed to mask primitive
+                rContainer.push_back(
+                    new MaskPrimitive2D(getB2DPolyPolygon(), Primitive2DContainer{ xSubRef }));
+            }
+        }
+    }
+}
+
+PolyPolygonGraphicPrimitive2D::PolyPolygonGraphicPrimitive2D(
+    const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DRange& rDefinitionRange,
+    const attribute::FillGraphicAttribute& rFillGraphic)
+    : BufferedDecompositionPrimitive2D()
+    , maPolyPolygon(rPolyPolygon)
+    , maDefinitionRange(rDefinitionRange)
+    , maFillGraphic(rFillGraphic)
+{
+}
+
+bool PolyPolygonGraphicPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
+{
+    if (BufferedDecompositionPrimitive2D::operator==(rPrimitive))
+    {
+        const PolyPolygonGraphicPrimitive2D& rCompare
+            = static_cast<const PolyPolygonGraphicPrimitive2D&>(rPrimitive);
+
+        return (getB2DPolyPolygon() == rCompare.getB2DPolyPolygon()
+                && getDefinitionRange() == rCompare.getDefinitionRange()
+                && getFillGraphic() == rCompare.getFillGraphic());
+    }
+
+    return false;
+}
+
+// provide unique ID
+sal_uInt32 PolyPolygonGraphicPrimitive2D::getPrimitive2DID() const
+{
+    return PRIMITIVE2D_ID_POLYPOLYGONGRAPHICPRIMITIVE2D;
+}
+
+} // end drawinglayer::primitive2d namespace
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/drawinglayer/source/primitive2d/PolyPolygonHairlinePrimitive2D.cxx b/drawinglayer/source/primitive2d/PolyPolygonHairlinePrimitive2D.cxx
new file mode 100644
index 000000000000..e4c73f9191a5
--- /dev/null
+++ b/drawinglayer/source/primitive2d/PolyPolygonHairlinePrimitive2D.cxx
@@ -0,0 +1,83 @@
+/* -*- 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 incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawinglayer/primitive2d/PolyPolygonHairlinePrimitive2D.hxx>
+
+#include <basegfx/polygon/b2dpolypolygontools.hxx>
+#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
+#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
+
+using namespace com::sun::star;
+
+namespace drawinglayer::primitive2d
+{
+void PolyPolygonHairlinePrimitive2D::create2DDecomposition(
+    Primitive2DContainer& rContainer, const geometry::ViewInformation2D& /*rViewInformation*/) const
+{
+    const basegfx::B2DPolyPolygon aPolyPolygon(getB2DPolyPolygon());
+    const sal_uInt32 nCount(aPolyPolygon.count());
+
+    if (nCount)
+    {
+        for (sal_uInt32 a(0); a < nCount; a++)
+        {
+            rContainer.push_back(
+                new PolygonHairlinePrimitive2D(aPolyPolygon.getB2DPolygon(a), getBColor()));
+        }
+    }
+}
+
+PolyPolygonHairlinePrimitive2D::PolyPolygonHairlinePrimitive2D(
+    const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::BColor& rBColor)
+    : BufferedDecompositionPrimitive2D()
+    , maPolyPolygon(rPolyPolygon)
+    , maBColor(rBColor)
+{
+}
+
+bool PolyPolygonHairlinePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
+{
+    if (BufferedDecompositionPrimitive2D::operator==(rPrimitive))
+    {
+        const PolyPolygonHairlinePrimitive2D& rCompare
+            = static_cast<const PolyPolygonHairlinePrimitive2D&>(rPrimitive);
+
+        return (getB2DPolyPolygon() == rCompare.getB2DPolyPolygon()
+                && getBColor() == rCompare.getBColor());
+    }
+
+    return false;
+}
+
+basegfx::B2DRange PolyPolygonHairlinePrimitive2D::getB2DRange(
+    const geometry::ViewInformation2D& /*rViewInformation*/) const
+{
+    // return range
+    return basegfx::utils::getRange(getB2DPolyPolygon());
+}
+
+// provide unique ID
+sal_uInt32 PolyPolygonHairlinePrimitive2D::getPrimitive2DID() const
+{
+    return PRIMITIVE2D_ID_POLYPOLYGONHAIRLINEPRIMITIVE2D;
+}
+
+} // end drawinglayer::primitive2d namespace
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/drawinglayer/source/primitive2d/PolyPolygonHatchPrimitive2D.cxx b/drawinglayer/source/primitive2d/PolyPolygonHatchPrimitive2D.cxx
new file mode 100644
index 000000000000..17140a549436
--- /dev/null
+++ b/drawinglayer/source/primitive2d/PolyPolygonHatchPrimitive2D.cxx
@@ -0,0 +1,93 @@
+/* -*- 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 incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawinglayer/primitive2d/PolyPolygonHatchPrimitive2D.hxx>
+
+#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
+#include <drawinglayer/primitive2d/maskprimitive2d.hxx>
+#include <primitive2d/fillhatchprimitive2d.hxx>
+
+using namespace com::sun::star;
+
+namespace drawinglayer::primitive2d
+{
+void PolyPolygonHatchPrimitive2D::create2DDecomposition(
+    Primitive2DContainer& rContainer, const geometry::ViewInformation2D& /*rViewInformation*/) const
+{
+    if (!getFillHatch().isDefault())
+    {
+        // create SubSequence with FillHatchPrimitive2D
+        const basegfx::B2DRange aPolyPolygonRange(getB2DPolyPolygon().getB2DRange());
+        FillHatchPrimitive2D* pNewHatch = new FillHatchPrimitive2D(
+            aPolyPolygonRange, getDefinitionRange(), getBackgroundColor(), getFillHatch());
+        const Primitive2DReference xSubRef(pNewHatch);
+        const Primitive2DContainer aSubSequence{ xSubRef };
+
+        // create mask primitive
+        rContainer.push_back(new MaskPrimitive2D(getB2DPolyPolygon(), aSubSequence));
+    }
+}
+
+PolyPolygonHatchPrimitive2D::PolyPolygonHatchPrimitive2D(
+    const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::BColor& rBackgroundColor,
+    const attribute::FillHatchAttribute& rFillHatch)
+    : BufferedDecompositionPrimitive2D()
+    , maPolyPolygon(rPolyPolygon)
+    , maDefinitionRange(rPolyPolygon.getB2DRange())
+    , maBackgroundColor(rBackgroundColor)
+    , maFillHatch(rFillHatch)
+{
+}
+
+PolyPolygonHatchPrimitive2D::PolyPolygonHatchPrimitive2D(
+    const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DRange& rDefinitionRange,
+    const basegfx::BColor& rBackgroundColor, const attribute::FillHatchAttribute& rFillHatch)
+    : BufferedDecompositionPrimitive2D()
+    , maPolyPolygon(rPolyPolygon)
+    , maDefinitionRange(rDefinitionRange)
+    , maBackgroundColor(rBackgroundColor)
+    , maFillHatch(rFillHatch)
+{
+}
+
+bool PolyPolygonHatchPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
+{
+    if (BufferedDecompositionPrimitive2D::operator==(rPrimitive))
+    {
+        const PolyPolygonHatchPrimitive2D& rCompare
+            = static_cast<const PolyPolygonHatchPrimitive2D&>(rPrimitive);
+
+        return (getB2DPolyPolygon() == rCompare.getB2DPolyPolygon()
+                && getDefinitionRange() == rCompare.getDefinitionRange()
+                && getBackgroundColor() == rCompare.getBackgroundColor()
+                && getFillHatch() == rCompare.getFillHatch());
+    }
+
+    return false;
+}
+
+// provide unique ID
+sal_uInt32 PolyPolygonHatchPrimitive2D::getPrimitive2DID() const
+{
+    return PRIMITIVE2D_ID_POLYPOLYGONHATCHPRIMITIVE2D;
+}
+
+} // end drawinglayer::primitive2d namespace
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/drawinglayer/source/primitive2d/PolyPolygonMarkerPrimitive2D.cxx b/drawinglayer/source/primitive2d/PolyPolygonMarkerPrimitive2D.cxx
new file mode 100644
index 000000000000..b545ec9465fa
--- /dev/null
+++ b/drawinglayer/source/primitive2d/PolyPolygonMarkerPrimitive2D.cxx
@@ -0,0 +1,89 @@
+/* -*- 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 incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawinglayer/primitive2d/PolyPolygonMarkerPrimitive2D.hxx>
+
+#include <basegfx/polygon/b2dpolypolygontools.hxx>
+#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
+#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
+
+using namespace com::sun::star;
+
+namespace drawinglayer::primitive2d
+{
+void PolyPolygonMarkerPrimitive2D::create2DDecomposition(
+    Primitive2DContainer& rContainer, const geometry::ViewInformation2D& /*rViewInformation*/) const
+{
+    const basegfx::B2DPolyPolygon aPolyPolygon(getB2DPolyPolygon());
+    const sal_uInt32 nCount(aPolyPolygon.count());
+
+    if (nCount)
+    {
+        for (sal_uInt32 a(0); a < nCount; a++)
+        {
+            rContainer.push_back(new PolygonMarkerPrimitive2D(aPolyPolygon.getB2DPolygon(a),
+                                                              getRGBColorA(), getRGBColorB(),
+                                                              getDiscreteDashLength()));
+        }
+    }
+}
+
+PolyPolygonMarkerPrimitive2D::PolyPolygonMarkerPrimitive2D(
+    const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::BColor& rRGBColorA,
+    const basegfx::BColor& rRGBColorB, double fDiscreteDashLength)
+    : BufferedDecompositionPrimitive2D()
+    , maPolyPolygon(rPolyPolygon)
+    , maRGBColorA(rRGBColorA)
+    , maRGBColorB(rRGBColorB)
+    , mfDiscreteDashLength(fDiscreteDashLength)
+{
+}
+
+bool PolyPolygonMarkerPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
+{
+    if (BufferedDecompositionPrimitive2D::operator==(rPrimitive))
+    {
+        const PolyPolygonMarkerPrimitive2D& rCompare
+            = static_cast<const PolyPolygonMarkerPrimitive2D&>(rPrimitive);
+
+        return (getB2DPolyPolygon() == rCompare.getB2DPolyPolygon()
+                && getRGBColorA() == rCompare.getRGBColorA()
+                && getRGBColorB() == rCompare.getRGBColorB()
+                && getDiscreteDashLength() == rCompare.getDiscreteDashLength());
+    }
+
+    return false;
+}
+
+basegfx::B2DRange PolyPolygonMarkerPrimitive2D::getB2DRange(
+    const geometry::ViewInformation2D& /*rViewInformation*/) const
+{
+    // return range
+    return basegfx::utils::getRange(getB2DPolyPolygon());
+}
+
+// provide unique ID
+sal_uInt32 PolyPolygonMarkerPrimitive2D::getPrimitive2DID() const
+{
+    return PRIMITIVE2D_ID_POLYPOLYGONMARKERPRIMITIVE2D;
+}
+
+} // end drawinglayer::primitive2d namespace
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/drawinglayer/source/primitive2d/PolyPolygonSelectionPrimitive2D.cxx b/drawinglayer/source/primitive2d/PolyPolygonSelectionPrimitive2D.cxx
new file mode 100644
index 000000000000..7be684c2f71e
--- /dev/null
+++ b/drawinglayer/source/primitive2d/PolyPolygonSelectionPrimitive2D.cxx
@@ -0,0 +1,126 @@
+/* -*- 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 incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawinglayer/primitive2d/PolyPolygonSelectionPrimitive2D.hxx>
+
+#include <basegfx/polygon/b2dpolypolygontools.hxx>
+#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
+#include <drawinglayer/geometry/viewinformation2d.hxx>
+#include <drawinglayer/primitive2d/PolyPolygonColorPrimitive2D.hxx>
+#include <drawinglayer/primitive2d/PolyPolygonStrokePrimitive2D.hxx>
+#include <drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx>
+
+using namespace com::sun::star;
+
+namespace drawinglayer::primitive2d
+{
+void PolyPolygonSelectionPrimitive2D::create2DDecomposition(
+    Primitive2DContainer& rContainer, const geometry::ViewInformation2D& /*rViewInformation*/) const
+{
+    if (getTransparence() >= 1.0 || !getB2DPolyPolygon().count())
+        return;
+
+    Primitive2DContainer aRetval;
+
+    if (getFill() && getB2DPolyPolygon().isClosed())
+    {
+        // create fill primitive
+        const Primitive2DReference aFill(
+            new PolyPolygonColorPrimitive2D(getB2DPolyPolygon(), getColor()));
+
+        aRetval = Primitive2DContainer{ aFill };
+    }
+
+    if (getDiscreteGrow() > 0.0)
+    {
+        const attribute::LineAttribute aLineAttribute(getColor(),
+                                                      getDiscreteGrow() * getDiscreteUnit() * 2.0);
+        const Primitive2DReference aFatLine(
+            new PolyPolygonStrokePrimitive2D(getB2DPolyPolygon(), aLineAttribute));
+
+        aRetval.push_back(aFatLine);
+    }
+
+    // embed filled to transparency (if used)
+    if (!aRetval.empty() && getTransparence() > 0.0)
+    {
+        const Primitive2DReference aTrans(
+            new UnifiedTransparencePrimitive2D(aRetval, getTransparence()));
+
+        aRetval = Primitive2DContainer{ aTrans };
+    }
+
+    rContainer.insert(rContainer.end(), aRetval.begin(), aRetval.end());
+}
+
+PolyPolygonSelectionPrimitive2D::PolyPolygonSelectionPrimitive2D(
+    const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::BColor& rColor,
+    double fTransparence, double fDiscreteGrow, bool bFill)
+    : DiscreteMetricDependentPrimitive2D()
+    , maPolyPolygon(rPolyPolygon)
+    , maColor(rColor)
+    , mfTransparence(fTransparence)
+    , mfDiscreteGrow(fabs(fDiscreteGrow))
+    , mbFill(bFill)
+{
+}
+
+bool PolyPolygonSelectionPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
+{
+    if (DiscreteMetricDependentPrimitive2D::operator==(rPrimitive))
+    {
+        const PolyPolygonSelectionPrimitive2D& rCompare
+            = static_cast<const PolyPolygonSelectionPrimitive2D&>(rPrimitive);
+
+        return (
+            getB2DPolyPolygon() == rCompare.getB2DPolyPolygon() && getColor() == rCompare.getColor()
+            && getTransparence() == rCompare.getTransparence()
+            && getDiscreteGrow() == rCompare.getDiscreteGrow() && getFill() == rCompare.getFill());
+    }
+
+    return false;
+}
+
+basegfx::B2DRange PolyPolygonSelectionPrimitive2D::getB2DRange(
+    const geometry::ViewInformation2D& rViewInformation) const
+{
+    basegfx::B2DRange aRetval(basegfx::utils::getRange(getB2DPolyPolygon()));
+
+    if (getDiscreteGrow() > 0.0)
+    {
+        // get the current DiscreteUnit (not sure if getDiscreteUnit() is updated here, better go safe way)
+        const double fDiscreteUnit(
+            (rViewInformation.getInverseObjectToViewTransformation() * basegfx::B2DVector(1.0, 0.0))
+                .getLength());
+
+        aRetval.grow(fDiscreteUnit * getDiscreteGrow());
+    }
+
+    return aRetval;
+}
+
+// provide unique ID
+sal_uInt32 PolyPolygonSelectionPrimitive2D::getPrimitive2DID() const
+{
+    return PRIMITIVE2D_ID_POLYPOLYGONSELECTIONPRIMITIVE2D;
+}
+
+} // end drawinglayer::primitive2d namespace
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/drawinglayer/source/primitive2d/PolyPolygonStrokePrimitive2D.cxx b/drawinglayer/source/primitive2d/PolyPolygonStrokePrimitive2D.cxx
new file mode 100644
index 000000000000..53abec1138c3
--- /dev/null
+++ b/drawinglayer/source/primitive2d/PolyPolygonStrokePrimitive2D.cxx
@@ -0,0 +1,103 @@
+/* -*- 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 incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawinglayer/primitive2d/PolyPolygonStrokePrimitive2D.hxx>
+
+#include <basegfx/polygon/b2dpolypolygontools.hxx>
+#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
+#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
+
+using namespace com::sun::star;
+
+namespace drawinglayer::primitive2d
+{
+void PolyPolygonStrokePrimitive2D::create2DDecomposition(
+    Primitive2DContainer& rContainer, const geometry::ViewInformation2D& /*rViewInformation*/) const
+{
+    const basegfx::B2DPolyPolygon aPolyPolygon(getB2DPolyPolygon());
+    const sal_uInt32 nCount(aPolyPolygon.count());
+
+    if (nCount)
+    {
+        for (sal_uInt32 a(0); a < nCount; a++)
+        {
+            rContainer.push_back(new PolygonStrokePrimitive2D(
+                aPolyPolygon.getB2DPolygon(a), getLineAttribute(), getStrokeAttribute()));
+        }
+    }
+}
+
+PolyPolygonStrokePrimitive2D::PolyPolygonStrokePrimitive2D(
+    const basegfx::B2DPolyPolygon& rPolyPolygon, const attribute::LineAttribute& rLineAttribute,
+    const attribute::StrokeAttribute& rStrokeAttribute)
+    : BufferedDecompositionPrimitive2D()
+    , maPolyPolygon(rPolyPolygon)
+    , maLineAttribute(rLineAttribute)
+    , maStrokeAttribute(rStrokeAttribute)
+{
+}
+
+PolyPolygonStrokePrimitive2D::PolyPolygonStrokePrimitive2D(
+    const basegfx::B2DPolyPolygon& rPolyPolygon, const attribute::LineAttribute& rLineAttribute)
+    : BufferedDecompositionPrimitive2D()
+    , maPolyPolygon(rPolyPolygon)
+    , maLineAttribute(rLineAttribute)
+    , maStrokeAttribute()
+{
+}
+
+bool PolyPolygonStrokePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
+{
+    if (BufferedDecompositionPrimitive2D::operator==(rPrimitive))
+    {
+        const PolyPolygonStrokePrimitive2D& rCompare
+            = static_cast<const PolyPolygonStrokePrimitive2D&>(rPrimitive);
+
+        return (getB2DPolyPolygon() == rCompare.getB2DPolyPolygon()
+                && getLineAttribute() == rCompare.getLineAttribute()
+                && getStrokeAttribute() == rCompare.getStrokeAttribute());
+    }
+
+    return false;
+}
+
+basegfx::B2DRange PolyPolygonStrokePrimitive2D::getB2DRange(
+    const geometry::ViewInformation2D& /*rViewInformation*/) const
+{
+    // get range of it (subdivided)
+    basegfx::B2DRange aRetval(basegfx::utils::getRange(getB2DPolyPolygon()));
+
+    // if width, grow by line width
+    if (getLineAttribute().getWidth())
+    {
+        aRetval.grow(getLineAttribute().getWidth() / 2.0);
+    }
+
+    return aRetval;
+}
+
+// provide unique ID
+sal_uInt32 PolyPolygonStrokePrimitive2D::getPrimitive2DID() const
+{
+    return PRIMITIVE2D_ID_POLYPOLYGONSTROKEPRIMITIVE2D;
+}
+
+} // end drawinglayer::primitive2d namespace
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx
deleted file mode 100644
index 02e3d5705f95..000000000000
--- a/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx
+++ /dev/null
@@ -1,572 +0,0 @@
-/* -*- 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 incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <drawinglayer/primitive2d/PolyPolygonHairlinePrimitive2D.hxx>
-#include <drawinglayer/primitive2d/PolyPolygonMarkerPrimitive2D.hxx>
-#include <drawinglayer/primitive2d/PolyPolygonStrokePrimitive2D.hxx>
-#include <drawinglayer/primitive2d/PolyPolygonColorPrimitive2D.hxx>
-#include <drawinglayer/primitive2d/PolyPolygonGradientPrimitive2D.hxx>
-#include <drawinglayer/primitive2d/PolyPolygonHatchPrimitive2D.hxx>
-#include <drawinglayer/primitive2d/PolyPolygonGraphicPrimitive2D.hxx>
-#include <drawinglayer/primitive2d/PolyPolygonSelectionPrimitive2D.hxx>
-
-#include <basegfx/polygon/b2dpolypolygontools.hxx>
-#include <drawinglayer/primitive2d/fillgradientprimitive2d.hxx>
-#include <drawinglayer/primitive2d/maskprimitive2d.hxx>
-#include <primitive2d/fillhatchprimitive2d.hxx>
-#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <drawinglayer/primitive2d/fillgraphicprimitive2d.hxx>
-#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
-#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
-#include <basegfx/matrix/b2dhommatrixtools.hxx>
-#include <drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx>
-#include <drawinglayer/geometry/viewinformation2d.hxx>
-#include <vcl/graph.hxx>
-
-using namespace com::sun::star;
-
-namespace drawinglayer::primitive2d
-{
-void PolyPolygonHairlinePrimitive2D::create2DDecomposition(
-    Primitive2DContainer& rContainer, const geometry::ViewInformation2D& /*rViewInformation*/) const
-{
-    const basegfx::B2DPolyPolygon aPolyPolygon(getB2DPolyPolygon());
-    const sal_uInt32 nCount(aPolyPolygon.count());
-
-    if (nCount)
-    {
-        for (sal_uInt32 a(0); a < nCount; a++)
-        {
-            rContainer.push_back(
-                new PolygonHairlinePrimitive2D(aPolyPolygon.getB2DPolygon(a), getBColor()));
-        }
-    }
-}
-
-PolyPolygonHairlinePrimitive2D::PolyPolygonHairlinePrimitive2D(
-    const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::BColor& rBColor)
-    : BufferedDecompositionPrimitive2D()
-    , maPolyPolygon(rPolyPolygon)
-    , maBColor(rBColor)
-{
-}
-
-bool PolyPolygonHairlinePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
-{
-    if (BufferedDecompositionPrimitive2D::operator==(rPrimitive))
-    {
-        const PolyPolygonHairlinePrimitive2D& rCompare
-            = static_cast<const PolyPolygonHairlinePrimitive2D&>(rPrimitive);
-
-        return (getB2DPolyPolygon() == rCompare.getB2DPolyPolygon()
-                && getBColor() == rCompare.getBColor());
-    }
-
-    return false;
-}
-
-basegfx::B2DRange PolyPolygonHairlinePrimitive2D::getB2DRange(
-    const geometry::ViewInformation2D& /*rViewInformation*/) const
-{
-    // return range
-    return basegfx::utils::getRange(getB2DPolyPolygon());
-}
-
-// provide unique ID
-sal_uInt32 PolyPolygonHairlinePrimitive2D::getPrimitive2DID() const
-{
-    return PRIMITIVE2D_ID_POLYPOLYGONHAIRLINEPRIMITIVE2D;
-}
-
-void PolyPolygonMarkerPrimitive2D::create2DDecomposition(
-    Primitive2DContainer& rContainer, const geometry::ViewInformation2D& /*rViewInformation*/) const
-{
-    const basegfx::B2DPolyPolygon aPolyPolygon(getB2DPolyPolygon());
-    const sal_uInt32 nCount(aPolyPolygon.count());
-
-    if (nCount)
-    {
-        for (sal_uInt32 a(0); a < nCount; a++)
-        {
-            rContainer.push_back(new PolygonMarkerPrimitive2D(aPolyPolygon.getB2DPolygon(a),
-                                                              getRGBColorA(), getRGBColorB(),
-                                                              getDiscreteDashLength()));
-        }
-    }
-}
-
-PolyPolygonMarkerPrimitive2D::PolyPolygonMarkerPrimitive2D(
-    const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::BColor& rRGBColorA,
-    const basegfx::BColor& rRGBColorB, double fDiscreteDashLength)
-    : BufferedDecompositionPrimitive2D()
-    , maPolyPolygon(rPolyPolygon)
-    , maRGBColorA(rRGBColorA)
-    , maRGBColorB(rRGBColorB)
-    , mfDiscreteDashLength(fDiscreteDashLength)
-{
-}
-
-bool PolyPolygonMarkerPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
-{
-    if (BufferedDecompositionPrimitive2D::operator==(rPrimitive))
-    {
-        const PolyPolygonMarkerPrimitive2D& rCompare
-            = static_cast<const PolyPolygonMarkerPrimitive2D&>(rPrimitive);
-
-        return (getB2DPolyPolygon() == rCompare.getB2DPolyPolygon()
-                && getRGBColorA() == rCompare.getRGBColorA()
-                && getRGBColorB() == rCompare.getRGBColorB()
-                && getDiscreteDashLength() == rCompare.getDiscreteDashLength());
-    }
-
-    return false;
-}
-
-basegfx::B2DRange PolyPolygonMarkerPrimitive2D::getB2DRange(
-    const geometry::ViewInformation2D& /*rViewInformation*/) const
-{
-    // return range
-    return basegfx::utils::getRange(getB2DPolyPolygon());
-}
-
-// provide unique ID
-sal_uInt32 PolyPolygonMarkerPrimitive2D::getPrimitive2DID() const
-{
-    return PRIMITIVE2D_ID_POLYPOLYGONMARKERPRIMITIVE2D;
-}
-
-void PolyPolygonStrokePrimitive2D::create2DDecomposition(
-    Primitive2DContainer& rContainer, const geometry::ViewInformation2D& /*rViewInformation*/) const
-{
-    const basegfx::B2DPolyPolygon aPolyPolygon(getB2DPolyPolygon());
-    const sal_uInt32 nCount(aPolyPolygon.count());
-
-    if (nCount)
-    {
-        for (sal_uInt32 a(0); a < nCount; a++)
-        {
-            rContainer.push_back(new PolygonStrokePrimitive2D(
-                aPolyPolygon.getB2DPolygon(a), getLineAttribute(), getStrokeAttribute()));
-        }
-    }
-}
-
-PolyPolygonStrokePrimitive2D::PolyPolygonStrokePrimitive2D(
-    const basegfx::B2DPolyPolygon& rPolyPolygon, const attribute::LineAttribute& rLineAttribute,
-    const attribute::StrokeAttribute& rStrokeAttribute)
-    : BufferedDecompositionPrimitive2D()
-    , maPolyPolygon(rPolyPolygon)
-    , maLineAttribute(rLineAttribute)
-    , maStrokeAttribute(rStrokeAttribute)
-{
-}
-
-PolyPolygonStrokePrimitive2D::PolyPolygonStrokePrimitive2D(
-    const basegfx::B2DPolyPolygon& rPolyPolygon, const attribute::LineAttribute& rLineAttribute)
-    : BufferedDecompositionPrimitive2D()
-    , maPolyPolygon(rPolyPolygon)
-    , maLineAttribute(rLineAttribute)
-    , maStrokeAttribute()
-{
-}
-
-bool PolyPolygonStrokePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
-{
-    if (BufferedDecompositionPrimitive2D::operator==(rPrimitive))
-    {
-        const PolyPolygonStrokePrimitive2D& rCompare
-            = static_cast<const PolyPolygonStrokePrimitive2D&>(rPrimitive);
-
-        return (getB2DPolyPolygon() == rCompare.getB2DPolyPolygon()
-                && getLineAttribute() == rCompare.getLineAttribute()
-                && getStrokeAttribute() == rCompare.getStrokeAttribute());
-    }
-
-    return false;
-}
-
-basegfx::B2DRange PolyPolygonStrokePrimitive2D::getB2DRange(
-    const geometry::ViewInformation2D& /*rViewInformation*/) const
-{
-    // get range of it (subdivided)
-    basegfx::B2DRange aRetval(basegfx::utils::getRange(getB2DPolyPolygon()));
-
-    // if width, grow by line width
-    if (getLineAttribute().getWidth())
-    {
-        aRetval.grow(getLineAttribute().getWidth() / 2.0);
-    }
-
-    return aRetval;
-}
-
-// provide unique ID
-sal_uInt32 PolyPolygonStrokePrimitive2D::getPrimitive2DID() const
-{
-    return PRIMITIVE2D_ID_POLYPOLYGONSTROKEPRIMITIVE2D;
-}
-
-PolyPolygonColorPrimitive2D::PolyPolygonColorPrimitive2D(
-    const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::BColor& rBColor)
-    : BasePrimitive2D()
-    , maPolyPolygon(rPolyPolygon)
-    , maBColor(rBColor)
-{
-}
-
-bool PolyPolygonColorPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
-{
-    if (BasePrimitive2D::operator==(rPrimitive))
-    {
-        const PolyPolygonColorPrimitive2D& rCompare
-            = static_cast<const PolyPolygonColorPrimitive2D&>(rPrimitive);
-
-        return (getB2DPolyPolygon() == rCompare.getB2DPolyPolygon()
-                && getBColor() == rCompare.getBColor());
-    }
-
-    return false;
-}
-
-basegfx::B2DRange PolyPolygonColorPrimitive2D::getB2DRange(
-    const geometry::ViewInformation2D& /*rViewInformation*/) const
-{
-    // return range
-    return basegfx::utils::getRange(getB2DPolyPolygon());
-}
-
-// provide unique ID
-sal_uInt32 PolyPolygonColorPrimitive2D::getPrimitive2DID() const
-{
-    return PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D;
-}
-
-void PolyPolygonGradientPrimitive2D::create2DDecomposition(
-    Primitive2DContainer& rContainer, const geometry::ViewInformation2D& /*rViewInformation*/) const
-{
-    if (!getFillGradient().isDefault())
-    {
-        // create SubSequence with FillGradientPrimitive2D
-        const basegfx::B2DRange aPolyPolygonRange(getB2DPolyPolygon().getB2DRange());
-        FillGradientPrimitive2D* pNewGradient = new FillGradientPrimitive2D(
-            aPolyPolygonRange, getDefinitionRange(), getFillGradient());
-        const Primitive2DReference xSubRef(pNewGradient);
-        const Primitive2DContainer aSubSequence{ xSubRef };
-
-        // create mask primitive
-        rContainer.push_back(new MaskPrimitive2D(getB2DPolyPolygon(), aSubSequence));
-    }
-}
-
-PolyPolygonGradientPrimitive2D::PolyPolygonGradientPrimitive2D(
-    const basegfx::B2DPolyPolygon& rPolyPolygon,
-    const attribute::FillGradientAttribute& rFillGradient)
-    : BufferedDecompositionPrimitive2D()
-    , maPolyPolygon(rPolyPolygon)
-    , maDefinitionRange(rPolyPolygon.getB2DRange())
-    , maFillGradient(rFillGradient)
-{
-}
-
-PolyPolygonGradientPrimitive2D::PolyPolygonGradientPrimitive2D(
-    const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DRange& rDefinitionRange,
-    const attribute::FillGradientAttribute& rFillGradient)
-    : BufferedDecompositionPrimitive2D()
-    , maPolyPolygon(rPolyPolygon)
-    , maDefinitionRange(rDefinitionRange)
-    , maFillGradient(rFillGradient)
-{
-}
-
-bool PolyPolygonGradientPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
-{
-    if (BufferedDecompositionPrimitive2D::operator==(rPrimitive))
-    {
-        const PolyPolygonGradientPrimitive2D& rCompare
-            = static_cast<const PolyPolygonGradientPrimitive2D&>(rPrimitive);
-
-        return (getB2DPolyPolygon() == rCompare.getB2DPolyPolygon()
-                && getDefinitionRange() == rCompare.getDefinitionRange()
-                && getFillGradient() == rCompare.getFillGradient());
-    }
-
-    return false;
-}
-
-// provide unique ID
-sal_uInt32 PolyPolygonGradientPrimitive2D::getPrimitive2DID() const
-{
-    return PRIMITIVE2D_ID_POLYPOLYGONGRADIENTPRIMITIVE2D;
-}
-
-void PolyPolygonHatchPrimitive2D::create2DDecomposition(
-    Primitive2DContainer& rContainer, const geometry::ViewInformation2D& /*rViewInformation*/) const
-{
-    if (!getFillHatch().isDefault())
-    {
-        // create SubSequence with FillHatchPrimitive2D
-        const basegfx::B2DRange aPolyPolygonRange(getB2DPolyPolygon().getB2DRange());
-        FillHatchPrimitive2D* pNewHatch = new FillHatchPrimitive2D(
-            aPolyPolygonRange, getDefinitionRange(), getBackgroundColor(), getFillHatch());
-        const Primitive2DReference xSubRef(pNewHatch);
-        const Primitive2DContainer aSubSequence{ xSubRef };
-
-        // create mask primitive
-        rContainer.push_back(new MaskPrimitive2D(getB2DPolyPolygon(), aSubSequence));
-    }
-}
-
-PolyPolygonHatchPrimitive2D::PolyPolygonHatchPrimitive2D(
-    const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::BColor& rBackgroundColor,
-    const attribute::FillHatchAttribute& rFillHatch)
-    : BufferedDecompositionPrimitive2D()
-    , maPolyPolygon(rPolyPolygon)
-    , maDefinitionRange(rPolyPolygon.getB2DRange())
-    , maBackgroundColor(rBackgroundColor)
-    , maFillHatch(rFillHatch)
-{
-}
-
-PolyPolygonHatchPrimitive2D::PolyPolygonHatchPrimitive2D(
-    const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DRange& rDefinitionRange,
-    const basegfx::BColor& rBackgroundColor, const attribute::FillHatchAttribute& rFillHatch)
-    : BufferedDecompositionPrimitive2D()
-    , maPolyPolygon(rPolyPolygon)
-    , maDefinitionRange(rDefinitionRange)
-    , maBackgroundColor(rBackgroundColor)
-    , maFillHatch(rFillHatch)
-{
-}
-
-bool PolyPolygonHatchPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
-{
-    if (BufferedDecompositionPrimitive2D::operator==(rPrimitive))
-    {
-        const PolyPolygonHatchPrimitive2D& rCompare
-            = static_cast<const PolyPolygonHatchPrimitive2D&>(rPrimitive);
-
-        return (getB2DPolyPolygon() == rCompare.getB2DPolyPolygon()
-                && getDefinitionRange() == rCompare.getDefinitionRange()
-                && getBackgroundColor() == rCompare.getBackgroundColor()
-                && getFillHatch() == rCompare.getFillHatch());
-    }
-
-    return false;
-}
-
-// provide unique ID
-sal_uInt32 PolyPolygonHatchPrimitive2D::getPrimitive2DID() const
-{
-    return PRIMITIVE2D_ID_POLYPOLYGONHATCHPRIMITIVE2D;
-}
-
-void PolyPolygonGraphicPrimitive2D::create2DDecomposition(
-    Primitive2DContainer& rContainer, const geometry::ViewInformation2D& /*rViewInformation*/) const
-{
-    if (!getFillGraphic().isDefault())
-    {
-        const Graphic& rGraphic = getFillGraphic().getGraphic();
-        const GraphicType aType(rGraphic.GetType());
-
-        // is there a bitmap or a metafile (do we have content)?
-        if (GraphicType::Bitmap == aType || GraphicType::GdiMetafile == aType)
-        {
-            const Size aPrefSize(rGraphic.GetPrefSize());
-
-            // does content have a size?
-            if (aPrefSize.Width() && aPrefSize.Height())
-            {
-                // create SubSequence with FillGraphicPrimitive2D based on polygon range
-                const basegfx::B2DRange aOutRange(getB2DPolyPolygon().getB2DRange());
-                const basegfx::B2DHomMatrix aNewObjectTransform(
-                    basegfx::utils::createScaleTranslateB2DHomMatrix(aOutRange.getRange(),
-                                                                     aOutRange.getMinimum()));
-                Primitive2DReference xSubRef;
-
-                if (aOutRange != getDefinitionRange())
-                {
-                    // we want to paint (tiled) content which is defined relative to DefinitionRange
-                    // with the same tiling and offset(s) in the target range of the geometry (the
-                    // polygon). The range given in the local FillGraphicAttribute defines the position
-                    // of the graphic in unit coordinates relative to the DefinitionRange. Transform
-                    // this using DefinitionRange to get to the global definition and then with the
-                    // inverse transformation from the target range to go to unit coordinates relative
-                    // to that target coordinate system.
-                    basegfx::B2DRange aAdaptedRange(getFillGraphic().getGraphicRange());
-
-                    const basegfx::B2DHomMatrix aFromDefinitionRangeToGlobal(
-                        basegfx::utils::createScaleTranslateB2DHomMatrix(
-                            getDefinitionRange().getRange(), getDefinitionRange().getMinimum()));
-
-                    aAdaptedRange.transform(aFromDefinitionRangeToGlobal);
-
-                    basegfx::B2DHomMatrix aFromGlobalToOutRange(
-                        basegfx::utils::createScaleTranslateB2DHomMatrix(aOutRange.getRange(),
-                                                                         aOutRange.getMinimum()));
-                    aFromGlobalToOutRange.invert();
-
-                    aAdaptedRange.transform(aFromGlobalToOutRange);
-
-                    const drawinglayer::attribute::FillGraphicAttribute
-                        aAdaptedFillGraphicAttribute(getFillGraphic().getGraphic(), aAdaptedRange,
-                                                     getFillGraphic().getTiling(),
-                                                     getFillGraphic().getOffsetX(),
-                                                     getFillGraphic().getOffsetY());
-
-                    xSubRef = new FillGraphicPrimitive2D(aNewObjectTransform,
-                                                         aAdaptedFillGraphicAttribute);
-                }
-                else
-                {
-                    xSubRef = new FillGraphicPrimitive2D(aNewObjectTransform, getFillGraphic());
-                }
-
-                // embed to mask primitive
-                rContainer.push_back(
-                    new MaskPrimitive2D(getB2DPolyPolygon(), Primitive2DContainer{ xSubRef }));
-            }
-        }
-    }
-}
-
-PolyPolygonGraphicPrimitive2D::PolyPolygonGraphicPrimitive2D(
-    const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DRange& rDefinitionRange,
-    const attribute::FillGraphicAttribute& rFillGraphic)
-    : BufferedDecompositionPrimitive2D()
-    , maPolyPolygon(rPolyPolygon)
-    , maDefinitionRange(rDefinitionRange)
-    , maFillGraphic(rFillGraphic)
-{
-}
-
-bool PolyPolygonGraphicPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
-{
-    if (BufferedDecompositionPrimitive2D::operator==(rPrimitive))
-    {
-        const PolyPolygonGraphicPrimitive2D& rCompare
-            = static_cast<const PolyPolygonGraphicPrimitive2D&>(rPrimitive);
-
-        return (getB2DPolyPolygon() == rCompare.getB2DPolyPolygon()
-                && getDefinitionRange() == rCompare.getDefinitionRange()
-                && getFillGraphic() == rCompare.getFillGraphic());
-    }
-
-    return false;
-}
-
-// provide unique ID
-sal_uInt32 PolyPolygonGraphicPrimitive2D::getPrimitive2DID() const
-{
-    return PRIMITIVE2D_ID_POLYPOLYGONGRAPHICPRIMITIVE2D;
-}
-
-void PolyPolygonSelectionPrimitive2D::create2DDecomposition(
-    Primitive2DContainer& rContainer, const geometry::ViewInformation2D& /*rViewInformation*/) const
-{
-    if (getTransparence() >= 1.0 || !getB2DPolyPolygon().count())
-        return;
-
-    Primitive2DContainer aRetval;
-
-    if (getFill() && getB2DPolyPolygon().isClosed())
-    {
-        // create fill primitive
-        const Primitive2DReference aFill(
-            new PolyPolygonColorPrimitive2D(getB2DPolyPolygon(), getColor()));
-
-        aRetval = Primitive2DContainer{ aFill };
-    }
-
-    if (getDiscreteGrow() > 0.0)
-    {
-        const attribute::LineAttribute aLineAttribute(getColor(),
-                                                      getDiscreteGrow() * getDiscreteUnit() * 2.0);
-        const Primitive2DReference aFatLine(
-            new PolyPolygonStrokePrimitive2D(getB2DPolyPolygon(), aLineAttribute));
-
-        aRetval.push_back(aFatLine);
-    }
-
-    // embed filled to transparency (if used)
-    if (!aRetval.empty() && getTransparence() > 0.0)
-    {
-        const Primitive2DReference aTrans(
-            new UnifiedTransparencePrimitive2D(aRetval, getTransparence()));
-
-        aRetval = Primitive2DContainer{ aTrans };
-    }
-
-    rContainer.insert(rContainer.end(), aRetval.begin(), aRetval.end());
-}
-
-PolyPolygonSelectionPrimitive2D::PolyPolygonSelectionPrimitive2D(
-    const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::BColor& rColor,
-    double fTransparence, double fDiscreteGrow, bool bFill)
-    : DiscreteMetricDependentPrimitive2D()
-    , maPolyPolygon(rPolyPolygon)
-    , maColor(rColor)
-    , mfTransparence(fTransparence)
-    , mfDiscreteGrow(fabs(fDiscreteGrow))
-    , mbFill(bFill)
-{
-}
-
-bool PolyPolygonSelectionPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
-{
-    if (DiscreteMetricDependentPrimitive2D::operator==(rPrimitive))
-    {
-        const PolyPolygonSelectionPrimitive2D& rCompare
-            = static_cast<const PolyPolygonSelectionPrimitive2D&>(rPrimitive);
-
-        return (
-            getB2DPolyPolygon() == rCompare.getB2DPolyPolygon() && getColor() == rCompare.getColor()
-            && getTransparence() == rCompare.getTransparence()
-            && getDiscreteGrow() == rCompare.getDiscreteGrow() && getFill() == rCompare.getFill());
-    }
-
-    return false;
-}
-
-basegfx::B2DRange PolyPolygonSelectionPrimitive2D::getB2DRange(
-    const geometry::ViewInformation2D& rViewInformation) const
-{
-    basegfx::B2DRange aRetval(basegfx::utils::getRange(getB2DPolyPolygon()));
-
-    if (getDiscreteGrow() > 0.0)
-    {
-        // get the current DiscreteUnit (not sure if getDiscreteUnit() is updated here, better go safe way)
-        const double fDiscreteUnit(
-            (rViewInformation.getInverseObjectToViewTransformation() * basegfx::B2DVector(1.0, 0.0))
-                .getLength());
-
-        aRetval.grow(fDiscreteUnit * getDiscreteGrow());
-    }
-
-    return aRetval;
-}
-
-// provide unique ID
-sal_uInt32 PolyPolygonSelectionPrimitive2D::getPrimitive2DID() const
-{
-    return PRIMITIVE2D_ID_POLYPOLYGONSELECTIONPRIMITIVE2D;
-}
-
-} // end drawinglayer::primitive2d namespace
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 83859e149dea5ad481d020f6dc6e2090101ba170
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Mon Apr 6 23:03:29 2020 +0200
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Tue Apr 7 01:47:14 2020 +0200

    remove polygonprimitive2d.hxx from clang-format blacklist
    
    Change-Id: I3fa3f255b3f594c421f7fcaec6ca63b83cc085ed
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91787
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/include/drawinglayer/primitive2d/polygonprimitive2d.hxx b/include/drawinglayer/primitive2d/polygonprimitive2d.hxx
index 4ccbcb2e7f7a..142e0d88eb8d 100644
--- a/include/drawinglayer/primitive2d/polygonprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/polygonprimitive2d.hxx
@@ -29,10 +29,9 @@
 #include <basegfx/polygon/b2dpolygon.hxx>
 #include <basegfx/color/bcolor.hxx>
 
-
 namespace drawinglayer::primitive2d
 {
-        /** PolygonHairlinePrimitive2D class
+/** PolygonHairlinePrimitive2D class
 
             This primitive defines a Hairline. Since hairlines are view-dependent,
             this primitive is view-dependent, too.
@@ -40,36 +39,35 @@ namespace drawinglayer::primitive2d
             This is one of the non-decomposable primitives, so a renderer
             should process it.
          */
-        class DRAWINGLAYER_DLLPUBLIC PolygonHairlinePrimitive2D final : public BasePrimitive2D
-        {
-        private:
-            /// the hairline geometry
-            basegfx::B2DPolygon                     maPolygon;
+class DRAWINGLAYER_DLLPUBLIC PolygonHairlinePrimitive2D final : public BasePrimitive2D
+{
+private:
+    /// the hairline geometry
+    basegfx::B2DPolygon maPolygon;
 
-            /// the hairline color
-            basegfx::BColor                         maBColor;
+    /// the hairline color
+    basegfx::BColor maBColor;
 
-        public:
-            /// constructor
-            PolygonHairlinePrimitive2D(
-                const basegfx::B2DPolygon& rPolygon,
-                const basegfx::BColor& rBColor);
+public:
+    /// constructor
+    PolygonHairlinePrimitive2D(const basegfx::B2DPolygon& rPolygon, const basegfx::BColor& rBColor);
 
-            /// data read access
-            const basegfx::B2DPolygon& getB2DPolygon() const { return maPolygon; }
-            const basegfx::BColor& getBColor() const { return maBColor; }
+    /// data read access
+    const basegfx::B2DPolygon& getB2DPolygon() const { return maPolygon; }
+    const basegfx::BColor& getBColor() const { return maBColor; }
 
-            /// compare operator
-            virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
+    /// compare operator
+    virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
 
-            /// get range
-            virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override;
+    /// get range
+    virtual basegfx::B2DRange
+    getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override;
 
-            /// provide unique ID
-            virtual sal_uInt32 getPrimitive2DID() const override;
-        };
+    /// provide unique ID
+    virtual sal_uInt32 getPrimitive2DID() const override;
+};
 
-        /** PolygonMarkerPrimitive2D class
+/** PolygonMarkerPrimitive2D class
 
             This primitive defines a two-colored marker hairline which is
             dashed with the given dash length. Since hairlines are view-dependent,
@@ -78,192 +76,195 @@ namespace drawinglayer::primitive2d
             It will be decomposed to the needed PolygonHairlinePrimitive2D if
             not handled directly by a renderer.
          */
-        class DRAWINGLAYER_DLLPUBLIC PolygonMarkerPrimitive2D final : public BufferedDecompositionPrimitive2D
-        {
-        private:
-            /// the marker hairline geometry

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list