diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-12-02 10:03:24 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-12-02 13:36:19 +0100 |
commit | c5f8cca27aedff9a936cdbd3e0d258f0bbf3f146 (patch) | |
tree | a70bca467c2978c2ef701dc598c2200745502813 /framework/inc | |
parent | a9e04c08b8b3baa943acf69e5456701dce78041c (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/inc')
-rw-r--r-- | framework/inc/services/desktop.hxx | 5 | ||||
-rw-r--r-- | framework/inc/threadhelp/transactionbase.hxx | 51 |
2 files changed, 3 insertions, 53 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: */ |