diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2017-09-19 13:27:09 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2017-09-20 08:50:17 +0200 |
commit | 146a64bb52a7d51cd27021311fb3ad9075e94d10 (patch) | |
tree | 60b2846804111425dd4bc45c52a89ec10b8d149e /sd/source | |
parent | 6978f506a439cc8bf30393568ba496c266eafdb2 (diff) |
tdf#112333 PPTX export animClr
Change-Id: Ibf230a6c4ddac4806dab235c3394778db26da38c
Reviewed-on: https://gerrit.libreoffice.org/42476
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/filter/eppt/pptx-epptooxml.cxx | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 37ac57f83e40..4380048896c5 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -827,8 +827,16 @@ void PowerPointExport::WriteAnimationProperty(const FSHelperPtr& pFS, const Any& if (!rAny.hasValue()) return; + sal_uInt32 nRgb; + switch (rAny.getValueType().getTypeClass()) { + case TypeClass_LONG: + rAny >>= nRgb; + pFS->singleElementNS(XML_a, XML_srgbClr, + XML_val, I32SHEX(nRgb), + FSEND); + break; case TypeClass_STRING: pFS->singleElementNS(XML_p, XML_strVal, XML_val, USS(*o3tl::doAccess<OUString>(rAny)), @@ -888,7 +896,14 @@ void PowerPointExport::WriteAnimateTo(const FSHelperPtr& pFS, const Any& rValue, pFS->startElementNS(XML_p, XML_to, FSEND); - WriteAnimationProperty(pFS, AnimationExporter::convertAnimateValue(rValue, rAttributeName)); + sal_uInt32 nColor; + if (rValue >>= nColor) + { + // RGB color + WriteAnimationProperty(pFS, rValue); + } + else + WriteAnimationProperty(pFS, AnimationExporter::convertAnimateValue(rValue, rAttributeName)); pFS->endElementNS(XML_p, XML_to); } @@ -948,6 +963,12 @@ void PowerPointExport::WriteAnimationAttributeName(const FSHelperPtr& pFS, const pFS->writeEscaped("fill.on"); pFS->endElementNS(XML_p, XML_attrName); } + else if (rAttributeName == "FillColor") + { + pFS->startElementNS(XML_p, XML_attrName, FSEND); + pFS->writeEscaped("fillcolor"); + pFS->endElementNS(XML_p, XML_attrName); + } else { SAL_WARN("sd.eppt", "unhandled animation attribute name: " << rAttributeName); @@ -1084,6 +1105,14 @@ void PowerPointExport::WriteAnimationNodeAnimate(const FSHelperPtr& pFS, const R XML_to, pTo, FSEND); } + else if (nXmlNodeType == XML_animClr) + { + pFS->startElementNS(XML_p, nXmlNodeType, + XML_clrSpc, "rgb", + XML_calcmode, pCalcMode, + XML_valueType, pValueType, + FSEND); + } else { pFS->startElementNS(XML_p, nXmlNodeType, @@ -1581,6 +1610,10 @@ void PowerPointExport::WriteAnimationNode(const FSHelperPtr& pFS, const Referenc } } break; + case AnimationNodeType::ANIMATECOLOR: + xmlNodeType = XML_animClr; + pMethod = &PowerPointExport::WriteAnimationNodeAnimate; + break; case AnimationNodeType::SET: xmlNodeType = XML_set; pMethod = &PowerPointExport::WriteAnimationNodeAnimate; |