summaryrefslogtreecommitdiff
path: root/sd/source/filter/eppt/pptx-epptooxml.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/filter/eppt/pptx-epptooxml.cxx')
-rw-r--r--sd/source/filter/eppt/pptx-epptooxml.cxx59
1 files changed, 25 insertions, 34 deletions
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index c41e4fb0e129..e4aced1ef9cf 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -1004,23 +1004,19 @@ void PowerPointExport::WriteAnimationAttributeName(const FSHelperPtr& pFS, const
SAL_INFO("sd.eppt", "write attribute name: " << USS(rAttributeName));
+ const char* pAttribute = nullptr;
+
if (rAttributeName == "Visibility")
{
- pFS->startElementNS(XML_p, XML_attrName, FSEND);
- pFS->writeEscaped("style.visibility");
- pFS->endElementNS(XML_p, XML_attrName);
+ pAttribute = "style.visibility";
}
else if (rAttributeName == "X")
{
- pFS->startElementNS(XML_p, XML_attrName, FSEND);
- pFS->writeEscaped("ppt_x");
- pFS->endElementNS(XML_p, XML_attrName);
+ pAttribute = "ppt_x";
}
else if (rAttributeName == "Y")
{
- pFS->startElementNS(XML_p, XML_attrName, FSEND);
- pFS->writeEscaped("ppt_y");
- pFS->endElementNS(XML_p, XML_attrName);
+ pAttribute = "ppt_y";
}
else if (rAttributeName == "X;Y")
{
@@ -1034,57 +1030,52 @@ void PowerPointExport::WriteAnimationAttributeName(const FSHelperPtr& pFS, const
}
else if (rAttributeName == "Width")
{
- pFS->startElementNS(XML_p, XML_attrName, FSEND);
- pFS->writeEscaped("ppt_w");
- pFS->endElementNS(XML_p, XML_attrName);
+ pAttribute = "ppt_w";
}
else if (rAttributeName == "Height")
{
- pFS->startElementNS(XML_p, XML_attrName, FSEND);
- pFS->writeEscaped("ppt_h");
- pFS->endElementNS(XML_p, XML_attrName);
+ pAttribute = "ppt_h";
}
else if (rAttributeName == "Rotate")
{
- pFS->startElementNS(XML_p, XML_attrName, FSEND);
- pFS->writeEscaped("r");
- pFS->endElementNS(XML_p, XML_attrName);
+ pAttribute = "r";
}
else if (rAttributeName == "FillStyle")
{
- pFS->startElementNS(XML_p, XML_attrName, FSEND);
- pFS->writeEscaped("fill.type");
- pFS->endElementNS(XML_p, XML_attrName);
+ pAttribute = "fill.type";
}
else if (rAttributeName == "FillOn")
{
- pFS->startElementNS(XML_p, XML_attrName, FSEND);
- pFS->writeEscaped("fill.on");
- pFS->endElementNS(XML_p, XML_attrName);
+ pAttribute = "fill.on";
}
else if (rAttributeName == "FillColor")
{
- pFS->startElementNS(XML_p, XML_attrName, FSEND);
- pFS->writeEscaped("fillcolor");
- pFS->endElementNS(XML_p, XML_attrName);
+ pAttribute = "fillcolor";
}
else if (rAttributeName == "CharColor")
{
- pFS->startElementNS(XML_p, XML_attrName, FSEND);
- pFS->writeEscaped("style.color");
- pFS->endElementNS(XML_p, XML_attrName);
+ pAttribute = "style.color";
}
- if (rAttributeName == "SkewX")
+ else if (rAttributeName == "Opacity")
{
- pFS->startElementNS(XML_p, XML_attrName, FSEND);
- pFS->writeEscaped("xshear");
- pFS->endElementNS(XML_p, XML_attrName);
+ pAttribute = "style.opacity";
+ }
+ else if (rAttributeName == "SkewX")
+ {
+ pAttribute = "xshear";
}
else
{
SAL_WARN("sd.eppt", "unhandled animation attribute name: " << rAttributeName);
}
+ if (pAttribute)
+ {
+ pFS->startElementNS(XML_p, XML_attrName, FSEND);
+ pFS->writeEscaped(pAttribute);
+ pFS->endElementNS(XML_p, XML_attrName);
+ }
+
pFS->endElementNS(XML_p, XML_attrNameLst);
}