summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/toolkit/controls/unocontrolmodel.hxx7
-rw-r--r--include/toolkit/helper/mutexandbroadcasthelper.hxx44
-rw-r--r--solenv/clang-format/excludelist1
-rw-r--r--toolkit/inc/awt/vclxprinter.hxx4
-rw-r--r--toolkit/source/awt/vclxprinter.cxx30
-rw-r--r--toolkit/source/controls/animatedimages.cxx10
-rw-r--r--toolkit/source/controls/tree/treedatamodel.cxx16
-rw-r--r--toolkit/source/controls/unocontrolmodel.cxx6
8 files changed, 36 insertions, 82 deletions
diff --git a/include/toolkit/controls/unocontrolmodel.hxx b/include/toolkit/controls/unocontrolmodel.hxx
index fb32aa5b0860..a3f0516e8157 100644
--- a/include/toolkit/controls/unocontrolmodel.hxx
+++ b/include/toolkit/controls/unocontrolmodel.hxx
@@ -28,7 +28,7 @@
#include <com/sun/star/util/XCloneable.hpp>
#include <cppuhelper/weakagg.hxx>
-#include <toolkit/helper/mutexandbroadcasthelper.hxx>
+#include <comphelper/broadcasthelper.hxx>
#include <toolkit/helper/listenermultiplexer.hxx>
#include <cppuhelper/propshlp.hxx>
@@ -55,7 +55,7 @@ typedef ::cppu::WeakAggImplHelper6 < css::awt::XControlModel
> UnoControlModel_Base;
class UnoControlModel :public UnoControlModel_Base
- ,public MutexAndBroadcastHelper
+ ,public comphelper::OMutexAndBroadcastHelper
,public ::cppu::OPropertySetHelper
{
private:
@@ -105,8 +105,7 @@ protected:
#ifdef _MSC_VER
UnoControlModel() //do not use! needed by MSVC at compile time to satisfy WeakAggImplHelper7
: UnoControlModel_Base()
- , MutexAndBroadcastHelper()
- , OPropertySetHelper( BrdcstHelper )
+ , OPropertySetHelper( m_aBHelper )
, maDisposeListeners( *this )
, m_xContext( css::uno::Reference< css::uno::XComponentContext >() )
{
diff --git a/include/toolkit/helper/mutexandbroadcasthelper.hxx b/include/toolkit/helper/mutexandbroadcasthelper.hxx
deleted file mode 100644
index 4cc98e6a9304..000000000000
--- a/include/toolkit/helper/mutexandbroadcasthelper.hxx
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_TOOLKIT_HELPER_MUTEXANDBROADCASTHELPER_HXX
-#define INCLUDED_TOOLKIT_HELPER_MUTEXANDBROADCASTHELPER_HXX
-
-#include <cppuhelper/interfacecontainer.h>
-
-
-// Helper class with Mutex and BroadcastHelper, because they must be
-// initialized before calling the OPropertySetHelper-CTOR
-
-class MutexAndBroadcastHelper
-{
-public:
- MutexAndBroadcastHelper() : BrdcstHelper( Mutex ) {}
-
- ::osl::Mutex Mutex;
- ::cppu::OBroadcastHelper BrdcstHelper;
-
- ::osl::Mutex& GetMutex() { return Mutex; }
- ::cppu::OBroadcastHelper& GetBroadcastHelper() { return BrdcstHelper; }
-};
-
-#endif // _TOOLKIT_HELPER_MUTEXANDBROADCASTHELPER_HXX
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index f0f0773d7fef..96dc3df02583 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -6110,7 +6110,6 @@ include/toolkit/helper/accessiblefactory.hxx
include/toolkit/helper/convert.hxx
include/toolkit/helper/listenermultiplexer.hxx
include/toolkit/helper/macros.hxx
-include/toolkit/helper/mutexandbroadcasthelper.hxx
include/toolkit/helper/property.hxx
include/toolkit/helper/vclunohelper.hxx
include/tools/b3dtrans.hxx
diff --git a/toolkit/inc/awt/vclxprinter.hxx b/toolkit/inc/awt/vclxprinter.hxx
index 41a74044bfba..e5440f38aac4 100644
--- a/toolkit/inc/awt/vclxprinter.hxx
+++ b/toolkit/inc/awt/vclxprinter.hxx
@@ -25,7 +25,7 @@
#include <com/sun/star/awt/XInfoPrinter.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <toolkit/helper/mutexandbroadcasthelper.hxx>
+#include <comphelper/broadcasthelper.hxx>
#include <cppuhelper/propshlp.hxx>
#include <cppuhelper/implbase.hxx>
#include <comphelper/uno3.hxx>
@@ -53,7 +53,7 @@ class Printer;
typedef ::cppu::WeakImplHelper < css::awt::XPrinterPropertySet
> VCLXPrinterPropertySet_Base;
class VCLXPrinterPropertySet :public VCLXPrinterPropertySet_Base
- ,public MutexAndBroadcastHelper
+ ,public comphelper::OMutexAndBroadcastHelper
,public ::cppu::OPropertySetHelper
{
protected:
diff --git a/toolkit/source/awt/vclxprinter.cxx b/toolkit/source/awt/vclxprinter.cxx
index c0db73db46b9..6ace06179507 100644
--- a/toolkit/source/awt/vclxprinter.cxx
+++ b/toolkit/source/awt/vclxprinter.cxx
@@ -47,7 +47,7 @@ IMPLEMENT_FORWARD_XINTERFACE2( VCLXPrinterPropertySet, VCLXPrinterPropertySet_Ba
IMPLEMENT_FORWARD_XTYPEPROVIDER2( VCLXPrinterPropertySet, VCLXPrinterPropertySet_Base, ::cppu::OPropertySetHelper )
VCLXPrinterPropertySet::VCLXPrinterPropertySet( const OUString& rPrinterName )
- : OPropertySetHelper( BrdcstHelper )
+ : OPropertySetHelper( m_aBHelper )
, mxPrinter(VclPtrInstance< Printer >(rPrinterName))
{
SolarMutexGuard aSolarGuard;
@@ -92,7 +92,7 @@ css::uno::Reference< css::beans::XPropertySetInfo > VCLXPrinterPropertySet::getP
sal_Bool VCLXPrinterPropertySet::convertFastPropertyValue( css::uno::Any & rConvertedValue, css::uno::Any & rOldValue, sal_Int32 nHandle, const css::uno::Any& rValue )
{
- ::osl::MutexGuard aGuard( Mutex );
+ ::osl::MutexGuard aGuard( m_aMutex );
bool bDifferent = false;
switch ( nHandle )
@@ -129,7 +129,7 @@ sal_Bool VCLXPrinterPropertySet::convertFastPropertyValue( css::uno::Any & rConv
void VCLXPrinterPropertySet::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const css::uno::Any& rValue )
{
- ::osl::MutexGuard aGuard( Mutex );
+ ::osl::MutexGuard aGuard( m_aMutex );
switch( nHandle )
{
@@ -152,7 +152,7 @@ void VCLXPrinterPropertySet::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle
void VCLXPrinterPropertySet::getFastPropertyValue( css::uno::Any& rValue, sal_Int32 nHandle ) const
{
- ::osl::MutexGuard aGuard( const_cast<VCLXPrinterPropertySet*>(this)->Mutex );
+ ::osl::MutexGuard aGuard( const_cast<VCLXPrinterPropertySet*>(this)->m_aMutex );
switch( nHandle )
{
@@ -172,7 +172,7 @@ void VCLXPrinterPropertySet::getFastPropertyValue( css::uno::Any& rValue, sal_In
// css::awt::XPrinterPropertySet
void VCLXPrinterPropertySet::setHorizontal( sal_Bool bHorizontal )
{
- ::osl::MutexGuard aGuard( Mutex );
+ ::osl::MutexGuard aGuard( m_aMutex );
css::uno::Any aValue;
aValue <<= bHorizontal;
@@ -181,7 +181,7 @@ void VCLXPrinterPropertySet::setHorizontal( sal_Bool bHorizontal )
css::uno::Sequence< OUString > VCLXPrinterPropertySet::getFormDescriptions( )
{
- ::osl::MutexGuard aGuard( Mutex );
+ ::osl::MutexGuard aGuard( m_aMutex );
const sal_uInt16 nPaperBinCount = GetPrinter()->GetPaperBinCount();
css::uno::Sequence< OUString > aDescriptions( nPaperBinCount );
@@ -198,7 +198,7 @@ css::uno::Sequence< OUString > VCLXPrinterPropertySet::getFormDescriptions( )
void VCLXPrinterPropertySet::selectForm( const OUString& rFormDescription )
{
- ::osl::MutexGuard aGuard( Mutex );
+ ::osl::MutexGuard aGuard( m_aMutex );
sal_uInt16 nPaperBin = sal::static_int_cast< sal_uInt16 >(
o3tl::toInt32(o3tl::getToken(rFormDescription, 3, ';' )));
@@ -207,7 +207,7 @@ void VCLXPrinterPropertySet::selectForm( const OUString& rFormDescription )
css::uno::Sequence< sal_Int8 > VCLXPrinterPropertySet::getBinarySetup( )
{
- ::osl::MutexGuard aGuard( Mutex );
+ ::osl::MutexGuard aGuard( m_aMutex );
SvMemoryStream aMem;
aMem.WriteUInt32( BINARYSETUPMARKER );
@@ -217,7 +217,7 @@ css::uno::Sequence< sal_Int8 > VCLXPrinterPropertySet::getBinarySetup( )
void VCLXPrinterPropertySet::setBinarySetup( const css::uno::Sequence< sal_Int8 >& data )
{
- ::osl::MutexGuard aGuard( Mutex );
+ ::osl::MutexGuard aGuard( m_aMutex );
SvMemoryStream aMem( const_cast<signed char*>(data.getConstArray()), data.getLength(), StreamMode::READ );
sal_uInt32 nMarker;
@@ -246,7 +246,7 @@ VCLXPrinter::~VCLXPrinter()
sal_Bool VCLXPrinter::start( const OUString& /*rJobName*/, sal_Int16 /*nCopies*/, sal_Bool /*bCollate*/ )
{
- ::osl::MutexGuard aGuard( Mutex );
+ ::osl::MutexGuard aGuard( m_aMutex );
if (mxPrinter)
{
@@ -259,7 +259,7 @@ sal_Bool VCLXPrinter::start( const OUString& /*rJobName*/, sal_Int16 /*nCopies*/
void VCLXPrinter::end( )
{
- ::osl::MutexGuard aGuard( Mutex );
+ ::osl::MutexGuard aGuard( m_aMutex );
if (mxListener)
{
@@ -270,14 +270,14 @@ void VCLXPrinter::end( )
void VCLXPrinter::terminate( )
{
- ::osl::MutexGuard aGuard( Mutex );
+ ::osl::MutexGuard aGuard( m_aMutex );
mxListener.reset();
}
css::uno::Reference< css::awt::XDevice > VCLXPrinter::startPage( )
{
- ::osl::MutexGuard aGuard( Mutex );
+ ::osl::MutexGuard aGuard( m_aMutex );
if (mxListener)
{
@@ -288,7 +288,7 @@ css::uno::Reference< css::awt::XDevice > VCLXPrinter::startPage( )
void VCLXPrinter::endPage( )
{
- ::osl::MutexGuard aGuard( Mutex );
+ ::osl::MutexGuard aGuard( m_aMutex );
if (mxListener)
{
@@ -313,7 +313,7 @@ VCLXInfoPrinter::~VCLXInfoPrinter()
// css::awt::XInfoPrinter
css::uno::Reference< css::awt::XDevice > VCLXInfoPrinter::createDevice( )
{
- ::osl::MutexGuard aGuard( Mutex );
+ ::osl::MutexGuard aGuard( m_aMutex );
return GetDevice();
}
diff --git a/toolkit/source/controls/animatedimages.cxx b/toolkit/source/controls/animatedimages.cxx
index 99fd5df859ae..d188ab20960b 100644
--- a/toolkit/source/controls/animatedimages.cxx
+++ b/toolkit/source/controls/animatedimages.cxx
@@ -419,7 +419,7 @@ namespace toolkit {
maImageSets.insert( maImageSets.begin() + i_index, i_imageURLs );
// listener notification
- lcl_notify( aGuard, BrdcstHelper, &XContainerListener::elementInserted, i_index, i_imageURLs, *this );
+ lcl_notify( aGuard, m_aBHelper, &XContainerListener::elementInserted, i_index, i_imageURLs, *this );
}
@@ -436,7 +436,7 @@ namespace toolkit {
maImageSets[ i_index ] = i_imageURLs;
// listener notification
- lcl_notify( aGuard, BrdcstHelper, &XContainerListener::elementReplaced, i_index, i_imageURLs, *this );
+ lcl_notify( aGuard, m_aBHelper, &XContainerListener::elementReplaced, i_index, i_imageURLs, *this );
}
@@ -455,19 +455,19 @@ namespace toolkit {
maImageSets.erase( removalPos );
// listener notification
- lcl_notify( aGuard, BrdcstHelper, &XContainerListener::elementRemoved, i_index, aRemovedElement, *this );
+ lcl_notify( aGuard, m_aBHelper, &XContainerListener::elementRemoved, i_index, aRemovedElement, *this );
}
void SAL_CALL AnimatedImagesControlModel::addContainerListener( const Reference< XContainerListener >& i_listener )
{
- BrdcstHelper.addListener( cppu::UnoType<XContainerListener>::get(), i_listener );
+ m_aBHelper.addListener( cppu::UnoType<XContainerListener>::get(), i_listener );
}
void SAL_CALL AnimatedImagesControlModel::removeContainerListener( const Reference< XContainerListener >& i_listener )
{
- BrdcstHelper.removeListener( cppu::UnoType<XContainerListener>::get(), i_listener );
+ m_aBHelper.removeListener( cppu::UnoType<XContainerListener>::get(), i_listener );
}
}
diff --git a/toolkit/source/controls/tree/treedatamodel.cxx b/toolkit/source/controls/tree/treedatamodel.cxx
index 090a6738f517..69552431ff09 100644
--- a/toolkit/source/controls/tree/treedatamodel.cxx
+++ b/toolkit/source/controls/tree/treedatamodel.cxx
@@ -26,7 +26,7 @@
#include <cppuhelper/supportsservice.hxx>
#include <o3tl/safeint.hxx>
#include <rtl/ref.hxx>
-#include <toolkit/helper/mutexandbroadcasthelper.hxx>
+#include <comphelper/broadcasthelper.hxx>
#include <mutex>
#include <utility>
@@ -46,7 +46,7 @@ class MutableTreeDataModel;
typedef std::vector< rtl::Reference< MutableTreeNode > > TreeNodeVector;
class MutableTreeDataModel : public ::cppu::WeakAggImplHelper2< XMutableTreeDataModel, XServiceInfo >,
- public MutexAndBroadcastHelper
+ public comphelper::OMutexAndBroadcastHelper
{
public:
MutableTreeDataModel();
@@ -139,7 +139,7 @@ MutableTreeDataModel::MutableTreeDataModel()
void MutableTreeDataModel::broadcast( broadcast_type eType, const Reference< XTreeNode >& xParentNode, const Reference< XTreeNode >& rNode )
{
- ::cppu::OInterfaceContainerHelper* pIter = BrdcstHelper.getContainer( cppu::UnoType<XTreeDataModelListener>::get() );
+ ::cppu::OInterfaceContainerHelper* pIter = m_aBHelper.getContainer( cppu::UnoType<XTreeDataModelListener>::get() );
if( !pIter )
return;
@@ -201,12 +201,12 @@ Reference< XTreeNode > SAL_CALL MutableTreeDataModel::getRoot( )
void SAL_CALL MutableTreeDataModel::addTreeDataModelListener( const Reference< XTreeDataModelListener >& xListener )
{
- BrdcstHelper.addListener( cppu::UnoType<XTreeDataModelListener>::get(), xListener );
+ m_aBHelper.addListener( cppu::UnoType<XTreeDataModelListener>::get(), xListener );
}
void SAL_CALL MutableTreeDataModel::removeTreeDataModelListener( const Reference< XTreeDataModelListener >& xListener )
{
- BrdcstHelper.removeListener( cppu::UnoType<XTreeDataModelListener>::get(), xListener );
+ m_aBHelper.removeListener( cppu::UnoType<XTreeDataModelListener>::get(), xListener );
}
void SAL_CALL MutableTreeDataModel::dispose()
@@ -218,18 +218,18 @@ void SAL_CALL MutableTreeDataModel::dispose()
mbDisposed = true;
css::lang::EventObject aEvent;
aEvent.Source.set( static_cast< ::cppu::OWeakObject* >( this ) );
- BrdcstHelper.aLC.disposeAndClear( aEvent );
+ m_aBHelper.aLC.disposeAndClear( aEvent );
}
}
void SAL_CALL MutableTreeDataModel::addEventListener( const Reference< XEventListener >& xListener )
{
- BrdcstHelper.addListener( cppu::UnoType<XEventListener>::get(), xListener );
+ m_aBHelper.addListener( cppu::UnoType<XEventListener>::get(), xListener );
}
void SAL_CALL MutableTreeDataModel::removeEventListener( const Reference< XEventListener >& xListener )
{
- BrdcstHelper.removeListener( cppu::UnoType<XEventListener>::get(), xListener );
+ m_aBHelper.removeListener( cppu::UnoType<XEventListener>::get(), xListener );
}
OUString SAL_CALL MutableTreeDataModel::getImplementationName( )
diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx
index 3147164332bd..90c61bfcb2a9 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -110,7 +110,7 @@ static void lcl_ImplMergeFontProperty( FontDescriptor& rFD, sal_uInt16 nPropId,
UnoControlModel::UnoControlModel( const Reference< XComponentContext >& rxContext )
:UnoControlModel_Base()
- ,OPropertySetHelper( BrdcstHelper )
+ ,OPropertySetHelper( m_aBHelper )
,maDisposeListeners( *this )
,m_xContext( rxContext )
{
@@ -120,7 +120,7 @@ UnoControlModel::UnoControlModel( const Reference< XComponentContext >& rxContex
UnoControlModel::UnoControlModel( const UnoControlModel& rModel )
: UnoControlModel_Base()
- , OPropertySetHelper( BrdcstHelper )
+ , OPropertySetHelper( m_aBHelper )
, maData( rModel.maData )
, maDisposeListeners( *this )
, m_xContext( rModel.m_xContext )
@@ -442,7 +442,7 @@ void UnoControlModel::dispose( )
aEvt.Source = static_cast<css::uno::XAggregation*>(static_cast<cppu::OWeakAggObject*>(this));
maDisposeListeners.disposeAndClear( aEvt );
- BrdcstHelper.aLC.disposeAndClear( aEvt );
+ m_aBHelper.aLC.disposeAndClear( aEvt );
// let the property set helper notify our property listeners
OPropertySetHelper::disposing();