update dev300-m58
[ooovba.git] / sc / source / ui / inc / tpusrlst.hxx
blob2ee23241cf3ff06cb1106d9b1117e87d660ad9c1
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: tpusrlst.hxx,v $
10 * $Revision: 1.6 $
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_TPUSRLST_HXX
32 #define SC_TPUSRLST_HXX
34 #include <sfx2/tabdlg.hxx>
35 #include <vcl/fixed.hxx>
36 #include <vcl/lstbox.hxx>
37 #include <svtools/svmedit.hxx>
39 //========================================================================
40 // Benutzerdefinierte Listen:
42 class ScUserList;
43 class ScDocument;
44 class ScViewData;
45 class ScRangeUtil;
47 class ScTpUserLists : public SfxTabPage
49 public:
50 static SfxTabPage* Create ( Window* pParent,
51 const SfxItemSet& rAttrSet );
52 static USHORT* GetRanges ();
53 virtual BOOL FillItemSet ( SfxItemSet& rCoreAttrs );
54 virtual void Reset ( const SfxItemSet& rCoreAttrs );
55 using SfxTabPage::DeactivatePage;
56 virtual int DeactivatePage ( SfxItemSet* pSet = NULL );
58 private:
59 ScTpUserLists( Window* pParent,
60 const SfxItemSet& rArgSet );
61 ~ScTpUserLists();
63 private:
64 FixedText aFtLists;
65 ListBox aLbLists;
66 FixedText aFtEntries;
67 MultiLineEdit aEdEntries;
68 FixedText aFtCopyFrom;
69 Edit aEdCopyFrom;
70 PushButton aBtnNew;
71 PushButton aBtnAdd;
72 PushButton aBtnRemove;
73 PushButton aBtnCopy;
75 const String aStrQueryRemove;
76 const String aStrNew;
77 const String aStrCancel;
78 const String aStrAdd;
79 const String aStrModify;
80 const String aStrCopyList;
81 const String aStrCopyFrom;
82 const String aStrCopyErr;
84 const USHORT nWhichUserLists;
85 ScUserList* pUserLists;
87 ScDocument* pDoc;
88 ScViewData* pViewData;
89 ScRangeUtil* pRangeUtil;
90 String aStrSelectedArea;
92 BOOL bModifyMode;
93 BOOL bCancelMode;
94 BOOL bCopyDone;
95 USHORT nCancelPos;
97 #ifdef _TPUSRLST_CXX
98 private:
99 void Init ();
100 USHORT UpdateUserListBox ();
101 void UpdateEntries ( USHORT nList );
102 void MakeListStr ( String& rListStr );
103 void AddNewList ( const String& rEntriesStr );
104 void RemoveList ( USHORT nList );
105 void ModifyList ( USHORT nSelList,
106 const String& rEntriesStr );
107 void CopyListFromArea ( const ScRefAddress& rStartPos,
108 const ScRefAddress& rEndPos );
110 // Handler:
111 DECL_LINK( LbSelectHdl, ListBox* );
112 DECL_LINK( BtnClickHdl, PushButton* );
113 DECL_LINK( EdEntriesModHdl, MultiLineEdit* );
114 #endif
119 #endif // SC_TPUSRLST_HXX