[Libreoffice-commits] core.git: 3 commits - drawinglayer/Library_drawinglayer.mk drawinglayer/source include/drawinglayer svx/source sw/source

Armin Le Grand alg at apache.org
Mon Jun 17 01:23:47 PDT 2013


 drawinglayer/Library_drawinglayer.mk                          |    1 
 drawinglayer/source/processor2d/processor2dtools.cxx          |   63 ++++
 drawinglayer/source/processor2d/processorfromoutputdevice.cxx |    4 
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx    |    4 
 drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx    |  151 ++++++++++
 drawinglayer/source/processor2d/vclpixelprocessor2d.cxx       |    2 
 drawinglayer/source/processor2d/vclpixelprocessor2d.hxx       |   63 ++++
 drawinglayer/source/processor2d/vclprocessor2d.cxx            |    2 
 drawinglayer/source/processor2d/vclprocessor2d.hxx            |  134 ++++++++
 drawinglayer/source/tools/converters.cxx                      |  112 ++++---
 include/drawinglayer/processor2d/processor2dtools.hxx         |   79 +++++
 include/drawinglayer/processor2d/vclmetafileprocessor2d.hxx   |  151 ----------
 include/drawinglayer/processor2d/vclpixelprocessor2d.hxx      |   63 ----
 include/drawinglayer/processor2d/vclprocessor2d.hxx           |  134 --------
 include/drawinglayer/processor3d/defaultprocessor3d.hxx       |    2 
 include/drawinglayer/processor3d/zbufferprocessor3d.hxx       |    2 
 svx/source/sdr/contact/objectcontactofobjlistpainter.cxx      |    9 
 svx/source/sdr/contact/objectcontactofpageview.cxx            |    7 
 svx/source/sdr/overlay/overlaymanager.cxx                     |   10 
 svx/source/sdr/overlay/overlayprimitive2dsequenceobject.cxx   |    2 
 svx/source/svdraw/svdedxv.cxx                                 |    6 
 sw/source/core/doc/notxtfrm.cxx                               |    6 
 22 files changed, 582 insertions(+), 425 deletions(-)

New commits:
commit 881b79dc21560bbdb6bf0e9b50061d1507e5e165
Author: Armin Le Grand <alg at apache.org>
Date:   Tue Apr 9 08:37:28 2013 +0000

    Resolves: #i113080# added test code, cleaned up a small inconsistency
    
    (cherry picked from commit d7fa73b25f75796291432496d9bb8d7c80e82c8b)
    
    Conflicts:
    	drawinglayer/source/tools/converters.cxx
    
    Change-Id: Ia8edda4ca2c79bfc9d4a0962f99d8db581622a7d

diff --git a/drawinglayer/source/tools/converters.cxx b/drawinglayer/source/tools/converters.cxx
index 7571201..76f37d5 100644
--- a/drawinglayer/source/tools/converters.cxx
+++ b/drawinglayer/source/tools/converters.cxx
@@ -44,6 +44,9 @@ namespace drawinglayer
             sal_uInt32 nMaxQuadratPixels)
         {
             BitmapEx aRetval;
+#ifdef DBG_UTIL
+            static bool bDoSaveForVisualControl(false);
+#endif
 
             if(rSeq.hasElements() && nDiscreteWidth && nDiscreteHeight)
             {
@@ -75,13 +78,14 @@ namespace drawinglayer
                 // prepare vdev
                 maContent.SetOutputSizePixel(aSizePixel, false);
                 maContent.SetMapMode(aMapModePixel);
-                maContent.SetAntialiasing(true);
 
                 // set to all white
                 maContent.SetBackground(Wallpaper(Color(COL_WHITE)));
                 maContent.Erase();
 
-                // create pixel processor
+                // create pixel processor, also already takes care of AAing and
+                // checking the getOptionsDrawinglayer().IsAntiAliasing() switch. If
+                // not wanted, change after this call as needed
                 processor2d::BaseProcessor2D* pContentProcessor = processor2d::createPixelProcessor2DFromOutputDevice(
                     maContent,
                     aViewInformation2D);
@@ -95,21 +99,29 @@ namespace drawinglayer
                     maContent.EnableMapMode(false);
                     const Bitmap aContent(maContent.GetBitmap(aEmptyPoint, aSizePixel));
 
+#ifdef DBG_UTIL
+                    if(bDoSaveForVisualControl)
+                    {
+                        SvFileStream aNew(OUString("c:\\test_content.png"), STREAM_WRITE|STREAM_TRUNC);
+                        ::vcl::PNGWriter aPNGWriter(aContent);
+                        aPNGWriter.Write(aNew);
+                    }
+#endif
                     // prepare for mask creation
                     maContent.SetMapMode(aMapModePixel);
-                    maContent.SetAntialiasing(true);
 
                     // set alpha to all white (fully transparent)
                     maContent.Erase();
 
                     // embed primitives to paint them black
+                    static basegfx::BColorModifyMode aMode = basegfx::BCOLORMODIFYMODE_REPLACE;
                     const primitive2d::Primitive2DReference xRef(
                         new primitive2d::ModifiedColorPrimitive2D(
                             aSequence,
                             basegfx::BColorModifier(
                                 basegfx::BColor(0.0, 0.0, 0.0),
                                 0.5,
-                                basegfx::BCOLORMODIFYMODE_REPLACE)));
+                                aMode)));
                     const primitive2d::Primitive2DSequence xSeq(&xRef, 1);
 
                     // render
