161 Commits
Author SHA1 Message Date
Mike Kaganski 165a0990a0 Use comphelper::WeakImplHelper in AnimationNode
Simplifies the implementation a bit.

Change-Id: Idd63f0447b2362e29d29a4d99749205053e0b29f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202596
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2026-03-24 16:55:01 +01:00
Noel Grandin 22f46bd89f use more concrete UNO classes
Change-Id: Id10786bbf7985adbb251224b45f9dabcc84d0a3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182721
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-03-10 14:18:35 +01:00
Noel Grandin 8b091048d1 loplugin:ostr avmedia
Change-Id: Ice017029f0b93ae92e76d3905f38c730cc5a2fc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167189
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-06 15:14:09 +02:00
Gabor Kelemen 4f680db872 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 <gabor.kelemen.extern@allotropia.de>
2024-03-08 09:13:28 +01:00
Arnaud VERSINI c4fb690e6f 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 <noel.grandin@collabora.co.uk>
2024-01-21 13:51:07 +01:00
Arnaud Versini da9582aacb 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 <arnaud.versini@libreoffice.org>
2023-09-23 11:29:24 +02:00
Noel Grandin 7ffa7e56c0 loplugin: new global analysis locking2
look for methods where we don't need to guard access
to the field, because the field is never modified

Change-Id: I62c33cc3f52881557515765d3733c4afc78547aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155836
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-19 17:40:47 +02:00
Noel Grandin 31e2b4746a 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 <noel.grandin@collabora.co.uk>
2023-05-07 08:00:46 +02:00
Gabor Kelemen b4b3a0d407 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 <vmiklos@collabora.com>
2023-04-20 08:24:33 +02:00
Andrea Gelmini bed16c5e9d Remove duplicated include
Change-Id: I84dc37baac93f946bd66b6d709a43529d023dac6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146381
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-02-01 05:46:46 +00:00
Noel Grandin 07699b6e78 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 <noel.grandin@collabora.co.uk>
2023-01-31 08:20:30 +00:00
Noel Grandin ee284e65d2 XUnoTunnel->dynamic_cast in AnimationNode
Change-Id: I9684ac5987c087797e1ca7a8ddb0f9c5b731faed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145992
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-23 10:10:18 +00:00
Mike Kaganski f22a9447c5 Simplify a bit
Change-Id: I8e86aa5a43f7c0bc234331def1b4440dbe2cefa4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145389
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-01-12 12:40:55 +00:00
Noel Grandin 91c954f53f tsan:lock-order-inversion in AnimationNode
make -j 24 -rs -f /home/noel/libo-tsan/Makefile.gbuild
CppunitTest_filter_svg
[build CUT] filter_svg
==================
WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock)
(pid=1138169)
Cycle in lock order graph: M0 (0x7b0c0043c8c0) => M1 (0x7b0c00459090)
=> M0

  Mutex M1 acquired here while holding mutex M0 in main thread:
/home/noel/llvm-project/compiler-rt/lib/tsan/rtl/../../sanitizer_common/sanitizer_common_interceptors.inc:4481
(cppunittester+0x9b4c2)
    #1 osl_acquireMutex ??:? (libuno_sal.so.3+0x783ca)
namespace)::AnimationNode::setParent(com::sun::star::uno::Reference<com::sun::star::uno::XInterface>
const&) animcore.cxx:? (libanimcorelo.so+0x1d34f)
        M1 try to lock
namespace)::AnimationNode::setParent(com::sun::star::uno::Reference<com::sun::star::uno::XInterface>
const&) animcore.cxx:? (libanimcorelo.so+0x33bf2)
namespace)::AnimationNode::appendChild(com::sun::star::uno::Reference<com::sun::star::animations::XAnimationNode>
const&) animcore.cxx:? (libanimcorelo.so+0x27312)
        M0 locked
