summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2023-06-14 12:39:06 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2023-06-15 08:53:23 +0200
commit593a428b901dd1473b850e56d1e3d898ca229d00 (patch)
treeb53ece86490a69a030d8cc55f6b4105e376989a9 /drawinglayer
parent42cdd2c08e083a39eb3c8048ef20c7d31e750497 (diff)
tdf#155735: Add support for saturate type
Add getModifierName to BColorModifier class so when can assert which modifier is being used Change-Id: I2bc2a36470a449df4dc84a8440f232149c1f8278 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153048 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit 41bf4139cab36984cff514bfdd6b1b13576746a3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153076
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/tools/primitive2dxmldump.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/drawinglayer/source/tools/primitive2dxmldump.cxx b/drawinglayer/source/tools/primitive2dxmldump.cxx
index 7edb5bce5c89..37ea828a6fbb 100644
--- a/drawinglayer/source/tools/primitive2dxmldump.cxx
+++ b/drawinglayer/source/tools/primitive2dxmldump.cxx
@@ -38,6 +38,7 @@
#include <drawinglayer/primitive2d/structuretagprimitive2d.hxx>
#include <drawinglayer/primitive2d/svggradientprimitive2d.hxx>
#include <drawinglayer/primitive2d/metafileprimitive2d.hxx>
+#include <drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx>
#include <drawinglayer/primitive2d/sceneprimitive2d.hxx>
#include <drawinglayer/geometry/viewinformation2d.hxx>
#include <drawinglayer/attribute/lineattribute.hxx>
@@ -1127,11 +1128,14 @@ void Primitive2dXmlDump::decomposeAndWrite(
case PRIMITIVE2D_ID_MODIFIEDCOLORPRIMITIVE2D:
{
// ModifiedColorPrimitive2D.
+ const ModifiedColorPrimitive2D& rModifiedColorPrimitive2D
+ = dynamic_cast<const ModifiedColorPrimitive2D&>(*pBasePrimitive);
rWriter.startElement("modifiedColor");
- drawinglayer::primitive2d::Primitive2DContainer aPrimitiveContainer;
- pBasePrimitive->get2DDecomposition(aPrimitiveContainer,
- drawinglayer::geometry::ViewInformation2D());
- decomposeAndWrite(aPrimitiveContainer, rWriter);
+ const basegfx::BColorModifierSharedPtr& aColorModifier
+ = rModifiedColorPrimitive2D.getColorModifier();
+ rWriter.attribute("modifier", aColorModifier->getModifierName());
+
+ decomposeAndWrite(rModifiedColorPrimitive2D.getChildren(), rWriter);
rWriter.endElement();
break;
}