summaryrefslogtreecommitdiff
path: root/xmloff/source/draw/animationexport.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/draw/animationexport.cxx')
-rw-r--r--xmloff/source/draw/animationexport.cxx36
1 files changed, 34 insertions, 2 deletions
diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx
index 2aa02c588ea3..c130f5a45919 100644
--- a/xmloff/source/draw/animationexport.cxx
+++ b/xmloff/source/draw/animationexport.cxx
@@ -23,6 +23,7 @@
#include <com/sun/star/animations/Timing.hpp>
#include <com/sun/star/animations/Event.hpp>
#include <com/sun/star/animations/XAnimateMotion.hpp>
+#include <com/sun/star/animations/XAnimatePhysics.hpp>
#include <com/sun/star/animations/XAnimateTransform.hpp>
#include <com/sun/star/animations/XTransitionFilter.hpp>
#include <com/sun/star/animations/XIterateContainer.hpp>
@@ -1245,9 +1246,40 @@ void AnimationsExporterImpl::exportAnimate( const Reference< XAnimate >& xAnimat
case AnimationNodeType::ANIMATEPHYSICS:
{
eElementToken = XML_ANIMATEPHYSICS;
+ double fTemp;
- Reference< XAnimateMotion > xAnimateMotion( xAnimate, UNO_QUERY_THROW );
- aTemp = xAnimateMotion->getOrigin();
+ Reference< XAnimatePhysics > xAnimatePhysics( xAnimate, UNO_QUERY_THROW );
+ aTemp = xAnimatePhysics->getStartVelocityX();
+ if( aTemp.hasValue() )
+ {
+ aTemp >>= fTemp;
+ ::sax::Converter::convertDouble( sTmp, fTemp );
+ mxExport->AddAttribute( XML_NAMESPACE_LO_EXT, XML_PHYSICS_ANIMATION_START_VELOCITY_X, sTmp.makeStringAndClear() );
+ }
+
+ aTemp = xAnimatePhysics->getStartVelocityY();
+ if( aTemp.hasValue() )
+ {
+ aTemp >>= fTemp;
+ ::sax::Converter::convertDouble( sTmp, fTemp );
+ mxExport->AddAttribute( XML_NAMESPACE_LO_EXT, XML_PHYSICS_ANIMATION_START_VELOCITY_Y, sTmp.makeStringAndClear() );
+ }
+
+ aTemp = xAnimatePhysics->getDensity();
+ if( aTemp.hasValue() )
+ {
+ aTemp >>= fTemp;
+ ::sax::Converter::convertDouble( sTmp, fTemp );
+ mxExport->AddAttribute( XML_NAMESPACE_LO_EXT, XML_PHYSICS_ANIMATION_DENSITY, sTmp.makeStringAndClear() );
+ }
+
+ aTemp = xAnimatePhysics->getBounciness();
+ if( aTemp.hasValue() )
+ {
+ aTemp >>= fTemp;
+ ::sax::Converter::convertDouble( sTmp, fTemp );
+ mxExport->AddAttribute( XML_NAMESPACE_LO_EXT, XML_PHYSICS_ANIMATION_BOUNCINESS, sTmp.makeStringAndClear() );
+ }
}
break;