namespace)::AnimationNode::appendChild(com::sun::star::uno::Reference<com::sun::star::animations::XAnimationNode>
const&) animcore.cxx:? (libanimcorelo.so+0x34d29)
xmloff::AnimationNodeContext::AnimationNodeContext(com::sun::star::uno::Reference<com::sun::star::animations::XAnimationNode>
const&, SvXMLImport&, int,
com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList>
const&, std::shared_ptr<xmloff::AnimationsImportHelperImpl> const&)
animationimport.cxx:? (libxolo.so+0x338060)
com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList>
const&) animationimport.cxx:? (libxolo.so+0x33e010)
com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList>
const&) ??:? (libxolo.so+0x2ca188)
com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList>
const&) ??:? (libxolo.so+0x2cb106)
namespace)::Event const*) fastparser.cxx:? (libexpwraplo.so+0x4731a)
sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource
const&) fastparser.cxx:? (libexpwraplo.so+0x407fa)
sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource
const&) ??:? (libexpwraplo.so+0x48d08)
const&) ??:? (libxolo.so+0x2c7296)
SvXMLImport::parseStream(com::sun::star::xml::sax::InputSource const&)
??:? (libxolo.so+0x2c74e2)
namespace)::ReadThroughComponent(com::sun::star::uno::Reference<com::sun::star::embed::XStorage>
const&, com::sun::star::uno::Reference<com::sun::star::lang::XComponent>
const&, char const*,
com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>
const&, char const*,
com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&,
rtl::OUString const&, bool) sdxmlwrp.cxx:? (libsdlo.so+0x4f2088)
(libsdlo.so+0x4ef8ed)
    #17 sd::DrawDocShell::Load(SfxMedium&) ??:? (libsdlo.so+0x5bdbeb)
(libsfxlo.so+0x596b65)
    #19 SfxObjectShell::DoLoad(SfxMedium*) ??:? (libsfxlo.so+0x598732)
SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&) ??:? (libsfxlo.so+0x5e5222)
SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&) ??:? (libsfxlo.so+0x5e6135)
namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame>
const&) frmload.cxx:? (libsfxlo.so+0x6ca8fb)
namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame>
const&) frmload.cxx:? (libsfxlo.so+0x6cd749)
(libfwklo.so+0x30000f)
    #25 framework::LoadEnv::start() loadenv.cxx:? (libfwklo.so+0x2fb828)
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame>
const&, rtl::OUString const&, int, LoadEnvFeatures) loadenv.cxx:?
(libfwklo.so+0x2f98d0)
framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader>
const&,
com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>
const&, rtl::OUString const&, rtl::OUString const&, int,
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&) loadenv.cxx:? (libfwklo.so+0x2f8905)
rtl::OUString const&, int,
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&) ??:? (libfwklo.so+0x322cbf)
framework::Desktop::loadComponentFromURL(rtl::OUString const&,
rtl::OUString const&, int,
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&) ??:? (libfwklo.so+0x322f11)
rtl::OUString const&,
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&) ??:? (libunotest.so+0x13f41)
(libsubsequenttest.so+0x5fc93)
std::char_traits<char16_t> >, char const*) ??:?
(libsubsequenttest.so+0x60570)
(libtest_filter_svg.so+0x161bd)

  Mutex M0 acquired here while holding mutex M1 in main thread:
/home/noel/llvm-project/compiler-rt/lib/tsan/rtl/../../sanitizer_common/sanitizer_common_interceptors.inc:4481
(cppunittester+0x9b4c2)
    #1 osl_acquireMutex ??:? (libuno_sal.so.3+0x783ca)
namespace)::AnimationNode::fireChangeListener() animcore.cxx:?
(libanimcorelo.so+0x3832f)
        M0 try to lock
namespace)::AnimationNode::fireChangeListener() animcore.cxx:?
(libanimcorelo.so+0x38814)
namespace)::AnimationNode::fireChangeListener() animcore.cxx:?
(libanimcorelo.so+0x38814)
namespace)::AnimationNode::setParent(com::sun::star::uno::Reference<com::sun::star::uno::XInterface>
const&) animcore.cxx:? (libanimcorelo.so+0x1d514)
namespace)::AnimationNode::setParent(com::sun::star::uno::Reference<com::sun::star::uno::XInterface>
const&) animcore.cxx:? (libanimcorelo.so+0x33bf2)
namespace)::AnimationNode::appendChild(com::sun::star::uno::Reference<com::sun::star::animations::XAnimationNode>
const&) animcore.cxx:? (libanimcorelo.so+0x27312)
        M1 locked
