summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-12-02 10:03:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-12-02 13:36:19 +0100
commitc5f8cca27aedff9a936cdbd3e0d258f0bbf3f146 (patch)
treea70bca467c2978c2ef701dc598c2200745502813 /framework
parenta9e04c08b8b3baa943acf69e5456701dce78041c (diff)
loplugin:mergeclasses TransactionBase with Desktop
Change-Id: Ied33d099f89c767420f6fcb9342151d9a8356920 Reviewed-on: https://gerrit.libreoffice.org/84196 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework')
-rw-r--r--framework/inc/services/desktop.hxx5
-rw-r--r--framework/inc/threadhelp/transactionbase.hxx51
-rw-r--r--framework/source/services/desktop.cxx3
3 files changed, 4 insertions, 55 deletions
diff --git a/framework/inc/services/desktop.hxx b/framework/inc/services/desktop.hxx
index c49b62f4cf14..68dc24da2abd 100644
--- a/framework/inc/services/desktop.hxx
+++ b/framework/inc/services/desktop.hxx
@@ -26,7 +26,6 @@
#include <vector>
#include <classes/framecontainer.hxx>
-#include <threadhelp/transactionbase.hxx>
#include <com/sun/star/frame/XUntitledNumbers.hpp>
#include <com/sun/star/frame/XController.hpp>
@@ -49,6 +48,7 @@
#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/compbase.hxx>
#include <cppuhelper/propshlp.hxx>
+#include <threadhelp/transactionmanager.hxx>
#include <unotools/cmdoptions.hxx>
namespace framework{
@@ -95,7 +95,6 @@ typedef cppu::WeakComponentImplHelper<
css::frame::XUntitledNumbers > Desktop_BASE;
class Desktop : private cppu::BaseMutex,
- private TransactionBase,
public Desktop_BASE,
public cppu::OPropertySetHelper
{
@@ -377,6 +376,8 @@ class Desktop : private cppu::BaseMutex,
private:
+ mutable TransactionManager m_aTransactionManager;
+
/** check flag to protect us against dispose before terminate!
* see dispose() for further information!
*/
diff --git a/framework/inc/threadhelp/transactionbase.hxx b/framework/inc/threadhelp/transactionbase.hxx
deleted file mode 100644
index 236a0c7c04e6..000000000000
--- a/framework/inc/threadhelp/transactionbase.hxx
+++ /dev/null
@@ -1,51 +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_INC_THREADHELP_TRANSACTIONBASE_HXX
-#define INCLUDED_FRAMEWORK_INC_THREADHELP_TRANSACTIONBASE_HXX
-
-#include <threadhelp/transactionmanager.hxx>
-
-namespace framework{
-
-/*-************************************************************************************************************
- @short make it possible to instantiate a transaction manager as first member!
- @descr If you use a transaction manager as a member of your class and wish to use it earlier then other ones
- you should have a look on this implementation. You must use it as the first base class
- of your implementation - because base classes are initialized by his order and before your
- member! That's why is a good place to declare this member.
- @devstatus ready to use
-*//*-*************************************************************************************************************/
-struct TransactionBase
-{
-
- // public member
-
- public:
-
- mutable TransactionManager m_aTransactionManager; /// "your" public manager-member!
- /// Make it mutable for using in const functions!
-
-}; // struct TransactionBase
-
-} // namespace framework
-
-#endif // INCLUDED_FRAMEWORK_INC_THREADHELP_TRANSACTIONBASE_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index 2a8947d36669..03e6bf2750f1 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -143,8 +143,7 @@ void Desktop::constructorInit()
@onerror We throw an ASSERT in debug version or do nothing in release version.
*//*-*************************************************************************************************************/
Desktop::Desktop( const css::uno::Reference< css::uno::XComponentContext >& xContext )
- : TransactionBase ( )
- , Desktop_BASE ( m_aMutex )
+ : Desktop_BASE ( m_aMutex )
, cppu::OPropertySetHelper( cppu::WeakComponentImplHelperBase::rBHelper )
// Init member
, m_bIsTerminated ( false ) // see dispose() for further information!