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