[Libreoffice-commits] core.git: Branch 'feature/drawinglayercore' - 213 commits - accessibility/source basctl/source basic/qa basic/source chart2/qa chart2/source compilerplugins/clang config_host/config_skia.h.in configmgr/source configure.ac connectivity/CppunitTest_connectivity_mysql_test.mk connectivity/qa connectivity/README cppu/source cui/inc cui/source cui/uiconfig desktop/qa desktop/source dictionaries distro-configs/Jenkins 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/box2d external/clucene external/gpgmepp external/libnumbertext external/mariadb-connector-c extras/Package_gallmytheme.mk extras/Package_gallsystem.mk extras/source filter/Library_pdffilter.mk filter/Library_svgfilter.mk filter/source helpcontent2 icon-themes/colibre icon-themes/colibre_svg i con-themes/sukapura icon-themes/sukapura_svg include/basegfx include/drawinglayer include/o3tl include/svtools include/svx include/toolkit include/tools include/unotest include/vbahelper include/vcl jvmfwk/source lingucomponent/source Makefile.in o3tl/qa officecfg/registry pyuno/source readlicense_oo/license RepositoryExternal.mk Repository.mk sc/CppunitTest_sc_ucalc.mk sc/inc sc/Library_sc.mk sc/qa sc/source sc/uiconfig sd/CppunitTest_sd_uimpress.mk sdext/source sd/inc sd/Library_sd.mk sd/qa sd/source sd/uiconfig setup_native/scripts sfx2/Library_sfx.mk sfx2/Module_sfx2.mk sfx2/qa sfx2/source sfx2/UITest_sfx2_doc.mk solenv/bin solenv/clang-format solenv/flatpak-manifest.in solenv/gbuild svgio/CppunitTest_svgio.mk svgio/Library_svgio.mk svtools/source svtools/uiconfig svtools/UIConfig_svt.mk svx/CppunitTest_svx_unit.mk svx/inc svx/Library_svxcore.mk svx/Library_svx.mk svx/source svx/uiconfig svx/UIConfig_svx.mk svx/util sw/CppunitTest_sw_uwriter.mk sw/inc sw/Library_sw.mk sw/Library _swui.mk sw/qa sw/source sw/uiconfig sw/UIConfig_swriter.mk sysui/desktop test/signing-keys toolkit/source tools/CppunitTest_tools_test.mk tools/Library_tl.mk tools/qa tools/source translations unotest/source vcl/CppunitTest_vcl_pdfium_library_test.mk vcl/inc vcl/jsdialog vcl/Library_vcl.mk vcl/Module_vcl.mk vcl/qa vcl/skia vcl/source vcl/unx writerfilter/source xmloff/source xmlsecurity/CppunitTest_xmlsecurity_signing.mk xmlsecurity/Library_xmlsecurity.mk xmlsecurity/qa xmlsecurity/source

Tomaž Vajngerl (via logerrit) logerrit at kemper.freedesktop.org
Mon Jun 22 07:38:47 UTC 2020


Rebased ref, commits from common ancestor:
commit 5096a6a8440f73d35e2901eaa55c43666da57c9a
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Mon Jun 15 19:39:35 2020 +0200
Commit:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Mon Jun 22 09:38:09 2020 +0200

    vcl: add a Bitmap interface to basegfx, BitmapEx implementing it
    
    Change-Id: I758f421d545191883e615f5016e9fc643459556e

diff --git a/include/basegfx/bitmap/Bitmap.hxx b/include/basegfx/bitmap/Bitmap.hxx
new file mode 100644
index 000000000000..b91b702aa212
--- /dev/null
+++ b/include/basegfx/bitmap/Bitmap.hxx
@@ -0,0 +1,23 @@
+/* -*- 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/.
+ *
+ */
+
+#pragma once
+
+#include <basegfx/basegfxdllapi.h>
+
+namespace basegfx
+{
+class BASEGFX_DLLPUBLIC IBitmap
+{
+};
+
+} // end of namespace basegfx
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/bitmapex.hxx b/include/vcl/bitmapex.hxx
index 4dac473bb2f5..774afe981d07 100644
--- a/include/vcl/bitmapex.hxx
+++ b/include/vcl/bitmapex.hxx
@@ -25,6 +25,8 @@
 #include <vcl/Scanline.hxx>
 #include <tools/color.hxx>
 
+#include <basegfx/bitmap/Bitmap.hxx>
+
 #include <sal/types.h>
 
 namespace com::sun::star::rendering {
@@ -40,7 +42,7 @@ enum class TransparentType
     Bitmap
 };
 
-class SAL_WARN_UNUSED VCL_DLLPUBLIC BitmapEx
+class SAL_WARN_UNUSED VCL_DLLPUBLIC BitmapEx : basegfx::IBitmap
 {
 public:
 
commit 89dffdea2521d779c353b7ad13d70160f2c7b291
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Wed Jun 3 17:00:47 2020 +0200
Commit:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Mon Jun 22 09:38:09 2020 +0200

    drawinglayer: remove textprimitive2d.hxx from clang-format blacklist
    
    Change-Id: I6fa692bb3e4a16400ee2ae847a1f97201493f53a

diff --git a/include/drawinglayer/primitive2d/textprimitive2d.hxx b/include/drawinglayer/primitive2d/textprimitive2d.hxx
index 9aeaa96fc15e..6bbc14aa498a 100644
--- a/include/drawinglayer/primitive2d/textprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/textprimitive2d.hxx
@@ -33,152 +33,151 @@
 
 namespace drawinglayer::primitive2d
 {
-        /** TextSimplePortionPrimitive2D class
+/** TextSimplePortionPrimitive2D class
 
-            This is the basic primitive for representing a text portion. It contains
-            all needed information. If it is not handled by a renderer, its decomposition
-            will provide the text tools::PolyPolygon outlines as filled polygons, correctly
-            transformed.
+    This is the basic primitive for representing a text portion. It contains
+    all needed information. If it is not handled by a renderer, its decomposition
+    will provide the text tools::PolyPolygon outlines as filled polygons, correctly
+    transformed.
 
-            To get better text quality, it is suggested to handle this primitive directly
-            in a renderer. In that case, e.g. hintings on the system can be supported.
+    To get better text quality, it is suggested to handle this primitive directly
+    in a renderer. In that case, e.g. hintings on the system can be supported.
 
-            @param maTextTransform
-            The text transformation contains the text start position (always baselined)
-            as translation, the FontSize as scale (where width relative to height defines
-            font scaling and width == height means no font scaling) and the font rotation
-            and shear.
-            When shear is used and a renderer does not support it, it may be better to use
-            the decomposition which will do everything correctly. Same is true for mirroring
-            which would be expressed as negative scalings.
+    @param maTextTransform
+    The text transformation contains the text start position (always baselined)
+    as translation, the FontSize as scale (where width relative to height defines
+    font scaling and width == height means no font scaling) and the font rotation
+    and shear.
+    When shear is used and a renderer does not support it, it may be better to use
+    the decomposition which will do everything correctly. Same is true for mirroring
+    which would be expressed as negative scalings.
 
-            @param rText
-            The text to be used. Only a part may be used, but a bigger part of the string
-            may be necessary for correct layouting (e.g. international)
-
-            @param aTextPosition
-            The index to the first character to use from rText
-
-            @param aTextLength
-            The number of characters to use from rText
-
-            @param rDXArray
-            The distances between the characters. This parameter may be empty, in that case
-            the renderer is responsible to do something useful. If it is given, it has to be of
-            the size aTextLength. Its values are in logical coordinates and describe the
-            distance for each character to use. This is independent from the font width which
-            is given with maTextTransform. The first value is the offset to use from the start
-            point in FontCoordinateSystem X-Direction (given by maTextTransform) to the start
-            point of the second character
-
-            @param rFontAttribute
-            The font definition
-
-            @param rLocale
-            The locale to use
-
-            @param rFontColor
-            The font color to use
-
-            @param bFilled
-
-            @param nWidthToFill
-
-            @param rTextFillColor
-            Text background color (has nothing to do with bFilled and nWidthToFill)
-
-         */
-        class DRAWINGLAYER_DLLPUBLIC TextSimplePortionPrimitive2D : public BufferedDecompositionPrimitive2D
-        {
-        private:
-            /// text transformation (FontCoordinateSystem)
-            basegfx::B2DHomMatrix                   maTextTransform;
-
-            /// The text, used from maTextPosition up to maTextPosition + maTextLength
-            OUString                                maText;
-
-            /// The index from where on maText is used
-            sal_Int32                               mnTextPosition;
-
-            /// The length for maText usage, starting from maTextPosition
-            sal_Int32                               mnTextLength;
-
-            /// The DX array in logic units
-            ::std::vector< double >                 maDXArray;
-
-            /// The font definition
-            attribute::FontAttribute                maFontAttribute;
-
-            /// The Locale for the text
-            css::lang::Locale                       maLocale;
-
-            /// font color
-            basegfx::BColor                         maFontColor;
-
-            // Whether to fill a given width with the text
-            bool                                    mbFilled;
-
-            // the width to fill
-            long                                    mnWidthToFill;
-
-            /// The fill color of the text
-            Color                                   maTextFillColor;
-
-            /// #i96669# internal: add simple range buffering for this primitive
-            basegfx::B2DRange                       maB2DRange;
-
-        protected:
-            /// local decomposition.
-            virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override;
-
-        public:
-            /// constructor
-            TextSimplePortionPrimitive2D(
-                const basegfx::B2DHomMatrix& rNewTransform,
-                const OUString& rText,
-                sal_Int32 nTextPosition,
-                sal_Int32 nTextLength,
-                const ::std::vector< double >& rDXArray,
-                const attribute::FontAttribute& rFontAttribute,
-                const css::lang::Locale& rLocale,
-                const basegfx::BColor& rFontColor,
-                bool bFilled = false,
-                long nWidthToFill = 0,
-                const Color& rTextFillColor = COL_TRANSPARENT );
-
-            /// helpers
-            /** get text outlines as polygons and their according ObjectTransformation. Handles all
-                the necessary VCL outline extractions, scaling adaptations and other stuff.
-             */
-            void getTextOutlinesAndTransformation(basegfx::B2DPolyPolygonVector& rTarget, basegfx::B2DHomMatrix& rTransformation) const;
+    @param rText
+    The text to be used. Only a part may be used, but a bigger part of the string
+    may be necessary for correct layouting (e.g. international)
 
-            /// data read access
-            const basegfx::B2DHomMatrix& getTextTransform() const { return maTextTransform; }
-            const OUString& getText() const { return maText; }
-            sal_Int32 getTextPosition() const { return mnTextPosition; }
-            sal_Int32 getTextLength() const { return mnTextLength; }
-            const ::std::vector< double >& getDXArray() const { return maDXArray; }
-            const attribute::FontAttribute& getFontAttribute() const { return maFontAttribute; }
-            const css::lang::Locale& getLocale() const { return  maLocale; }
-            const basegfx::BColor& getFontColor() const { return maFontColor; }
-            const Color& getTextFillColor() const { return maTextFillColor; }
-            bool isFilled() const { return mbFilled; }
-            long getWidthToFill() const { return mnWidthToFill; }
-
-            /// compare operator
-            virtual bool operator==( const BasePrimitive2D& rPrimitive ) const override;
+    @param aTextPosition
+    The index to the first character to use from rText
 
-            /// get range
-            virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override;
+    @param aTextLength
+    The number of characters to use from rText
 
-            /// provide unique ID
-            virtual sal_uInt32 getPrimitive2DID() const override;
-        };
-
-        /// small helper to have a compare operator for Locale
-        bool DRAWINGLAYER_DLLPUBLIC LocalesAreEqual(const css::lang::Locale& rA, const css::lang::Locale& rB);
+    @param rDXArray
+    The distances between the characters. This parameter may be empty, in that case
+    the renderer is responsible to do something useful. If it is given, it has to be of
+    the size aTextLength. Its values are in logical coordinates and describe the
+    distance for each character to use. This is independent from the font width which
+    is given with maTextTransform. The first value is the offset to use from the start
+    point in FontCoordinateSystem X-Direction (given by maTextTransform) to the start
+    point of the second character
 
-} // end of namespace drawinglayer::primitive2d
+    @param rFontAttribute
+    The font definition
+
+    @param rLocale
+    The locale to use
+
+    @param rFontColor
+    The font color to use
+
+    @param bFilled
+
+    @param nWidthToFill
 
+    @param rTextFillColor
+    Text background color (has nothing to do with bFilled and nWidthToFill)
+
+ */
+class DRAWINGLAYER_DLLPUBLIC TextSimplePortionPrimitive2D : public BufferedDecompositionPrimitive2D
+{
+private:
+    /// text transformation (FontCoordinateSystem)
+    basegfx::B2DHomMatrix maTextTransform;
+
+    /// The text, used from maTextPosition up to maTextPosition + maTextLength
+    OUString maText;
+
+    /// The index from where on maText is used
+    sal_Int32 mnTextPosition;
+
+    /// The length for maText usage, starting from maTextPosition
+    sal_Int32 mnTextLength;
+
+    /// The DX array in logic units
+    std::vector<double> maDXArray;
+
+    /// The font definition
+    attribute::FontAttribute maFontAttribute;
+
+    /// The Locale for the text
+    css::lang::Locale maLocale;
+
+    /// font color
+    basegfx::BColor maFontColor;
+
+    // Whether to fill a given width with the text
+    bool mbFilled;
+
+    // the width to fill
+    long mnWidthToFill;
+
+    /// The fill color of the text
+    Color maTextFillColor;
+
+    /// #i96669# internal: add simple range buffering for this primitive
+    basegfx::B2DRange maB2DRange;
+
+protected:
+    /// local decomposition.
+    virtual void
+    create2DDecomposition(Primitive2DContainer& rContainer,
+                          const geometry::ViewInformation2D& rViewInformation) const override;
+
+public:
+    /// constructor
+    TextSimplePortionPrimitive2D(const basegfx::B2DHomMatrix& rNewTransform, const OUString& rText,
+                                 sal_Int32 nTextPosition, sal_Int32 nTextLength,
+                                 const ::std::vector<double>& rDXArray,
+                                 const attribute::FontAttribute& rFontAttribute,
+                                 const css::lang::Locale& rLocale,
+                                 const basegfx::BColor& rFontColor, bool bFilled = false,
+                                 long nWidthToFill = 0,
+                                 const Color& rTextFillColor = COL_TRANSPARENT);
+
+    /** get text outlines as polygons and their according ObjectTransformation. Handles all
+        the necessary VCL outline extractions, scaling adaptations and other stuff.
+     */
+    void getTextOutlinesAndTransformation(basegfx::B2DPolyPolygonVector& rTarget,
+                                          basegfx::B2DHomMatrix& rTransformation) const;
+
+    /// data read access
+    const basegfx::B2DHomMatrix& getTextTransform() const { return maTextTransform; }
+    const OUString& getText() const { return maText; }
+    sal_Int32 getTextPosition() const { return mnTextPosition; }
+    sal_Int32 getTextLength() const { return mnTextLength; }
+    const ::std::vector<double>& getDXArray() const { return maDXArray; }
+    const attribute::FontAttribute& getFontAttribute() const { return maFontAttribute; }
+    const css::lang::Locale& getLocale() const { return maLocale; }
+    const basegfx::BColor& getFontColor() const { return maFontColor; }
+    const Color& getTextFillColor() const { return maTextFillColor; }
+    bool isFilled() const { return mbFilled; }
+    long getWidthToFill() const { return mnWidthToFill; }
+
+    /// compare operator
+    virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
+
+    /// get range
+    virtual basegfx::B2DRange
+    getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override;
+
+    /// provide unique ID
+    virtual sal_uInt32 getPrimitive2DID() const override;
+};
+
+/// small helper to have a compare operator for Locale
+bool DRAWINGLAYER_DLLPUBLIC LocalesAreEqual(const css::lang::Locale& rA,
+                                            const css::lang::Locale& rB);
+
+} // end of namespace drawinglayer::primitive2d
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index d2f192fdac19..dd050e6891a5 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -5870,7 +5870,6 @@ include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx
 include/drawinglayer/primitive2d/textenumsprimitive2d.hxx
 include/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx
 include/drawinglayer/primitive2d/textlayoutdevice.hxx
