xref: /aoo4110/main/sc/source/ui/inc/dbnamdlg.hxx (revision b1cdbd2c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef SC_DBNAMDLG_HXX
25 #define SC_DBNAMDLG_HXX
26 
27 #ifndef _COMBOBOX_HXX //autogen
28 #include <vcl/combobox.hxx>
29 #endif
30 
31 #ifndef _FIXED_HXX //autogen
32 #include <vcl/fixed.hxx>
33 #endif
34 
35 #ifndef _MOREBTN_HXX //autogen
36 #include <vcl/morebtn.hxx>
37 #endif
38 #include "anyrefdg.hxx"
39 #include "dbcolect.hxx"
40 #include "expftext.hxx"
41 
42 class ScViewData;
43 class ScDocument;
44 
45 
46 //============================================================================
47 
48 class ScDbNameDlg : public ScAnyRefDlg
49 {
50 public:
51 					ScDbNameDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
52 								 ScViewData*	ptrViewData );
53 					~ScDbNameDlg();
54 
55 	virtual void	SetReference( const ScRange& rRef, ScDocument* pDoc );
56 
57 	virtual sal_Bool	IsRefInputMode() const;
58 	virtual void	SetActive();
59 	virtual sal_Bool	Close();
60 
61 private:
62     FixedLine           aFlName;
63 	ComboBox			aEdName;
64 
65     FixedLine           aFlAssign;
66 	formula::RefEdit			aEdAssign;
67 	formula::RefButton			aRbAssign;
68 
69     FixedLine           aFlOptions;
70 	CheckBox			aBtnHeader;
71 	CheckBox			aBtnDoSize;
72 	CheckBox			aBtnKeepFmt;
73 	CheckBox			aBtnStripData;
74 	ScExpandedFixedText	aFTSource;	   //@18.09.97 erweiterter FixedText
75 	FixedText			aFTOperations;
76 
77 	OKButton		aBtnOk;
78 	CancelButton	aBtnCancel;
79 	HelpButton		aBtnHelp;
80 	PushButton		aBtnAdd;
81 	PushButton		aBtnRemove;
82 	MoreButton		aBtnMore;
83 
84 	sal_Bool			bSaved;
85 
86 
87 	const String	aStrAdd;	// "Hinzufuegen"
88 	const String	aStrModify;	// "Aendern"
89 	const String	aStrNoName; // "unbenannt"
90 	const String	aStrInvalid;
91 
92 	String			aStrSource;
93 	String			aStrOperations;
94 
95 	ScViewData*		pViewData;
96 	ScDocument*		pDoc;
97 	sal_Bool			bRefInputMode;
98     ScAddress::Details aAddrDetails;
99 
100 	ScDBCollection	aLocalDbCol;
101 	ScRange			theCurArea;
102 	List			aRemoveList;
103 	Timer		SynFocusTimer;
104 	DECL_LINK( FocusToComoboxHdl, Timer* );
105 
106 #ifdef _DBNAMDLG_CXX
107 private:
108 	void			Init();
109 	void			UpdateNames();
110 	void			UpdateDBData( const String& rStrName );
111 	void			SetInfoStrings( const ScDBData* pDBData );
112 
113 	DECL_LINK( CancelBtnHdl, void * );
114 	DECL_LINK( OkBtnHdl, void * );
115 	DECL_LINK( AddBtnHdl, void * );
116 	DECL_LINK( RemoveBtnHdl, void * );
117 	DECL_LINK( NameModifyHdl, void * );
118 	DECL_LINK( AssModifyHdl, void * );
119 #endif
120 };
121 
122 
123 
124 #endif // SC_DBNAMDLG_HXX
125 
126