namespace)::AnimationNode::appendChild(com::sun::star::uno::Reference<com::sun::star::animations::XAnimationNode>
const&) animcore.cxx:? (libanimcorelo.so+0x34d29)
xmloff::AnimationNodeContext::AnimationNodeContext(com::sun::star::uno::Reference<com::sun::star::animations::XAnimationNode>
const&, SvXMLImport&, int,
com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList>
const&, std::shared_ptr<xmloff::AnimationsImportHelperImpl> const&)
animationimport.cxx:? (libxolo.so+0x338060)
com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList>
const&) animationimport.cxx:? (libxolo.so+0x33e010)
com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList>
const&) ??:? (libxolo.so+0x2ca188)
com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList>
const&) ??:? (libxolo.so+0x2cb106)
namespace)::Event const*) fastparser.cxx:? (libexpwraplo.so+0x4731a)
sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource
const&) fastparser.cxx:? (libexpwraplo.so+0x407fa)
sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource
const&) ??:? (libexpwraplo.so+0x48d08)
const&) ??:? (libxolo.so+0x2c7296)
SvXMLImport::parseStream(com::sun::star::xml::sax::InputSource const&)
??:? (libxolo.so+0x2c74e2)
namespace)::ReadThroughComponent(com::sun::star::uno::Reference<com::sun::star::embed::XStorage>
const&, com::sun::star::uno::Reference<com::sun::star::lang::XComponent>
const&, char const*,
com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>
const&, char const*,
com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&,
rtl::OUString const&, bool) sdxmlwrp.cxx:? (libsdlo.so+0x4f2088)
(libsdlo.so+0x4ef8ed)
    #20 sd::DrawDocShell::Load(SfxMedium&) ??:? (libsdlo.so+0x5bdbeb)
(libsfxlo.so+0x596b65)
    #22 SfxObjectShell::DoLoad(SfxMedium*) ??:? (libsfxlo.so+0x598732)
SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&) ??:? (libsfxlo.so+0x5e5222)
SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&) ??:? (libsfxlo.so+0x5e6135)
namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame>
const&) frmload.cxx:? (libsfxlo.so+0x6ca8fb)
namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame>
const&) frmload.cxx:? (libsfxlo.so+0x6cd749)
(libfwklo.so+0x30000f)
    #28 framework::LoadEnv::start() loadenv.cxx:? (libfwklo.so+0x2fb828)
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame>
const&, rtl::OUString const&, int, LoadEnvFeatures) loadenv.cxx:?
(libfwklo.so+0x2f98d0)
framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader>
const&,
com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>
const&, rtl::OUString const&, rtl::OUString const&, int,
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&) loadenv.cxx:? (libfwklo.so+0x2f8905)
rtl::OUString const&, int,
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&) ??:? (libfwklo.so+0x322cbf)
framework::Desktop::loadComponentFromURL(rtl::OUString const&,
rtl::OUString const&, int,
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&) ??:? (libfwklo.so+0x322f11)
rtl::OUString const&,
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&) ??:? (libunotest.so+0x13f41)

Change-Id: Iecb3f5c1e553d8f4278c7caf7e81f6cb1f589e9a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145335
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-12 06:53:05 +00:00
Arnaud VERSINI 2fffe41501 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 <noel.grandin@collabora.co.uk>
2022-07-17 19:29:22 +02:00
Stephan Bergmann d1cdf9a24d 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 <sbergman@redhat.com>
2022-05-31 22:42:14 +02:00
Noel Grandin e855dc5226 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 <noel.grandin@collabora.co.uk>
2022-05-07 14:24:10 +02:00
Arnaud VERSINI 63400fa8c2 animations : use cppuhelper::BaseMutex
Change-Id: Ife2b5480ad26c01388f5803f1cc5ae1e9e44a123
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128842
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-30 07:32:41 +01:00
Noel Grandin 27651c72f2 use more OInterfaceContainerHelper3 in AnimationNode
Change-Id: I619582287d3ce1712921782d47cc722deeb1e0d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125918
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-27 08:09:31 +01:00
Noel Grandin 224953d896 loplugin:moveparam in various
Change-Id: Ifa7c8ff2b21f63d234c29c28303d0bacd376c1e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123434
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-12 09:50:31 +02:00
Mike Kaganski 96bd77de5a Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 5
- Revise uses of getSomething to use getFromUnoTunnel

