xref: /aoo41x/main/sc/source/ui/inc/namedlg.hxx (revision dffa72de)
138d50f7bSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
338d50f7bSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
438d50f7bSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
538d50f7bSAndrew Rist  * distributed with this work for additional information
638d50f7bSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
738d50f7bSAndrew Rist  * to you under the Apache License, Version 2.0 (the
838d50f7bSAndrew Rist  * "License"); you may not use this file except in compliance
938d50f7bSAndrew Rist  * with the License.  You may obtain a copy of the License at
1038d50f7bSAndrew Rist  *
1138d50f7bSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
1238d50f7bSAndrew Rist  *
1338d50f7bSAndrew Rist  * Unless required by applicable law or agreed to in writing,
1438d50f7bSAndrew Rist  * software distributed under the License is distributed on an
1538d50f7bSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1638d50f7bSAndrew Rist  * KIND, either express or implied.  See the License for the
1738d50f7bSAndrew Rist  * specific language governing permissions and limitations
1838d50f7bSAndrew Rist  * under the License.
1938d50f7bSAndrew Rist  *
2038d50f7bSAndrew Rist  *************************************************************/
2138d50f7bSAndrew Rist 
2238d50f7bSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef SC_NAMEDLG_HXX
25cdf0e10cSrcweir #define SC_NAMEDLG_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 <vcl/fixed.hxx>
37*dffa72deSWang Lei #include <vcl/lstbox.hxx>
38*dffa72deSWang Lei #include <vcl/edit.hxx>
39cdf0e10cSrcweir #include "rangenam.hxx"
40cdf0e10cSrcweir #include "anyrefdg.hxx"
41cdf0e10cSrcweir 
42cdf0e10cSrcweir class ScViewData;
43cdf0e10cSrcweir class ScDocument;
44cdf0e10cSrcweir 
45cdf0e10cSrcweir 
46cdf0e10cSrcweir //==================================================================
47cdf0e10cSrcweir 
48cdf0e10cSrcweir class ScNameDlg : public ScAnyRefDlg
49cdf0e10cSrcweir {
50cdf0e10cSrcweir private:
51cdf0e10cSrcweir     FixedLine       aFlName;
52*dffa72deSWang Lei 	//ComboBox		aEdName;
53*dffa72deSWang Lei 	Edit                       aEdName;
54*dffa72deSWang Lei 	ListBox     aLBNames;
55cdf0e10cSrcweir 
56cdf0e10cSrcweir     FixedLine       aFlAssign;
57cdf0e10cSrcweir 	formula::RefEdit		aEdAssign;
58cdf0e10cSrcweir 	formula::RefButton		aRbAssign;
59cdf0e10cSrcweir 
60cdf0e10cSrcweir 	FixedLine		aFlType;
61cdf0e10cSrcweir 	CheckBox		aBtnPrintArea;
62cdf0e10cSrcweir 	CheckBox		aBtnColHeader;
63cdf0e10cSrcweir 	CheckBox		aBtnCriteria;
64cdf0e10cSrcweir 	CheckBox		aBtnRowHeader;
65cdf0e10cSrcweir 
66cdf0e10cSrcweir 	OKButton		aBtnOk;
67cdf0e10cSrcweir 	CancelButton	aBtnCancel;
68cdf0e10cSrcweir 	HelpButton		aBtnHelp;
69cdf0e10cSrcweir 	PushButton		aBtnAdd;
70cdf0e10cSrcweir 	PushButton		aBtnRemove;
71cdf0e10cSrcweir 	MoreButton		aBtnMore;
72cdf0e10cSrcweir 	sal_Bool			bSaved;
73cdf0e10cSrcweir 
74cdf0e10cSrcweir 	const String	aStrAdd;	// "Hinzufuegen"
75cdf0e10cSrcweir 	const String	aStrModify;	// "Aendern"
76cdf0e10cSrcweir 	const String	errMsgInvalidSym;
77cdf0e10cSrcweir 
78cdf0e10cSrcweir 	ScViewData*		pViewData;
79cdf0e10cSrcweir 	ScDocument*		pDoc;
80cdf0e10cSrcweir 	ScRangeName		aLocalRangeName;
81cdf0e10cSrcweir 	const ScAddress	theCursorPos;
82cdf0e10cSrcweir 	Selection		theCurSel;
83*dffa72deSWang Lei 	SCTAB           aSelectedRangeScope;
84cdf0e10cSrcweir 
85cdf0e10cSrcweir #ifdef _NAMEDLG_CXX
86cdf0e10cSrcweir private:
87cdf0e10cSrcweir 	void Init();
88cdf0e10cSrcweir 	void UpdateChecks();
89cdf0e10cSrcweir 	void UpdateNames();
90cdf0e10cSrcweir 	void CalcCurTableAssign( String& aAssign, sal_uInt16 nPos );
91cdf0e10cSrcweir 
92cdf0e10cSrcweir 	// Handler:
93cdf0e10cSrcweir 	DECL_LINK( OkBtnHdl, void * );
94cdf0e10cSrcweir 	DECL_LINK( CancelBtnHdl, void * );
95cdf0e10cSrcweir 	DECL_LINK( AddBtnHdl, void * );
96cdf0e10cSrcweir 	DECL_LINK( RemoveBtnHdl, void * );
97cdf0e10cSrcweir 	DECL_LINK( EdModifyHdl, Edit * );
98cdf0e10cSrcweir 	DECL_LINK( NameSelectHdl, void * );
99cdf0e10cSrcweir 	DECL_LINK( AssignGetFocusHdl, void * );
100cdf0e10cSrcweir #endif
101cdf0e10cSrcweir 
102cdf0e10cSrcweir protected:
103cdf0e10cSrcweir 
104cdf0e10cSrcweir 	virtual void	RefInputDone( sal_Bool bForced = sal_False );
105cdf0e10cSrcweir 
106cdf0e10cSrcweir 
107cdf0e10cSrcweir public:
108cdf0e10cSrcweir 					ScNameDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
109cdf0e10cSrcweir 							   ScViewData*		ptrViewData,
110cdf0e10cSrcweir 							   const ScAddress&	aCursorPos );
111cdf0e10cSrcweir 					~ScNameDlg();
112cdf0e10cSrcweir 
113cdf0e10cSrcweir 	virtual void	SetReference( const ScRange& rRef, ScDocument* pDoc );
114cdf0e10cSrcweir 	virtual sal_Bool	IsRefInputMode() const;
115cdf0e10cSrcweir 
116cdf0e10cSrcweir 	virtual void	SetActive();
117cdf0e10cSrcweir 	virtual sal_Bool	Close();
118cdf0e10cSrcweir 
119cdf0e10cSrcweir };
120cdf0e10cSrcweir 
121cdf0e10cSrcweir 
122cdf0e10cSrcweir 
123cdf0e10cSrcweir #endif // SC_NAMEDLG_HXX
124cdf0e10cSrcweir 
125