@@ -118,22 +130,28 @@ namespace drawinglayer
 
                     // get alpha cahannel from vdev
                     maContent.EnableMapMode(false);
-                    const AlphaMask aAlphaMask(maContent.GetBitmap(aEmptyPoint, aSizePixel));
+                    const Bitmap aAlpha(maContent.GetBitmap(aEmptyPoint, aSizePixel));
+#ifdef DBG_UTIL
+                    if(bDoSaveForVisualControl)
+                    {
+                        SvFileStream aNew(OUString("c:\\test_alpha.png"), STREAM_WRITE|STREAM_TRUNC);
+                        ::vcl::PNGWriter aPNGWriter(aAlpha);
+                        aPNGWriter.Write(aNew);
+                    }
+#endif
 
                     // create BitmapEx result
-                    aRetval = BitmapEx(aContent, aAlphaMask);
-                }
-            }
-
+                    aRetval = BitmapEx(aContent, AlphaMask(aAlpha));
 #ifdef DBG_UTIL
-            static bool bDoSaveForVisualControl(false);
-            if(bDoSaveForVisualControl)
-            {
-                SvFileStream aNew(OUString("c:\\test.png"), STREAM_WRITE|STREAM_TRUNC);
-                ::vcl::PNGWriter aPNGWriter(aRetval);
-                aPNGWriter.Write(aNew);
-            }
+                    if(bDoSaveForVisualControl)
+                    {
+                        SvFileStream aNew(OUString("c:\\test_combined.png"), STREAM_WRITE|STREAM_TRUNC);
+                        ::vcl::PNGWriter aPNGWriter(aRetval);
+                        aPNGWriter.Write(aNew);
+                    }
 #endif
+                }
+            }
 
             return aRetval;
         }
commit 03427c780bd565a902cbb787b5fa2f4707382e27
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Jun 16 20:28:01 2013 +0100

    move now private headers to private location
    
    Change-Id: Ibc3a6d446dd2bd49af916cbe1ca88e173ae414cb

diff --git a/drawinglayer/source/processor2d/processor2dtools.cxx b/drawinglayer/source/processor2d/processor2dtools.cxx
index 041b311..12d9113 100644
--- a/drawinglayer/source/processor2d/processor2dtools.cxx
+++ b/drawinglayer/source/processor2d/processor2dtools.cxx
@@ -16,8 +16,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 #include <drawinglayer/processor2d/processor2dtools.hxx>
-#include <drawinglayer/processor2d/vclpixelprocessor2d.hxx>
-#include <drawinglayer/processor2d/vclmetafileprocessor2d.hxx>
+#include "vclpixelprocessor2d.hxx"
+#include "vclmetafileprocessor2d.hxx"
 
 //////////////////////////////////////////////////////////////////////////////
 
diff --git a/drawinglayer/source/processor2d/processorfromoutputdevice.cxx b/drawinglayer/source/processor2d/processorfromoutputdevice.cxx
index ac78488..dd2269c 100644
--- a/drawinglayer/source/processor2d/processorfromoutputdevice.cxx
+++ b/drawinglayer/source/processor2d/processorfromoutputdevice.cxx
@@ -24,8 +24,8 @@
 #include <vcl/gdimtf.hxx>
 #include <basegfx/tools/canvastools.hxx>
 #include <drawinglayer/processor2d/processorfromoutputdevice.hxx>
