summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-10-04 12:15:36 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-10-04 15:06:04 +0200
commit20356442cdc34f1292dcdb88622dede8f0368d8a (patch)
tree27c25b46c92acb741b938b0fdcf4dd94ba582da9 /sw/inc
parentda5cdcdeddf7bc21606b4cb64d8b1fc412146935 (diff)
loplugin:mergeclasses merge IInterface with SwDoc
Change-Id: I6d400540c878db4504f6830aa9a3a6a381162520 Reviewed-on: https://gerrit.libreoffice.org/43127 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/IInterface.hxx61
-rw-r--r--sw/inc/doc.hxx31
2 files changed, 23 insertions, 69 deletions
diff --git a/sw/inc/IInterface.hxx b/sw/inc/IInterface.hxx
deleted file mode 100644
index 3d372fefaa5f..000000000000
--- a/sw/inc/IInterface.hxx
+++ /dev/null
@@ -1,61 +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_SW_INC_IINTERFACE_HXX
-#define INCLUDED_SW_INC_IINTERFACE_HXX
-
-#include <sal/types.h>
-
-/** The base interface
- */
-class IInterface
-{
-public:
-
- /** Acquire a reference to an instance. A caller shall release
- the instance by calling 'release' when it is no longer needed.
- 'acquire' and 'release' calls need to be balanced.
-
- @returns
- the current reference count of the instance for debugging purposes.
- */
- virtual sal_Int32 acquire() = 0;
-
- /** Releases a reference to an instance. A caller has to call
- 'release' when a before acquired reference to an instance
- is no longer needed. 'acquire' and 'release' calls need to
- be balanced.
-
- @returns
- the current reference count of the instance for debugging purposes.
- */
- virtual sal_Int32 release() = 0;
-
- /** Returns the current reference count. This method should be used for
- debugging purposes. Using it otherwise is a signal of a design flaw.
- */
- virtual sal_Int32 getReferenceCount() const = 0;
-
-protected:
- virtual ~IInterface() {};
-};
-
-#endif // INCLUDED_SW_INC_IINTERFACE_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 424aa738434f..281054bfd9ff 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -20,7 +20,6 @@
#define INCLUDED_SW_INC_DOC_HXX
// SwDoc interfaces
-#include <IInterface.hxx>
#include <IDocumentMarkAccess.hxx>
#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <com/sun/star/embed/XStorage.hpp>
@@ -230,8 +229,7 @@ void StartGrammarChecking( SwDoc &rDoc );
using SwRubyList = std::vector<std::unique_ptr<SwRubyListEntry>>;
// Represents the model of a Writer document.
-class SW_DLLPUBLIC SwDoc :
- public IInterface
+class SW_DLLPUBLIC SwDoc
{
friend class ::sw::DocumentContentOperationsManager;
@@ -438,7 +436,7 @@ public:
// Life cycle
SwDoc();
- virtual ~SwDoc() override;
+ virtual ~SwDoc();
bool IsInDtor() const { return mbDtor; }
@@ -448,10 +446,27 @@ public:
SwNodes & GetNodes() { return *m_pNodes; }
SwNodes const& GetNodes() const { return *m_pNodes; }
- // IInterface
- virtual sal_Int32 acquire() override;
- virtual sal_Int32 release() override;
- virtual sal_Int32 getReferenceCount() const override;
+ /** Acquire a reference to an instance. A caller shall release
+ the instance by calling 'release' when it is no longer needed.
+ 'acquire' and 'release' calls need to be balanced.
+
+ @returns
+ the current reference count of the instance for debugging purposes.
+ */
+ sal_Int32 acquire();
+ /** Releases a reference to an instance. A caller has to call
+ 'release' when a before acquired reference to an instance
+ is no longer needed. 'acquire' and 'release' calls need to
+ be balanced.
+
+ @returns
+ the current reference count of the instance for debugging purposes.
+ */
+ sal_Int32 release();
+ /** Returns the current reference count. This method should be used for
+ debugging purposes. Using it otherwise is a signal of a design flaw.
+ */
+ sal_Int32 getReferenceCount() const;
// IDocumentSettingAccess
IDocumentSettingAccess const & getIDocumentSettingAccess() const; //The IDocumentSettingAccess interface