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