summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-12-18 09:12:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-12-19 11:21:13 +0100
commitf09eaefafbc8fe279ef07a6889f80c06c34b17dd (patch)
tree78294928ca28cd5983f6c00faac06600efefea08 /sc
parent4547c4d208a8978684d602a582b933898385008e (diff)
use more cppu::BaseMutex
Change-Id: Ida8eb69bb90a2ce53a9a783595b1dc0b0c9f334c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127076 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/fielduno.hxx4
-rw-r--r--sc/inc/mutexhlp.hxx36
-rw-r--r--sc/source/ui/unoobj/fielduno.cxx2
3 files changed, 3 insertions, 39 deletions
diff --git a/sc/inc/fielduno.hxx b/sc/inc/fielduno.hxx
index 2702455ccb62..88f42f991869 100644
--- a/sc/inc/fielduno.hxx
+++ b/sc/inc/fielduno.hxx
@@ -20,7 +20,6 @@
#pragma once
#include "address.hxx"
-#include "mutexhlp.hxx"
#include <svl/lstner.hxx>
#include <editeng/editdata.hxx>
@@ -33,6 +32,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/util/XRefreshable.hpp>
#include <com/sun/star/util/DateTime.hpp>
+#include <cppuhelper/basemutex.hxx>
#include <comphelper/interfacecontainer3.hxx>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/component.hxx>
@@ -164,7 +164,7 @@ typedef cppu::WeakComponentImplHelper<
css::beans::XPropertySet,
css::lang::XUnoTunnel,
css::lang::XServiceInfo> ScEditFieldObj_Base;
-class ScEditFieldObj final : public ScMutexHelper, public ScEditFieldObj_Base
+class ScEditFieldObj final : public cppu::BaseMutex, public ScEditFieldObj_Base
{
ScEditFieldObj() = delete;
ScEditFieldObj(const ScEditFieldObj&) = delete;
diff --git a/sc/inc/mutexhlp.hxx b/sc/inc/mutexhlp.hxx
deleted file mode 100644
index 340a469050d8..000000000000
--- a/sc/inc/mutexhlp.hxx
+++ /dev/null
@@ -1,36 +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 .
- */
-
-#pragma once
-
-#include <osl/mutex.hxx>
-
-// used in XComponent implementations to construct a Mutex before the
-// OComponentHelper base class
-
-class ScMutexHelper
-{
-private:
- ::osl::Mutex maMutex;
-
-public:
- ::osl::Mutex& getMutex() { return maMutex; }
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx
index 3e62c4b0bec8..76a63a72a08c 100644
--- a/sc/source/ui/unoobj/fielduno.cxx
+++ b/sc/source/ui/unoobj/fielduno.cxx
@@ -1041,7 +1041,7 @@ void ScEditFieldObj::setPropertyValueSheet(const OUString& rName, const uno::Any
ScEditFieldObj::ScEditFieldObj(
const uno::Reference<text::XTextRange>& rContent,
std::unique_ptr<ScEditSource> pEditSrc, sal_Int32 eType, const ESelection& rSel) :
- ScEditFieldObj_Base(getMutex()),
+ ScEditFieldObj_Base(m_aMutex),
pPropSet(nullptr),
mpEditSource(std::move(pEditSrc)),
aSelection(rSel),