update dev300-m58
[ooovba.git] / sc / source / ui / inc / acredlin.hxx
blob6ea7b8f51cf352d0bfe91c2d9073b3b0a67e2fa6
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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>
36 #endif
37 #ifndef _COMBOBOX_HXX //autogen
38 #include <vcl/combobox.hxx>
39 #endif
40 #ifndef _GROUP_HXX //autogen
41 #include <vcl/group.hxx>
42 #endif
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>
53 #endif
54 #include <svx/simptabl.hxx>
56 #ifndef _SVARRAY_HXX
57 #define _SVARRAY_HXX
58 #include <svtools/svarray.hxx>
59 #endif
60 #include "chgtrack.hxx"
61 #include "chgviset.hxx"
62 #include <vcl/timer.hxx>
64 class ScViewData;
65 class ScDocument;
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
75 class ScViewEntryPtr
77 private:
78 String* pAction;
79 String* pPos;
80 String* pAuthor;
81 String* pDate;
82 String* pComment;
83 void* pData;
85 public:
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
113 public:
115 ScRedlinData();
116 ~ScRedlinData();
117 SCTAB nTable;
118 SCCOL nCol;
119 SCROW nRow;
120 ULONG nActionNo;
121 ULONG nInfo;
122 BOOL bIsRejectable;
123 BOOL bIsAcceptable;
126 typedef long LExpNum;
128 //@ Expand-Entrys nicht eindeutig, daher gestrichen
129 //DECLARE_TABLE( ScChgTrackExps, LExpNum)
130 //==================================================================
132 class ScAcceptChgDlg : public SfxModelessDialog
134 private:
136 Timer aSelectionTimer;
137 Timer aReOpenTimer;
138 SvxAcceptChgCtr aAcceptChgCtr;
139 ScViewData* pViewData;
140 ScDocument* pDoc;
141 ScRangeName aLocalRangeName;
142 Selection theCurSel;
143 SvxTPFilter* pTPFilter;
144 SvxTPView* pTPView;
145 SvxRedlinTable* pTheView; // PB 2006/02/02 #i48648 now SvHeaderTabListBox
146 Size MinSize;
147 ScRangeList aRangeList;
148 ScChangeViewSettings aChangeViewSet;
149 String aStrInsertCols;
150 String aStrInsertRows;
151 String aStrInsertTabs;
152 String aStrDeleteCols;
153 String aStrDeleteRows;
154 String aStrDeleteTabs;
155 String aStrMove;
156 String aStrContent;
157 String aStrReject;
158 String aUnknown;
159 String aStrAllAccepted;
160 String aStrAllRejected;
161 String aStrNoEntry;
162 String aStrContentWithChild;
163 String aStrChildContent;
164 String aStrChildOrgContent;
165 String aStrEmpty;
166 ULONG nAcceptCount;
167 ULONG nRejectCount;
168 BOOL bAcceptEnableFlag;
169 BOOL bRejectEnableFlag;
170 BOOL bNeedsUpdate;
171 BOOL bIgnoreMsg;
172 BOOL bNoSelection;
173 BOOL bHasFilterEntry;
174 BOOL bUseColor;
175 //ScChgTrackExps aExpandArray;
177 void Init();
178 void InitFilter();
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*);
201 protected:
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);
244 void UpdateView();
245 void ClearView();
247 BOOL Expand(ScChangeTrack* pChanges,const ScChangeAction* pScChangeAction,
248 SvLBoxEntry* pEntry, BOOL bFilter=FALSE);
250 public:
251 ScAcceptChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
252 ScViewData* ptrViewData);
254 ~ScAcceptChgDlg();
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