-#include <drawinglayer/processor2d/vclmetafileprocessor2d.hxx>
-#include <drawinglayer/processor2d/vclpixelprocessor2d.hxx>
+#include "vclmetafileprocessor2d.hxx"
+#include "vclpixelprocessor2d.hxx"
 #include <vcl/window.hxx>
 
 //////////////////////////////////////////////////////////////////////////////
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index e7c43b8..59080d3 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -17,7 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <drawinglayer/processor2d/vclmetafileprocessor2d.hxx>
+#include "vclmetafileprocessor2d.hxx"
 #include <tools/gen.hxx>
 #include <vcl/virdev.hxx>
 #include <vcl/gdimtf.hxx>
@@ -34,7 +34,7 @@
 #include <drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx>
 #include <drawinglayer/primitive2d/transparenceprimitive2d.hxx>
 #include <drawinglayer/primitive2d/fillgradientprimitive2d.hxx>
-#include <drawinglayer/processor2d/vclpixelprocessor2d.hxx>
+#include "vclpixelprocessor2d.hxx"
 #include <tools/stream.hxx>
 #include <drawinglayer/primitive2d/transformprimitive2d.hxx>
 #include <drawinglayer/primitive2d/markerarrayprimitive2d.hxx>
diff --git a/include/drawinglayer/processor2d/vclmetafileprocessor2d.hxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx
similarity index 99%
rename from include/drawinglayer/processor2d/vclmetafileprocessor2d.hxx
rename to drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx
index 84bfea4..6ddafe3 100644
--- a/include/drawinglayer/processor2d/vclmetafileprocessor2d.hxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx
@@ -22,7 +22,7 @@
 
 #include <drawinglayer/drawinglayerdllapi.h>
 
-#include <drawinglayer/processor2d/vclprocessor2d.hxx>
+#include "vclprocessor2d.hxx"
 #include <com/sun/star/i18n/XBreakIterator.hpp>
 #include <basegfx/polygon/b2dpolypolygon.hxx>
 
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index fcbd44c..a320d1a 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -17,7 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <drawinglayer/processor2d/vclpixelprocessor2d.hxx>
+#include "vclpixelprocessor2d.hxx"
 #include <vcl/outdev.hxx>
 #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
 #include <drawinglayer/primitive2d/textprimitive2d.hxx>
diff --git a/include/drawinglayer/processor2d/vclpixelprocessor2d.hxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
similarity index 97%
rename from include/drawinglayer/processor2d/vclpixelprocessor2d.hxx
rename to drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
index 778d218..4ef9813 100644
--- a/include/drawinglayer/processor2d/vclpixelprocessor2d.hxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
@@ -22,7 +22,7 @@
 
 #include <drawinglayer/drawinglayerdllapi.h>
 
-#include <drawinglayer/processor2d/vclprocessor2d.hxx>
+#include "vclprocessor2d.hxx"
 #include <vcl/outdev.hxx>
 
 //////////////////////////////////////////////////////////////////////////////
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index e125f46..d0fc7b3 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -18,7 +18,7 @@
  */
 
 #include <comphelper/string.hxx>
-#include <drawinglayer/processor2d/vclprocessor2d.hxx>
+#include "vclprocessor2d.hxx"
 #include <drawinglayer/primitive2d/textprimitive2d.hxx>
 #include <drawinglayer/primitive2d/textdecoratedprimitive2d.hxx>
 #include <tools/debug.hxx>
diff --git a/include/drawinglayer/processor2d/vclprocessor2d.hxx b/drawinglayer/source/processor2d/vclprocessor2d.hxx
similarity index 100%
rename from include/drawinglayer/processor2d/vclprocessor2d.hxx
rename to drawinglayer/source/processor2d/vclprocessor2d.hxx
commit d1310b7628a68fe13284818ba4a5d38eaef742c4
Author: Armin Le Grand <alg at apache.org>
Date:   Wed Jan 30 12:10:59 2013 +0000

    Related: #i121532# unified processor2d usages from other modules
    
    (cherry picked from commit f371f92c89d296207ef9a219518ba8caa481bcfe)
    
    Conflicts:
    	drawinglayer/Library_drawinglayer.mk
    	drawinglayer/Package_inc.mk
    	drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx
    	drawinglayer/inc/drawinglayer/processor2d/vclpixelprocessor2d.hxx
    	drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx
    	drawinglayer/inc/drawinglayer/processor3d/defaultprocessor3d.hxx
    	drawinglayer/inc/drawinglayer/processor3d/zbufferprocessor3d.hxx
    	drawinglayer/source/processor2d/processor2dtools.cxx
    	svx/Package_inc.mk
    	svx/source/sdr/contact/objectcontactofobjlistpainter.cxx
    	svx/source/sdr/contact/objectcontactofpageview.cxx
    	svx/source/sdr/overlay/overlaymanager.cxx
    	svx/source/sdr/overlay/overlayprimitive2dsequenceobject.cxx
    	svx/source/svdraw/svdedxv.cxx
    	sw/source/core/doc/notxtfrm.cxx
    
    Change-Id: Iea4a79133f4375cb0625b187eeb3d727b50ff0fe
    
    Related: #i121532# missing defaultprocessor3d.hxx breaks build
    
    Revision 1440387 changed defaultprocessor3d.hxx to be no longer "delivered".
    It is needed in svx by being included indirectly via cutfindprocessor3d.hxx.
    Fixing the build breaker by "delivering" the missing header file again.
    
    (cherry picked from commit 3bd3ea81c8d54109950b435225c3aac011d56c3d)
    
    Conflicts:
    	drawinglayer/Package_inc.mk
    
    Change-Id: If0dcea79cfff4cf20a1ca1af3d0a34f86eb2e24e
    
    Related: #i121532# removed include to no longer existing file
    
    (cherry picked from commit a4c602d9b5b17e220dbaa4dec2cef91d39945154)
    
    Conflicts:
    	sw/source/core/doc/notxtfrm.cxx
    
    Change-Id: I7dc2f99684fa285225dfdcfc7add553695b8412e

