[Libreoffice-commits] core.git: chart2/Library_chartcore.mk chart2/source solenv/clang-format

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Fri May 10 06:23:05 UTC 2019


 chart2/Library_chartcore.mk                                    |    1 
 chart2/source/controller/accessibility/AccessibleBase.cxx      |   28 ++++----
 chart2/source/controller/accessibility/AccessibleChartView.cxx |    8 +-
 chart2/source/controller/chartapiwrapper/AreaWrapper.cxx       |    2 
 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx    |    2 
 chart2/source/controller/chartapiwrapper/LegendWrapper.cxx     |    2 
 chart2/source/controller/chartapiwrapper/TitleWrapper.cxx      |    2 
 chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx  |    2 
 chart2/source/inc/MutexContainer.hxx                           |    5 -
 chart2/source/inc/PopupRequest.hxx                             |    2 
 chart2/source/model/main/Axis.cxx                              |    4 -
 chart2/source/model/main/DataSeries.cxx                        |   24 +++----
 chart2/source/model/main/Diagram.cxx                           |   28 ++++----
 chart2/source/model/main/FormattedString.cxx                   |   12 +--
 chart2/source/model/main/Title.cxx                             |    4 -
 chart2/source/tools/MutexContainer.cxx                         |   32 ----------
 chart2/source/tools/RegressionEquation.cxx                     |    4 -
 solenv/clang-format/blacklist                                  |    1 
 18 files changed, 64 insertions(+), 99 deletions(-)