-include/drawinglayer/primitive2d/textprimitive2d.hxx
 include/drawinglayer/primitive2d/transformprimitive2d.hxx
 include/drawinglayer/primitive2d/transparenceprimitive2d.hxx
 include/drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx
commit 9fd5d5924c9b0834457f67d001032ae40d1c226d
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Wed Jun 3 16:58:33 2020 +0200
Commit:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Mon Jun 22 09:38:08 2020 +0200

    organise includes in textprimitive2d.hxx
    
    Change-Id: I6f822707520688cb3b5b501094e238f02e90ce56

diff --git a/include/drawinglayer/primitive2d/textprimitive2d.hxx b/include/drawinglayer/primitive2d/textprimitive2d.hxx
index 22ff79a69d6e..9aeaa96fc15e 100644
--- a/include/drawinglayer/primitive2d/textprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/textprimitive2d.hxx
@@ -22,15 +22,14 @@
 #include <drawinglayer/drawinglayerdllapi.h>
 
 #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
+#include <drawinglayer/attribute/fontattribute.hxx>
+#include <basegfx/polygon/b2dpolypolygon.hxx>
 #include <basegfx/matrix/b2dhommatrix.hxx>
 #include <rtl/ustring.hxx>
 #include <tools/color.hxx>
 #include <basegfx/color/bcolor.hxx>
-#include <vector>
 #include <com/sun/star/lang/Locale.hpp>
