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 #ifndef INCLUDED_SC_SOURCE_UI_INC_ACREDLIN_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_ACREDLIN_HXX
22 
23 #include <svx/ctredlin.hxx>
24 #include <sfx2/basedlgs.hxx>
25 #include <sfx2/bindings.hxx>
26 #include <chgtrack.hxx>
27 #include <chgviset.hxx>
28 #include <vcl/idle.hxx>
29 
30 class ScViewData;
31 class ScDocument;
32 
33 struct SfxChildWinInfo;
34 
35 class ScRedlinData : public RedlinData
36 {
37 public:
38  ScRedlinData();
39  virtual ~ScRedlinData() override;
47 };
48 
50 {
57  OUString aStrInsertCols;
58  OUString aStrInsertRows;
59  OUString aStrInsertTabs;
60  OUString aStrDeleteCols;
61  OUString aStrDeleteRows;
62  OUString aStrDeleteTabs;
63  OUString aStrMove;
64  OUString aStrContent;
65  OUString aStrReject;
66  OUString aStrAllAccepted;
67  OUString aStrAllRejected;
68  OUString aStrNoEntry;
70  OUString aStrChildContent;
72  OUString aStrEmpty;
73  OUString aUnknown;
76  bool bIgnoreMsg:1;
77  bool bNoSelection:1;
79  bool bUseColor:1;
80 
83  SvxRedlinTable* pTheView; // #i48648 now SvHeaderTabListBox
84 
85  std::unique_ptr<weld::Container> m_xContentArea;
86  std::unique_ptr<weld::Menu> m_xPopup, m_xSortMenu;
87  std::unique_ptr<SvxAcceptChgCtr> m_xAcceptChgCtr;
88 
89  void Init();
90 
91  DECL_LINK( FilterHandle, SvxTPFilter*, void );
92  DECL_LINK( RefHandle, SvxTPFilter*, void );
93  DECL_LINK( RejectHandle, SvxTPView*, void );
94  DECL_LINK( AcceptHandle, SvxTPView*, void );
95  DECL_LINK( RejectAllHandle, SvxTPView*, void );
96  DECL_LINK( AcceptAllHandle, SvxTPView*, void );
97  DECL_LINK( ExpandingHandle, const weld::TreeIter&, bool );
98  DECL_LINK( SelectHandle, weld::TreeView&, void );
99  DECL_LINK( RefInfoHandle, const OUString*, void );
100 
101  DECL_LINK( UpdateSelectionHdl, Timer*, void );
102  DECL_LINK( ChgTrackModHdl, ScChangeTrack&, void );
103  DECL_LINK( CommandHdl, const CommandEvent&, bool );
104  DECL_LINK( ReOpenTimerHdl, Timer*, void );
105 
106  int ColCompareHdl(const weld::TreeIter& rLeft, const weld::TreeIter& rRight) const;
107 
108  void RejectFiltered();
109  void AcceptFiltered();
110 
111  bool IsValidAction(const ScChangeAction* pScChangeAction);
112 
113  OUString* MakeTypeString(ScChangeActionType eType);
114 
115  std::unique_ptr<weld::TreeIter> AppendChangeAction(
116  const ScChangeAction* pScChangeAction, bool bCreateOnDemand,
117  const weld::TreeIter* pParent = nullptr, bool bDelMaster = false,
118  bool bDisabled = false);
119 
120  std::unique_ptr<weld::TreeIter> AppendFilteredAction(
121  const ScChangeAction* pScChangeAction,ScChangeActionState eState,
122  bool bCreateOnDemand,
123  const weld::TreeIter* pParent = nullptr, bool bDelMaster = false,
124  bool bDisabled = false);
125 
126  std::unique_ptr<weld::TreeIter> InsertChangeActionContent(const ScChangeActionContent* pScChangeAction,
127  const weld::TreeIter& rParent, sal_uLong nSpecial);
128 
129  void GetDependents(const ScChangeAction* pScChangeAction,
130  ScChangeActionMap& aActionMap,
131  const weld::TreeIter& rEntry);
132 
133  bool InsertContentChildren(ScChangeActionMap* pActionMap, const weld::TreeIter& rParent);
134 
135  bool InsertAcceptedORejected(const weld::TreeIter& rParent);
136 
137  bool InsertDeletedChildren(const ScChangeAction* pChangeAction, ScChangeActionMap* pActionMap,
138  const weld::TreeIter& rParent);
139 
140  bool InsertChildren(ScChangeActionMap* pActionMap, const weld::TreeIter& rParent);
141 
142  void AppendChanges(const ScChangeTrack* pChanges,sal_uLong nStartAction, sal_uLong nEndAction);
143 
144  void RemoveEntries(sal_uLong nStartAction,sal_uLong nEndAction);
145  void UpdateEntries(const ScChangeTrack* pChgTrack, sal_uLong nStartAction,sal_uLong nEndAction);
146 
147  void UpdateView();
148  void ClearView();
149 
150  bool Expand(const ScChangeTrack* pChanges,const ScChangeAction* pScChangeAction,
151  const weld::TreeIter& rEntry, bool bFilter = false);
152 
153 public:
155  ScViewData* ptrViewData);
156  virtual ~ScAcceptChgDlg() override;
157 
158  void ReInit(ScViewData* ptrViewData);
159 
160  void Initialize (SfxChildWinInfo* pInfo);
161  virtual void FillInfo(SfxChildWinInfo&) const override;
162 };
163 
164 #endif // INCLUDED_SC_SOURCE_UI_INC_ACREDLIN_HXX
165 
166 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool bHasFilterEntry
Definition: acredlin.hxx:78
OUString aStrReject
Definition: acredlin.hxx:65
OUString aStrDeleteCols
Definition: acredlin.hxx:60
void AppendChanges(const ScChangeTrack *pChanges, sal_uLong nStartAction, sal_uLong nEndAction)
Definition: acredlin.cxx:1328
ScChangeActionState
Definition: chgtrack.hxx:77
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:355
sal_uLong nRejectCount
Definition: acredlin.hxx:75
OUString aStrInsertCols
Definition: acredlin.hxx:57
std::unique_ptr< weld::Menu > m_xPopup
Definition: acredlin.hxx:86
sal_uIntPtr sal_uLong
OUString aStrAllAccepted
Definition: acredlin.hxx:66
SCROW nRow
Definition: acredlin.hxx:44
ScChangeActionType
Definition: chgtrack.hxx:63
bool bIsRejectable
Definition: acredlin.hxx:45
SvxTPView * pTPView
Definition: acredlin.hxx:82
bool InsertContentChildren(ScChangeActionMap *pActionMap, const weld::TreeIter &rParent)
Definition: acredlin.cxx:1069
sal_uLong nInfo
Definition: acredlin.hxx:41
bool Expand(const ScChangeTrack *pChanges, const ScChangeAction *pScChangeAction, const weld::TreeIter &rEntry, bool bFilter=false)
Definition: acredlin.cxx:1231
OUString aStrContentWithChild
Definition: acredlin.hxx:69
virtual void FillInfo(SfxChildWinInfo &) const override
Definition: acredlin.cxx:1720
OUString aStrChildOrgContent
Definition: acredlin.hxx:71
int ColCompareHdl(const weld::TreeIter &rLeft, const weld::TreeIter &rRight) const
Definition: acredlin.cxx:1752
Idle aSelectionIdle
Definition: acredlin.hxx:51
OUString aStrEmpty
Definition: acredlin.hxx:72
std::unique_ptr< weld::TreeIter > InsertChangeActionContent(const ScChangeActionContent *pScChangeAction, const weld::TreeIter &rParent, sal_uLong nSpecial)
Definition: acredlin.cxx:616
OUString aStrInsertTabs
Definition: acredlin.hxx:59
bool bIsAcceptable
Definition: acredlin.hxx:46
void AcceptFiltered()
Definition: acredlin.cxx:965
bool InsertAcceptedORejected(const weld::TreeIter &rParent)
Definition: acredlin.cxx:1144
OUString aStrContent
Definition: acredlin.hxx:64
OUString aStrNoEntry
Definition: acredlin.hxx:68
void UpdateEntries(const ScChangeTrack *pChgTrack, sal_uLong nStartAction, sal_uLong nEndAction)
Definition: acredlin.cxx:1444
void RemoveEntries(sal_uLong nStartAction, sal_uLong nEndAction)
Definition: acredlin.cxx:1401
OUString aStrChildContent
Definition: acredlin.hxx:70
OUString aStrAllRejected
Definition: acredlin.hxx:67
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 aUnknown
Definition: acredlin.hxx:73
std::unique_ptr< SvxAcceptChgCtr > m_xAcceptChgCtr
Definition: acredlin.hxx:87
sal_Int16 SCCOL
Definition: types.hxx:22
void ReInit(ScViewData *ptrViewData)
Definition: acredlin.cxx:158
OUString aStrDeleteRows
Definition: acredlin.hxx:61
bool IsValidAction(const ScChangeAction *pScChangeAction)
Definition: acredlin.cxx:307
OUString * MakeTypeString(ScChangeActionType eType)
Definition: acredlin.cxx:286
OUString aStrInsertRows
Definition: acredlin.hxx:58
bool InsertChildren(ScChangeActionMap *pActionMap, const weld::TreeIter &rParent)
Definition: acredlin.cxx:1173
ScRangeList aRangeList
Definition: acredlin.hxx:55
std::map< sal_uLong, ScChangeAction * > ScChangeActionMap
Definition: chgtrack.hxx:806
sal_Int32 SCROW
Definition: types.hxx:18
OUString aStrMove
Definition: acredlin.hxx:63
virtual ~ScRedlinData() override
Definition: acredlin.cxx:59
void UpdateView()
Definition: acredlin.cxx:736
sal_uLong nActionNo
Definition: acredlin.hxx:40
bool InsertDeletedChildren(const ScChangeAction *pChangeAction, ScChangeActionMap *pActionMap, const weld::TreeIter &rParent)
Definition: acredlin.cxx:1199
SCTAB nTable
Definition: acredlin.hxx:42
std::unique_ptr< weld::Container > m_xContentArea
Definition: acredlin.hxx:85
bool bNoSelection
Definition: acredlin.hxx:77
void ClearView()
Definition: acredlin.cxx:276
std::unique_ptr< weld::Menu > m_xSortMenu
Definition: acredlin.hxx:86
Idle aReOpenIdle
Definition: acredlin.hxx:52
ScAcceptChgDlg(SfxBindings *pB, SfxChildWindow *pCW, weld::Window *pParent, ScViewData *ptrViewData)
Definition: acredlin.cxx:70
SvxRedlinTable * pTheView
Definition: acredlin.hxx:83
ScChangeViewSettings aChangeViewSet
Definition: acredlin.hxx:56
OUString aStrDeleteTabs
Definition: acredlin.hxx:62
void Initialize(SfxChildWinInfo *pInfo)
Definition: acredlin.cxx:1686
void RejectFiltered()
Definition: acredlin.cxx:945
virtual ~ScAcceptChgDlg() override
Definition: acredlin.cxx:146
void GetDependents(const ScChangeAction *pScChangeAction, ScChangeActionMap &aActionMap, const weld::TreeIter &rEntry)
Definition: acredlin.cxx:1044
DECL_LINK(FilterHandle, SvxTPFilter *, void)
sal_uLong nAcceptCount
Definition: acredlin.hxx:74
ScViewData * pViewData
Definition: acredlin.hxx:53
ScDocument * pDoc
Definition: acredlin.hxx:54
SvxTPFilter * pTPFilter
Definition: acredlin.hxx:81
sal_Int16 SCTAB
Definition: types.hxx:23
SCCOL nCol
Definition: acredlin.hxx:43