core.git: animations/source avmedia/source
animations/source/animcore/animcore.cxx | 12 +++--- avmedia/source/framework/MediaControlBase.cxx | 48 +- avmedia/source/framework/mediacontrol.cxx | 30 avmedia/source/framework/mediaitem.cxx|4 +- avmedia/source/framework/mediatoolbox.cxx |4 +- avmedia/source/gstreamer/gstmanager.cxx |4 +- avmedia/source/viewer/mediawindow.cxx |4 +- avmedia/source/viewer/mediawindow_impl.cxx|4 +- 8 files changed, 55 insertions(+), 55 deletions(-) New commits: commit 8b091048d1e02f73dfc80b7e981bcd58fb801902 Author: Noel Grandin AuthorDate: Mon May 6 10:17:16 2024 +0200 Commit: Noel Grandin CommitDate: Mon May 6 15:14:09 2024 +0200 loplugin:ostr avmedia Change-Id: Ice017029f0b93ae92e76d3905f38c730cc5a2fc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167189 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 9e097ec98733..76bac60014c0 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -1893,7 +1893,7 @@ Reference< XAnimationNode > SAL_CALL AnimationNode::insertBefore( const Referenc std::unique_lock l( m_aMutex ); if( !newChild.is() || !refChild.is() ) -throw IllegalArgumentException("no child", static_cast(this), -1); +throw IllegalArgumentException(u"no child"_ustr, static_cast(this), -1); if( std::find(maChildren.begin(), maChildren.end(), newChild) != maChildren.end() ) throw ElementExistException(); @@ -1918,7 +1918,7 @@ Reference< XAnimationNode > SAL_CALL AnimationNode::insertAfter( const Reference std::unique_lock l( m_aMutex ); if( !newChild.is() || !refChild.is() ) -throw IllegalArgumentException("no child", static_cast(this), -1); +throw IllegalArgumentException(u"no child"_ustr, static_cast(this), -1); if( std::find(maChildren.begin(), maChildren.end(), newChild) != maChildren.end() ) throw ElementExistException(); @@ -1947,7 +1947,7 @@ Reference< XAnimationNode > SAL_CALL AnimationNode::replaceChild( const Referenc std::unique_lock l( m_aMutex ); if( !newChild.is() || !oldChild.is() ) -throw IllegalArgumentException("no child", static_cast(this), -1); +throw IllegalArgumentException(u"no child"_ustr, static_cast(this), -1); if( std::find(maChildren.begin(), maChildren.end(), newChild) != maChildren.end() ) throw ElementExistException(); @@ -1973,7 +1973,7 @@ Reference< XAnimationNode > SAL_CALL AnimationNode::removeChild( const Reference std::unique_lock l( m_aMutex ); if( !oldChild.is() ) -throw IllegalArgumentException("no child", static_cast(this), 1); +throw IllegalArgumentException(u"no child"_ustr, static_cast(this), 1); auto old = std::find(maChildren.begin(), maChildren.end(), oldChild); if( old == maChildren.end() ) @@ -1996,13 +1996,13 @@ Reference< XAnimationNode > SAL_CALL AnimationNode::appendChild( const Reference std::unique_lock aGuard( m_aMutex ); if( !newChild.is() ) -throw IllegalArgumentException("no child", xThis, 1); +throw IllegalArgumentException(u"no child"_ustr, xThis, 1); if( std::find(maChildren.begin(), maChildren.end(), newChild) != maChildren.end() ) throw ElementExistException({}, xThis); if( xThis == newChild ) -throw IllegalArgumentException("cannot append self", xThis, -1); +throw IllegalArgumentException(u"cannot append self"_ustr, xThis, -1); maChildren.push_back( newChild ); } diff --git a/avmedia/source/framework/MediaControlBase.cxx b/avmedia/source/framework/MediaControlBase.cxx index fb8f91066b67..9d09e925372c 100644 --- a/avmedia/source/framework/MediaControlBase.cxx +++ b/avmedia/source/framework/MediaControlBase.cxx @@ -106,11 +106,11 @@ void MediaControlBase::UpdateTimeSlider( MediaItem const & aMediaItem ) void MediaControlBase::InitializeWidgets() { -mxPlayToolBox->set_item_help_id("play", HID_AVMEDIA_TOOLBOXITEM_PLAY); -mxPlayToolBox->set_item_help_id("pause", HID_AVMEDIA_TOOLBOXITEM_PAUSE); -mxPlayToolBox->set_item_help_id("stop", HID_AVMEDIA_TOOLBOXITEM_STOP); -mxPlayToolBox->set_item_help_id("loop", HID_AVMEDIA_TOOLBOXITEM_LOOP); -mxMuteToolBox->set_item_help_id("mute", HID_AVMEDIA_TOOLBOXITEM_MUTE); +mxPlayToolBox->set_item_help_id(u"play"_ustr, HID_AVMEDIA_TOOLBOXITEM_PLAY); +mxPlayToolBox->set_item_help_id(u"pause"_ustr, HID_AVMEDIA_TOOLBOXITEM_PAUSE); +mxPlayToolBox->set_item_help_id(u"stop"_ustr, HID_AVMEDIA_TOOLBOXITEM_STOP); +mxPlayToolBox->set_item_help_id(u"loop"_ustr, HID_AVMEDIA_TOOLBOXITEM_LOOP); +mxMuteToolBox->set_item_help_id(u"mute"_ustr, HID_AVMEDIA_TOOLBOXITEM_MUTE); mxZoomListBox-
core.git: animations/source
animations/source/animcore/animcore.cxx |4 1 file changed, 4 deletions(-) New commits: commit 4f680db872ae42912a417ca8d68f68e6acc8d3dd Author: Gabor Kelemen AuthorDate: Thu Feb 22 12:03:04 2024 +0100 Commit: Gabor Kelemen CommitDate: Fri Mar 8 09:13:28 2024 +0100 tdf#146619 Recheck animations/ with IWYU Change-Id: I72a2f335ba2a786ddd0b59ecad76bfa039e5cdec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164487 Tested-by: Jenkins Reviewed-by: Gabor Kelemen diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index a8511a4051f2..9e097ec98733 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -45,16 +45,12 @@ #include #include #include -#include -#include #include #include #include -#include #include -#include #include #include #include
core.git: animations/source
animations/source/animcore/animcore.cxx | 48 1 file changed, 24 insertions(+), 24 deletions(-) New commits: commit c4fb690e6f4aedde124c045bd136f8f7c1e974a4 Author: Arnaud VERSINI AuthorDate: Sun Jan 7 13:39:23 2024 +0100 Commit: Noel Grandin CommitDate: Sun Jan 21 13:51:07 2024 +0100 animations : use string OUString literals in a11y for XServiceInfo impl Change-Id: Ifd23fd38e5fa289e9606ba0a8d5a04449ddcb0ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161738 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 66b24a2b52b5..a8511a4051f2 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -512,122 +512,122 @@ AnimationNode::AnimationNode( const AnimationNode& rNode ) static Sequence getSupportedServiceNames_PAR() { -return { "com.sun.star.animations.ParallelTimeContainer" }; +return { u"com.sun.star.animations.ParallelTimeContainer"_ustr }; } static OUString getImplementationName_PAR() { -return "animcore::ParallelTimeContainer"; +return u"animcore::ParallelTimeContainer"_ustr; } static Sequence getSupportedServiceNames_SEQ() { -return { "com.sun.star.animations.SequenceTimeContainer" }; +return { u"com.sun.star.animations.SequenceTimeContainer"_ustr }; } static OUString getImplementationName_SEQ() { -return "animcore::SequenceTimeContainer"; +return u"animcore::SequenceTimeContainer"_ustr; } static Sequence getSupportedServiceNames_ITERATE() { -return { "com.sun.star.animations.IterateContainer" }; +return { u"com.sun.star.animations.IterateContainer"_ustr }; } static OUString getImplementationName_ITERATE() { -return "animcore::IterateContainer"; +return u"animcore::IterateContainer"_ustr; } static Sequence getSupportedServiceNames_ANIMATE() { -return { "com.sun.star.animations.Animate" }; +return { u"com.sun.star.animations.Animate"_ustr }; } static OUString getImplementationName_ANIMATE() { -return "animcore::Animate"; +return u"animcore::Animate"_ustr; } static Sequence getSupportedServiceNames_SET() { -return { "com.sun.star.animations.AnimateSet" }; +return { u"com.sun.star.animations.AnimateSet"_ustr }; } static OUString getImplementationName_SET() { -return "animcore::AnimateSet"; +return u"animcore::AnimateSet"_ustr; } static Sequence getSupportedServiceNames_ANIMATECOLOR() { -return { "com.sun.star.animations.AnimateColor" }; +return { u"com.sun.star.animations.AnimateColor"_ustr }; } static OUString getImplementationName_ANIMATECOLOR() { -return "animcore::AnimateColor"; +return u"animcore::AnimateColor"_ustr; } static Sequence getSupportedServiceNames_ANIMATEMOTION() { -return { "com.sun.star.animations.AnimateMotion" }; +return { u"com.sun.star.animations.AnimateMotion"_ustr }; } static OUString getImplementationName_ANIMATEMOTION() { -return "animcore::AnimateMotion"; +return u"animcore::AnimateMotion"_ustr; } static Sequence getSupportedServiceNames_ANIMATEPHYSICS() { -return { "com.sun.star.animations.AnimatePhysics" }; +return { u"com.sun.star.animations.AnimatePhysics"_ustr }; } static OUString getImplementationName_ANIMATEPHYSICS() { -return "animcore::AnimatePhysics"; +return u"animcore::AnimatePhysics"_ustr; } static Sequence getSupportedServiceNames_ANIMATETRANSFORM() { -return { "com.sun.star.animations.AnimateTransform" }; +return { u"com.sun.star.animations.AnimateTransform"_ustr }; } static OUString getImplementationName_ANIMATETRANSFORM() { -return "animcore::AnimateTransform"; +return u"animcore::AnimateTransform"_ustr; } static Sequence getSupportedServiceNames_TRANSITIONFILTER() { -return { "com.sun.star.animations.TransitionFilter" }; +return { u"com.sun.star.animations.TransitionFilter"_ustr }; } static OUString getImplementationName_TRANSITIONFILTER() { -return "animcore::TransitionFilter"; +return u"animcore::TransitionFilter"_ustr; } static Sequence getSupportedServiceNames_AUDIO() { -return { "com.sun.star.animations.Audio" }; +return { u"com.sun.star.animations.Audio"_ustr }; } static OUString getImplementationName_AUDIO() { -return "animcore::Audio"; +return u"animcore::Audio"_ustr; } static Sequence getSupportedServiceNames_COMMAND() { -return { "com.sun.star.animations.Command" }; +return { u"com.sun.star.animations.Command"_ustr }; } static OUString getImplementationName_COMMAND() { -return "animcore::Command"; +return u"animcore::Command"_ustr; } // XInterface
[Libreoffice-commits] core.git: animations/source
animations/source/animcore/animcore.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit da9582aacb3fa9f00f172e0698b3b53aedee87f9 Author: Arnaud Versini AuthorDate: Thu Sep 21 13:58:29 2023 +0200 Commit: Arnaud Versini CommitDate: Sat Sep 23 11:29:24 2023 +0200 animations : remove useless use of XComponentContext Change-Id: Ie7aa03a9ff1127f2c73ab30528dd2b732f6c4b68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157143 Tested-by: Jenkins Reviewed-by: Arnaud Versini diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 7592109c4855..66b24a2b52b5 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -72,7 +72,6 @@ using ::com::sun::star::uno::UNO_QUERY; using ::com::sun::star::uno::XInterface; using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::Reference; -using ::com::sun::star::uno::XComponentContext; using ::com::sun::star::uno::Exception; using ::com::sun::star::uno::XWeak; using ::com::sun::star::uno::Type;
[Libreoffice-commits] core.git: animations/source comphelper/source framework/source sw/source toolkit/source ucbhelper/source vcl/source
animations/source/animcore/animcore.cxx |6 +++-- comphelper/source/property/propshlp.cxx | 12 +- framework/source/uiconfiguration/imagemanagerimpl.cxx |3 ++ sw/source/core/access/accmap.cxx |1 toolkit/source/controls/tree/treedatamodel.cxx|3 -- ucbhelper/source/provider/resultset.cxx |6 - vcl/source/window/dndlistenercontainer.cxx| 21 ++ 7 files changed, 28 insertions(+), 24 deletions(-) New commits: commit 31e2b4746a4a5d7661c4aa8f6a4489e50982aede Author: Noel Grandin AuthorDate: Fri May 5 21:00:24 2023 +0200 Commit: Noel Grandin CommitDate: Sun May 7 08:00:46 2023 +0200 improve some usage of OInterfaceIteratorHelper4 we can drop the lock immediately after construction (since the iterator holds a thread-safe COW link to the underlying listener container) Change-Id: I08f8fa9ed7393747938572097f3c25f5f3f847fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151440 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 09a2e793b2c0..03c815021c93 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -2076,14 +2076,16 @@ void SAL_CALL AnimationNode::removeChangesListener( const Reference< XChangesLis void AnimationNode::fireChangeListener(std::unique_lock& l) { -OInterfaceIteratorHelper4 aIterator( l, maChangeListener ); -if( aIterator.hasMoreElements() ) +if( maChangeListener.getLength(l) != 0 ) { Reference< XInterface > xSource( static_cast(this), UNO_QUERY ); Sequence< ElementChange > aChanges; const ChangesEvent aEvent( xSource, Any( css::uno::Reference(static_cast(mxParent.get().get())) ), aChanges ); +OInterfaceIteratorHelper4 aIterator( l, maChangeListener ); +l.unlock(); while( aIterator.hasMoreElements() ) aIterator.next()->changesOccurred( aEvent ); +l.lock(); } //fdo#69645 use WeakReference of mxParent to test if mpParent is still valid diff --git a/comphelper/source/property/propshlp.cxx b/comphelper/source/property/propshlp.cxx index 97b89f1aaf1d..dd227cc15e25 100644 --- a/comphelper/source/property/propshlp.cxx +++ b/comphelper/source/property/propshlp.cxx @@ -582,10 +582,10 @@ void OPropertySetHelper::fire(std::unique_lock& rGuard, sal_Int32* p // Here is a Bug, unbound properties are also fired OInterfaceIteratorHelper4 aIt(rGuard, maPropertiesChangeListeners); +rGuard.unlock(); while (aIt.hasMoreElements()) { XPropertiesChangeListener* pL = aIt.next().get(); -rGuard.unlock(); try { try @@ -613,8 +613,8 @@ void OPropertySetHelper::fire(std::unique_lock& rGuard, sal_Int32* p if (!bIgnoreRuntimeExceptionsWhileFiring) throw; } -rGuard.lock(); } +rGuard.lock(); } void OPropertySetHelper::fireVetoableChangeListeners( @@ -626,10 +626,10 @@ void OPropertySetHelper::fireVetoableChangeListeners( return; // Iterate over all listeners and send events OInterfaceIteratorHelper4 aIt(rGuard, *pListeners); +rGuard.unlock(); while (aIt.hasMoreElements()) { XVetoableChangeListener* pL = aIt.next().get(); -rGuard.unlock(); try { try @@ -655,8 +655,8 @@ void OPropertySetHelper::fireVetoableChangeListeners( if (!m_bIgnoreRuntimeExceptionsWhileFiring) throw; } -rGuard.lock(); } +rGuard.lock(); } void OPropertySetHelper::firePropertyChangeListeners( @@ -668,10 +668,10 @@ void OPropertySetHelper::firePropertyChangeListeners( return; // Iterate over all listeners and send events OInterfaceIteratorHelper4 aIt(rGuard, *pListeners); +rGuard.unlock(); while (aIt.hasMoreElements()) { XPropertyChangeListener* pL = aIt.next().get(); -rGuard.unlock(); try { try @@ -697,8 +697,8 @@ void OPropertySetHelper::firePropertyChangeListeners( if (!m_bIgnoreRuntimeExceptionsWhileFiring) throw; } -rGuard.lock(); } +rGuard.lock(); } // OPropertySetHelper diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx index 26aa0f33400c..0152387cc0b4 100644 --- a/framework/source/uiconfiguration/imagemanagerimpl.cxx +++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx @@ -1169,6 +1169,7 @@ void ImageManagerImpl::implts_notifyContainerListener( const ConfigurationEvent& { std::unique_lock aGuard(m_mutex); comphelper::OInterfaceIteratorHelper4 pIterator( aGuard, m_aConfigListeners ); +aGuard.unlock();
[Libreoffice-commits] core.git: animations/source chart2/source connectivity/source cui/source
animations/source/animcore/animcore.cxx |3 --- chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx |1 - chart2/source/controller/dialogs/RangeSelectionListener.cxx |2 -- chart2/source/controller/dialogs/dlg_DataSource.cxx |2 -- chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx |1 - chart2/source/controller/dialogs/tp_DataSource.cxx |1 - chart2/source/controller/inc/dlg_CreationWizard.hxx |1 - chart2/source/controller/main/ChartController_EditData.cxx |2 -- chart2/source/controller/main/ChartModelClone.cxx|4 chart2/source/controller/main/DragMethod_Base.cxx|2 -- chart2/source/controller/main/DragMethod_RotateDiagram.cxx |1 - chart2/source/controller/main/UndoActions.cxx|2 -- chart2/source/model/template/NetChartTypeTemplate.cxx|1 - chart2/source/tools/ControllerLockGuard.cxx |2 -- chart2/source/tools/FormattedStringHelper.cxx|1 - chart2/source/view/main/ExplicitValueProvider.cxx|2 -- connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx|2 -- connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.hxx |2 -- connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.hxx |2 -- connectivity/source/drivers/mysqlc/mysqlc_resultset.hxx |2 -- connectivity/source/drivers/mysqlc/mysqlc_resultsetmetadata.hxx |4 connectivity/source/drivers/mysqlc/mysqlc_statement.hxx |2 -- connectivity/source/drivers/postgresql/pq_driver.cxx |4 cui/source/dialogs/AdditionsDialog.cxx |6 -- 24 files changed, 52 deletions(-) New commits: commit b4b3a0d40707f9ec126d7238b2974ac6ff7ee359 Author: Gabor Kelemen AuthorDate: Wed Apr 12 00:14:17 2023 +0200 Commit: Miklos Vajna CommitDate: Thu Apr 20 08:24:33 2023 +0200 Run clang-tidy with misc-unused-using-decls on modules [a-c]* To remove unneeded using declarations. Via the simple script: for i in $(find $dirname -name "*cxx" -o -name "*hxx" ); do clang-tidy-12 --checks="-*,misc-unused-using-decls" "$i"; done Change-Id: I95871cc0ae6f22a9684bae9d14ef0475aea17abb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150608 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 8963fa9f39c6..09a2e793b2c0 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -65,8 +65,6 @@ namespace com::sun::star::uno { class XComponentContext; } namespace com::sun::star::beans { struct NamedValue; } -using ::osl::Mutex; -using ::osl::Guard; using ::comphelper::OInterfaceContainerHelper4; using ::comphelper::OInterfaceIteratorHelper4; using ::com::sun::star::uno::Any; @@ -74,7 +72,6 @@ using ::com::sun::star::uno::UNO_QUERY; using ::com::sun::star::uno::XInterface; using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::Reference; -using ::com::sun::star::uno::WeakReference; using ::com::sun::star::uno::XComponentContext; using ::com::sun::star::uno::Exception; using ::com::sun::star::uno::XWeak; diff --git a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx index 89a4f6e3bc0a..d775dbdae67b 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx @@ -34,7 +34,6 @@ using namespace ::com::sun::star; using ::com::sun::star::uno::Any; -using ::com::sun::star::uno::Sequence; using ::com::sun::star::beans::Property; namespace chart::wrapper diff --git a/chart2/source/controller/dialogs/RangeSelectionListener.cxx b/chart2/source/controller/dialogs/RangeSelectionListener.cxx index 33c398e76991..e4974ab30de0 100644 --- a/chart2/source/controller/dialogs/RangeSelectionListener.cxx +++ b/chart2/source/controller/dialogs/RangeSelectionListener.cxx @@ -23,8 +23,6 @@ using namespace ::com::sun::star; -using ::com::sun::star::uno::Reference; - namespace chart { diff --git a/chart2/source/controller/dialogs/dlg_DataSource.cxx b/chart2/source/controller/dialogs/dlg_DataSource.cxx index 4946edc0ffc5..1eb6202deb4b 100644 --- a/chart2/source/controller/dialogs/dlg_DataSource.cxx +++ b/chart2/source/controller/dialogs/dlg_DataSource.cxx @@ -34,8 +34,6 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::chart2; using namespace ::chart; -using ::com::sun::star::uno::Reference; - namespace chart { diff --git a/chart2/source/contr
[Libreoffice-commits] core.git: animations/source
animations/source/animcore/animcore.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit bed16c5e9df1eea4187b2b47a357414b3940bc91 Author: Andrea Gelmini AuthorDate: Tue Jan 31 10:45:40 2023 +0100 Commit: Julien Nabet CommitDate: Wed Feb 1 05:46:46 2023 + Remove duplicated include Change-Id: I84dc37baac93f946bd66b6d709a43529d023dac6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146381 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 0f6f03aadabd..8963fa9f39c6 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -61,7 +61,6 @@ #include #include #include -#include namespace com::sun::star::uno { class XComponentContext; } namespace com::sun::star::beans { struct NamedValue; }
[Libreoffice-commits] core.git: animations/source
animations/source/animcore/animcore.cxx | 365 1 file changed, 185 insertions(+), 180 deletions(-) New commits: commit 07699b6e7847c141c0bdec2e5345f2d00cb219dd Author: Noel Grandin AuthorDate: Mon Jan 30 22:09:27 2023 +0200 Commit: Noel Grandin CommitDate: Tue Jan 31 08:20:30 2023 + osl::Mutex->std::mutex in AnimationNode Change-Id: I9a07afcdf17ca464e6a1083fbd7ec1e1f7186a30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146369 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 16254209fcf3..0f6f03aadabd 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -48,17 +48,17 @@ #include #include #include -#include +#include #include #include #include #include -#include #include #include #include +#include #include #include #include @@ -68,8 +68,8 @@ namespace com::sun::star::beans { struct NamedValue; } using ::osl::Mutex; using ::osl::Guard; -using ::comphelper::OInterfaceContainerHelper3; -using ::comphelper::OInterfaceIteratorHelper3; +using ::comphelper::OInterfaceContainerHelper4; +using ::comphelper::OInterfaceIteratorHelper4; using ::com::sun::star::uno::Any; using ::com::sun::star::uno::UNO_QUERY; using ::com::sun::star::uno::XInterface; @@ -104,8 +104,7 @@ namespace animcore { namespace { -class AnimationNodeBase : public cppu::BaseMutex, -public XAnimateMotion, +class AnimationNodeBase : public XAnimateMotion, public XAnimatePhysics, public XAnimateColor, public XTransitionFilter, @@ -291,10 +290,11 @@ public: virtual void SAL_CALL addChangesListener( const Reference< XChangesListener >& aListener ) override; virtual void SAL_CALL removeChangesListener( const Reference< XChangesListener >& aListener ) override; -void fireChangeListener(); +void fireChangeListener(std::unique_lock&); private: -OInterfaceContainerHelper3 maChangeListener; +std::mutex m_aMutex; +OInterfaceContainerHelper4 maChangeListener; static void initTypeProvider( sal_Int16 nNodeType ) noexcept; @@ -411,7 +411,6 @@ std::array*, 13> AnimationNode::mpTypes = { nullptr, nullptr, n AnimationNode::AnimationNode( sal_Int16 nNodeType ) : AnimationNodeBase(), -maChangeListener(m_aMutex), mnNodeType( nNodeType ), mnFill( AnimationFill::DEFAULT ), mnFillDefault( AnimationFill::INHERIT ), @@ -444,7 +443,6 @@ AnimationNode::AnimationNode( sal_Int16 nNodeType ) AnimationNode::AnimationNode( const AnimationNode& rNode ) : AnimationNodeBase(), -maChangeListener(m_aMutex), mnNodeType( rNode.mnNodeType ), // attributes for the XAnimationNode interface implementation @@ -918,7 +916,7 @@ Sequence< OUString > AnimationNode::getSupportedServiceNames() // XAnimationNode sal_Int16 SAL_CALL AnimationNode::getType() { -Guard< Mutex > aGuard( m_aMutex ); +std::unique_lock aGuard( m_aMutex ); return mnNodeType; } @@ -926,7 +924,7 @@ sal_Int16 SAL_CALL AnimationNode::getType() // XAnimationNode Any SAL_CALL AnimationNode::getBegin() { -Guard< Mutex > aGuard( m_aMutex ); +std::unique_lock aGuard( m_aMutex ); return maBegin; } @@ -934,11 +932,11 @@ Any SAL_CALL AnimationNode::getBegin() // XAnimationNode void SAL_CALL AnimationNode::setBegin( const Any& _begin ) { -Guard< Mutex > aGuard( m_aMutex ); +std::unique_lock aGuard( m_aMutex ); if( _begin != maBegin ) { maBegin = _begin; -fireChangeListener(); +fireChangeListener(aGuard); } } @@ -946,7 +944,7 @@ void SAL_CALL AnimationNode::setBegin( const Any& _begin ) // XAnimationNode Any SAL_CALL AnimationNode::getDuration() { -Guard< Mutex > aGuard( m_aMutex ); +std::unique_lock aGuard( m_aMutex ); return maDuration; } @@ -954,11 +952,11 @@ Any SAL_CALL AnimationNode::getDuration() // XAnimationNode void SAL_CALL AnimationNode::setDuration( const Any& _duration ) { -Guard< Mutex > aGuard( m_aMutex ); +std::unique_lock aGuard( m_aMutex ); if( _duration != maDuration ) { maDuration = _duration; -fireChangeListener(); +fireChangeListener(aGuard); } } @@ -966,7 +964,7 @@ void SAL_CALL AnimationNode::setDuration( const Any& _duration ) // XAnimationNode Any SAL_CALL AnimationNode::getEnd() { -Guard< Mutex > aGuard( m_aMutex ); +std::unique_lock aGuard( m_aMutex ); return maEnd; } @@ -974,11 +972,11 @@ Any SAL_CALL AnimationNode::getEnd() // XAnimationNode void SAL_CALL AnimationNode::setEnd( const Any& _end ) { -Guard< Mutex > aGuard( m_aMutex ); +std::unique_lock aGuard( m_aMutex ); if( _end != maEnd ) { maEnd = _end; -
[Libreoffice-commits] core.git: animations/source
animations/source/animcore/animcore.cxx | 76 ++-- 1 file changed, 25 insertions(+), 51 deletions(-) New commits: commit ee284e65d2b1cad231d316efe0ef31232dfa8d02 Author: Noel Grandin AuthorDate: Mon Jan 23 09:37:11 2023 +0200 Commit: Noel Grandin CommitDate: Mon Jan 23 10:10:18 2023 + XUnoTunnel->dynamic_cast in AnimationNode Change-Id: I9684ac5987c087797e1ca7a8ddb0f9c5b731faed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145992 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index a22c413e64f8..16254209fcf3 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -45,7 +45,6 @@ #include #include #include -#include #include #include #include @@ -58,6 +57,7 @@ #include #include #include +#include #include #include #include @@ -90,7 +90,6 @@ using ::com::sun::star::container::XEnumeration; using ::com::sun::star::container::XEnumerationAccess; using ::com::sun::star::beans::NamedValue; using ::com::sun::star::util::XCloneable; -using ::com::sun::star::lang::XUnoTunnel; using ::com::sun::star::util::XChangesNotifier; using ::com::sun::star::util::XChangesListener; using ::com::sun::star::util::ElementChange; @@ -120,7 +119,6 @@ class AnimationNodeBase : public cppu::BaseMutex, public XCommand, public XCloneable, public XChangesNotifier, -public XUnoTunnel, public OWeakObject { @@ -293,10 +291,6 @@ public: virtual void SAL_CALL addChangesListener( const Reference< XChangesListener >& aListener ) override; virtual void SAL_CALL removeChangesListener( const Reference< XChangesListener >& aListener ) override; -// XUnoTunnel -virtual ::sal_Int64 SAL_CALL getSomething( const Sequence< ::sal_Int8 >& aIdentifier ) override; - -static const Sequence< sal_Int8 > & getUnoTunnelId(); void fireChangeListener(); private: @@ -317,8 +311,7 @@ private: Sequence< NamedValue > maUserData; // parent interface for XChild interface implementation -WeakReference mxParent; -AnimationNode* mpParent; +unotools::WeakReference mxParent; // attributes for XAnimate Any maTarget; @@ -427,7 +420,6 @@ AnimationNode::AnimationNode( sal_Int16 nNodeType ) mfAcceleration( 0.0 ), mfDecelerate( 0.0 ), mbAutoReverse( false ), -mpParent(nullptr), mnValueType( 0 ), mnSubItem( 0 ), mnCalcMode( (nNodeType == AnimationNodeType::ANIMATEMOTION) ? AnimationCalcMode::PACED : AnimationCalcMode::LINEAR), @@ -470,7 +462,6 @@ AnimationNode::AnimationNode( const AnimationNode& rNode ) mfDecelerate( rNode.mfDecelerate ), mbAutoReverse( rNode.mbAutoReverse ), maUserData( rNode.maUserData ), -mpParent(nullptr), // attributes for XAnimate maTarget( rNode.maTarget ), @@ -658,8 +649,7 @@ Any SAL_CALL AnimationNode::queryInterface( const Type& aType ) static_cast< XAnimationNode* >( static_cast< XTimeContainer * >( static_cast< XIterateContainer * >(this) ) ), static_cast< XInterface* >(static_cast< OWeakObject * >(this)), static_cast< XWeak* >(static_cast< OWeakObject * >(this)), -static_cast< XChangesNotifier* >( this ), -static_cast< XUnoTunnel* >( this ) ) ); +static_cast< XChangesNotifier* >( this ) ) ); if(!aRet.hasValue()) { @@ -754,19 +744,19 @@ void AnimationNode::initTypeProvider( sal_Int16 nNodeType ) noexcept static constexpr std::array type_numbers = { -7, // CUSTOM -9, // PAR -9, // SEQ -9, // ITERATE -8, // ANIMATE -8, // SET -8, // ANIMATEMOTION -8, // ANIMATECOLOR -8, // ANIMATETRANSFORM -8, // TRANSITIONFILTER -8, // AUDIO -8, // COMMAND -8, // ANIMATEPHYSICS +6, // CUSTOM +8, // PAR +8, // SEQ +8, // ITERATE +7, // ANIMATE +7, // SET +7, // ANIMATEMOTION +7, // ANIMATECOLOR +7, // ANIMATETRANSFORM +7, // TRANSITIONFILTER +7, // AUDIO +7, // COMMAND +7, // ANIMATEPHYSICS }; // collect types @@ -779,7 +769,6 @@ void AnimationNode::initTypeProvider( sal_Int16 nNodeType ) noexcept pTypeAr[nPos++] = cppu::UnoType::get(); pTypeAr[nPos++] = cppu::UnoType::get(); pTypeAr[nPos++] = cppu::UnoType::get(); -pTypeAr[nPos++] = cppu::UnoType::get(); pTypeAr[nPos++] = cppu::UnoType::get(); switch( nNodeType ) @@ -1213,7 +1202,7 @@ void SAL_CALL AnimationNode::setUserData( const Sequence< NamedValue >& _userdat Reference< XInterface > SAL_CALL AnimationNode::getParent() { Guard< Mutex > aGuard( m
[Libreoffice-commits] core.git: animations/source
animations/source/animcore/animcore.cxx | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) New commits: commit f22a9447c58f2026bc765286a626b3b746977f19 Author: Mike Kaganski AuthorDate: Thu Jan 12 11:06:42 2023 +0300 Commit: Mike Kaganski CommitDate: Thu Jan 12 12:40:55 2023 + Simplify a bit Change-Id: I8e86aa5a43f7c0bc234331def1b4440dbe2cefa4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145389 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 05b3ae010561..a22c413e64f8 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -2015,15 +2015,13 @@ Reference< XAnimationNode > SAL_CALL AnimationNode::appendChild( const Reference Guard< Mutex > aGuard( m_aMutex ); if( !newChild.is() ) -throw IllegalArgumentException("no child", static_cast(this), 1); +throw IllegalArgumentException("no child", xThis, 1); if( std::find(maChildren.begin(), maChildren.end(), newChild) != maChildren.end() ) -throw ElementExistException(); +throw ElementExistException({}, xThis); -Reference< XInterface > xChild( newChild ); - -if( xThis == xChild ) -throw IllegalArgumentException("cannot append self", static_cast(this), -1); +if( xThis == newChild ) +throw IllegalArgumentException("cannot append self", xThis, -1); maChildren.push_back( newChild ); }
[Libreoffice-commits] core.git: animations/source
animations/source/animcore/animcore.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 2fffe41501aa694082da2ac92e925b98c704bffd Author: Arnaud VERSINI AuthorDate: Sat Jul 16 20:30:15 2022 +0200 Commit: Noel Grandin CommitDate: Sun Jul 17 19:29:22 2022 +0200 Animations : no need to use the global mutex here Change-Id: Ia63a570efdd15c60fc31d978a23e76102e466745 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137141 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 737da604a594..04e7a7daa879 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -745,7 +745,9 @@ Any SAL_CALL AnimationNode::queryInterface( const Type& aType ) void AnimationNode::initTypeProvider( sal_Int16 nNodeType ) noexcept { -::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); +static std::mutex aMutex; + +std::scoped_lock aGuard(aMutex); if( mpTypes[nNodeType] ) return;
[Libreoffice-commits] core.git: animations/source
animations/source/animcore/animcore.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit d1cdf9a24de0d87f22e283f5cb2ed93ff6e83ee6 Author: Stephan Bergmann AuthorDate: Tue May 31 20:35:26 2022 +0200 Commit: Stephan Bergmann CommitDate: Tue May 31 22:42:14 2022 +0200 Also assert that nNodeType is non-negative ...given that nNodeType aka AnimationNode::mnNodeType is later used as an index into the AnimationNode::mpTypes array Change-Id: Ic208fbdfaa8dcca44ff2a99cf3b169904b14a4bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135203 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index c02ba3ca2878..737da604a594 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -55,6 +55,7 @@ #include +#include #include #include #include @@ -446,7 +447,7 @@ AnimationNode::AnimationNode( sal_Int16 nNodeType ) mnIterateType( css::presentation::ShapeAnimationSubType::AS_WHOLE ), mfIterateInterval(0.0) { -assert(nNodeType < int(mpTypes.size())); +assert(nNodeType >= 0 && o3tl::make_unsigned(nNodeType) < mpTypes.size()); } AnimationNode::AnimationNode( const AnimationNode& rNode )
[Libreoffice-commits] core.git: animations/source
animations/source/animcore/animcore.cxx | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) New commits: commit e855dc52266eab9b43f5f2f679c84eb6e30be46e Author: Noel Grandin AuthorDate: Sat May 7 08:55:07 2022 +0200 Commit: Noel Grandin CommitDate: Sat May 7 14:24:10 2022 +0200 osl::Mutex->std::mutex in TimeContainerEnumeration Change-Id: I44e054a6db59cbeae03b50cb0df4bcfdc8f293da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133969 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index f72c15701b53..c02ba3ca2878 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -60,6 +60,7 @@ #include #include #include +#include namespace com::sun::star::uno { class XComponentContext; } namespace com::sun::star::beans { struct NamedValue; } @@ -366,8 +367,7 @@ private: }; -class TimeContainerEnumeration : private cppu::BaseMutex, - public ::cppu::WeakImplHelper< XEnumeration > +class TimeContainerEnumeration : public ::cppu::WeakImplHelper< XEnumeration > { public: explicit TimeContainerEnumeration( std::vector< Reference< XAnimationNode > >&& rChildren ); @@ -377,6 +377,8 @@ public: virtual Any SAL_CALL nextElement( ) override; private: +std::mutex m_aMutex; + /** sorted list of child nodes */ std::vector< Reference< XAnimationNode > > maChildren; @@ -395,14 +397,14 @@ TimeContainerEnumeration::TimeContainerEnumeration( std::vector< Reference< XAni // Methods sal_Bool SAL_CALL TimeContainerEnumeration::hasMoreElements() { -Guard< Mutex > aGuard( m_aMutex ); +std::unique_lock aGuard( m_aMutex ); return maIter != maChildren.end(); } Any SAL_CALL TimeContainerEnumeration::nextElement() { -Guard< Mutex > aGuard( m_aMutex ); +std::unique_lock aGuard( m_aMutex ); if( maIter == maChildren.end() ) throw NoSuchElementException();
[Libreoffice-commits] core.git: animations/source
animations/source/animcore/animcore.cxx | 246 +++- 1 file changed, 122 insertions(+), 124 deletions(-) New commits: commit 63400fa8c2333a519f0c3180dd490d2b4204fbc7 Author: Arnaud VERSINI AuthorDate: Sun Jan 23 17:13:07 2022 +0100 Commit: Noel Grandin CommitDate: Sun Jan 30 07:32:41 2022 +0100 animations : use cppuhelper::BaseMutex Change-Id: Ife2b5480ad26c01388f5803f1cc5ae1e9e44a123 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128842 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 5f20fa16139b..f72c15701b53 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -102,8 +103,8 @@ namespace animcore { namespace { - -class AnimationNodeBase : public XAnimateMotion, +class AnimationNodeBase : public cppu::BaseMutex, +public XAnimateMotion, public XAnimatePhysics, public XAnimateColor, public XTransitionFilter, @@ -120,12 +121,10 @@ class AnimationNodeBase : public XAnimateMotion, public XUnoTunnel, public OWeakObject { -public: -// our first, last and only protection from multi-threads! -Mutex maMutex; + }; -class AnimationNode final : public AnimationNodeBase +class AnimationNode final: public AnimationNodeBase { public: explicit AnimationNode(sal_Int16 nNodeType); @@ -367,7 +366,8 @@ private: }; -class TimeContainerEnumeration : public ::cppu::WeakImplHelper< XEnumeration > +class TimeContainerEnumeration : private cppu::BaseMutex, + public ::cppu::WeakImplHelper< XEnumeration > { public: explicit TimeContainerEnumeration( std::vector< Reference< XAnimationNode > >&& rChildren ); @@ -382,9 +382,6 @@ private: /** current iteration position */ std::vector< Reference< XAnimationNode > >::iterator maIter; - -/** our first, last and only protection from multi-threads! */ -Mutex maMutex; }; } @@ -398,14 +395,14 @@ TimeContainerEnumeration::TimeContainerEnumeration( std::vector< Reference< XAni // Methods sal_Bool SAL_CALL TimeContainerEnumeration::hasMoreElements() { -Guard< Mutex > aGuard( maMutex ); +Guard< Mutex > aGuard( m_aMutex ); return maIter != maChildren.end(); } Any SAL_CALL TimeContainerEnumeration::nextElement() { -Guard< Mutex > aGuard( maMutex ); +Guard< Mutex > aGuard( m_aMutex ); if( maIter == maChildren.end() ) throw NoSuchElementException(); @@ -417,7 +414,8 @@ Any SAL_CALL TimeContainerEnumeration::nextElement() std::array*, 13> AnimationNode::mpTypes = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr }; AnimationNode::AnimationNode( sal_Int16 nNodeType ) -: maChangeListener(maMutex), +: AnimationNodeBase(), +maChangeListener(m_aMutex), mnNodeType( nNodeType ), mnFill( AnimationFill::DEFAULT ), mnFillDefault( AnimationFill::INHERIT ), @@ -451,7 +449,7 @@ AnimationNode::AnimationNode( sal_Int16 nNodeType ) AnimationNode::AnimationNode( const AnimationNode& rNode ) : AnimationNodeBase(), -maChangeListener(maMutex), +maChangeListener(m_aMutex), mnNodeType( rNode.mnNodeType ), // attributes for the XAnimationNode interface implementation @@ -926,7 +924,7 @@ Sequence< OUString > AnimationNode::getSupportedServiceNames() // XAnimationNode sal_Int16 SAL_CALL AnimationNode::getType() { -Guard< Mutex > aGuard( maMutex ); +Guard< Mutex > aGuard( m_aMutex ); return mnNodeType; } @@ -934,7 +932,7 @@ sal_Int16 SAL_CALL AnimationNode::getType() // XAnimationNode Any SAL_CALL AnimationNode::getBegin() { -Guard< Mutex > aGuard( maMutex ); +Guard< Mutex > aGuard( m_aMutex ); return maBegin; } @@ -942,7 +940,7 @@ Any SAL_CALL AnimationNode::getBegin() // XAnimationNode void SAL_CALL AnimationNode::setBegin( const Any& _begin ) { -Guard< Mutex > aGuard( maMutex ); +Guard< Mutex > aGuard( m_aMutex ); if( _begin != maBegin ) { maBegin = _begin; @@ -954,7 +952,7 @@ void SAL_CALL AnimationNode::setBegin( const Any& _begin ) // XAnimationNode Any SAL_CALL AnimationNode::getDuration() { -Guard< Mutex > aGuard( maMutex ); +Guard< Mutex > aGuard( m_aMutex ); return maDuration; } @@ -962,7 +960,7 @@ Any SAL_CALL AnimationNode::getDuration() // XAnimationNode void SAL_CALL AnimationNode::setDuration( const Any& _duration ) { -Guard< Mutex > aGuard( maMutex ); +Guard< Mutex > aGuard( m_aMutex ); if( _duration != maDuration ) { maDuration = _
[Libreoffice-commits] core.git: animations/source
animations/source/animcore/animcore.cxx | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) New commits: commit 27651c72f2beb3574efcf240e8472a6f441476a8 Author: Noel Grandin AuthorDate: Mon Nov 22 18:43:35 2021 +0200 Commit: Noel Grandin CommitDate: Sat Nov 27 08:09:31 2021 +0100 use more OInterfaceContainerHelper3 in AnimationNode Change-Id: I619582287d3ce1712921782d47cc722deeb1e0d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125918 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index d5652fbc4ccf..5f20fa16139b 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #include @@ -65,8 +65,8 @@ namespace com::sun::star::beans { struct NamedValue; } using ::osl::Mutex; using ::osl::Guard; -using ::comphelper::OInterfaceContainerHelper2; -using ::comphelper::OInterfaceIteratorHelper2; +using ::comphelper::OInterfaceContainerHelper3; +using ::comphelper::OInterfaceIteratorHelper3; using ::com::sun::star::uno::Any; using ::com::sun::star::uno::UNO_QUERY; using ::com::sun::star::uno::XInterface; @@ -299,7 +299,7 @@ public: void fireChangeListener(); private: -OInterfaceContainerHelper2 maChangeListener; +OInterfaceContainerHelper3 maChangeListener; static void initTypeProvider( sal_Int16 nNodeType ) noexcept; @@ -2100,18 +2100,14 @@ void AnimationNode::fireChangeListener() { Guard< Mutex > aGuard( maMutex ); -OInterfaceIteratorHelper2 aIterator( maChangeListener ); +OInterfaceIteratorHelper3 aIterator( maChangeListener ); if( aIterator.hasMoreElements() ) { Reference< XInterface > xSource( static_cast(this), UNO_QUERY ); Sequence< ElementChange > aChanges; const ChangesEvent aEvent( xSource, Any( mxParent.get() ), aChanges ); while( aIterator.hasMoreElements() ) -{ -Reference< XChangesListener > xListener( aIterator.next(), UNO_QUERY ); -if( xListener.is() ) -xListener->changesOccurred( aEvent ); -} +aIterator.next()->changesOccurred( aEvent ); } //fdo#69645 use WeakReference of mxParent to test if mpParent is still valid
[Libreoffice-commits] core.git: animations/source chart2/source configmgr/source editeng/source forms/source framework/source sc/source sd/source sfx2/source starmath/source svl/source svtools/source
animations/source/animcore/animcore.cxx |8 +--- chart2/source/view/main/ChartView.cxx |5 +- configmgr/source/childaccess.cxx |8 +--- editeng/source/uno/unofield.cxx |8 +--- editeng/source/uno/unotext.cxx| 16 ++-- forms/source/component/Columns.cxx|8 +--- framework/source/fwi/uielement/constitemcontainer.cxx |8 +--- framework/source/fwi/uielement/itemcontainer.cxx |8 +--- framework/source/fwi/uielement/rootitemcontainer.cxx |8 +--- sc/source/ui/app/drwtrans.cxx |8 +--- sc/source/ui/app/transobj.cxx |8 +--- sc/source/ui/unoobj/dapiuno.cxx |8 +--- sc/source/ui/unoobj/docuno.cxx|8 +--- sc/source/ui/unoobj/nameuno.cxx |8 +--- sc/source/ui/unoobj/textuno.cxx |8 +--- sc/source/ui/vba/vbaworksheet.cxx |8 +--- sd/source/ui/app/sdxfer.cxx |8 +--- sd/source/ui/dlg/sdtreelb.cxx |8 +--- sd/source/ui/framework/factories/Pane.cxx |8 +--- sd/source/ui/framework/factories/ViewShellWrapper.cxx |8 +--- sd/source/ui/unoidl/DrawController.cxx|8 +--- sd/source/ui/unoidl/unomodel.cxx |8 +--- sd/source/ui/unoidl/unopage.cxx |8 +--- sd/source/ui/view/ViewTabBar.cxx |8 +--- sfx2/source/control/thumbnailviewacc.cxx | 16 ++-- sfx2/source/doc/objserv.cxx |9 +--- starmath/source/mathml/mathmlexport.cxx | 10 + starmath/source/mathml/mathmlimport.cxx | 10 + starmath/source/unomodel.cxx |8 +--- svl/source/items/style.cxx|8 +--- svtools/source/control/valueacc.cxx | 16 ++-- svx/source/fmcomp/gridcell.cxx|8 +--- svx/source/svdraw/svdmodel.cxx|8 +--- svx/source/unodraw/unoshape.cxx |8 +--- sw/source/core/unocore/TextCursorHelper.cxx |8 +--- sw/source/core/unocore/unobkm.cxx |8 +--- sw/source/core/unocore/unochart.cxx |8 +--- sw/source/core/unocore/unodraw.cxx|8 +--- sw/source/core/unocore/unofield.cxx | 16 ++-- sw/source/core/unocore/unoflatpara.cxx|8 +--- sw/source/core/unocore/unoframe.cxx |8 +--- sw/source/core/unocore/unoftn.cxx |8 +--- sw/source/core/unocore/unoidx.cxx | 12 ++ sw/source/core/unocore/unoobj.cxx |8 +--- sw/source/core/unocore/unoobj2.cxx| 16 ++-- sw/source/core/unocore/unoparagraph.cxx |8 +--- sw/source/core/unocore/unoport.cxx|8 +--- sw/source/core/unocore/unoportenum.cxx|4 +- sw/source/core/unocore/unorefmk.cxx | 16 ++-- sw/source/core/unocore/unosect.cxx|8 +--- sw/source/core/unocore/unosett.cxx|8 ++-- sw/source/core/unocore/unosrch.cxx|4 +- sw/source/core/unocore/unostyle.cxx |4 +- sw/source/core/unocore/unotbl.cxx | 20 +++--- sw/source/core/unocore/unotext.cxx|4 +- sw/source/filter/xml/xmlexp.cxx |8 +--- sw/source/filter/xml/xmlimp.cxx |8 +--- sw/source/uibase/dochdl/swdtflvr.cxx |8 +--- sw/source/uibase/uno/unoatxt.cxx | 16 ++-- sw/source/uibase/uno/unodispatch.cxx |8 +--- sw/source/uibase/uno/unotxdoc.cxx |8 +--- sw/source/uibase/uno/unotxvw.cxx |8 +--- toolkit/source/controls/unocontrolmodel.cxx |7 +-- unoxml/source/dom/node.cxx|8 +--- vcl/source/treelist/transfer.cxx |8 +--- xmloff/source/core/unoatrcn.cxx |8 +--- xmloff/source/core/xm
[Libreoffice-commits] core.git: animations/source
animations/source/animcore/animcore.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 3a5c7d98d9c875b4d87097883f1da56c17e79eea Author: Arnaud Versini AuthorDate: Sat Mar 13 11:34:45 2021 +0100 Commit: Arnaud Versini CommitDate: Sun Mar 21 12:37:18 2021 +0100 animcore : AnimationNode should be final Change-Id: I0be5e9d21b36823953e41cd8389f28ce36ed45e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112434 Tested-by: Jenkins Tested-by: Arnaud Versini Reviewed-by: Arnaud Versini diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index adb41c26c0e7..493e1fa1d102 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -125,7 +125,7 @@ public: Mutex maMutex; }; -class AnimationNode : public AnimationNodeBase +class AnimationNode final : public AnimationNodeBase { public: explicit AnimationNode(sal_Int16 nNodeType); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: animations/source include/oox oox/source sd/qa sd/source
animations/source/animcore/animcore.cxx | 14 -- include/oox/ppt/animationspersist.hxx |1 + oox/source/ppt/timenode.cxx |6 ++ oox/source/ppt/timenodelistcontext.cxx|2 +- sd/qa/unit/export-tests-ooxml1.cxx|5 + sd/source/filter/eppt/pptx-animations.cxx |3 ++- 6 files changed, 27 insertions(+), 4 deletions(-) New commits: commit 020c721fa937d63b2c1b1bf6185ce1060e630676 Author: Miklos Vajna AuthorDate: Wed Jan 27 14:25:21 2021 +0100 Commit: Miklos Vajna CommitDate: Wed Jan 27 18:04:44 2021 +0100 PPTX filter: fix lost is-narration property for slide narrations Otherwise removing narrations don't work in powerpoint, it would say there are no narrations, just plain media shapes. Change-Id: Ibd0478540ac018bc23f81223846518b3bf7c7c2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110016 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 428578fbb831..adb41c26c0e7 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -352,6 +352,7 @@ private: // XAudio double mfVolume; bool mbHideDuringShow; +bool mbNarration; // XCommand sal_Int16 mnCommand; @@ -440,6 +441,7 @@ AnimationNode::AnimationNode( sal_Int16 nNodeType ) mnFadeColor(0), mfVolume(1.0), mbHideDuringShow(false), +mbNarration(false), mnCommand(0), mnIterateType( css::presentation::ShapeAnimationSubType::AS_WHOLE ), mfIterateInterval(0.0) @@ -511,6 +513,7 @@ AnimationNode::AnimationNode( const AnimationNode& rNode ) // XAudio mfVolume( rNode.mfVolume ), mbHideDuringShow(rNode.mbHideDuringShow), +mbNarration(rNode.mbNarration), // XCommand mnCommand( rNode.mnCommand ), @@ -1832,11 +1835,18 @@ void SAL_CALL AnimationNode::setHideDuringShow(sal_Bool bHideDuringShow) sal_Bool SAL_CALL AnimationNode::getNarration() { -return false; +osl::Guard aGuard(maMutex); +return mbNarration; } -void SAL_CALL AnimationNode::setNarration(sal_Bool /*bNarration*/) +void SAL_CALL AnimationNode::setNarration(sal_Bool bNarration) { +osl::Guard aGuard(maMutex); +if (static_cast(bNarration) != mbNarration) +{ +mbNarration = bNarration; +fireChangeListener(); +} } // XCommand diff --git a/include/oox/ppt/animationspersist.hxx b/include/oox/ppt/animationspersist.hxx index f2288929ad6e..8c8bb766d5aa 100644 --- a/include/oox/ppt/animationspersist.hxx +++ b/include/oox/ppt/animationspersist.hxx @@ -44,6 +44,7 @@ namespace oox::ppt { NP_SUBITEM, NP_TARGET, NP_COMMAND, NP_PARAMETER, NP_VALUES, NP_FORMULA, NP_KEYTIMES, NP_DISPLAY, NP_HIDEDURINGSHOW, +NP_ISNARRATION, NP_SIZE_ }; diff --git a/oox/source/ppt/timenode.cxx b/oox/source/ppt/timenode.cxx index 978c24a0eabe..5d7604ec0952 100644 --- a/oox/source/ppt/timenode.cxx +++ b/oox/source/ppt/timenode.cxx @@ -342,6 +342,12 @@ namespace oox::ppt { xAudio->setHideDuringShow(bBool); } break; +case NP_ISNARRATION: +if (xAudio.is() && (aValue >>= bBool)) +{ +xAudio->setNarration(bBool); +} +break; case NP_TARGET: if (xParent.is() && xParent->getType() == AnimationNodeType::ITERATE) diff --git a/oox/source/ppt/timenodelistcontext.cxx b/oox/source/ppt/timenodelistcontext.cxx index d30e69f53be1..6ecd0985cd0a 100644 --- a/oox/source/ppt/timenodelistcontext.cxx +++ b/oox/source/ppt/timenodelistcontext.cxx @@ -174,7 +174,7 @@ namespace oox::ppt { sal_Int32 aElement = getCurrentElement(); if( aElement == PPT_TOKEN( audio ) ) { -// TODO deal with mbIsNarration +mpNode->getNodeProperties()[NP_ISNARRATION] <<= mbIsNarration; } else if( aElement == PPT_TOKEN( video ) ) { diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx index b8189c73a87e..da61677f7b48 100644 --- a/sd/qa/unit/export-tests-ooxml1.cxx +++ b/sd/qa/unit/export-tests-ooxml1.cxx @@ -1358,6 +1358,11 @@ void SdOOXMLExportTest1::testNarrationMimeType() // i.e. had the default visibility -> bitmap was visible during slideshow. assertXPath(pSlideDoc, "//p:childTnLst/p:audio/p:cMediaNode", "showWhenStopped", "0"); +// Without the accompanying fix in place, this test would have failed with: +// - ... no attribute 'isNarration' exist +// i.e. was not a narration -> could not mass-remove narrations on the UI. +assertXPath(pSlideDoc, "//p:childTnLst/p:audio",
[Libreoffice-commits] core.git: animations/source include/oox offapi/com oox/source sd/qa sd/source
animations/source/animcore/animcore.cxx | 31 ++ include/oox/ppt/animationspersist.hxx |1 offapi/com/sun/star/animations/XAudio.idl | 12 +++ oox/source/ppt/timenode.cxx |6 + oox/source/ppt/timenodelistcontext.cxx|9 sd/qa/unit/export-tests-ooxml1.cxx|5 sd/source/filter/eppt/pptx-animations.cxx |3 +- 7 files changed, 66 insertions(+), 1 deletion(-) New commits: commit 1093c931e9e4c86a47ea5972217719d5fa169b71 Author: Miklos Vajna AuthorDate: Tue Jan 26 17:38:23 2021 +0100 Commit: Miklos Vajna CommitDate: Tue Jan 26 21:15:24 2021 +0100 [API CHANGE] PPTX filter: fix lost hide-while-show prop for slide narrations The OOXML markup is , but the UI uses "Hide During Show", which is easier to understand, so use the second naming in the code. With this, the PPTX no longer makes the speaker bitmaps on slides visible while projecting. API change, because the animation node is only available via UNO, though it's likely that no actual external code would ever interact with it directly. (And also add a stub Narration attribute, so that can be implemented in a follow-up commit without an API change.) Change-Id: Ia90a2fb30c2bfdb4cff2901fe11bdf1d4ab38261 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109969 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index ba1f6f7d4231..428578fbb831 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -254,6 +254,10 @@ public: virtual void SAL_CALL setSource( const Any& _source ) override; virtual double SAL_CALL getVolume() override; virtual void SAL_CALL setVolume( double _volume ) override; +sal_Bool SAL_CALL getHideDuringShow() override; +void SAL_CALL setHideDuringShow(sal_Bool bHideDuringShow) override; +sal_Bool SAL_CALL getNarration() override; +void SAL_CALL setNarration(sal_Bool bNarration) override; // XCommand - the following two shadowed by animate, unfortunately @@ -347,6 +351,7 @@ private: // XAudio double mfVolume; +bool mbHideDuringShow; // XCommand sal_Int16 mnCommand; @@ -434,6 +439,7 @@ AnimationNode::AnimationNode( sal_Int16 nNodeType ) mbMode(true), mnFadeColor(0), mfVolume(1.0), +mbHideDuringShow(false), mnCommand(0), mnIterateType( css::presentation::ShapeAnimationSubType::AS_WHOLE ), mfIterateInterval(0.0) @@ -504,6 +510,7 @@ AnimationNode::AnimationNode( const AnimationNode& rNode ) // XAudio mfVolume( rNode.mfVolume ), +mbHideDuringShow(rNode.mbHideDuringShow), // XCommand mnCommand( rNode.mnCommand ), @@ -1807,6 +1814,30 @@ void SAL_CALL AnimationNode::setVolume( double _volume ) } } +sal_Bool SAL_CALL AnimationNode::getHideDuringShow() +{ +osl::Guard aGuard(maMutex); +return mbHideDuringShow; +} + +void SAL_CALL AnimationNode::setHideDuringShow(sal_Bool bHideDuringShow) +{ +osl::Guard aGuard(maMutex); +if (static_cast(bHideDuringShow) != mbHideDuringShow) +{ +mbHideDuringShow = bHideDuringShow; +fireChangeListener(); +} +} + +sal_Bool SAL_CALL AnimationNode::getNarration() +{ +return false; +} + +void SAL_CALL AnimationNode::setNarration(sal_Bool /*bNarration*/) +{ +} // XCommand sal_Int16 SAL_CALL AnimationNode::getCommand() diff --git a/include/oox/ppt/animationspersist.hxx b/include/oox/ppt/animationspersist.hxx index 0dcf0dc0662a..f2288929ad6e 100644 --- a/include/oox/ppt/animationspersist.hxx +++ b/include/oox/ppt/animationspersist.hxx @@ -43,6 +43,7 @@ namespace oox::ppt { NP_ENDSYNC, NP_ITERATETYPE, NP_ITERATEINTERVAL, NP_SUBITEM, NP_TARGET, NP_COMMAND, NP_PARAMETER, NP_VALUES, NP_FORMULA, NP_KEYTIMES, NP_DISPLAY, +NP_HIDEDURINGSHOW, NP_SIZE_ }; diff --git a/offapi/com/sun/star/animations/XAudio.idl b/offapi/com/sun/star/animations/XAudio.idl index 00e1deefc4a4..957a842382f0 100644 --- a/offapi/com/sun/star/animations/XAudio.idl +++ b/offapi/com/sun/star/animations/XAudio.idl @@ -32,6 +32,18 @@ interface XAudio : XAnimationNode [attribute] any Source; [attribute] double Volume; + +/** Specifies if the source shape should be hidden during slideshow (defaults to false). + +@since LibreOffice 7.2 +*/ +[attribute] boolean HideDuringShow; + +/** Specifies if the source shape is a narration for the slide (defaults to false). + +@since LibreOffice 7.2 +*/ +[attribute] boolean Narration; }; diff --git a/oox/source/ppt/timenode.cxx b/oox/source/ppt/timenode.cxx index 132c54b79f4a..978c24a0eabe 100644 --- a/oox/source/ppt/timenode.cxx +++ b/oox/source/ppt/timenode.cxx @@ -336,6 +336,12 @@ namespace oox::ppt {
[Libreoffice-commits] core.git: animations/source basctl/source basic/source canvas/source chart2/source comphelper/source UnoControls/source
UnoControls/source/controls/framecontrol.cxx |2 animations/source/animcore/animcore.cxx| 12 ++--- basctl/source/basicide/basicrenderable.cxx |4 - basic/source/basmgr/basmgr.cxx |4 - basic/source/classes/propacc.cxx |2 basic/source/uno/namecont.cxx | 21 +- basic/source/uno/scriptcont.cxx|4 - canvas/source/cairo/cairo_textlayout.cxx |2 chart2/source/model/main/BaseCoordinateSystem.cxx |2 chart2/source/model/main/DataSeries.cxx|2 chart2/source/model/main/Diagram.cxx |2 chart2/source/model/template/ChartType.cxx |2 chart2/source/tools/RegressionCurveCalculator.cxx |2 comphelper/source/container/IndexedPropertyValuesContainer.cxx |4 - comphelper/source/container/NamedPropertyValuesContainer.cxx |4 - comphelper/source/container/enumerablemap.cxx |2 comphelper/source/container/namecontainer.cxx |4 - comphelper/source/eventattachermgr/eventattachermgr.cxx|8 +-- comphelper/source/misc/anycompare.cxx |6 +- comphelper/source/misc/types.cxx |3 - comphelper/source/property/ChainablePropertySet.cxx|2 comphelper/source/property/opropertybag.cxx|4 - comphelper/source/property/propertysethelper.cxx |2 comphelper/source/streaming/seqstream.cxx |2 24 files changed, 52 insertions(+), 50 deletions(-) New commits: commit bca1b74c0753f2305a5e234293df88aa3e1d9af0 Author: Noel AuthorDate: Mon Jan 18 15:05:18 2021 +0200 Commit: Noel Grandin CommitDate: Wed Jan 20 09:03:45 2021 +0100 improve some IllegalArgumentException messages Change-Id: Id88f2a82bf2651e8b5895aa330f32b71ff5b0e48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109546 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/UnoControls/source/controls/framecontrol.cxx b/UnoControls/source/controls/framecontrol.cxx index 8ecc73cf2d1a..ddfa693a654b 100644 --- a/UnoControls/source/controls/framecontrol.cxx +++ b/UnoControls/source/controls/framecontrol.cxx @@ -275,7 +275,7 @@ sal_Bool FrameControl::convertFastPropertyValue( Any&rConvertedVa if ( !bReturn ) { -throw IllegalArgumentException(); +throw IllegalArgumentException("unknown handle " + OUString::number(nHandle), static_cast(this), 1); } return bReturn; diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 2347dc08a231..ba1f6f7d4231 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -1875,7 +1875,7 @@ Reference< XAnimationNode > SAL_CALL AnimationNode::insertBefore( const Referenc Guard< Mutex > aGuard( maMutex ); if( !newChild.is() || !refChild.is() ) -throw IllegalArgumentException(); +throw IllegalArgumentException("no child", static_cast(this), -1); if( std::find(maChildren.begin(), maChildren.end(), newChild) != maChildren.end() ) throw ElementExistException(); @@ -1899,7 +1899,7 @@ Reference< XAnimationNode > SAL_CALL AnimationNode::insertAfter( const Reference Guard< Mutex > aGuard( maMutex ); if( !newChild.is() || !refChild.is() ) -throw IllegalArgumentException(); +throw IllegalArgumentException("no child", static_cast(this), -1); if( std::find(maChildren.begin(), maChildren.end(), newChild) != maChildren.end() ) throw ElementExistException(); @@ -1927,7 +1927,7 @@ Reference< XAnimationNode > SAL_CALL AnimationNode::replaceChild( const Referenc Guard< Mutex > aGuard( maMutex ); if( !newChild.is() || !oldChild.is() ) -throw IllegalArgumentException(); +throw IllegalArgumentException("no child", static_cast(this), -1); if( std::find(maChildren.begin(), maChildren.end(), newChild) != maChildren.end() ) throw ElementExistException(); @@ -1953,7 +1953,7 @@ Reference< XAnimationNode > SAL_CALL AnimationNode::removeChild( const Reference Guard< Mutex > aGuard( maMutex ); if( !oldChild.is() ) -throw IllegalArgumentException(); +throw IllegalArgumentException("no child", static_cast(this), 1); auto old = std::find(maChildren.begin(), maChildren.end(), oldChild); if( old == maChildren.end() ) @@ -1973,7 +1973,7 @@ Reference< XAnimationNode > SAL_CALL AnimationNode::appendChild( const Reference Guard< Mutex > aGuard( maMutex ); if( !newChild.is() ) -throw IllegalArgumentException(); +throw IllegalArgumentExc
[Libreoffice-commits] core.git: animations/source
animations/source/animcore/animcore.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit f525b8898dcefe9e43e63e475c18d754ef07 Author: Sarper Akdemir AuthorDate: Sun Aug 30 02:18:48 2020 +0300 Commit: Thorsten Behrens CommitDate: Mon Aug 31 12:27:39 2020 +0200 add missing initializers about physics animations to AnimationNode class fixes the case when a physics animation preset is imported it doesn't have any information about start velocity, density or bounciness paramaters. Change-Id: Ic817afb211597ad553ccc3a43fe24bfbebadbc43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101656 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 107353cf327a..b87482a0c4cd 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -488,6 +488,12 @@ AnimationNode::AnimationNode( const AnimationNode& rNode ) maPath( rNode.maPath ), maOrigin( rNode.maOrigin ), +// attributes for XAnimatePhysics +maStartVelocityX( rNode.maStartVelocityX ), +maStartVelocityY( rNode.maStartVelocityY ), +maDensity( rNode.maDensity ), +maBounciness( rNode.maBounciness ), + // attributes for XAnimateTransform mnTransformType( rNode.mnTransformType ), ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: animations/source include/xmloff offapi/com offapi/UnoApi_offapi.mk schema/libreoffice slideshow/source xmloff/source
animations/source/animcore/animcore.cxx | 87 +- include/xmloff/xmltoken.hxx |4 offapi/UnoApi_offapi.mk |1 offapi/com/sun/star/animations/XAnimatePhysics.idl | 57 ++ schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng |2 slideshow/source/engine/animationfactory.cxx| 17 + slideshow/source/engine/animationnodes/animationphysicsnode.cxx | 47 + slideshow/source/engine/animationnodes/animationphysicsnode.hxx |3 slideshow/source/engine/box2dtools.cxx | 47 - slideshow/source/inc/animationfactory.hxx |3 slideshow/source/inc/box2dtools.hxx | 10 + xmloff/source/core/xmltoken.cxx |4 xmloff/source/draw/animationexport.cxx | 36 +++- xmloff/source/draw/animationimport.cxx | 33 +++ xmloff/source/token/tokens.txt |4 15 files changed, 337 insertions(+), 18 deletions(-) New commits: commit 394f74e6f168f034f7ed73e3027e4ff07f6b94b9 Author: Sarper Akdemir AuthorDate: Fri Aug 14 01:18:14 2020 +0300 Commit: Thorsten Behrens CommitDate: Sat Aug 22 11:24:16 2020 +0200 add bounciness velocity and density options to physics animations Adding new xml options to specify the starting velocity, bounciness, and density of the rigid body that physics animation control. Change-Id: Ifaba785e82c8ee17be00711a3e7a75257e7704ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101141 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 88e42772936a..107353cf327a 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -104,6 +105,7 @@ namespace animcore namespace { class AnimationNodeBase : public XAnimateMotion, +public XAnimatePhysics, public XAnimateColor, public XTransitionFilter, public XAnimateSet, @@ -224,6 +226,16 @@ public: virtual Any SAL_CALL getOrigin() override; virtual void SAL_CALL setOrigin( const Any& _origin ) override; +// XAnimatePhysics +virtual Any SAL_CALL getStartVelocityX() override; +virtual void SAL_CALL setStartVelocityX( const Any& _startvelocityx ) override; +virtual Any SAL_CALL getStartVelocityY() override; +virtual void SAL_CALL setStartVelocityY( const Any& _startvelocityy ) override; +virtual Any SAL_CALL getDensity() override; +virtual void SAL_CALL setDensity( const Any& _density ) override; +virtual Any SAL_CALL getBounciness() override; +virtual void SAL_CALL setBounciness( const Any& _bounciness ) override; + // XAnimateTransform virtual sal_Int16 SAL_CALL getTransformType() override; virtual void SAL_CALL setTransformType( sal_Int16 _transformtype ) override; @@ -322,6 +334,9 @@ private: // attributes for XAnimateMotion Any maPath, maOrigin; +// attributes for XAnimatePhysics +Any maStartVelocityX, maStartVelocityY, maDensity, maBounciness; + // attributes for XAnimateTransform sal_Int16 mnTransformType; @@ -671,8 +686,8 @@ Any SAL_CALL AnimationNode::queryInterface( const Type& aType ) case AnimationNodeType::ANIMATEPHYSICS: aRet = ::cppu::queryInterface( aType, -static_cast< XAnimate * >( static_cast< XAnimateMotion * >(this) ), -static_cast< XAnimateMotion * >( this ) ); +static_cast< XAnimate * >( static_cast< XAnimatePhysics * >(this) ), +static_cast< XAnimatePhysics * >( this ) ); break; case AnimationNodeType::ANIMATECOLOR: aRet = ::cppu::queryInterface( @@ -767,7 +782,7 @@ void AnimationNode::initTypeProvider( sal_Int16 nNodeType ) throw() pTypeAr[nPos++] = cppu::UnoType::get(); break; case AnimationNodeType::ANIMATEPHYSICS: -pTypeAr[nPos++] = cppu::UnoType::get(); +pTypeAr[nPos++] = cppu::UnoType::get(); break; case AnimationNodeType::ANIMATECOLOR: pTypeAr[nPos++] = cppu::UnoType::get(); @@ -1584,6 +1599,72 @@ void SAL_CALL AnimationNode::setOrigin( const Any& _origin ) fireChangeListener(); } +// XAnimatePhysics +Any SAL_CALL AnimationNode::getStartVelocityX() +{ +Guard< Mutex > aGuard( maMutex ); +return maStartVelocityX; +} + + +// XAnimatePhysics +void SAL_CALL AnimationNode::setStartVelocityX( const Any& _startvelocityx ) +{ +Guard< Mutex > aGuard( maMute
[Libreoffice-commits] core.git: animations/source include/xmloff offapi/com offapi/UnoApi_offapi.mk officecfg/registry schema/libreoffice sd/xml xmloff/source
animations/source/animcore/animcore.component|4 + animations/source/animcore/animcore.cxx | 35 include/xmloff/xmltoken.hxx |1 offapi/UnoApi_offapi.mk |1 offapi/com/sun/star/animations/AnimatePhysics.idl| 25 ++ officecfg/registry/data/org/openoffice/Office/UI/Effects.xcu |7 + schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng | 43 +++ sd/xml/effects.xml |7 + xmloff/source/core/xmltoken.cxx |1 xmloff/source/draw/animationexport.cxx | 25 ++ xmloff/source/draw/animationimport.cxx |2 xmloff/source/token/tokens.txt |1 12 files changed, 148 insertions(+), 4 deletions(-) New commits: commit e33486189d5af3e651a5bc2e974b548fc07cc5bc Author: Sarper Akdemir AuthorDate: Thu Jun 25 20:33:05 2020 +0300 Commit: Thorsten Behrens CommitDate: Thu Aug 20 15:21:07 2020 +0200 make physics based animation effects importable-exportable Makes physics based animation effects importable and exportable on content.xml. Uses one new xml token animatePhysics. Also adds a new animation preset called Physics Basic that is available under Emphasis animation effect category. Change-Id: I38b0511f973668655cff78becebe3f1e628d9083 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100247 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/animations/source/animcore/animcore.component b/animations/source/animcore/animcore.component index 2f490aa0ae06..cd691f05e0ba 100644 --- a/animations/source/animcore/animcore.component +++ b/animations/source/animcore/animcore.component @@ -30,6 +30,10 @@ + + + diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index f3ffe8c4190a..88e42772936a 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -291,7 +291,7 @@ private: const sal_Int16 mnNodeType; // for XTypeProvider -static std::array*, 12> mpTypes; +static std::array*, 13> mpTypes; // attributes for the XAnimationNode interface implementation Any maBegin, maDuration, maEnd, maEndSync, maRepeatCount, maRepeatDuration; @@ -394,7 +394,7 @@ Any SAL_CALL TimeContainerEnumeration::nextElement() } -std::array*, 12> AnimationNode::mpTypes = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr }; +std::array*, 13> AnimationNode::mpTypes = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr }; AnimationNode::AnimationNode( sal_Int16 nNodeType ) : maChangeListener(maMutex), @@ -565,6 +565,16 @@ static OUString getImplementationName_ANIMATEMOTION() return "animcore::AnimateMotion"; } +static Sequence getSupportedServiceNames_ANIMATEPHYSICS() +{ +return { "com.sun.star.animations.AnimatePhysics" }; +} + +static OUString getImplementationName_ANIMATEPHYSICS() +{ +return "animcore::AnimatePhysics"; +} + static Sequence getSupportedServiceNames_ANIMATETRANSFORM() { return { "com.sun.star.animations.AnimateTransform" }; @@ -658,6 +668,12 @@ Any SAL_CALL AnimationNode::queryInterface( const Type& aType ) static_cast< XAnimate * >( static_cast< XAnimateMotion * >(this) ), static_cast< XAnimateMotion * >( this ) ); break; +case AnimationNodeType::ANIMATEPHYSICS: +aRet = ::cppu::queryInterface( +aType, +static_cast< XAnimate * >( static_cast< XAnimateMotion * >(this) ), +static_cast< XAnimateMotion * >( this ) ); +break; case AnimationNodeType::ANIMATECOLOR: aRet = ::cppu::queryInterface( aType, @@ -717,6 +733,7 @@ void AnimationNode::initTypeProvider( sal_Int16 nNodeType ) throw() 8, // TRANSITIONFILTER 8, // AUDIO 8, // COMMAND +8, // ANIMATEPHYSICS }; // collect types @@ -749,6 +766,9 @@ void AnimationNode::initTypeProvider( sal_Int16 nNodeType ) throw() case AnimationNodeType::ANIMATEMOTION: pTypeAr[nPos++] = cppu::UnoType::get(); break; +case AnimationNodeType::ANIMATEPHYSICS: +pTypeAr[nPos++] = cppu::UnoType::get(); +break; case AnimationNodeType::ANIMATECOLOR: pTypeAr[nPos++] = cppu::UnoType::get(); break; @@ -817,6 +837,8 @@ OUString AnimationNode::getImplementationName() return getImplementationName_ANIMATECOLOR(); case AnimationNodeType::ANIMATEMOTION: return getImplementationName_ANIMATEMOTION(); +case AnimationNodeType::ANIM
[Libreoffice-commits] core.git: animations/source editeng/source include/comphelper include/toolkit sc/source sd/source starmath/source svx/source sw/inc sw/source toolkit/source vcl/source xmloff/sou
animations/source/animcore/animcore.cxx |2 - editeng/source/uno/unofield.cxx |3 -- editeng/source/uno/unotext.cxx|6 +--- include/comphelper/servicehelper.hxx | 13 ++ include/toolkit/controls/unocontrolmodel.hxx |2 - sc/source/ui/app/drwtrans.cxx |3 -- sc/source/ui/app/transobj.cxx |3 -- sc/source/ui/unoobj/dapiuno.cxx |4 --- sc/source/ui/unoobj/docuno.cxx|4 --- sc/source/ui/unoobj/nameuno.cxx |4 --- sc/source/ui/unoobj/textuno.cxx |4 --- sc/source/ui/vba/vbaworksheet.cxx |3 -- sd/source/ui/app/sdxfer.cxx |3 -- sd/source/ui/dlg/sdtreelb.cxx |3 -- sd/source/ui/framework/factories/Pane.cxx |3 -- sd/source/ui/framework/factories/ViewShellWrapper.cxx |3 -- sd/source/ui/unoidl/DrawController.cxx|3 -- sd/source/ui/unoidl/unopage.cxx |3 -- starmath/source/mathmlexport.cxx |4 --- starmath/source/mathmlimport.cxx |4 --- starmath/source/unomodel.cxx |6 +--- svx/source/fmcomp/gridcell.cxx|4 --- svx/source/unodraw/unoshape.cxx |2 - sw/inc/unobaseclass.hxx |5 +-- sw/source/core/unocore/TextCursorHelper.cxx | 10 +++ sw/source/core/unocore/unochart.cxx |4 --- sw/source/core/unocore/unodraw.cxx|4 --- sw/source/core/unocore/unoframe.cxx |4 --- sw/source/core/unocore/unoport.cxx|4 --- sw/source/core/unocore/unoportenum.cxx|4 --- sw/source/core/unocore/unosett.cxx|8 +- sw/source/core/unocore/unosrch.cxx|4 --- sw/source/core/unocore/unotbl.cxx | 11 ++-- sw/source/filter/xml/xmlexp.cxx |4 --- sw/source/filter/xml/xmlimp.cxx |4 --- sw/source/uibase/dochdl/swdtflvr.cxx |3 -- sw/source/uibase/uno/unoatxt.cxx | 12 +++-- sw/source/uibase/uno/unodispatch.cxx |6 +--- sw/source/uibase/uno/unotxdoc.cxx |6 +--- sw/source/uibase/uno/unotxvw.cxx | 10 +++ toolkit/source/controls/grid/gridcolumn.cxx |3 +- toolkit/source/controls/unocontrolmodel.cxx |4 +-- vcl/source/graphic/UnoGraphic.cxx |3 +- vcl/source/treelist/transfer.cxx |3 -- xmloff/source/core/unoatrcn.cxx |3 -- xmlsecurity/source/gpg/CertificateImpl.cxx|2 - xmlsecurity/source/gpg/SecurityEnvironment.cxx|2 - xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx |2 - xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx |2 - 49 files changed, 77 insertions(+), 139 deletions(-) New commits: commit 24c17dab2f10ad1b7ba342fbd40dc65b7d8f9b24 Author: Arkadiy Illarionov AuthorDate: Wed Jun 12 12:18:07 2019 +0300 Commit: Stephan Bergmann CommitDate: Fri Aug 23 09:10:49 2019 +0200 tdf#39593 extract UnoTunnelId comparison to template function Change-Id: Ia2b5dea273c8de7b8c54e74780193a8d4cba7b45 Reviewed-on: https://gerrit.libreoffice.org/73874 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 9078b2fe4649..b7e28dc15c6d 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -1935,7 +1935,7 @@ void SAL_CALL AnimationNode::removeChangesListener( const Reference< XChangesLis // XUnoTunnel ::sal_Int64 SAL_CALL AnimationNode::getSomething( const Sequence< ::sal_Int8 >& rId ) { -if( rId.getLength() == 16 && memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) == 0 ) +if( isUnoTunnelId(rId) ) { return sal::static_int_cast< sal_Int64 >(reinterpret_cast< sal_IntPtr >(this)); diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx index ab1b0927dceb..94ca091bead8 100644 --- a/editeng/source/uno/unofield.cxx +++ b/editeng/source/uno/unof
[Libreoffice-commits] core.git: animations/source
animations/source/animcore/animcore.cxx |9 + 1 file changed, 5 insertions(+), 4 deletions(-) New commits: commit 6f31c63e35abef03e6f938bbddc8778b70a62d43 Author: Arkadiy Illarionov AuthorDate: Sat Apr 6 13:36:35 2019 +0300 Commit: Noel Grandin CommitDate: Sat Apr 6 18:55:10 2019 +0200 clang-tidy modernize-avoid-c-arrays in animations Change-Id: I3dc1c0e63bd90735c20a65b1af25b243e5a5eee5 Reviewed-on: https://gerrit.libreoffice.org/70341 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 4dd4868e70e5..d5bcb0c21b14 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -57,6 +57,7 @@ #include #include +#include #include #include #include @@ -287,7 +288,7 @@ private: const sal_Int16 mnNodeType; // for XTypeProvider -static Sequence< Type >* mpTypes[12]; +static std::array*, 12> mpTypes; // attributes for the XAnimationNode interface implementation Any maBegin, maDuration, maEnd, maEndSync, maRepeatCount, maRepeatDuration; @@ -388,7 +389,7 @@ Any SAL_CALL TimeContainerEnumeration::nextElement() } -Sequence< Type >* AnimationNode::mpTypes[] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr }; +std::array*, 12> AnimationNode::mpTypes = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr }; AnimationNode::AnimationNode( sal_Int16 nNodeType ) : maChangeListener(maMutex), @@ -418,7 +419,7 @@ AnimationNode::AnimationNode( sal_Int16 nNodeType ) mnIterateType( css::presentation::ShapeAnimationSubType::AS_WHOLE ), mfIterateInterval(0.0) { -assert(nNodeType < int(SAL_N_ELEMENTS(mpTypes))); +assert(nNodeType < int(mpTypes.size())); } AnimationNode::AnimationNode( const AnimationNode& rNode ) @@ -696,7 +697,7 @@ void AnimationNode::initTypeProvider( sal_Int16 nNodeType ) throw() if(! mpTypes[nNodeType] ) { -static const sal_Int32 type_numbers[] = +static constexpr std::array type_numbers = { 7, // CUSTOM 9, // PAR ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: animations/source basctl/source basic/source chart2/source comphelper/source connectivity/source cui/source dbaccess/source
animations/source/animcore/animcore.cxx |2 -- basctl/source/basicide/doceventnotifier.cxx |1 - basic/source/basmgr/basicmanagerrepository.cxx |1 - chart2/source/controller/accessibility/AccessibleBase.cxx |1 - chart2/source/controller/accessibility/AccessibleChartElement.cxx |1 - chart2/source/controller/accessibility/AccessibleChartShape.cxx |1 - chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx|1 - chart2/source/controller/main/UndoActions.cxx |1 - chart2/source/model/main/CartesianCoordinateSystem.cxx |1 - chart2/source/model/main/ChartModel.cxx |1 - chart2/source/model/main/PolarCoordinateSystem.cxx |1 - chart2/source/model/main/UndoManager.cxx|1 - chart2/source/tools/DataSource.cxx |1 - chart2/source/tools/RegressionCurveHelper.cxx |1 - chart2/source/view/main/Linear3DTransformation.cxx |1 - chart2/source/view/main/VPolarTransformation.cxx|1 - comphelper/source/container/enumerablemap.cxx |2 -- comphelper/source/misc/accimplaccess.cxx|3 --- comphelper/source/misc/docpasswordrequest.cxx |1 - comphelper/source/misc/logging.cxx |1 - comphelper/source/property/ChainablePropertySetInfo.cxx |2 -- comphelper/source/property/MasterPropertySetInfo.cxx|2 -- comphelper/source/property/propstate.cxx|1 - connectivity/source/commontools/paramwrapper.cxx|1 - connectivity/source/commontools/sqlerror.cxx|1 - connectivity/source/drivers/firebird/ResultSetMetaData.cxx |3 --- connectivity/source/drivers/hsqldb/HConnection.cxx |1 - connectivity/source/drivers/jdbc/ConnectionLog.cxx |4 connectivity/source/drivers/postgresql/pq_baseresultset.cxx |6 -- connectivity/source/drivers/postgresql/pq_connection.cxx|1 - connectivity/source/drivers/postgresql/pq_databasemetadata.cxx |2 -- connectivity/source/drivers/postgresql/pq_driver.cxx|2 -- connectivity/source/drivers/postgresql/pq_fakedupdateableresultset.cxx |1 - connectivity/source/drivers/postgresql/pq_preparedstatement.cxx |3 --- connectivity/source/drivers/postgresql/pq_resultset.cxx |2 -- connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx |1 - connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.cxx |2 -- connectivity/source/drivers/postgresql/pq_statement.cxx |3 --- connectivity/source/drivers/postgresql/pq_statics.cxx |1 - connectivity/source/drivers/postgresql/pq_updateableresultset.cxx |2 -- connectivity/source/drivers/postgresql/pq_xcolumn.cxx |1 - connectivity/source/drivers/postgresql/pq_xcolumns.cxx |4 connectivity/source/drivers/postgresql/pq_xcontainer.cxx|2 -- connectivity/source/drivers/postgresql/pq_xindex.cxx|1 - connectivity/source/drivers/postgresql/pq_xindexcolumn.cxx |1 - connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx |4 connectivity/source/drivers/postgresql/pq_xindexes.cxx |2 -- connectivity/source/drivers/postgresql/pq_xkey.cxx |1 - connectivity/source/drivers/postgresql/pq_xkeycolumn.cxx|1 - connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx |2 -- connectivity/source/drivers/postgresql/pq_xkeys.cxx |1 - connectivity/source/drivers/postgresql/pq_xtable.cxx|3 --- connectivity/source/drivers/postgresql/pq_xtables.cxx |1 - connectivity/source/drivers/postgresql/pq_xuser.cxx |1 - connectivity/source/drivers/postgresql/pq_xusers.cxx|1 - connectivity/source/drivers/postgresql/pq_xview.cxx |1 - connectivity/source/drivers/postgresql/pq_xviews.cxx|1 - connectivity/source/resource/sharedresources.cxx|4 cui/source/dialogs/iconcdlg.cxx |2 -- dbaccess/source/core/api/View.cxx
[Libreoffice-commits] core.git: animations/source sd/inc sd/source
animations/source/animcore/animcore.cxx | 48 +-- sd/inc/animations.hxx|2 - sd/source/core/CustomAnimationEffect.cxx |2 - sd/source/filter/ppt/pptinanimations.hxx |2 - 4 files changed, 23 insertions(+), 31 deletions(-) New commits: commit 393fa77d278eae7a72a8dc78f81082bbdd63a656 Author: Julien Nabet Date: Sat Nov 4 14:45:32 2017 +0100 Replace lists by vectors in animation parts (sd/animations) Change-Id: Ie5306041e5cde5617e460ae4d98861e8d26e389d Reviewed-on: https://gerrit.libreoffice.org/44297 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 05b7a4747970..f4af2aada347 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -56,7 +56,7 @@ #include #include -#include +#include #include #include @@ -100,10 +100,6 @@ using namespace ::com::sun::star::animations::AnimationNodeType; namespace animcore { - -typedef std::list< Reference< XAnimationNode > > ChildList_t; - - class AnimationNodeBase : public XAnimateMotion, public XAnimateColor, public XTransitionFilter, @@ -344,14 +340,14 @@ private: double mfIterateInterval; /** sorted list of child nodes for XTimeContainer*/ -ChildList_t maChildren; +std::vector< Reference< XAnimationNode > > maChildren; }; class TimeContainerEnumeration : public ::cppu::WeakImplHelper< XEnumeration > { public: -explicit TimeContainerEnumeration( const ChildList_t &rChildren ); +explicit TimeContainerEnumeration( const std::vector< Reference< XAnimationNode > > &rChildren ); // Methods virtual sal_Bool SAL_CALL hasMoreElements() override; @@ -359,16 +355,16 @@ public: private: /** sorted list of child nodes */ -ChildList_t maChildren; +std::vector< Reference< XAnimationNode > > maChildren; /** current iteration position */ -ChildList_t::iterator maIter; +std::vector< Reference< XAnimationNode > >::iterator maIter; /** our first, last and only protection from multi-threads! */ Mutex maMutex; }; -TimeContainerEnumeration::TimeContainerEnumeration( const ChildList_t &rChildren ) +TimeContainerEnumeration::TimeContainerEnumeration( const std::vector< Reference< XAnimationNode > > &rChildren ) : maChildren( rChildren ) { maIter = maChildren.begin(); @@ -1192,11 +1188,9 @@ Reference< XCloneable > SAL_CALL AnimationNode::createClone() Reference< XTimeContainer > xContainer( xNewNode, UNO_QUERY ); if( xContainer.is() ) { -ChildList_t::iterator aIter( maChildren.begin() ); -ChildList_t::iterator aEnd( maChildren.end() ); -while( aIter != aEnd ) +for (auto const& child : maChildren) { -Reference< XCloneable > xCloneable((*aIter++), UNO_QUERY ); +Reference< XCloneable > xCloneable(child, UNO_QUERY ); if( xCloneable.is() ) try { Reference< XAnimationNode > xNewChildNode( xCloneable->createClone(), UNO_QUERY ); @@ -1768,13 +1762,13 @@ Reference< XAnimationNode > SAL_CALL AnimationNode::insertBefore( const Referenc if( !newChild.is() || !refChild.is() ) throw IllegalArgumentException(); -ChildList_t::iterator before = std::find(maChildren.begin(), maChildren.end(), refChild); -if( before == maChildren.end() ) -throw NoSuchElementException(); - if( std::find(maChildren.begin(), maChildren.end(), newChild) != maChildren.end() ) throw ElementExistException(); +auto before = std::find(maChildren.begin(), maChildren.end(), refChild); +if( before == maChildren.end() ) +throw NoSuchElementException(); + maChildren.insert( before, newChild ); Reference< XInterface > xThis( static_cast< OWeakObject * >(this) ); @@ -1792,13 +1786,13 @@ Reference< XAnimationNode > SAL_CALL AnimationNode::insertAfter( const Reference if( !newChild.is() || !refChild.is() ) throw IllegalArgumentException(); -ChildList_t::iterator before = std::find(maChildren.begin(), maChildren.end(), refChild); -if( before == maChildren.end() ) -throw NoSuchElementException(); - if( std::find(maChildren.begin(), maChildren.end(), newChild) != maChildren.end() ) throw ElementExistException(); +auto before = std::find(maChildren.begin(), maChildren.end(), refChild); +if( before == maChildren.end() ) +throw NoSuchElementException(); + ++before; if( before != maChildren.end() ) maChildren.insert( before, newChild ); @@ -1820,13 +1814,13 @@ Reference< XAnimationNode > SAL_CALL AnimationNode
[Libreoffice-commits] core.git: animations/source binaryurp/qa comphelper/source configmgr/qa connectivity/source cppuhelper/source desktop/inc desktop/source filter/source hwpfilter/source i18npool/s
animations/source/animcore/animcore.cxx |2 - binaryurp/qa/test-cache.cxx |2 - comphelper/source/misc/syntaxhighlight.cxx|4 +- configmgr/qa/unit/test.cxx|4 +- connectivity/source/drivers/postgresql/pq_statics.cxx | 16 cppuhelper/source/bootstrap.cxx |6 +-- desktop/inc/dp_misc.h |2 - desktop/source/deployment/misc/dp_misc.cxx|2 - desktop/source/deployment/registry/package/dp_package.cxx |6 +-- filter/source/graphicfilter/ieps/ieps.cxx |6 +-- filter/source/svg/svgfilter.cxx |4 +- filter/source/svg/tokenmap.cxx|2 - hwpfilter/source/fontmap.cxx |7 +-- hwpfilter/source/hbox.cxx |4 +- i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx |2 - i18npool/source/nativenumber/nativenumbersupplier.cxx | 18 +++--- i18npool/source/textconversion/textconversion_ko.cxx |8 +--- i18npool/source/transliteration/numtotext_cjk.cxx |2 - i18nutil/source/utility/widthfolding.cxx |8 +--- jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx |4 +- jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx|6 +-- jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx | 12 +++--- jvmfwk/plugins/sunmajor/pluginlib/util.cxx|6 +-- jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx |2 - libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx |4 +- 25 files changed, 62 insertions(+), 77 deletions(-) New commits: commit ec8c98f59869bee0e327d32f39480a0e4b1330bc Author: Noel Grandin Date: Wed Jun 14 11:31:15 2017 +0200 use more SAL_N_ELEMENTS part 3 Change-Id: I82e366fefd2e31928b99840fe76649cc3521e623 Reviewed-on: https://gerrit.libreoffice.org/38789 Reviewed-by: Noel Grandin Tested-by: Noel Grandin diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 2d75b522b2f3..05b7a4747970 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -423,7 +423,7 @@ AnimationNode::AnimationNode( sal_Int16 nNodeType ) mnIterateType( css::presentation::ShapeAnimationSubType::AS_WHOLE ), mfIterateInterval(0.0) { -assert((sal_uInt32)nNodeType < sizeof(mpTypes)/sizeof(Sequence*)); +assert(nNodeType < int(SAL_N_ELEMENTS(mpTypes))); } AnimationNode::AnimationNode( const AnimationNode& rNode ) diff --git a/binaryurp/qa/test-cache.cxx b/binaryurp/qa/test-cache.cxx index f14b3837629e..989b103e2e90 100644 --- a/binaryurp/qa/test-cache.cxx +++ b/binaryurp/qa/test-cache.cxx @@ -39,7 +39,7 @@ private: // cf. jurt/test/com/sun/star/lib/uno/protocols/urp/Cache_Test.java: void Test::testNothingLostFromLruList() { int a[8]; -for (int i = 0; i != sizeof a / sizeof a[0]; ++i) { +for (int i = 0; i != int(SAL_N_ELEMENTS(a)); ++i) { for (int j = 0; j != i; ++j) { a[j] = 0; } diff --git a/comphelper/source/misc/syntaxhighlight.cxx b/comphelper/source/misc/syntaxhighlight.cxx index f27a993a1c3f..3eafb4bd9391 100644 --- a/comphelper/source/misc/syntaxhighlight.cxx +++ b/comphelper/source/misc/syntaxhighlight.cxx @@ -694,11 +694,11 @@ SyntaxHighlighter::SyntaxHighlighter(HighlighterLanguage language): { case HighlighterLanguage::Basic: m_tokenizer->setKeyWords( strListBasicKeyWords, -sizeof( strListBasicKeyWords ) / sizeof( char* )); + SAL_N_ELEMENTS( strListBasicKeyWords )); break; case HighlighterLanguage::SQL: m_tokenizer->setKeyWords( strListSqlKeyWords, -sizeof( strListSqlKeyWords ) / sizeof( char* )); + SAL_N_ELEMENTS( strListSqlKeyWords )); break; default: assert(false); // this cannot happen diff --git a/configmgr/qa/unit/test.cxx b/configmgr/qa/unit/test.cxx index bc3b31775b6d..2c8138abe19e 100644 --- a/configmgr/qa/unit/test.cxx +++ b/configmgr/qa/unit/test.cxx @@ -591,7 +591,7 @@ bool WriterThread::iteration() { OUString("bloaters") }; test_.setKey(path_, name_, css::uno::Any(options[index_])); -index_ = (index_ + 1) % (sizeof options / sizeof (OUString)); +index_ = (index_ + 1) % SAL_N_ELEMENT
[Libreoffice-commits] core.git: animations/source avmedia/source
animations/source/animcore/animcore.cxx |2 +- avmedia/source/framework/MediaControlBase.cxx |2 +- avmedia/source/framework/mediacontrol.cxx |6 +++--- avmedia/source/framework/mediatoolbox.cxx |2 +- avmedia/source/framework/modeltools.cxx |2 +- avmedia/source/gstreamer/gstplayer.cxx|2 +- avmedia/source/gstreamer/gstwindow.cxx|4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) New commits: commit a7e0a8901e5c16d1ee0637b23217cfd21dfbc89f Author: Noel Grandin Date: Tue May 16 10:30:29 2017 +0200 loplugin:comparisonwithconstant in avmedia Change-Id: Iba0a1969648e95f6e0f6a947f067c5b8e4eb3406 Reviewed-on: https://gerrit.libreoffice.org/37667 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index ff30100ce0fe..2d75b522b2f3 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -1942,7 +1942,7 @@ void SAL_CALL AnimationNode::removeChangesListener( const Reference< XChangesLis // XUnoTunnel ::sal_Int64 SAL_CALL AnimationNode::getSomething( const Sequence< ::sal_Int8 >& rId ) { -if( rId.getLength() == 16 && 0 == memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) +if( rId.getLength() == 16 && memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) == 0 ) { return sal::static_int_cast< sal_Int64 >(reinterpret_cast< sal_IntPtr >(this)); diff --git a/avmedia/source/framework/MediaControlBase.cxx b/avmedia/source/framework/MediaControlBase.cxx index 6e879244cd07..b828efb990b6 100644 --- a/avmedia/source/framework/MediaControlBase.cxx +++ b/avmedia/source/framework/MediaControlBase.cxx @@ -153,7 +153,7 @@ void MediaControlBase::UpdateToolBoxes(MediaItem aMediaItem) { mpPlayToolBox->Enable(); mpMuteToolBox->Enable(); -if( MediaState::Play == aMediaItem.getState() ) +if( aMediaItem.getState() == MediaState::Play ) { mpPlayToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_PLAY ); mpPlayToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_PAUSE, false ); diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx index 85d3f95dd97b..846bd1a52f68 100644 --- a/avmedia/source/framework/mediacontrol.cxx +++ b/avmedia/source/framework/mediacontrol.cxx @@ -106,7 +106,7 @@ MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyl mpMediaPath->Show(); maMinSize.Width() += mpMediaPath->GetSizePixel().Width(); -if( MEDIACONTROLSTYLE_MULTILINE == meControlStyle ) +if( meControlStyle == MEDIACONTROLSTYLE_MULTILINE ) { maMinSize.Width() = 256; maMinSize.Height() = ( maMinSize.Height() << 1 ) + AVMEDIA_CONTROLOFFSET; @@ -121,7 +121,7 @@ MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyl void MediaControl::InitializeWidgets() { -if( MEDIACONTROLSTYLE_SINGLELINE != meControlStyle ) +if( meControlStyle != MEDIACONTROLSTYLE_SINGLELINE ) { mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_OPEN, GetImage(AVMEDIA_TOOLBOXITEM_OPEN), OUString( AVMEDIA_RESID( AVMEDIA_STR_OPEN ) ) ); mpPlayToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_OPEN, HID_AVMEDIA_TOOLBOXITEM_OPEN ); @@ -190,7 +190,7 @@ void MediaControl::Resize() const sal_Int32 nMediaPathWidth = mpMediaPath->GetSizePixel().Width(); const sal_Int32 nTimeSliderHeight = mpTimeSlider->GetSizePixel().Height(); -if( MEDIACONTROLSTYLE_SINGLELINE == meControlStyle ) +if( meControlStyle == MEDIACONTROLSTYLE_SINGLELINE ) { const sal_Int32 nTimeSliderWidth = GetSizePixel().Width() - ( AVMEDIA_CONTROLOFFSET * 4 ) - nPlayToolBoxWidth - nMuteToolBoxWidth - nVolumeSliderWidth - nTimeEditWidth - nZoomToolBoxWidth - nMediaPathWidth; diff --git a/avmedia/source/framework/mediatoolbox.cxx b/avmedia/source/framework/mediatoolbox.cxx index 08d1f9fa7e43..b40c07fc3c89 100644 --- a/avmedia/source/framework/mediatoolbox.cxx +++ b/avmedia/source/framework/mediatoolbox.cxx @@ -103,7 +103,7 @@ void MediaToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const S const MediaItem* pMediaItem = dynamic_cast( pState ); -if( pMediaItem && ( SfxItemState::DEFAULT == eState ) ) +if( pMediaItem && ( eState == SfxItemState::DEFAULT ) ) pCtrl->setState( *pMediaItem ); } } diff --git a/avmedia/source/framework/modeltools.cxx b/avmedia/source/framework/modeltools.cxx index ab78d0d0b544..03d4647849de 100644 --- a/avmedia/source/framework/modeltools.cxx +++ b/avmedia/source/framework/modeltools.cxx @@ -143,7 +143,7 @@ static void lcl_EmbedExternals(const OUString& rSourceURL, const uno::Reference< OUString sTempFileURL; const ::osl::FileBase::RC aErr =
[Libreoffice-commits] core.git: animations/source basctl/source basic/qa basic/source bridges/source
animations/source/animcore/animcore.cxx |4 ++-- basctl/source/basicide/baside2b.cxx |2 +- basic/qa/vba_tests/ole_ObjAssignNoDflt.vb |2 +- basic/source/classes/sb.cxx |2 +- basic/source/runtime/runtime.cxx |2 +- basic/source/sbx/sbxform.cxx |2 +- bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx |2 +- bridges/source/cpp_uno/gcc3_linux_sparc64/cpp2uno.cxx |2 +- bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx |2 +- bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx |2 +- bridges/source/cpp_uno/gcc3_macosx_x86-64/abi.cxx |2 +- bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx |2 +- bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx |2 +- 13 files changed, 14 insertions(+), 14 deletions(-) New commits: commit 0a850f3e15ef762f33688b11a07624ec2674caa1 Author: Andrea Gelmini Date: Thu Mar 2 12:29:36 2017 +0100 Fix typos Change-Id: Iaefa094c82006346897f5563ac3ddcdc60ab68a3 Reviewed-on: https://gerrit.libreoffice.org/34809 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index b45e48f..ff30100 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -121,7 +121,7 @@ class AnimationNodeBase : public XAnimateMotion, public OWeakObject { public: -// our first, last and only protection from mutli-threads! +// our first, last and only protection from multi-threads! Mutex maMutex; }; @@ -364,7 +364,7 @@ private: /** current iteration position */ ChildList_t::iterator maIter; -/** our first, last and only protection from mutli-threads! */ +/** our first, last and only protection from multi-threads! */ Mutex maMutex; }; diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index d2d96b8..a82d57c 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -476,7 +476,7 @@ bool EditorWindow::ImpCanModify() if ( StarBASIC::IsRunning() && rModulWindow.GetBasicStatus().bIsRunning ) { // If in Trace-mode, abort the trace or refuse input -// Remove markers in the modules in Notify at Basic::Stoped +// Remove markers in the modules in Notify at Basic::Stopped if (ScopedVclPtrInstance(nullptr, WB_OK_CANCEL, IDEResId(RID_STR_WILLSTOPPRG).toString())->Execute() == RET_OK) { rModulWindow.GetBasicStatus().bIsRunning = false; diff --git a/basic/qa/vba_tests/ole_ObjAssignNoDflt.vb b/basic/qa/vba_tests/ole_ObjAssignNoDflt.vb index 9a86424..e1be5d3 100644 --- a/basic/qa/vba_tests/ole_ObjAssignNoDflt.vb +++ b/basic/qa/vba_tests/ole_ObjAssignNoDflt.vb @@ -23,7 +23,7 @@ End If cn.CommandTimeout = origTimeout ' restore timeout Rem Double check objCmd.ActiveConnection is pointing to objCmd.ActiveConnection If objCmd.ActiveConnection.CommandTimeout <> origTimeout Then -doUnitTest = "FAIL expected orignal timeout " & origTimeout & " but got " & objCmd.ActiveConnection.CommandTimeout +doUnitTest = "FAIL expected original timeout " & origTimeout & " but got " & objCmd.ActiveConnection.CommandTimeout Exit Function End If doUnitTest = "OK" ' no error diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index f00b6a2..fdb8caf 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -1626,7 +1626,7 @@ bool StarBASIC::CError( SbError code, const OUString& rMsg, { SolarMutexGuard aSolarGuard; -// compiler error during runtime -> stop programm +// compiler error during runtime -> stop program if( IsRunning() ) { // #109018 Check if running Basic is affected diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index e3615b1..2e342c9 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -1974,7 +1974,7 @@ void SbiRuntime::StepSET() { SbxVariableRef refVal = PopVar(); SbxVariableRef refVar = PopVar(); -StepSET_Impl( refVal, refVar, bVBAEnabled ); // this is really assigment +StepSET_Impl( refVal, refVar, bVBAEnabled ); // this is really assignment } void SbiRuntime::StepVBASET() diff --git a/basic/source/sbx/sbxform.cxx b/basic/source/sbx/sbxform.cxx index c468962..f42b804 100644 --- a/basic/source/sbx/sbxform.cxx +++ b/basic/source/sbx/sbxform.cxx @@ -115,7 +115,7 @@ SbxBasicFormater::SbxBasicFormater( sal_Unicode _cDecPoint, sal_Unicode _cThousa { } -// function for ouput of a error-text (for debugging) +// function for output of a error-text (for debugging) // displaces all characters of the string, starting from nStartPos // for one position to larger indexes, i. e. place
[Libreoffice-commits] core.git: animations/source
animations/source/animcore/animcore.cxx | 33 ++-- 1 file changed, 11 insertions(+), 22 deletions(-) New commits: commit 52f377c2590d71895998a170105d0b07c13c267b Author: Muhammet Kara Date: Mon Aug 1 13:54:49 2016 +0300 tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor in AnimationNode Change-Id: I2612286632dddbf96cbf918ffbeb09ac0c99d398 Reviewed-on: https://gerrit.libreoffice.org/27774 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index f80e133..56d4daf 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -506,8 +506,7 @@ AnimationNode::~AnimationNode() Sequence getSupportedServiceNames_PAR() { -Sequence aRet { "com.sun.star.animations.ParallelTimeContainer" }; -return aRet; +return { "com.sun.star.animations.ParallelTimeContainer" }; } OUString getImplementationName_PAR() @@ -517,8 +516,7 @@ OUString getImplementationName_PAR() Sequence getSupportedServiceNames_SEQ() { -Sequence aRet { "com.sun.star.animations.SequenceTimeContainer" }; -return aRet; +return { "com.sun.star.animations.SequenceTimeContainer" }; } OUString getImplementationName_SEQ() @@ -528,8 +526,7 @@ OUString getImplementationName_SEQ() Sequence getSupportedServiceNames_ITERATE() { -Sequence aRet { "com.sun.star.animations.IterateContainer" }; -return aRet; +return { "com.sun.star.animations.IterateContainer" }; } OUString getImplementationName_ITERATE() @@ -539,8 +536,7 @@ OUString getImplementationName_ITERATE() Sequence getSupportedServiceNames_ANIMATE() { -Sequence aRet { "com.sun.star.animations.Animate" }; -return aRet; +return { "com.sun.star.animations.Animate" }; } OUString getImplementationName_ANIMATE() @@ -550,8 +546,7 @@ OUString getImplementationName_ANIMATE() Sequence getSupportedServiceNames_SET() { -Sequence aRet { "com.sun.star.animations.AnimateSet" }; -return aRet; +return { "com.sun.star.animations.AnimateSet" }; } OUString getImplementationName_SET() @@ -561,8 +556,7 @@ OUString getImplementationName_SET() Sequence getSupportedServiceNames_ANIMATECOLOR() { -Sequence aRet { "com.sun.star.animations.AnimateColor" }; -return aRet; +return { "com.sun.star.animations.AnimateColor" }; } OUString getImplementationName_ANIMATECOLOR() @@ -572,8 +566,7 @@ OUString getImplementationName_ANIMATECOLOR() Sequence getSupportedServiceNames_ANIMATEMOTION() { -Sequence aRet { "com.sun.star.animations.AnimateMotion" }; -return aRet; +return { "com.sun.star.animations.AnimateMotion" }; } OUString getImplementationName_ANIMATEMOTION() @@ -583,8 +576,7 @@ OUString getImplementationName_ANIMATEMOTION() Sequence getSupportedServiceNames_ANIMATETRANSFORM() { -Sequence aRet { "com.sun.star.animations.AnimateTransform" }; -return aRet; +return { "com.sun.star.animations.AnimateTransform" }; } OUString getImplementationName_ANIMATETRANSFORM() @@ -594,8 +586,7 @@ OUString getImplementationName_ANIMATETRANSFORM() Sequence getSupportedServiceNames_TRANSITIONFILTER() { -Sequence aRet { "com.sun.star.animations.TransitionFilter" }; -return aRet; +return { "com.sun.star.animations.TransitionFilter" }; } OUString getImplementationName_TRANSITIONFILTER() @@ -605,8 +596,7 @@ OUString getImplementationName_TRANSITIONFILTER() Sequence getSupportedServiceNames_AUDIO() { -Sequence aRet { "com.sun.star.animations.Audio" }; -return aRet; +return { "com.sun.star.animations.Audio" }; } OUString getImplementationName_AUDIO() @@ -616,8 +606,7 @@ OUString getImplementationName_AUDIO() Sequence getSupportedServiceNames_COMMAND() { -Sequence aRet { "com.sun.star.animations.Command" }; -return aRet; +return { "com.sun.star.animations.Command" }; } OUString getImplementationName_COMMAND() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: animations/source canvas/source chart2/source cui/source dbaccess/source desktop/source extensions/source extensions/test filter/source io/source io/test lingucomponent
animations/source/animcore/animcore.cxx| 33 +++--- canvas/source/factory/cf_service.cxx |3 chart2/source/controller/main/ToolbarController.cxx|3 chart2/source/controller/sidebar/Chart2PanelFactory.cxx|3 cui/source/options/treeopt.cxx |3 dbaccess/source/filter/xml/xmlExport.cxx |3 dbaccess/source/filter/xml/xmlfilter.cxx |3 dbaccess/source/ui/browser/exsrcbrw.cxx|3 dbaccess/source/ui/browser/unodatbr.cxx|3 dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx |3 dbaccess/source/ui/uno/DBTypeWizDlg.cxx|3 dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx |3 dbaccess/source/ui/uno/TableFilterDlg.cxx |3 dbaccess/source/ui/uno/UserSettingsDlg.cxx |3 dbaccess/source/ui/uno/admindlg.cxx|3 dbaccess/source/ui/uno/copytablewizard.cxx |3 dbaccess/source/ui/uno/unosqlmessage.cxx |3 desktop/source/offacc/acceptor.cxx |3 extensions/source/abpilot/unodialogabp.cxx |3 extensions/source/propctrlr/MasterDetailLinkDialog.cxx |3 extensions/source/propctrlr/controlfontdialog.cxx |3 extensions/test/ole/cpnt/cpnt.cxx |3 filter/source/xsltfilter/XSLTFilter.cxx|6 - io/source/stm/odata.cxx|9 -- io/source/stm/omark.cxx|6 - io/source/stm/opipe.cxx|3 io/test/stm/datatest.cxx |3 io/test/stm/marktest.cxx |6 - io/test/stm/pipetest.cxx |3 lingucomponent/source/languageguessing/guesslang.cxx |3 odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx |3 sax/source/expatwrap/sax_expat.cxx |3 sax/source/expatwrap/saxwriter.cxx |3 sax/source/fastparser/fastparser.cxx |3 sc/source/filter/xml/xmlimprt.cxx |3 sc/source/ui/sidebar/ScPanelFactory.cxx|3 sc/source/ui/unoobj/exceldetect.cxx|3 sc/source/ui/unoobj/pageuno.cxx|3 sc/source/ui/unoobj/scdetect.cxx |3 sd/source/ui/dlg/dlgass.cxx|3 sfx2/source/sidebar/CommandInfoProvider.cxx|3 shell/source/backends/localebe/localebackend.cxx |3 shell/source/backends/wininetbe/wininetbackend.cxx |3 stoc/source/inspect/introspection.cxx |3 svtools/source/config/fontsubstconfig.cxx |6 - svtools/source/uno/addrtempuno.cxx |3 svtools/source/uno/unoevent.cxx|3 sw/qa/extras/odfexport/odfexport.cxx |3 sw/source/core/unocore/unoparagraph.cxx|6 - sw/source/ui/dbui/addresslistdialog.cxx|3 sw/source/ui/dbui/dbinsdlg.cxx |3 sw/source/uibase/envelp/labelcfg.cxx |3 unotools/source/config/fltrcfg.cxx | 12 +-- unotools/source/ucbhelper/ucbhelper.cxx|6 - vcl/source/window/builder.cxx |6 - xmloff/source/core/DomBuilderContext.cxx |3 xmloff/source/core/xmlexp.cxx | 15 +--- xmloff/source/draw/XMLShapeStyleContext.cxx|3 xmloff/source/style/xmlimppr.cxx | 15 +--- xmloff/source/text/XMLIndexTOCContext.cxx |3 60 files changed, 90 insertions(+), 180 deletions(-) New commits: commit 54d22957bc241fc5867fa1c720cf1266133e4e90 Author: Noel Grandin Date: Sun Nov 15 12:17:1
[Libreoffice-commits] core.git: animations/source avmedia/source include/animations include/avmedia
animations/source/animcore/animcore.cxx | 70 avmedia/source/framework/mediacontrol.cxx| 24 avmedia/source/framework/mediaitem.cxx |8 +- avmedia/source/framework/soundhandler.cxx| 10 +-- avmedia/source/gstreamer/gstframegrabber.hxx | 12 ++-- avmedia/source/gstreamer/gstmanager.hxx | 16 ++--- avmedia/source/gstreamer/gstplayer.hxx | 54 +- avmedia/source/gstreamer/gstwindow.hxx | 66 +++--- avmedia/source/macavf/framegrabber.hxx | 16 ++--- avmedia/source/macavf/manager.hxx| 16 ++--- avmedia/source/macavf/player.hxx | 48 avmedia/source/macavf/window.hxx | 64 +++--- avmedia/source/opengl/oglmanager.hxx | 12 ++-- avmedia/source/opengl/oglplayer.cxx |4 - avmedia/source/quicktime/framegrabber.hxx| 22 +++ avmedia/source/quicktime/manager.hxx | 16 ++--- avmedia/source/quicktime/player.hxx | 48 avmedia/source/quicktime/player.mm |2 avmedia/source/quicktime/window.hxx | 64 +++--- avmedia/source/viewer/mediaevent_impl.cxx| 44 +++ avmedia/source/viewer/mediaevent_impl.hxx| 30 +- avmedia/source/vlc/vlcframegrabber.cxx |8 +- avmedia/source/vlc/vlcframegrabber.hxx | 16 ++--- avmedia/source/vlc/vlcmanager.hxx| 22 +++ avmedia/source/vlc/vlcplayer.cxx | 38 ++--- avmedia/source/vlc/vlcplayer.hxx | 62 ++--- avmedia/source/vlc/vlcwindow.hxx | 54 +- avmedia/source/win/framegrabber.hxx | 18 +++--- avmedia/source/win/manager.hxx | 16 ++--- avmedia/source/win/player.hxx| 44 +++ avmedia/source/win/window.cxx|8 +- avmedia/source/win/window.hxx| 78 +-- include/animations/animationnodehelper.hxx | 19 +++--- include/avmedia/mediawindow.hxx |8 +- include/avmedia/modeltools.hxx |2 35 files changed, 519 insertions(+), 520 deletions(-) New commits: commit 40da0a9d1cea08fae38c6bc478d1a69f8faaf627 Author: Noel Grandin Date: Fri Jul 17 10:50:48 2015 +0200 com::sun::uno->css in avmedia and animations Change-Id: Ie4365a488728c39fedacae7650b4b90260e7e44a Reviewed-on: https://gerrit.libreoffice.org/17153 Reviewed-by: Noel Grandin Tested-by: Noel Grandin diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx old mode 100644 new mode 100755 index 2d23c2b..ec00e38 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -430,7 +430,7 @@ AnimationNode::AnimationNode( sal_Int16 nNodeType ) mnFadeColor(0), mfVolume(1.0), mnCommand(0), -mnIterateType( ::com::sun::star::presentation::ShapeAnimationSubType::AS_WHOLE ), +mnIterateType( css::presentation::ShapeAnimationSubType::AS_WHOLE ), mfIterateInterval(0.0) { OSL_ENSURE((sal_uInt32)nNodeType < sizeof(mpTypes)/sizeof(Sequence*), "NodeType out of range"); @@ -2129,7 +2129,7 @@ namespace class theAnimationNodeUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theAnimationNodeUnoTunnelId > {}; } -const ::com::sun::star::uno::Sequence< sal_Int8 > & AnimationNode::getUnoTunnelId() +const css::uno::Sequence< sal_Int8 > & AnimationNode::getUnoTunnelId() { return theAnimationNodeUnoTunnelId::get().getSeq(); } @@ -2168,79 +2168,79 @@ void AnimationNode::fireChangeListener() } // namespace animcore -extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL -com_sun_star_animations_ParallelTimeContainer_get_implementation(::com::sun::star::uno::XComponentContext*, - ::com::sun::star::uno::Sequence const &) +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL +com_sun_star_animations_ParallelTimeContainer_get_implementation(css::uno::XComponentContext*, + css::uno::Sequence const &) { return cppu::acquire(new animcore::AnimationNode(PAR)); } -extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL -com_sun_star_animations_SequenceTimeContainer_get_implementation(::com::sun::star::uno::XComponentContext*, - ::com::sun::star::uno::Sequence const &) +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL +com_sun_star_animations_SequenceTimeContainer_get_implementation(css::uno::XComponentContext*, + css::uno::Sequence const &) { return cppu::acquire(new animcore::AnimationNode(SEQ)); } -exter
[Libreoffice-commits] core.git: animations/source
animations/source/animcore/animcore.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 15c0fba5c2adb72dfaaf2dfeb0fc5c0dbdfa6e26 Author: Takeshi Abe Date: Wed Jul 1 16:35:04 2015 +0900 tdf#88206: replace cppu::WeakImplHelper1 with cppu::WeakImplHelper in animations. Change-Id: I7d776ddb81e0943bf2ea5895ea26631db76546ac Reviewed-on: https://gerrit.libreoffice.org/16645 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index cd67ed0..2d23c2b 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -51,7 +51,7 @@ #include #include -#include +#include #include #include @@ -351,7 +351,7 @@ private: -class TimeContainerEnumeration : public ::cppu::WeakImplHelper1< XEnumeration > +class TimeContainerEnumeration : public ::cppu::WeakImplHelper< XEnumeration > { public: explicit TimeContainerEnumeration( const ChildList_t &rChildren ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: animations/source solenv/bin
animations/source/animcore/animcore.component |2 +- solenv/bin/native-code.py | 13 - 2 files changed, 13 insertions(+), 2 deletions(-) New commits: commit 657b42d7ebc9cf73a47aa9c9200706ee164a679c Author: Miklos Vajna Date: Thu Mar 12 13:07:11 2015 +0100 native-code: animcore_component_getFactory -> ctors Change-Id: Ife39c5114f946244691c72c9defa8854fdf8a1b6 diff --git a/animations/source/animcore/animcore.component b/animations/source/animcore/animcore.component index c6c4cce..2f490aa 100644 --- a/animations/source/animcore/animcore.component +++ b/animations/source/animcore/animcore.component @@ -20,7 +20,7 @@ http://openoffice.org/2010/uno-components";> > + constructor="com_sun_star_animations_Animate_get_implementation"> http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: animations/source
animations/source/animcore/animcore.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit c23bcc23311942616b41f4dbd4fd1b2570faca4f Author: Stephan Bergmann Date: Wed Apr 9 09:57:30 2014 +0200 Missing include Change-Id: I2e04a61cc682fd6390571807c547a713d224d32b diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 3b6bd7d..6210f77 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -57,6 +57,8 @@ #include #include +#include + using ::osl::Mutex; using ::osl::Guard; using ::cppu::OInterfaceContainerHelper; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: animations/source
animations/source/animcore/animcore.cxx|8 animations/source/animcore/targetpropertiescreator.cxx |6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) New commits: commit f72ba183205634fb8490b1632059d3bec21901b9 Author: Alexander Wilms Date: Tue Feb 25 17:16:36 2014 +0100 Remove visual noise from animations Change-Id: I45b8019bebf6530136642bf34be829d7e26e2454 Reviewed-on: https://gerrit.libreoffice.org/8228 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index b199af3..6259271 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -99,11 +99,11 @@ using namespace ::com::sun::star::animations::AnimationNodeType; namespace animcore { -// + typedef ::std::list< Reference< XAnimationNode > > ChildList_t; -// + class AnimationNodeBase : public XAnimateMotion, public XAnimateColor, @@ -350,7 +350,7 @@ private: ChildList_t maChildren; }; -// + class TimeContainerEnumeration : public ::cppu::WeakImplHelper1< XEnumeration > { @@ -402,7 +402,7 @@ Any SAL_CALL TimeContainerEnumeration::nextElement() return makeAny( (*maIter++) ); } -// + Sequence< Type >* AnimationNode::mpTypes[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; Sequence< sal_Int8 >* AnimationNode::mpId[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; diff --git a/animations/source/animcore/targetpropertiescreator.cxx b/animations/source/animcore/targetpropertiescreator.cxx index 04cc32f..f31cddc5 100644 --- a/animations/source/animcore/targetpropertiescreator.cxx +++ b/animations/source/animcore/targetpropertiescreator.cxx @@ -143,13 +143,13 @@ namespace animcore // TODO(P2): Maybe a better hash function would be to // spread mnParagraphIndex to 32 bit: a0b0c0d0e0... Hakmem // should have a formula. -// + // Yes it has: // x = (x & 0xFF00) << 8) | (x >> 8) & 0xFF00 | x & 0xFFFF; // x = (x & 0x00F000F0) << 4) | (x >> 4) & 0x00F000F0 | x & 0xF00FF00F; // x = (x & 0x0C0C0C0C) << 2) | (x >> 2) & 0x0C0C0C0C | x & 0xC3C3C3C3; // x = (x & 0x) << 1) | (x >> 1) & 0x | x & 0x; -// + // Costs about 17 cycles on a RISC machine with infinite // instruction level parallelism (~42 basic // instructions). Thus I truly doubt this pays off... @@ -421,7 +421,7 @@ namespace animcore // TODO(F1): Maybe limit functor application to main sequence // alone (CL said something that shape visibility is only // affected by effects in the main sequence for PPT). -// + // OTOH, client code can pass us only the main sequence (which // it actually does right now, for the slideshow implementation). aFunctor( xRootNode ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: animations/source idlc/test include/xmloff sw/source xmloff/inc
animations/source/animcore/animcore.cxx |4 ++-- idlc/test/parser/attribute.tests|2 +- include/xmloff/xmltypes.hxx |2 +- sw/source/core/layout/tabfrm.cxx|2 +- sw/source/core/text/pormulti.cxx|2 +- xmloff/inc/txtfldi.hxx |6 +++--- 6 files changed, 9 insertions(+), 9 deletions(-) New commits: commit a4285867cdac221f34cffe2e6c1893684fe4c62e Author: Julien Nabet Date: Thu Feb 6 21:32:04 2014 +0100 Typo: atribute(s) -> attribute(s) Change-Id: I5434402e372c4567b2c3f96f5c175618ba3e5cfb diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 3b927ea..b5e3cd5 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -323,7 +323,7 @@ private: sal_Int16 mnColorSpace; sal_Bool mbDirection; -// atributes for XAnimateMotion +// attributes for XAnimateMotion Any maPath, maOrigin; // attributes for XAnimateTransform @@ -480,7 +480,7 @@ AnimationNode::AnimationNode( const AnimationNode& rNode ) mnColorSpace( rNode.mnColorSpace ), mbDirection( rNode.mbDirection ), -// atributes for XAnimateMotion +// attributes for XAnimateMotion maPath( rNode.maPath ), maOrigin( rNode.maOrigin ), diff --git a/idlc/test/parser/attribute.tests b/idlc/test/parser/attribute.tests index 46f9c1a..73b9d34 100644 --- a/idlc/test/parser/attribute.tests +++ b/idlc/test/parser/attribute.tests @@ -222,7 +222,7 @@ interface I1 { }; -EXPECT SUCCESS "atribute.tests 28": +EXPECT SUCCESS "attribute.tests 28": exception E1 {}; interface I1 { [attribute, bound] long a { diff --git a/include/xmloff/xmltypes.hxx b/include/xmloff/xmltypes.hxx index 846f22b..55cac83 100644 --- a/include/xmloff/xmltypes.hxx +++ b/include/xmloff/xmltypes.hxx @@ -65,7 +65,7 @@ // Export only: If an xml attribute with the same name has been exported // already, supply its value to the exportXML call and delete the existing -// atribute afterwards. +// attribute afterwards. #define MID_FLAG_MERGE_ATTRIBUTE0x0080 // Import and Export: The property in question must exist. No call to diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 90d5415..b1f0c96 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -1837,7 +1837,7 @@ void SwTabFrm::MakeAll() LockJoin(); //I don't want to be destroyed on the way. SwLayNotify aNotify( this );//does the notification in the DTor // If pos is invalid, we have to call a SetInvaKeep at aNotify. -// Otherwise the keep atribute would not work in front of a table. +// Otherwise the keep attribute would not work in front of a table. const sal_Bool bOldValidPos = GetValidPosFlag(); //If my neighbour is my Follow at the same time, I'll swallow it up. diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx index 52ff5c4..8556be5 100644 --- a/sw/source/core/text/pormulti.cxx +++ b/sw/source/core/text/pormulti.cxx @@ -1047,7 +1047,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( sal_Int32 &rPos, { // If bOn is false and the next attribute starts later than rPos // the winner attribute is interrupted at rPos. -// If the start of the next atribute is behind the end of +// If the start of the next attribute is behind the end of // the last attribute on the aEnd-stack, this is the endposition // on the stack is the end of the 2-line portion. if( !bOn || aEnd.back() < *pTmp->GetStart() ) diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx index 1ee1680..9333688 100644 --- a/xmloff/inc/txtfldi.hxx +++ b/xmloff/inc/txtfldi.hxx @@ -570,7 +570,7 @@ public: ::com::sun::star::beans::XPropertySet> & xPropertySet); }; -/** import docinfo fields with only fixed atribute */ +/** import docinfo fields with only fixed attribute */ class XMLSimpleDocInfoImportContext : public XMLTextFieldImportContext { const OUString sPropertyFixed; @@ -1131,7 +1131,7 @@ protected: virtual void ProcessAttribute( sal_uInt16 nAttrToken, const OUString& sAttrValue ); -/// no atributes -> empty method +/// no attributes -> empty method virtual void PrepareField( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> & xPropertySet); @@ -1161,7 +1161,7 @@ protected: virtual void ProcessAttribute( sal_uInt16 nAttrToken, const OUString& sAttrValue ); -/// no atributes -> empty method +/// no attributes -> empty method virtual void PrepareField( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> & xPropertySet); _
[Libreoffice-commits] core.git: animations/source basegfx/source cppuhelper/source cui/source embeddedobj/source forms/source package/source unotools/source
animations/source/animcore/targetpropertiescreator.cxx | 20 -- basegfx/source/tools/unopolypolygon.cxx|3 cppuhelper/source/factory.cxx |3 cui/source/dialogs/colorpicker.cxx | 123 - embeddedobj/source/commonembedding/xfactory.cxx| 28 --- forms/source/component/FormattedFieldWrapper.cxx | 24 --- package/source/zippackage/ZipPackage.cxx |7 unotools/source/ucbhelper/xtempfile.cxx|9 - 8 files changed, 21 insertions(+), 196 deletions(-) New commits: commit f9369d33a455b328f96fa554e3e942e64a40a4da Author: Alexandre Vicenzi Date: Sat Jan 25 16:24:52 2014 -0200 fdo#54938 Convert to cppu::supportsService Change-Id: I512c525029ebd63d261560d27e9f38bbe94f7e10 Reviewed-on: https://gerrit.libreoffice.org/7649 Tested-by: LibreOffice gerrit bot Reviewed-by: Marcos Souza Tested-by: Marcos Souza diff --git a/animations/source/animcore/targetpropertiescreator.cxx b/animations/source/animcore/targetpropertiescreator.cxx index 6141f67..04cc32f 100644 --- a/animations/source/animcore/targetpropertiescreator.cxx +++ b/animations/source/animcore/targetpropertiescreator.cxx @@ -31,16 +31,16 @@ #include #include #include + +#include +#include #include #include #include +#include #include #include - -#include - #include -#include using namespace ::com::sun::star; @@ -88,8 +88,6 @@ namespace animcore TargetPropertiesCreator( const uno::Reference< uno::XComponentContext >& rxContext ); }; -// - uno::Reference< uno::XInterface > SAL_CALL createInstance_TargetPropertiesCreator( const uno::Reference< uno::XComponentContext > & rSMgr ) throw (uno::Exception) { return TargetPropertiesCreator::createInstance( rSMgr ); @@ -107,8 +105,6 @@ namespace animcore return aRet; } -// - namespace { // Vector containing all properties for a given shape @@ -201,7 +197,6 @@ namespace animcore { // extract target shape from iterate node // (will override the target for all children) -// -- uno::Reference< animations::XIterateContainer > xIterNode( xNode, uno::UNO_QUERY ); @@ -395,8 +390,6 @@ namespace animcore }; } -// - TargetPropertiesCreator::TargetPropertiesCreator( const uno::Reference< uno::XComponentContext >& ) : TargetPropertiesCreator_Base( m_aMutex ) { @@ -433,10 +426,7 @@ namespace animcore // it actually does right now, for the slideshow implementation). aFunctor( xRootNode ); - // output to result sequence -// -- - uno::Sequence< animations::TargetProperties > aRes( aShapeHash.size() ); ::std::size_t nCurrIndex(0); @@ -474,7 +464,7 @@ namespace animcore sal_Bool SAL_CALL TargetPropertiesCreator::supportsService( const OUString& ServiceName ) throw( uno::RuntimeException ) { -return ServiceName.equalsIgnoreAsciiCase(SERVICE_NAME); +return cppu::supportsService(this, ServiceName); } uno::Sequence< OUString > SAL_CALL TargetPropertiesCreator::getSupportedServiceNames() throw( uno::RuntimeException ) diff --git a/basegfx/source/tools/unopolypolygon.cxx b/basegfx/source/tools/unopolypolygon.cxx index aa93b41..38535ab 100644 --- a/basegfx/source/tools/unopolypolygon.cxx +++ b/basegfx/source/tools/unopolypolygon.cxx @@ -32,6 +32,7 @@ #include #include #include +#include using namespace ::com::sun::star; @@ -443,7 +444,7 @@ namespace unotools sal_Bool SAL_CALL UnoPolyPolygon::supportsService( const OUString& ServiceName ) throw( uno::RuntimeException ) { -return ServiceName == SERVICE_NAME; +return cppu::supportsService(this, ServiceName); } uno::Sequence< OUString > SAL_CALL UnoPolyPolygon::getSupportedServiceNames() throw( uno::RuntimeException ) diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx index b9e85c1..b0b7e7b 100644 --- a/cppuhelper/source/factory.cxx +++ b/cppuhelper/source/factory.cxx @@ -954,8 +954,7 @@ OUString OFactoryProxyHelper::getImplementationName() sal_Bool OFactoryProxyHelper::supportsService(const OUString& ServiceName) throw(::com::sun::star::uno::RuntimeException) { -Reference xInfo( xFactory, UNO_QUERY ); -return xInfo.is() && xInfo->supportsServ
[Libreoffice-commits] core.git: animations/source
animations/source/animcore/animcore.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 1563162131ae00cd2a33c59349567a7b820dc5db Author: Caolán McNamara Date: Tue Nov 5 11:45:52 2013 + Resolves: fdo#69645 Parent Node disposed and mpParent pointing to junk mpParent points the contents of mxParent which is a WeakReference, so we can check if the WeakReference is still valid before using mpParent Change-Id: I40424714865e506b8cf27017539795eb834e10d2 diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 6678893..089c868 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -2060,7 +2060,8 @@ void AnimationNode::fireChangeListener() } } -if( mpParent ) +//fdo#69645 use get() on WeakReference of mxParent to test if mpParent is still valid +if( mpParent && mxParent.get().is() ) mpParent->fireChangeListener(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: animations/source avmedia/source basctl/source binaryurp/source bridges/test lingucomponent/source shell/source starmath/source
animations/source/animcore/animcore.cxx| 14 --- avmedia/source/framework/soundhandler.cxx | 41 +- basctl/source/accessibility/accessibledialogcontrolshape.cxx | 22 - basctl/source/accessibility/accessibledialogwindow.cxx | 22 - binaryurp/source/bridgefactory.cxx |9 -- bridges/test/java_uno/acquire/testacquire.cxx | 10 -- bridges/test/java_uno/equals/testequals.cxx|8 - lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx | 17 lingucomponent/source/languageguessing/guesslang.cxx | 16 --- lingucomponent/source/spellcheck/macosxspell/macspellimp.mm| 17 lingucomponent/source/spellcheck/spell/sspellimp.cxx | 16 --- lingucomponent/source/thesaurus/libnth/nthesimp.cxx| 16 --- shell/source/backends/localebe/localebackend.cxx | 17 shell/source/backends/macbe/macbackend.mm | 15 --- shell/source/backends/wininetbe/wininetbackend.cxx | 16 --- shell/source/cmdmail/cmdmailsuppl.cxx | 18 shell/source/unix/exec/shellexec.cxx | 19 shell/source/win32/SysShExec.cxx | 18 shell/source/win32/simplemail/smplmailsuppl.cxx|9 -- starmath/source/smdetect.cxx | 12 -- 20 files changed, 44 insertions(+), 288 deletions(-) New commits: commit 704f95e5255ff72bfb548d50d66d4da61dc483ef Author: Marcos Paulo de Souza Date: Wed Oct 23 14:35:10 2013 -0200 fdo#54938: More uses of cppu::supportsService Change-Id: I90a7a07a43559b8d7e1d4b886b2624255200d46b Reviewed-on: https://gerrit.libreoffice.org/6406 Tested-by: LibreOffice gerrit bot Reviewed-by: Stephan Bergmann Tested-by: Stephan Bergmann diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 90b5062..6678893 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -47,6 +47,7 @@ #include #include #include +#include #include #include @@ -781,23 +782,12 @@ OUString AnimationNode::getImplementationName() throw() } } -// - // XServiceInfo sal_Bool AnimationNode::supportsService(const OUString& ServiceName) throw() { -Sequence< OUString > aSNL( getSupportedServiceNames() ); -const OUString * pArray = aSNL.getConstArray(); - -for( sal_Int32 i = 0; i < aSNL.getLength(); i++ ) -if( pArray[i] == ServiceName ) -return sal_True; - -return sal_False; +return cppu::supportsService(this, ServiceName); } -// - // XServiceInfo Sequence< OUString > AnimationNode::getSupportedServiceNames(void) throw() { diff --git a/avmedia/source/framework/soundhandler.cxx b/avmedia/source/framework/soundhandler.cxx index bf70b6e..b9e76a2 100644 --- a/avmedia/source/framework/soundhandler.cxx +++ b/avmedia/source/framework/soundhandler.cxx @@ -29,6 +29,7 @@ #include #include +#include namespace avmedia{ @@ -134,47 +135,19 @@ OUString SAL_CALL SoundHandler::getImplementationName() throw( css::uno::Runtime return impl_getStaticImplementationName(); } -/*===*/ -/* XServiceInfo */ -/*===*/ +// XServiceInfo sal_Bool SAL_CALL SoundHandler::supportsService( const OUString& sServiceName ) throw( css::uno::RuntimeException ) { -/* Set default return value. */ -bool bReturn = sal_False ; -/* Get names of all supported servicenames. */ -css::uno::Sequence < OUString > seqServiceNames = getSupportedServiceNames(); -const OUString*pArray = seqServiceNames.getConstArray(); -sal_Int32 nCounter= 0; -sal_Int32 nLength = seqServiceNames.getLength(); -/* Search for right name in list. */ -while ( - ( nCounter < nLength ) && - ( bReturn == sal_False ) -) -{ -/* Is name was found, say "YES, SERVICE IS SUPPORTED." and break loop. */ -if ( pArray[nCounter] == sServiceName ) -{ -bReturn = sal_True ; -} -/* Else step to next element in list. */ -++nCounter; -} -/* Return state of search. */ -return bReturn; +return cppu::supportsService(this, s
[Libreoffice-commits] core.git: animations/source avmedia/source basic/source connectivity/source cppu/source cui/source desktop/source sc/inc sc/source sfx2/inc sfx2/source sw/source
animations/source/animcore/factreg.hxx|5 + avmedia/source/inc/mediamisc.hxx |5 + avmedia/source/win/interface.hxx |5 + basic/source/inc/basiccharclass.hxx |5 + basic/source/runtime/rtlproto.hxx |5 + connectivity/source/inc/ParameterSubstitution.hxx |6 ++ cppu/source/threadpool/current.hxx|5 + cui/source/inc/treeopt.hxx|5 + desktop/source/app/cmdlinehelp.hxx|5 + sc/inc/stylehelper.hxx|5 + sc/source/filter/inc/extlstcontext.hxx|5 + sc/source/filter/xml/xmlcondformat.hxx|5 + sc/source/ui/inc/colorformat.hxx |5 + sc/source/ui/inc/condformatdlg.hxx|5 + sc/source/ui/inc/condformatdlgentry.hxx |5 + sc/source/ui/inc/condformathelper.hxx |5 + sc/source/ui/inc/condformatmgr.hxx|5 + sc/source/ui/inc/namedefdlg.hxx |5 + sc/source/ui/inc/namemgrtable.hxx |5 + sc/source/ui/vba/helperdecl.hxx |6 ++ sfx2/inc/fwkhelper.hxx|5 + sfx2/source/appl/panelist.hxx |1 + sfx2/source/doc/graphhelp.hxx |5 + sfx2/source/doc/oleprops.hxx |4 sfx2/source/doc/printhelper.hxx |5 + sw/source/core/inc/textapi.hxx|5 + 26 files changed, 127 insertions(+) New commits: commit 8fc6905674142c226a117a97a08cf0b24c9d4fc1 Author: Thomas Arnhold Date: Mon Oct 21 05:42:51 2013 +0200 fdo#68849 add some header guards Change-Id: I9d25a58f22095689eccc0ac444c163d1e9bee69f Reviewed-on: https://gerrit.libreoffice.org/6364 Reviewed-by: Thomas Arnhold Tested-by: Thomas Arnhold diff --git a/animations/source/animcore/factreg.hxx b/animations/source/animcore/factreg.hxx index c95ef38..a6ede62 100644 --- a/animations/source/animcore/factreg.hxx +++ b/animations/source/animcore/factreg.hxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#ifndef _INCLUDED_ANIMCORE_FACTREG_HXX_ +#define _INCLUDED_ANIMCORE_FACTREG_HXX_ + namespace animcore { #define DECL_NODE_FACTORY(N)\ @@ -39,4 +42,6 @@ DECL_NODE_FACTORY( TargetPropertiesCreator ); } +#endif + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/source/inc/mediamisc.hxx b/avmedia/source/inc/mediamisc.hxx index f460161..9d04cd6 100644 --- a/avmedia/source/inc/mediamisc.hxx +++ b/avmedia/source/inc/mediamisc.hxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#ifndef _AVMEDIA_MEDIAMISC_HXX +#define _AVMEDIA_MEDIAMISC_HXX + class ResMgr; #define AVMEDIA_RESID( nId ) ResId( nId, * ::avmedia::GetResMgr() ) @@ -39,4 +42,6 @@ namespace avmedia ResMgr* GetResMgr(); } +#endif + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/source/win/interface.hxx b/avmedia/source/win/interface.hxx index 09fb792..0a713fb 100644 --- a/avmedia/source/win/interface.hxx +++ b/avmedia/source/win/interface.hxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#ifndef _AVMEDIA_INTERFACE_HXX +#define _AVMEDIA_INTERFACE_HXX + extern "C" const CLSID CLSID_MediaDet; extern "C" const IID IID_IMediaDet; struct ISampleGrabber; @@ -113,4 +116,6 @@ public: }; +#endif + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basic/source/inc/basiccharclass.hxx b/basic/source/inc/basiccharclass.hxx index 03801dc..6923d22 100644 --- a/basic/source/inc/basiccharclass.hxx +++ b/basic/source/inc/basiccharclass.hxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#ifndef _BASIC_BASICCHARCLASS_HXX +#define _BASIC_BASICCHARCLASS_HXX + #include #include @@ -39,4 +42,6 @@ public: class theBasicCharClass: public rtl::Static {}; +#endif + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basic/source/runtime/rtlproto.hxx b/basic/source/runtime/rtlproto.hxx index 7a6a9d8..ffd0b47 100644 --- a/basic/source/runtime/rtlproto.hxx +++ b/basic/source/runtime/rtlproto.hxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#ifndef _INCLUDED_BASIC_RTLPROTO_HXX_ +#define _INCLUDED_BASIC_RTLPROTO_HXX_ + #include #include "sbtrace.hxx" @@ -368,4 +371,6 @@ extern RTLFUNC(TraceCommand); extern double Now_Impl(); extern void Wait_Impl( bool bDurationBased, SbxArray& rPar ); +#endif + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/inc/ParameterSubstitution.hxx b/connectivity/source/inc/ParameterSubstitution.hxx index 2c37895..5f
[Libreoffice-commits] core.git: animations/source basic/source sal/qa sax/source sfx2/source svtools/source
animations/source/animcore/factreg.cxx |2 +- basic/source/comp/exprgen.cxx |4 ++-- basic/source/comp/parser.cxx |4 ++-- basic/source/comp/token.cxx| 10 +- basic/source/sbx/sbxscan.cxx |2 +- sal/qa/osl/file/osl_File.cxx |6 +++--- sax/source/tools/converter.cxx |2 +- sfx2/source/doc/iframe.cxx |2 +- sfx2/source/doc/plugin.cxx |2 +- sfx2/source/sidebar/Deck.cxx |2 +- svtools/source/uno/miscservices.cxx|2 +- 11 files changed, 19 insertions(+), 19 deletions(-) New commits: commit 392c5b2a70440c03341f21c7583ca5139b4a253b Author: Takeshi Abe Date: Thu Aug 1 04:32:32 2013 +0900 Mark as const Change-Id: Idd1d0641d5b7d8594f354c7d2e2a9093ecc6b2f7 diff --git a/animations/source/animcore/factreg.cxx b/animations/source/animcore/factreg.cxx index 4f5b078..d957981 100644 --- a/animations/source/animcore/factreg.cxx +++ b/animations/source/animcore/factreg.cxx @@ -40,7 +40,7 @@ using namespace animcore; 0, 0\ }\ -static struct ImplementationEntry g_entries[] = +static const struct ImplementationEntry g_entries[] = { IMPLEMENTATION_ENTRY( PAR ), IMPLEMENTATION_ENTRY( SEQ ), diff --git a/basic/source/comp/exprgen.cxx b/basic/source/comp/exprgen.cxx index 3578097..762e0e3 100644 --- a/basic/source/comp/exprgen.cxx +++ b/basic/source/comp/exprgen.cxx @@ -28,7 +28,7 @@ typedef struct { SbiOpcode eOp; // Opcode } OpTable; -static OpTable aOpTable [] = { +static const OpTable aOpTable [] = { { EXPON,_EXP }, { MUL, _MUL }, { DIV, _DIV }, @@ -156,7 +156,7 @@ void SbiExprNode::Gen( RecursiveMode eRecMode ) { pRight->Gen(); } -for( OpTable* p = aOpTable; p->eTok != NIL; p++ ) +for( const OpTable* p = aOpTable; p->eTok != NIL; p++ ) { if( p->eTok == eTok ) { diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx index bb53d93..d61f334 100644 --- a/basic/source/comp/parser.cxx +++ b/basic/source/comp/parser.cxx @@ -38,7 +38,7 @@ struct SbiStatement { #define Y sal_True #define N sal_False -static SbiStatement StmntTable [] = { +static const SbiStatement StmntTable [] = { { ATTRIBUTE, &SbiParser::Attribute, Y, Y, }, // ATTRIBUTE { CALL, &SbiParser::Call, N, Y, }, // CALL { CLOSE,&SbiParser::Close, N, Y, }, // CLOSE @@ -409,7 +409,7 @@ bool SbiParser::Parse() // statement parsers -SbiStatement* p; +const SbiStatement* p; for( p = StmntTable; p->eTok != NIL; p++ ) if( p->eTok == eCurTok ) break; diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx index 0da1c51..f3d27ed 100644 --- a/basic/source/comp/token.cxx +++ b/basic/source/comp/token.cxx @@ -25,9 +25,9 @@ struct TokenTable { SbiToken t; const char *s; }; static short nToken;// number of tokens -static TokenTable* pTokTable; +static const TokenTable* pTokTable; -static TokenTable aTokTable_Basic [] = { +static const TokenTable aTokTable_Basic [] = { { CAT, "&" }, { MUL, "*" }, { PLUS, "+" }, @@ -220,7 +220,7 @@ SbiTokenizer::SbiTokenizer( const OUString& rSrc, StarBASIC* pb ) bEos = bKeywords = bErrorIsSymbol = true; if( !nToken ) { -TokenTable *tp; +const TokenTable *tp; for( nToken = 0, tp = pTokTable; tp->t; nToken++, tp++ ) {} } @@ -297,7 +297,7 @@ const OUString& SbiTokenizer::Symbol( SbiToken t ) default: break; } -TokenTable* tp = pTokTable; +const TokenTable* tp = pTokTable; for( short i = 0; i < nToken; i++, tp++ ) { if( tp->t == t ) @@ -336,7 +336,7 @@ SbiToken SbiTokenizer::Next() bEos = IsEoln( eCurTok ); return eCurTok; } -TokenTable *tp; +const TokenTable *tp; if( !NextSym() ) { diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx index 157407e..180de7e 100644 --- a/basic/source/sbx/sbxscan.cxx +++ b/basic/source/sbx/sbxscan.cxx @@ -288,7 +288,7 @@ SbxError SbxValue::ScanNumIntnl( const OUString& rSrc, double& nVal, bool bSingl } -static double roundArray[] = { +static const double roundArray[] = { 5.0e+0, 0.5e+0, 0.5e-1, 0.5e-2, 0.5e-3, 0.5e-4, 0.5e-5, 0.5e-6, 0.5e-7, 0.5e-8, 0.5e-9, 0.5e-10,0.5e-11,0.5e-12,0.5e-13,0.5e-14,0.5e-15 }; diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index 15df1b8..6357a8b 100644 --- a/sal/qa/osl/file/osl_File.cxx +++ b/sal/qa/osl/file/osl_File.cxx @@ -6198,9 +6198,9 @@ namespace osl_Directory #ifdef WNT //## -char* get_unused_drive_letter() +const char* get_unused_drive_letter() { -static char m_aBuff[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; +
[Libreoffice-commits] core.git: animations/source basic/source chart2/source comphelper/source xmlscript/source xmlsecurity/source
animations/source/animcore/animcore.cxx |2 +- basic/source/comp/sbcomp.cxx |6 +++--- basic/source/sbx/sbxvar.cxx |2 +- chart2/source/tools/ConfigColorScheme.cxx|2 +- chart2/source/tools/ErrorBar.cxx |2 +- comphelper/source/misc/docpasswordhelper.cxx |4 ++-- xmlscript/source/misc/unoservices.cxx|2 +- xmlsecurity/source/xmlsec/nss/secerror.cxx |2 +- 8 files changed, 11 insertions(+), 11 deletions(-) New commits: commit bddd4d45989067e58589519c497e03ff443094e9 Author: Takeshi Abe Date: Mon Jul 22 20:57:11 2013 +0900 Mark as const Change-Id: I2746b92b1360c3c181879a81f653c44ef609f351 diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 5b83bc0..90b5062 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -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 const sal_Int32 type_numbers[] = { 7, // CUSTOM 9, // PAR diff --git a/basic/source/comp/sbcomp.cxx b/basic/source/comp/sbcomp.cxx index 20d5262..32cdabc 100644 --- a/basic/source/comp/sbcomp.cxx +++ b/basic/source/comp/sbcomp.cxx @@ -245,11 +245,11 @@ static void lcl_lineOut( const char* pStr, const char* pPreStr = NULL, const cha const char* lcl_getSpaces( int nSpaceCount ) { -static sal_Char Spaces[] = " " +static const sal_Char Spaces[] = " " " " " "; -static int nAvailableSpaceCount = strlen( Spaces ); -static sal_Char* pSpacesEnd = Spaces + nAvailableSpaceCount; +static const int nAvailableSpaceCount = strlen( Spaces ); +static const sal_Char* pSpacesEnd = Spaces + nAvailableSpaceCount; if( nSpaceCount > nAvailableSpaceCount ) nSpaceCount = nAvailableSpaceCount; diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx index b692720..6c4c09b 100644 --- a/basic/source/sbx/sbxvar.cxx +++ b/basic/source/sbx/sbxvar.cxx @@ -244,7 +244,7 @@ void SbxVariable::SetName( const OUString& rName ) const OUString& SbxVariable::GetName( SbxNameType t ) const { -static char cSuffixes[] = " %&!#@ $"; +static const char cSuffixes[] = " %&!#@ $"; if( t == SbxNAME_NONE ) { return maName; diff --git a/chart2/source/tools/ConfigColorScheme.cxx b/chart2/source/tools/ConfigColorScheme.cxx index d1425e9..5774392 100644 --- a/chart2/source/tools/ConfigColorScheme.cxx +++ b/chart2/source/tools/ConfigColorScheme.cxx @@ -157,7 +157,7 @@ void ConfigColorScheme::retrieveConfigColors() return static_cast< sal_Int32 >( m_aColorSequence[ nIndex % m_nNumberOfColors ] ); // fall-back: hard-coded standard colors -static sal_Int32 nDefaultColors[] = { +static const sal_Int32 nDefaultColors[] = { 0xff, 0x993366, 0xcc, 0xcc, 0x660066, 0xff8080, 0x0066cc, 0xff, 0x80, diff --git a/chart2/source/tools/ErrorBar.cxx b/chart2/source/tools/ErrorBar.cxx index 932efbc..14c88fb 100644 --- a/chart2/source/tools/ErrorBar.cxx +++ b/chart2/source/tools/ErrorBar.cxx @@ -53,7 +53,7 @@ bool lcl_isInternalData( const uno::Reference< chart2::data::XLabeledDataSequenc const SfxItemPropertySet* GetErrorBarPropertySet() { -static SfxItemPropertyMapEntry aErrorBarPropertyMap_Impl[] = +static const SfxItemPropertyMapEntry aErrorBarPropertyMap_Impl[] = { {MAP_CHAR_LEN("ShowPositiveError"),0,&getBooleanCppuType(), 0, 0}, {MAP_CHAR_LEN("ShowNegativeError"),1,&getBooleanCppuType(), 0, 0}, diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx index b941cbd..1cf9775 100644 --- a/comphelper/source/misc/docpasswordhelper.cxx +++ b/comphelper/source/misc/docpasswordhelper.cxx @@ -135,7 +135,7 @@ sal_Bool DocPasswordHelper::IsModifyPasswordCorrect( const OUString& aPassword, sal_uInt32 DocPasswordHelper::GetWordHashAsUINT32( const OUString& aUString ) { -static sal_uInt16 pInitialCode[] = { +static const sal_uInt16 pInitialCode[] = { 0xE1F0, // 1 0x1D0F, // 2 0xCC9C, // 3 @@ -153,7 +153,7 @@ sal_uInt32 DocPasswordHelper::GetWordHashAsUINT32( 0x4EC3 // 15 }; -static sal_uInt16 pEncryptionMatrix[15][7] = { +
[Libreoffice-commits] core.git: animations/source
animations/source/animcore/targetpropertiescreator.cxx | 23 ++--- 1 file changed, 14 insertions(+), 9 deletions(-) New commits: commit edba4119fffb83d7a001f5a2845d20ce3d6c6a1e Author: Andre Fischer Date: Fri Jun 15 06:11:45 2012 + Resolves: #i119966# Fixed handling of the "visibility" flag of animations. Patch by: Steve Yin Review by: Andre Fischer (cherry picked from commit 241c9736944e49308e03b74191524a1b8a5076bb) Conflicts: animations/source/animcore/targetpropertiescreator.cxx Change-Id: Ic81ff35a5a31ba5239510e85c17bb4a261d57b6a diff --git a/animations/source/animcore/targetpropertiescreator.cxx b/animations/source/animcore/targetpropertiescreator.cxx index 9e9fd27..d42799f 100644 --- a/animations/source/animcore/targetpropertiescreator.cxx +++ b/animations/source/animcore/targetpropertiescreator.cxx @@ -267,9 +267,9 @@ namespace animcore // FALLTHROUGH intended case animations::AnimationNodeType::AUDIO: // FALLTHROUGH intended -default: +/*default: // ignore this node, no valuable content for now. -break; +break;*/ case animations::AnimationNodeType::SET: { @@ -332,9 +332,9 @@ namespace animcore // initially. This is currently the only place // where a shape effect influences shape // attributes outside it's effective duration. +sal_Bool bVisible( sal_False ); if( xAnimateNode->getAttributeName().equalsIgnoreAsciiCase("visibility") ) { -sal_Bool bVisible( sal_False ); uno::Any aAny( xAnimateNode->getTo() ); @@ -360,22 +360,27 @@ namespace animcore } } -if( bVisible ) +/*if( bVisible ) { // target is set to 'visible' at the // first relevant effect. Thus, target // must be initially _hidden_, for the // effect to have visible impact. -mrShapeHash.insert( +*/ +} +// target is set the 'visible' value, +// so we should record the opposite value +mrShapeHash.insert( XShapeHash::value_type( aTarget, VectorOfNamedValues( 1, beans::NamedValue( - xAnimateNode->getAttributeName(), -uno::makeAny( sal_False ) ) ) ) ); -} -} + //xAnimateNode->getAttributeName(), +::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("visibility")), +uno::makeAny( !bVisible ) ) ) ) ); +//} +//} } break; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: animations/source svx/inc svx/source
animations/source/animcore/animcore.cxx | 13 - svx/inc/svx/svdobj.hxx |2 +- svx/source/svdraw/svdobj.cxx|5 - 3 files changed, 13 insertions(+), 7 deletions(-) New commits: commit d6e752d5ebfaf66d1c9b0694f9c8582311d6151a Author: Jian Fang Zhang Date: Mon Jun 18 12:26:30 2012 + i#113608#, memory leak in animations: newly exposed crashed problem Patch by: zhangjf Review by: Andre Fischer Conflicts: animations/source/animcore/animcore.cxx svx/source/svdraw/svdobj.cxx Change-Id: I305d5d92d064265edf108a5a34c948c610b4fdc1 diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 6307f30..a503097 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -46,6 +46,8 @@ #include #include #include +#include + #include #include @@ -64,6 +66,7 @@ using ::com::sun::star::uno::XInterface; using ::com::sun::star::uno::RuntimeException; using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::Reference; +using ::com::sun::star::uno::WeakReference; using ::com::sun::star::uno::XComponentContext; using ::com::sun::star::uno::Exception; using ::com::sun::star::uno::XWeak; @@ -300,7 +303,7 @@ private: Sequence< NamedValue > maUserData; // parent interface for XChild interface implementation -Reference mxParent; +WeakReference mxParent; AnimationNode* mpParent; // attributes for XAnimate @@ -1134,7 +1137,7 @@ void SAL_CALL AnimationNode::setUserData( const Sequence< NamedValue >& _userdat Reference< XInterface > SAL_CALL AnimationNode::getParent() throw (RuntimeException) { Guard< Mutex > aGuard( maMutex ); -return mxParent; +return mxParent.get(); } // @@ -1143,12 +1146,12 @@ Reference< XInterface > SAL_CALL AnimationNode::getParent() throw (RuntimeExcept void SAL_CALL AnimationNode::setParent( const Reference< XInterface >& Parent ) throw (NoSupportException, RuntimeException) { Guard< Mutex > aGuard( maMutex ); -if( Parent != mxParent ) +if( Parent != mxParent.get() ) { mxParent = Parent; mpParent = 0; -Reference< XUnoTunnel > xTunnel( mxParent, UNO_QUERY ); +Reference< XUnoTunnel > xTunnel( mxParent.get(), UNO_QUERY ); if( xTunnel.is() ) mpParent = reinterpret_cast< AnimationNode* >( sal::static_int_cast< sal_IntPtr >(xTunnel->getSomething( getUnoTunnelId() ))); @@ -2050,7 +2053,7 @@ void AnimationNode::fireChangeListener() { Reference< XInterface > xSource( static_cast(this), UNO_QUERY ); Sequence< ElementChange > aChanges; -const ChangesEvent aEvent( xSource, makeAny( mxParent ), aChanges ); +const ChangesEvent aEvent( xSource, makeAny( mxParent.get() ), aChanges ); while( aIterator.hasMoreElements() ) { Reference< XChangesListener > xListener( aIterator.next(), UNO_QUERY ); diff --git a/svx/inc/svx/svdobj.hxx b/svx/inc/svx/svdobj.hxx index 75cc0e4..27a4568 100644 --- a/svx/inc/svx/svdobj.hxx +++ b/svx/inc/svx/svdobj.hxx @@ -1072,7 +1072,7 @@ protected: private: /** only for internal use! */ -SvxShape* getSvxShape() const; +SvxShape* getSvxShape(); /** do not use directly, always use getSvxShape() if you have to! */ SvxShape* mpSvxShape; diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index e35c994..1e52b4f 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -2963,7 +2963,7 @@ void SdrObject::impl_setUnoShape( const uno::Reference< uno::XInterface >& _rxUn } /** only for internal use! */ -SvxShape* SdrObject::getSvxShape() const +SvxShape* SdrObject::getSvxShape() { DBG_TESTSOLARMUTEX(); // retrieving the impl pointer and subsequently using it is not thread-safe, of course, so it needs to be @@ -2974,6 +2974,9 @@ SvxShape* SdrObject::getSvxShape() const OSL_ENSURE( !( !xShape.is() && mpSvxShape ), "SdrObject::getSvxShape: still having IMPL-Pointer to dead object!" ); #endif +//#113608#, make sure mpSvxShape is always synchronized with maWeakUnoShape +if ( mpSvxShape && !xShape.is() ) +mpSvxShape = NULL; return mpSvxShape; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: animations/source chart2/source comphelper/source connectivity/source dbaccess/source extensions/source forms/source framework/source oox/source sc/source sfx2/source s
animations/source/animcore/animcore.cxx |1 - chart2/source/model/template/BubbleChartTypeTemplate.cxx|1 - chart2/source/model/template/ColumnLineChartTypeTemplate.cxx|1 - chart2/source/model/template/LineChartTypeTemplate.cxx |1 - chart2/source/model/template/NetChartTypeTemplate.cxx |1 - chart2/source/model/template/ScatterChartTypeTemplate.cxx |1 - comphelper/source/misc/documentinfo.cxx |1 - comphelper/source/misc/namedvaluecollection.cxx |1 - connectivity/source/commontools/dbtools.cxx |1 - connectivity/source/commontools/paramwrapper.cxx|1 - connectivity/source/drivers/postgresql/pq_databasemetadata.cxx |2 -- connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx |2 -- dbaccess/source/sdbtools/connection/objectnames.cxx |1 - dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx|1 - extensions/source/propctrlr/propeventtranslation.cxx|1 - forms/source/helper/windowstateguard.cxx|1 - framework/source/uielement/toolbarmanager.cxx |1 - oox/source/export/shapes.cxx|1 - sc/source/filter/excel/xepivot.cxx |1 - sc/source/filter/xml/XMLTrackedChangesContext.cxx |1 - sfx2/source/doc/docmacromode.cxx|1 - sfx2/workben/custompanel/ctp_factory.cxx|1 - svx/source/form/filtnav.cxx |1 - svx/source/form/fmscriptingenv.cxx |2 -- svx/source/form/fmvwimp.cxx |1 - svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx|1 - toolkit/source/awt/stylesettings.cxx|1 - toolkit/source/controls/grid/defaultgridcolumnmodel.cxx |1 - toolkit/source/controls/grid/sortablegriddatamodel.cxx |1 - ucb/source/ucp/ext/ucpext_datasupplier.cxx |1 - writerperfect/source/draw/CDRImportFilter.cxx |4 writerperfect/source/draw/CMXImportFilter.cxx |4 writerperfect/source/draw/MSPUBImportFilter.cxx |4 writerperfect/source/draw/VisioImportFilter.cxx |4 writerperfect/source/draw/WPGImportFilter.cxx |4 xmloff/source/chart/SchXMLSeriesHelper.cxx |1 - xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx |1 - xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx |1 - 38 files changed, 56 deletions(-) New commits: commit 41e03a166eb90773f0ee9c2602122ec7d5ba Author: Thomas Arnhold Date: Tue Mar 5 12:34:10 2013 +0100 doubled using Change-Id: Ib1d3213a688194bfb027b7bca5bd9ac1b7bb1b28 diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 36eeb6c..6307f30 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -72,7 +72,6 @@ using ::com::sun::star::uno::makeAny; using ::com::sun::star::lang::NoSupportException; using ::com::sun::star::lang::IllegalArgumentException; using ::com::sun::star::lang::WrappedTargetException; -using ::com::sun::star::lang::NoSupportException; using ::com::sun::star::lang::XServiceInfo; using ::com::sun::star::lang::XTypeProvider; using ::com::sun::star::container::NoSuchElementException; diff --git a/chart2/source/model/template/BubbleChartTypeTemplate.cxx b/chart2/source/model/template/BubbleChartTypeTemplate.cxx index e841a61..c85b12e 100644 --- a/chart2/source/model/template/BubbleChartTypeTemplate.cxx +++ b/chart2/source/model/template/BubbleChartTypeTemplate.cxx @@ -38,7 +38,6 @@ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; using ::rtl::OUString; using ::com::sun::star::beans::Property; -using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Any; using ::osl::MutexGuard; diff --git a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx index 15028af..3355d9e 100644 --- a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx +++ b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx @@ -40,7 +40,6 @@ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; using ::rtl::OUString; using ::com::sun::star::beans::Property; -using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Any; using ::osl::MutexGuard; diff --git a/chart2/source/model/template/LineChartTypeTemplate.cxx b/chart2/source/model/template/LineChartTypeTemplate.cxx index c4e3068..a0d370d 100644 --- a/cha