1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
|
/* -*- 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_SOURCE_CORE_INC_DOCUMENTREDLINEMANAGER_HXX
#define INCLUDED_SW_SOURCE_CORE_INC_DOCUMENTREDLINEMANAGER_HXX
#include <IDocumentRedlineAccess.hxx>
class SwDoc;
namespace sw
{
class DocumentRedlineManager : public IDocumentRedlineAccess
{
public:
DocumentRedlineManager( SwDoc& i_rSwdoc );
virtual RedlineMode_t GetRedlineMode() const override;
virtual void SetRedlineMode_intern(/*[in]*/RedlineMode_t eMode) override;
virtual void SetRedlineMode(/*[in]*/RedlineMode_t eMode) override;
virtual bool IsRedlineOn() const override;
virtual bool IsIgnoreRedline() const override;
virtual const SwRedlineTable& GetRedlineTable() const override;
virtual SwRedlineTable& GetRedlineTable() override;
virtual const SwExtraRedlineTable& GetExtraRedlineTable() const override;
virtual SwExtraRedlineTable& GetExtraRedlineTable() override;
virtual bool HasExtraRedlineTable() const override;
virtual bool IsInRedlines(const SwNode& rNode) const override;
virtual bool AppendRedline(/*[in]*/SwRangeRedline* pPtr, /*[in]*/bool bCallDelete) override;
virtual bool AppendTableRowRedline(/*[in]*/SwTableRowRedline* pPtr, /*[in]*/bool bCallDelete) override;
virtual bool AppendTableCellRedline(/*[in]*/SwTableCellRedline* pPtr, /*[in]*/bool bCallDelete) override;
virtual bool SplitRedline(/*[in]*/const SwPaM& rPam) override;
virtual bool DeleteRedline(
/*[in]*/const SwPaM& rPam,
/*[in]*/bool bSaveInUndo,
/*[in]*/sal_uInt16 nDelType) override;
virtual bool DeleteRedline(
/*[in]*/const SwStartNode& rSection,
/*[in]*/bool bSaveInUndo,
/*[in]*/sal_uInt16 nDelType) override;
virtual sal_uInt16 GetRedlinePos(
/*[in]*/const SwNode& rNode,
/*[in]*/sal_uInt16 nType) const override;
virtual void CompressRedlines() override;
virtual const SwRangeRedline* GetRedline(
/*[in]*/const SwPosition& rPos,
/*[in]*/sal_uInt16* pFndPos) const override;
virtual bool IsRedlineMove() const override;
virtual void SetRedlineMove(/*[in]*/bool bFlag) override;
virtual bool AcceptRedline(/*[in]*/sal_uInt16 nPos, /*[in]*/bool bCallDelete) override;
virtual bool AcceptRedline(/*[in]*/const SwPaM& rPam, /*[in]*/bool bCallDelete) override;
virtual bool RejectRedline(/*[in]*/sal_uInt16 nPos, /*[in]*/bool bCallDelete) override;
virtual bool RejectRedline(/*[in]*/const SwPaM& rPam, /*[in]*/bool bCallDelete) override;
virtual const SwRangeRedline* SelNextRedline(/*[in]*/SwPaM& rPam) const override;
virtual const SwRangeRedline* SelPrevRedline(/*[in]*/SwPaM& rPam) const override;
virtual void UpdateRedlineAttr() override;
virtual sal_uInt16 GetRedlineAuthor() override;
virtual sal_uInt16 InsertRedlineAuthor(const OUString& rAuthor) override;
virtual bool SetRedlineComment(
/*[in]*/const SwPaM& rPam,
/*[in]*/const OUString& rComment) override;
virtual const css::uno::Sequence <sal_Int8>& GetRedlinePassword() const override;
virtual void SetRedlinePassword(
/*[in]*/const css::uno::Sequence <sal_Int8>& rNewPassword) override;
//Non Interface methods;
/** Set comment-text for Redline. It then comes in via AppendRedLine.
Used by AutoFormat. 0-pointer resets mode.
Sequence number is for conjoining of Redlines by the UI. */
void SetAutoFormatRedlineComment( const OUString* pText, sal_uInt16 nSeqNo = 0 );
void checkRedlining(RedlineMode_t& _rReadlineMode);
virtual ~DocumentRedlineManager();
private:
DocumentRedlineManager(DocumentRedlineManager const&) = delete;
DocumentRedlineManager& operator=(DocumentRedlineManager const&) = delete;
SwDoc& m_rDoc;
RedlineMode_t meRedlineMode; //< Current Redline Mode.
SwRedlineTable *mpRedlineTable; //< List of all Ranged Redlines.
SwExtraRedlineTable *mpExtraRedlineTable; //< List of all Extra Redlines.
OUString *mpAutoFormatRedlnComment; //< Comment for Redlines inserted via AutoFormat.
bool mbIsRedlineMove; //< true: Redlines are moved into to / out of the section.
bool mbReadlineChecked; //< true: if the query was already shown
sal_uInt16 mnAutoFormatRedlnCommentNo; /**< SeqNo for conjoining of AutoFormat-Redlines.
by the UI. Managed by SwAutoFormat! */
css::uno::Sequence <sal_Int8 > maRedlinePasswd;
};
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|