diff options
Diffstat (limited to 'animations/source')
-rw-r--r-- | animations/source/animcore/animcore.cxx | 36 | ||||
-rw-r--r-- | animations/source/animcore/animcore.xml | 26 | ||||
-rw-r--r-- | animations/source/animcore/factreg.cxx | 4 | ||||
-rw-r--r-- | animations/source/animcore/factreg.hxx | 4 | ||||
-rw-r--r-- | animations/source/animcore/targetpropertiescreator.cxx | 80 |
5 files changed, 75 insertions, 75 deletions
diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 7b18a83e2fe4..59a619b21ccf 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -109,7 +109,7 @@ typedef ::std::list< Reference< XAnimationNode > > ChildList_t; // ==================================================================== -class AnimationNodeBase : public XAnimateMotion, +class AnimationNodeBase : public XAnimateMotion, public XAnimateColor, public XTransitionFilter, public XAnimateSet, @@ -293,7 +293,7 @@ public: void fireChangeListener(); private: - OInterfaceContainerHelper maChangeListener; + OInterfaceContainerHelper maChangeListener; static void initTypeProvider( sal_Int16 nNodeType ) throw(); @@ -311,11 +311,11 @@ private: Sequence< NamedValue > maUserData; // parent interface for XChild interface implementation - Reference<XInterface> mxParent; - AnimationNode* mpParent; + Reference<XInterface> mxParent; + AnimationNode* mpParent; // attributes for XAnimate - Any maTarget; + Any maTarget; OUString maAttributeName, maFormula; Sequence< Any > maValues; Sequence< double > maKeyTimes; @@ -350,10 +350,10 @@ private: // XIterateContainer sal_Int16 mnIterateType; - double mfIterateInterval; + double mfIterateInterval; /** sorted list of child nodes for XTimeContainer*/ - ChildList_t maChilds; + ChildList_t maChilds; }; // ==================================================================== @@ -370,13 +370,13 @@ public: private: /** sorted list of child nodes */ - ChildList_t maChilds; + ChildList_t maChilds; /** current iteration position */ - ChildList_t::iterator maIter; + ChildList_t::iterator maIter; /** our first, last and only protection from mutli-threads! */ - Mutex maMutex; + Mutex maMutex; }; TimeContainerEnumeration::TimeContainerEnumeration( const ChildList_t &rChilds ) @@ -397,7 +397,7 @@ sal_Bool SAL_CALL TimeContainerEnumeration::hasMoreElements() throw (RuntimeExce return maIter != maChilds.end(); } -Any SAL_CALL TimeContainerEnumeration::nextElement() +Any SAL_CALL TimeContainerEnumeration::nextElement() throw (NoSuchElementException, WrappedTargetException, RuntimeException) { Guard< Mutex > aGuard( maMutex ); @@ -414,7 +414,7 @@ Sequence< Type >* AnimationNode::mpTypes[] = { NULL, NULL, NULL, NULL, NULL, NUL Sequence< sal_Int8 >* AnimationNode::mpId[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; AnimationNode::AnimationNode( sal_Int16 nNodeType ) -: maChangeListener(maMutex), +: maChangeListener(maMutex), mnNodeType( nNodeType ), mnFill( AnimationFill::DEFAULT ), mnFillDefault( AnimationFill::INHERIT ), @@ -445,7 +445,7 @@ AnimationNode::AnimationNode( sal_Int16 nNodeType ) } AnimationNode::AnimationNode( const AnimationNode& rNode ) -: AnimationNodeBase(), +: AnimationNodeBase(), maChangeListener(maMutex), mnNodeType( rNode.mnNodeType ), @@ -492,7 +492,7 @@ AnimationNode::AnimationNode( const AnimationNode& rNode ) // attributes for XAnimateTransform mnTransformType( rNode.mnTransformType ), - + // attributes for XTransitionFilter mnTransition( rNode.mnTransition ), mnSubtype( rNode.mnSubtype ), @@ -646,7 +646,7 @@ void AnimationNode::initTypeProvider( sal_Int16 nNodeType ) throw() mpId[nNodeType] = new Sequence< sal_Int8 >( 16 ); rtl_createUuid( (sal_uInt8 *)mpId[nNodeType]->getArray(), 0, sal_True ); - static sal_Int32 type_numbers[] = + static sal_Int32 type_numbers[] = { 7, // CUSTOM 9, // PAR @@ -1161,7 +1161,7 @@ void SAL_CALL AnimationNode::setParent( const Reference< XInterface >& Parent ) mpParent = 0; Reference< XUnoTunnel > xTunnel( mxParent, UNO_QUERY ); if( xTunnel.is() ) - mpParent = reinterpret_cast< AnimationNode* >( sal::static_int_cast< sal_IntPtr >(xTunnel->getSomething( getUnoTunnelId() ))); + mpParent = reinterpret_cast< AnimationNode* >( sal::static_int_cast< sal_IntPtr >(xTunnel->getSomething( getUnoTunnelId() ))); fireChangeListener(); } @@ -1826,7 +1826,7 @@ Reference< XEnumeration > SAL_CALL AnimationNode::createEnumeration() throw (RuntimeException) { Guard< Mutex > aGuard( maMutex ); - + return new TimeContainerEnumeration( maChilds); } diff --git a/animations/source/animcore/animcore.xml b/animations/source/animcore/animcore.xml index 9ccca0f02081..028008fc74ec 100644 --- a/animations/source/animcore/animcore.xml +++ b/animations/source/animcore/animcore.xml @@ -6,25 +6,25 @@ <component-description> <author> Christian Lippka </author> <name> todo </name> - <description> + <description> This component provides ... </description> - <loader-name> com.sun.star.loader.SharedLibrary </loader-name> - <language> c++ </language> - <status value="draft"/> - <supported-service> </supported-service> + <loader-name> com.sun.star.loader.SharedLibrary </loader-name> + <language> c++ </language> + <status value="draft"/> + <supported-service> </supported-service> <service-dependency> ... </service-dependency> <type> ... </type> </component-description> - <project-build-dependency> cppuhelper </project-build-dependency> - <project-build-dependency> cppu </project-build-dependency> - <project-build-dependency> vos </project-build-dependency> - <project-build-dependency> sal </project-build-dependency> + <project-build-dependency> cppuhelper </project-build-dependency> + <project-build-dependency> cppu </project-build-dependency> + <project-build-dependency> vos </project-build-dependency> + <project-build-dependency> sal </project-build-dependency> - <runtime-module-dependency> cppuhelper </runtime-module-dependency> - <runtime-module-dependency> cppu2 </runtime-module-dependency> - <runtime-module-dependency> vos2MSC </runtime-module-dependency> - <runtime-module-dependency> sal2 </runtime-module-dependency> + <runtime-module-dependency> cppuhelper </runtime-module-dependency> + <runtime-module-dependency> cppu2 </runtime-module-dependency> + <runtime-module-dependency> vos2MSC </runtime-module-dependency> + <runtime-module-dependency> sal2 </runtime-module-dependency> </module-description> diff --git a/animations/source/animcore/factreg.cxx b/animations/source/animcore/factreg.cxx index 3cfc350d405d..3dbdf5b10abe 100644 --- a/animations/source/animcore/factreg.cxx +++ b/animations/source/animcore/factreg.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -77,7 +77,7 @@ sal_Bool SAL_CALL component_canUnload( TimeValue *pTime ) { return g_moduleCount.canUnload( &g_moduleCount , pTime ); } - + //================================================================================================== void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** ) diff --git a/animations/source/animcore/factreg.hxx b/animations/source/animcore/factreg.hxx index b76fc1067e0c..d066db028406 100644 --- a/animations/source/animcore/factreg.hxx +++ b/animations/source/animcore/factreg.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -29,7 +29,7 @@ namespace animcore { extern rtl_StandardModuleCount g_moduleCount; - + #define DECL_NODE_FACTORY(N)\ extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstance_##N( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rSMgr ) throw (::com::sun::star::uno::Exception);\ extern ::rtl::OUString getImplementationName_##N();\ diff --git a/animations/source/animcore/targetpropertiescreator.cxx b/animations/source/animcore/targetpropertiescreator.cxx index 0bba7b55d918..160a084fd151 100644 --- a/animations/source/animcore/targetpropertiescreator.cxx +++ b/animations/source/animcore/targetpropertiescreator.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -103,7 +103,7 @@ namespace animcore { return TargetPropertiesCreator::createInstance( rSMgr ); } - + ::rtl::OUString getImplementationName_TargetPropertiesCreator() { return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( IMPLEMENTATION_NAME ) ); @@ -122,7 +122,7 @@ namespace animcore { // Vector containing all properties for a given shape typedef ::std::vector< beans::NamedValue > VectorOfNamedValues; - + /** The hash map key This key contains both XShape reference and a paragraph @@ -132,14 +132,14 @@ namespace animcore struct ShapeHashKey { /// Shape target - uno::Reference< drawing::XShape > mxRef; + uno::Reference< drawing::XShape > mxRef; /** Paragraph index. If this is a pure shape target, mnParagraphIndex is set to -1. */ - sal_Int16 mnParagraphIndex; + sal_Int16 mnParagraphIndex; /// Comparison needed for hash_map bool operator==( const ShapeHashKey& rRHS ) const @@ -164,7 +164,7 @@ namespace animcore // x = (x & 0x00F000F0) << 4) | (x >> 4) & 0x00F000F0 | x & 0xF00FF00F; // x = (x & 0x0C0C0C0C) << 2) | (x >> 2) & 0x0C0C0C0C | x & 0xC3C3C3C3; // x = (x & 0x22222222) << 1) | (x >> 1) & 0x22222222 | x & 0x99999999; - // + // // Costs about 17 cycles on a RISC machine with infinite // instruction level parallelism (~42 basic // instructions). Thus I truly doubt this pays off... @@ -182,9 +182,9 @@ namespace animcore { } - NodeFunctor( XShapeHash& rShapeHash, - const uno::Reference< drawing::XShape >& rTargetShape, - sal_Int16 nParagraphIndex ) : + NodeFunctor( XShapeHash& rShapeHash, + const uno::Reference< drawing::XShape >& rTargetShape, + sal_Int16 nParagraphIndex ) : mrShapeHash( rShapeHash ), mxTargetShape( rTargetShape ), mnParagraphIndex( nParagraphIndex ) @@ -201,7 +201,7 @@ namespace animcore } uno::Reference< drawing::XShape > xTargetShape( mxTargetShape ); - sal_Int16 nParagraphIndex( mnParagraphIndex ); + sal_Int16 nParagraphIndex( mnParagraphIndex ); switch( xNode->getType() ) { @@ -221,12 +221,12 @@ namespace animcore "animcore: NodeFunctor::operator(): no target on ITERATE node" ); return; } - + xTargetShape.set( xIterNode->getTarget(), uno::UNO_QUERY ); if( !xTargetShape.is() ) - { + { ::com::sun::star::presentation::ParagraphTarget aTarget; // no shape provided. Maybe a ParagraphTarget? @@ -237,7 +237,7 @@ namespace animcore "target information" ); return; } - + xTargetShape = aTarget.Shape; nParagraphIndex = aTarget.Paragraph; @@ -257,10 +257,10 @@ namespace animcore NodeFunctor aFunctor( mrShapeHash, xTargetShape, nParagraphIndex ); - if( !::anim::for_each_childNode( xNode, + if( !::anim::for_each_childNode( xNode, aFunctor ) ) { - OSL_ENSURE( false, + OSL_ENSURE( false, "AnimCore: NodeFunctor::operator(): child node iteration failed, " "or extraneous container nodes encountered" ); } @@ -288,9 +288,9 @@ namespace animcore case animations::AnimationNodeType::SET: { // evaluate set node content - uno::Reference< animations::XAnimate > xAnimateNode( xNode, + uno::Reference< animations::XAnimate > xAnimateNode( xNode, uno::UNO_QUERY ); - + if( !xAnimateNode.is() ) break; // invalid node @@ -317,26 +317,26 @@ namespace animcore // not a pure shape target - maybe a // ParagraphTarget? presentation::ParagraphTarget aUnoTarget; - + if( !(xAnimateNode->getTarget() >>= aUnoTarget) ) { OSL_ENSURE( false, "AnimCore: NodeFunctor::operator(): unknown target type encountered" ); break; } - + aTarget.mxRef = aUnoTarget.Shape; aTarget.mnParagraphIndex = aUnoTarget.Paragraph; } } - + if( !aTarget.mxRef.is() ) { OSL_ENSURE( false, "AnimCore: NodeFunctor::operator(): Found target, but XShape is NULL" ); break; // invalid target XShape } - + // check whether we already have an entry for // this target (we only take the first set // effect for every shape) @@ -361,7 +361,7 @@ namespace animcore ::rtl::OUString aString; if( (aAny >>= aString) ) { - // we also take the strings "true" and "false", + // we also take the strings "true" and "false", // as well as "on" and "off" here if( aString.equalsIgnoreAsciiCaseAscii("true") || aString.equalsIgnoreAsciiCaseAscii("on") ) @@ -382,10 +382,10 @@ namespace animcore // first relevant effect. Thus, target // must be initially _hidden_, for the // effect to have visible impact. - mrShapeHash.insert( - XShapeHash::value_type( + mrShapeHash.insert( + XShapeHash::value_type( aTarget, - VectorOfNamedValues( + VectorOfNamedValues( 1, beans::NamedValue( xAnimateNode->getAttributeName(), @@ -398,9 +398,9 @@ namespace animcore } private: - XShapeHash& mrShapeHash; - uno::Reference< drawing::XShape > mxTargetShape; - sal_Int16 mnParagraphIndex; + XShapeHash& mrShapeHash; + uno::Reference< drawing::XShape > mxTargetShape; + sal_Int16 mnParagraphIndex; }; } @@ -422,17 +422,17 @@ namespace animcore // XTargetPropertiesCreator uno::Sequence< animations::TargetProperties > SAL_CALL TargetPropertiesCreator::createInitialTargetProperties - ( - const uno::Reference< animations::XAnimationNode >& xRootNode + ( + const uno::Reference< animations::XAnimationNode >& xRootNode ) throw (uno::RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); // scan all nodes for visibility changes, and record first // 'visibility=true' for each shape - XShapeHash aShapeHash( 101, + XShapeHash aShapeHash( 101, &refhasher ); - + NodeFunctor aFunctor( aShapeHash ); // TODO(F1): Maybe limit functor application to main sequence @@ -449,25 +449,25 @@ namespace animcore uno::Sequence< animations::TargetProperties > aRes( aShapeHash.size() ); - ::std::size_t nCurrIndex(0); - XShapeHash::const_iterator aCurr( aShapeHash.begin() ); - const XShapeHash::const_iterator aEnd ( aShapeHash.end() ); + ::std::size_t nCurrIndex(0); + XShapeHash::const_iterator aCurr( aShapeHash.begin() ); + const XShapeHash::const_iterator aEnd ( aShapeHash.end() ); while( aCurr != aEnd ) { animations::TargetProperties& rCurrProps( aRes[ nCurrIndex++ ] ); - if( aCurr->first.mnParagraphIndex == -1 ) - { + if( aCurr->first.mnParagraphIndex == -1 ) + { rCurrProps.Target = uno::makeAny( aCurr->first.mxRef ); } else { - rCurrProps.Target = uno::makeAny( + rCurrProps.Target = uno::makeAny( presentation::ParagraphTarget( aCurr->first.mxRef, aCurr->first.mnParagraphIndex ) ); } - + rCurrProps.Properties = ::comphelper::containerToSequence( aCurr->second ); ++aCurr; @@ -491,7 +491,7 @@ namespace animcore { uno::Sequence< ::rtl::OUString > aRet(1); aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) ); - + return aRet; } |