[Libreoffice-commits] core.git: sd/qa sd/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Jul 31 11:45:12 UTC 2018
sd/qa/unit/export-tests.cxx | 3 ++-
sd/source/filter/ppt/pptinanimations.cxx | 31 ++++---------------------------
2 files changed, 6 insertions(+), 28 deletions(-)
New commits:
commit 696cbec5c6db783d3dd91d3f7d46f83dcc00b3cc
Author: Mark Hung <marklh9 at gmail.com>
AuthorDate: Sat Jul 28 10:56:38 2018 +0800
Commit: Mark Hung <marklh9 at gmail.com>
CommitDate: Tue Jul 31 13:44:48 2018 +0200
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 at gmail.com>
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;
}
}
}
More information about the Libreoffice-commits
mailing list