[Libreoffice-commits] core.git: 2 commits - avmedia/source svx/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Sat Nov 30 20:35:53 UTC 2019
avmedia/source/framework/soundhandler.cxx | 9 +++------
avmedia/source/framework/soundhandler.hxx | 9 ++-------
svx/source/form/fmscriptingenv.cxx | 3 ++-
3 files changed, 7 insertions(+), 14 deletions(-)
New commits:
commit 21c4afa6223dba58f604b4f5613b0a8a4a7d24ee
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Nov 29 15:30:48 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Nov 30 21:34:29 2019 +0100
loplugin:mergeclasses SoundHandler
replace ThreadHelpBase with MutexHelper
Change-Id: If971a701261164ff4d3871eab5dfebd2c5d5b89f
Reviewed-on: https://gerrit.libreoffice.org/84111
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/avmedia/source/framework/soundhandler.cxx b/avmedia/source/framework/soundhandler.cxx
index c98de6051796..926671f64c69 100644
--- a/avmedia/source/framework/soundhandler.cxx
+++ b/avmedia/source/framework/soundhandler.cxx
@@ -119,11 +119,8 @@ css::uno::Sequence< OUString > SAL_CALL SoundHandler::getSupportedServiceNames()
@threadsafe yes
*//*-*************************************************************************************************************/
SoundHandler::SoundHandler()
- // Init baseclasses first
- : ThreadHelpBase ( )
- , ::cppu::OWeakObject ( )
// Init member
- , m_bError ( false )
+ : m_bError ( false )
, m_aUpdateIdle ( "avmedia SoundHandler Update" )
{
m_aUpdateIdle.SetInvokeHandler(LINK(this, SoundHandler, implts_PlayerNotify));
@@ -168,7 +165,7 @@ void SAL_CALL SoundHandler::dispatchWithNotification(const css::util::URL&
const css::uno::Reference< css::frame::XDispatchResultListener >& xListener )
{
// SAFE {
- const ::osl::MutexGuard aLock( m_aLock );
+ const ::osl::MutexGuard aLock( GetMutex() );
utl::MediaDescriptor aDescriptor(lDescriptor);
@@ -280,7 +277,7 @@ OUString SAL_CALL SoundHandler::detect( css::uno::Sequence< css::beans::Property
IMPL_LINK_NOARG(SoundHandler, implts_PlayerNotify, Timer *, void)
{
// SAFE {
- ::osl::ClearableMutexGuard aLock( m_aLock );
+ ::osl::ClearableMutexGuard aLock( GetMutex() );
if (m_xPlayer.is() && m_xPlayer->isPlaying() && m_xPlayer->getMediaTime() < m_xPlayer->getDuration())
{
diff --git a/avmedia/source/framework/soundhandler.hxx b/avmedia/source/framework/soundhandler.hxx
index 0cc3de24e83b..256b59b19ccf 100644
--- a/avmedia/source/framework/soundhandler.hxx
+++ b/avmedia/source/framework/soundhandler.hxx
@@ -36,17 +36,12 @@
#include <vcl/timer.hxx>
#include <vcl/idle.hxx>
#include <tools/link.hxx>
+#include <toolkit/helper/mutexhelper.hxx>
#include <avmedia/mediawindow.hxx>
#include <osl/mutex.hxx>
namespace avmedia{
-struct ThreadHelpBase
-{
- public:
- mutable ::osl::Mutex m_aLock;
-};
-
/*-************************************************************************************************************
@short handler to detect and play sounds ("wav" and "au" only!)
@descr Register this implementation as a content handler to detect and/or play wav- and au-sounds.
@@ -65,7 +60,7 @@ class SoundHandler : // interfaces
, public css::document::XExtendedFilterDetection
// baseclasses
// Order is necessary for right initialization!
- , private ThreadHelpBase
+ , private MutexHelper
, public ::cppu::OWeakObject
{
// public methods
commit 1feed2622e99321e0893c8dc0443a534b5905691
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Nov 29 15:24:15 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Nov 30 21:34:09 2019 +0100
this std::set can be o3tl::sorted_vector
Change-Id: I74a6141321dc60884789fd3d1a8a2540b662121b
Reviewed-on: https://gerrit.libreoffice.org/84110
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx
index aa480dd3a123..4dcae395248b 100644
--- a/svx/source/form/fmscriptingenv.cxx
+++ b/svx/source/form/fmscriptingenv.cxx
@@ -41,6 +41,7 @@
#include <comphelper/processfactory.hxx>
#include <vcl/svapp.hxx>
#include <osl/mutex.hxx>
+#include <o3tl/sorted_vector.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/app.hxx>
#include <basic/basmgr.hxx>
@@ -155,7 +156,7 @@ namespace svxform
// since we got rid of the notion of oneway, this is the list
// of oneway methods, autogenerated by postprocessing of
// commitdiff 90eac3e69749a9227c4b6902b1f3cef1e338c6d1
- static const std::set<pair<OUString, OUString>> delayed_event_listeners{
+ static const o3tl::sorted_vector<pair<OUString, OUString>> delayed_event_listeners{
pair<OUString,OUString>("com.sun.star.accessibility.XAccessibleComponent","grabFocus"),
pair<OUString,OUString>("com.sun.star.accessibility.XAccessibleEventBroadcaster","addAccessibleEventListener"),
pair<OUString,OUString>("com.sun.star.accessibility.XAccessibleEventBroadcaster","removeAccessibleEventListener"),
More information about the Libreoffice-commits
mailing list