summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Hung <marklh9@gmail.com>2018-07-28 10:56:38 +0800
committerMark Hung <marklh9@gmail.com>2018-07-31 13:44:48 +0200
commit696cbec5c6db783d3dd91d3f7d46f83dcc00b3cc (patch)
tree5a100313728208251c3a431fab690d7c4805665f
parentec4c4cbc3d761c51375136db561f44ae7c5157b0 (diff)
tdf#118080 fix formula importing of ppt animation.
Change-Id: I5f56e0d70a13418b0bde45c2fc65f56fdb365263 Reviewed-on: https://gerrit.libreoffice.org/58209 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
-rw-r--r--sd/qa/unit/export-tests.cxx3
-rw-r--r--sd/source/filter/ppt/pptinanimations.cxx31
2 files changed, 6 insertions, 28 deletions
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index b34cbb9aca9f..e92d95f934c8 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -1117,7 +1117,8 @@ void SdExportTest::testTdf113818()
{
utl::TempFile tempFile;
sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf113818-swivel.pptx"), PPTX);
-
+ xDocShRef = saveAndReload(xDocShRef.get(), PPT);
+ xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef = saveAndReload(xDocShRef.get(), ODP, &tempFile);
xmlDocPtr pXmlDoc = parseExport(tempFile, "content.xml");
diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx
index 4b0c9b95a860..60a59688d6c3 100644
--- a/sd/source/filter/ppt/pptinanimations.cxx
+++ b/sd/source/filter/ppt/pptinanimations.cxx
@@ -2149,35 +2149,12 @@ void AnimationImporter::importAnimateKeyPoints( const Atom* pAtom, const Referen
{
pValue = Atom::findNextChildAtom(pValue);
if( pValue && pValue->getType() == DFF_msofbtAnimAttributeValue )
- (void)importAttributeValue( pValue, aValue2 );
-
- bool bCouldBeFormula = false;
- bool bHasValue = aValue2.hasValue();
- if( bHasValue )
- {
- if( aValue2.getValueType() == cppu::UnoType<OUString>::get() )
- {
- OUString aTest;
- aValue2 >>= aTest;
- bHasValue = !aTest.isEmpty();
- bCouldBeFormula = true;
- }
- }
-
- if( bHasValue && bCouldBeFormula && (aValue1.getValueType() == cppu::UnoType<double>::get() ))
- {
- aValue2 >>= aFormula;
- bHasValue = false;
- }
-
- if( bHasValue )
- {
- aValues[nKeyTime] <<= ValuePair( aValue1, aValue2 );
- }
- else
{
- aValues[nKeyTime] = aValue1;
+ // Any occurence of the formula becomes the formula of the whole list.
+ if (importAttributeValue(pValue, aValue2))
+ aValue2 >>= aFormula;
}
+ aValues[nKeyTime] = aValue1;
}
}
}