1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SC_SOURCE_UI_INC_ACREDLIN_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_ACREDLIN_HXX
23 #include <vcl/morebtn.hxx>
24 #include <vcl/combobox.hxx>
25 #include <vcl/group.hxx>
26 #include <svtools/headbar.hxx>
27 #include <svtools/simptabl.hxx>
28 #include <svtools/svtabbx.hxx>
29 #include "rangenam.hxx"
30 #include "anyrefdg.hxx"
31 #include <vcl/lstbox.hxx>
32 #include <svx/ctredlin.hxx>
33 #include "chgtrack.hxx"
34 #include "chgviset.hxx"
35 #include <vcl/timer.hxx>
36 #include <vcl/idle.hxx>
41 #define FLT_DATE_BEFORE 0
42 #define FLT_DATE_SINCE 1
43 #define FLT_DATE_EQUAL 2
44 #define FLT_DATE_NOTEQUAL 3
45 #define FLT_DATE_BETWEEN 4
46 #define FLT_DATE_SAVE 5
60 OUString
* GetpAction() {return pAction
; }
61 OUString
* GetpPos() {return pPos
; }
62 OUString
* GetpAuthor() {return pAuthor
; }
63 OUString
* GetpDate() {return pDate
; }
64 OUString
* GetpComment() {return pComment
;}
65 void* GetpData() {return pData
; }
67 void SetpAction (OUString
* pString
) {pAction
= pString
;}
68 void SetpPos (OUString
* pString
) {pPos
= pString
;}
69 void SetpAuthor (OUString
* pString
) {pAuthor
= pString
;}
70 void SetpDate (OUString
* pString
) {pDate
= pString
;}
71 void SetpComment(OUString
* pString
) {pComment
=pString
;}
72 void SetpData (void* pdata
) {pData
=pdata
;}
75 class ScRedlinData
: public RedlinData
80 virtual ~ScRedlinData();
92 //@ Expand entrys are ambiguous and therefore removed
93 //DECLARE_TABLE( ScChgTrackExps, LExpNum)
95 class ScAcceptChgDlg
: public SfxModelessDialog
101 VclPtr
<SvxAcceptChgCtr
> m_pAcceptChgCtr
;
102 ScViewData
* pViewData
;
104 ScRangeName aLocalRangeName
;
105 VclPtr
<SvxTPFilter
> pTPFilter
;
106 VclPtr
<SvxTPView
> pTPView
;
107 VclPtr
<SvxRedlinTable
> pTheView
; // #i48648 now SvHeaderTabListBox
108 ScRangeList aRangeList
;
109 ScChangeViewSettings aChangeViewSet
;
110 OUString aStrInsertCols
;
111 OUString aStrInsertRows
;
112 OUString aStrInsertTabs
;
113 OUString aStrDeleteCols
;
114 OUString aStrDeleteRows
;
115 OUString aStrDeleteTabs
;
117 OUString aStrContent
;
119 OUString aStrAllAccepted
;
120 OUString aStrAllRejected
;
121 OUString aStrNoEntry
;
122 OUString aStrContentWithChild
;
123 OUString aStrChildContent
;
124 OUString aStrChildOrgContent
;
127 sal_uLong nAcceptCount
;
128 sal_uLong nRejectCount
;
129 bool bAcceptEnableFlag
:1;
130 bool bRejectEnableFlag
:1;
134 bool bHasFilterEntry
:1;
140 DECL_LINK( FilterHandle
, SvxTPFilter
* );
141 DECL_LINK( RefHandle
, void* );
142 DECL_STATIC_LINK( ScAcceptChgDlg
, FilterModified
, void* );
143 DECL_LINK( RejectHandle
, SvxTPView
*);
144 DECL_LINK( AcceptHandle
, SvxTPView
*);
145 DECL_LINK( RejectAllHandle
, void*);
146 DECL_LINK( AcceptAllHandle
, void*);
147 DECL_LINK( ExpandingHandle
, SvxRedlinTable
*);
148 DECL_LINK( SelectHandle
, void*);
149 DECL_LINK( RefInfoHandle
, OUString
*);
151 DECL_LINK_TYPED( UpdateSelectionHdl
, Idle
*, void );
152 DECL_LINK( ChgTrackModHdl
, ScChangeTrack
*);
153 DECL_LINK( CommandHdl
, void*);
154 DECL_LINK_TYPED( ReOpenTimerHdl
, Idle
*, void );
155 DECL_LINK( ColCompareHdl
, SvSortData
*);
159 void RejectFiltered();
160 void AcceptFiltered();
162 bool IsValidAction(const ScChangeAction
* pScChangeAction
);
164 OUString
* MakeTypeString(ScChangeActionType eType
);
166 SvTreeListEntry
* InsertChangeAction(
167 const ScChangeAction
* pScChangeAction
,ScChangeActionState eState
,
168 SvTreeListEntry
* pParent
=NULL
,bool bDelMaster
= false,
169 bool bDisabled
= false,sal_uLong nPos
= TREELIST_APPEND
);
171 SvTreeListEntry
* InsertFilteredAction(
172 const ScChangeAction
* pScChangeAction
,ScChangeActionState eState
,
173 SvTreeListEntry
* pParent
= NULL
,bool bDelMaster
= false,
174 bool bDisabled
= false, sal_uLong nPos
= TREELIST_APPEND
);
176 SvTreeListEntry
* InsertChangeActionContent(const ScChangeActionContent
* pScChangeAction
,
177 SvTreeListEntry
* pParent
,sal_uLong nSpecial
);
179 void GetDependents( const ScChangeAction
* pScChangeAction
,
180 ScChangeActionMap
& aActionMap
,
181 SvTreeListEntry
* pEntry
);
183 bool InsertContentChildren( ScChangeActionMap
* pActionMap
, SvTreeListEntry
* pParent
);
185 bool InsertAcceptedORejected(SvTreeListEntry
* pParent
);
187 bool InsertDeletedChildren( const ScChangeAction
* pChangeAction
, ScChangeActionMap
* pActionMap
,
188 SvTreeListEntry
* pParent
);
190 bool InsertChildren( ScChangeActionMap
* pActionMap
, SvTreeListEntry
* pParent
);
192 void AppendChanges(ScChangeTrack
* pChanges
,sal_uLong nStartAction
, sal_uLong nEndAction
,
193 sal_uLong nPos
=TREELIST_APPEND
);
195 void RemoveEntrys(sal_uLong nStartAction
,sal_uLong nEndAction
);
196 void UpdateEntrys(ScChangeTrack
* pChgTrack
, sal_uLong nStartAction
,sal_uLong nEndAction
);
201 bool Expand(ScChangeTrack
* pChanges
,const ScChangeAction
* pScChangeAction
,
202 SvTreeListEntry
* pEntry
, bool bFilter
= false);
205 ScAcceptChgDlg( SfxBindings
* pB
, SfxChildWindow
* pCW
, vcl::Window
* pParent
,
206 ScViewData
* ptrViewData
);
208 virtual ~ScAcceptChgDlg();
209 virtual void dispose() SAL_OVERRIDE
;
211 void ReInit(ScViewData
* ptrViewData
);
213 virtual bool PreNotify( NotifyEvent
& rNEvt
) SAL_OVERRIDE
;
215 void Initialize (SfxChildWinInfo
* pInfo
);
216 virtual void FillInfo(SfxChildWinInfo
&) const SAL_OVERRIDE
;
220 #endif // INCLUDED_SC_SOURCE_UI_INC_ACREDLIN_HXX
222 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */