xref: /trunk/main/sc/source/ui/inc/dbnamdlg.hxx (revision 914d351e5f5b84e4342a86d6ab8d4aca7308b9bd)
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
10cdf0e10cSrcweir  *
1138d50f7bSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
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.
19cdf0e10cSrcweir  *
2038d50f7bSAndrew Rist  *************************************************************/
2138d50f7bSAndrew Rist 
2238d50f7bSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef SC_DBNAMDLG_HXX
25cdf0e10cSrcweir #define SC_DBNAMDLG_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #ifndef _COMBOBOX_HXX //autogen
28cdf0e10cSrcweir #include <vcl/combobox.hxx>
29cdf0e10cSrcweir #endif
30cdf0e10cSrcweir 
31cdf0e10cSrcweir #ifndef _FIXED_HXX //autogen
32cdf0e10cSrcweir #include <vcl/fixed.hxx>
33cdf0e10cSrcweir #endif
34cdf0e10cSrcweir 
35cdf0e10cSrcweir #ifndef _MOREBTN_HXX //autogen
36cdf0e10cSrcweir #include <vcl/morebtn.hxx>
37cdf0e10cSrcweir #endif
38cdf0e10cSrcweir #include "anyrefdg.hxx"
39cdf0e10cSrcweir #include "dbcolect.hxx"
40cdf0e10cSrcweir #include "expftext.hxx"
41cdf0e10cSrcweir 
42cdf0e10cSrcweir class ScViewData;
43cdf0e10cSrcweir class ScDocument;
44cdf0e10cSrcweir 
45cdf0e10cSrcweir 
46cdf0e10cSrcweir //============================================================================
47cdf0e10cSrcweir 
48cdf0e10cSrcweir class ScDbNameDlg : public ScAnyRefDlg
49cdf0e10cSrcweir {
50cdf0e10cSrcweir public:
51cdf0e10cSrcweir                     ScDbNameDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
52cdf0e10cSrcweir                                  ScViewData*    ptrViewData );
53cdf0e10cSrcweir                     ~ScDbNameDlg();
54cdf0e10cSrcweir 
55cdf0e10cSrcweir     virtual void    SetReference( const ScRange& rRef, ScDocument* pDoc );
56cdf0e10cSrcweir 
57cdf0e10cSrcweir     virtual sal_Bool    IsRefInputMode() const;
58cdf0e10cSrcweir     virtual void    SetActive();
59cdf0e10cSrcweir     virtual sal_Bool    Close();
60cdf0e10cSrcweir 
61cdf0e10cSrcweir private:
62cdf0e10cSrcweir     FixedLine           aFlName;
63cdf0e10cSrcweir     ComboBox            aEdName;
64cdf0e10cSrcweir 
65cdf0e10cSrcweir     FixedLine           aFlAssign;
66cdf0e10cSrcweir     formula::RefEdit            aEdAssign;
67cdf0e10cSrcweir     formula::RefButton          aRbAssign;
68cdf0e10cSrcweir 
69cdf0e10cSrcweir     FixedLine           aFlOptions;
70cdf0e10cSrcweir     CheckBox            aBtnHeader;
71cdf0e10cSrcweir     CheckBox            aBtnDoSize;
72cdf0e10cSrcweir     CheckBox            aBtnKeepFmt;
73cdf0e10cSrcweir     CheckBox            aBtnStripData;
74cdf0e10cSrcweir     ScExpandedFixedText aFTSource;     //@18.09.97 erweiterter FixedText
75cdf0e10cSrcweir     FixedText           aFTOperations;
76cdf0e10cSrcweir 
77cdf0e10cSrcweir     OKButton        aBtnOk;
78cdf0e10cSrcweir     CancelButton    aBtnCancel;
79cdf0e10cSrcweir     HelpButton      aBtnHelp;
80cdf0e10cSrcweir     PushButton      aBtnAdd;
81cdf0e10cSrcweir     PushButton      aBtnRemove;
82cdf0e10cSrcweir     MoreButton      aBtnMore;
83cdf0e10cSrcweir 
84cdf0e10cSrcweir     sal_Bool            bSaved;
85cdf0e10cSrcweir 
86cdf0e10cSrcweir 
87cdf0e10cSrcweir     const String    aStrAdd;    // "Hinzufuegen"
88cdf0e10cSrcweir     const String    aStrModify; // "Aendern"
89cdf0e10cSrcweir     const String    aStrNoName; // "unbenannt"
90cdf0e10cSrcweir     const String    aStrInvalid;
91cdf0e10cSrcweir 
92cdf0e10cSrcweir     String          aStrSource;
93cdf0e10cSrcweir     String          aStrOperations;
94cdf0e10cSrcweir 
95cdf0e10cSrcweir     ScViewData*     pViewData;
96cdf0e10cSrcweir     ScDocument*     pDoc;
97cdf0e10cSrcweir     sal_Bool            bRefInputMode;
98cdf0e10cSrcweir     ScAddress::Details aAddrDetails;
99cdf0e10cSrcweir 
100cdf0e10cSrcweir     ScDBCollection  aLocalDbCol;
101cdf0e10cSrcweir     ScRange         theCurArea;
102cdf0e10cSrcweir     List            aRemoveList;
103*0deba7fbSSteve Yin     Timer       SynFocusTimer;
104*0deba7fbSSteve Yin     DECL_LINK( FocusToComoboxHdl, Timer* );
105cdf0e10cSrcweir 
106cdf0e10cSrcweir #ifdef _DBNAMDLG_CXX
107cdf0e10cSrcweir private:
108cdf0e10cSrcweir     void            Init();
109cdf0e10cSrcweir     void            UpdateNames();
110cdf0e10cSrcweir     void            UpdateDBData( const String& rStrName );
111cdf0e10cSrcweir     void            SetInfoStrings( const ScDBData* pDBData );
112cdf0e10cSrcweir 
113cdf0e10cSrcweir     DECL_LINK( CancelBtnHdl, void * );
114cdf0e10cSrcweir     DECL_LINK( OkBtnHdl, void * );
115cdf0e10cSrcweir     DECL_LINK( AddBtnHdl, void * );
116cdf0e10cSrcweir     DECL_LINK( RemoveBtnHdl, void * );
117cdf0e10cSrcweir     DECL_LINK( NameModifyHdl, void * );
118cdf0e10cSrcweir     DECL_LINK( AssModifyHdl, void * );
119cdf0e10cSrcweir #endif
120cdf0e10cSrcweir };
121cdf0e10cSrcweir 
122cdf0e10cSrcweir 
123cdf0e10cSrcweir 
124cdf0e10cSrcweir #endif // SC_DBNAMDLG_HXX
125