diff options
-rw-r--r-- | chart2/source/model/main/UndoManager.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/dbaundomanager.cxx | 4 | ||||
-rw-r--r-- | include/framework/iguard.hxx | 54 | ||||
-rw-r--r-- | include/framework/undomanagerhelper.hxx | 11 |
4 files changed, 11 insertions, 62 deletions
diff --git a/chart2/source/model/main/UndoManager.cxx b/chart2/source/model/main/UndoManager.cxx index 5916befacbdc..44ce79edb7f6 100644 --- a/chart2/source/model/main/UndoManager.cxx +++ b/chart2/source/model/main/UndoManager.cxx @@ -155,11 +155,9 @@ namespace chart } // IMutexGuard - virtual ::framework::IMutex& getGuardedMutex(); - - // IGuard virtual void clear(); virtual void reset(); + virtual ::framework::IMutex& getGuardedMutex(); }; class DummyMutex : public ::framework::IMutex diff --git a/dbaccess/source/ui/misc/dbaundomanager.cxx b/dbaccess/source/ui/misc/dbaundomanager.cxx index 260c57fefd26..e2a24e9bf47a 100644 --- a/dbaccess/source/ui/misc/dbaundomanager.cxx +++ b/dbaccess/source/ui/misc/dbaundomanager.cxx @@ -137,11 +137,9 @@ namespace dbaui } // IMutexGuard - virtual ::framework::IMutex& getGuardedMutex(); - - // IGuard virtual void clear(); virtual void reset(); + virtual ::framework::IMutex& getGuardedMutex(); private: ::osl::ResettableMutexGuard m_aGuard; diff --git a/include/framework/iguard.hxx b/include/framework/iguard.hxx deleted file mode 100644 index 46071b49e00b..000000000000 --- a/include/framework/iguard.hxx +++ /dev/null @@ -1,54 +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 . - */ - -#ifndef INCLUDED_FRAMEWORK_IGUARD_HXX -#define INCLUDED_FRAMEWORK_IGUARD_HXX - -#include <sal/types.h> - -namespace framework{ - -/*-************************************************************************************************************ - @descr interface for guarding a lock -*//*-*************************************************************************************************************/ -class SAL_NO_VTABLE IGuard -{ - - // public methods - - public: - - /** clears the lock. If the guard does not currently hold the lock, nothing happens. - */ - virtual void clear() = 0; - - /** attempts to re-establishes the lock, blocking until the attempt is successful. - */ - virtual void reset() = 0; - - protected: - ~IGuard() {} - -}; // class IGuard - -} // namespace framework - -#endif // INCLUDED_FRAMEWORK_IGUARD_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/framework/undomanagerhelper.hxx b/include/framework/undomanagerhelper.hxx index 8c0c42897bb2..77c098316439 100644 --- a/include/framework/undomanagerhelper.hxx +++ b/include/framework/undomanagerhelper.hxx @@ -21,7 +21,6 @@ #define INCLUDED_FRAMEWORK_UNDOMANAGERHELPER_HXX #include <framework/fwedllapi.h> -#include <framework/iguard.hxx> #include <framework/imutex.hxx> #include <com/sun/star/document/XUndoManager.hpp> @@ -42,9 +41,17 @@ namespace framework //= IMutexGuard - class SAL_NO_VTABLE IMutexGuard : public IGuard + class SAL_NO_VTABLE IMutexGuard { public: + /** clears the lock. If the guard does not currently hold the lock, nothing happens. + */ + virtual void clear() = 0; + + /** attempts to re-establishes the lock, blocking until the attempt is successful. + */ + virtual void reset() = 0; + /** returns the mutex guarded by the instance. Even if the guard currently has not a lock on the mutex, this method must succeed. |