[Libreoffice-commits] core.git: 2 commits - drawinglayer/Library_drawinglayer.mk drawinglayer/source include/drawinglayer include/svx include/vcl sfx2/source svx/source vcl/source
Caolán McNamara
caolanm at redhat.com
Tue Jun 11 12:01:35 PDT 2013
drawinglayer/Library_drawinglayer.mk | 8
drawinglayer/source/attribute/fillbitmapattribute.cxx | 139 -
drawinglayer/source/attribute/fillgraphicattribute.cxx | 156 +
drawinglayer/source/attribute/sdrfillattribute.cxx | 22
drawinglayer/source/attribute/sdrfillbitmapattribute.cxx | 353 ---
drawinglayer/source/attribute/sdrfillgraphicattribute.cxx | 305 +++
drawinglayer/source/primitive2d/fillbitmapprimitive2d.cxx | 130 -
drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx | 139 +
drawinglayer/source/primitive2d/graphicprimitive2d.cxx | 301 ---
drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx | 322 +++
drawinglayer/source/primitive2d/metafileprimitive2d.cxx | 2
drawinglayer/source/primitive2d/patternfillprimitive2d.cxx | 3
drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx | 73
drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx | 27
drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx | 14
drawinglayer/source/primitive3d/textureprimitive3d.cxx | 6
drawinglayer/source/processor2d/canvasprocessor.cxx | 993 ----------
drawinglayer/source/processor2d/processorfromoutputdevice.cxx | 35
drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx | 73
drawinglayer/source/processor2d/vclpixelprocessor2d.cxx | 10
drawinglayer/source/processor2d/vclprocessor2d.cxx | 390 ++-
drawinglayer/source/processor3d/defaultprocessor3d.cxx | 34
drawinglayer/source/texture/texture.cxx | 129 -
drawinglayer/source/texture/texture3d.cxx | 217 +-
include/drawinglayer/attribute/fillgraphicattribute.hxx | 85
include/drawinglayer/attribute/sdrfillattribute.hxx | 6
include/drawinglayer/attribute/sdrfillbitmapattribute.hxx | 96
include/drawinglayer/attribute/sdrfillgraphicattribute.hxx | 96
include/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx | 4
include/drawinglayer/primitive2d/fillgraphicprimitive2d.hxx | 87
include/drawinglayer/primitive2d/graphicprimitivehelper2d.hxx | 54
include/drawinglayer/primitive2d/polypolygonprimitive2d.hxx | 18
include/drawinglayer/primitive3d/textureprimitive3d.hxx | 8
include/drawinglayer/processor2d/vclprocessor2d.hxx | 8
include/drawinglayer/texture/texture.hxx | 19
include/drawinglayer/texture/texture3d.hxx | 58
include/svx/sdr/primitive2d/sdrattributecreator.hxx | 4
include/vcl/graph.hxx | 8
sfx2/source/control/templatecontaineritem.cxx | 14
sfx2/source/control/templateviewitem.cxx | 14
sfx2/source/control/thumbnailview.cxx | 4
sfx2/source/control/thumbnailviewitem.cxx | 14
svx/source/sdr/contact/viewobjectcontact.cxx | 6
svx/source/sdr/primitive2d/sdrattributecreator.cxx | 69
svx/source/sdr/primitive2d/sdrdecompositiontools.cxx | 6
svx/source/xoutdev/xattrbmp.cxx | 6
vcl/source/gdi/impgraph.cxx | 6
47 files changed, 2084 insertions(+), 2487 deletions(-)
New commits:
commit 04c2e4f5836ee72a36da69846e5efe41a0dde83d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 11 17:27:41 2013 +0100
Related: #i121194# adapt template dialog code
we probably should remove the Bitmaps and use Graphics
exlusively, but for now do a simple brute force conversion
Change-Id: I0cdcb7d86f9304fd09f7e2c6aa7acdcec3785ae5
diff --git a/sfx2/source/control/templatecontaineritem.cxx b/sfx2/source/control/templatecontaineritem.cxx
index 3ee0d7c..c594bfd 100644
--- a/sfx2/source/control/templatecontaineritem.cxx
+++ b/sfx2/source/control/templatecontaineritem.cxx
@@ -12,8 +12,8 @@
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
-#include <drawinglayer/attribute/fillbitmapattribute.hxx>
-#include <drawinglayer/primitive2d/fillbitmapprimitive2d.hxx>
+#include <drawinglayer/attribute/fillgraphicattribute.hxx>
+#include <drawinglayer/primitive2d/fillgraphicprimitive2d.hxx>
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
@@ -21,6 +21,7 @@
#include <drawinglayer/processor2d/baseprocessor2d.hxx>
#include <sfx2/templateviewitem.hxx>
#include <vcl/button.hxx>
+#include <vcl/graph.hxx>
using namespace basegfx;
using namespace basegfx::tools;
@@ -138,11 +139,12 @@ void TemplateContainerItem::Paint (drawinglayer::processor2d::BaseProcessor2D *p
aSeq[nCount++] = Primitive2DReference( new PolyPolygonColorPrimitive2D(
B2DPolyPolygon(aBounds), Color(COL_WHITE).getBColor()));
- aSeq[nCount++] = Primitive2DReference( new FillBitmapPrimitive2D(
+ aSeq[nCount++] = Primitive2DReference( new FillGraphicPrimitive2D(
createScaleTranslateB2DHomMatrix(1.0,1.0,fPosX,fPosY),
- FillBitmapAttribute(*pImage,
- B2DPoint(0.0,0.0),
- B2DVector(aImageSize.Width(),aImageSize.Height()),
+ FillGraphicAttribute(Graphic(*pImage),
+ B2DRange(
+ B2DPoint(0.0,0.0),
+ B2DPoint(aImageSize.Width(),aImageSize.Height())),
false)
));
diff --git a/sfx2/source/control/templateviewitem.cxx b/sfx2/source/control/templateviewitem.cxx
index 4626676..78ea791 100644
--- a/sfx2/source/control/templateviewitem.cxx
+++ b/sfx2/source/control/templateviewitem.cxx
@@ -11,14 +11,15 @@
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
-#include <drawinglayer/attribute/fillbitmapattribute.hxx>
-#include <drawinglayer/primitive2d/fillbitmapprimitive2d.hxx>
+#include <drawinglayer/attribute/fillgraphicattribute.hxx>
+#include <drawinglayer/primitive2d/fillgraphicprimitive2d.hxx>
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
#include <drawinglayer/primitive2d/textprimitive2d.hxx>
#include <drawinglayer/processor2d/baseprocessor2d.hxx>
#include <vcl/button.hxx>
+#include <vcl/graph.hxx>
#define SUBTITLE_SCALE_FACTOR 0.85
@@ -96,11 +97,12 @@ void TemplateViewItem::Paint(drawinglayer::processor2d::BaseProcessor2D *pProces
aSeq[1] = Primitive2DReference( new PolyPolygonColorPrimitive2D(
B2DPolyPolygon(aBounds), Color(COL_WHITE).getBColor()));
- aSeq[2] = Primitive2DReference( new FillBitmapPrimitive2D(
+ aSeq[2] = Primitive2DReference( new FillGraphicPrimitive2D(
createTranslateB2DHomMatrix(maPrev1Pos.X(),maPrev1Pos.Y()),
- FillBitmapAttribute(maPreview1,
- B2DPoint(0,0),
- B2DVector(aImageSize.Width(),aImageSize.Height()),
+ FillGraphicAttribute(Graphic(maPreview1),
+ B2DRange(
+ B2DPoint(0,0),
+ B2DPoint(aImageSize.Width(),aImageSize.Height())),
false)
));
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index ea91ee2..ca75d10 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -20,9 +20,9 @@
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/vector/b2dsize.hxx>
#include <basegfx/vector/b2dvector.hxx>
-#include <drawinglayer/attribute/fillbitmapattribute.hxx>
+#include <drawinglayer/attribute/fillgraphicattribute.hxx>
#include <drawinglayer/attribute/fontattribute.hxx>
-#include <drawinglayer/primitive2d/fillbitmapprimitive2d.hxx>
+#include <drawinglayer/primitive2d/fillgraphicprimitive2d.hxx>
#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
#include <drawinglayer/primitive2d/textprimitive2d.hxx>
diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx
index 4dac397..34981ec 100644
--- a/sfx2/source/control/thumbnailviewitem.cxx
+++ b/sfx2/source/control/thumbnailviewitem.cxx
@@ -26,14 +26,15 @@
#include <basegfx/range/b2drectangle.hxx>
#include <basegfx/vector/b2dsize.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
-#include <drawinglayer/attribute/fillbitmapattribute.hxx>
-#include <drawinglayer/primitive2d/fillbitmapprimitive2d.hxx>
+#include <drawinglayer/attribute/fillgraphicattribute.hxx>
+#include <drawinglayer/primitive2d/fillgraphicprimitive2d.hxx>
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
#include <drawinglayer/primitive2d/textprimitive2d.hxx>
#include <drawinglayer/processor2d/baseprocessor2d.hxx>
#include <vcl/button.hxx>
+#include <vcl/graph.hxx>
#include <vcl/svapp.hxx>
#include <vcl/texteng.hxx>
@@ -258,11 +259,12 @@ void ThumbnailViewItem::Paint (drawinglayer::processor2d::BaseProcessor2D *pProc
Point aPos = maPrev1Pos;
Size aImageSize = maPreview1.GetSizePixel();
- aSeq[nPrimitive++] = Primitive2DReference( new FillBitmapPrimitive2D(
+ aSeq[nPrimitive++] = Primitive2DReference( new FillGraphicPrimitive2D(
createTranslateB2DHomMatrix(aPos.X(),aPos.Y()),
- FillBitmapAttribute(maPreview1,
- B2DPoint(0,0),
- B2DVector(aImageSize.Width(),aImageSize.Height()),
+ FillGraphicAttribute(Graphic(maPreview1),
+ B2DRange(
+ B2DPoint(0,0),
+ B2DPoint(aImageSize.Width(),aImageSize.Height())),
false)
));
commit 37aa7d81aacaae12dfe0fd2ade2779235bbf72f1
Author: Armin Le Grand <alg at apache.org>
Date: Tue Oct 16 08:44:02 2012 +0000
Resolves: #i121194# Better support for graphic fill styles...
which are not bitmaps (svg, metafiles, ..)
(cherry picked from commit 7a652a2b2ab5e0d37e32185c8c5fac3af482bb76)
Conflicts:
drawinglayer/Library_drawinglayer.mk
drawinglayer/Package_inc.mk
drawinglayer/inc/drawinglayer/attribute/fillgraphicattribute.hxx
drawinglayer/inc/drawinglayer/attribute/sdrfillattribute.hxx
drawinglayer/inc/drawinglayer/attribute/sdrfillgraphicattribute.hxx
drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx
drawinglayer/inc/drawinglayer/primitive2d/fillgraphicprimitive2d.hxx
drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx
drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx
drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx
drawinglayer/inc/drawinglayer/texture/texture.hxx
drawinglayer/inc/drawinglayer/texture/texture3d.hxx
drawinglayer/source/attribute/fillbitmapattribute.cxx
drawinglayer/source/attribute/sdrfillattribute.cxx
drawinglayer/source/attribute/sdrfillgraphicattribute.cxx
drawinglayer/source/primitive2d/fillbitmapprimitive2d.cxx
drawinglayer/source/primitive2d/graphicprimitive2d.cxx
drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx
drawinglayer/source/processor2d/canvasprocessor.cxx
svx/inc/svx/sdr/primitive2d/sdrattributecreator.hxx
svx/source/sdr/contact/objectcontacttools.cxx
vcl/inc/vcl/graph.hxx
unused file _vclmetafileprocessor2d.cxx deleted, was added by error
(cherry picked from commit ed0d53f8283cd3ce579a90b599118884d0db6119)
Conflicts:
drawinglayer/source/processor2d/_vclmetafileprocessor2d.cxx
Corrected canvasProcessor usage
(cherry picked from commit 7903c33f31c457eb6ff506958c4233f2a5d39bcf)
Conflicts:
svx/source/sdr/contact/objectcontacttools.cxx
Change-Id: I80008050b98dafc92fde043524843c13a75fe22c
d2fa667d7c127b4d735334e56093d1d4553b0a5b
e20c60c7d6472da1295a162d9a629be998861f62
diff --git a/drawinglayer/Library_drawinglayer.mk b/drawinglayer/Library_drawinglayer.mk
index 96e61de..93014a8 100644
--- a/drawinglayer/Library_drawinglayer.mk
+++ b/drawinglayer/Library_drawinglayer.mk
@@ -41,7 +41,7 @@ $(eval $(call gb_Library_use_libraries,drawinglayer,\
$(eval $(call gb_Library_add_exception_objects,drawinglayer,\
drawinglayer/source/animation/animationtiming \
- drawinglayer/source/attribute/fillbitmapattribute \
+ drawinglayer/source/attribute/fillgraphicattribute \
drawinglayer/source/attribute/fillgradientattribute \
drawinglayer/source/attribute/fillhatchattribute \
drawinglayer/source/attribute/fontattribute \
@@ -50,7 +50,7 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\
drawinglayer/source/attribute/materialattribute3d \
drawinglayer/source/attribute/sdrallattribute3d \
drawinglayer/source/attribute/sdrfillattribute \
- drawinglayer/source/attribute/sdrfillbitmapattribute \
+ drawinglayer/source/attribute/sdrfillgraphicattribute \
drawinglayer/source/attribute/sdrlightattribute3d \
drawinglayer/source/attribute/sdrlightingattribute3d \
drawinglayer/source/attribute/sdrlineattribute \
@@ -73,9 +73,10 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\
drawinglayer/source/primitive2d/discreteshadowprimitive2d \
drawinglayer/source/primitive2d/embedded3dprimitive2d \
drawinglayer/source/primitive2d/epsprimitive2d \
- drawinglayer/source/primitive2d/fillbitmapprimitive2d \
+ drawinglayer/source/primitive2d/fillgraphicprimitive2d \
drawinglayer/source/primitive2d/fillgradientprimitive2d \
drawinglayer/source/primitive2d/fillhatchprimitive2d \
+ drawinglayer/source/primitive2d/graphicprimitivehelper2d \
drawinglayer/source/primitive2d/graphicprimitive2d \
drawinglayer/source/primitive2d/gridprimitive2d \
drawinglayer/source/primitive2d/groupprimitive2d \
@@ -133,7 +134,6 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\
drawinglayer/source/primitive3d/textureprimitive3d \
drawinglayer/source/primitive3d/transformprimitive3d \
drawinglayer/source/processor2d/baseprocessor2d \
- drawinglayer/source/processor2d/canvasprocessor \
drawinglayer/source/processor2d/contourextractor2d \
drawinglayer/source/processor2d/getdigitlanguage \
drawinglayer/source/processor2d/helperwrongspellrenderer \
diff --git a/drawinglayer/source/attribute/fillbitmapattribute.cxx b/drawinglayer/source/attribute/fillbitmapattribute.cxx
deleted file mode 100644
index e2bedb4..0000000
--- a/drawinglayer/source/attribute/fillbitmapattribute.cxx
+++ /dev/null
@@ -1,139 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <drawinglayer/attribute/fillbitmapattribute.hxx>
-#include <vcl/bitmapex.hxx>
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace drawinglayer
-{
- namespace attribute
- {
- class ImpFillBitmapAttribute
- {
- public:
- // data definitions
- BitmapEx maBitmapEx;
- basegfx::B2DPoint maTopLeft;
- basegfx::B2DVector maSize;
-
- // bitfield
- unsigned mbTiling : 1;
-
- ImpFillBitmapAttribute(
- const BitmapEx& rBitmapEx,
- const basegfx::B2DPoint& rTopLeft,
- const basegfx::B2DVector& rSize,
- bool bTiling)
- : maBitmapEx(rBitmapEx),
- maTopLeft(rTopLeft),
- maSize(rSize),
- mbTiling(bTiling)
- {
- }
-
- ImpFillBitmapAttribute()
- : maBitmapEx(BitmapEx()),
- maTopLeft(basegfx::B2DPoint()),
- maSize(basegfx::B2DVector()),
- mbTiling(false)
- {
- }
-
- bool operator==(const ImpFillBitmapAttribute& rCandidate) const
- {
- return (maBitmapEx == rCandidate.maBitmapEx
- && maTopLeft == rCandidate.maTopLeft
- && maSize == rCandidate.maSize
- && mbTiling == rCandidate.mbTiling);
- }
-
- // data read access
- const BitmapEx& getBitmapEx() const { return maBitmapEx; }
- const basegfx::B2DPoint& getTopLeft() const { return maTopLeft; }
- const basegfx::B2DVector& getSize() const { return maSize; }
- bool getTiling() const { return mbTiling; }
- };
-
- namespace
- {
- struct theGlobalDefault :
- public rtl::Static< FillBitmapAttribute::ImplType, theGlobalDefault > {};
- }
-
- FillBitmapAttribute::FillBitmapAttribute(
- const BitmapEx& rBitmapEx,
- const basegfx::B2DPoint& rTopLeft,
- const basegfx::B2DVector& rSize,
- bool bTiling)
- : mpFillBitmapAttribute(ImpFillBitmapAttribute(
- rBitmapEx, rTopLeft, rSize, bTiling))
- {
- }
-
- FillBitmapAttribute::FillBitmapAttribute(const FillBitmapAttribute& rCandidate)
- : mpFillBitmapAttribute(rCandidate.mpFillBitmapAttribute)
- {
- }
-
- FillBitmapAttribute::~FillBitmapAttribute()
- {
- }
-
- bool FillBitmapAttribute::isDefault() const
- {
- return mpFillBitmapAttribute.same_object(theGlobalDefault::get());
- }
-
- FillBitmapAttribute& FillBitmapAttribute::operator=(const FillBitmapAttribute& rCandidate)
- {
- mpFillBitmapAttribute = rCandidate.mpFillBitmapAttribute;
- return *this;
- }
-
- bool FillBitmapAttribute::operator==(const FillBitmapAttribute& rCandidate) const
- {
- return rCandidate.mpFillBitmapAttribute == mpFillBitmapAttribute;
- }
-
- const BitmapEx& FillBitmapAttribute::getBitmapEx() const
- {
- return mpFillBitmapAttribute->getBitmapEx();
- }
-
- const basegfx::B2DPoint& FillBitmapAttribute::getTopLeft() const
- {
- return mpFillBitmapAttribute->getTopLeft();
- }
-
- const basegfx::B2DVector& FillBitmapAttribute::getSize() const
- {
- return mpFillBitmapAttribute->getSize();
- }
-
- bool FillBitmapAttribute::getTiling() const
- {
- return mpFillBitmapAttribute->getTiling();
- }
-
- } // end of namespace attribute
-} // end of namespace drawinglayer
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/drawinglayer/source/attribute/fillgraphicattribute.cxx b/drawinglayer/source/attribute/fillgraphicattribute.cxx
new file mode 100644
index 0000000..f92b06d
--- /dev/null
+++ b/drawinglayer/source/attribute/fillgraphicattribute.cxx
@@ -0,0 +1,156 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawinglayer/attribute/fillgraphicattribute.hxx>
+#include <vcl/graph.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace attribute
+ {
+ class ImpFillGraphicAttribute
+ {
+ public:
+ // data definitions
+ Graphic maGraphic;
+ basegfx::B2DRange maGraphicRange;
+
+ // bitfield
+ unsigned mbTiling : 1;
+
+ // tiling definitions, offsets in X/Y in percent for each 2nd row.
+ // If both are set, Y is ignored (X has precedence)
+ double mfOffsetX;
+ double mfOffsetY;
+
+ ImpFillGraphicAttribute(
+ const Graphic& rGraphic,
+ const basegfx::B2DRange& rGraphicRange,
+ bool bTiling,
+ double fOffsetX,
+ double fOffsetY)
+ : maGraphic(rGraphic),
+ maGraphicRange(rGraphicRange),
+ mbTiling(bTiling),
+ mfOffsetX(fOffsetX),
+ mfOffsetY(fOffsetY)
+ {
+ }
+
+ ImpFillGraphicAttribute()
+ : maGraphic(Graphic()),
+ maGraphicRange(basegfx::B2DRange()),
+ mbTiling(false),
+ mfOffsetX(0.0),
+ mfOffsetY(0.0)
+ {
+ }
+
+ // data read access
+ const Graphic& getGraphic() const { return maGraphic; }
+ const basegfx::B2DRange& getGraphicRange() const { return maGraphicRange; }
+ bool getTiling() const { return mbTiling; }
+ double getOffsetX() const { return mfOffsetX; }
+ double getOffsetY() const { return mfOffsetY; }
+
+ bool operator==(const ImpFillGraphicAttribute& rCandidate) const
+ {
+ return (getGraphic() == rCandidate.getGraphic()
+ && getGraphicRange() == rCandidate.getGraphicRange()
+ && getTiling() == rCandidate.getTiling()
+ && getOffsetX() == rCandidate.getOffsetX()
+ && getOffsetY() == rCandidate.getOffsetY());
+ }
+ };
+
+ namespace
+ {
+ struct theGlobalDefault :
+ public rtl::Static< FillGraphicAttribute::ImplType, theGlobalDefault > {};
+ }
+
+ FillGraphicAttribute::FillGraphicAttribute(
+ const Graphic& rGraphic,
+ const basegfx::B2DRange& rGraphicRange,
+ bool bTiling,
+ double fOffsetX,
+ double fOffsetY)
+ : mpFillGraphicAttribute(ImpFillGraphicAttribute(
+ rGraphic, rGraphicRange, bTiling,
+ basegfx::clamp(fOffsetX, 0.0, 1.0),
+ basegfx::clamp(fOffsetY, 0.0, 1.0)))
+ {
+ }
+
+ FillGraphicAttribute::FillGraphicAttribute(const FillGraphicAttribute& rCandidate)
+ : mpFillGraphicAttribute(rCandidate.mpFillGraphicAttribute)
+ {
+ }
+
+ FillGraphicAttribute::~FillGraphicAttribute()
+ {
+ }
+
+ bool FillGraphicAttribute::isDefault() const
+ {
+ return mpFillGraphicAttribute.same_object(theGlobalDefault::get());
+ }
+
+ FillGraphicAttribute& FillGraphicAttribute::operator=(const FillGraphicAttribute& rCandidate)
+ {
+ mpFillGraphicAttribute = rCandidate.mpFillGraphicAttribute;
+ return *this;
+ }
+
+ bool FillGraphicAttribute::operator==(const FillGraphicAttribute& rCandidate) const
+ {
+ return rCandidate.mpFillGraphicAttribute == mpFillGraphicAttribute;
+ }
+
+ const Graphic& FillGraphicAttribute::getGraphic() const
+ {
+ return mpFillGraphicAttribute->getGraphic();
+ }
+
+ const basegfx::B2DRange& FillGraphicAttribute::getGraphicRange() const
+ {
+ return mpFillGraphicAttribute->getGraphicRange();
+ }
+
+ bool FillGraphicAttribute::getTiling() const
+ {
+ return mpFillGraphicAttribute->getTiling();
+ }
+
+ double FillGraphicAttribute::getOffsetX() const
+ {
+ return mpFillGraphicAttribute->getOffsetX();
+ }
+
+ double FillGraphicAttribute::getOffsetY() const
+ {
+ return mpFillGraphicAttribute->getOffsetY();
+ }
+
+ } // end of namespace attribute
+} // end of namespace drawinglayer
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/drawinglayer/source/attribute/sdrfillattribute.cxx b/drawinglayer/source/attribute/sdrfillattribute.cxx
index 98c6450..f6e07fb 100644
--- a/drawinglayer/source/attribute/sdrfillattribute.cxx
+++ b/drawinglayer/source/attribute/sdrfillattribute.cxx
@@ -19,7 +19,7 @@
#include <drawinglayer/attribute/sdrfillattribute.hxx>
#include <basegfx/color/bcolor.hxx>
-#include <drawinglayer/attribute/sdrfillbitmapattribute.hxx>
+#include <drawinglayer/attribute/sdrfillgraphicattribute.hxx>
#include <drawinglayer/attribute/fillhatchattribute.hxx>
#include <drawinglayer/attribute/fillgradientattribute.hxx>
#include <rtl/instance.hxx>
@@ -38,7 +38,7 @@ namespace drawinglayer
basegfx::BColor maColor; // fill color
FillGradientAttribute maGradient; // fill gradient (if used)
FillHatchAttribute maHatch; // fill hatch (if used)
- SdrFillBitmapAttribute maBitmap; // fill bitmap (if used)
+ SdrFillGraphicAttribute maFillGraphic; // fill graphic (if used)
public:
ImpSdrFillAttribute(
@@ -46,12 +46,12 @@ namespace drawinglayer
const basegfx::BColor& rColor,
const FillGradientAttribute& rGradient,
const FillHatchAttribute& rHatch,
- const SdrFillBitmapAttribute& rBitmap)
+ const SdrFillGraphicAttribute& rFillGraphic)
: mfTransparence(fTransparence),
maColor(rColor),
maGradient(rGradient),
maHatch(rHatch),
- maBitmap(rBitmap)
+ maFillGraphic(rFillGraphic)
{
}
@@ -60,7 +60,7 @@ namespace drawinglayer
maColor(basegfx::BColor()),
maGradient(FillGradientAttribute()),
maHatch(FillHatchAttribute()),
- maBitmap(SdrFillBitmapAttribute())
+ maFillGraphic(SdrFillGraphicAttribute())
{
}
@@ -69,7 +69,7 @@ namespace drawinglayer
const basegfx::BColor& getColor() const { return maColor; }
const FillGradientAttribute& getGradient() const { return maGradient; }
const FillHatchAttribute& getHatch() const { return maHatch; }
- const SdrFillBitmapAttribute& getBitmap() const { return maBitmap; }
+ const SdrFillGraphicAttribute& getFillGraphic() const { return maFillGraphic; }
// compare operator
bool operator==(const ImpSdrFillAttribute& rCandidate) const
@@ -78,7 +78,7 @@ namespace drawinglayer
&& getColor() == rCandidate.getColor()
&& getGradient() == rCandidate.getGradient()
&& getHatch() == rCandidate.getHatch()
- && getBitmap() == rCandidate.getBitmap());
+ && getFillGraphic() == rCandidate.getFillGraphic());
}
};
@@ -93,9 +93,9 @@ namespace drawinglayer
const basegfx::BColor& rColor,
const FillGradientAttribute& rGradient,
const FillHatchAttribute& rHatch,
- const SdrFillBitmapAttribute& rBitmap)
+ const SdrFillGraphicAttribute& rFillGraphic)
: mpSdrFillAttribute(ImpSdrFillAttribute(
- fTransparence, rColor, rGradient, rHatch, rBitmap))
+ fTransparence, rColor, rGradient, rHatch, rFillGraphic))
{
}
@@ -149,9 +149,9 @@ namespace drawinglayer
return mpSdrFillAttribute->getHatch();
}
- const SdrFillBitmapAttribute& SdrFillAttribute::getBitmap() const
+ const SdrFillGraphicAttribute& SdrFillAttribute::getFillGraphic() const
{
- return mpSdrFillAttribute->getBitmap();
+ return mpSdrFillAttribute->getFillGraphic();
}
} // end of namespace attribute
} // end of namespace drawinglayer
diff --git a/drawinglayer/source/attribute/sdrfillbitmapattribute.cxx b/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx
old mode 100644
new mode 100755
similarity index 57%
rename from drawinglayer/source/attribute/sdrfillbitmapattribute.cxx
rename to drawinglayer/source/attribute/sdrfillgraphicattribute.cxx
index b21566f..0b1af9c
--- a/drawinglayer/source/attribute/sdrfillbitmapattribute.cxx
+++ b/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx
@@ -17,10 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <drawinglayer/attribute/sdrfillbitmapattribute.hxx>
-#include <drawinglayer/attribute/fillbitmapattribute.hxx>
+#include <drawinglayer/attribute/sdrfillgraphicattribute.hxx>
+#include <drawinglayer/attribute/fillgraphicattribute.hxx>
#include <rtl/instance.hxx>
-#include <vcl/bitmapex.hxx>
+#include <vcl/graph.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -28,11 +28,11 @@ namespace drawinglayer
{
namespace attribute
{
- class ImpSdrFillBitmapAttribute
+ class ImpSdrFillGraphicAttribute
{
public:
// data definitions
- BitmapEx maBitmapEx;
+ Graphic maFillGraphic;
basegfx::B2DVector maSize;
basegfx::B2DVector maOffset;
basegfx::B2DVector maOffsetPosition;
@@ -43,8 +43,8 @@ namespace drawinglayer
unsigned mbStretch : 1;
unsigned mbLogSize : 1;
- ImpSdrFillBitmapAttribute(
- const BitmapEx& rBitmapEx,
+ ImpSdrFillGraphicAttribute(
+ const Graphic& rFillGraphic,
const basegfx::B2DVector& rSize,
const basegfx::B2DVector& rOffset,
const basegfx::B2DVector& rOffsetPosition,
@@ -52,7 +52,7 @@ namespace drawinglayer
bool bTiling,
bool bStretch,
bool bLogSize)
- : maBitmapEx(rBitmapEx),
+ : maFillGraphic(rFillGraphic),
maSize(rSize),
maOffset(rOffset),
maOffsetPosition(rOffsetPosition),
@@ -63,8 +63,8 @@ namespace drawinglayer
{
}
- ImpSdrFillBitmapAttribute()
- : maBitmapEx(BitmapEx()),
+ ImpSdrFillGraphicAttribute()
+ : maFillGraphic(Graphic()),
maSize(basegfx::B2DVector()),
maOffset(basegfx::B2DVector()),
maOffsetPosition(basegfx::B2DVector()),
@@ -76,7 +76,7 @@ namespace drawinglayer
}
// data read access
- const BitmapEx& getBitmapEx() const { return maBitmapEx; }
+ const Graphic& getFillGraphic() const { return maFillGraphic; }
const basegfx::B2DVector& getSize() const { return maSize; }
const basegfx::B2DVector& getOffset() const { return maOffset; }
const basegfx::B2DVector& getOffsetPosition() const { return maOffsetPosition; }
@@ -85,9 +85,9 @@ namespace drawinglayer
bool getStretch() const { return mbStretch; }
bool getLogSize() const { return mbLogSize; }
- bool operator==(const ImpSdrFillBitmapAttribute& rCandidate) const
+ bool operator==(const ImpSdrFillGraphicAttribute& rCandidate) const
{
- return (getBitmapEx() == rCandidate.getBitmapEx()
+ return (getFillGraphic() == rCandidate.getFillGraphic()
&& getSize() == rCandidate.getSize()
&& getOffset() == rCandidate.getOffset()
&& getOffsetPosition() == rCandidate.getOffsetPosition()
@@ -101,11 +101,11 @@ namespace drawinglayer
namespace
{
struct theGlobalDefault :
- public rtl::Static< SdrFillBitmapAttribute::ImplType, theGlobalDefault > {};
+ public rtl::Static< SdrFillGraphicAttribute::ImplType, theGlobalDefault > {};
}
- SdrFillBitmapAttribute::SdrFillBitmapAttribute(
- const BitmapEx& rBitmapEx,
+ SdrFillGraphicAttribute::SdrFillGraphicAttribute(
+ const Graphic& rFillGraphic,
const basegfx::B2DVector& rSize,
const basegfx::B2DVector& rOffset,
const basegfx::B2DVector& rOffsetPosition,
@@ -113,9 +113,9 @@ namespace drawinglayer
bool bTiling,
bool bStretch,
bool bLogSize)
- : mpSdrFillBitmapAttribute(
- ImpSdrFillBitmapAttribute(
- rBitmapEx,
+ : mpSdrFillGraphicAttribute(
+ ImpSdrFillGraphicAttribute(
+ rFillGraphic,
rSize,
rOffset,
rOffsetPosition,
@@ -126,134 +126,87 @@ namespace drawinglayer
{
}
- SdrFillBitmapAttribute::SdrFillBitmapAttribute()
- : mpSdrFillBitmapAttribute(theGlobalDefault::get())
+ SdrFillGraphicAttribute::SdrFillGraphicAttribute()
+ : mpSdrFillGraphicAttribute(theGlobalDefault::get())
{
}
- SdrFillBitmapAttribute::SdrFillBitmapAttribute(const SdrFillBitmapAttribute& rCandidate)
- : mpSdrFillBitmapAttribute(rCandidate.mpSdrFillBitmapAttribute)
+ SdrFillGraphicAttribute::SdrFillGraphicAttribute(const SdrFillGraphicAttribute& rCandidate)
+ : mpSdrFillGraphicAttribute(rCandidate.mpSdrFillGraphicAttribute)
{
}
- SdrFillBitmapAttribute::~SdrFillBitmapAttribute()
+ SdrFillGraphicAttribute::~SdrFillGraphicAttribute()
{
}
- bool SdrFillBitmapAttribute::isDefault() const
+ bool SdrFillGraphicAttribute::isDefault() const
{
- return mpSdrFillBitmapAttribute.same_object(theGlobalDefault::get());
+ return mpSdrFillGraphicAttribute.same_object(theGlobalDefault::get());
}
- SdrFillBitmapAttribute& SdrFillBitmapAttribute::operator=(const SdrFillBitmapAttribute& rCandidate)
+ SdrFillGraphicAttribute& SdrFillGraphicAttribute::operator=(const SdrFillGraphicAttribute& rCandidate)
{
- mpSdrFillBitmapAttribute = rCandidate.mpSdrFillBitmapAttribute;
+ mpSdrFillGraphicAttribute = rCandidate.mpSdrFillGraphicAttribute;
return *this;
}
- bool SdrFillBitmapAttribute::operator==(const SdrFillBitmapAttribute& rCandidate) const
+ bool SdrFillGraphicAttribute::operator==(const SdrFillGraphicAttribute& rCandidate) const
{
- return rCandidate.mpSdrFillBitmapAttribute == mpSdrFillBitmapAttribute;
+ return rCandidate.mpSdrFillGraphicAttribute == mpSdrFillGraphicAttribute;
}
- const BitmapEx& SdrFillBitmapAttribute::getBitmapEx() const
+ const Graphic& SdrFillGraphicAttribute::getFillGraphic() const
{
- return mpSdrFillBitmapAttribute->getBitmapEx();
+ return mpSdrFillGraphicAttribute->getFillGraphic();
}
- const basegfx::B2DVector& SdrFillBitmapAttribute::getSize() const
+ const basegfx::B2DVector& SdrFillGraphicAttribute::getSize() const
{
- return mpSdrFillBitmapAttribute->getSize();
+ return mpSdrFillGraphicAttribute->getSize();
}
- const basegfx::B2DVector& SdrFillBitmapAttribute::getOffset() const
+ const basegfx::B2DVector& SdrFillGraphicAttribute::getOffset() const
{
- return mpSdrFillBitmapAttribute->getOffset();
+ return mpSdrFillGraphicAttribute->getOffset();
}
- const basegfx::B2DVector& SdrFillBitmapAttribute::getOffsetPosition() const
+ const basegfx::B2DVector& SdrFillGraphicAttribute::getOffsetPosition() const
{
- return mpSdrFillBitmapAttribute->getOffsetPosition();
+ return mpSdrFillGraphicAttribute->getOffsetPosition();
}
- const basegfx::B2DVector& SdrFillBitmapAttribute::getRectPoint() const
+ const basegfx::B2DVector& SdrFillGraphicAttribute::getRectPoint() const
{
- return mpSdrFillBitmapAttribute->getRectPoint();
+ return mpSdrFillGraphicAttribute->getRectPoint();
}
- bool SdrFillBitmapAttribute::getTiling() const
+ bool SdrFillGraphicAttribute::getTiling() const
{
- return mpSdrFillBitmapAttribute->getTiling();
+ return mpSdrFillGraphicAttribute->getTiling();
}
- bool SdrFillBitmapAttribute::getStretch() const
+ bool SdrFillGraphicAttribute::getStretch() const
{
- return mpSdrFillBitmapAttribute->getStretch();
+ return mpSdrFillGraphicAttribute->getStretch();
}
- FillBitmapAttribute SdrFillBitmapAttribute::getFillBitmapAttribute(const basegfx::B2DRange& rRange) const
+ bool SdrFillGraphicAttribute::getLogSize() const
{
- // get logical size of bitmap (before expanding eventually)
- BitmapEx aBitmapEx(getBitmapEx());
- const basegfx::B2DVector aLogicalSize(aBitmapEx.GetPrefSize().getWidth(), aBitmapEx.GetPrefSize().getHeight());
-
- // get hor/ver shiftings and apply them eventually to the bitmap, but only
- // when tiling is on
- bool bExpandWidth(false);
- bool bExpandHeight(false);
-
- if(getTiling())
- {
- if(0.0 != getOffset().getX() || 0.0 != getOffset().getY())
- {
- const sal_uInt32 nWidth(aBitmapEx.GetSizePixel().getWidth());
- const sal_uInt32 nHeight(aBitmapEx.GetSizePixel().getHeight());
+ return mpSdrFillGraphicAttribute->getLogSize();
+ }
- if(0.0 != getOffset().getX())
- {
- bExpandHeight = true;
- const sal_uInt32 nOffset(basegfx::fround(((double)nWidth * getOffset().getX()) / 100.0));
- aBitmapEx.Expand(0L, nHeight);
-
- const Size aSizeA(nOffset, nHeight);
- const Rectangle aDstA(Point(0L, nHeight), aSizeA);
- const Rectangle aSrcA(Point(nWidth - nOffset, 0L), aSizeA);
- aBitmapEx.CopyPixel(aDstA, aSrcA);
-
- const Size aSizeB(nWidth - nOffset, nHeight);
- const Rectangle aDstB(Point(nOffset, nHeight), aSizeB);
- const Rectangle aSrcB(Point(0L, 0L), aSizeB);
- aBitmapEx.CopyPixel(aDstB, aSrcB);
- }
- else
- {
- bExpandWidth = true;
- const sal_uInt32 nOffset(basegfx::fround(((double)nHeight * getOffset().getY()) / 100.0));
- aBitmapEx.Expand(nWidth, 0L);
-
- const Size aSize(nWidth, nHeight);
- const Rectangle aDst(Point(nWidth, 0L), aSize);
- const Rectangle aSrc(Point(0L, 0L), aSize);
- aBitmapEx.CopyPixel(aDst, aSrc);
-
- const Size aSizeA(nWidth, nOffset);
- const Rectangle aDstA(Point(0L, 0L), aSizeA);
- const Rectangle aSrcA(Point(nWidth, nHeight - nOffset), aSizeA);
- aBitmapEx.CopyPixel(aDstA, aSrcA);
-
- const Size aSizeB(nWidth, nHeight - nOffset);
- const Rectangle aDstB(Point(0L, nOffset), aSizeB);
- const Rectangle aSrcB(Point(nWidth, 0L), aSizeB);
- aBitmapEx.CopyPixel(aDstB, aSrcB);
- }
- }
- }
+ FillGraphicAttribute SdrFillGraphicAttribute::createFillGraphicAttribute(const basegfx::B2DRange& rRange) const
+ {
+ // get logical size of bitmap (before expanding eventually)
+ Graphic aGraphic(getFillGraphic());
+ const basegfx::B2DVector aLogicalSize(aGraphic.GetPrefSize().getWidth(), aGraphic.GetPrefSize().getHeight());
// init values with defaults
basegfx::B2DPoint aBitmapSize(1.0, 1.0);
basegfx::B2DVector aBitmapTopLeft(0.0, 0.0);
- // are canges needed?
+ // are changes needed?
if(getTiling() || !getStretch())
{
// init values with range sizes
@@ -327,17 +280,6 @@ namespace drawinglayer
aBitmapTopLeft.setY(aBitmapTopLeft.getY() + (aBitmapSize.getY() * (getOffsetPosition().getY() * 0.01)));
}
- // apply expand
- if(bExpandWidth)
- {
- aBitmapSize.setX(aBitmapSize.getX() * 2.0);
- }
-
- if(bExpandHeight)
- {
- aBitmapSize.setY(aBitmapSize.getY() * 2.0);
- }
-
// apply bitmap size scaling to unit rectangle
aBitmapTopLeft.setX(aBitmapTopLeft.getX() / fRangeWidth);
aBitmapTopLeft.setY(aBitmapTopLeft.getY() / fRangeHeight);
@@ -345,7 +287,17 @@ namespace drawinglayer
aBitmapSize.setY(aBitmapSize.getY() / fRangeHeight);
}
- return FillBitmapAttribute(aBitmapEx, aBitmapTopLeft, aBitmapSize, getTiling());
+ // get offset in percent
+ const double fOffsetX(basegfx::clamp(getOffset().getX() * 0.01, 0.0, 1.0));
+ const double fOffsetY(basegfx::clamp(getOffset().getY() * 0.01, 0.0, 1.0));
+
+ // create FillGraphicAttribute
+ return FillGraphicAttribute(
+ aGraphic,
+ basegfx::B2DRange(aBitmapTopLeft, aBitmapTopLeft + aBitmapSize),
+ getTiling(),
+ fOffsetX,
+ fOffsetY);
}
} // end of namespace attribute
} // end of namespace drawinglayer
diff --git a/drawinglayer/source/primitive2d/fillbitmapprimitive2d.cxx b/drawinglayer/source/primitive2d/fillbitmapprimitive2d.cxx
deleted file mode 100644
index 1c997ae..0000000
--- a/drawinglayer/source/primitive2d/fillbitmapprimitive2d.cxx
+++ /dev/null
@@ -1,130 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <drawinglayer/primitive2d/fillbitmapprimitive2d.hxx>
-#include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
-#include <basegfx/polygon/b2dpolygon.hxx>
-#include <basegfx/polygon/b2dpolygontools.hxx>
-#include <drawinglayer/texture/texture.hxx>
-#include <basegfx/tools/canvastools.hxx>
-#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
-
-//////////////////////////////////////////////////////////////////////////////
-
-using namespace com::sun::star;
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace drawinglayer
-{
- namespace primitive2d
- {
- Primitive2DSequence FillBitmapPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
- {
- Primitive2DSequence aRetval;
-
- if(!getFillBitmap().isDefault())
- {
- const Size aTileSizePixel(getFillBitmap().getBitmapEx().GetSizePixel());
-
- // is there a tile with some size at all?
- if(aTileSizePixel.getWidth() && aTileSizePixel.getHeight())
- {
- if(getFillBitmap().getTiling())
- {
- // get object range and create tiling matrices
- ::std::vector< basegfx::B2DHomMatrix > aMatrices;
- texture::GeoTexSvxTiled aTiling(getFillBitmap().getTopLeft(), getFillBitmap().getSize());
- aTiling.appendTransformations(aMatrices);
-
- // resize result
- aRetval.realloc(aMatrices.size());
-
- // create one primitive for each matrix
- for(sal_uInt32 a(0L); a < aMatrices.size(); a++)
- {
- basegfx::B2DHomMatrix aNewMatrix = aMatrices[a];
- aNewMatrix *= getTransformation();
-
- // create bitmap primitive and add to result
- const Primitive2DReference xRef(
- new BitmapPrimitive2D(getFillBitmap().getBitmapEx(), aNewMatrix));
-
- aRetval[a] = xRef;
- }
- }
- else
- {
- // create new object transform
- basegfx::B2DHomMatrix aObjectTransform;
- aObjectTransform.set(0L, 0L, getFillBitmap().getSize().getX());
- aObjectTransform.set(1L, 1L, getFillBitmap().getSize().getY());
- aObjectTransform.set(0L, 2L, getFillBitmap().getTopLeft().getX());
- aObjectTransform.set(1L, 2L, getFillBitmap().getTopLeft().getY());
- aObjectTransform *= getTransformation();
-
- // create bitmap primitive and add exclusive to decomposition (hand over ownership)
- const Primitive2DReference xRef(
- new BitmapPrimitive2D(getFillBitmap().getBitmapEx(), aObjectTransform));
-
- aRetval = Primitive2DSequence(&xRef, 1L);
- }
- }
- }
-
- return aRetval;
- }
-
- FillBitmapPrimitive2D::FillBitmapPrimitive2D(
- const basegfx::B2DHomMatrix& rTransformation,
- const attribute::FillBitmapAttribute& rFillBitmap)
- : BufferedDecompositionPrimitive2D(),
- maTransformation(rTransformation),
- maFillBitmap(rFillBitmap)
- {
- }
-
- bool FillBitmapPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
- {
- if(BufferedDecompositionPrimitive2D::operator==(rPrimitive))
- {
- const FillBitmapPrimitive2D& rCompare = static_cast< const FillBitmapPrimitive2D& >(rPrimitive);
-
- return (getTransformation() == rCompare.getTransformation()
- && getFillBitmap() == rCompare.getFillBitmap());
- }
-
- return false;
- }
-
- basegfx::B2DRange FillBitmapPrimitive2D::getB2DRange(const geometry::ViewInformation2D& /*rViewInformation*/) const
- {
- // return range of it
- basegfx::B2DPolygon aPolygon(basegfx::tools::createUnitPolygon());
- aPolygon.transform(getTransformation());
- return basegfx::tools::getRange(aPolygon);
- }
-
- // provide unique ID
- ImplPrimitive2DIDBlock(FillBitmapPrimitive2D, PRIMITIVE2D_ID_FILLBITMAPPRIMITIVE2D)
-
- } // end of namespace primitive2d
-} // end of namespace drawinglayer
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx b/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx
new file mode 100644
index 0000000..9eff7b9
--- /dev/null
+++ b/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx
@@ -0,0 +1,139 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawinglayer/primitive2d/fillgraphicprimitive2d.hxx>
+#include <drawinglayer/primitive2d/graphicprimitive2d.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <drawinglayer/texture/texture.hxx>
+#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
+#include <drawinglayer/primitive2d/metafileprimitive2d.hxx>
+#include <drawinglayer/primitive2d/transformprimitive2d.hxx>
+#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
+#include <drawinglayer/primitive2d/graphicprimitivehelper2d.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+using namespace com::sun::star;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive2d
+ {
+ Primitive2DSequence FillGraphicPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ {
+ Primitive2DSequence aRetval;
+ const attribute::FillGraphicAttribute& rAttribute = getFillGraphic();
+
+ if(!rAttribute.isDefault())
+ {
+ const Graphic& rGraphic = rAttribute.getGraphic();
+
+ if(GRAPHIC_BITMAP == rGraphic.GetType() || GRAPHIC_GDIMETAFILE == rGraphic.GetType())
+ {
+ const Size aSize(rGraphic.GetPrefSize());
+
+ if(aSize.Width() && aSize.Height())
+ {
+ // we have a graphic (bitmap or metafile) with some size
+ if(rAttribute.getTiling())
+ {
+ // get object range and create tiling matrices
+ ::std::vector< basegfx::B2DHomMatrix > aMatrices;
+ texture::GeoTexSvxTiled aTiling(
+ rAttribute.getGraphicRange(),
+ rAttribute.getOffsetX(),
+ rAttribute.getOffsetY());
+
+ // get matrices and realloc retval
+ aTiling.appendTransformations(aMatrices);
+ aRetval.realloc(aMatrices.size());
+
+ // prepare content primitive
+ const Primitive2DSequence xSeq = create2DDecompositionOfGraphic(
+ rGraphic,
+ basegfx::B2DHomMatrix());
+
+ for(sal_uInt32 a(0); a < aMatrices.size(); a++)
+ {
+ aRetval[a] = new TransformPrimitive2D(
+ getTransformation() * aMatrices[a],
+ xSeq);
+ }
+ }
+ else
+ {
+ // add graphic without tiling
+ const basegfx::B2DHomMatrix aObjectTransform(
+ getTransformation() * basegfx::tools::createScaleTranslateB2DHomMatrix(
+ rAttribute.getGraphicRange().getRange(),
+ rAttribute.getGraphicRange().getMinimum()));
+
+ aRetval = create2DDecompositionOfGraphic(
+ rGraphic,
+ aObjectTransform);
+ }
+ }
+ }
+ }
+
+ return aRetval;
+ }
+
+ FillGraphicPrimitive2D::FillGraphicPrimitive2D(
+ const basegfx::B2DHomMatrix& rTransformation,
+ const attribute::FillGraphicAttribute& rFillGraphic)
+ : BufferedDecompositionPrimitive2D(),
+ maTransformation(rTransformation),
+ maFillGraphic(rFillGraphic)
+ {
+ }
+
+ bool FillGraphicPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
+ {
+ if(BufferedDecompositionPrimitive2D::operator==(rPrimitive))
+ {
+ const FillGraphicPrimitive2D& rCompare = static_cast< const FillGraphicPrimitive2D& >(rPrimitive);
+
+ return (getTransformation() == rCompare.getTransformation()
+ && getFillGraphic() == rCompare.getFillGraphic());
+ }
+
+ return false;
+ }
+
+ basegfx::B2DRange FillGraphicPrimitive2D::getB2DRange(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ {
+ // return range of it
+ basegfx::B2DPolygon aPolygon(basegfx::tools::createUnitPolygon());
+ aPolygon.transform(getTransformation());
+
+ return basegfx::tools::getRange(aPolygon);
+ }
+
+ // provide unique ID
+ ImplPrimitive2DIDBlock(FillGraphicPrimitive2D, PRIMITIVE2D_ID_FILLGRAPHICPRIMITIVE2D)
+
+ } // end of namespace primitive2d
+} // end of namespace drawinglayer
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
index 00a2485..865d52f 100644
--- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
@@ -18,178 +18,13 @@
*/
#include <drawinglayer/primitive2d/graphicprimitive2d.hxx>
-#include <drawinglayer/animation/animationtiming.hxx>
-#include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
-#include <drawinglayer/primitive2d/animatedprimitive2d.hxx>
-#include <drawinglayer/primitive2d/metafileprimitive2d.hxx>
-#include <drawinglayer/primitive2d/transformprimitive2d.hxx>
-#include <basegfx/polygon/b2dpolygon.hxx>
-#include <basegfx/polygon/b2dpolygontools.hxx>
#include <drawinglayer/primitive2d/cropprimitive2d.hxx>
#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
#include <drawinglayer/primitive2d/maskprimitive2d.hxx>
-
-//////////////////////////////////////////////////////////////////////////////
-// helper class for animated graphics
-
-#include <vcl/animate.hxx>
-#include <vcl/graph.hxx>
-#include <vcl/virdev.hxx>
+#include <drawinglayer/primitive2d/graphicprimitivehelper2d.hxx>
+#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <vcl/svapp.hxx>
-#include <vcl/metaact.hxx>
-
-//////////////////////////////////////////////////////////////////////////////
-// includes for testing MetafilePrimitive2D::create2DDecomposition
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace
-{
- struct animationStep
- {
- BitmapEx maBitmapEx;
- sal_uInt32 mnTime;
- };
-
- class animatedBitmapExPreparator
- {
- ::Animation maAnimation;
- ::std::vector< animationStep > maSteps;
-
- sal_uInt32 generateStepTime(sal_uInt32 nIndex) const;
-
- public:
- explicit animatedBitmapExPreparator(const Graphic& rGraphic);
-
- sal_uInt32 count() const { return maSteps.size(); }
- sal_uInt32 loopCount() const { return (sal_uInt32)maAnimation.GetLoopCount(); }
- sal_uInt32 stepTime(sal_uInt32 a) const { return maSteps[a].mnTime; }
- const BitmapEx& stepBitmapEx(sal_uInt32 a) const { return maSteps[a].maBitmapEx; }
- };
-
- sal_uInt32 animatedBitmapExPreparator::generateStepTime(sal_uInt32 nIndex) const
- {
- const AnimationBitmap& rAnimBitmap = maAnimation.Get(sal_uInt16(nIndex));
- sal_uInt32 nWaitTime(rAnimBitmap.nWait * 10);
-
- // #115934#
- // Take care of special value for MultiPage TIFFs. ATM these shall just
- // show their first page. Later we will offer some switching when object
- // is selected.
- if(ANIMATION_TIMEOUT_ON_CLICK == rAnimBitmap.nWait)
- {
- // ATM the huge value would block the timer, so
- // use a long time to show first page (whole day)
- nWaitTime = 100 * 60 * 60 * 24;
- }
-
- // Bad trap: There are animated gifs with no set WaitTime (!).
- // In that case use a default value.
- if(0L == nWaitTime)
- {
- nWaitTime = 100L;
- }
-
- return nWaitTime;
- }
-
- animatedBitmapExPreparator::animatedBitmapExPreparator(const Graphic& rGraphic)
- : maAnimation(rGraphic.GetAnimation())
- {
- OSL_ENSURE(GRAPHIC_BITMAP == rGraphic.GetType() && rGraphic.IsAnimated(), "animatedBitmapExPreparator: graphic is not animated (!)");
-
- // #128539# secure access to Animation, looks like there exist animated GIFs out there
- // with a step count of zero
- if(maAnimation.Count())
- {
- VirtualDevice aVirtualDevice(*Application::GetDefaultDevice());
- VirtualDevice aVirtualDeviceMask(*Application::GetDefaultDevice(), 1L);
-
- // Prepare VirtualDevices and their states
- aVirtualDevice.EnableMapMode(sal_False);
- aVirtualDeviceMask.EnableMapMode(sal_False);
- aVirtualDevice.SetOutputSizePixel(maAnimation.GetDisplaySizePixel());
- aVirtualDeviceMask.SetOutputSizePixel(maAnimation.GetDisplaySizePixel());
- aVirtualDevice.Erase();
- aVirtualDeviceMask.Erase();
-
- for(sal_uInt16 a(0L); a < maAnimation.Count(); a++)
- {
- animationStep aNextStep;
- aNextStep.mnTime = generateStepTime(a);
-
- // prepare step
- const AnimationBitmap& rAnimBitmap = maAnimation.Get(sal_uInt16(a));
-
- switch(rAnimBitmap.eDisposal)
- {
- case DISPOSE_NOT:
- {
- aVirtualDevice.DrawBitmapEx(rAnimBitmap.aPosPix, rAnimBitmap.aBmpEx);
- Bitmap aMask = rAnimBitmap.aBmpEx.GetMask();
-
- if(aMask.IsEmpty())
- {
- const Point aEmpty;
- const Rectangle aRect(aEmpty, aVirtualDeviceMask.GetOutputSizePixel());
- const Wallpaper aWallpaper(COL_BLACK);
- aVirtualDeviceMask.DrawWallpaper(aRect, aWallpaper);
- }
- else
- {
- BitmapEx aExpandVisibilityMask = BitmapEx(aMask, aMask);
- aVirtualDeviceMask.DrawBitmapEx(rAnimBitmap.aPosPix, aExpandVisibilityMask);
- }
-
- break;
- }
- case DISPOSE_BACK:
- {
- // #i70772# react on no mask, for primitives, too.
- const Bitmap aMask(rAnimBitmap.aBmpEx.GetMask());
- const Bitmap aContent(rAnimBitmap.aBmpEx.GetBitmap());
-
- aVirtualDeviceMask.Erase();
- aVirtualDevice.DrawBitmap(rAnimBitmap.aPosPix, aContent);
-
- if(aMask.IsEmpty())
- {
- const Rectangle aRect(rAnimBitmap.aPosPix, aContent.GetSizePixel());
- aVirtualDeviceMask.SetFillColor(COL_BLACK);
- aVirtualDeviceMask.SetLineColor();
- aVirtualDeviceMask.DrawRect(aRect);
- }
- else
- {
- aVirtualDeviceMask.DrawBitmap(rAnimBitmap.aPosPix, aMask);
- }
-
- break;
- }
- case DISPOSE_FULL:
- {
- aVirtualDevice.DrawBitmapEx(rAnimBitmap.aPosPix, rAnimBitmap.aBmpEx);
- break;
- }
- case DISPOSE_PREVIOUS :
- {
- aVirtualDevice.DrawBitmapEx(rAnimBitmap.aPosPix, rAnimBitmap.aBmpEx);
- aVirtualDeviceMask.DrawBitmap(rAnimBitmap.aPosPix, rAnimBitmap.aBmpEx.GetMask());
- break;
- }
- }
-
- // create BitmapEx
- Bitmap aMainBitmap = aVirtualDevice.GetBitmap(Point(), aVirtualDevice.GetOutputSizePixel());
- Bitmap aMaskBitmap = aVirtualDeviceMask.GetBitmap(Point(), aVirtualDeviceMask.GetOutputSizePixel());
- aNextStep.maBitmapEx = BitmapEx(aMainBitmap, aMaskBitmap);
-
- // add to vector
- maSteps.push_back(aNextStep);
- }
- }
- }
-} // end of anonymous namespace
+#include <vcl/outdev.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -204,8 +39,6 @@ namespace drawinglayer
if(255L != getGraphicAttr().GetTransparency())
{
- Primitive2DReference xPrimitive;
-
// do not apply mirroring from GraphicAttr to the Metafile by calling
// GetTransformedGraphic, this will try to mirror the Metafile using Scale()
// at the Metafile. This again calls Scale at the single MetaFile actions,
@@ -241,111 +74,11 @@ namespace drawinglayer
const GraphicObject& rGraphicObject = getGraphicObject();
const Graphic aTransformedGraphic(rGraphicObject.GetTransformedGraphic(&aSuppressGraphicAttr));
- switch(aTransformedGraphic.GetType())
- {
- case GRAPHIC_BITMAP :
- {
- if(aTransformedGraphic.IsAnimated())
- {
- // prepare animation data
- animatedBitmapExPreparator aData(aTransformedGraphic);
-
- if(aData.count())
- {
- // create sub-primitives for animated bitmap and the needed animation loop
- animation::AnimationEntryLoop aAnimationLoop(aData.loopCount() ? aData.loopCount() : 0xffff);
- Primitive2DSequence aBitmapPrimitives(aData.count());
-
- for(sal_uInt32 a(0L); a < aData.count(); a++)
- {
- animation::AnimationEntryFixed aTime((double)aData.stepTime(a), (double)a / (double)aData.count());
- aAnimationLoop.append(aTime);
- const Primitive2DReference xRef(new BitmapPrimitive2D(aData.stepBitmapEx(a), aTransform));
- aBitmapPrimitives[a] = xRef;
- }
-
- // prepare animation list
- animation::AnimationEntryList aAnimationList;
- aAnimationList.append(aAnimationLoop);
-
- // create and add animated switch primitive
- xPrimitive = Primitive2DReference(new AnimatedSwitchPrimitive2D(aAnimationList, aBitmapPrimitives, false));
- }
- }
- else if(aTransformedGraphic.getSvgData().get())
- {
- // embedded Svg fill, create embed transform
- const basegfx::B2DRange& rSvgRange(aTransformedGraphic.getSvgData()->getRange());
-
- if(basegfx::fTools::more(rSvgRange.getWidth(), 0.0) && basegfx::fTools::more(rSvgRange.getHeight(), 0.0))
- {
- // translate back to origin, scale to unit coordinates
- basegfx::B2DHomMatrix aEmbedSvg(
- basegfx::tools::createTranslateB2DHomMatrix(
- -rSvgRange.getMinX(),
- -rSvgRange.getMinY()));
-
- aEmbedSvg.scale(
- 1.0 / rSvgRange.getWidth(),
- 1.0 / rSvgRange.getHeight());
-
- // apply created object transformation
- aEmbedSvg = aTransform * aEmbedSvg;
-
- // add Svg primitives embedded
- xPrimitive = new TransformPrimitive2D(
- aEmbedSvg,
- aTransformedGraphic.getSvgData()->getPrimitive2DSequence());
- }
- }
- else
- {
- xPrimitive = Primitive2DReference(new BitmapPrimitive2D(aTransformedGraphic.GetBitmapEx(), aTransform));
- }
-
- break;
- }
-
- case GRAPHIC_GDIMETAFILE :
- {
- // create MetafilePrimitive2D
- const GDIMetaFile& rMetafile = aTransformedGraphic.GetGDIMetaFile();
+ aRetval = create2DDecompositionOfGraphic(
+ aTransformedGraphic,
+ aTransform);
- xPrimitive = Primitive2DReference(
- new MetafilePrimitive2D( aTransform, rMetafile ) );
-
- // #i100357# find out if clipping is needed for this primitive. Unfortunately,
- // there exist Metafiles who's content is bigger than the proposed PrefSize set
- // at them. This is an error, but we need to work around this
- const Size aMetaFilePrefSize(rMetafile.GetPrefSize());
- const Size aMetaFileRealSize(
- const_cast< GDIMetaFile& >(rMetafile).GetBoundRect(
- *Application::GetDefaultDevice()).GetSize());
-
- if(aMetaFileRealSize.getWidth() > aMetaFilePrefSize.getWidth()
- || aMetaFileRealSize.getHeight() > aMetaFilePrefSize.getHeight())
- {
- // clipping needed. Embed to MaskPrimitive2D. Create childs and mask polygon
- const primitive2d::Primitive2DSequence aChildContent(&xPrimitive, 1);
- basegfx::B2DPolygon aMaskPolygon(basegfx::tools::createUnitPolygon());
- aMaskPolygon.transform(aTransform);
-
- xPrimitive = Primitive2DReference(
- new MaskPrimitive2D(
- basegfx::B2DPolyPolygon(aMaskPolygon),
- aChildContent));
- }
- break;
- }
-
- default:
- {
- // nothing to create
- break;
- }
- }
-
- if(xPrimitive.is())
+ if(aRetval.getLength())
{
// check for cropping
if(getGraphicAttr().IsCropped())
@@ -385,17 +118,17 @@ namespace drawinglayer
}
// embed content in cropPrimitive
- xPrimitive = new CropPrimitive2D(
- Primitive2DSequence(&xPrimitive, 1),
- aTransform,
- getGraphicAttr().GetLeftCrop() * fFactorX,
- getGraphicAttr().GetTopCrop() * fFactorY,
- getGraphicAttr().GetRightCrop() * fFactorX,
- getGraphicAttr().GetBottomCrop() * fFactorY);
+ Primitive2DReference xPrimitive(
+ new CropPrimitive2D(
+ aRetval,
+ aTransform,
+ getGraphicAttr().GetLeftCrop() * fFactorX,
+ getGraphicAttr().GetTopCrop() * fFactorY,
+ getGraphicAttr().GetRightCrop() * fFactorX,
+ getGraphicAttr().GetBottomCrop() * fFactorY));
+
+ aRetval = Primitive2DSequence(&xPrimitive, 1);
}
-
- // add to decomposition
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, xPrimitive);
}
}
diff --git a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
new file mode 100644
index 0000000..ee51ea0
--- /dev/null
+++ b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
@@ -0,0 +1,322 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawinglayer/primitive2d/graphicprimitivehelper2d.hxx>
+#include <drawinglayer/animation/animationtiming.hxx>
+#include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
+#include <drawinglayer/primitive2d/animatedprimitive2d.hxx>
+#include <drawinglayer/primitive2d/metafileprimitive2d.hxx>
+#include <drawinglayer/primitive2d/transformprimitive2d.hxx>
+#include <drawinglayer/primitive2d/maskprimitive2d.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <basegfx/polygon/b2dpolygontools.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// helper class for animated graphics
+
+#include <vcl/animate.hxx>
+#include <vcl/graph.hxx>
+#include <vcl/virdev.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/metaact.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// includes for testing MetafilePrimitive2D::create2DDecomposition
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace
+{
+ struct animationStep
+ {
+ BitmapEx maBitmapEx;
+ sal_uInt32 mnTime;
+ };
+
+ class animatedBitmapExPreparator
+ {
+ ::Animation maAnimation;
+ ::std::vector< animationStep > maSteps;
+
+ sal_uInt32 generateStepTime(sal_uInt32 nIndex) const;
+
+ public:
+ animatedBitmapExPreparator(const Graphic& rGraphic);
+
+ sal_uInt32 count() const { return maSteps.size(); }
+ sal_uInt32 loopCount() const { return (sal_uInt32)maAnimation.GetLoopCount(); }
+ sal_uInt32 stepTime(sal_uInt32 a) const { return maSteps[a].mnTime; }
+ const BitmapEx& stepBitmapEx(sal_uInt32 a) const { return maSteps[a].maBitmapEx; }
+ };
+
+ sal_uInt32 animatedBitmapExPreparator::generateStepTime(sal_uInt32 nIndex) const
+ {
+ const AnimationBitmap& rAnimBitmap = maAnimation.Get(sal_uInt16(nIndex));
+ sal_uInt32 nWaitTime(rAnimBitmap.nWait * 10);
+
+ // #115934#
+ // Take care of special value for MultiPage TIFFs. ATM these shall just
+ // show their first page. Later we will offer some switching when object
+ // is selected.
+ if(ANIMATION_TIMEOUT_ON_CLICK == rAnimBitmap.nWait)
+ {
+ // ATM the huge value would block the timer, so
+ // use a long time to show first page (whole day)
+ nWaitTime = 100 * 60 * 60 * 24;
+ }
+
+ // Bad trap: There are animated gifs with no set WaitTime (!).
+ // In that case use a default value.
+ if(0L == nWaitTime)
+ {
+ nWaitTime = 100L;
+ }
+
+ return nWaitTime;
+ }
+
+ animatedBitmapExPreparator::animatedBitmapExPreparator(const Graphic& rGraphic)
+ : maAnimation(rGraphic.GetAnimation())
+ {
+ OSL_ENSURE(GRAPHIC_BITMAP == rGraphic.GetType() && rGraphic.IsAnimated(), "animatedBitmapExPreparator: graphic is not animated (!)");
+
+ // #128539# secure access to Animation, looks like there exist animated GIFs out there
+ // with a step count of zero
+ if(maAnimation.Count())
+ {
+ VirtualDevice aVirtualDevice(*Application::GetDefaultDevice());
+ VirtualDevice aVirtualDeviceMask(*Application::GetDefaultDevice(), 1L);
+
+ // Prepare VirtualDevices and their states
+ aVirtualDevice.EnableMapMode(sal_False);
+ aVirtualDeviceMask.EnableMapMode(sal_False);
+ aVirtualDevice.SetOutputSizePixel(maAnimation.GetDisplaySizePixel());
+ aVirtualDeviceMask.SetOutputSizePixel(maAnimation.GetDisplaySizePixel());
+ aVirtualDevice.Erase();
+ aVirtualDeviceMask.Erase();
+
+ for(sal_uInt16 a(0L); a < maAnimation.Count(); a++)
+ {
+ animationStep aNextStep;
+ aNextStep.mnTime = generateStepTime(a);
+
+ // prepare step
+ const AnimationBitmap& rAnimBitmap = maAnimation.Get(sal_uInt16(a));
+
+ switch(rAnimBitmap.eDisposal)
+ {
+ case DISPOSE_NOT:
+ {
+ aVirtualDevice.DrawBitmapEx(rAnimBitmap.aPosPix, rAnimBitmap.aBmpEx);
+ Bitmap aMask = rAnimBitmap.aBmpEx.GetMask();
+
+ if(aMask.IsEmpty())
+ {
+ const Point aEmpty;
+ const Rectangle aRect(aEmpty, aVirtualDeviceMask.GetOutputSizePixel());
+ const Wallpaper aWallpaper(COL_BLACK);
+ aVirtualDeviceMask.DrawWallpaper(aRect, aWallpaper);
+ }
+ else
+ {
+ BitmapEx aExpandVisibilityMask = BitmapEx(aMask, aMask);
+ aVirtualDeviceMask.DrawBitmapEx(rAnimBitmap.aPosPix, aExpandVisibilityMask);
+ }
+
+ break;
+ }
+ case DISPOSE_BACK:
+ {
+ // #i70772# react on no mask, for primitives, too.
+ const Bitmap aMask(rAnimBitmap.aBmpEx.GetMask());
+ const Bitmap aContent(rAnimBitmap.aBmpEx.GetBitmap());
+
+ aVirtualDeviceMask.Erase();
+ aVirtualDevice.DrawBitmap(rAnimBitmap.aPosPix, aContent);
+
+ if(aMask.IsEmpty())
+ {
+ const Rectangle aRect(rAnimBitmap.aPosPix, aContent.GetSizePixel());
+ aVirtualDeviceMask.SetFillColor(COL_BLACK);
+ aVirtualDeviceMask.SetLineColor();
+ aVirtualDeviceMask.DrawRect(aRect);
+ }
+ else
+ {
+ aVirtualDeviceMask.DrawBitmap(rAnimBitmap.aPosPix, aMask);
+ }
+
+ break;
+ }
+ case DISPOSE_FULL:
+ {
+ aVirtualDevice.DrawBitmapEx(rAnimBitmap.aPosPix, rAnimBitmap.aBmpEx);
+ break;
+ }
+ case DISPOSE_PREVIOUS :
+ {
+ aVirtualDevice.DrawBitmapEx(rAnimBitmap.aPosPix, rAnimBitmap.aBmpEx);
+ aVirtualDeviceMask.DrawBitmap(rAnimBitmap.aPosPix, rAnimBitmap.aBmpEx.GetMask());
+ break;
+ }
+ }
+
+ // create BitmapEx
+ Bitmap aMainBitmap = aVirtualDevice.GetBitmap(Point(), aVirtualDevice.GetOutputSizePixel());
+ Bitmap aMaskBitmap = aVirtualDeviceMask.GetBitmap(Point(), aVirtualDeviceMask.GetOutputSizePixel());
+ aNextStep.maBitmapEx = BitmapEx(aMainBitmap, aMaskBitmap);
+
+ // add to vector
+ maSteps.push_back(aNextStep);
+ }
+ }
+ }
+} // end of anonymous namespace
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive2d
+ {
+ Primitive2DSequence create2DDecompositionOfGraphic(
+ const Graphic& rGraphic,
+ const basegfx::B2DHomMatrix& rTransform)
+ {
+ Primitive2DSequence aRetval;
+
+ switch(rGraphic.GetType())
+ {
+ case GRAPHIC_BITMAP :
+ {
+ if(rGraphic.IsAnimated())
+ {
+ // prepare animation data
+ animatedBitmapExPreparator aData(rGraphic);
+
+ if(aData.count())
+ {
+ // create sub-primitives for animated bitmap and the needed animation loop
+ animation::AnimationEntryLoop aAnimationLoop(aData.loopCount() ? aData.loopCount() : 0xffff);
+ Primitive2DSequence aBitmapPrimitives(aData.count());
+
+ for(sal_uInt32 a(0); a < aData.count(); a++)
+ {
+ animation::AnimationEntryFixed aTime((double)aData.stepTime(a), (double)a / (double)aData.count());
+ aAnimationLoop.append(aTime);
+ aBitmapPrimitives[a] = new BitmapPrimitive2D(
+ aData.stepBitmapEx(a),
+ rTransform);
+ }
+
+ // prepare animation list
+ animation::AnimationEntryList aAnimationList;
+ aAnimationList.append(aAnimationLoop);
+
+ // create and add animated switch primitive
+ aRetval.realloc(1);
+ aRetval[0] = new AnimatedSwitchPrimitive2D(
+ aAnimationList,
+ aBitmapPrimitives,
+ false);
+ }
+ }
+ else if(rGraphic.getSvgData().get())
+ {
+ // embedded Svg fill, create embed transform
+ const basegfx::B2DRange& rSvgRange(rGraphic.getSvgData()->getRange());
+
+ if(basegfx::fTools::more(rSvgRange.getWidth(), 0.0) && basegfx::fTools::more(rSvgRange.getHeight(), 0.0))
+ {
+ // translate back to origin, scale to unit coordinates
+ basegfx::B2DHomMatrix aEmbedSvg(
+ basegfx::tools::createTranslateB2DHomMatrix(
+ -rSvgRange.getMinX(),
+ -rSvgRange.getMinY()));
+
+ aEmbedSvg.scale(
+ 1.0 / rSvgRange.getWidth(),
+ 1.0 / rSvgRange.getHeight());
+
+ // apply created object transformation
+ aEmbedSvg = rTransform * aEmbedSvg;
+
+ // add Svg primitives embedded
+ aRetval.realloc(1);
+ aRetval[0] = new TransformPrimitive2D(
+ aEmbedSvg,
+ rGraphic.getSvgData()->getPrimitive2DSequence());
+ }
+ }
+ else
+ {
+ aRetval.realloc(1);
+ aRetval[0] = new BitmapPrimitive2D(
+ rGraphic.GetBitmapEx(),
+ rTransform);
+ }
+
+ break;
+ }
+
+ case GRAPHIC_GDIMETAFILE :
+ {
+ // create MetafilePrimitive2D
+ const GDIMetaFile& rMetafile = rGraphic.GetGDIMetaFile();
+
+ aRetval.realloc(1);
+ aRetval[0] = new MetafilePrimitive2D(
+ rTransform,
+ rMetafile);
+
+ // #i100357# find out if clipping is needed for this primitive. Unfortunately,
+ // there exist Metafiles who's content is bigger than the proposed PrefSize set
+ // at them. This is an error, but we need to work around this
+ const Size aMetaFilePrefSize(rMetafile.GetPrefSize());
+ const Size aMetaFileRealSize(
+ const_cast< GDIMetaFile& >(rMetafile).GetBoundRect(
+ *Application::GetDefaultDevice()).GetSize());
+
+ if(aMetaFileRealSize.getWidth() > aMetaFilePrefSize.getWidth()
+ || aMetaFileRealSize.getHeight() > aMetaFilePrefSize.getHeight())
+ {
+ // clipping needed. Embed to MaskPrimitive2D. Create childs and mask polygon
+ basegfx::B2DPolygon aMaskPolygon(basegfx::tools::createUnitPolygon());
+ aMaskPolygon.transform(rTransform);
+
+ aRetval[0] = new MaskPrimitive2D(
+ basegfx::B2DPolyPolygon(aMaskPolygon),
+ aRetval);
+ }
+ break;
+ }
+
+ default:
+ {
+ // nothing to create
+ break;
+ }
+ }
+
+ return aRetval;
+ }
+ } // end of namespace primitive2d
+} // end of namespace drawinglayer
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index 3df6c70..4a0719e 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -43,7 +43,7 @@
#include <basegfx/polygon/b2dpolygonclipper.hxx>
#include <drawinglayer/primitive2d/invertprimitive2d.hxx>
#include <drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx>
-#include <drawinglayer/primitive2d/fillbitmapprimitive2d.hxx>
+#include <drawinglayer/primitive2d/fillgraphicprimitive2d.hxx>
#include <drawinglayer/primitive2d/wallpaperprimitive2d.hxx>
#include <drawinglayer/primitive2d/textprimitive2d.hxx>
#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
diff --git a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
index 79b6705..0518f0e 100644
--- a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
@@ -50,7 +50,8 @@ namespace drawinglayer
{
// create tiling matrices
::std::vector< basegfx::B2DHomMatrix > aMatrices;
- texture::GeoTexSvxTiled aTiling(getReferenceRange().getMinimum(), getReferenceRange().getRange());
+ texture::GeoTexSvxTiled aTiling(getReferenceRange());
+
aTiling.appendTransformations(aMatrices);
// check if content needs to be clipped
diff --git a/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx
index 95b5aac..7cd2a1a 100644
--- a/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx
@@ -24,9 +24,11 @@
#include <drawinglayer/primitive2d/maskprimitive2d.hxx>
#include <drawinglayer/primitive2d/fillhatchprimitive2d.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <drawinglayer/primitive2d/fillbitmapprimitive2d.hxx>
+#include <drawinglayer/primitive2d/fillgraphicprimitive2d.hxx>
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
+#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <vcl/graph.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -404,56 +406,69 @@ namespace drawinglayer
{
namespace primitive2d
{
- Primitive2DSequence PolyPolygonBitmapPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DSequence PolyPolygonGraphicPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
- if(!getFillBitmap().isDefault())
+ if(!getFillGraphic().isDefault())
{
- // create SubSequence with FillBitmapPrimitive2D
- const basegfx::B2DRange aPolyPolygonRange(getB2DPolyPolygon().getB2DRange());
- basegfx::B2DHomMatrix aNewObjectTransform;
- aNewObjectTransform.set(0, 0, aPolyPolygonRange.getWidth());
- aNewObjectTransform.set(1, 1, aPolyPolygonRange.getHeight());
- aNewObjectTransform.set(0, 2, aPolyPolygonRange.getMinX());
- aNewObjectTransform.set(1, 2, aPolyPolygonRange.getMinY());
- FillBitmapPrimitive2D* pNewBitmap = new FillBitmapPrimitive2D(aNewObjectTransform, getFillBitmap());
- const Primitive2DReference xSubRef(pNewBitmap);
- const Primitive2DSequence aSubSequence(&xSubRef, 1L);
+ const Graphic& rGraphic = getFillGraphic().getGraphic();
+ const GraphicType aType(rGraphic.GetType());
- // create mask primitive
- MaskPrimitive2D* pNewMask = new MaskPrimitive2D(getB2DPolyPolygon(), aSubSequence);
- const Primitive2DReference xRef(pNewMask);
-
- return Primitive2DSequence(&xRef, 1);
- }
- else
- {
- return Primitive2DSequence();
+ // is there a bitmap or a metafile (do we have content)?
+ if(GRAPHIC_BITMAP == aType || GRAPHIC_GDIMETAFILE == aType)
+ {
+ const Size aPrefSize(rGraphic.GetPrefSize());
+
+ // does content have a size?
+ if(aPrefSize.Width() && aPrefSize.Height())
+ {
+ // create SubSequence with FillGraphicPrimitive2D based on polygon range
+ const basegfx::B2DRange aPolyPolygonRange(getB2DPolyPolygon().getB2DRange());
+ const basegfx::B2DHomMatrix aNewObjectTransform(
+ basegfx::tools::createScaleTranslateB2DHomMatrix(
+ aPolyPolygonRange.getRange(),
+ aPolyPolygonRange.getMinimum()));
+ const Primitive2DReference xSubRef(
+ new FillGraphicPrimitive2D(
+ aNewObjectTransform,
+ getFillGraphic()));
+
+ // embed to mask primitive
+ const Primitive2DReference xRef(
+ new MaskPrimitive2D(
+ getB2DPolyPolygon(),
+ Primitive2DSequence(&xSubRef, 1)));
+
+ return Primitive2DSequence(&xRef, 1);
+ }
+ }
}
+
+ return Primitive2DSequence();
}
- PolyPolygonBitmapPrimitive2D::PolyPolygonBitmapPrimitive2D(
+ PolyPolygonGraphicPrimitive2D::PolyPolygonGraphicPrimitive2D(
const basegfx::B2DPolyPolygon& rPolyPolygon,
- const attribute::FillBitmapAttribute& rFillBitmap)
+ const attribute::FillGraphicAttribute& rFillGraphic)
: BufferedDecompositionPrimitive2D(),
maPolyPolygon(rPolyPolygon),
- maFillBitmap(rFillBitmap)
+ maFillGraphic(rFillGraphic)
{
}
- bool PolyPolygonBitmapPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
+ bool PolyPolygonGraphicPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
{
if(BufferedDecompositionPrimitive2D::operator==(rPrimitive))
{
- const PolyPolygonBitmapPrimitive2D& rCompare = (PolyPolygonBitmapPrimitive2D&)rPrimitive;
+ const PolyPolygonGraphicPrimitive2D& rCompare = (PolyPolygonGraphicPrimitive2D&)rPrimitive;
- return (getFillBitmap() == rCompare.getFillBitmap());
+ return (getFillGraphic() == rCompare.getFillGraphic());
}
return false;
}
// provide unique ID
- ImplPrimitive2DIDBlock(PolyPolygonBitmapPrimitive2D, PRIMITIVE2D_ID_POLYPOLYGONBITMAPPRIMITIVE2D)
+ ImplPrimitive2DIDBlock(PolyPolygonGraphicPrimitive2D, PRIMITIVE2D_ID_POLYPOLYGONGRAPHICPRIMITIVE2D)
} // end of namespace primitive2d
} // end of namespace drawinglayer
diff --git a/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx b/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx
index bf3c5f8..61bafc6 100644
--- a/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx
@@ -20,10 +20,12 @@
#include <drawinglayer/primitive2d/wallpaperprimitive2d.hxx>
#include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
-#include <drawinglayer/primitive2d/fillbitmapprimitive2d.hxx>
+#include <drawinglayer/primitive2d/fillgraphicprimitive2d.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <drawinglayer/primitive2d/maskprimitive2d.hxx>
+#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <vcl/graph.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -175,26 +177,23 @@ namespace drawinglayer
aRelativeTopLeft.setY(0.5 - aRelativeSize.getY());
}
- // prepare FillBitmapAttribute
- const attribute::FillBitmapAttribute aFillBitmapAttribute(
- getBitmapEx(),
- aRelativeTopLeft,
- aRelativeSize,
+ // prepare FillGraphicAttribute
+ const attribute::FillGraphicAttribute aFillGraphicAttribute(
+ Graphic(getBitmapEx()),
+ basegfx::B2DRange(aRelativeTopLeft, aRelativeTopLeft+ aRelativeSize),
true);
// create ObjectTransform
- basegfx::B2DHomMatrix aObjectTransform;
-
- aObjectTransform.set(0, 0, getLocalObjectRange().getWidth());
- aObjectTransform.set(1, 1, getLocalObjectRange().getHeight());
- aObjectTransform.set(0, 2, getLocalObjectRange().getMinX());
- aObjectTransform.set(1, 2, getLocalObjectRange().getMinY());
+ const basegfx::B2DHomMatrix aObjectTransform(
+ basegfx::tools::createScaleTranslateB2DHomMatrix(
+ getLocalObjectRange().getRange(),
+ getLocalObjectRange().getMinimum()));
// create FillBitmapPrimitive
const drawinglayer::primitive2d::Primitive2DReference xFillBitmap(
- new drawinglayer::primitive2d::FillBitmapPrimitive2D(
+ new drawinglayer::primitive2d::FillGraphicPrimitive2D(
aObjectTransform,
- aFillBitmapAttribute));
+ aFillGraphicAttribute));
aRetval = Primitive2DSequence(&xFillBitmap, 1);
// always embed tiled fill to clipping
diff --git a/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx b/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx
index 1084450..667fae1 100644
--- a/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx
@@ -25,8 +25,8 @@
#include <basegfx/polygon/b3dpolypolygon.hxx>
#include <drawinglayer/primitive3d/polypolygonprimitive3d.hxx>
#include <vcl/vclenum.hxx>
-#include <drawinglayer/attribute/fillbitmapattribute.hxx>
-#include <drawinglayer/attribute/sdrfillbitmapattribute.hxx>
+#include <drawinglayer/attribute/fillgraphicattribute.hxx>
+#include <drawinglayer/attribute/sdrfillgraphicattribute.hxx>
#include <vcl/bmpacc.hxx>
#include <basegfx/polygon/b3dpolypolygontools.hxx>
#include <drawinglayer/primitive3d/textureprimitive3d.hxx>
@@ -201,7 +201,7 @@ namespace drawinglayer
// look for and evtl. build texture sub-group primitive
if(!rFill.getGradient().isDefault()
|| !rFill.getHatch().isDefault()
- || !rFill.getBitmap().isDefault())
+ || !rFill.getFillGraphic().isDefault())
{
bool bModulate(::com::sun::star::drawing::TextureMode_MODULATE == aSdr3DObjectAttribute.getTextureMode());
bool bFilter(aSdr3DObjectAttribute.getTextureFilter());
@@ -227,13 +227,13 @@ namespace drawinglayer
bModulate,
bFilter);
}
- else // if(!rFill.getBitmap().isDefault())
+ else // if(!rFill.getFillGraphic().isDefault())
{
// create bitmapTexture3D with sublist, add to local aRetval
- basegfx::B2DRange aTexRange(0.0, 0.0, rTextureSize.getX(), rTextureSize.getY());
+ const basegfx::B2DRange aTexRange(0.0, 0.0, rTextureSize.getX(), rTextureSize.getY());
pNewTexturePrimitive3D = new BitmapTexturePrimitive3D(
- rFill.getBitmap().getFillBitmapAttribute(aTexRange),
+ rFill.getFillGraphic().createFillGraphicAttribute(aTexRange),
aRetval,
rTextureSize,
bModulate,
@@ -306,7 +306,7 @@ namespace drawinglayer
basegfx::BColor(),
attribute::FillGradientAttribute(),
attribute::FillHatchAttribute(),
- attribute::SdrFillBitmapAttribute());
+ attribute::SdrFillGraphicAttribute());
const Primitive3DReference aHidden(
new HiddenGeometryPrimitive3D(
diff --git a/drawinglayer/source/primitive3d/textureprimitive3d.cxx b/drawinglayer/source/primitive3d/textureprimitive3d.cxx
index edd220c..4f4569e 100644
--- a/drawinglayer/source/primitive3d/textureprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/textureprimitive3d.cxx
@@ -160,12 +160,12 @@ namespace drawinglayer
namespace primitive3d
{
BitmapTexturePrimitive3D::BitmapTexturePrimitive3D(
- const attribute::FillBitmapAttribute& rFillBitmapAttribute,
+ const attribute::FillGraphicAttribute& rFillGraphicAttribute,
const Primitive3DSequence& rChildren,
const basegfx::B2DVector& rTextureSize,
bool bModulate, bool bFilter)
: TexturePrimitive3D(rChildren, rTextureSize, bModulate, bFilter),
- maFillBitmapAttribute(rFillBitmapAttribute)
+ maFillGraphicAttribute(rFillGraphicAttribute)
{
}
@@ -175,7 +175,7 @@ namespace drawinglayer
{
const BitmapTexturePrimitive3D& rCompare = (BitmapTexturePrimitive3D&)rPrimitive;
- return (getFillBitmapAttribute() == rCompare.getFillBitmapAttribute());
+ return (getFillGraphicAttribute() == rCompare.getFillGraphicAttribute());
}
return false;
diff --git a/drawinglayer/source/processor2d/canvasprocessor.cxx b/drawinglayer/source/processor2d/canvasprocessor.cxx
deleted file mode 100644
index b8d260a..0000000
--- a/drawinglayer/source/processor2d/canvasprocessor.cxx
+++ /dev/null
@@ -1,993 +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/.
- *
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list