framework/source/services/substitutepathvars.cxx |   15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

New commits:
commit 92c0775f2fa4f90ef9a19cb1d466e6bfec3dd9f0
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Fri Dec 24 20:49:12 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sun Dec 26 08:22:42 2021 +0100

    use comphelper::WeakComponentImplHelper in SubstitutePathVariables
    
    Change-Id: I1b41ae57b65b42ef63d2d2c026cf78a00b5b937d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127462
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/framework/source/services/substitutepathvars.cxx 
b/framework/source/services/substitutepathvars.cxx
index 84725a3a18c4..bf50f889a9e4 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -20,8 +20,7 @@
 #include <config_folders.h>
 
 #include <comphelper/lok.hxx>
-#include <cppuhelper/basemutex.hxx>
-#include <cppuhelper/compbase.hxx>
+#include <comphelper/compbase.hxx>
 #include <cppuhelper/supportsservice.hxx>
 
 #include <unotools/bootstrap.hxx>
@@ -129,12 +128,11 @@ struct ReSubstFixedVarOrder
     }
 };
 
-typedef ::cppu::WeakComponentImplHelper<
+typedef comphelper::WeakComponentImplHelper<
     css::util::XStringSubstitution,
     css::lang::XServiceInfo > SubstitutePathVariables_BASE;
 
-class SubstitutePathVariables : private cppu::BaseMutex,
-                                public SubstitutePathVariables_BASE
+class SubstitutePathVariables : public SubstitutePathVariables_BASE
 {
 public:
     explicit SubstitutePathVariables(const css::uno::Reference< 
css::uno::XComponentContext >& xContext);
@@ -191,7 +189,6 @@ private:
 };
 
 SubstitutePathVariables::SubstitutePathVariables( const Reference< 
XComponentContext >& xContext ) :
-    SubstitutePathVariables_BASE(m_aMutex),
     m_xContext( xContext )
 {
     SetPredefinedPathVariables();
@@ -227,19 +224,19 @@ SubstitutePathVariables::SubstitutePathVariables( const 
Reference< XComponentCon
 // XStringSubstitution
 OUString SAL_CALL SubstitutePathVariables::substituteVariables( const 
OUString& aText, sal_Bool bSubstRequired )
 {
-    osl::MutexGuard g(rBHelper.rMutex);
+    std::unique_lock g(m_aMutex);
     return impl_substituteVariable( aText, bSubstRequired );
 }
 
 OUString SAL_CALL SubstitutePathVariables::reSubstituteVariables( const 
OUString& aText )
 {
-    osl::MutexGuard g(rBHelper.rMutex);
+    std::unique_lock g(m_aMutex);
     return impl_reSubstituteVariables( aText );
 }
 
 OUString SAL_CALL SubstitutePathVariables::getSubstituteVariableValue( const 
OUString& aVariable )
 {
-    osl::MutexGuard g(rBHelper.rMutex);
+    std::unique_lock g(m_aMutex);
     return impl_getSubstituteVariableValue( aVariable );
 }
 

Reply via email to