diff options
Diffstat (limited to 'sd/source/filter/eppt/pptx-epptooxml.cxx')
-rw-r--r-- | sd/source/filter/eppt/pptx-epptooxml.cxx | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index c8d3532617b7..2f02dc49d697 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -66,6 +66,7 @@ #include <com/sun/star/presentation/AnimationSpeed.hpp> #include <com/sun/star/presentation/EffectNodeType.hpp> #include <com/sun/star/presentation/EffectPresetClass.hpp> +#include <com/sun/star/presentation/ParagraphTarget.hpp> #include <com/sun/star/util/DateTime.hpp> #include <oox/export/utils.hxx> @@ -936,9 +937,27 @@ void PowerPointExport::WriteAnimationAttributeName(const FSHelperPtr& pFS, const void PowerPointExport::WriteAnimationTarget(const FSHelperPtr& pFS, const Any& rTarget) { - sal_Int32 nBegin = -1, nEnd = -1; - bool bParagraphTarget; - Reference< XShape > rXShape = AnimationExporter::getTargetElementShape(rTarget, nBegin, nEnd, bParagraphTarget); + sal_Int32 nParagraph = -1; + bool bParagraphTarget = false; + + Reference< XShape > rXShape; + rTarget >>= rXShape; + + if (!rXShape.is()) + { + ParagraphTarget aParagraphTarget; + if (rTarget >>= aParagraphTarget) + rXShape = aParagraphTarget.Shape; + if (rXShape.is()) + { + nParagraph = static_cast< sal_Int32 >(aParagraphTarget.Paragraph); + Reference< XSimpleText > xText(rXShape, UNO_QUERY); + if (xText.is()) + { + bParagraphTarget = true; + } + } + } if (rXShape.is()) { @@ -950,8 +969,8 @@ void PowerPointExport::WriteAnimationTarget(const FSHelperPtr& pFS, const Any& r { pFS->startElementNS(XML_p, XML_txEl, FSEND); pFS->singleElementNS(XML_p, XML_pRg, - XML_st, I32S(nBegin), - XML_end, I32S(nEnd), + XML_st, I32S(nParagraph), + XML_end, I32S(nParagraph), FSEND); pFS->endElementNS(XML_p, XML_txEl); } |