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