diff --git a/drawinglayer/Library_drawinglayer.mk b/drawinglayer/Library_drawinglayer.mk
index 308a948..4694cf1 100644
--- a/drawinglayer/Library_drawinglayer.mk
+++ b/drawinglayer/Library_drawinglayer.mk
@@ -134,6 +134,7 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\
     drawinglayer/source/primitive3d/textureprimitive3d \
     drawinglayer/source/primitive3d/transformprimitive3d \
     drawinglayer/source/processor2d/baseprocessor2d \
+	drawinglayer/source/processor2d/processor2dtools \
     drawinglayer/source/processor2d/contourextractor2d \
     drawinglayer/source/processor2d/getdigitlanguage \
     drawinglayer/source/processor2d/helperwrongspellrenderer \
diff --git a/drawinglayer/source/processor2d/processor2dtools.cxx b/drawinglayer/source/processor2d/processor2dtools.cxx
new file mode 100644
index 0000000..041b311
--- /dev/null
+++ b/drawinglayer/source/processor2d/processor2dtools.cxx
@@ -0,0 +1,63 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#include <drawinglayer/processor2d/processor2dtools.hxx>
+#include <drawinglayer/processor2d/vclpixelprocessor2d.hxx>
+#include <drawinglayer/processor2d/vclmetafileprocessor2d.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+using namespace com::sun::star;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+    namespace processor2d
+    {
+        BaseProcessor2D* createPixelProcessor2DFromOutputDevice(
+            OutputDevice& rTargetOutDev,
+            const drawinglayer::geometry::ViewInformation2D& rViewInformation2D)
+        {
+            // create Pixel Vcl-Processor
+            return new VclPixelProcessor2D(rViewInformation2D, rTargetOutDev);
+        }
+
+        BaseProcessor2D* createProcessor2DFromOutputDevice(
+            OutputDevice& rTargetOutDev,
+            const drawinglayer::geometry::ViewInformation2D& rViewInformation2D)
+        {
+            const GDIMetaFile* pMetaFile = rTargetOutDev.GetConnectMetaFile();
+            const bool bOutputToRecordingMetaFile(pMetaFile && pMetaFile->IsRecord() && !pMetaFile->IsPause());
+
+            if(bOutputToRecordingMetaFile)
+            {
+                // create MetaFile Vcl-Processor and process
+                return new VclMetafileProcessor2D(rViewInformation2D, rTargetOutDev);
+            }
+            else
+            {
+                // create Pixel Vcl-Processor
+                return createPixelProcessor2DFromOutputDevice(
+                    rTargetOutDev,
+                    rViewInformation2D);
+            }
+        }
+    } // end of namespace processor2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
diff --git a/drawinglayer/source/tools/converters.cxx b/drawinglayer/source/tools/converters.cxx
index 1bbbe43..7571201 100644
--- a/drawinglayer/source/tools/converters.cxx
+++ b/drawinglayer/source/tools/converters.cxx
@@ -19,10 +19,10 @@
 
 #include <drawinglayer/tools/converters.hxx>
 #include <drawinglayer/geometry/viewinformation2d.hxx>
-#include <drawinglayer/processor2d/vclpixelprocessor2d.hxx>
 #include <drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx>
 #include <basegfx/matrix/b2dhommatrixtools.hxx>
 #include <drawinglayer/primitive2d/transformprimitive2d.hxx>