New commits:
commit 38371d01e0240825f6d8d419214f50bc193e3e6b
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu May 9 15:31:55 2019 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri May 10 08:22:25 2019 +0200

    Consolidate MutexContainer GetMutex() vs. direct m_aMutex access
    
    ...at which point MutexContainer becomes all-inline and need no longer be
    OOO_DLLPUBLIC_CHARTTOOLS
    
    Change-Id: I2f9c089a1189cc8c0fe5cf1760f62e71c5bb7f51
    Reviewed-on: https://gerrit.libreoffice.org/72052
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/chart2/Library_chartcore.mk b/chart2/Library_chartcore.mk
index 4f98fc121251..86eae1a11941 100644
--- a/chart2/Library_chartcore.mk
+++ b/chart2/Library_chartcore.mk
@@ -204,7 +204,6 @@ $(eval $(call gb_Library_add_exception_objects,chartcore,\
     chart2/source/tools/MediaDescriptorHelper \
     chart2/source/tools/ModifyListenerHelper \
     chart2/source/tools/MovingAverageRegressionCurveCalculator \
-    chart2/source/tools/MutexContainer \
     chart2/source/tools/NameContainer \
     chart2/source/tools/NumberFormatterWrapper \
     chart2/source/tools/ObjectIdentifier \
diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx b/chart2/source/controller/accessibility/AccessibleBase.cxx
index 281c86ca203d..84259dabbfc3 100644
--- a/chart2/source/controller/accessibility/AccessibleBase.cxx
+++ b/chart2/source/controller/accessibility/AccessibleBase.cxx
@@ -144,7 +144,7 @@ bool AccessibleBase::NotifyEvent( EventType eEventType, const AccessibleUniqueId
     {
         bool bStop = false;
 
-        ClearableMutexGuard aGuard( GetMutex() );
+        ClearableMutexGuard aGuard( m_aMutex );
         // make local copy for notification
         ChildListVectorType aLocalChildList( m_aChildList );
         aGuard.clear();
@@ -182,7 +182,7 @@ bool AccessibleBase::UpdateChildren()
 {
     bool bMustUpdateChildren = false;
     {
-        MutexGuard aGuard( GetMutex() );
+        MutexGuard aGuard( m_aMutex );
         if( ! m_bMayHaveChildren ||
             m_bIsDisposed )
             return false;
@@ -253,7 +253,7 @@ void AccessibleBase::AddChild( AccessibleBase * pChild  )
     OSL_ENSURE( pChild != nullptr, "Invalid Child" );
     if( pChild )
     {
-        ClearableMutexGuard aGuard( GetMutex() );
+        ClearableMutexGuard aGuard( m_aMutex );
 
         Reference< XAccessible > xChild( pChild );
         m_aChildList.push_back( xChild );
@@ -277,7 +277,7 @@ void AccessibleBase::AddChild( AccessibleBase * pChild  )
  */
 void AccessibleBase::RemoveChildByOId( const ObjectIdentifier& rOId )
 {
-    ClearableMutexGuard aGuard( GetMutex() );
+    ClearableMutexGuard aGuard( m_aMutex );
 
     ChildOIDMap::iterator aIt( m_aChildOIDMap.find( rOId ));
     if( aIt != m_aChildOIDMap.end())
@@ -322,7 +322,7 @@ awt::Point AccessibleBase::GetUpperLeftOnScreen() const
     awt::Point aResult;
     if( m_aAccInfo.m_pParent )
     {
-        ClearableMutexGuard aGuard( GetMutex() );
+        ClearableMutexGuard aGuard( m_aMutex );
         AccessibleBase * pParent = m_aAccInfo.m_pParent;
         aGuard.clear();
 
@@ -343,7 +343,7 @@ void AccessibleBase::BroadcastAccEvent(
     const Any & rOld,
     bool bSendGlobally ) const
 {
-    ClearableMutexGuard aGuard( GetMutex() );
+    ClearableMutexGuard aGuard( m_aMutex );
 
     if ( !m_nEventNotifierId && !bSendGlobally )
         return;
@@ -370,7 +370,7 @@ void AccessibleBase::BroadcastAccEvent(
 
 void AccessibleBase::KillAllChildren()
 {
-    ClearableMutexGuard aGuard( GetMutex() );
+    ClearableMutexGuard aGuard( m_aMutex );
 
     // make local copy for notification
     ChildListVectorType aLocalChildList( m_aChildList );
@@ -412,7 +412,7 @@ void AccessibleBase::SetInfo( const AccessibleElementInfo & rNewInfo )
 void SAL_CALL AccessibleBase::disposing()
 {
     {
-        MutexGuard aGuard(GetMutex());
+        MutexGuard aGuard(m_aMutex);
         OSL_ENSURE(!m_bIsDisposed, "dispose() called twice");
 
         // notify disposing to all AccessibleEvent listeners asynchron
@@ -454,7 +454,7 @@ Reference< XAccessibleContext > SAL_CALL AccessibleBase::getAccessibleContext()
 // ________ AccessibleBase::XAccessibleContext ________
 sal_Int32 SAL_CALL AccessibleBase::getAccessibleChildCount()
 {
-    ClearableMutexGuard aGuard( GetMutex() );
+    ClearableMutexGuard aGuard( m_aMutex );
     if( ! m_bMayHaveChildren ||
         m_bIsDisposed )
         return 0;
@@ -481,7 +481,7 @@ Reference< XAccessible > SAL_CALL AccessibleBase::getAccessibleChild( sal_Int32
     CheckDisposeState();
     Reference< XAccessible > xResult;
 
-    ClearableMutexGuard aGuard( GetMutex() );
+    ClearableMutexGuard aGuard( m_aMutex );
     bool bMustUpdateChildren = ( m_bMayHaveChildren &&
                                  ! m_bChildrenInitialized );
 
@@ -499,7 +499,7 @@ Reference< XAccessible > AccessibleBase::ImplGetAccessibleChildById( sal_Int32 i
 {
     Reference< XAccessible > xResult;
 
-    MutexGuard aGuard( GetMutex());
+    MutexGuard aGuard( m_aMutex);
     if( ! m_bMayHaveChildren ||
         i < 0 ||
         static_cast< ChildListVectorType::size_type >( i ) >= m_aChildList.size() )
@@ -604,7 +604,7 @@ Reference< XAccessible > SAL_CALL AccessibleBase::getAccessibleAtPoint( const aw
     if( ( aRect.X <= aPoint.X && aPoint.X <= (aRect.X + aRect.Width) ) &&
         ( aRect.Y <= aPoint.Y && aPoint.Y <= (aRect.Y + aRect.Height)))
     {
-        ClearableMutexGuard aGuard( GetMutex() );
+        ClearableMutexGuard aGuard( m_aMutex );
         ChildListVectorType aLocalChildList( m_aChildList );
         aGuard.clear();
 
@@ -833,7 +833,7 @@ void SAL_CALL AccessibleBase::disposing( const lang::EventObject& /*Source*/ )
 // ________ XAccessibleEventBroadcasters ________
 void SAL_CALL AccessibleBase::addAccessibleEventListener( const Reference< XAccessibleEventListener >& xListener )
 {
-    MutexGuard aGuard( GetMutex() );
+    MutexGuard aGuard( m_aMutex );
 
     if ( xListener.is() )
     {
@@ -846,7 +846,7 @@ void SAL_CALL AccessibleBase::addAccessibleEventListener( const Reference< XAcce
 
 void SAL_CALL AccessibleBase::removeAccessibleEventListener( const Reference< XAccessibleEventListener >& xListener )
 {
-    MutexGuard aGuard( GetMutex() );
+    MutexGuard aGuard( m_aMutex );
 
     if ( xListener.is() && m_nEventNotifierId)
     {
diff --git a/chart2/source/controller/accessibility/AccessibleChartView.cxx b/chart2/source/controller/accessibility/AccessibleChartView.cxx
index 9a3fa947c4a3..f034df4863c4 100644
--- a/chart2/source/controller/accessibility/AccessibleChartView.cxx
+++ b/chart2/source/controller/accessibility/AccessibleChartView.cxx
@@ -174,7 +174,7 @@ void SAL_CALL AccessibleChartView::initialize( const Sequence< Any >& rArguments
     Reference< XAccessible > xParent;
     Reference< awt::XWindow > xWindow;
     {
-        MutexGuard aGuard( GetMutex());
+        MutexGuard aGuard( m_aMutex);
         xSelectionSupplier.set( m_xSelectionSupplier );
         xChartModel.set( m_xChartModel );
         xChartView.set( m_xChartView );
@@ -276,7 +276,7 @@ void SAL_CALL AccessibleChartView::initialize( const Sequence< Any >& rArguments
     }
 
     {
-        MutexGuard aGuard( GetMutex());
+        MutexGuard aGuard( m_aMutex);
         m_xSelectionSupplier = WeakReference< view::XSelectionSupplier >(xSelectionSupplier);
         m_xChartModel = WeakReference< frame::XModel >(xChartModel);
         m_xChartView = WeakReference< uno::XInterface >(xChartView);
@@ -292,7 +292,7 @@ void SAL_CALL AccessibleChartView::initialize( const Sequence< Any >& rArguments
         {
             //before notification we prepare for creation of new context
             //the old context will be deleted after notification than
-            MutexGuard aGuard( GetMutex());
+            MutexGuard aGuard( m_aMutex);
             Reference< chart2::XChartDocument > xChartDoc( xChartModel, uno::UNO_QUERY );
             if( xChartDoc.is())
                 m_spObjectHierarchy.reset(
@@ -327,7 +327,7 @@ void SAL_CALL AccessibleChartView::selectionChanged( const lang::EventObject& /*
 {
     Reference< view::XSelectionSupplier > xSelectionSupplier;
     {
-        MutexGuard aGuard( GetMutex());
+        MutexGuard aGuard( m_aMutex);
         xSelectionSupplier.set(m_xSelectionSupplier);
     }
 
diff --git a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx
index 82c5edb3e13d..e1caf55e8237 100644
--- a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx
@@ -115,7 +115,7 @@ void SAL_CALL AreaWrapper::dispose()
     Reference< uno::XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
     m_aEventListenerContainer.disposeAndClear( lang::EventObject( xSource ) );
 
-    MutexGuard aGuard( GetMutex());
+    MutexGuard aGuard( m_aMutex);
     clearWrappedPropertySet();
 }
 
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index ea5ac7949e0e..52e4c202a512 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -1068,7 +1068,7 @@ void SAL_CALL DiagramWrapper::dispose()
 {
     m_aEventListenerContainer.disposeAndClear( lang::EventObject( static_cast< ::cppu::OWeakObject* >( this )));
 
-    MutexGuard aGuard( GetMutex());
+    MutexGuard aGuard( m_aMutex);
 
     DisposeHelper::DisposeAndClear( m_xXAxis );
     DisposeHelper::DisposeAndClear( m_xYAxis );
diff --git a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
index 287b83901794..631c21744c99 100644
--- a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
@@ -323,7 +323,7 @@ void SAL_CALL LegendWrapper::dispose()
     Reference< uno::XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
     m_aEventListenerContainer.disposeAndClear( lang::EventObject( xSource ) );
 
-    MutexGuard aGuard( GetMutex());
+    MutexGuard aGuard( m_aMutex);
     clearWrappedPropertySet();
 }
 
diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
index 767dfa36b55b..3f3166cac029 100644
--- a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
@@ -241,7 +241,7 @@ void SAL_CALL TitleWrapper::dispose()
     Reference< uno::XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
     m_aEventListenerContainer.disposeAndClear( lang::EventObject( xSource ) );
 
-    MutexGuard aGuard( GetMutex());
+    MutexGuard aGuard( m_aMutex);
     clearWrappedPropertySet();
 }
 
diff --git a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
index 05f631fc88e0..5d70880fe1c2 100644
--- a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
@@ -94,7 +94,7 @@ void SAL_CALL WallFloorWrapper::dispose()
     Reference< uno::XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
     m_aEventListenerContainer.disposeAndClear( lang::EventObject( xSource ) );
 
-    MutexGuard aGuard( GetMutex());
+    MutexGuard aGuard( m_aMutex);
     clearWrappedPropertySet();
 }
 
diff --git a/chart2/source/inc/MutexContainer.hxx b/chart2/source/inc/MutexContainer.hxx
index c90dc8ec920c..f2a13de3ebd4 100644
--- a/chart2/source/inc/MutexContainer.hxx
+++ b/chart2/source/inc/MutexContainer.hxx
@@ -20,12 +20,11 @@
 #define INCLUDED_CHART2_SOURCE_INC_MUTEXCONTAINER_HXX
 
 #include <osl/mutex.hxx>
-#include "charttoolsdllapi.hxx"
 
 namespace chart
 {
 
-class OOO_DLLPUBLIC_CHARTTOOLS MutexContainer
+class MutexContainer
 {
 protected:
     MutexContainer() = default;
@@ -33,8 +32,6 @@ protected:
     ~MutexContainer() = default;
 
     mutable ::osl::Mutex m_aMutex;
-
-    ::osl::Mutex & GetMutex() const;
 };
 
 } //  namespace chart
diff --git a/chart2/source/inc/PopupRequest.hxx b/chart2/source/inc/PopupRequest.hxx
index 850e2c513fd2..78ddc9b6b5b9 100644
--- a/chart2/source/inc/PopupRequest.hxx
+++ b/chart2/source/inc/PopupRequest.hxx
@@ -11,6 +11,8 @@
 #define INCLUDED_CHART2_SOURCE_INC_POPUPREQUEST_HXX
 
 #include "MutexContainer.hxx"
+#include "charttoolsdllapi.hxx"
+
 #include <cppuhelper/compbase.hxx>
 #include <com/sun/star/awt/XRequestCallback.hpp>
 
diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx
index c97ff290c245..0de39f48ba0e 100644
--- a/chart2/source/model/main/Axis.cxx
+++ b/chart2/source/model/main/Axis.cxx
@@ -482,7 +482,7 @@ Sequence< Reference< beans::XPropertySet > > SAL_CALL Axis::getSubTickProperties
 // ____ XTitled ____
 Reference< chart2::XTitle > SAL_CALL Axis::getTitleObject()
 {
-    MutexGuard aGuard( GetMutex() );
+    MutexGuard aGuard( m_aMutex );
     return m_xTitle;
 }
 
@@ -491,7 +491,7 @@ void SAL_CALL Axis::setTitleObject( const Reference< chart2::XTitle >& xNewTitle
     Reference< util::XModifyListener > xModifyEventForwarder;
     Reference< chart2::XTitle > xOldTitle;
     {
-        MutexGuard aGuard( GetMutex() );
+        MutexGuard aGuard( m_aMutex );
         xOldTitle = m_xTitle;
         xModifyEventForwarder = m_xModifyEventForwarder;
         m_xTitle = xNewTitle;
diff --git a/chart2/source/model/main/DataSeries.cxx b/chart2/source/model/main/DataSeries.cxx
index 8402f320ce40..7b8e7ec57f94 100644
--- a/chart2/source/model/main/DataSeries.cxx
+++ b/chart2/source/model/main/DataSeries.cxx
@@ -303,7 +303,7 @@ Reference< beans::XPropertySet >
 
     Sequence< Reference< chart2::data::XLabeledDataSequence > > aSequences;
     {
-        MutexGuard aGuard( GetMutex() );
+        MutexGuard aGuard( m_aMutex );
         aSequences = comphelper::containerToSequence( m_aDataSequences );
     }
 
@@ -317,7 +317,7 @@ Reference< beans::XPropertySet >
     if( 0 <= nIndex && nIndex < xSeq->getData().getLength() )
     {
         {
-            MutexGuard aGuard( GetMutex() );
+            MutexGuard aGuard( m_aMutex );
             tDataPointAttributeContainer::iterator aIt( m_aAttributedDataPoints.find( nIndex ) );
             if( aIt != m_aAttributedDataPoints.end() )
                 xResult = (*aIt).second;
@@ -327,7 +327,7 @@ Reference< beans::XPropertySet >
             Reference< beans::XPropertySet > xParentProperties;
             Reference< util::XModifyListener > xModifyEventForwarder;
             {
-                MutexGuard aGuard( GetMutex() );
+                MutexGuard aGuard( m_aMutex );
                 xParentProperties = this;
                 xModifyEventForwarder = m_xModifyEventForwarder;
             }
@@ -335,7 +335,7 @@ Reference< beans::XPropertySet >
             // create a new XPropertySet for this data point
             xResult.set( new DataPoint( xParentProperties ) );
             {
-                MutexGuard aGuard( GetMutex() );
+                MutexGuard aGuard( m_aMutex );
                 m_aAttributedDataPoints[ nIndex ] = xResult;
             }
             ModifyListenerHelper::addListener( xResult, xModifyEventForwarder );
@@ -350,7 +350,7 @@ void SAL_CALL DataSeries::resetDataPoint( sal_Int32 nIndex )
     Reference< beans::XPropertySet > xDataPointProp;
     Reference< util::XModifyListener > xModifyEventForwarder;
     {
-        MutexGuard aGuard( GetMutex() );
+        MutexGuard aGuard( m_aMutex );
         xModifyEventForwarder = m_xModifyEventForwarder;
         tDataPointAttributeContainer::iterator aIt( m_aAttributedDataPoints.find( nIndex ));
         if( aIt != m_aAttributedDataPoints.end())
@@ -374,7 +374,7 @@ void SAL_CALL DataSeries::resetAllDataPoints()
     tDataPointAttributeContainer  aOldAttributedDataPoints;
     Reference< util::XModifyListener > xModifyEventForwarder;
     {
-        MutexGuard aGuard( GetMutex() );
+        MutexGuard aGuard( m_aMutex );
         xModifyEventForwarder = m_xModifyEventForwarder;
         std::swap( aOldAttributedDataPoints, m_aAttributedDataPoints );
     }
@@ -391,7 +391,7 @@ void SAL_CALL DataSeries::setData( const uno::Sequence< Reference< chart2::data:
     Reference< util::XModifyListener > xModifyEventForwarder;
     Reference< lang::XEventListener > xListener;
     {
-        MutexGuard aGuard( GetMutex() );
+        MutexGuard aGuard( m_aMutex );
         xModifyEventForwarder = m_xModifyEventForwarder;
         xListener = this;
         std::swap( aOldDataSequences, m_aDataSequences );
@@ -408,7 +408,7 @@ void SAL_CALL DataSeries::setData( const uno::Sequence< Reference< chart2::data:
 // ____ XDataSource ____
 Sequence< Reference< chart2::data::XLabeledDataSequence > > SAL_CALL DataSeries::getDataSequences()
 {
-    MutexGuard aGuard( GetMutex() );
+    MutexGuard aGuard( m_aMutex );
     return comphelper::containerToSequence( m_aDataSequences );
 }
 
@@ -418,7 +418,7 @@ void SAL_CALL DataSeries::addRegressionCurve(
 {
     Reference< util::XModifyListener > xModifyEventForwarder;
     {
-        MutexGuard aGuard( GetMutex() );
+        MutexGuard aGuard( m_aMutex );
         xModifyEventForwarder = m_xModifyEventForwarder;
         if( std::find( m_aRegressionCurves.begin(), m_aRegressionCurves.end(), xRegressionCurve )
             != m_aRegressionCurves.end())
@@ -437,7 +437,7 @@ void SAL_CALL DataSeries::removeRegressionCurve(
 
     Reference< util::XModifyListener > xModifyEventForwarder;
     {
-        MutexGuard aGuard( GetMutex() );
+        MutexGuard aGuard( m_aMutex );
         xModifyEventForwarder = m_xModifyEventForwarder;
         tRegressionCurveContainerType::iterator aIt(
             std::find( m_aRegressionCurves.begin(), m_aRegressionCurves.end(), xRegressionCurve ) );
@@ -454,7 +454,7 @@ void SAL_CALL DataSeries::removeRegressionCurve(
 
 uno::Sequence< uno::Reference< chart2::XRegressionCurve > > SAL_CALL DataSeries::getRegressionCurves()
 {
-    MutexGuard aGuard( GetMutex() );
+    MutexGuard aGuard( m_aMutex );
     return comphelper::containerToSequence( m_aRegressionCurves );
 }
 
@@ -465,7 +465,7 @@ void SAL_CALL DataSeries::setRegressionCurves(
     tRegressionCurveContainerType aNewCurves( ContainerHelper::SequenceToVector( aRegressionCurves ) );
     Reference< util::XModifyListener > xModifyEventForwarder;
     {
-        MutexGuard aGuard( GetMutex() );
+        MutexGuard aGuard( m_aMutex );
         xModifyEventForwarder = m_xModifyEventForwarder;
         std::swap( aOldCurves, m_aRegressionCurves );
         m_aRegressionCurves = aNewCurves;
diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx
index b8ff4d65bd52..5c6e34bf0c38 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -336,7 +336,7 @@ uno::Reference< beans::XPropertySet > SAL_CALL Diagram::getWall()
     uno::Reference< beans::XPropertySet > xRet;
     bool bAddListener = false;
     {
-        MutexGuard aGuard( GetMutex() );
+        MutexGuard aGuard( m_aMutex );
         if( !m_xWall.is() )
         {
             m_xWall.set( new Wall() );
@@ -354,7 +354,7 @@ uno::Reference< beans::XPropertySet > SAL_CALL Diagram::getFloor()
     uno::Reference< beans::XPropertySet > xRet;
     bool bAddListener = false;
     {
-        MutexGuard aGuard( GetMutex() );
+        MutexGuard aGuard( m_aMutex );
         if( !m_xFloor.is() )
         {
             m_xFloor.set( new Wall() );
@@ -369,7 +369,7 @@ uno::Reference< beans::XPropertySet > SAL_CALL Diagram::getFloor()
 
 uno::Reference< chart2::XLegend > SAL_CALL Diagram::getLegend()
 {
-    MutexGuard aGuard( GetMutex() );
+    MutexGuard aGuard( m_aMutex );
     return m_xLegend;
 }
 
@@ -377,7 +377,7 @@ void SAL_CALL Diagram::setLegend( const uno::Reference< chart2::XLegend >& xNewL
 {
     Reference< chart2::XLegend > xOldLegend;
     {
-        MutexGuard aGuard( GetMutex() );
+        MutexGuard aGuard( m_aMutex );
         if( m_xLegend == xNewLegend )
             return;
         xOldLegend = m_xLegend;
@@ -394,14 +394,14 @@ Reference< chart2::XColorScheme > SAL_CALL Diagram::getDefaultColorScheme()
 {
     Reference< chart2::XColorScheme > xRet;
     {
-        MutexGuard aGuard( GetMutex() );
+        MutexGuard aGuard( m_aMutex );
         xRet = m_xColorScheme;
     }
 
     if( !xRet.is())
     {
         xRet.set( createConfigColorScheme( m_xContext ));
-        MutexGuard aGuard( GetMutex() );
+        MutexGuard aGuard( m_aMutex );
         m_xColorScheme = xRet;
     }
     return xRet;
@@ -410,7 +410,7 @@ Reference< chart2::XColorScheme > SAL_CALL Diagram::getDefaultColorScheme()
 void SAL_CALL Diagram::setDefaultColorScheme( const Reference< chart2::XColorScheme >& xColorScheme )
 {
     {
-        MutexGuard aGuard( GetMutex() );
+        MutexGuard aGuard( m_aMutex );
         m_xColorScheme.set( xColorScheme );
     }
     fireModifyEvent();
@@ -434,7 +434,7 @@ void SAL_CALL Diagram::setDiagramData(
 // ____ XTitled ____
 uno::Reference< chart2::XTitle > SAL_CALL Diagram::getTitleObject()
 {
-    MutexGuard aGuard( GetMutex() );
+    MutexGuard aGuard( m_aMutex );
     return m_xTitle;
 }
 
@@ -442,7 +442,7 @@ void SAL_CALL Diagram::setTitleObject( const uno::Reference< chart2::XTitle >& x
 {
     Reference< chart2::XTitle > xOldTitle;
     {
-        MutexGuard aGuard( GetMutex() );
+        MutexGuard aGuard( m_aMutex );
         if( m_xTitle == xNewTitle )
             return;
         xOldTitle = m_xTitle;
@@ -476,7 +476,7 @@ void SAL_CALL Diagram::addCoordinateSystem(
     const uno::Reference< chart2::XCoordinateSystem >& aCoordSys )
 {
     {
-        MutexGuard aGuard( GetMutex() );
+        MutexGuard aGuard( m_aMutex );
         if( std::find( m_aCoordSystems.begin(), m_aCoordSystems.end(), aCoordSys )
             != m_aCoordSystems.end())
             throw lang::IllegalArgumentException();
@@ -496,7 +496,7 @@ void SAL_CALL Diagram::removeCoordinateSystem(
     const uno::Reference< chart2::XCoordinateSystem >& aCoordSys )
 {
     {
-        MutexGuard aGuard( GetMutex() );
+        MutexGuard aGuard( m_aMutex );
         std::vector< uno::Reference< chart2::XCoordinateSystem > >::iterator
               aIt( std::find( m_aCoordSystems.begin(), m_aCoordSystems.end(), aCoordSys ));
         if( aIt == m_aCoordSystems.end())
@@ -511,7 +511,7 @@ void SAL_CALL Diagram::removeCoordinateSystem(
 
 uno::Sequence< uno::Reference< chart2::XCoordinateSystem > > SAL_CALL Diagram::getCoordinateSystems()
 {
-    MutexGuard aGuard( GetMutex() );
+    MutexGuard aGuard( m_aMutex );
     return comphelper::containerToSequence( m_aCoordSystems );
 }
 
@@ -526,7 +526,7 @@ void SAL_CALL Diagram::setCoordinateSystems(
         aNew.push_back( aCoordinateSystems[0] );
     }
     {
-        MutexGuard aGuard( GetMutex() );
+        MutexGuard aGuard( m_aMutex );
         std::swap( aOld, m_aCoordSystems );
         m_aCoordSystems = aNew;
     }
@@ -538,7 +538,7 @@ void SAL_CALL Diagram::setCoordinateSystems(
 // ____ XCloneable ____
 Reference< util::XCloneable > SAL_CALL Diagram::createClone()
 {
-    MutexGuard aGuard( GetMutex() );
+    MutexGuard aGuard( m_aMutex );
     return Reference< util::XCloneable >( new Diagram( *this ));
 }
 
diff --git a/chart2/source/model/main/FormattedString.cxx b/chart2/source/model/main/FormattedString.cxx
index 3c5f5a0cb0a0..f7d34282137b 100644
--- a/chart2/source/model/main/FormattedString.cxx
+++ b/chart2/source/model/main/FormattedString.cxx
@@ -124,14 +124,14 @@ uno::Reference< util::XCloneable > SAL_CALL FormattedString::createClone()
 // ____ XFormattedString ____
 OUString SAL_CALL FormattedString::getString()
 {
-    MutexGuard aGuard( GetMutex());
+    MutexGuard aGuard( m_aMutex);
     return m_aString;
 }
 
 void SAL_CALL FormattedString::setString( const OUString& String )
 {
     {
-        MutexGuard aGuard( GetMutex());
+        MutexGuard aGuard( m_aMutex);
         m_aString = String;
     }
     //don't keep the mutex locked while calling out
@@ -142,7 +142,7 @@ void SAL_CALL FormattedString::setString( const OUString& String )
 // ____ XDataPointCustomLabelField ____
 css::chart2::DataPointCustomLabelFieldType SAL_CALL FormattedString::getFieldType()
 {
-    MutexGuard aGuard(GetMutex());
+    MutexGuard aGuard(m_aMutex);
     return m_aType;
 }
 
@@ -150,7 +150,7 @@ void SAL_CALL
 FormattedString::setFieldType(const css::chart2::DataPointCustomLabelFieldType Type)
 {
     {
-        MutexGuard aGuard(GetMutex());
+        MutexGuard aGuard(m_aMutex);
         m_aType = Type;
     }
     //don't keep the mutex locked while calling out
@@ -159,14 +159,14 @@ FormattedString::setFieldType(const css::chart2::DataPointCustomLabelFieldType T
 
 OUString SAL_CALL FormattedString::getGuid()
 {
-    MutexGuard aGuard( GetMutex());
+    MutexGuard aGuard( m_aMutex);
     return m_aGuid;
 }
 
 void SAL_CALL FormattedString::setGuid( const OUString& guid )
 {
     {
-        MutexGuard aGuard( GetMutex());
+        MutexGuard aGuard( m_aMutex);
         m_aGuid= guid;
     }
     //don't keep the mutex locked while calling out
diff --git a/chart2/source/model/main/Title.cxx b/chart2/source/model/main/Title.cxx
index 8a02fab86dff..e203fec8316b 100644
--- a/chart2/source/model/main/Title.cxx
+++ b/chart2/source/model/main/Title.cxx
@@ -259,7 +259,7 @@ uno::Reference< util::XCloneable > SAL_CALL Title::createClone()
 // ____ XTitle ____
 uno::Sequence< uno::Reference< chart2::XFormattedString > > SAL_CALL Title::getText()
 {
-    MutexGuard aGuard( GetMutex() );
+    MutexGuard aGuard( m_aMutex );
     return m_aStrings;
 }
 
@@ -267,7 +267,7 @@ void SAL_CALL Title::setText( const uno::Sequence< uno::Reference< chart2::XForm
 {
     uno::Sequence< uno::Reference< chart2::XFormattedString > > aOldStrings;
     {
-        MutexGuard aGuard( GetMutex() );
+        MutexGuard aGuard( m_aMutex );
         std::swap( m_aStrings, aOldStrings );
         m_aStrings = rNewStrings;
     }
diff --git a/chart2/source/tools/MutexContainer.cxx b/chart2/source/tools/MutexContainer.cxx
deleted file mode 100644
index 7b30db53f0d9..000000000000
--- a/chart2/source/tools/MutexContainer.cxx
+++ /dev/null
@@ -1,32 +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 .
- */
-
-#include <MutexContainer.hxx>
-
-namespace chart
-{
-
-::osl::Mutex & MutexContainer::GetMutex() const
-{
-    return m_aMutex;
-}
-
-} //  namespace chart
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/tools/RegressionEquation.cxx b/chart2/source/tools/RegressionEquation.cxx
index d4140691053c..927b06d4b0e9 100644
--- a/chart2/source/tools/RegressionEquation.cxx
+++ b/chart2/source/tools/RegressionEquation.cxx
@@ -285,13 +285,13 @@ void RegressionEquation::fireModifyEvent()
 // ____ XTitle ____
 uno::Sequence< uno::Reference< chart2::XFormattedString > > SAL_CALL RegressionEquation::getText()
 {
-    MutexGuard aGuard( GetMutex() );
+    MutexGuard aGuard( m_aMutex );
     return m_aStrings;
 }
 
 void SAL_CALL RegressionEquation::setText( const uno::Sequence< uno::Reference< chart2::XFormattedString > >& Strings )
 {
-    MutexGuard aGuard( GetMutex() );
+    MutexGuard aGuard( m_aMutex );
     ModifyListenerHelper::removeListenerFromAllElements(
         ContainerHelper::SequenceToVector( m_aStrings ), m_xModifyEventForwarder );
     m_aStrings = Strings;
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 03db2abb9b0d..fddf9d1fe280 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -1359,7 +1359,6 @@ chart2/source/tools/MeanValueRegressionCurveCalculator.cxx
 chart2/source/tools/MediaDescriptorHelper.cxx
 chart2/source/tools/ModifyListenerHelper.cxx
 chart2/source/tools/MovingAverageRegressionCurveCalculator.cxx
-chart2/source/tools/MutexContainer.cxx
 chart2/source/tools/NameContainer.cxx
 chart2/source/tools/NumberFormatterWrapper.cxx
 chart2/source/tools/OPropertySet.cxx


More information about the Libreoffice-commits mailing list