[Libreoffice-commits] core.git: Branch 'feature/drawinglayercore' - 5 commits - drawinglayer/source solenv/clang-format

Tomaž Vajngerl (via logerrit) logerrit at kemper.freedesktop.org
Sun Apr 12 11:23:58 UTC 2020


 drawinglayer/source/processor2d/vclpixelprocessor2d.cxx |    6 
 drawinglayer/source/processor2d/vclpixelprocessor2d.hxx |  137 +++++-----
 drawinglayer/source/processor2d/vclprocessor2d.hxx      |  207 ++++++++--------
 solenv/clang-format/blacklist                           |    2 
 4 files changed, 178 insertions(+), 174 deletions(-)

New commits:
commit 1ee7499aa705bd5326a93ac55d0904c0bbd06724
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sun Apr 12 13:22:26 2020 +0200
Commit:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Sun Apr 12 13:22:26 2020 +0200

    fdo#43157: VclPixelProcessor2D replace OSL_ENSURE with SAL_WARN_IF
    
    Change-Id: I4a6c46f9054f9a32d52f1f60f5f7547e62cf7a5a

diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index 972c08481040..9102230f4305 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -581,7 +581,7 @@ namespace drawinglayer::processor2d
                                 {
                                     // single transparent tools::PolyPolygon identified, use directly
                                     const primitive2d::PolyPolygonColorPrimitive2D* pPoPoColor = static_cast< const primitive2d::PolyPolygonColorPrimitive2D* >(pBasePrimitive);
-                                    OSL_ENSURE(pPoPoColor, "OOps, PrimitiveID and PrimitiveType do not match (!)");
+                                    SAL_WARN_IF(!pPoPoColor, "drawinglayer", "OOps, PrimitiveID and PrimitiveType do not match (!)");
                                     bDrawTransparentUsed = true;
                                     tryDrawPolyPolygonColorPrimitive2DDirect(*pPoPoColor, rUniTransparenceCandidate.getTransparence());
                                     break;
@@ -590,7 +590,7 @@ namespace drawinglayer::processor2d
                                 {
                                     // single transparent PolygonHairlinePrimitive2D identified, use directly
                                     const primitive2d::PolygonHairlinePrimitive2D* pPoHair = static_cast< const primitive2d::PolygonHairlinePrimitive2D* >(pBasePrimitive);
-                                    OSL_ENSURE(pPoHair, "OOps, PrimitiveID and PrimitiveType do not match (!)");
+                                    SAL_WARN_IF(!pPoHair, "drawinglayer", "OOps, PrimitiveID and PrimitiveType do not match (!)");
 
                                     // do no tallow by default - problem is that self-overlapping parts of this geometry will
                                     // not be in an all-same transparency but will already alpha-cover themselves with blending.
@@ -604,7 +604,7 @@ namespace drawinglayer::processor2d
                                 {
                                     // single transparent PolygonStrokePrimitive2D identified, use directly
                                     const primitive2d::PolygonStrokePrimitive2D* pPoStroke = static_cast< const primitive2d::PolygonStrokePrimitive2D* >(pBasePrimitive);
-                                    OSL_ENSURE(pPoStroke, "OOps, PrimitiveID and PrimitiveType do not match (!)");
+                                    SAL_WARN_IF(!pPoStroke, "drawinglayer", "OOps, PrimitiveID and PrimitiveType do not match (!)");
 
                                     // do no tallow by default - problem is that self-overlapping parts of this geometry will
                                     // not be in an all-same transparency but will already alpha-cover themselves with blending.
commit d3059d4a4c8456951fdef4aeec89c3600dfeb3a0
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sun Apr 12 13:17:28 2020 +0200
Commit:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Sun Apr 12 13:17:28 2020 +0200

    remove vclpixelprocessor2d.hxx from clang-format blacklist
    
    Change-Id: I5fe33322ff0df5191f57f1364a2d32eefc889d68

diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
index 1ee765ab1e51..5c834056c947 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
@@ -24,69 +24,81 @@
 
 #include <memory>
 
-namespace drawinglayer::primitive2d {
-    class PolyPolygonColorPrimitive2D;
-    class PolygonHairlinePrimitive2D;
-    class PolygonStrokePrimitive2D;
-    class WrongSpellPrimitive2D;
-    class TextSimplePortionPrimitive;
-    class BitmapPrimitive2D;
-    class PolyPolygonGradientPrimitive2D;
-    class UnifiedTransparencePrimitive2D;
-    class ControlPrimitive2D;
-    class PolygonStrokePrimitive2D;
-    class FillHatchPrimitive2D;
-    class BackgroundColorPrimitive2D;
-    class BorderLinePrimitive2D;
+namespace drawinglayer::primitive2d
+{
+class PolyPolygonColorPrimitive2D;
+class PolygonHairlinePrimitive2D;
+class PolygonStrokePrimitive2D;
+class WrongSpellPrimitive2D;
+class TextSimplePortionPrimitive;
+class BitmapPrimitive2D;
+class PolyPolygonGradientPrimitive2D;
+class UnifiedTransparencePrimitive2D;
+class ControlPrimitive2D;
+class PolygonStrokePrimitive2D;
+class FillHatchPrimitive2D;
+class BackgroundColorPrimitive2D;
+class BorderLinePrimitive2D;
 }
 
 namespace drawinglayer::processor2d
 {
-        /** VclPixelProcessor2D class
+/** VclPixelProcessor2D class
 
-            This processor derived from VclProcessor2D is the base class for rendering
-            all fed primitives to a VCL Window. It is the currently used renderer
-            for all VCL editing output from the DrawingLayer.
-         */
-        class VclPixelProcessor2D final : public VclProcessor2D
-        {
-            struct Impl;
-            std::unique_ptr<Impl> m_pImpl;
+    This processor derived from VclProcessor2D is the base class for rendering
+    all fed primitives to a VCL Window. It is the currently used renderer
+    for all VCL editing output from the DrawingLayer.
+ */
+class VclPixelProcessor2D final : public VclProcessor2D
+{
+    struct Impl;
+    std::unique_ptr<Impl> m_pImpl;
 
-            /*  the local processor for BasePrimitive2D-Implementation based primitives,
-                called from the common process()-implementation
-             */
-            virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate) override;
+    /*  the local processor for BasePrimitive2D-Implementation based primitives,
+        called from the common process()-implementation
+     */
+    virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate) override;
 
-            // some helpers to try direct paints (shortcuts)
-            void tryDrawPolyPolygonColorPrimitive2DDirect(const drawinglayer::primitive2d::PolyPolygonColorPrimitive2D& rSource, double fTransparency);
-            bool tryDrawPolygonHairlinePrimitive2DDirect(const drawinglayer::primitive2d::PolygonHairlinePrimitive2D& rSource, double fTransparency);
-            bool tryDrawPolygonStrokePrimitive2DDirect(const drawinglayer::primitive2d::PolygonStrokePrimitive2D& rSource, double fTransparency);
+    // some helpers to try direct paints (shortcuts)
+    void tryDrawPolyPolygonColorPrimitive2DDirect(
+        const primitive2d::PolyPolygonColorPrimitive2D& rSource, double fTransparency);
+    bool
+    tryDrawPolygonHairlinePrimitive2DDirect(const primitive2d::PolygonHairlinePrimitive2D& rSource,
+                                            double fTransparency);
+    bool tryDrawPolygonStrokePrimitive2DDirect(const primitive2d::PolygonStrokePrimitive2D& rSource,
+                                               double fTransparency);
 
-            void processWrongSpellPrimitive2D(const primitive2d::WrongSpellPrimitive2D& rWrongSpellPrimitive);
-            void processTextSimplePortionPrimitive2D(const primitive2d::TextSimplePortionPrimitive2D& rCandidate);
-            void processTextDecoratedPortionPrimitive2D(const primitive2d::TextSimplePortionPrimitive2D& rCandidate);
-            void processPolygonHairlinePrimitive2D(const primitive2d::PolygonHairlinePrimitive2D& rPolygonHairlinePrimitive2D);
-            void processBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D& rBitmapCandidate);
-            void processPolyPolygonGradientPrimitive2D(const primitive2d::PolyPolygonGradientPrimitive2D& rPolygonCandidate);
-            void processPolyPolygonColorPrimitive2D(const primitive2d::PolyPolygonColorPrimitive2D& rPolyPolygonColorPrimitive2D);
-            void processUnifiedTransparencePrimitive2D(const primitive2d::UnifiedTransparencePrimitive2D& rUniTransparenceCandidate);
-            void processControlPrimitive2D(const primitive2d::ControlPrimitive2D& rControlPrimitive);
-            void processPolygonStrokePrimitive2D(const primitive2d::PolygonStrokePrimitive2D& rPolygonStrokePrimitive2D);
-            void processFillHatchPrimitive2D(const primitive2d::FillHatchPrimitive2D& rFillHatchPrimitive);
-            void processBackgroundColorPrimitive2D(const primitive2d::BackgroundColorPrimitive2D& rPrimitive);
-            void processBorderLinePrimitive2D(const drawinglayer::primitive2d::BorderLinePrimitive2D& rBorder);
-            void processInvertPrimitive2D(const primitive2d::BasePrimitive2D& rCandidate);
-            void processMetaFilePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate);
+    void
+    processWrongSpellPrimitive2D(const primitive2d::WrongSpellPrimitive2D& rWrongSpellPrimitive);
+    void processTextSimplePortionPrimitive2D(
+        const primitive2d::TextSimplePortionPrimitive2D& rCandidate);
+    void processTextDecoratedPortionPrimitive2D(
+        const primitive2d::TextSimplePortionPrimitive2D& rCandidate);
+    void processPolygonHairlinePrimitive2D(
+        const primitive2d::PolygonHairlinePrimitive2D& rPolygonHairlinePrimitive2D);
+    void processBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D& rBitmapCandidate);
+    void processPolyPolygonGradientPrimitive2D(
+        const primitive2d::PolyPolygonGradientPrimitive2D& rPolygonCandidate);
+    void processPolyPolygonColorPrimitive2D(
+        const primitive2d::PolyPolygonColorPrimitive2D& rPolyPolygonColorPrimitive2D);
+    void processUnifiedTransparencePrimitive2D(
+        const primitive2d::UnifiedTransparencePrimitive2D& rUniTransparenceCandidate);
+    void processControlPrimitive2D(const primitive2d::ControlPrimitive2D& rControlPrimitive);
+    void processPolygonStrokePrimitive2D(
+        const primitive2d::PolygonStrokePrimitive2D& rPolygonStrokePrimitive2D);
+    void processFillHatchPrimitive2D(const primitive2d::FillHatchPrimitive2D& rFillHatchPrimitive);
+    void
+    processBackgroundColorPrimitive2D(const primitive2d::BackgroundColorPrimitive2D& rPrimitive);
+    void
+    processBorderLinePrimitive2D(const drawinglayer::primitive2d::BorderLinePrimitive2D& rBorder);
+    void processInvertPrimitive2D(const primitive2d::BasePrimitive2D& rCandidate);
+    void processMetaFilePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate);
 
-        public:
-            /// constructor/destructor
-            VclPixelProcessor2D(
-                const geometry::ViewInformation2D& rViewInformation,
-                OutputDevice& rOutDev);
-            virtual ~VclPixelProcessor2D() override;
-        };
+public:
+    /// constructor/destructor
+    VclPixelProcessor2D(const geometry::ViewInformation2D& rViewInformation, OutputDevice& rOutDev);
+    virtual ~VclPixelProcessor2D() override;
+};
 } // end of namespace drawinglayer::processor2d
 
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index d173ca45f44a..a1bdfa1242d6 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -3757,7 +3757,6 @@ drawinglayer/source/processor2d/vclhelperbufferdevice.hxx
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
 drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx
 drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
-drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
 drawinglayer/source/processor2d/vclprocessor2d.cxx
 drawinglayer/source/processor3d/baseprocessor3d.cxx
 drawinglayer/source/processor3d/cutfindprocessor3d.cxx
commit 6835a7f65dd4639858d2f0702accbc161513a5ed
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sun Apr 12 13:09:36 2020 +0200
Commit:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Sun Apr 12 13:15:02 2020 +0200

    remove vclprocessor2d.hxx from clang-format blacklist
    
    Change-Id: I4fda4b3431c63d5870f074be15cff6064dc1ff95

diff --git a/drawinglayer/source/processor2d/vclprocessor2d.hxx b/drawinglayer/source/processor2d/vclprocessor2d.hxx
index 73cf8d5b1a8d..3b1b997a7cc4 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.hxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.hxx
@@ -27,99 +27,111 @@
 
 class OutputDevice;
 
-namespace drawinglayer::primitive2d {
-    class TextSimplePortionPrimitive2D;
-    class PolygonHairlinePrimitive2D;
-    class BitmapPrimitive2D;
-    class FillGraphicPrimitive2D;
-    class PolyPolygonGradientPrimitive2D;
-    class PolyPolygonGraphicPrimitive2D;
-    class MetafilePrimitive2D;
-    class MaskPrimitive2D;
-    class UnifiedTransparencePrimitive2D;
-    class TransparencePrimitive2D;
-    class TransformPrimitive2D;
-    class MarkerArrayPrimitive2D;
-    class PointArrayPrimitive2D;
-    class ModifiedColorPrimitive2D;
-    class PolygonStrokePrimitive2D;
-    class ControlPrimitive2D;
-    class PagePreviewPrimitive2D;
-    class EpsPrimitive2D;
-    class ObjectInfoPrimitive2D;
-    class SvgLinearAtomPrimitive2D;
-    class SvgRadialAtomPrimitive2D;
+namespace drawinglayer::primitive2d
+{
+class TextSimplePortionPrimitive2D;
+class PolygonHairlinePrimitive2D;
+class BitmapPrimitive2D;
+class FillGraphicPrimitive2D;
+class PolyPolygonGradientPrimitive2D;
+class PolyPolygonGraphicPrimitive2D;
+class MetafilePrimitive2D;
+class MaskPrimitive2D;
+class UnifiedTransparencePrimitive2D;
+class TransparencePrimitive2D;
+class TransformPrimitive2D;
+class MarkerArrayPrimitive2D;
+class PointArrayPrimitive2D;
+class ModifiedColorPrimitive2D;
+class PolygonStrokePrimitive2D;
+class ControlPrimitive2D;
+class PagePreviewPrimitive2D;
+class EpsPrimitive2D;
+class ObjectInfoPrimitive2D;
+class SvgLinearAtomPrimitive2D;
+class SvgRadialAtomPrimitive2D;
 }
 
 namespace drawinglayer::processor2d
 {
-        /** VclProcessor2D class
-
-            This processor is the base class for VCL-Based processors. It has no
-            processBasePrimitive2D implementation and thus is not usable directly.
-         */
-        class VclProcessor2D : public BaseProcessor2D
-        {
-        protected:
-            // the destination OutDev
-            VclPtr<OutputDevice>                                    mpOutputDevice;
-
-            // the modifiedColorPrimitive stack
-            basegfx::BColorModifierStack                            maBColorModifierStack;
-
-            // the current transformation. Since VCL pixel renderer transforms to pixels
-            // and VCL MetaFile renderer to World (logic) coordinates, the local
-            // ViewInformation2D cannot directly be used, but needs to be kept up to date
-            basegfx::B2DHomMatrix                                   maCurrentTransformation;
-
-            // SvtOptionsDrawinglayer incarnation to react on diverse settings
-            const SvtOptionsDrawinglayer                            maDrawinglayerOpt;
-
-            // stack value (increment and decrement) to count how deep we are in
-            // PolygonStrokePrimitive2D's decompositions (normally only one)
-            sal_uInt32                                              mnPolygonStrokePrimitive2D;
-
-            // currently used ObjectInfoPrimitive2D
-            const primitive2d::ObjectInfoPrimitive2D*               mpObjectInfoPrimitive2D;
-
-            // common VCL rendering support
-            void RenderTextSimpleOrDecoratedPortionPrimitive2D(const primitive2d::TextSimplePortionPrimitive2D& rTextCandidate);
-            void RenderPolygonHairlinePrimitive2D(const primitive2d::PolygonHairlinePrimitive2D& rPolygonCandidate, bool bPixelBased);
-            void RenderBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D& rBitmapCandidate);
-            void RenderFillGraphicPrimitive2D(const primitive2d::FillGraphicPrimitive2D& rFillBitmapCandidate);
-            void RenderPolyPolygonGraphicPrimitive2D(const primitive2d::PolyPolygonGraphicPrimitive2D& rPolygonCandidate);
-            void RenderMaskPrimitive2DPixel(const primitive2d::MaskPrimitive2D& rMaskCandidate);
-            void RenderModifiedColorPrimitive2D(const primitive2d::ModifiedColorPrimitive2D& rModifiedCandidate);
-            void RenderUnifiedTransparencePrimitive2D(const primitive2d::UnifiedTransparencePrimitive2D& rTransCandidate);
-            void RenderTransparencePrimitive2D(const primitive2d::TransparencePrimitive2D& rTransCandidate);
-            void RenderTransformPrimitive2D(const primitive2d::TransformPrimitive2D& rTransformCandidate);
-            void RenderPagePreviewPrimitive2D(const primitive2d::PagePreviewPrimitive2D& rPagePreviewCandidate);
-            void RenderMarkerArrayPrimitive2D(const primitive2d::MarkerArrayPrimitive2D& rMarkerArrayCandidate);
-            void RenderPointArrayPrimitive2D(const primitive2d::PointArrayPrimitive2D& rPointArrayCandidate);
-            void RenderPolygonStrokePrimitive2D(const primitive2d::PolygonStrokePrimitive2D& rPolygonStrokeCandidate);
-            void RenderEpsPrimitive2D(const primitive2d::EpsPrimitive2D& rEpsPrimitive2D);
-            void RenderObjectInfoPrimitive2D(const primitive2d::ObjectInfoPrimitive2D& rObjectInfoPrimitive2D);
-            void RenderSvgLinearAtomPrimitive2D(const primitive2d::SvgLinearAtomPrimitive2D& rCandidate);
-            void RenderSvgRadialAtomPrimitive2D(const primitive2d::SvgRadialAtomPrimitive2D& rCandidate);
-
-            // DrawMode adaptation support
-            void adaptLineToFillDrawMode() const;
-            void adaptTextToFillDrawMode() const;
-
-        public:
-            // constructor/destructor
-            VclProcessor2D(
-                const geometry::ViewInformation2D& rViewInformation,
-                OutputDevice& rOutDev);
-            virtual ~VclProcessor2D() override;
-
-            // access to Drawinglayer configuration options
-            const SvtOptionsDrawinglayer& getOptionsDrawinglayer() const { return maDrawinglayerOpt; }
-
-            // access to currently used ObjectInfoPrimitive2D
-            const primitive2d::ObjectInfoPrimitive2D* getObjectInfoPrimitive2D() const { return mpObjectInfoPrimitive2D; }
-        };
-} // end of namespace drawinglayer::processor2d
+/** VclProcessor2D class
 
+    This processor is the base class for VCL-Based processors. It has no
+    processBasePrimitive2D implementation and thus is not usable directly.
+ */
+class VclProcessor2D : public BaseProcessor2D
+{
+protected:
+    // the destination OutDev
+    VclPtr<OutputDevice> mpOutputDevice;
+
+    // the modifiedColorPrimitive stack
+    basegfx::BColorModifierStack maBColorModifierStack;
+
+    // the current transformation. Since VCL pixel renderer transforms to pixels
+    // and VCL MetaFile renderer to World (logic) coordinates, the local
+    // ViewInformation2D cannot directly be used, but needs to be kept up to date
+    basegfx::B2DHomMatrix maCurrentTransformation;
+
+    // SvtOptionsDrawinglayer incarnation to react on diverse settings
+    const SvtOptionsDrawinglayer maDrawinglayerOpt;
+
+    // stack value (increment and decrement) to count how deep we are in
+    // PolygonStrokePrimitive2D's decompositions (normally only one)
+    sal_uInt32 mnPolygonStrokePrimitive2D;
+
+    // currently used ObjectInfoPrimitive2D
+    const primitive2d::ObjectInfoPrimitive2D* mpObjectInfoPrimitive2D;
+
+    // common VCL rendering support
+    void RenderTextSimpleOrDecoratedPortionPrimitive2D(
+        const primitive2d::TextSimplePortionPrimitive2D& rTextCandidate);
+    void RenderPolygonHairlinePrimitive2D(
+        const primitive2d::PolygonHairlinePrimitive2D& rPolygonCandidate, bool bPixelBased);
+    void RenderBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D& rBitmapCandidate);
+    void
+    RenderFillGraphicPrimitive2D(const primitive2d::FillGraphicPrimitive2D& rFillBitmapCandidate);
+    void RenderPolyPolygonGraphicPrimitive2D(
+        const primitive2d::PolyPolygonGraphicPrimitive2D& rPolygonCandidate);
+    void RenderMaskPrimitive2DPixel(const primitive2d::MaskPrimitive2D& rMaskCandidate);
+    void
+    RenderModifiedColorPrimitive2D(const primitive2d::ModifiedColorPrimitive2D& rModifiedCandidate);
+    void RenderUnifiedTransparencePrimitive2D(
+        const primitive2d::UnifiedTransparencePrimitive2D& rTransCandidate);
+    void RenderTransparencePrimitive2D(const primitive2d::TransparencePrimitive2D& rTransCandidate);
+    void RenderTransformPrimitive2D(const primitive2d::TransformPrimitive2D& rTransformCandidate);
+    void
+    RenderPagePreviewPrimitive2D(const primitive2d::PagePreviewPrimitive2D& rPagePreviewCandidate);
+    void
+    RenderMarkerArrayPrimitive2D(const primitive2d::MarkerArrayPrimitive2D& rMarkerArrayCandidate);
+    void
+    RenderPointArrayPrimitive2D(const primitive2d::PointArrayPrimitive2D& rPointArrayCandidate);
+    void RenderPolygonStrokePrimitive2D(
+        const primitive2d::PolygonStrokePrimitive2D& rPolygonStrokeCandidate);
+    void RenderEpsPrimitive2D(const primitive2d::EpsPrimitive2D& rEpsPrimitive2D);
+    void
+    RenderObjectInfoPrimitive2D(const primitive2d::ObjectInfoPrimitive2D& rObjectInfoPrimitive2D);
+    void RenderSvgLinearAtomPrimitive2D(const primitive2d::SvgLinearAtomPrimitive2D& rCandidate);
+    void RenderSvgRadialAtomPrimitive2D(const primitive2d::SvgRadialAtomPrimitive2D& rCandidate);
+
+    // DrawMode adaptation support
+    void adaptLineToFillDrawMode() const;
+    void adaptTextToFillDrawMode() const;
+
+public:
+    // constructor/destructor
+    VclProcessor2D(const geometry::ViewInformation2D& rViewInformation, OutputDevice& rOutDev);
+    virtual ~VclProcessor2D() override;
+
+    // access to Drawinglayer configuration options
+    const SvtOptionsDrawinglayer& getOptionsDrawinglayer() const { return maDrawinglayerOpt; }
+
+    // access to currently used ObjectInfoPrimitive2D
+    const primitive2d::ObjectInfoPrimitive2D* getObjectInfoPrimitive2D() const
+    {
+        return mpObjectInfoPrimitive2D;
+    }
+};
+} // end of namespace drawinglayer::processor2d
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 9c3867222c7a..d173ca45f44a 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -3759,7 +3759,6 @@ drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx
 drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
 drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
 drawinglayer/source/processor2d/vclprocessor2d.cxx
