Kaydet (Commit) 250a4e88 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Remove newly unused framework::Guard

Change-Id: I49650bfd036c5df22f81c3e8cf30bc0795154a30
üst 8b2c7983
/* -*- 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_FRAMEWORK_INC_THREADHELP_GUARD_HXX
#define INCLUDED_FRAMEWORK_INC_THREADHELP_GUARD_HXX
#include <sal/config.h>
#include <boost/noncopyable.hpp>
#include <threadhelp/lockhelper.hxx>
namespace framework{
class Guard : private boost::noncopyable
{
public:
Guard( LockHelper& rLock )
: m_pLock ( &rLock )
, m_locked(false)
{
lock();
}
~Guard()
{
unlock();
}
void lock()
{
if (!m_locked) {
m_pLock->acquire();
m_locked = true;
}
}
void unlock()
{
if (m_locked) {
m_pLock->release();
m_locked = false;
}
}
private:
LockHelper* m_pLock;
bool m_locked;
};
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#include <cppuhelper/typeprovider.hxx> #include <cppuhelper/typeprovider.hxx>
#include <framework/actiontriggerhelper.hxx> #include <framework/actiontriggerhelper.hxx>
#include <osl/mutex.hxx> #include <osl/mutex.hxx>
#include <threadhelp/guard.hxx>
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
using namespace cppu; using namespace cppu;
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <classes/propertysethelper.hxx> #include <classes/propertysethelper.hxx>
#include <threadhelp/transactionguard.hxx> #include <threadhelp/transactionguard.hxx>
#include <threadhelp/guard.hxx>
namespace framework{ namespace framework{
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <helper/statusindicator.hxx> #include <helper/statusindicator.hxx>
#include <threadhelp/guard.hxx>
namespace framework{ namespace framework{
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
*/ */
#include <services/dispatchhelper.hxx> #include <services/dispatchhelper.hxx>
#include <threadhelp/guard.hxx>
#include <services.h> #include <services.h>
#include <com/sun/star/util/URLTransformer.hpp> #include <com/sun/star/util/URLTransformer.hpp>
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <uielement/toolbarmerger.hxx> #include <uielement/toolbarmerger.hxx>
#include <uielement/generictoolbarcontroller.hxx> #include <uielement/generictoolbarcontroller.hxx>
#include <threadhelp/guard.hxx>
#include "services.h" #include "services.h"
#include <framework/imageproducer.hxx> #include <framework/imageproducer.hxx>
#include <framework/sfxhelperfunctions.hxx> #include <framework/sfxhelperfunctions.hxx>
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
*/ */
#include <uielement/addonstoolbarwrapper.hxx> #include <uielement/addonstoolbarwrapper.hxx>
#include <threadhelp/guard.hxx>
#include <framework/actiontriggerhelper.hxx> #include <framework/actiontriggerhelper.hxx>
#include <uielement/constitemcontainer.hxx> #include <uielement/constitemcontainer.hxx>
#include <uielement/rootitemcontainer.hxx> #include <uielement/rootitemcontainer.hxx>
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
*/ */
#include <uielement/menubarwrapper.hxx> #include <uielement/menubarwrapper.hxx>
#include <threadhelp/guard.hxx>
#include <framework/actiontriggerhelper.hxx> #include <framework/actiontriggerhelper.hxx>
#include <services.h> #include <services.h>
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include <uielement/progressbarwrapper.hxx> #include <uielement/progressbarwrapper.hxx>
#include <helper/statusindicator.hxx> #include <helper/statusindicator.hxx>
#include <threadhelp/guard.hxx>
#include <uielement/statusindicatorinterfacewrapper.hxx> #include <uielement/statusindicatorinterfacewrapper.hxx>
#include <com/sun/star/ui/UIElementType.hpp> #include <com/sun/star/ui/UIElementType.hpp>
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include <uielement/statusbarwrapper.hxx> #include <uielement/statusbarwrapper.hxx>
#include <threadhelp/guard.hxx>
#include <framework/actiontriggerhelper.hxx> #include <framework/actiontriggerhelper.hxx>
#include <uielement/constitemcontainer.hxx> #include <uielement/constitemcontainer.hxx>
#include <uielement/rootitemcontainer.hxx> #include <uielement/rootitemcontainer.hxx>
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
*/ */
#include <uielement/toolbarwrapper.hxx> #include <uielement/toolbarwrapper.hxx>
#include <threadhelp/guard.hxx>
#include <framework/actiontriggerhelper.hxx> #include <framework/actiontriggerhelper.hxx>
#include <uielement/constitemcontainer.hxx> #include <uielement/constitemcontainer.hxx>
#include <uielement/rootitemcontainer.hxx> #include <uielement/rootitemcontainer.hxx>
......
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