Where that is impossible, use getSomething_cast to unify casting,
and minimize number of places doing low-level transformations.

The change keeps the existing tunnel references that last for the
duration of the pointers' life, because sometimes destroying such
reference may destroy the pointed object, and result in use after
free.

Change-Id: I291c33223582c34cd2c763aa8aacf0ae899ca4c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122101
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-15 06:08:27 +02:00
Mike Kaganski 3f65724ec5 Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 4
- Change implementations of getSomething to use getSomethingImpl

Or where that's impossible, use getSomething_cast to unify this and
reduce number of places where we reinterpret_cast.

All static methods getting tunnel ids were renamed to getUnoTunnelId,
to comply with the convention used in <comphelper/servicehelper.hxx>.

TODO (in separate commits):
- Revise uses of getSomething to use getFromUnoTunnel

Change-Id: Ifde9e214b52e5df678de71fcc32d2199c82e85cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122100
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-15 06:08:14 +02:00
Mike Kaganski 05bc93db2d Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 1
The header got some changes:
1. Move UnoTunnelIdInit and isUnoTunnelId into 'comphelper' namespace
2. Rename UnoTunnelIdInit to UnoIdInit, as a precondition to replace
   of uses of OImplementationId with it, including in XTypeProvider
3. Introduce convenience functions 'getSomething_cast' to cast between
   sal_Int64 and object pointers uniformly.
4. Rename getUnoTunnelImplementation to getFromUnoTunnel, both to make
   it a bit shorter, and to reflect its function better. Templatize it
   to take also css::uno::Any for convenience.
5. Introduce getSomethingImpl, inspired by sw::UnoTunnelImpl; allow it
   handle cases both with and without fallback to parent.
6. Adjust UNO3_GETIMPLEMENTATION_* macros

TODO (in separate commits):
- Drop sw::UnoTunnelImpl and sw::UnoTunnelGetImplementation
- Replace all uses of OImplementationId in core with UnoIdInit
- Deprecate OImplementationId in <cppuhelper/typeprovider.hxx>
- Change implementations of getSomething to use getSomethingImpl
- Revise uses of getSomething to use getFromUnoTunnel

Change-Id: If4a3cb024130f1f552f988f0479589da1cd066e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122022
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-15 06:07:36 +02:00
Stephan Bergmann 10d29c390d throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewrite
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-05-02 17:02:28 +02:00
Noel Grandin 07fd90cc7d rtl::Static -> function local static
Change-Id: I2071c27bdf074403ec24e67f9278ac27f9491303
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113698
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-07 08:08:44 +02:00
Arnaud Versini 3a5c7d98d9 animcore : AnimationNode should be final
Change-Id: I0be5e9d21b36823953e41cd8389f28ce36ed45e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112434
Tested-by: Jenkins
Tested-by: Arnaud Versini <arnaud.versini@libreoffice.org>
Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
2021-03-21 12:37:18 +01:00
Miklos Vajna 020c721fa9 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 <vmiklos@collabora.com>
Tested-by: Jenkins
2021-01-27 18:04:44 +01:00
Miklos Vajna 1093c931e9 [API CHANGE] PPTX filter: fix lost hide-while-show prop for slide narrations
The OOXML markup is <p:cMediaNode ... showWhenStopped="0">, 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 <vmiklos@collabora.com>
Tested-by: Jenkins
2021-01-26 21:15:24 +01:00
Noel bca1b74c07 improve some IllegalArgumentException messages
Change-Id: Id88f2a82bf2651e8b5895aa330f32b71ff5b0e48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109546
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-20 09:03:45 +01:00
Gabor Kelemen 0505a00a9b tdf#42949 Fix new IWYU warnings in directories [ab]*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: Ib0008b9bb095f27e5e436d6b507dc709ab7bf01a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105313
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-05 14:57:25 +01:00
Sarper Akdemir f525b8898d 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 <Thorsten.Behrens@CIB.de>
2020-08-31 12:27:39 +02:00
Sarper Akdemir 394f74e6f1 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 <Thorsten.Behrens@CIB.de>
2020-08-22 11:24:16 +02:00
Sarper Akdemir e33486189d 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 <Thorsten.Behrens@CIB.de>
2020-08-20 15:21:07 +02:00
Noel Grandin 4f3f61a621 loplugin:flatten in accessibility
Change-Id: I5e02fe0288845210f1d8e41db0342967858098fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92487
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-18 21:46:57 +02:00
Stephan Bergmann f853ec317f Extend loplugin:external to warn about classes
...following up on 314f15bff0 "Extend
loplugin:external to warn about enums".