-drawinglayer/source/processor2d/vclprocessor2d.hxx
 drawinglayer/source/processor3d/baseprocessor3d.cxx
 drawinglayer/source/processor3d/cutfindprocessor3d.cxx
 drawinglayer/source/processor3d/defaultprocessor3d.cxx
commit 8e74c419c5fa1b4ec469508453b6a117313b140d
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sun Apr 12 13:05:17 2020 +0200
Commit:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Sun Apr 12 13:06:27 2020 +0200

    clean-up namespaces and pragma once for VclPixelProcessor2D
    
    Change-Id: I34fa0dc5cadbdfff8f70171715bc7cff462f7034

diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
index b1c7c47c2386..1ee765ab1e51 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
@@ -17,18 +17,14 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_DRAWINGLAYER_SOURCE_PROCESSOR2D_VCLPIXELPROCESSOR2D_HXX
-#define INCLUDED_DRAWINGLAYER_SOURCE_PROCESSOR2D_VCLPIXELPROCESSOR2D_HXX
+#pragma once
 
 #include "vclprocessor2d.hxx"
 #include <vcl/outdev.hxx>
 
 #include <memory>
 
-
-// predefines
-
-namespace drawinglayer { namespace primitive2d {
+namespace drawinglayer::primitive2d {
     class PolyPolygonColorPrimitive2D;
     class PolygonHairlinePrimitive2D;
     class PolygonStrokePrimitive2D;
@@ -42,12 +38,10 @@ namespace drawinglayer { namespace primitive2d {
     class FillHatchPrimitive2D;
     class BackgroundColorPrimitive2D;
     class BorderLinePrimitive2D;
-}}
+}
 
-namespace drawinglayer
+namespace drawinglayer::processor2d
 {
-    namespace processor2d
-    {
         /** VclPixelProcessor2D class
 
             This processor derived from VclProcessor2D is the base class for rendering
@@ -92,10 +86,7 @@ namespace drawinglayer
                 OutputDevice& rOutDev);
             virtual ~VclPixelProcessor2D() override;
         };
-    } // end of namespace processor2d
-} // end of namespace drawinglayer
-
+} // end of namespace drawinglayer::processor2d
 
-#endif // INCLUDED_DRAWINGLAYER_SOURCE_PROCESSOR2D_VCLPIXELPROCESSOR2D_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 725fdf692f954c7407793348cc4f5fb4c7aa681d
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sun Apr 12 13:04:55 2020 +0200
Commit:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Sun Apr 12 13:06:14 2020 +0200

    clean-up namespaces and pragma once for VclProcessor2D
    
    Change-Id: I9518a0bc6c30e0a544a52f1e996bfe8195e63cdf

diff --git a/drawinglayer/source/processor2d/vclprocessor2d.hxx b/drawinglayer/source/processor2d/vclprocessor2d.hxx
index 46b9682d1383..73cf8d5b1a8d 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.hxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_DRAWINGLAYER_SOURCE_PROCESSOR2D_VCLPROCESSOR2D_HXX
-#define INCLUDED_DRAWINGLAYER_SOURCE_PROCESSOR2D_VCLPROCESSOR2D_HXX
+#pragma once
 
 #include <drawinglayer/processor2d/baseprocessor2d.hxx>
 #include <basegfx/matrix/b2dhommatrix.hxx>
@@ -26,11 +25,9 @@
 #include <svtools/optionsdrawinglayer.hxx>
 #include <vcl/vclptr.hxx>
 
-
-// predefines
 class OutputDevice;
 
-namespace drawinglayer { namespace primitive2d {
+namespace drawinglayer::primitive2d {
     class TextSimplePortionPrimitive2D;
     class PolygonHairlinePrimitive2D;
     class BitmapPrimitive2D;
@@ -52,13 +49,10 @@ namespace drawinglayer { namespace primitive2d {
     class ObjectInfoPrimitive2D;
     class SvgLinearAtomPrimitive2D;
     class SvgRadialAtomPrimitive2D;
-}}
-
+}
 
-namespace drawinglayer
+namespace drawinglayer::processor2d
 {
-    namespace processor2d
-    {
         /** VclProcessor2D class
 
             This processor is the base class for VCL-Based processors. It has no
@@ -125,10 +119,7 @@ namespace drawinglayer
             // access to currently used ObjectInfoPrimitive2D
             const primitive2d::ObjectInfoPrimitive2D* getObjectInfoPrimitive2D() const { return mpObjectInfoPrimitive2D; }
         };
-    } // end of namespace processor2d
-} // end of namespace drawinglayer
-
+} // end of namespace drawinglayer::processor2d
 
-#endif // INCLUDED_DRAWINGLAYER_SOURCE_PROCESSOR2D_VCLPROCESSOR2D_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list