LibreOffice Module sc (master) 1
acredlin.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
22#include <svx/ctredlin.hxx>
23#include <sfx2/basedlgs.hxx>
24#include <sfx2/bindings.hxx>
25#include <chgtrack.hxx>
26#include <chgviset.hxx>
27#include <vcl/idle.hxx>
28
29class ScViewData;
30class ScDocument;
31
32struct SfxChildWinInfo;
33
35{
36public:
38 virtual ~ScRedlinData() override;
46};
47
49{
62 OUString aStrMove;
63 OUString aStrContent;
64 OUString aStrReject;
67 OUString aStrNoEntry;
71 OUString aStrEmpty;
72 OUString aUnknown;
75 bool bIgnoreMsg:1;
78 bool bUseColor:1;
79
82 SvxRedlinTable* pTheView; // #i48648 now SvHeaderTabListBox
83
84 std::unique_ptr<weld::Container> m_xContentArea;
85 std::unique_ptr<weld::Menu> m_xPopup, m_xSortMenu;
86 std::unique_ptr<SvxAcceptChgCtr> m_xAcceptChgCtr;
87
88 void Init();
89
90 DECL_LINK( FilterHandle, SvxTPFilter*, void );
91 DECL_LINK( RefHandle, SvxTPFilter*, void );
92 DECL_LINK( RejectHandle, SvxTPView*, void );
93 DECL_LINK( AcceptHandle, SvxTPView*, void );
94 DECL_LINK( RejectAllHandle, SvxTPView*, void );
95 DECL_LINK( AcceptAllHandle, SvxTPView*, void );
96 DECL_LINK( ExpandingHandle, const weld::TreeIter&, bool );
97 DECL_LINK( SelectHandle, weld::TreeView&, void );
98 DECL_LINK( RefInfoHandle, const OUString*, void );
99
100 DECL_LINK( UpdateSelectionHdl, Timer*, void );
101 DECL_LINK( ChgTrackModHdl, ScChangeTrack&, void );
102 DECL_LINK( CommandHdl, const CommandEvent&, bool );
103 DECL_LINK( ReOpenTimerHdl, Timer*, void );
104
105 int ColCompareHdl(const weld::TreeIter& rLeft, const weld::TreeIter& rRight) const;
106
107 void RejectFiltered();
108 void AcceptFiltered();
109
110 bool IsValidAction(const ScChangeAction* pScChangeAction);
111
112 OUString* MakeTypeString(ScChangeActionType eType);
113
114 std::unique_ptr<weld::TreeIter> AppendChangeAction(
115 const ScChangeAction* pScChangeAction, bool bCreateOnDemand,
116 const weld::TreeIter* pParent = nullptr, bool bDelMaster = false,
117 bool bDisabled = false);
118
119 std::unique_ptr<weld::TreeIter> AppendFilteredAction(
120 const ScChangeAction* pScChangeAction,ScChangeActionState eState,
121 bool bCreateOnDemand,
122 const weld::TreeIter* pParent = nullptr, bool bDelMaster = false,
123 bool bDisabled = false);
124
125 std::unique_ptr<weld::TreeIter> InsertChangeActionContent(const ScChangeActionContent* pScChangeAction,
126 const weld::TreeIter& rParent, sal_uLong nSpecial);
127
128 void GetDependents(const ScChangeAction* pScChangeAction,
129 ScChangeActionMap& aActionMap,
130 const weld::TreeIter& rEntry);
131
132 bool InsertContentChildren(ScChangeActionMap* pActionMap, const weld::TreeIter& rParent);
133
134 bool InsertAcceptedORejected(const weld::TreeIter& rParent);
135
136 bool InsertDeletedChildren(const ScChangeAction* pChangeAction, ScChangeActionMap* pActionMap,
137 const weld::TreeIter& rParent);
138
139 bool InsertChildren(ScChangeActionMap* pActionMap, const weld::TreeIter& rParent);
140
141 void AppendChanges(const ScChangeTrack* pChanges,sal_uLong nStartAction, sal_uLong nEndAction);
142
143 void RemoveEntries(sal_uLong nStartAction,sal_uLong nEndAction);
144 void UpdateEntries(const ScChangeTrack* pChgTrack, sal_uLong nStartAction,sal_uLong nEndAction);
145
146 void UpdateView();
147 void ClearView();
148
149 bool Expand(const ScChangeTrack* pChanges,const ScChangeAction* pScChangeAction,
150 const weld::TreeIter& rEntry, bool bFilter = false);
151
152public:
154 ScViewData* ptrViewData);
155 virtual ~ScAcceptChgDlg() override;
156
157 void ReInit(ScViewData* ptrViewData);
158
159 void Initialize (SfxChildWinInfo* pInfo);
160 virtual void FillInfo(SfxChildWinInfo&) const override;
161};
162
163/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::map< sal_uLong, ScChangeAction * > ScChangeActionMap
Definition: chgtrack.hxx:798
ScChangeActionType
Definition: chgtrack.hxx:63
ScChangeActionState
Definition: chgtrack.hxx:77
OUString aStrDeleteCols
Definition: acredlin.hxx:59
OUString aStrEmpty
Definition: acredlin.hxx:71
void ClearView()
Definition: acredlin.cxx:275
bool InsertDeletedChildren(const ScChangeAction *pChangeAction, ScChangeActionMap *pActionMap, const weld::TreeIter &rParent)
Definition: acredlin.cxx:1184
OUString aStrNoEntry
Definition: acredlin.hxx:67
void UpdateView()
Definition: acredlin.cxx:721
OUString aStrDeleteTabs
Definition: acredlin.hxx:61
SvxRedlinTable * pTheView
Definition: acredlin.hxx:82
std::unique_ptr< weld::Container > m_xContentArea
Definition: acredlin.hxx:84
bool bNoSelection
Definition: acredlin.hxx:76
void UpdateEntries(const ScChangeTrack *pChgTrack, sal_uLong nStartAction, sal_uLong nEndAction)
Definition: acredlin.cxx:1432
void RemoveEntries(sal_uLong nStartAction, sal_uLong nEndAction)
Definition: acredlin.cxx:1386
OUString aStrDeleteRows
Definition: acredlin.hxx:60
OUString aUnknown
Definition: acredlin.hxx:72
void AcceptFiltered()
Definition: acredlin.cxx:950
std::unique_ptr< weld::TreeIter > InsertChangeActionContent(const ScChangeActionContent *pScChangeAction, const weld::TreeIter &rParent, sal_uLong nSpecial)
Definition: acredlin.cxx:615
void AppendChanges(const ScChangeTrack *pChanges, sal_uLong nStartAction, sal_uLong nEndAction)
Definition: acredlin.cxx:1313
virtual void FillInfo(SfxChildWinInfo &) const override
Definition: acredlin.cxx:1709
bool bHasFilterEntry
Definition: acredlin.hxx:77
bool IsValidAction(const ScChangeAction *pScChangeAction)
Definition: acredlin.cxx:313
OUString aStrInsertCols
Definition: acredlin.hxx:56
void GetDependents(const ScChangeAction *pScChangeAction, ScChangeActionMap &aActionMap, const weld::TreeIter &rEntry)
Definition: acredlin.cxx:1029
SvxTPFilter * pTPFilter
Definition: acredlin.hxx:80
OUString aStrContent
Definition: acredlin.hxx:63
OUString aStrInsertRows
Definition: acredlin.hxx:57
Idle aReOpenIdle
Definition: acredlin.hxx:51
ScDocument * pDoc
Definition: acredlin.hxx:53
DECL_LINK(ChgTrackModHdl, ScChangeTrack &, void)
std::unique_ptr< weld::Menu > m_xSortMenu
Definition: acredlin.hxx:85
bool InsertAcceptedORejected(const weld::TreeIter &rParent)
Definition: acredlin.cxx:1129
OUString aStrAllAccepted
Definition: acredlin.hxx:65
OUString * MakeTypeString(ScChangeActionType eType)
Definition: acredlin.cxx:292
DECL_LINK(SelectHandle, weld::TreeView &, void)
ScRangeList aRangeList
Definition: acredlin.hxx:54
DECL_LINK(RefInfoHandle, const OUString *, void)
DECL_LINK(RejectAllHandle, SvxTPView *, void)
std::unique_ptr< weld::TreeIter > AppendChangeAction(const ScChangeAction *pScChangeAction, bool bCreateOnDemand, const weld::TreeIter *pParent=nullptr, bool bDelMaster=false, bool bDisabled=false)
Definition: acredlin.cxx:361
OUString aStrChildOrgContent
Definition: acredlin.hxx:70
sal_uLong nRejectCount
Definition: acredlin.hxx:74
OUString aStrMove
Definition: acredlin.hxx:62
std::unique_ptr< SvxAcceptChgCtr > m_xAcceptChgCtr
Definition: acredlin.hxx:86
OUString aStrChildContent
Definition: acredlin.hxx:69
OUString aStrInsertTabs
Definition: acredlin.hxx:58
OUString aStrContentWithChild
Definition: acredlin.hxx:68
bool InsertContentChildren(ScChangeActionMap *pActionMap, const weld::TreeIter &rParent)
Definition: acredlin.cxx:1054
bool Expand(const ScChangeTrack *pChanges, const ScChangeAction *pScChangeAction, const weld::TreeIter &rEntry, bool bFilter=false)
Definition: acredlin.cxx:1216
std::unique_ptr< weld::Menu > m_xPopup
Definition: acredlin.hxx:85
sal_uLong nAcceptCount
Definition: acredlin.hxx:73
DECL_LINK(RefHandle, SvxTPFilter *, void)
void RejectFiltered()
Definition: acredlin.cxx:930
SvxTPView * pTPView
Definition: acredlin.hxx:81
ScAcceptChgDlg(SfxBindings *pB, SfxChildWindow *pCW, weld::Window *pParent, ScViewData *ptrViewData)
Definition: acredlin.cxx:70
bool InsertChildren(ScChangeActionMap *pActionMap, const weld::TreeIter &rParent)
Definition: acredlin.cxx:1158
DECL_LINK(UpdateSelectionHdl, Timer *, void)
void ReInit(ScViewData *ptrViewData)
Definition: acredlin.cxx:157
ScViewData * pViewData
Definition: acredlin.hxx:52
DECL_LINK(AcceptAllHandle, SvxTPView *, void)
int ColCompareHdl(const weld::TreeIter &rLeft, const weld::TreeIter &rRight) const
Definition: acredlin.cxx:1741
DECL_LINK(RejectHandle, SvxTPView *, void)
DECL_LINK(AcceptHandle, SvxTPView *, void)
DECL_LINK(ExpandingHandle, const weld::TreeIter &, bool)
OUString aStrReject
Definition: acredlin.hxx:64
void Initialize(SfxChildWinInfo *pInfo)
Definition: acredlin.cxx:1675
ScChangeViewSettings aChangeViewSet
Definition: acredlin.hxx:55
Idle aSelectionIdle
Definition: acredlin.hxx:50
std::unique_ptr< weld::TreeIter > AppendFilteredAction(const ScChangeAction *pScChangeAction, ScChangeActionState eState, bool bCreateOnDemand, const weld::TreeIter *pParent=nullptr, bool bDelMaster=false, bool bDisabled=false)
Definition: acredlin.cxx:502
OUString aStrAllRejected
Definition: acredlin.hxx:66
DECL_LINK(ReOpenTimerHdl, Timer *, void)
virtual ~ScAcceptChgDlg() override
Definition: acredlin.cxx:145
DECL_LINK(CommandHdl, const CommandEvent &, bool)
DECL_LINK(FilterHandle, SvxTPFilter *, void)
virtual ~ScRedlinData() override
Definition: acredlin.cxx:59
bool bIsAcceptable
Definition: acredlin.hxx:45
sal_uLong nInfo
Definition: acredlin.hxx:40
SCCOL nCol
Definition: acredlin.hxx:42
SCROW nRow
Definition: acredlin.hxx:43
SCTAB nTable
Definition: acredlin.hxx:41
bool bIsRejectable
Definition: acredlin.hxx:44
sal_uLong nActionNo
Definition: acredlin.hxx:39
sal_uIntPtr sal_uLong
sal_Int16 SCTAB
Definition: types.hxx:22
sal_Int16 SCCOL
Definition: types.hxx:21
sal_Int32 SCROW
Definition: types.hxx:17