Kaydet (Commit) 494bd08c authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Noel Grandin

remove tools/solarmutex.hxx

Deprecated in favour of comphelper::SolarMutex

Change-Id: I159077562660de5df25601fa471447f4b64a2cf1
Reviewed-on: https://gerrit.libreoffice.org/24079Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst 3daee995
......@@ -21,7 +21,7 @@
#include <tools/rcid.h>
#include <tools/stream.hxx>
#include <tools/errinf.hxx>
#include <tools/solarmutex.hxx>
#include <comphelper/solarmutex.hxx>
#include <basic/sbx.hxx>
#include <tools/rc.hxx>
#include <vcl/svapp.hxx>
......@@ -107,7 +107,9 @@ DocBasicItem::~DocBasicItem()
// tdf#90969 HACK: don't use SolarMutexGuard - there is a horrible global
// map GaDocBasicItems holding instances, and these get deleted from exit
// handlers, when the SolarMutex is already dead
tools::SolarMutex::Acquire();
comphelper::SolarMutex *pSolarMutex = comphelper::SolarMutex::get();
if ( pSolarMutex )
pSolarMutex->acquire();
try
{
......@@ -119,7 +121,9 @@ DocBasicItem::~DocBasicItem()
assert(false);
}
tools::SolarMutex::Release();
pSolarMutex = comphelper::SolarMutex::get();
if ( pSolarMutex )
pSolarMutex->release();
}
void DocBasicItem::clearDependingVarsOnDelete( StarBASIC& rDeletedBasic )
......
/* -*- 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_TOOLS_SOLARMUTEX_HXX
#define INCLUDED_TOOLS_SOLARMUTEX_HXX
#include <tools/toolsdllapi.h>
#include <comphelper/solarmutex.hxx>
namespace tools
{
/// Deprecated in favour of comphelper::SolarMutex
class TOOLS_DLLPUBLIC SolarMutex
{
public:
static bool Acquire();
static void Release();
};
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -26,7 +26,7 @@
#include <osl/thread.h>
#include <tools/debug.hxx>
#include <tools/solarmutex.hxx>
#include <comphelper/solarmutex.hxx>
#include <osl/mutex.hxx>
namespace {
......@@ -333,10 +333,14 @@ const OUString DdeTransaction::GetName() const
void DdeTransaction::Data( const DdeData* p )
{
if ( ::tools::SolarMutex::Acquire() )
comphelper::SolarMutex *pSolarMutex = comphelper::SolarMutex::get();
if ( pSolarMutex )
{
pSolarMutex->acquire();
aData.Call( p );
::tools::SolarMutex::Release();
pSolarMutex = comphelper::SolarMutex::get();
if ( pSolarMutex )
pSolarMutex->release();
}
}
......
......@@ -71,7 +71,6 @@ $(eval $(call gb_Library_add_exception_objects,tl,\
tools/source/misc/cpuid \
tools/source/misc/extendapplicationenvironment \
tools/source/misc/getprocessworkingdir \
tools/source/misc/solarmutex \
tools/source/misc/toolsdll \
tools/source/rc/rc \
tools/source/rc/resary \
......
/* -*- 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 <tools/solarmutex.hxx>
namespace tools
{
bool SolarMutex::Acquire()
{
comphelper::SolarMutex *pSolarMutex = comphelper::SolarMutex::get();
if ( pSolarMutex )
pSolarMutex->acquire();
else
return false;
return true;
}
void SolarMutex::Release()
{
comphelper::SolarMutex *pSolarMutex = comphelper::SolarMutex::get();
if ( pSolarMutex )
pSolarMutex->release();
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment