1*38d50f7bSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*38d50f7bSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*38d50f7bSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*38d50f7bSAndrew Rist * distributed with this work for additional information 6*38d50f7bSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*38d50f7bSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*38d50f7bSAndrew Rist * "License"); you may not use this file except in compliance 9*38d50f7bSAndrew Rist * with the License. You may obtain a copy of the License at 10*38d50f7bSAndrew Rist * 11*38d50f7bSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*38d50f7bSAndrew Rist * 13*38d50f7bSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*38d50f7bSAndrew Rist * software distributed under the License is distributed on an 15*38d50f7bSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*38d50f7bSAndrew Rist * KIND, either express or implied. See the License for the 17*38d50f7bSAndrew Rist * specific language governing permissions and limitations 18*38d50f7bSAndrew Rist * under the License. 19*38d50f7bSAndrew Rist * 20*38d50f7bSAndrew Rist *************************************************************/ 21*38d50f7bSAndrew Rist 22*38d50f7bSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef SC_ACREDLIN_HXX 25cdf0e10cSrcweir #define SC_ACREDLIN_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #ifndef _MOREBTN_HXX //autogen 28cdf0e10cSrcweir #include <vcl/morebtn.hxx> 29cdf0e10cSrcweir #endif 30cdf0e10cSrcweir #ifndef _COMBOBOX_HXX //autogen 31cdf0e10cSrcweir #include <vcl/combobox.hxx> 32cdf0e10cSrcweir #endif 33cdf0e10cSrcweir #ifndef _GROUP_HXX //autogen 34cdf0e10cSrcweir #include <vcl/group.hxx> 35cdf0e10cSrcweir #endif 36cdf0e10cSrcweir #include <svtools/headbar.hxx> 37cdf0e10cSrcweir #include <svtools/svtabbx.hxx> 38cdf0e10cSrcweir 39cdf0e10cSrcweir 40cdf0e10cSrcweir #include "rangenam.hxx" 41cdf0e10cSrcweir #include "anyrefdg.hxx" 42cdf0e10cSrcweir #include <vcl/lstbox.hxx> 43cdf0e10cSrcweir 44cdf0e10cSrcweir #ifndef _SVX_ACREDLIN_HXX 45cdf0e10cSrcweir #include <svx/ctredlin.hxx> 46cdf0e10cSrcweir #endif 47cdf0e10cSrcweir #include <svx/simptabl.hxx> 48cdf0e10cSrcweir 49cdf0e10cSrcweir #ifndef _SVARRAY_HXX 50cdf0e10cSrcweir #define _SVARRAY_HXX 51cdf0e10cSrcweir #include <svl/svarray.hxx> 52cdf0e10cSrcweir #endif 53cdf0e10cSrcweir #include "chgtrack.hxx" 54cdf0e10cSrcweir #include "chgviset.hxx" 55cdf0e10cSrcweir #include <vcl/timer.hxx> 56cdf0e10cSrcweir 57cdf0e10cSrcweir class ScViewData; 58cdf0e10cSrcweir class ScDocument; 59cdf0e10cSrcweir 60cdf0e10cSrcweir #define FLT_DATE_BEFORE 0 61cdf0e10cSrcweir #define FLT_DATE_SINCE 1 62cdf0e10cSrcweir #define FLT_DATE_EQUAL 2 63cdf0e10cSrcweir #define FLT_DATE_NOTEQUAL 3 64cdf0e10cSrcweir #define FLT_DATE_BETWEEN 4 65cdf0e10cSrcweir #define FLT_DATE_SAVE 5 66cdf0e10cSrcweir 67cdf0e10cSrcweir 68cdf0e10cSrcweir class ScViewEntryPtr 69cdf0e10cSrcweir { 70cdf0e10cSrcweir private: 71cdf0e10cSrcweir String* pAction; 72cdf0e10cSrcweir String* pPos; 73cdf0e10cSrcweir String* pAuthor; 74cdf0e10cSrcweir String* pDate; 75cdf0e10cSrcweir String* pComment; 76cdf0e10cSrcweir void* pData; 77cdf0e10cSrcweir 78cdf0e10cSrcweir public: 79cdf0e10cSrcweir GetpAction()80cdf0e10cSrcweir String* GetpAction() {return pAction; } GetpPos()81cdf0e10cSrcweir String* GetpPos() {return pPos; } GetpAuthor()82cdf0e10cSrcweir String* GetpAuthor() {return pAuthor; } GetpDate()83cdf0e10cSrcweir String* GetpDate() {return pDate; } GetpComment()84cdf0e10cSrcweir String* GetpComment() {return pComment;} GetpData()85cdf0e10cSrcweir void* GetpData() {return pData; } 86cdf0e10cSrcweir SetpAction(String * pString)87cdf0e10cSrcweir void SetpAction (String* pString) {pAction= pString;} SetpPos(String * pString)88cdf0e10cSrcweir void SetpPos (String* pString) {pPos = pString;} SetpAuthor(String * pString)89cdf0e10cSrcweir void SetpAuthor (String* pString) {pAuthor= pString;} SetpDate(String * pString)90cdf0e10cSrcweir void SetpDate (String* pString) {pDate = pString;} SetpComment(String * pString)91cdf0e10cSrcweir void SetpComment(String* pString) {pComment=pString;} SetpData(void * pdata)92cdf0e10cSrcweir void SetpData (void* pdata) {pData =pdata;} 93cdf0e10cSrcweir }; 94cdf0e10cSrcweir 95cdf0e10cSrcweir class ScViewEntryPtrList 96cdf0e10cSrcweir { 97cdf0e10cSrcweir ScViewEntryPtrList* pNext; 98cdf0e10cSrcweir ScViewEntryPtrList* pLast; 99cdf0e10cSrcweir 100cdf0e10cSrcweir ScViewEntryPtr* pData; 101cdf0e10cSrcweir }; 102cdf0e10cSrcweir 103cdf0e10cSrcweir 104cdf0e10cSrcweir class ScRedlinData : public RedlinData 105cdf0e10cSrcweir { 106cdf0e10cSrcweir public: 107cdf0e10cSrcweir 108cdf0e10cSrcweir ScRedlinData(); 109cdf0e10cSrcweir ~ScRedlinData(); 110cdf0e10cSrcweir SCTAB nTable; 111cdf0e10cSrcweir SCCOL nCol; 112cdf0e10cSrcweir SCROW nRow; 113cdf0e10cSrcweir sal_uLong nActionNo; 114cdf0e10cSrcweir sal_uLong nInfo; 115cdf0e10cSrcweir sal_Bool bIsRejectable; 116cdf0e10cSrcweir sal_Bool bIsAcceptable; 117cdf0e10cSrcweir }; 118cdf0e10cSrcweir 119cdf0e10cSrcweir typedef long LExpNum; 120cdf0e10cSrcweir 121cdf0e10cSrcweir //@ Expand-Entrys nicht eindeutig, daher gestrichen 122cdf0e10cSrcweir //DECLARE_TABLE( ScChgTrackExps, LExpNum) 123cdf0e10cSrcweir //================================================================== 124cdf0e10cSrcweir 125cdf0e10cSrcweir class ScAcceptChgDlg : public SfxModelessDialog 126cdf0e10cSrcweir { 127cdf0e10cSrcweir private: 128cdf0e10cSrcweir 129cdf0e10cSrcweir Timer aSelectionTimer; 130cdf0e10cSrcweir Timer aReOpenTimer; 131cdf0e10cSrcweir SvxAcceptChgCtr aAcceptChgCtr; 132cdf0e10cSrcweir ScViewData* pViewData; 133cdf0e10cSrcweir ScDocument* pDoc; 134cdf0e10cSrcweir ScRangeName aLocalRangeName; 135cdf0e10cSrcweir Selection theCurSel; 136cdf0e10cSrcweir SvxTPFilter* pTPFilter; 137cdf0e10cSrcweir SvxTPView* pTPView; 138cdf0e10cSrcweir SvxRedlinTable* pTheView; // PB 2006/02/02 #i48648 now SvHeaderTabListBox 139cdf0e10cSrcweir Size MinSize; 140cdf0e10cSrcweir ScRangeList aRangeList; 141cdf0e10cSrcweir ScChangeViewSettings aChangeViewSet; 142cdf0e10cSrcweir String aStrInsertCols; 143cdf0e10cSrcweir String aStrInsertRows; 144cdf0e10cSrcweir String aStrInsertTabs; 145cdf0e10cSrcweir String aStrDeleteCols; 146cdf0e10cSrcweir String aStrDeleteRows; 147cdf0e10cSrcweir String aStrDeleteTabs; 148cdf0e10cSrcweir String aStrMove; 149cdf0e10cSrcweir String aStrContent; 150cdf0e10cSrcweir String aStrReject; 151cdf0e10cSrcweir String aUnknown; 152cdf0e10cSrcweir String aStrAllAccepted; 153cdf0e10cSrcweir String aStrAllRejected; 154cdf0e10cSrcweir String aStrNoEntry; 155cdf0e10cSrcweir String aStrContentWithChild; 156cdf0e10cSrcweir String aStrChildContent; 157cdf0e10cSrcweir String aStrChildOrgContent; 158cdf0e10cSrcweir String aStrEmpty; 159cdf0e10cSrcweir sal_uLong nAcceptCount; 160cdf0e10cSrcweir sal_uLong nRejectCount; 161cdf0e10cSrcweir sal_Bool bAcceptEnableFlag; 162cdf0e10cSrcweir sal_Bool bRejectEnableFlag; 163cdf0e10cSrcweir sal_Bool bNeedsUpdate; 164cdf0e10cSrcweir sal_Bool bIgnoreMsg; 165cdf0e10cSrcweir sal_Bool bNoSelection; 166cdf0e10cSrcweir sal_Bool bHasFilterEntry; 167cdf0e10cSrcweir sal_Bool bUseColor; 168cdf0e10cSrcweir //ScChgTrackExps aExpandArray; 169cdf0e10cSrcweir 170cdf0e10cSrcweir void Init(); 171cdf0e10cSrcweir void InitFilter(); 172cdf0e10cSrcweir //UNUSED2008-05 void SetMyStaticData(); 173cdf0e10cSrcweir 174cdf0e10cSrcweir DECL_LINK( FilterHandle, SvxTPFilter* ); 175cdf0e10cSrcweir DECL_LINK( RefHandle, SvxTPFilter* ); 176cdf0e10cSrcweir DECL_LINK( FilterModified, SvxTPFilter* ); 177cdf0e10cSrcweir DECL_LINK( MinSizeHandle, SvxAcceptChgCtr*); 178cdf0e10cSrcweir DECL_LINK( RejectHandle, SvxTPView*); 179cdf0e10cSrcweir DECL_LINK( AcceptHandle, SvxTPView*); 180cdf0e10cSrcweir DECL_LINK( RejectAllHandle, SvxTPView*); 181cdf0e10cSrcweir DECL_LINK( AcceptAllHandle, SvxTPView*); 182cdf0e10cSrcweir DECL_LINK( ExpandingHandle, SvxRedlinTable*); 183cdf0e10cSrcweir DECL_LINK( SelectHandle, SvxRedlinTable*); 184cdf0e10cSrcweir DECL_LINK( RefInfoHandle, String*); 185cdf0e10cSrcweir 186cdf0e10cSrcweir DECL_LINK( UpdateSelectionHdl, Timer*); 187cdf0e10cSrcweir DECL_LINK( ChgTrackModHdl, ScChangeTrack*); 188cdf0e10cSrcweir DECL_LINK( CommandHdl, Control*); 189cdf0e10cSrcweir DECL_LINK( ReOpenTimerHdl, Timer*); 190cdf0e10cSrcweir DECL_LINK( ColCompareHdl, SvSortData*); 191cdf0e10cSrcweir 192cdf0e10cSrcweir 193cdf0e10cSrcweir 194cdf0e10cSrcweir protected: 195cdf0e10cSrcweir 196cdf0e10cSrcweir virtual void Resize(); 197cdf0e10cSrcweir virtual sal_Bool Close(); 198cdf0e10cSrcweir 199cdf0e10cSrcweir void RejectFiltered(); 200cdf0e10cSrcweir void AcceptFiltered(); 201cdf0e10cSrcweir 202cdf0e10cSrcweir sal_Bool IsValidAction(const ScChangeAction* pScChangeAction); 203cdf0e10cSrcweir 204cdf0e10cSrcweir String* MakeTypeString(ScChangeActionType eType); 205cdf0e10cSrcweir 206cdf0e10cSrcweir SvLBoxEntry* InsertChangeAction(const ScChangeAction* pScChangeAction,ScChangeActionState eState, 207cdf0e10cSrcweir SvLBoxEntry* pParent=NULL,sal_Bool bDelMaster=sal_False, 208cdf0e10cSrcweir sal_Bool bDisabled=sal_False,sal_uLong nPos=LIST_APPEND); 209cdf0e10cSrcweir 210cdf0e10cSrcweir SvLBoxEntry* InsertFilteredAction(const ScChangeAction* pScChangeAction,ScChangeActionState eState, 211cdf0e10cSrcweir SvLBoxEntry* pParent=NULL,sal_Bool bDelMaster=sal_False, 212cdf0e10cSrcweir sal_Bool bDisabled=sal_False,sal_uLong nPos=LIST_APPEND); 213cdf0e10cSrcweir 214cdf0e10cSrcweir 215cdf0e10cSrcweir SvLBoxEntry* InsertChangeActionContent(const ScChangeActionContent* pScChangeAction, 216cdf0e10cSrcweir SvLBoxEntry* pParent,sal_uLong nSpecial); 217cdf0e10cSrcweir 218cdf0e10cSrcweir void GetDependents( const ScChangeAction* pScChangeAction, 219cdf0e10cSrcweir ScChangeActionTable& aActionTable, 220cdf0e10cSrcweir SvLBoxEntry* pEntry); 221cdf0e10cSrcweir 222cdf0e10cSrcweir sal_Bool InsertContentChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* pParent); 223cdf0e10cSrcweir 224cdf0e10cSrcweir sal_Bool InsertAcceptedORejected(SvLBoxEntry* pParent); 225cdf0e10cSrcweir 226cdf0e10cSrcweir sal_Bool InsertDeletedChilds(const ScChangeAction *pChangeAction, ScChangeActionTable* pActionTable, 227cdf0e10cSrcweir SvLBoxEntry* pParent); 228cdf0e10cSrcweir 229cdf0e10cSrcweir sal_Bool InsertChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* pParent); 230cdf0e10cSrcweir 231cdf0e10cSrcweir void AppendChanges(ScChangeTrack* pChanges,sal_uLong nStartAction, sal_uLong nEndAction, 232cdf0e10cSrcweir sal_uLong nPos=LIST_APPEND); 233cdf0e10cSrcweir 234cdf0e10cSrcweir void RemoveEntrys(sal_uLong nStartAction,sal_uLong nEndAction); 235cdf0e10cSrcweir void UpdateEntrys(ScChangeTrack* pChgTrack, sal_uLong nStartAction,sal_uLong nEndAction); 236cdf0e10cSrcweir 237cdf0e10cSrcweir void UpdateView(); 238cdf0e10cSrcweir void ClearView(); 239cdf0e10cSrcweir 240cdf0e10cSrcweir sal_Bool Expand(ScChangeTrack* pChanges,const ScChangeAction* pScChangeAction, 241cdf0e10cSrcweir SvLBoxEntry* pEntry, sal_Bool bFilter=sal_False); 242cdf0e10cSrcweir 243cdf0e10cSrcweir public: 244cdf0e10cSrcweir ScAcceptChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, 245cdf0e10cSrcweir ScViewData* ptrViewData); 246cdf0e10cSrcweir 247cdf0e10cSrcweir ~ScAcceptChgDlg(); 248cdf0e10cSrcweir 249cdf0e10cSrcweir void ReInit(ScViewData* ptrViewData); 250cdf0e10cSrcweir 251cdf0e10cSrcweir virtual long PreNotify( NotifyEvent& rNEvt ); 252cdf0e10cSrcweir 253cdf0e10cSrcweir void Initialize (SfxChildWinInfo* pInfo); 254cdf0e10cSrcweir virtual void FillInfo(SfxChildWinInfo&) const; 255cdf0e10cSrcweir 256cdf0e10cSrcweir }; 257cdf0e10cSrcweir 258cdf0e10cSrcweir 259cdf0e10cSrcweir #endif // SC_NAMEDLG_HXX 260cdf0e10cSrcweir 261