[Libreoffice-commits] core.git: 2 commits - chart2/source dbaccess/source include/framework sfx2/source
Stephan Bergmann
sbergman at redhat.com
Mon Mar 17 09:25:46 PDT 2014
chart2/source/model/main/UndoManager.cxx | 10 -----
dbaccess/source/ui/misc/dbaundomanager.cxx | 10 -----
include/framework/iguard.hxx | 54 -----------------------------
include/framework/undomanagerhelper.hxx | 7 ++-
sfx2/source/doc/docundomanager.cxx | 5 --
5 files changed, 7 insertions(+), 79 deletions(-)
New commits:
commit d697a059057e27533e760beac3537fbcb5082884
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Mar 17 17:25:02 2014 +0100
Remove unused framework::IMutexGuard::reset
Change-Id: If05ef86284c4ed7bf66a6a6de17a4bf8d49e89e1
diff --git a/chart2/source/model/main/UndoManager.cxx b/chart2/source/model/main/UndoManager.cxx
index 44ce79e..e352fa2 100644
--- a/chart2/source/model/main/UndoManager.cxx
+++ b/chart2/source/model/main/UndoManager.cxx
@@ -156,7 +156,6 @@ namespace chart
// IMutexGuard
virtual void clear();
- virtual void reset();
virtual ::framework::IMutex& getGuardedMutex();
};
@@ -178,11 +177,6 @@ namespace chart
{
// nothing to do. This interface implementation is a dummy.
}
-
- void UndoManagerMethodGuard::reset()
- {
- // nothing to do. This interface implementation is a dummy.
- }
}
//= UndoManager
diff --git a/dbaccess/source/ui/misc/dbaundomanager.cxx b/dbaccess/source/ui/misc/dbaundomanager.cxx
index e2a24e9..538efbb 100644
--- a/dbaccess/source/ui/misc/dbaundomanager.cxx
+++ b/dbaccess/source/ui/misc/dbaundomanager.cxx
@@ -138,7 +138,6 @@ namespace dbaui
// IMutexGuard
virtual void clear();
- virtual void reset();
virtual ::framework::IMutex& getGuardedMutex();
private:
@@ -156,11 +155,6 @@ namespace dbaui
m_aGuard.clear();
}
- void UndoManagerMethodGuard::reset()
- {
- m_aGuard.reset();
- }
-
// UndoManager
UndoManager::UndoManager( ::cppu::OWeakObject& i_parent, ::osl::Mutex& i_mutex )
:m_pImpl( new UndoManager_Impl( *this, i_parent, i_mutex ) )
diff --git a/include/framework/undomanagerhelper.hxx b/include/framework/undomanagerhelper.hxx
index 77c0983..a82c681 100644
--- a/include/framework/undomanagerhelper.hxx
+++ b/include/framework/undomanagerhelper.hxx
@@ -48,10 +48,6 @@ namespace framework
*/
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.
diff --git a/sfx2/source/doc/docundomanager.cxx b/sfx2/source/doc/docundomanager.cxx
index 2c57d3e..a915d11 100644
--- a/sfx2/source/doc/docundomanager.cxx
+++ b/sfx2/source/doc/docundomanager.cxx
@@ -202,11 +202,6 @@ namespace sfx2
{
}
- virtual void reset()
- {
- m_guard.reset();
- }
-
virtual void clear()
{
m_guard.clear();
commit 00550fbd193cb6184075dbe050002f567174e7ec
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Mar 17 17:08:22 2014 +0100
Fold framework::IGuard into framework::IMutexGuard
Change-Id: I14a77fc3fbf225862bc01f677d09d5b5a52bb1aa
diff --git a/chart2/source/model/main/UndoManager.cxx b/chart2/source/model/main/UndoManager.cxx
index 5916bef..44ce79e 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 260c57f..e2a24e9 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 46071b4..0000000
--- 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 8c0c428..77c0983 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.
More information about the Libreoffice-commits
mailing list