diff options
author | Noel Grandin <noel@peralex.com> | 2013-02-04 10:20:53 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-02-12 10:14:42 +0200 |
commit | 37ef449b93750b6101cf04b8112fa2ef64ba38ff (patch) | |
tree | 4496badf43c721d95c451e836c4ce1744538e271 /xmloff | |
parent | 790b0c4d5328ccdb6e57206f1db2cd042335c635 (diff) |
fdo#46808, Adapt animations::SequenceTimeContainer UNO service to new style
The service already existed, it just did not have an IDL file
Change-Id: I9698830f9c01936a12669ee950e2b231f303c2f8
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/animationimport.cxx | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx index 6949a0476d8e..32eeae9baa1c 100644 --- a/xmloff/source/draw/animationimport.cxx +++ b/xmloff/source/draw/animationimport.cxx @@ -26,6 +26,7 @@ #include <com/sun/star/presentation/AnimationEffect.hpp> #include <com/sun/star/presentation/AnimationSpeed.hpp> #include <com/sun/star/animations/AnimationNodeType.hpp> +#include <com/sun/star/animations/SequenceTimeContainer.hpp> #include <com/sun/star/animations/XIterateContainer.hpp> #include <com/sun/star/animations/XAnimateMotion.hpp> #include <com/sun/star/animations/XAnimateColor.hpp> @@ -75,19 +76,10 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::animations; using namespace ::com::sun::star::presentation; using namespace ::com::sun::star::drawing; +using namespace ::com::sun::star::uno; using namespace ::xmloff::token; using ::com::sun::star::xml::sax::XAttributeList; -using ::com::sun::star::uno::Any; -using ::com::sun::star::uno::makeAny; -using ::com::sun::star::uno::UNO_QUERY; -using ::com::sun::star::uno::UNO_QUERY_THROW; -using ::com::sun::star::uno::Reference; -using ::com::sun::star::uno::Sequence; -using ::com::sun::star::uno::RuntimeException; -using ::com::sun::star::uno::Exception; -using ::com::sun::star::uno::XInterface; -using ::com::sun::star::uno::Type; using ::com::sun::star::beans::NamedValue; using ::com::sun::star::text::XTextRange; using ::com::sun::star::text::XTextCursor; @@ -1267,7 +1259,7 @@ SvXMLImportContext * AnimationNodeContext::CreateChildContext( sal_uInt16 nPrefi class AnimationsImport: public SvXMLImport, public XAnimationNodeSupplier { public: - AnimationsImport( const Reference< XMultiServiceFactory > & rSMgr ); + AnimationsImport( const Reference< XComponentContext > & rxContext ); ~AnimationsImport() throw (); SvXMLImportContext* CreateContext(sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& xAttrList); @@ -1289,8 +1281,8 @@ private: Reference< XAnimationNode > mxRootNode; }; -AnimationsImport::AnimationsImport( const Reference< XMultiServiceFactory > & rSMgr ) -: SvXMLImport( rSMgr, true ) +AnimationsImport::AnimationsImport( const Reference< XComponentContext > & rxContext ) +: SvXMLImport( Reference<XMultiServiceFactory>(rxContext->getServiceManager(), UNO_QUERY_THROW) , true ) { // add namespaces GetNamespaceMap().Add( @@ -1308,8 +1300,7 @@ AnimationsImport::AnimationsImport( const Reference< XMultiServiceFactory > & rS GetXMLToken(XML_N_ANIMATION), XML_NAMESPACE_ANIMATION); - mxRootNode = Reference< XAnimationNode >::query(rSMgr->createInstance( - OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.animations.SequenceTimeContainer")))); + mxRootNode = Reference<XAnimationNode>( SequenceTimeContainer::create(rxContext), UNO_QUERY_THROW ); } AnimationsImport::~AnimationsImport() throw () @@ -1456,8 +1447,7 @@ OUString SAL_CALL AnimationsImport_getImplementationName() throw() Reference< XInterface > SAL_CALL AnimationsImport_createInstance(const Reference< XMultiServiceFactory > & rSMgr) throw( Exception ) { - return (cppu::OWeakObject*)new xmloff::AnimationsImport( rSMgr ); - + return (cppu::OWeakObject*)new xmloff::AnimationsImport( comphelper::getComponentContext(rSMgr) ); } namespace xmloff |