Cases where free functions were moved into an unnamed namespace along with a
class, to not break ADL, are in:

  filter/source/svg/svgexport.cxx
  sc/source/filter/excel/xelink.cxx
  sc/source/filter/excel/xilink.cxx
  svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx

All other free functions mentioning moved classes appear to be harmless and not
give rise to (silent, even) ADL breakage.  (One remaining TODO in
compilerplugins/clang/external.cxx is that derived classes are not covered by
computeAffectedTypes, even though they could also be affected by ADL-breakage---
but don't seem to be in any acutal case across the code base.)

For friend declarations using elaborate type specifiers, like

  class C1 {};
  class C2 { friend class C1; };

* If C2 (but not C1) is moved into an unnamed namespace, the friend declaration
must be changed to not use an elaborate type specifier (i.e., "friend C1;"; see
C++17 [namespace.memdef]/3: "If the name in a friend declaration is neither
qualified nor a template-id and the declaration is a function or an
elaborated-type-specifier, the lookup to determine whether the entity has been
previously declared shall not consider any scopes outside the innermost
enclosing namespace.")

* If C1 (but not C2) is moved into an unnamed namespace, the friend declaration
must be changed too, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882>
"elaborated-type-specifier friend not looked up in unnamed namespace".

Apart from that, to keep changes simple and mostly mechanical (which should help
avoid regressions), out-of-line definitions of class members have been left in
the enclosing (named) namespace.  But explicit specializations of class
templates had to be moved into the unnamed namespace to appease
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598> "explicit specialization of
template from unnamed namespace using unqualified-id in enclosing namespace".

Also, accompanying declarations (of e.g. typedefs or static variables) that
could arguably be moved into the unnamed namespace too have been left alone.

And in some cases, mention of affected types in blacklists in other loplugins
needed to be adapted.

And sc/qa/unit/mark_test.cxx uses a hack of including other .cxx, one of which
is sc/source/core/data/segmenttree.cxx where e.g. ScFlatUInt16SegmentsImpl is
not moved into an unnamed namespace (because it is declared in
sc/inc/segmenttree.hxx), but its base ScFlatSegmentsImpl is.  GCC warns about
such combinations with enabled-by-default -Wsubobject-linkage, but "The compiler
doesn’t give this warning for types defined in the main .C file, as those are
unlikely to have multiple definitions."
(<https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Warning-Options.html>)  The
warned-about classes also don't have multiple definitions in the given test, so
disable the warning when including the .cxx.

Change-Id: Ib694094c0d8168be68f8fe90dfd0acbb66a3f1e4
Reviewed-on: https://gerrit.libreoffice.org/83239
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-22 12:57:32 +01:00
Arkadiy Illarionov 24c17dab2f 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 <sbergman@redhat.com>
2019-08-23 09:10:49 +02:00
Stephan Bergmann b4dc9062e1 Improved loplugin:stringconstant (now that GCC 7 supports it): animations
Change-Id: I05d48f4e504eae76768d0606091ecdb58e67d8bd
Reviewed-on: https://gerrit.libreoffice.org/76699
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-31 13:01:28 +02:00
Gabor Kelemen c3c620c89d tdf#42949 Fix IWYU warnings in: animations/ eventattacher/ i18nutil/
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I23a6d485ee1ca0bc3801bcc1a6d748b8ed2b490c
Reviewed-on: https://gerrit.libreoffice.org/72634
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-05-23 09:06:27 +02:00
Arkadiy Illarionov 6f31c63e35 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 <noel.grandin@collabora.co.uk>
2019-04-06 18:55:10 +02:00
Gabor Kelemen d9e0eade62 Remove unused using declarations in directories [a-d]*
Found with:
run-clang-tidy-7 -checks=-*,misc-unused-using-decls

Change-Id: I50f6dfa881ac4e752668e762ade0943aaf28ab96
Reviewed-on: https://gerrit.libreoffice.org/69601
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-27 10:44:44 +01:00
Stephan Bergmann 206b5b2661 New loplugin:external
...warning about (for now only) functions and variables with external linkage
that likely don't need it.

The problems with moving entities into unnamed namespacs and breaking ADL
(as alluded to in comments in compilerplugins/clang/external.cxx) are
illustrated by the fact that while

  struct S1 { int f() { return 0; } };
  int f(S1 s) { return s.f(); }
  namespace N {
    struct S2: S1 { int f() { return 1; } };
    int f(S2 s) { return s.f(); }
  }
  int main() { return f(N::S2()); }

returns 1, both moving just the struct S2 into an nunnamed namespace,

  struct S1 { int f() { return 0; } };
  int f(S1 s) { return s.f(); }
  namespace N {
    namespace { struct S2: S1 { int f() { return 1; } }; }
    int f(S2 s) { return s.f(); }
  }
  int main() { return f(N::S2()); }

as well as moving just the function f overload into an unnamed namespace,

  struct S1 { int f() { return 0; } };
  int f(S1 s) { return s.f(); }
  namespace N {
    struct S2: S1 { int f() { return 1; } };
    namespace { int f(S2 s) { return s.f(); } }
  }
  int main() { return f(N::S2()); }

would each change the program to return 0 instead.

Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c
Reviewed-on: https://gerrit.libreoffice.org/60539
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-17 09:05:38 +02:00
Noel Grandin c2139cafe6 loplugin:simplifyconstruct in accessibility..bridges
Change-Id: I08f6a64b50f03d1b08027a2ac9e51442255d64bc
Reviewed-on: https://gerrit.libreoffice.org/59976
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-05 09:28:12 +02:00
Gabor Kelemen 7af90cc93b Add missing sal/log.hxx headers
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx>
(and don't make use of it themselves), but many other files happen to depend on it.
This is a continuation of commit 6ff2d84ade
to be able to remove those unneeded includes.

This commit adds missing headers to every file found by:
grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG')
to directories from a* to configmgr

Change-Id: I6ea1a7f992b1f835f5bac7a725e1135abee3f85a
Reviewed-on: https://gerrit.libreoffice.org/57170
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-09 10:49:06 +02:00
Noel Grandin 3af500580b loplugin:salcall fix functions
since cdecl is the default calling convention on Windows for
such functions, the annotation is redundant.

Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d
Reviewed-on: https://gerrit.libreoffice.org/46164
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11 12:13:46 +01:00
Julien Nabet 393fa77d27 Replace lists by vectors in animation parts (sd/animations)
Change-Id: Ie5306041e5cde5617e460ae4d98861e8d26e389d
Reviewed-on: https://gerrit.libreoffice.org/44297
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-11-04 17:54:28 +01:00
Noel Grandin ec8c98f598 use more SAL_N_ELEMENTS part 3
Change-Id: I82e366fefd2e31928b99840fe76649cc3521e623
Reviewed-on: https://gerrit.libreoffice.org/38789
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-15 08:24:33 +02:00
Noel Grandin a7e0a8901e loplugin:comparisonwithconstant in avmedia
Change-Id: Iba0a1969648e95f6e0f6a947f067c5b8e4eb3406
Reviewed-on: https://gerrit.libreoffice.org/37667
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-16 13:48:43 +02:00
Andrea Gelmini 0a850f3e15 Fix typos
Change-Id: Iaefa094c82006346897f5563ac3ddcdc60ab68a3
Reviewed-on: https://gerrit.libreoffice.org/34809
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03 07:47:54 +00:00
Tor Lillqvist 013d9789c7 Drop :: prefix from std in [a-b]*/
Change-Id: I0422aaf39bbce889c95ed9a81a0784cb03a1badd
Reviewed-on: https://gerrit.libreoffice.org/34320
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2017-02-15 21:50:23 +00:00
Stephan Bergmann 6dce9c6757 Add missing #includes
...and remove some unncessary using directives/declarations, in preparation of
removing now-unnecessary #includes from cppumaker-generated files, post
e57ca02849 "Remove dynamic exception
specifications".

Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
2017-02-06 17:21:16 +01:00