+#include <drawinglayer/processor2d/processor2dtools.hxx>
 #include <vcl/virdev.hxx>
 
 #ifdef DBG_UTIL
@@ -36,7 +36,7 @@ namespace drawinglayer
 {
     namespace tools
     {
-        BitmapEx DRAWINGLAYER_DLLPUBLIC convertToBitmapEx(
+        BitmapEx convertToBitmapEx(
             const drawinglayer::primitive2d::Primitive2DSequence& rSeq,
             const geometry::ViewInformation2D& rViewInformation2D,
             sal_uInt32 nDiscreteWidth,
@@ -81,42 +81,48 @@ namespace drawinglayer
                 maContent.SetBackground(Wallpaper(Color(COL_WHITE)));
                 maContent.Erase();
 
-                // create processor
-                processor2d::VclPixelProcessor2D aContentProcessor(aViewInformation2D, maContent);
+                // create pixel processor
+                processor2d::BaseProcessor2D* pContentProcessor = processor2d::createPixelProcessor2DFromOutputDevice(
+                    maContent,
+                    aViewInformation2D);
 
-                // render content
-                aContentProcessor.process(aSequence);
-
-                // get content
-                maContent.EnableMapMode(false);
-                const Bitmap aContent(maContent.GetBitmap(aEmptyPoint, aSizePixel));
-
-                // prepare for mask creation
-                maContent.SetMapMode(aMapModePixel);
-                maContent.SetAntialiasing(true);
-
-                // set alpha to all white (fully transparent)
-                maContent.Erase();
-
-                // embed primitives to paint them black
-                const primitive2d::Primitive2DReference xRef(
-                    new primitive2d::ModifiedColorPrimitive2D(
-                        aSequence,
-                        basegfx::BColorModifier(
-                            basegfx::BColor(0.0, 0.0, 0.0),
-                            0.5,
-                            basegfx::BCOLORMODIFYMODE_REPLACE)));
-                const primitive2d::Primitive2DSequence xSeq(&xRef, 1);
-
-                // render
-                aContentProcessor.process(xSeq);
-
-                // get alpha cahannel from vdev
-                maContent.EnableMapMode(false);
-                const AlphaMask aAlphaMask(maContent.GetBitmap(aEmptyPoint, aSizePixel));
-
-                // create BitmapEx result
-                aRetval = BitmapEx(aContent, aAlphaMask);
+                if(pContentProcessor)
+                {
+                    // render content
+                    pContentProcessor->process(aSequence);
+
+                    // get content
+                    maContent.EnableMapMode(false);
+                    const Bitmap aContent(maContent.GetBitmap(aEmptyPoint, aSizePixel));
+
+                    // prepare for mask creation
+                    maContent.SetMapMode(aMapModePixel);
+                    maContent.SetAntialiasing(true);
+
+                    // set alpha to all white (fully transparent)
+                    maContent.Erase();
+
+                    // embed primitives to paint them black
+                    const primitive2d::Primitive2DReference xRef(
+                        new primitive2d::ModifiedColorPrimitive2D(
+                            aSequence,
+                            basegfx::BColorModifier(
+                                basegfx::BColor(0.0, 0.0, 0.0),
+                                0.5,
+                                basegfx::BCOLORMODIFYMODE_REPLACE)));
+                    const primitive2d::Primitive2DSequence xSeq(&xRef, 1);
+
+                    // render
+                    pContentProcessor->process(xSeq);
+                    delete pContentProcessor;
+
+                    // get alpha cahannel from vdev
+                    maContent.EnableMapMode(false);
+                    const AlphaMask aAlphaMask(maContent.GetBitmap(aEmptyPoint, aSizePixel));
+
+                    // create BitmapEx result
+                    aRetval = BitmapEx(aContent, aAlphaMask);
+                }
             }
 
 #ifdef DBG_UTIL
diff --git a/include/drawinglayer/processor2d/processor2dtools.hxx b/include/drawinglayer/processor2d/processor2dtools.hxx
new file mode 100644
index 0000000..31cb666
--- /dev/null
+++ b/include/drawinglayer/processor2d/processor2dtools.hxx
@@ -0,0 +1,79 @@
+/*
+ * 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 .
+ */
+#ifndef INCLUDED_DRAWINGLAYER_PROCESSOR2D_PROCESSOR2DTOOLS_HXX
+#define INCLUDED_DRAWINGLAYER_PROCESSOR2D_PROCESSOR2DTOOLS_HXX
+
+#include <drawinglayer/drawinglayerdllapi.h>
+#include <drawinglayer/processor2d/baseprocessor2d.hxx>
+#include <drawinglayer/geometry/viewinformation2d.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+
+class OutputDevice;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+    namespace processor2d
+    {
+        /** create the best available pixel based BaseProcessor2D
+            (which may be system-dependent)
+
+            @param rTargetOutDev
+            The target OutputDevice
+
+            @param rViewInformation2D
+            The ViewInformation to use
+
+            @return
+            the created BaseProcessor2D (ownership change) or null if
+            something went wrong
+        */
+        DRAWINGLAYER_DLLPUBLIC BaseProcessor2D* createPixelProcessor2DFromOutputDevice(
+            OutputDevice& rTargetOutDev,
+            const drawinglayer::geometry::ViewInformation2D& rViewInformation2D);
+
+        /** create a BaseProcessor2D dependent on some states of the
+            given OutputDevice. If metafile is recorded, the needed
+            VclMetafileProcessor2D will be created. If a pixel renderer
+            is requested, the best one is incarnated
+
+            @param rTargetOutDev
+            The target OutputDevice
+
+            @param rViewInformation2D
+            The ViewInformation to use
+
+            @return
+            the created BaseProcessor2D (ownership change) or null if
+            something went wrong
+        */
+        DRAWINGLAYER_DLLPUBLIC BaseProcessor2D* createProcessor2DFromOutputDevice(
+            OutputDevice& rTargetOutDev,
+            const drawinglayer::geometry::ViewInformation2D& rViewInformation2D);
+
+    } // end of namespace processor2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //INCLUDED_DRAWINGLAYER_PROCESSOR2D_PROCESSOR2DTOOLS_HXX
+
+// eof
diff --git a/include/drawinglayer/processor2d/vclmetafileprocessor2d.hxx b/include/drawinglayer/processor2d/vclmetafileprocessor2d.hxx
index fa85105..84bfea4 100644
--- a/include/drawinglayer/processor2d/vclmetafileprocessor2d.hxx
+++ b/include/drawinglayer/processor2d/vclmetafileprocessor2d.hxx
@@ -69,7 +69,7 @@ namespace drawinglayer
             and the extra-data added to it (which can be seen mostly as 'extensions'
             or simply as 'hacks').
          */
-        class DRAWINGLAYER_DLLPUBLIC VclMetafileProcessor2D : public VclProcessor2D
+        class VclMetafileProcessor2D : public VclProcessor2D
         {
         private:
             /// local helper(s)
diff --git a/include/drawinglayer/processor2d/vclpixelprocessor2d.hxx b/include/drawinglayer/processor2d/vclpixelprocessor2d.hxx
index c3003f0..778d218 100644
--- a/include/drawinglayer/processor2d/vclpixelprocessor2d.hxx
+++ b/include/drawinglayer/processor2d/vclpixelprocessor2d.hxx
@@ -37,7 +37,7 @@ namespace drawinglayer
             all feeded primitives to a VCL Window. It is the currently used renderer
             for all VCL editing output from the DrawingLayer.
          */
-        class DRAWINGLAYER_DLLPUBLIC VclPixelProcessor2D : public VclProcessor2D
+        class VclPixelProcessor2D : public VclProcessor2D
         {
         private:
         protected:
diff --git a/include/drawinglayer/processor2d/vclprocessor2d.hxx b/include/drawinglayer/processor2d/vclprocessor2d.hxx
index 2995b34..b8d984e 100644
--- a/include/drawinglayer/processor2d/vclprocessor2d.hxx
+++ b/include/drawinglayer/processor2d/vclprocessor2d.hxx
@@ -66,7 +66,7 @@ namespace drawinglayer
             This processor is the base class for VCL-Based processors. It has no
             processBasePrimitive2D implementation and thus is not usable directly.
          */
-        class DRAWINGLAYER_DLLPUBLIC VclProcessor2D : public BaseProcessor2D
+        class VclProcessor2D : public BaseProcessor2D
         {
         protected:
             // the destination OutDev
diff --git a/include/drawinglayer/processor3d/defaultprocessor3d.hxx b/include/drawinglayer/processor3d/defaultprocessor3d.hxx
index 010fba3..f227767 100644
--- a/include/drawinglayer/processor3d/defaultprocessor3d.hxx
+++ b/include/drawinglayer/processor3d/defaultprocessor3d.hxx
@@ -71,7 +71,7 @@ namespace drawinglayer
             rasterconvertB3DPolyPolygon for filled geometry is called. It is a beseclass to
             e.g. base a Z-Buffer supported renderer on the 3D primitive processing.
          */
-        class DRAWINGLAYER_DLLPUBLIC DefaultProcessor3D : public BaseProcessor3D
+        class DefaultProcessor3D : public BaseProcessor3D
         {
         protected:
             /// read-only scene infos (normal handling, etc...)
diff --git a/include/drawinglayer/processor3d/zbufferprocessor3d.hxx b/include/drawinglayer/processor3d/zbufferprocessor3d.hxx
index 8570809..fd05c08 100644
--- a/include/drawinglayer/processor3d/zbufferprocessor3d.hxx
+++ b/include/drawinglayer/processor3d/zbufferprocessor3d.hxx
@@ -58,7 +58,7 @@ namespace drawinglayer
             raster bitmap using a Z-Buffer based approach. It is able to supersample and to handle
             transparent content.
          */
-        class DRAWINGLAYER_DLLPUBLIC ZBufferProcessor3D : public DefaultProcessor3D
+        class ZBufferProcessor3D : public DefaultProcessor3D
         {
         private:
             /// the raster target, a Z-Buffer
diff --git a/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx b/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx
index def4dfe..28c4be5 100644
--- a/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx
+++ b/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx
@@ -24,9 +24,8 @@
 #include <svx/svdobj.hxx>
 #include <svx/sdr/contact/viewcontact.hxx>
 #include <svx/svdmodel.hxx>
-#include <drawinglayer/processor2d/vclprocessor2d.hxx>
 #include <basegfx/matrix/b2dhommatrix.hxx>
-#include <drawinglayer/processor2d/processorfromoutputdevice.hxx>
+#include <drawinglayer/processor2d/processor2dtools.hxx>
 #include <svx/unoapi.hxx>
 
 //////////////////////////////////////////////////////////////////////////////
@@ -128,9 +127,9 @@ namespace sdr
                     // if there is something to show, use a vclProcessor to render it
                     if(xPrimitiveSequence.hasElements())
                     {
-                        drawinglayer::processor2d::BaseProcessor2D* pProcessor2D =
-                            drawinglayer::processor2d::createBaseProcessor2DFromOutputDevice(
-                                *pTargetDevice, getViewInformation2D());
+                        drawinglayer::processor2d::BaseProcessor2D* pProcessor2D = drawinglayer::processor2d::createProcessor2DFromOutputDevice(
+                            *pTargetDevice,
+                            getViewInformation2D());
 
                         if(pProcessor2D)
                         {
diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx
index d53539f..bbc69ed 100644
--- a/svx/source/sdr/contact/objectcontactofpageview.cxx
+++ b/svx/source/sdr/contact/objectcontactofpageview.cxx
@@ -29,11 +29,10 @@
 #include <svx/sdr/event/eventhandler.hxx>
 #include <svx/sdrpagewindow.hxx>
 #include <svx/sdrpaintwindow.hxx>
-#include <drawinglayer/processor2d/vclprocessor2d.hxx>
 #include <basegfx/matrix/b2dhommatrix.hxx>
 #include <drawinglayer/primitive2d/transformprimitive2d.hxx>
-#include <drawinglayer/processor2d/processorfromoutputdevice.hxx>
 #include <com/sun/star/rendering/XSpriteCanvas.hpp>
+#include <drawinglayer/processor2d/processor2dtools.hxx>
 #include <svx/unoapi.hxx>
 
 //////////////////////////////////////////////////////////////////////////////
@@ -240,7 +239,7 @@ namespace sdr
 
             // if there is something to show, use a primitive processor to render it. There
             // is a choice between VCL and Canvas processors currently. The decision is made in
-            // createBaseProcessor2DFromOutputDevice and takes into accout things like the
+            // createProcessor2DFromOutputDevice and takes into accout things like the
             // Target is a MetaFile, a VDev or something else. The Canvas renderer is triggered
             // currently using the shown boolean. Canvas is not yet the default.
             if(xPrimitiveSequence.hasElements())
@@ -251,7 +250,7 @@ namespace sdr
 
                 // create renderer
                 drawinglayer::processor2d::BaseProcessor2D* pProcessor2D =
-                    drawinglayer::processor2d::createBaseProcessor2DFromOutputDevice(
+                    drawinglayer::processor2d::createProcessor2DFromOutputDevice(
                         rTargetOutDev, getViewInformation2D());
 
                 if(pProcessor2D)
diff --git a/svx/source/sdr/overlay/overlaymanager.cxx b/svx/source/sdr/overlay/overlaymanager.cxx
index d9a0ef4..2509d16 100644
--- a/svx/source/sdr/overlay/overlaymanager.cxx
+++ b/svx/source/sdr/overlay/overlaymanager.cxx
@@ -25,8 +25,7 @@
 #include <vcl/window.hxx>
 #include <svx/sdr/overlay/overlayobject.hxx>
 #include <basegfx/matrix/b2dhommatrix.hxx>
-#include <drawinglayer/processor2d/baseprocessor2d.hxx>
-#include <drawinglayer/processor2d/processorfromoutputdevice.hxx>
+#include <drawinglayer/processor2d/processor2dtools.hxx>
 
 //////////////////////////////////////////////////////////////////////////////
 
@@ -48,10 +47,9 @@ namespace sdr
                 const bool bIsAntiAliasing(getDrawinglayerOpt().IsAntiAliasing());
 
                 // create processor
-                drawinglayer::processor2d::BaseProcessor2D* pProcessor =
-                    ::drawinglayer::processor2d::createBaseProcessor2DFromOutputDevice(
-                        rDestinationDevice,
-                        getCurrentViewInformation2D());
+                drawinglayer::processor2d::BaseProcessor2D* pProcessor = drawinglayer::processor2d::createProcessor2DFromOutputDevice(
+                    rDestinationDevice,
+                    getCurrentViewInformation2D());
 
                 if(pProcessor)
                 {
diff --git a/svx/source/sdr/overlay/overlayprimitive2dsequenceobject.cxx b/svx/source/sdr/overlay/overlayprimitive2dsequenceobject.cxx
index 823eb74..33dcbc3 100644
--- a/svx/source/sdr/overlay/overlayprimitive2dsequenceobject.cxx
+++ b/svx/source/sdr/overlay/overlayprimitive2dsequenceobject.cxx
@@ -20,8 +20,6 @@
 
 #include <svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx>
 #include <drawinglayer/geometry/viewinformation2d.hxx>
-#include <drawinglayer/processor2d/vclpixelprocessor2d.hxx>
-#include <drawinglayer/processor2d/processorfromoutputdevice.hxx>
 #include <svx/sdr/overlay/overlaymanager.hxx>
 
 //////////////////////////////////////////////////////////////////////////////
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 492b0a7..150cc25 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -59,8 +59,7 @@
 #include <svx/sdrpaintwindow.hxx>
 #include <svx/sdrundomanager.hxx>
 #include <svx/sdr/overlay/overlaytools.hxx>
-#include <drawinglayer/processor2d/baseprocessor2d.hxx>
-#include <drawinglayer/processor2d/processorfromoutputdevice.hxx>
+#include <drawinglayer/processor2d/processor2dtools.hxx>
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////
 
@@ -343,8 +342,7 @@ void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectang
     {
         // completely reworked to use primitives; this ensures same look and functionality
         const drawinglayer::geometry::ViewInformation2D aViewInformation2D;
-
-        drawinglayer::processor2d::BaseProcessor2D* pProcessor = drawinglayer::processor2d::createBaseProcessor2DFromOutputDevice(
+        drawinglayer::processor2d::BaseProcessor2D* pProcessor = drawinglayer::processor2d::createProcessor2DFromOutputDevice(
             rTargetDevice,
             aViewInformation2D);
 
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 88eeedb..ee0565f 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -64,16 +64,14 @@
 #include <accessibilityoptions.hxx>
 #include <com/sun/star/embed/EmbedMisc.hpp>
 #include <com/sun/star/embed/EmbedStates.hpp>
-
 #include <svtools/embedhlp.hxx>
 #include <svx/charthelper.hxx>
 #include <dview.hxx> // #i99665#
-
 #include <basegfx/matrix/b2dhommatrix.hxx>
-#include <drawinglayer/processor2d/processorfromoutputdevice.hxx>
 #include <drawinglayer/processor2d/baseprocessor2d.hxx>
 #include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
 #include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <drawinglayer/processor2d/processor2dtools.hxx>
 
 using namespace com::sun::star;
 
@@ -762,7 +760,7 @@ bool paintUsingPrimitivesHelper(
 
             // get a primitive processor for rendering
             drawinglayer::processor2d::BaseProcessor2D* pProcessor2D =
-                drawinglayer::processor2d::createBaseProcessor2DFromOutputDevice(
+                drawinglayer::processor2d::createProcessor2DFromOutputDevice(
                                                 rOutputDevice, aViewInformation2D);
 
             if(pProcessor2D)


More information about the Libreoffice-commits mailing list