-#include <drawinglayer/attribute/fontattribute.hxx>
-#include <basegfx/polygon/b2dpolypolygon.hxx>
-
+#include <vector>
 
 namespace drawinglayer::primitive2d
 {
commit fd79b951cf072cbb3f4e9e6b19a488eebddb56e0
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Wed Jun 3 16:55:35 2020 +0200
Commit:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Mon Jun 22 09:38:08 2020 +0200

    drawinglayer: remove fontattribute.hxx from clang-format blacklist
    
    Change-Id: I58ef867586bdd2c8c9f4eb249f10610860c9568a

diff --git a/include/drawinglayer/attribute/fontattribute.hxx b/include/drawinglayer/attribute/fontattribute.hxx
index 5972000443a5..1a7250170b6e 100644
--- a/include/drawinglayer/attribute/fontattribute.hxx
+++ b/include/drawinglayer/attribute/fontattribute.hxx
@@ -21,67 +21,56 @@
 
 #include <drawinglayer/drawinglayerdllapi.h>
 #include <o3tl/cow_wrapper.hxx>
+#include <rtl/ustring.hxx>
 
-
-namespace rtl {
-   class OUString;
-}
-
-namespace drawinglayer::attribute {
-    class ImpFontAttribute;
+namespace drawinglayer::attribute
+{
+class ImpFontAttribute;
 }
 
 namespace drawinglayer::attribute
 {
-        /** FontAttribute class
+/** FontAttribute class
 
-            This attribute class is able to hold all parameters needed/used
-            to completely define the parametrisation of a text portion.
-         */
-        class DRAWINGLAYER_DLLPUBLIC FontAttribute
-        {
-        public:
-            typedef o3tl::cow_wrapper< ImpFontAttribute > ImplType;
+    This attribute class is able to hold all parameters needed/used
+    to completely define the parametrisation of a text portion.
+ */
+class DRAWINGLAYER_DLLPUBLIC FontAttribute
+{
+public:
+    typedef o3tl::cow_wrapper<ImpFontAttribute> ImplType;
 
-        private:
-            ImplType mpFontAttribute;
+private:
+    ImplType mpFontAttribute;
 
-        public:
-            /// constructors/assignmentoperator/destructor
-            /// TODO: pair kerning and CJK kerning
-            FontAttribute(
-                const rtl::OUString& rFamilyName,
-                const rtl::OUString& rStyleName,
-                sal_uInt16 nWeight,
-                bool bSymbol = false,
-                bool bVertical = false,
-                bool bItalic = false,
-                bool bMonospaced = false,
-                bool bOutline = false,
-                bool bRTL = false,
-                bool bBiDiStrong = false);
-            FontAttribute();
-            FontAttribute(const FontAttribute&);
-            FontAttribute(FontAttribute&&);
-            FontAttribute& operator=(const FontAttribute&);
-            FontAttribute& operator=(FontAttribute&&);
-            ~FontAttribute();
+public:
+    /// TODO: pair kerning and CJK kerning
+    FontAttribute(const OUString& rFamilyName, const OUString& rStyleName, sal_uInt16 nWeight,
+                  bool bSymbol = false, bool bVertical = false, bool bItalic = false,
+                  bool bMonospaced = false, bool bOutline = false, bool bRTL = false,
+                  bool bBiDiStrong = false);
+    FontAttribute();
+    FontAttribute(const FontAttribute&);
+    FontAttribute(FontAttribute&&);
+    FontAttribute& operator=(const FontAttribute&);
+    FontAttribute& operator=(FontAttribute&&);
+    ~FontAttribute();
 
-            // compare operator
-            bool operator==(const FontAttribute& rCandidate) const;
+    // compare operator
+    bool operator==(const FontAttribute& rCandidate) const;
 
-            /// data read access
-            const rtl::OUString& getFamilyName() const;
-            const rtl::OUString& getStyleName() const;
-            sal_uInt16 getWeight() const;
-            bool getSymbol() const;
-            bool getVertical() const;
-            bool getItalic() const;
-            bool getOutline() const;
-            bool getRTL() const;
-            bool getBiDiStrong() const;
-            bool getMonospaced() const;
-        };
+    /// data read access
+    const OUString& getFamilyName() const;
+    const OUString& getStyleName() const;
+    sal_uInt16 getWeight() const;
+    bool getSymbol() const;
+    bool getVertical() const;
+    bool getItalic() const;
+    bool getOutline() const;
+    bool getRTL() const;
+    bool getBiDiStrong() const;
+    bool getMonospaced() const;
+};
 } // end of namespace drawinglayer::attribute
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 1103444e7a18..d2f192fdac19 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -5823,7 +5823,6 @@ include/drawinglayer/animation/animationtiming.hxx
 include/drawinglayer/attribute/fillgradientattribute.hxx
 include/drawinglayer/attribute/fillgraphicattribute.hxx
 include/drawinglayer/attribute/fillhatchattribute.hxx
-include/drawinglayer/attribute/fontattribute.hxx
 include/drawinglayer/attribute/linestartendattribute.hxx
 include/drawinglayer/attribute/materialattribute3d.hxx
 include/drawinglayer/attribute/sdrallattribute3d.hxx
commit 7ce259e7f2bd20eddf05b469f91d4f55ed24b644
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Wed Jun 3 16:50:33 2020 +0200
Commit:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Mon Jun 22 09:38:07 2020 +0200

    drawinglayer: pragma once for fontattribute.hxx
    
    Change-Id: I1d257a34b15a65d9b988a791e154ee64e781e0ca

diff --git a/include/drawinglayer/attribute/fontattribute.hxx b/include/drawinglayer/attribute/fontattribute.hxx
index a12ffb405001..5972000443a5 100644
--- a/include/drawinglayer/attribute/fontattribute.hxx
+++ b/include/drawinglayer/attribute/fontattribute.hxx
@@ -17,15 +17,12 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_FONTATTRIBUTE_HXX
-#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_FONTATTRIBUTE_HXX
+#pragma once
 
 #include <drawinglayer/drawinglayerdllapi.h>
 #include <o3tl/cow_wrapper.hxx>
 
 
-// predefines
-
 namespace rtl {
    class OUString;
 }
@@ -34,11 +31,8 @@ namespace drawinglayer::attribute {
     class ImpFontAttribute;
 }
 
-
-namespace drawinglayer
+namespace drawinglayer::attribute
 {
-    namespace attribute
-    {
         /** FontAttribute class
 
             This attribute class is able to hold all parameters needed/used
@@ -88,10 +82,6 @@ namespace drawinglayer
             bool getBiDiStrong() const;
             bool getMonospaced() const;
         };
-    } // end of namespace attribute
-} // end of namespace drawinglayer
-
-
-#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_FONTATTRIBUTE_HXX
+} // end of namespace drawinglayer::attribute
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 75c2328ea0b53408e0e19c78590ad326cffe0123
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Wed May 27 12:49:05 2020 +0200
Commit:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Mon Jun 22 09:38:07 2020 +0200

    add o3tl version of hash_combine to not depend on boost for this
    
    Change-Id: I081f8d116ef811baa8aa5de35a6cb51fa4de7d56

diff --git a/include/o3tl/hash_combine.hxx b/include/o3tl/hash_combine.hxx
new file mode 100644
index 000000000000..17419b3e2c0f
--- /dev/null
+++ b/include/o3tl/hash_combine.hxx
@@ -0,0 +1,29 @@
+/* -*- 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/.
+ */
+
+#pragma once
+
+namespace o3tl
+{
+template <typename T, typename N, std::enable_if_t<(sizeof(N) == 4), bool> = false>
+inline void hash_combine(N& nSeed, T const& nValue)
+{
+    static_assert(sizeof(nSeed) == 4);
+    nSeed ^= std::hash<T>{}(nValue) + 0x9E3779B9u + (nSeed << 6) + (nSeed >> 2);
+}
+
+template <typename T, typename N, std::enable_if_t<(sizeof(N) == 8), bool> = false>
+inline void hash_combine(N& nSeed, T const& nValue)
+{
+    static_assert(sizeof(nSeed) == 8);
+    nSeed ^= std::hash<T>{}(nValue) + 0x9E3779B97F4A7C15llu + (nSeed << 12) + (nSeed >> 4);
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/o3tl/qa/test-lru_map.cxx b/o3tl/qa/test-lru_map.cxx
index a03a6bf37200..3ab285c4329a 100644
--- a/o3tl/qa/test-lru_map.cxx
+++ b/o3tl/qa/test-lru_map.cxx
@@ -15,7 +15,7 @@
 
 #include <o3tl/lru_map.hxx>
 
-#include <boost/functional/hash.hpp>
+#include <o3tl/hash_combine.hxx>
 
 using namespace ::o3tl;
 
@@ -206,8 +206,8 @@ struct TestClassKeyHashFunction
     std::size_t operator()(TestClassKey const& aKey) const
     {
         std::size_t seed = 0;
-        boost::hash_combine(seed, aKey.mA);
-        boost::hash_combine(seed, aKey.mB);
+        o3tl::hash_combine(seed, aKey.mA);
+        o3tl::hash_combine(seed, aKey.mB);
         return seed;
     }
 };
commit 9f2b99f1e51b4d366e4bfdb31e1890bf907885ea
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Tue May 26 15:57:38 2020 +0200
Commit:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Mon Jun 22 09:38:07 2020 +0200

    GraphicAttributes: put const. and op. '=' into the header file
    
    Change-Id: I1bc38f89457c3593673b445e7571a4fd82d5960b

diff --git a/include/vcl/GraphicAttributes.hxx b/include/vcl/GraphicAttributes.hxx
index 90364e408fee..ad2093875f72 100644
--- a/include/vcl/GraphicAttributes.hxx
+++ b/include/vcl/GraphicAttributes.hxx
@@ -53,9 +53,37 @@ private:
     GraphicDrawMode meDrawMode;
 
 public:
-    GraphicAttr();
+    GraphicAttr()
+        : mfGamma(1.0)
+        , mnMirrFlags(basegfx::MirrorDirectionFlags::NONE)
+        , mnLeftCrop(0)
+        , mnTopCrop(0)
+        , mnRightCrop(0)
+        , mnBottomCrop(0)
+        , mnRotate10(0)
+        , mnContPercent(0)
+        , mnLumPercent(0)
+        , mnRPercent(0)
+        , mnGPercent(0)
+        , mnBPercent(0)
+        , mbInvert(false)
+        , mcTransparency(0)
+        , meDrawMode(GraphicDrawMode::Standard)
+    {
+    }
+
+    bool operator==(const GraphicAttr& rAttr) const
+    {
+        return mfGamma == rAttr.mfGamma && mnMirrFlags == rAttr.mnMirrFlags
+               && mnLeftCrop == rAttr.mnLeftCrop && mnTopCrop == rAttr.mnTopCrop
+               && mnRightCrop == rAttr.mnRightCrop && mnBottomCrop == rAttr.mnBottomCrop
+               && mnRotate10 == rAttr.mnRotate10 && mnContPercent == rAttr.mnContPercent
+               && mnLumPercent == rAttr.mnLumPercent && mnRPercent == rAttr.mnRPercent
+               && mnGPercent == rAttr.mnGPercent && mnBPercent == rAttr.mnBPercent
+               && mbInvert == rAttr.mbInvert && mcTransparency == rAttr.mcTransparency
+               && meDrawMode == rAttr.meDrawMode;
+    }
 
-    bool operator==(const GraphicAttr& rAttr) const;
     bool operator!=(const GraphicAttr& rAttr) const { return !(*this == rAttr); }
 
     void SetDrawMode(GraphicDrawMode eDrawMode) { meDrawMode = eDrawMode; }
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index a3d2dace99c9..8bd641c5e4aa 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -325,7 +325,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
     vcl/source/graphic/GraphicObject \
     vcl/source/graphic/GraphicObject2 \
     vcl/source/graphic/GraphicReader \
-    vcl/source/graphic/grfattr \
     vcl/source/graphic/Manager \
     vcl/source/graphic/UnoGraphic \
     vcl/source/graphic/UnoGraphicDescriptor \
diff --git a/vcl/source/graphic/grfattr.cxx b/vcl/source/graphic/grfattr.cxx
deleted file mode 100644
index 36e8605b77de..000000000000
--- a/vcl/source/graphic/grfattr.cxx
+++ /dev/null
@@ -1,60 +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 <vcl/GraphicAttributes.hxx>
-
-GraphicAttr::GraphicAttr() :
-    mfGamma         ( 1.0 ),
-    mnMirrFlags     ( basegfx::MirrorDirectionFlags::NONE ),
-    mnLeftCrop      ( 0 ),
-    mnTopCrop       ( 0 ),
-    mnRightCrop     ( 0 ),
-    mnBottomCrop    ( 0 ),
-    mnRotate10      ( 0 ),
-    mnContPercent   ( 0 ),
-    mnLumPercent    ( 0 ),
-    mnRPercent      ( 0 ),
-    mnGPercent      ( 0 ),
-    mnBPercent      ( 0 ),
-    mbInvert        ( false ),
-    mcTransparency  ( 0 ),
-    meDrawMode      ( GraphicDrawMode::Standard )
-{
-}
-
-bool GraphicAttr::operator==( const GraphicAttr& rAttr ) const
-{
-    return( ( mfGamma == rAttr.mfGamma ) &&
-            ( mnMirrFlags == rAttr.mnMirrFlags ) &&
-            ( mnLeftCrop == rAttr.mnLeftCrop ) &&
-            ( mnTopCrop == rAttr.mnTopCrop ) &&
-            ( mnRightCrop == rAttr.mnRightCrop ) &&
-            ( mnBottomCrop == rAttr.mnBottomCrop ) &&
-            ( mnRotate10 == rAttr.mnRotate10 ) &&
-            ( mnContPercent == rAttr.mnContPercent ) &&
-            ( mnLumPercent == rAttr.mnLumPercent ) &&
-            ( mnRPercent == rAttr.mnRPercent ) &&
-            ( mnGPercent == rAttr.mnGPercent ) &&
-            ( mnBPercent == rAttr.mnBPercent ) &&
-            ( mbInvert == rAttr.mbInvert ) &&
-            ( mcTransparency == rAttr.mcTransparency ) &&
-            ( meDrawMode == rAttr.meDrawMode ) );
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit d31624e780089c6b2f113c93b3e3494be3539a8b
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Tue May 26 13:39:45 2020 +0200
Commit:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Mon Jun 22 09:38:06 2020 +0200

    basegfx::MirrorDirectionFlags as replacement for BmpMirrorFlags
    
    BmpMirrorFlags in Bitmap is an attribute for bitmap manipulation
    (mirroring). This change creates a copy of the flags in basegfx
    as MirrorDirectionFlags, which will be used in the fututre as a
    general repalcement for the BmpMirrorFlags, that will be changed
    step by step.
    
    For now we only use the flags in GraphicAttr to make it independent
    form vcl, and cast to/from BmpMirrorFLags and MirrorDirectionFlags
    where needed.
    
    Change-Id: I01a69a4d241caa22cff61bdbf87944af57684749

diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
index f86b1585b13f..2f571ed66aa3 100644
--- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
@@ -49,8 +49,10 @@ void GraphicPrimitive2D::create2DDecomposition(Primitive2DContainer& rContainer,
     if (getGraphicAttr().IsMirrored())
     {
         // content needs mirroring
-        const bool bHMirr(getGraphicAttr().GetMirrorFlags() & BmpMirrorFlags::Horizontal);
-        const bool bVMirr(getGraphicAttr().GetMirrorFlags() & BmpMirrorFlags::Vertical);
+        const bool bHMirr(getGraphicAttr().GetMirrorFlags()
+                          & basegfx::MirrorDirectionFlags::Horizontal);
+        const bool bVMirr(getGraphicAttr().GetMirrorFlags()
+                          & basegfx::MirrorDirectionFlags::Vertical);
 
         // mirror by applying negative scale to the unit primitive and
         // applying the object transformation on it.
@@ -69,7 +71,7 @@ void GraphicPrimitive2D::create2DDecomposition(Primitive2DContainer& rContainer,
 
     aSuppressGraphicAttr.SetCrop(0, 0, 0, 0);
     aSuppressGraphicAttr.SetRotation(0);
-    aSuppressGraphicAttr.SetMirrorFlags(BmpMirrorFlags::NONE);
+    aSuppressGraphicAttr.SetMirrorFlags(basegfx::MirrorDirectionFlags::NONE);
     aSuppressGraphicAttr.SetTransparency(0);
 
     const GraphicObject& rGraphicObject = getGraphicObject();
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index d851e9f6723d..c8021c9d0972 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -1673,7 +1673,7 @@ bool EscherPropertyContainer::CreateGraphicProperties(const uno::Reference<beans
 
                 if(bMirrored)
                 {
-                    pGraphicAttr->SetMirrorFlags(BmpMirrorFlags::Horizontal);
+                    pGraphicAttr->SetMirrorFlags(basegfx::MirrorDirectionFlags::Horizontal);
                 }
 
                 if(nTransparency)
diff --git a/include/basegfx/bitmap/BitmapAttributes.hxx b/include/basegfx/bitmap/BitmapAttributes.hxx
new file mode 100644
index 000000000000..d918d55faa99
--- /dev/null
+++ b/include/basegfx/bitmap/BitmapAttributes.hxx
@@ -0,0 +1,36 @@
+/* -*- 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/.
+ *
+ */
+
+#pragma once
+
+#include <basegfx/basegfxdllapi.h>
+#include <o3tl/typed_flags_set.hxx>
+
+namespace basegfx
+{
+enum class MirrorDirectionFlags
+{
+    NONE = 0x00,
+    Horizontal = 0x01,
+    Vertical = 0x02,
+};
+
+} // end of namespace basegfx
+
+namespace o3tl
+{
+template <>
+struct typed_flags<basegfx::MirrorDirectionFlags>
+    : is_typed_flags<basegfx::MirrorDirectionFlags, 0x03>
+{
+};
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/GraphicAttributes.hxx b/include/vcl/GraphicAttributes.hxx
index 0908a8f56b9d..90364e408fee 100644
--- a/include/vcl/GraphicAttributes.hxx
+++ b/include/vcl/GraphicAttributes.hxx
@@ -19,10 +19,11 @@
 
 #pragma once
 
-#include <memory>
 #include <vcl/dllapi.h>
+
+#include <memory>
 #include <o3tl/typed_flags_set.hxx>
-#include <vcl/bitmap.hxx>
+#include <basegfx/bitmap/BitmapAttributes.hxx>
 
 enum class GraphicDrawMode
 {
@@ -36,7 +37,7 @@ class VCL_DLLPUBLIC GraphicAttr
 {
 private:
     double mfGamma;
-    BmpMirrorFlags mnMirrFlags;
+    basegfx::MirrorDirectionFlags mnMirrFlags;
     long mnLeftCrop;
     long mnTopCrop;
     long mnRightCrop;
@@ -60,8 +61,8 @@ public:
     void SetDrawMode(GraphicDrawMode eDrawMode) { meDrawMode = eDrawMode; }
     GraphicDrawMode GetDrawMode() const { return meDrawMode; }
 
-    void SetMirrorFlags(BmpMirrorFlags nMirrFlags) { mnMirrFlags = nMirrFlags; }
-    BmpMirrorFlags GetMirrorFlags() const { return mnMirrFlags; }
+    void SetMirrorFlags(basegfx::MirrorDirectionFlags nMirrFlags) { mnMirrFlags = nMirrFlags; }
+    basegfx::MirrorDirectionFlags GetMirrorFlags() const { return mnMirrFlags; }
 
     void SetCrop(long nLeft_100TH_MM, long nTop_100TH_MM, long nRight_100TH_MM,
                  long nBottom_100TH_MM)
@@ -104,7 +105,7 @@ public:
     sal_uInt8 GetTransparency() const { return mcTransparency; }
 
     bool IsSpecialDrawMode() const { return (meDrawMode != GraphicDrawMode::Standard); }
-    bool IsMirrored() const { return mnMirrFlags != BmpMirrorFlags::NONE; }
+    bool IsMirrored() const { return mnMirrFlags != basegfx::MirrorDirectionFlags::NONE; }
     bool IsCropped() const
     {
         return (mnLeftCrop != 0 || mnTopCrop != 0 || mnRightCrop != 0 || mnBottomCrop != 0);
diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx
index 8fceef864ae2..db24da9a5552 100644
--- a/svx/source/sdr/contact/viewcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx
@@ -336,7 +336,9 @@ namespace sdr::contact
 
             if(bHMirr || bVMirr)
             {
-                aLocalGrafInfo.SetMirrorFlags((bHMirr ? BmpMirrorFlags::Horizontal : BmpMirrorFlags::NONE)|(bVMirr ? BmpMirrorFlags::Vertical : BmpMirrorFlags::NONE));
+                basegfx::MirrorDirectionFlags eVertical = bVMirr ? basegfx::MirrorDirectionFlags::Vertical : basegfx::MirrorDirectionFlags::NONE;
+                basegfx::MirrorDirectionFlags eHorizontal = bHMirr ? basegfx::MirrorDirectionFlags::Horizontal : basegfx::MirrorDirectionFlags::NONE;
+                aLocalGrafInfo.SetMirrorFlags(eVertical | eHorizontal);
             }
 
             // fill object matrix
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index beac686d733d..9ba952e3e957 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -378,7 +378,10 @@ GraphicAttr SdrGrafObj::GetGraphicAttr( SdrGrafObjTransformsAttrs nTransformFlag
             bool bHMirr = nMirrorCase == 2 || nMirrorCase == 4;
             bool bVMirr = nMirrorCase == 3 || nMirrorCase == 4;
 
-            aActAttr.SetMirrorFlags( ( bHMirr ? BmpMirrorFlags::Horizontal : BmpMirrorFlags::NONE ) | ( bVMirr ? BmpMirrorFlags::Vertical : BmpMirrorFlags::NONE ) );
+            basegfx::MirrorDirectionFlags eVertical = bVMirr ? basegfx::MirrorDirectionFlags::Vertical : basegfx::MirrorDirectionFlags::NONE;
+            basegfx::MirrorDirectionFlags eHorizontal = bHMirr ? basegfx::MirrorDirectionFlags::Horizontal : basegfx::MirrorDirectionFlags::NONE;
+
+            aActAttr.SetMirrorFlags(eVertical | eHorizontal);
         }
 
         if( bRotate )
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index bb39141cc49a..58a7fde52200 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -727,22 +727,22 @@ GraphicAttr& SwGrfNode::GetGraphicAttr( GraphicAttr& rGA,
     rGA.SetDrawMode( rSet.GetDrawModeGrf().GetValue() );
 
     const SwMirrorGrf & rMirror = rSet.GetMirrorGrf();
-    BmpMirrorFlags nMirror = BmpMirrorFlags::NONE;
+    basegfx::MirrorDirectionFlags nMirror = basegfx::MirrorDirectionFlags::NONE;
     if( rMirror.IsGrfToggle() && pFrame && !pFrame->FindPageFrame()->OnRightPage() )
     {
         switch( rMirror.GetValue() )
         {
         case MirrorGraph::Dont:
-            nMirror = BmpMirrorFlags::Horizontal;
+            nMirror = basegfx::MirrorDirectionFlags::Horizontal;
             break;
         case MirrorGraph::Vertical:
-            nMirror = BmpMirrorFlags::NONE;
+            nMirror = basegfx::MirrorDirectionFlags::NONE;
             break;
         case MirrorGraph::Horizontal:
-            nMirror = BmpMirrorFlags::Horizontal|BmpMirrorFlags::Vertical;
+            nMirror = basegfx::MirrorDirectionFlags::Horizontal | basegfx::MirrorDirectionFlags::Vertical;
             break;
         default:
-            nMirror = BmpMirrorFlags::Vertical;
+            nMirror = basegfx::MirrorDirectionFlags::Vertical;
             break;
         }
     }
@@ -750,13 +750,13 @@ GraphicAttr& SwGrfNode::GetGraphicAttr( GraphicAttr& rGA,
         switch( rMirror.GetValue() )
         {
         case MirrorGraph::Both:
-            nMirror = BmpMirrorFlags::Horizontal|BmpMirrorFlags::Vertical;
+            nMirror = basegfx::MirrorDirectionFlags::Horizontal | basegfx::MirrorDirectionFlags::Vertical;
             break;
         case MirrorGraph::Vertical:
-            nMirror = BmpMirrorFlags::Horizontal;
+            nMirror = basegfx::MirrorDirectionFlags::Horizontal;
             break;
         case MirrorGraph::Horizontal:
-            nMirror = BmpMirrorFlags::Vertical;
+            nMirror = basegfx::MirrorDirectionFlags::Vertical;
             break;
         default: break;
         }
diff --git a/vcl/source/graphic/GraphicObject.cxx b/vcl/source/graphic/GraphicObject.cxx
index 0447bddfd637..137666937eb6 100644
--- a/vcl/source/graphic/GraphicObject.cxx
+++ b/vcl/source/graphic/GraphicObject.cxx
@@ -168,7 +168,7 @@ void lclImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, GraphicAdjustmen
 
     if( ( nAdjustmentFlags & GraphicAdjustmentFlags::MIRROR ) && aAttr.IsMirrored() )
     {
-        rBmpEx.Mirror( aAttr.GetMirrorFlags() );
+        rBmpEx.Mirror(BmpMirrorFlags(aAttr.GetMirrorFlags()) );
     }
 
     if( ( nAdjustmentFlags & GraphicAdjustmentFlags::ROTATE ) && aAttr.IsRotated() )
@@ -219,7 +219,7 @@ void lclImplAdjust( GDIMetaFile& rMtf, const GraphicAttr& rAttr, GraphicAdjustme
 
     if( ( nAdjustmentFlags & GraphicAdjustmentFlags::MIRROR ) && aAttr.IsMirrored() )
     {
-        rMtf.Mirror( aAttr.GetMirrorFlags() );
+        rMtf.Mirror(BmpMirrorFlags(aAttr.GetMirrorFlags()));
     }
 
     if( ( nAdjustmentFlags & GraphicAdjustmentFlags::ROTATE ) && aAttr.IsRotated() )
@@ -270,7 +270,7 @@ void lclImplAdjust( Animation& rAnimation, const GraphicAttr& rAttr, GraphicAdju
 
     if( ( nAdjustmentFlags & GraphicAdjustmentFlags::MIRROR ) && aAttr.IsMirrored() )
     {
-        rAnimation.Mirror( aAttr.GetMirrorFlags() );
+        rAnimation.Mirror(BmpMirrorFlags(aAttr.GetMirrorFlags()));
     }
 
     if( ( nAdjustmentFlags & GraphicAdjustmentFlags::ROTATE ) && aAttr.IsRotated() )
@@ -383,7 +383,7 @@ bool GraphicObject::ImplGetCropParams( OutputDevice const * pOut, Point& rPt, Si
         if( !aSize100.IsEmpty() && nTotalWidth > 0 && nTotalHeight > 0 )
         {
             double fScale = static_cast<double>(aSize100.Width()) / nTotalWidth;
-            const long nNewLeft = -FRound( ( ( pAttr->GetMirrorFlags() & BmpMirrorFlags::Horizontal ) ? pAttr->GetRightCrop() : pAttr->GetLeftCrop() ) * fScale );
+            const long nNewLeft = -FRound( ( ( BmpMirrorFlags(pAttr->GetMirrorFlags()) & BmpMirrorFlags::Horizontal ) ? pAttr->GetRightCrop() : pAttr->GetLeftCrop() ) * fScale );
             const long nNewRight = nNewLeft + FRound( aSize100.Width() * fScale ) - 1;
 
             fScale = static_cast<double>(rSz.Width()) / aSize100.Width();
@@ -391,7 +391,7 @@ bool GraphicObject::ImplGetCropParams( OutputDevice const * pOut, Point& rPt, Si
             rSz.setWidth( FRound( ( nNewRight - nNewLeft + 1 ) * fScale ) );
 
             fScale = static_cast<double>(aSize100.Height()) / nTotalHeight;
-            const long nNewTop = -FRound( ( ( pAttr->GetMirrorFlags() & BmpMirrorFlags::Vertical ) ? pAttr->GetBottomCrop() : pAttr->GetTopCrop() ) * fScale );
+            const long nNewTop = -FRound( ( ( BmpMirrorFlags(pAttr->GetMirrorFlags()) & BmpMirrorFlags::Vertical ) ? pAttr->GetBottomCrop() : pAttr->GetTopCrop() ) * fScale );
             const long nNewBottom = nNewTop + FRound( aSize100.Height() * fScale ) - 1;
 
             fScale = static_cast<double>(rSz.Height()) / aSize100.Height();
@@ -476,7 +476,8 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
     {
         aPt.AdjustX(aSz.Width() + 1 );
         aSz.setWidth( -aSz.Width() );
-        aAttr.SetMirrorFlags( aAttr.GetMirrorFlags() ^ BmpMirrorFlags::Horizontal );
+        BmpMirrorFlags eFlags = BmpMirrorFlags(aAttr.GetMirrorFlags()) ^ BmpMirrorFlags::Horizontal;
+        aAttr.SetMirrorFlags(basegfx::MirrorDirectionFlags(eFlags));
     }
 
     // mirrored vertically
@@ -484,7 +485,8 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
     {
         aPt.AdjustY(aSz.Height() + 1 );
         aSz.setHeight( -aSz.Height() );
-        aAttr.SetMirrorFlags( aAttr.GetMirrorFlags() ^ BmpMirrorFlags::Vertical );
+        BmpMirrorFlags eFlags = BmpMirrorFlags(aAttr.GetMirrorFlags()) ^ BmpMirrorFlags::Vertical;
+        aAttr.SetMirrorFlags(basegfx::MirrorDirectionFlags(eFlags));
     }
 
     if( bCropped )
diff --git a/vcl/source/graphic/grfattr.cxx b/vcl/source/graphic/grfattr.cxx
index 35acaf50b841..36e8605b77de 100644
--- a/vcl/source/graphic/grfattr.cxx
+++ b/vcl/source/graphic/grfattr.cxx
@@ -21,7 +21,7 @@
 
 GraphicAttr::GraphicAttr() :
     mfGamma         ( 1.0 ),
-    mnMirrFlags     ( BmpMirrorFlags::NONE ),
+    mnMirrFlags     ( basegfx::MirrorDirectionFlags::NONE ),
     mnLeftCrop      ( 0 ),
     mnTopCrop       ( 0 ),
     mnRightCrop     ( 0 ),
commit 612ec4f7f19fb0e68e6a22cb812a699df0704911
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Fri May 8 22:28:35 2020 +0200
Commit:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Mon Jun 22 09:38:06 2020 +0200

    Move some basic primitives to drawinglayer CORE
    
    Mostly which are easy to move and used in VclProcessor2D
    
    Change-Id: Ie1559e13a2a7cdb5225421def2f9145026ff9121

diff --git a/drawinglayer/Library_drawinglayer.mk b/drawinglayer/Library_drawinglayer.mk
index 814fff713ae1..a9d70da2aa84 100644
--- a/drawinglayer/Library_drawinglayer.mk
+++ b/drawinglayer/Library_drawinglayer.mk
@@ -50,11 +50,6 @@ $(eval $(call gb_Library_use_libraries,drawinglayer,\
 $(eval $(call gb_Library_add_exception_objects,drawinglayer,\
     drawinglayer/source/animation/animationtiming \
     drawinglayer/source/attribute/fillgraphicattribute \
-    drawinglayer/source/attribute/fillgradientattribute \
-    drawinglayer/source/attribute/fillhatchattribute \
-    drawinglayer/source/attribute/fontattribute \
-    drawinglayer/source/attribute/lineattribute \
-    drawinglayer/source/attribute/linestartendattribute \
     drawinglayer/source/attribute/materialattribute3d \
     drawinglayer/source/attribute/sdrallattribute3d \
     drawinglayer/source/attribute/sdrfillattribute \
@@ -67,11 +62,9 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\
     drawinglayer/source/attribute/sdrobjectattribute3d \
     drawinglayer/source/attribute/sdrsceneattribute3d \
     drawinglayer/source/attribute/sdrshadowattribute \
-    drawinglayer/source/attribute/strokeattribute \
     drawinglayer/source/geometry/viewinformation3d \
     drawinglayer/source/primitive2d/animatedprimitive2d \
     drawinglayer/source/primitive2d/backgroundcolorprimitive2d \
-    drawinglayer/source/primitive2d/bitmapprimitive2d \
     drawinglayer/source/primitive2d/borderlineprimitive2d \
     drawinglayer/source/primitive2d/controlprimitive2d \
     drawinglayer/source/primitive2d/cropprimitive2d \
@@ -80,54 +73,32 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\
     drawinglayer/source/primitive2d/embedded3dprimitive2d \
     drawinglayer/source/primitive2d/epsprimitive2d \
     drawinglayer/source/primitive2d/fillgraphicprimitive2d \
-    drawinglayer/source/primitive2d/fillgradientprimitive2d \
-    drawinglayer/source/primitive2d/fillhatchprimitive2d \
     drawinglayer/source/primitive2d/glowprimitive2d \
     drawinglayer/source/primitive2d/graphicprimitivehelper2d \
     drawinglayer/source/primitive2d/graphicprimitive2d \
     drawinglayer/source/primitive2d/gridprimitive2d \
-    drawinglayer/source/primitive2d/groupprimitive2d \
     drawinglayer/source/primitive2d/helplineprimitive2d \
     drawinglayer/source/primitive2d/hiddengeometryprimitive2d \
     drawinglayer/source/primitive2d/invertprimitive2d \
     drawinglayer/source/primitive2d/markerarrayprimitive2d \
-    drawinglayer/source/primitive2d/maskprimitive2d \
     drawinglayer/source/primitive2d/mediaprimitive2d \
     drawinglayer/source/primitive2d/metafileprimitive2d \
-    drawinglayer/source/primitive2d/modifiedcolorprimitive2d \
-    drawinglayer/source/primitive2d/objectinfoprimitive2d \
     drawinglayer/source/primitive2d/pagehierarchyprimitive2d \
-    drawinglayer/source/primitive2d/pagepreviewprimitive2d \
     drawinglayer/source/primitive2d/patternfillprimitive2d \
-    drawinglayer/source/primitive2d/pointarrayprimitive2d \
-    drawinglayer/source/primitive2d/polygonprimitive2d \
-    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/sceneprimitive2d \
     drawinglayer/source/primitive2d/sdrdecompositiontools2d \
     drawinglayer/source/primitive2d/shadowprimitive2d \
     drawinglayer/source/primitive2d/softedgeprimitive2d \
     drawinglayer/source/primitive2d/structuretagprimitive2d \
-    drawinglayer/source/primitive2d/svggradientprimitive2d \
     drawinglayer/source/primitive2d/textbreakuphelper \
     drawinglayer/source/primitive2d/textdecoratedprimitive2d \
     drawinglayer/source/primitive2d/texteffectprimitive2d \
-    drawinglayer/source/primitive2d/textenumsprimitive2d \
     drawinglayer/source/primitive2d/texthierarchyprimitive2d \
     drawinglayer/source/primitive2d/textlayoutdevice \
     drawinglayer/source/primitive2d/textlineprimitive2d \
     drawinglayer/source/primitive2d/textprimitive2d \
     drawinglayer/source/primitive2d/textstrikeoutprimitive2d \
-    drawinglayer/source/primitive2d/transformprimitive2d \
-    drawinglayer/source/primitive2d/transparenceprimitive2d \
-    drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d \
     drawinglayer/source/primitive2d/wallpaperprimitive2d \
     drawinglayer/source/primitive2d/wrongspellprimitive2d \
     drawinglayer/source/primitive3d/baseprimitive3d \
@@ -186,7 +157,6 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\
     drawinglayer/source/tools/primitive2dxmldump \
     drawinglayer/source/drawinglayeruno/drawinglayeruno \
     drawinglayer/source/drawinglayeruno/xprimitive2drenderer \
-    drawinglayer/source/texture/texture \
     drawinglayer/source/dumper/XShapeDumper \
     drawinglayer/source/dumper/EnhancedShapeDumper \
 ))
diff --git a/drawinglayer/Library_drawinglayercore.mk b/drawinglayer/Library_drawinglayercore.mk
index f1643d27014d..972ac32f5388 100644
--- a/drawinglayer/Library_drawinglayercore.mk
+++ b/drawinglayer/Library_drawinglayercore.mk
@@ -40,10 +40,47 @@ $(eval $(call gb_Library_use_libraries,drawinglayercore,\
 ))
 
 $(eval $(call gb_Library_add_exception_objects,drawinglayercore,\
+    drawinglayer/source/attribute/lineattribute \
+    drawinglayer/source/attribute/strokeattribute \
+    drawinglayer/source/attribute/linestartendattribute \
+    drawinglayer/source/attribute/fillgradientattribute \
+    drawinglayer/source/attribute/fillhatchattribute \
+    drawinglayer/source/attribute/fontattribute \
+    drawinglayer/source/geometry/viewinformation2d \
+    drawinglayer/source/texture/texture \
     drawinglayer/source/primitive2d/baseprimitive2d \
     drawinglayer/source/primitive2d/Primitive2DContainer \
     drawinglayer/source/primitive2d/Tools \
-    drawinglayer/source/geometry/viewinformation2d \
+    drawinglayer/source/primitive2d/polygonprimitive2d \
+    drawinglayer/source/primitive2d/PolyPolygonColorPrimitive2D \
+    drawinglayer/source/primitive2d/PolyPolygonHairlinePrimitive2D \
+    drawinglayer/source/primitive2d/PolyPolygonMarkerPrimitive2D \
+    drawinglayer/source/primitive2d/PolyPolygonStrokePrimitive2D \
+    drawinglayer/source/primitive2d/PolyPolygonGradientPrimitive2D \
+    drawinglayer/source/primitive2d/PolyPolygonHatchPrimitive2D \
+    drawinglayer/source/primitive2d/PolyPolygonSelectionPrimitive2D \
+    drawinglayer/source/primitive2d/fillgradientprimitive2d \
+    drawinglayer/source/primitive2d/maskprimitive2d \
+    drawinglayer/source/primitive2d/groupprimitive2d \
+    drawinglayer/source/primitive2d/fillhatchprimitive2d \
+    drawinglayer/source/primitive2d/primitivetools2d \
+    drawinglayer/source/primitive2d/pointarrayprimitive2d \
+    drawinglayer/source/primitive2d/modifiedcolorprimitive2d \
+    drawinglayer/source/primitive2d/bitmapprimitive2d \
+    drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d \
+    drawinglayer/source/primitive2d/transparenceprimitive2d \
+    drawinglayer/source/primitive2d/pagepreviewprimitive2d \
+    drawinglayer/source/primitive2d/transformprimitive2d \
+    drawinglayer/source/primitive2d/svggradientprimitive2d \
+    drawinglayer/source/primitive2d/objectinfoprimitive2d \
+    drawinglayer/source/primitive2d/textenumsprimitive2d \
 ))
 
+#    drawinglayer/source/primitive2d/epsprimitive2d \
+#    drawinglayer/source/primitive2d/markerarrayprimitive2d \
+#    drawinglayer/source/primitive2d/fillgraphicprimitive2d \
+#    drawinglayer/source/primitive2d/textdecoratedprimitive2d \
+#    drawinglayer/source/primitive2d/textprimitive2d \
+
+
 # vim: set noet sw=4 ts=4:
diff --git a/filter/Library_pdffilter.mk b/filter/Library_pdffilter.mk
index 9694490655de..9320e3648724 100644
--- a/filter/Library_pdffilter.mk
+++ b/filter/Library_pdffilter.mk
@@ -49,6 +49,7 @@ $(eval $(call gb_Library_use_libraries,pdffilter,\
 	cppuhelper \
 	cppu \
 	sal \
+	drawinglayercore \
 	drawinglayer \
 ))
 
commit 0bd67ab6dea8d64bcde456af6e1f44ea1f52127b
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Fri May 8 20:50:29 2020 +0200
Commit:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Mon Jun 22 09:38:05 2020 +0200

    drawinglayer: externalize PointArrayPrimitive2D class
    
    Change-Id: I8ee993947bf2f4437cf3a429c43a81132fac0947

diff --git a/include/drawinglayer/primitive2d/pointarrayprimitive2d.hxx b/include/drawinglayer/primitive2d/pointarrayprimitive2d.hxx
index 613b8969828d..682132218411 100644
--- a/include/drawinglayer/primitive2d/pointarrayprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/pointarrayprimitive2d.hxx
@@ -39,7 +39,7 @@ namespace drawinglayer::primitive2d
             should process it (Currently it is only used for grid visualisation,
             but this may change).
          */
-        class PointArrayPrimitive2D final : public BasePrimitive2D
+        class DRAWINGLAYER_DLLPUBLIC PointArrayPrimitive2D final : public BasePrimitive2D
         {
         private:
             /// the array of positions
commit 586fd1ab680cabab753cff72f141bfb20c5036d1
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Fri May 8 20:43:38 2020 +0200
Commit:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Mon Jun 22 09:38:05 2020 +0200

    drawinglayer: externalize classes in texture.hxx
    
    Change-Id: I1e49a6c896733ebebf16db23f3c2f8b06161d659

diff --git a/drawinglayer/inc/texture/texture.hxx b/drawinglayer/inc/texture/texture.hxx
index 24e23a4b241c..b34bde38d1bc 100644
--- a/drawinglayer/inc/texture/texture.hxx
+++ b/drawinglayer/inc/texture/texture.hxx
@@ -30,7 +30,7 @@
 
 namespace drawinglayer::texture
 {
-        class GeoTexSvx
+        class DRAWINGLAYER_DLLPUBLIC GeoTexSvx
         {
         public:
             GeoTexSvx();
@@ -53,7 +53,7 @@ namespace drawinglayer::texture
             basegfx::BColor         maBColor;
         };
 
-        class GeoTexSvxGradient : public GeoTexSvx
+        class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradient : public GeoTexSvx
         {
         protected:
             basegfx::ODFGradientInfo            maGradientInfo;
@@ -79,7 +79,7 @@ namespace drawinglayer::texture
                 basegfx::BColor& rOuterColor) = 0;
         };
 
-        class GeoTexSvxGradientLinear final : public GeoTexSvxGradient
+        class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradientLinear final : public GeoTexSvxGradient
         {
             double                  mfUnitMinX;
             double                  mfUnitWidth;
@@ -102,7 +102,7 @@ namespace drawinglayer::texture
             virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const override;
         };
 
-        class GeoTexSvxGradientAxial final : public GeoTexSvxGradient
+        class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradientAxial final : public GeoTexSvxGradient
         {
             double                  mfUnitMinX;
             double                  mfUnitWidth;
@@ -124,7 +124,7 @@ namespace drawinglayer::texture
             virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const override;
         };
 
-        class GeoTexSvxGradientRadial final : public GeoTexSvxGradient
+        class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradientRadial final : public GeoTexSvxGradient
         {
         public:
             GeoTexSvxGradientRadial(
@@ -143,7 +143,7 @@ namespace drawinglayer::texture
             virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const override;
         };
 
-        class GeoTexSvxGradientElliptical final : public GeoTexSvxGradient
+        class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradientElliptical final : public GeoTexSvxGradient
         {
         public:
             GeoTexSvxGradientElliptical(
@@ -163,7 +163,7 @@ namespace drawinglayer::texture
             virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const override;
         };
 
-        class GeoTexSvxGradientSquare final : public GeoTexSvxGradient
+        class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradientSquare final : public GeoTexSvxGradient
         {
         public:
             GeoTexSvxGradientSquare(
@@ -183,7 +183,7 @@ namespace drawinglayer::texture
             virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const override;
         };
 
-        class GeoTexSvxGradientRect final : public GeoTexSvxGradient
+        class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradientRect final : public GeoTexSvxGradient
         {
         public:
             GeoTexSvxGradientRect(
@@ -203,7 +203,7 @@ namespace drawinglayer::texture
             virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const override;
         };
 
-        class GeoTexSvxHatch final : public GeoTexSvx
+        class DRAWINGLAYER_DLLPUBLIC GeoTexSvxHatch final : public GeoTexSvx
         {
             basegfx::B2DRange                   maOutputRange;
             basegfx::B2DHomMatrix               maTextureTransform;
@@ -239,7 +239,7 @@ namespace drawinglayer::texture
         // given percentage value (offsetX has to be 0.0 <= offsetX <= 1.0).
         // Accordingly to offsetY. If both are given, offsetX is preferred
         // and offsetY is ignored.
-        class GeoTexSvxTiled final : public GeoTexSvx
+        class DRAWINGLAYER_DLLPUBLIC GeoTexSvxTiled final : public GeoTexSvx
         {
             basegfx::B2DRange               maRange;
             double                          mfOffsetX;
commit dea65aa89ec226d01b3273d14ffee8ce7dd32407
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Fri May 8 20:40:59 2020 +0200
Commit:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Mon Jun 22 09:38:05 2020 +0200

    drawinglayer: externalize FillHatchPrimitive2D class
    
    Change-Id: I9ad1f179a43bb6c501cb699c0f26523f47307829

diff --git a/include/drawinglayer/primitive2d/fillhatchprimitive2d.hxx b/include/drawinglayer/primitive2d/fillhatchprimitive2d.hxx
index bab7e47b03e8..c7b3a559bc42 100644
--- a/include/drawinglayer/primitive2d/fillhatchprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/fillhatchprimitive2d.hxx
@@ -26,9 +26,6 @@
 #include <drawinglayer/attribute/fillhatchattribute.hxx>
 #include <basegfx/color/bcolor.hxx>
 
-
-// FillHatchPrimitive2D class
-
 namespace drawinglayer::primitive2d
 {
         /** FillHatchPrimitive2D class
@@ -45,7 +42,7 @@ namespace drawinglayer::primitive2d
 
             The decomposition will deliver the hatch lines.
          */
-        class FillHatchPrimitive2D final : public DiscreteMetricDependentPrimitive2D
+        class DRAWINGLAYER_DLLPUBLIC FillHatchPrimitive2D final : public DiscreteMetricDependentPrimitive2D
         {
         private:
             /// the geometrically visible area
commit d8019f8cae9641e0b9fd73aee8291bee30810ed9
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: Mon Jun 22 09:38:04 2020 +0200

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

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 8c258a48f790..b7da19180468 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>
 
@@ -1953,6 +1955,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 b294042fb90b..a3d2dace99c9 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -80,6 +80,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 020a57a6a40c..e0ce70a90911 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -704,4 +704,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 7530691a782c10ea6864d722412f8fc2e3a0bf05
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: Mon Jun 22 09:38:04 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 fc701d8bff87..2936e66774c2 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -350,6 +350,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 24b8055836d0..814fff713ae1 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 \
@@ -127,7 +125,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 9aaf7bace296..d60954dab588 100644
--- a/drawinglayer/inc/pch/precompiled_drawinglayer.hxx
+++ b/drawinglayer/inc/pch/precompiled_drawinglayer.hxx
@@ -93,7 +93,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>
@@ -105,7 +104,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>
@@ -139,7 +138,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>
@@ -147,9 +145,6 @@
 #include <drawinglayer/primitive2d/PolyPolygonHatchPrimitive2D.hxx>
 #include <drawinglayer/primitive2d/PolyPolygonMarkerPrimitive2D.hxx>
 #include <drawinglayer/primitive2d/PolyPolygonStrokePrimitive2D.hxx>
-#include <drawinglayer/primitive2d/Primitive2DContainer.hxx>
-#include <drawinglayer/primitive2d/Primitive2DVisitor.hxx>
-#include <drawinglayer/primitive2d/Tools.hxx>
 #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
 #include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
 #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
diff --git a/drawinglayer/inc/pch/precompiled_drawinglayercore.cxx b/drawinglayer/inc/pch/precompiled_drawinglayercore.cxx
new file mode 100644
index 000000000000..4a8c23ea8e65
--- /dev/null
+++ b/drawinglayer/inc/pch/precompiled_drawinglayercore.cxx
@@ -0,0 +1,12 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "precompiled_drawinglayercore.hxx"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/drawinglayer/inc/pch/precompiled_drawinglayercore.hxx b/drawinglayer/inc/pch/precompiled_drawinglayercore.hxx
new file mode 100644
index 000000000000..4cc5ca4612c9
--- /dev/null
+++ b/drawinglayer/inc/pch/precompiled_drawinglayercore.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+/*
+ This file has been autogenerated by update_pch.sh. It is possible to edit it
+ manually (such as when an include file has been moved/renamed/removed). All such
+ manual changes will be rewritten by the next run of update_pch.sh (which presumably
+ also fixes all possible problems, so it's usually better to use it).
+
+ Generated on 2020-03-07 12:37:18 using:
+ ./bin/update_pch drawinglayer drawinglayercore --cutoff=4 --exclude:system --exclude:module --exclude:local
+
+ If after updating build fails, use the following command to locate conflicting headers:
+ ./bin/update_pch_bisect ./drawinglayer/inc/pch/precompiled_drawinglayercore.hxx "make drawinglayer.build" --find-conflicts
+*/
+
+#if PCH_LEVEL >= 1
+#include <ostream>
+#include <vector>
+#endif // PCH_LEVEL >= 1
+#if PCH_LEVEL >= 2
+#include <osl/diagnose.h>
+#include <osl/interlck.h>
+#include <sal/config.h>
+#include <sal/types.h>
+#endif // PCH_LEVEL >= 2
+#if PCH_LEVEL >= 3
+#include <basegfx/basegfxdllapi.h>
+#include <basegfx/point/b2dpoint.hxx>
+#include <basegfx/range/b2drange.hxx>
+#include <basegfx/range/basicrange.hxx>
+#include <basegfx/tuple/b2dtuple.hxx>
+#include <basegfx/utils/canvastools.hxx>
+#include <basegfx/vector/b2dvector.hxx>
+#endif // PCH_LEVEL >= 3
+#if PCH_LEVEL >= 4
+#include <drawinglayer/geometry/viewinformation2d.hxx>
+#endif // PCH_LEVEL >= 4
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/emfio/CppunitTest_emfio_emf_test.mk b/emfio/CppunitTest_emfio_emf_test.mk
index 123e4b3549bd..2679c0a604d9 100644
--- a/emfio/CppunitTest_emfio_emf_test.mk
+++ b/emfio/CppunitTest_emfio_emf_test.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_CppunitTest_use_sdk_api,emfio_emf))
 $(eval $(call gb_CppunitTest_use_libraries,emfio_emf,\
     basegfx \
     drawinglayer \
+    drawinglayercore \
     cppu \
     cppuhelper \
     comphelper \
diff --git a/emfio/Library_emfio.mk b/emfio/Library_emfio.mk
index 52fde14885b3..89add50b781a 100644
--- a/emfio/Library_emfio.mk
+++ b/emfio/Library_emfio.mk
@@ -41,6 +41,7 @@ $(eval $(call gb_Library_use_sdk_api,emfio))
 
 $(eval $(call gb_Library_use_libraries,emfio,\
     basegfx \
+    drawinglayercore \
     drawinglayer \
     cppu \
     cppuhelper \
diff --git a/filter/Library_svgfilter.mk b/filter/Library_svgfilter.mk
index 21318aa1fd03..1f0caf11758c 100644
--- a/filter/Library_svgfilter.mk
+++ b/filter/Library_svgfilter.mk
@@ -56,6 +56,7 @@ $(eval $(call gb_Library_use_libraries,svgfilter,\
 	sax \
 	salhelper \
 	comphelper \
+	drawinglayercore \
 	drawinglayer \
 	basegfx \
 	cppuhelper \
diff --git a/include/drawinglayer/drawinglayerdllapi.h b/include/drawinglayer/drawinglayerdllapi.h
index 0b3983504919..36a0d8abfea2 100644
--- a/include/drawinglayer/drawinglayerdllapi.h
+++ b/include/drawinglayer/drawinglayerdllapi.h
@@ -19,6 +19,12 @@
 #endif
 #define DRAWINGLAYER_DLLPRIVATE SAL_DLLPRIVATE
 
+#if defined(DRAWINGLAYERCORE_DLLIMPLEMENTATION)
+#define DRAWINGLAYERCORE_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define DRAWINGLAYERCORE_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/drawinglayer/geometry/viewinformation2d.hxx b/include/drawinglayer/geometry/viewinformation2d.hxx
index 95be29a72bda..06b17248d213 100644
--- a/include/drawinglayer/geometry/viewinformation2d.hxx
+++ b/include/drawinglayer/geometry/viewinformation2d.hxx
@@ -63,7 +63,7 @@ namespace drawinglayer::geometry
     It is an implementation to support the sequence of PropertyValues used in a
     css::graphic::XPrimitive2D for C++ implementations working with those
 */
-class DRAWINGLAYER_DLLPUBLIC ViewInformation2D
+class DRAWINGLAYERCORE_DLLPUBLIC ViewInformation2D
 {
 public:
     typedef o3tl::cow_wrapper<ImpViewInformation2D, o3tl::ThreadSafeRefCountingPolicy> ImplType;
diff --git a/include/drawinglayer/primitive2d/Primitive2DContainer.hxx b/include/drawinglayer/primitive2d/Primitive2DContainer.hxx
index cca3a0a91485..c096e9a8cc2f 100644
--- a/include/drawinglayer/primitive2d/Primitive2DContainer.hxx
+++ b/include/drawinglayer/primitive2d/Primitive2DContainer.hxx
@@ -34,7 +34,7 @@ class ViewInformation2D;
 
 namespace drawinglayer::primitive2d
 {
-class SAL_WARN_UNUSED DRAWINGLAYER_DLLPUBLIC Primitive2DContainer
+class SAL_WARN_UNUSED DRAWINGLAYERCORE_DLLPUBLIC Primitive2DContainer
     : public std::deque<Primitive2DReference>,
       public Primitive2DDecompositionVisitor
 {
diff --git a/include/drawinglayer/primitive2d/Primitive2DVisitor.hxx b/include/drawinglayer/primitive2d/Primitive2DVisitor.hxx
index dfe04b32a320..e174d1e0878d 100644
--- a/include/drawinglayer/primitive2d/Primitive2DVisitor.hxx
+++ b/include/drawinglayer/primitive2d/Primitive2DVisitor.hxx
@@ -27,7 +27,7 @@ namespace drawinglayer::primitive2d
 class Primitive2DContainer;
 
 // Visitor class for walking a tree of Primitive2DReference
-class DRAWINGLAYER_DLLPUBLIC Primitive2DDecompositionVisitor
+class DRAWINGLAYERCORE_DLLPUBLIC Primitive2DDecompositionVisitor
 {
 public:
     virtual void append(const Primitive2DReference&) = 0;
diff --git a/include/drawinglayer/primitive2d/Tools.hxx b/include/drawinglayer/primitive2d/Tools.hxx
index fbb6f5717c01..1c30565c8c1b 100644
--- a/include/drawinglayer/primitive2d/Tools.hxx
+++ b/include/drawinglayer/primitive2d/Tools.hxx
@@ -31,16 +31,16 @@ class ViewInformation2D;
 namespace drawinglayer::primitive2d
 {
 /// get B2DRange from a given Primitive2DReference
-basegfx::B2DRange DRAWINGLAYER_DLLPUBLIC getB2DRangeFromPrimitive2DReference(
+basegfx::B2DRange DRAWINGLAYERCORE_DLLPUBLIC getB2DRangeFromPrimitive2DReference(
     const Primitive2DReference& rCandidate, const geometry::ViewInformation2D& aViewInformation);
 
 /** compare two Primitive2DReferences for equality, including trying to get implementations (BasePrimitive2D)
     and using compare operator
  */
-bool DRAWINGLAYER_DLLPUBLIC arePrimitive2DReferencesEqual(const Primitive2DReference& rA,
-                                                          const Primitive2DReference& rB);
+bool DRAWINGLAYERCORE_DLLPUBLIC arePrimitive2DReferencesEqual(const Primitive2DReference& rA,
+                                                              const Primitive2DReference& rB);
 
-OUString DRAWINGLAYER_DLLPUBLIC idToString(sal_uInt32 nId);
+OUString DRAWINGLAYERCORE_DLLPUBLIC idToString(sal_uInt32 nId);
 
 } // end of namespace drawinglayer::primitive2d
 
diff --git a/include/drawinglayer/primitive2d/baseprimitive2d.hxx b/include/drawinglayer/primitive2d/baseprimitive2d.hxx
index 693dcc4b1e32..56ff35344de5 100644
--- a/include/drawinglayer/primitive2d/baseprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/baseprimitive2d.hxx
@@ -120,8 +120,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;
@@ -199,7 +199,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 47b801f799c4..413a4d8e90aa 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 67a66ef2d211..a6d6b7d6b71a 100644
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -49,6 +49,7 @@ $(eval $(call gb_Library_use_libraries,sfx,\
     comphelper \
     cppu \
     cppuhelper \
+    drawinglayercore \
     drawinglayer \
     fwe \
     i18nlangtag \
diff --git a/svgio/CppunitTest_svgio.mk b/svgio/CppunitTest_svgio.mk
index c6f4db91fc60..24fb7a39af32 100644
--- a/svgio/CppunitTest_svgio.mk
+++ b/svgio/CppunitTest_svgio.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_CppunitTest_use_library_objects,svgio,\
 $(eval $(call gb_CppunitTest_use_libraries,svgio,\
     basegfx \
     drawinglayer \
+    drawinglayercore \
     cppu \
     cppuhelper \
     comphelper \
diff --git a/svgio/Library_svgio.mk b/svgio/Library_svgio.mk
index 449c17f61196..7ef1aeb19513 100644
--- a/svgio/Library_svgio.mk
+++ b/svgio/Library_svgio.mk
@@ -33,6 +33,7 @@ $(eval $(call gb_Library_use_sdk_api,svgio))
 
 $(eval $(call gb_Library_use_libraries,svgio,\
     basegfx \
+    drawinglayercore \
     drawinglayer \
     comphelper \
     cppu \
diff --git a/svx/CppunitTest_svx_unit.mk b/svx/CppunitTest_svx_unit.mk
index ac9f3e4531ad..4a51867ec189 100644
--- a/svx/CppunitTest_svx_unit.mk
+++ b/svx/CppunitTest_svx_unit.mk
@@ -36,6 +36,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 ff2b06626b58..bdb827b6c139 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 7ed0705102be..f39146751ae1 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 0707fb93e9c4..da6b308e6ffb 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 235c54e115b66c880d3da0b8018f8ef29d20bc42
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sat Jun 20 09:16:11 2020 +0200
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Mon Jun 22 08:14:10 2020 +0200

    pdf export: add support for modification time/date in annotations
    
    Previously the modification date was written to the annotation
    "title" as string, together with the username. This is however
    not neccessary as PDF supports the modification date perfectly
    fine.
    
    Change-Id: I6f55e4fe63d9c3c81ec557f6cfd3387f011e67c0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96766
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index 12f4a8e1e805..f635a924507b 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -32,6 +32,7 @@
 #include <vcl/graph.hxx>
 
 #include <com/sun/star/lang/Locale.hpp>
+#include <com/sun/star/util/DateTime.hpp>
 
 #include <memory>
 #include <vector>
@@ -64,6 +65,7 @@ struct PDFNote
 {
     OUString          Title;          // optional title for the popup containing the note
     OUString          Contents;       // contents of the note
+    css::util::DateTime maModificationDate;
 };
 
 class VCL_DLLPUBLIC PDFOutputStream
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index fba4d8f68e6f..c72ef5725b89 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -1556,24 +1556,18 @@ static void ImplPDFExportComments( const uno::Reference< drawing::XDrawPage >& x
         uno::Reference< office::XAnnotationAccess > xAnnotationAccess( xPage, uno::UNO_QUERY_THROW );
         uno::Reference< office::XAnnotationEnumeration > xAnnotationEnumeration( xAnnotationAccess->createAnnotationEnumeration() );
 
-        LanguageType eLanguage = Application::GetSettings().GetLanguageTag().getLanguageType();
         while( xAnnotationEnumeration->hasMoreElements() )
         {
             uno::Reference< office::XAnnotation > xAnnotation( xAnnotationEnumeration->nextElement() );
 
             geometry::RealPoint2D aRealPoint2D( xAnnotation->getPosition() );
             uno::Reference< text::XText > xText( xAnnotation->getTextRange() );
-            util::DateTime aDateTime( xAnnotation->getDateTime() );
-
-            Date aDate( aDateTime.Day, aDateTime.Month, aDateTime.Year );
-            ::tools::Time aTime( ::tools::Time::EMPTY );
-            OUString aStr = SvxDateTimeField::GetFormatted( aDate, aTime,
-                                SvxDateFormat::B, SvxTimeFormat::AppDefault,
-                                *(SD_MOD()->GetNumberFormatter()), eLanguage );
 
             vcl::PDFNote aNote;
-            aNote.Title = xAnnotation->getAuthor() + ", " + aStr;
+            aNote.Title = xAnnotation->getAuthor();
             aNote.Contents = xText->getString();
+            aNote.maModificationDate = xAnnotation->getDateTime();
+
             rPDFExtOutDevData.CreateNote( ::tools::Rectangle( Point( static_cast< long >( aRealPoint2D.X * 100 ),
                 static_cast< long >( aRealPoint2D.Y * 100 ) ), Size( 1000, 1000 ) ), aNote );
         }
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index c7e56544f58a..c7c6b5cccfbc 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -561,6 +561,49 @@ void PDFWriterImpl::appendNonStrokingColor( const Color& rColor, OStringBuffer&
     }
 }
 
+namespace
+{
+
+void appendPdfTimeDate(OStringBuffer & rBuffer,
+    sal_Int16 year, sal_uInt16 month, sal_uInt16 day, sal_uInt16 hours, sal_uInt16 minutes, sal_uInt16 seconds, sal_uInt32 tzDelta)
+{
+    rBuffer.append("D:");
+    rBuffer.append(char('0' + ((year / 1000) % 10)));
+    rBuffer.append(char('0' + ((year / 100) % 10)));
+    rBuffer.append(char('0' + ((year / 10) % 10)));
+    rBuffer.append(char('0' + (year % 10)));
+    rBuffer.append(char('0' + ((month / 10) % 10)));
+    rBuffer.append(char('0' + (month % 10)));
+    rBuffer.append(char('0' + ((day / 10) % 10)));
+    rBuffer.append(char('0' + (day % 10)));
+    rBuffer.append(char('0' + ((hours / 10) % 10)));
+    rBuffer.append(char('0' + (hours % 10)));
+    rBuffer.append(char('0' + ((minutes / 10) % 10)));
+    rBuffer.append(char('0' + (minutes % 10)));
+    rBuffer.append(char('0' + ((seconds / 10) % 10)));
+    rBuffer.append(char('0' + (seconds % 10)));
+
+    if (tzDelta == 0)
+    {
+        rBuffer.append("Z");
+    }
+    else
+    {
+        if (tzDelta > 0 )
+            rBuffer.append("+");
+        else
+            rBuffer.append("-");
+
+        rBuffer.append(char('0' + ((tzDelta / 36000) % 10)));
+        rBuffer.append(char('0' + ((tzDelta / 3600) % 10)));
+        rBuffer.append("'");
+        rBuffer.append(char('0' + ((tzDelta / 600) % 6)));
+        rBuffer.append(char('0' + ((tzDelta / 60) % 10)));
+    }
+}
+
+} // end namespace
+
 PDFPage::PDFPage( PDFWriterImpl* pWriter, double nPageWidth, double nPageHeight, PDFWriter::Orientation eOrientation )
         :
         m_pWriter( pWriter ),
@@ -1314,46 +1357,20 @@ OString PDFWriter::GetDateTime()
     osl_getSystemTime(&aGMT);
     osl_getLocalTimeFromSystemTime(&aGMT, &aTVal);
     osl_getDateTimeFromTimeValue(&aTVal, &aDT);
-    aRet.append("D:");
-    aRet.append(static_cast<char>('0' + ((aDT.Year / 1000) % 10)));
-    aRet.append(static_cast<char>('0' + ((aDT.Year / 100) % 10)));
-    aRet.append(static_cast<char>('0' + ((aDT.Year / 10) % 10)));
-    aRet.append(static_cast<char>('0' + (aDT.Year % 10)));
-    aRet.append(static_cast<char>('0' + ((aDT.Month / 10) % 10)));
-    aRet.append(static_cast<char>('0' + (aDT.Month % 10)));
-    aRet.append(static_cast<char>('0' + ((aDT.Day / 10) % 10)));
-    aRet.append(static_cast<char>('0' + (aDT.Day % 10)));
-    aRet.append(static_cast<char>('0' + ((aDT.Hours / 10) % 10)));
-    aRet.append(static_cast<char>('0' + (aDT.Hours % 10)));
-    aRet.append(static_cast<char>('0' + ((aDT.Minutes / 10) % 10)));
-    aRet.append(static_cast<char>('0' + (aDT.Minutes % 10)));
-    aRet.append(static_cast<char>('0' + ((aDT.Seconds / 10) % 10)));
-    aRet.append(static_cast<char>('0' + (aDT.Seconds % 10)));
 
     sal_uInt32 nDelta = 0;
     if (aGMT.Seconds > aTVal.Seconds)
     {
-        aRet.append("-");
         nDelta = aGMT.Seconds-aTVal.Seconds;
     }
     else if (aGMT.Seconds < aTVal.Seconds)
     {
-        aRet.append("+");
         nDelta = aTVal.Seconds-aGMT.Seconds;
     }
-    else
-        aRet.append("Z");
 
-    if (nDelta)
-    {
-        aRet.append(static_cast<char>('0' + ((nDelta / 36000) % 10)));
-        aRet.append(static_cast<char>('0' + ((nDelta / 3600) % 10)));
-        aRet.append("'");
-        aRet.append(static_cast<char>('0' + ((nDelta / 600) % 6)));
-        aRet.append(static_cast<char>('0' + ((nDelta / 60) % 10)));
-    }
-    aRet.append( "'" );
+    appendPdfTimeDate(aRet, aDT.Year, aDT.Month, aDT.Day, aDT.Hours, aDT.Minutes, aDT.Seconds, nDelta);
 
+    aRet.append("'");
     return aRet.makeStringAndClear();
 }
 
@@ -3464,6 +3481,11 @@ void PDFWriterImpl::emitTextAnnotationLine(OStringBuffer & aLine, PDFNoteEntry c
     aLine.append("/Popup ");
     appendObjectReference(rNote.m_aPopUpAnnotation.m_nObject, aLine);
 
+    auto & rDateTime = rNote.m_aContents.maModificationDate;
+
+    aLine.append("/M ");
+    appendPdfTimeDate(aLine, rDateTime.Year, rDateTime.Month, rDateTime.Day, rDateTime.Hours, rDateTime.Minutes, rDateTime.Seconds, 0);
+
     // contents of the note (type text string)
     aLine.append("/Contents ");
     appendUnicodeTextStringEncrypt(rNote.m_aContents.Contents, rNote.m_nObject, aLine);
commit 51d529c18dadb05754590a01ce4c1f06f41cf412
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sat Jun 20 08:43:58 2020 +0200
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Mon Jun 22 08:13:31 2020 +0200

    pdf export: support pop-up annotation for notes / comments
    
    This changes pdf export for annotation, so the comments are
    exported as "text" annotation with an child "pop-up" annotations.
    This seems to be more common what PDF readers do (even when text
    annotation only should be enough).
    
    Also changes the test, so that it now works as expected.
    
    Change-Id: I95bc12939f490effe7759dad54e136c44e44a2f8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96765
    Tested-by: Tomaž Vajngerl <quikee at gmail.com>
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/sd/qa/unit/SdrPdfImportTest.cxx b/sd/qa/unit/SdrPdfImportTest.cxx
index 4bbb24de4035..e8dd60b0a806 100644
--- a/sd/qa/unit/SdrPdfImportTest.cxx
+++ b/sd/qa/unit/SdrPdfImportTest.cxx
@@ -231,14 +231,13 @@ CPPUNIT_TEST_FIXTURE(SdrPdfImportTest, testAnnotationsImportExport)
         auto pPDFPage = pPDFDocument->openPage(0);
         CPPUNIT_ASSERT(pPDFPage);
 
-        // TODO: Should be 2 really
-        CPPUNIT_ASSERT_EQUAL(1, pPDFPage->getAnnotationCount());
+        CPPUNIT_ASSERT_EQUAL(2, pPDFPage->getAnnotationCount());
 
         auto pPDFAnnotation1 = pPDFPage->getAnnotation(0);
         CPPUNIT_ASSERT_EQUAL(1, pPDFAnnotation1->getSubType()); // Text annotation
 
-        //auto pPDFAnnotation2 = pPDFPage->getAnnotation(1);
-        //CPPUNIT_ASSERT_EQUAL(16, pPDFAnnotation2->getSubType()); // Pop-up annotation
+        auto pPDFAnnotation2 = pPDFPage->getAnnotation(1);
+        CPPUNIT_ASSERT_EQUAL(16, pPDFAnnotation2->getSubType()); // Pop-up annotation
 
         // Load document again
         mxComponent = loadFromDesktop(aTempFile.GetURL());
@@ -249,7 +248,7 @@ CPPUNIT_TEST_FIXTURE(SdrPdfImportTest, testAnnotationsImportExport)
         SdPage* pPage = pNewViewShell->GetActualPage();
         CPPUNIT_ASSERT(pPage);
 
-        //CPPUNIT_ASSERT_EQUAL(false, pPage->getAnnotations().empty());
+        CPPUNIT_ASSERT(!pPage->getAnnotations().empty());
     }
 
 #endif // HAVE_FEATURE_PDFIUM
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 04fcb70a152f..c7e56544f58a 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -3418,50 +3418,111 @@ we check in the following sequence:
     return true;
 }
 
+namespace
+{
+
+void appendAnnotationRect(tools::Rectangle const & rRectangle, OStringBuffer & aLine)
+{
+    aLine.append("/Rect[");
+    appendFixedInt(rRectangle.Left(), aLine);
+    aLine.append(' ');
+    appendFixedInt(rRectangle.Top(), aLine);
+    aLine.append(' ');
+    appendFixedInt(rRectangle.Right(), aLine);
+    aLine.append(' ');
+    appendFixedInt(rRectangle.Bottom(), aLine);
+    aLine.append("] ");
+}
+
+void appendObjectID(sal_Int32 nObjectID, OStringBuffer & aLine)
+{
+    aLine.append(nObjectID);
+    aLine.append(" 0 obj\n");
+}
+
+void appendObjectReference(sal_Int32 nObjectID, OStringBuffer & aLine)
+{
+    aLine.append(nObjectID);
+    aLine.append(" 0 R ");
+}
+
+} // end anonymous namespace
+
+void PDFWriterImpl::emitTextAnnotationLine(OStringBuffer & aLine, PDFNoteEntry const & rNote)
+{
+    appendObjectID(rNote.m_nObject, aLine);
+
+    aLine.append("<</Type /Annot /Subtype /Text ");
+
+// i59651: key /F set bits Print to 1 rest to 0. We don't set NoZoom NoRotate to 1, since it's a 'should'
+// see PDF 8.4.2 and ISO 19005-1:2005 6.5.3
+    if (m_bIsPDF_A1 || m_bIsPDF_A2 || m_bIsPDF_A3)
+        aLine.append("/F 4 ");
+
+    appendAnnotationRect(rNote.m_aRect, aLine);
+
+    aLine.append("/Popup ");
+    appendObjectReference(rNote.m_aPopUpAnnotation.m_nObject, aLine);
+
+    // contents of the note (type text string)
+    aLine.append("/Contents ");
+    appendUnicodeTextStringEncrypt(rNote.m_aContents.Contents, rNote.m_nObject, aLine);
+    aLine.append("\n");
+
+    // optional title
+    if (!rNote.m_aContents.Title.isEmpty())
+    {
+        aLine.append("/T ");
+        appendUnicodeTextStringEncrypt(rNote.m_aContents.Title, rNote.m_nObject, aLine);
+        aLine.append("\n");
+    }
+    aLine.append(">>\n");
+    aLine.append("endobj\n\n");
+}
+
+void PDFWriterImpl::emitPopupAnnotationLine(OStringBuffer & aLine, PDFPopupAnnotation const & rPopUp)
+{
+    appendObjectID(rPopUp.m_nObject, aLine);
+    aLine.append("<</Type /Annot /Subtype /Popup ");
+    aLine.append("/Parent ");
+    appendObjectReference(rPopUp.m_nParentObject, aLine);
+    aLine.append(">>\n");
+    aLine.append("endobj\n\n");
+}
+
 bool PDFWriterImpl::emitNoteAnnotations()
 {
     // emit note annotations
     int nAnnots = m_aNotes.size();
     for( int i = 0; i < nAnnots; i++ )
     {
-        const PDFNoteEntry& rNote       = m_aNotes[i];
-        if( ! updateObject( rNote.m_nObject ) )
-            return false;
+        const PDFNoteEntry& rNote = m_aNotes[i];
+        const PDFPopupAnnotation& rPopUp = rNote.m_aPopUpAnnotation;
 
-        OStringBuffer aLine( 1024 );
-        aLine.append( rNote.m_nObject );
-        aLine.append( " 0 obj\n" );
-// i59651: key /F set bits Print to 1 rest to 0. We don't set NoZoom NoRotate to 1, since it's a 'should'
-// see PDF 8.4.2 and ISO 19005-1:2005 6.5.3
-        aLine.append( "<</Type/Annot" );
-        if( m_bIsPDF_A1 || m_bIsPDF_A2 || m_bIsPDF_A3 )
-            aLine.append( "/F 4" );
-        aLine.append( "/Subtype/Text/Rect[" );
+        {
+            if (!updateObject(rNote.m_nObject))
+                return false;
 
-        appendFixedInt( rNote.m_aRect.Left(), aLine );
-        aLine.append( ' ' );
-        appendFixedInt( rNote.m_aRect.Top(), aLine );
-        aLine.append( ' ' );
-        appendFixedInt( rNote.m_aRect.Right(), aLine );
-        aLine.append( ' ' );
-        appendFixedInt( rNote.m_aRect.Bottom(), aLine );
-        aLine.append( "]" );
+            OStringBuffer aLine(1024);
 
-        // contents of the note (type text string)
-        aLine.append( "/Contents\n" );
-        appendUnicodeTextStringEncrypt( rNote.m_aContents.Contents, rNote.m_nObject, aLine );
-        aLine.append( "\n" );
+            emitTextAnnotationLine(aLine, rNote);
 
-        // optional title
-        if( !rNote.m_aContents.Title.isEmpty() )
-        {
-            aLine.append( "/T" );
-            appendUnicodeTextStringEncrypt( rNote.m_aContents.Title, rNote.m_nObject, aLine );
-            aLine.append( "\n" );
+            if (!writeBuffer(aLine.getStr(), aLine.getLength()))
+                return false;
         }
 
-        aLine.append( ">>\nendobj\n\n" );
-        CHECK_RETURN( writeBuffer( aLine.getStr(), aLine.getLength() ) );
+        {
+
+            if (!updateObject(rPopUp.m_nObject))
+                return false;
+
+            OStringBuffer aLine(1024);
+
+            emitPopupAnnotationLine(aLine, rPopUp);
+
+            if (!writeBuffer(aLine.getStr(), aLine.getLength()))
+                return false;
+        }
     }
     return true;
 }

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list