diff options
author | Valentin Kettner <vakevk+libreoffice@gmail.com> | 2014-07-29 13:03:49 +0200 |
---|---|---|
committer | Valentin Kettner <vakevk+libreoffice@gmail.com> | 2014-08-12 23:26:37 +0200 |
commit | 9d43f6d2c48373811290c82aba190a39c29512cc (patch) | |
tree | d1b7c5cc06c51a2e5b2ff0a3c26b0a32fe833e7d /sw | |
parent | 69e5f335abcd838ad6dac04f8e2d14f39856dc43 (diff) |
Refactored IDocumentLineNumberAccess.
This interface is obsolete and was deleted.
Change-Id: I56d37814f6e43f083ab3d199237ade06db287e18
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/IDocumentLineNumberAccess.hxx | 42 | ||||
-rw-r--r-- | sw/inc/doc.hxx | 8 | ||||
-rw-r--r-- | sw/inc/node.hxx | 5 | ||||
-rw-r--r-- | sw/source/core/docnode/node.cxx | 1 | ||||
-rw-r--r-- | sw/source/core/text/frmpaint.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/text/txtfrm.cxx | 4 |
6 files changed, 6 insertions, 57 deletions
diff --git a/sw/inc/IDocumentLineNumberAccess.hxx b/sw/inc/IDocumentLineNumberAccess.hxx deleted file mode 100644 index b63d004485a8..000000000000 --- a/sw/inc/IDocumentLineNumberAccess.hxx +++ /dev/null @@ -1,42 +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_IDOCUMENTLINENUMBERACCESS_HXX -#define INCLUDED_SW_INC_IDOCUMENTLINENUMBERACCESS_HXX - -#include <sal/types.h> - -class SwLineNumberInfo; - -/** Access to the line number information - */ -class IDocumentLineNumberAccess -{ -public: - - virtual const SwLineNumberInfo& GetLineNumberInfo() const = 0; - virtual void SetLineNumberInfo(const SwLineNumberInfo& rInfo) = 0; - -protected: - virtual ~IDocumentLineNumberAccess() {}; -}; - -#endif // INCLUDED_SW_INC_IDOCUMENTLINENUMBERACCESS_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 18bb670b5da2..6aa5ba3aa97d 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -23,7 +23,6 @@ #include <IInterface.hxx> #include <IDocumentMarkAccess.hxx> #include <IDocumentStylePoolAccess.hxx> -#include <IDocumentLineNumberAccess.hxx> #include <IDocumentStatistics.hxx> #include <IDocumentState.hxx> #include <IDocumentLayoutAccess.hxx> @@ -251,7 +250,6 @@ void StartGrammarChecking( SwDoc &rDoc ); class SW_DLLPUBLIC SwDoc : public IInterface, public IDocumentStylePoolAccess, - public IDocumentLineNumberAccess, public IDocumentStatistics, public IDocumentState, public IDocumentLayoutAccess, @@ -563,9 +561,9 @@ public: virtual bool IsPoolFmtUsed( sal_uInt16 nId ) const SAL_OVERRIDE; virtual bool IsPoolPageDescUsed( sal_uInt16 nId ) const SAL_OVERRIDE; - // IDocumentLineNumberAccess - virtual const SwLineNumberInfo& GetLineNumberInfo() const SAL_OVERRIDE; - virtual void SetLineNumberInfo(const SwLineNumberInfo& rInfo) SAL_OVERRIDE; + // SwLineNumberInfo + virtual const SwLineNumberInfo& GetLineNumberInfo() const; + virtual void SetLineNumberInfo(const SwLineNumberInfo& rInfo); // IDocumentStatistics virtual void DocInfoChgd() SAL_OVERRIDE; diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx index d58da5c390fb..03c28dcc1769 100644 --- a/sw/inc/node.hxx +++ b/sw/inc/node.hxx @@ -67,7 +67,6 @@ class IDocumentDeviceAccess; class IDocumentMarkAccess; class IDocumentRedlineAccess; class IDocumentStylePoolAccess; -class IDocumentLineNumberAccess; class IDocumentLinksAdministration; class IDocumentFieldsAccess; class IDocumentContentOperations; @@ -224,10 +223,6 @@ public: */ const IDocumentStylePoolAccess* getIDocumentStylePoolAccess() const; - /** Provides access to the document line number information interface - */ - const IDocumentLineNumberAccess* getIDocumentLineNumberAccess() const; - /** Provides access to the document draw model interface */ const IDocumentDrawModelAccess* getIDocumentDrawModelAccess() const; diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index 16e04f73af52..0d9921bbb41a 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -1913,7 +1913,6 @@ const IDocumentSettingAccess* SwNode::getIDocumentSettingAccess() const { return const IDocumentDeviceAccess* SwNode::getIDocumentDeviceAccess() const { return &GetDoc()->getIDocumentDeviceAccess(); } const IDocumentRedlineAccess* SwNode::getIDocumentRedlineAccess() const { return &GetDoc()->getIDocumentRedlineAccess(); } const IDocumentStylePoolAccess* SwNode::getIDocumentStylePoolAccess() const { return GetDoc(); } -const IDocumentLineNumberAccess* SwNode::getIDocumentLineNumberAccess() const { return GetDoc(); } const IDocumentDrawModelAccess* SwNode::getIDocumentDrawModelAccess() const { return & GetDoc()->getIDocumentDrawModelAccess(); } const IDocumentLayoutAccess* SwNode::getIDocumentLayoutAccess() const { return GetDoc(); } IDocumentLayoutAccess* SwNode::getIDocumentLayoutAccess() { return GetDoc(); } diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx index afae4fddd18d..77cd5dc0ccdc 100644 --- a/sw/source/core/text/frmpaint.cxx +++ b/sw/source/core/text/frmpaint.cxx @@ -49,7 +49,6 @@ #include <EnhancedPDFExportHelper.hxx> #include <IDocumentStylePoolAccess.hxx> -#include <IDocumentLineNumberAccess.hxx> #define REDLINE_DISTANCE 567/4 #define REDLINE_MINDIST 567/10 @@ -288,7 +287,7 @@ void SwTxtFrm::PaintExtraData( const SwRect &rRect ) const const SwTxtNode& rTxtNode = *GetTxtNode(); const IDocumentRedlineAccess* pIDRA = rTxtNode.getIDocumentRedlineAccess(); - const SwLineNumberInfo &rLineInf = rTxtNode.getIDocumentLineNumberAccess()->GetLineNumberInfo(); + const SwLineNumberInfo &rLineInf = rTxtNode.GetDoc()->GetLineNumberInfo(); const SwFmtLineNumber &rLineNum = GetAttrSet()->GetLineNumber(); bool bLineNum = !IsInTab() && rLineInf.IsPaintLineNumbers() && ( !IsInFly() || rLineInf.IsCountInFlys() ) && rLineNum.IsCount(); diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index 9c72fc8df542..955177a2129e 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -2403,7 +2403,7 @@ void SwTxtFrm::ChgThisLines() { // not necessary to format here (GerFormatted etc.), because we have to come from there! sal_uLong nNew = 0; - const SwLineNumberInfo &rInf = GetNode()->getIDocumentLineNumberAccess()->GetLineNumberInfo(); + const SwLineNumberInfo &rInf = GetNode()->GetDoc()->GetLineNumberInfo(); if ( !GetTxt().isEmpty() && HasPara() ) { SwTxtSizeInfo aInf( this ); @@ -2465,7 +2465,7 @@ void SwTxtFrm::RecalcAllLines() const sal_uLong nOld = GetAllLines(); const SwFmtLineNumber &rLineNum = pAttrSet->GetLineNumber(); sal_uLong nNewNum; - const bool bRestart = GetTxtNode()->getIDocumentLineNumberAccess()->GetLineNumberInfo().IsRestartEachPage(); + const bool bRestart = GetTxtNode()->GetDoc()->GetLineNumberInfo().IsRestartEachPage(); if ( !IsFollow() && rLineNum.GetStartValue() && rLineNum.IsCount() ) nNewNum = rLineNum.GetStartValue() - 1; |