1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: acredlin.hxx,v $
10 * $Revision: 1.8.32.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SC_ACREDLIN_HXX
32 #define SC_ACREDLIN_HXX
34 #ifndef _MOREBTN_HXX //autogen
35 #include <vcl/morebtn.hxx>
37 #ifndef _COMBOBOX_HXX //autogen
38 #include <vcl/combobox.hxx>
40 #ifndef _GROUP_HXX //autogen
41 #include <vcl/group.hxx>
43 #include <svtools/headbar.hxx>
44 #include <svtools/svtabbx.hxx>
47 #include "rangenam.hxx"
48 #include "anyrefdg.hxx"
49 #include <vcl/lstbox.hxx>
51 #ifndef _SVX_ACREDLIN_HXX
52 #include <svx/ctredlin.hxx>
54 #include <svx/simptabl.hxx>
58 #include <svtools/svarray.hxx>
60 #include "chgtrack.hxx"
61 #include "chgviset.hxx"
62 #include <vcl/timer.hxx>
67 #define FLT_DATE_BEFORE 0
68 #define FLT_DATE_SINCE 1
69 #define FLT_DATE_EQUAL 2
70 #define FLT_DATE_NOTEQUAL 3
71 #define FLT_DATE_BETWEEN 4
72 #define FLT_DATE_SAVE 5
87 String
* GetpAction() {return pAction
; }
88 String
* GetpPos() {return pPos
; }
89 String
* GetpAuthor() {return pAuthor
; }
90 String
* GetpDate() {return pDate
; }
91 String
* GetpComment() {return pComment
;}
92 void* GetpData() {return pData
; }
94 void SetpAction (String
* pString
) {pAction
= pString
;}
95 void SetpPos (String
* pString
) {pPos
= pString
;}
96 void SetpAuthor (String
* pString
) {pAuthor
= pString
;}
97 void SetpDate (String
* pString
) {pDate
= pString
;}
98 void SetpComment(String
* pString
) {pComment
=pString
;}
99 void SetpData (void* pdata
) {pData
=pdata
;}
102 class ScViewEntryPtrList
104 ScViewEntryPtrList
* pNext
;
105 ScViewEntryPtrList
* pLast
;
107 ScViewEntryPtr
* pData
;
111 class ScRedlinData
: public RedlinData
126 typedef long LExpNum
;
128 //@ Expand-Entrys nicht eindeutig, daher gestrichen
129 //DECLARE_TABLE( ScChgTrackExps, LExpNum)
130 //==================================================================
132 class ScAcceptChgDlg
: public SfxModelessDialog
136 Timer aSelectionTimer
;
138 SvxAcceptChgCtr aAcceptChgCtr
;
139 ScViewData
* pViewData
;
141 ScRangeName aLocalRangeName
;
143 SvxTPFilter
* pTPFilter
;
145 SvxRedlinTable
* pTheView
; // PB 2006/02/02 #i48648 now SvHeaderTabListBox
147 ScRangeList aRangeList
;
148 ScChangeViewSettings aChangeViewSet
;
149 String aStrInsertCols
;
150 String aStrInsertRows
;
151 String aStrInsertTabs
;
152 String aStrDeleteCols
;
153 String aStrDeleteRows
;
154 String aStrDeleteTabs
;
159 String aStrAllAccepted
;
160 String aStrAllRejected
;
162 String aStrContentWithChild
;
163 String aStrChildContent
;
164 String aStrChildOrgContent
;
168 BOOL bAcceptEnableFlag
;
169 BOOL bRejectEnableFlag
;
173 BOOL bHasFilterEntry
;
175 //ScChgTrackExps aExpandArray;
179 //UNUSED2008-05 void SetMyStaticData();
181 DECL_LINK( FilterHandle
, SvxTPFilter
* );
182 DECL_LINK( RefHandle
, SvxTPFilter
* );
183 DECL_LINK( FilterModified
, SvxTPFilter
* );
184 DECL_LINK( MinSizeHandle
, SvxAcceptChgCtr
*);
185 DECL_LINK( RejectHandle
, SvxTPView
*);
186 DECL_LINK( AcceptHandle
, SvxTPView
*);
187 DECL_LINK( RejectAllHandle
, SvxTPView
*);
188 DECL_LINK( AcceptAllHandle
, SvxTPView
*);
189 DECL_LINK( ExpandingHandle
, SvxRedlinTable
*);
190 DECL_LINK( SelectHandle
, SvxRedlinTable
*);
191 DECL_LINK( RefInfoHandle
, String
*);
193 DECL_LINK( UpdateSelectionHdl
, Timer
*);
194 DECL_LINK( ChgTrackModHdl
, ScChangeTrack
*);
195 DECL_LINK( CommandHdl
, Control
*);
196 DECL_LINK( ReOpenTimerHdl
, Timer
*);
197 DECL_LINK( ColCompareHdl
, SvSortData
*);
203 virtual void Resize();
204 virtual BOOL
Close();
206 void RejectFiltered();
207 void AcceptFiltered();
209 BOOL
IsValidAction(const ScChangeAction
* pScChangeAction
);
211 String
* MakeTypeString(ScChangeActionType eType
);
213 SvLBoxEntry
* InsertChangeAction(const ScChangeAction
* pScChangeAction
,ScChangeActionState eState
,
214 SvLBoxEntry
* pParent
=NULL
,BOOL bDelMaster
=FALSE
,
215 BOOL bDisabled
=FALSE
,ULONG nPos
=LIST_APPEND
);
217 SvLBoxEntry
* InsertFilteredAction(const ScChangeAction
* pScChangeAction
,ScChangeActionState eState
,
218 SvLBoxEntry
* pParent
=NULL
,BOOL bDelMaster
=FALSE
,
219 BOOL bDisabled
=FALSE
,ULONG nPos
=LIST_APPEND
);
222 SvLBoxEntry
* InsertChangeActionContent(const ScChangeActionContent
* pScChangeAction
,
223 SvLBoxEntry
* pParent
,ULONG nSpecial
);
225 void GetDependents( const ScChangeAction
* pScChangeAction
,
226 ScChangeActionTable
& aActionTable
,
227 SvLBoxEntry
* pEntry
);
229 BOOL
InsertContentChilds(ScChangeActionTable
* pActionTable
,SvLBoxEntry
* pParent
);
231 BOOL
InsertAcceptedORejected(SvLBoxEntry
* pParent
);
233 BOOL
InsertDeletedChilds(const ScChangeAction
*pChangeAction
, ScChangeActionTable
* pActionTable
,
234 SvLBoxEntry
* pParent
);
236 BOOL
InsertChilds(ScChangeActionTable
* pActionTable
,SvLBoxEntry
* pParent
);
238 void AppendChanges(ScChangeTrack
* pChanges
,ULONG nStartAction
, ULONG nEndAction
,
239 ULONG nPos
=LIST_APPEND
);
241 void RemoveEntrys(ULONG nStartAction
,ULONG nEndAction
);
242 void UpdateEntrys(ScChangeTrack
* pChgTrack
, ULONG nStartAction
,ULONG nEndAction
);
247 BOOL
Expand(ScChangeTrack
* pChanges
,const ScChangeAction
* pScChangeAction
,
248 SvLBoxEntry
* pEntry
, BOOL bFilter
=FALSE
);
251 ScAcceptChgDlg( SfxBindings
* pB
, SfxChildWindow
* pCW
, Window
* pParent
,
252 ScViewData
* ptrViewData
);
256 void ReInit(ScViewData
* ptrViewData
);
258 virtual long PreNotify( NotifyEvent
& rNEvt
);
260 void Initialize (SfxChildWinInfo
* pInfo
);
261 virtual void FillInfo(SfxChildWinInfo
&) const;
266 #endif // SC_NAMEDLG_HXX