xref: /trunk/main/sc/source/ui/inc/dbnamdlg.hxx (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef SC_DBNAMDLG_HXX
29 #define SC_DBNAMDLG_HXX
30 
31 #ifndef _COMBOBOX_HXX //autogen
32 #include <vcl/combobox.hxx>
33 #endif
34 
35 #ifndef _FIXED_HXX //autogen
36 #include <vcl/fixed.hxx>
37 #endif
38 
39 #ifndef _MOREBTN_HXX //autogen
40 #include <vcl/morebtn.hxx>
41 #endif
42 #include "anyrefdg.hxx"
43 #include "dbcolect.hxx"
44 #include "expftext.hxx"
45 
46 class ScViewData;
47 class ScDocument;
48 
49 
50 //============================================================================
51 
52 class ScDbNameDlg : public ScAnyRefDlg
53 {
54 public:
55                     ScDbNameDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
56                                  ScViewData*    ptrViewData );
57                     ~ScDbNameDlg();
58 
59     virtual void    SetReference( const ScRange& rRef, ScDocument* pDoc );
60 
61     virtual sal_Bool    IsRefInputMode() const;
62     virtual void    SetActive();
63     virtual sal_Bool    Close();
64 
65 private:
66     FixedLine           aFlName;
67     ComboBox            aEdName;
68 
69     FixedLine           aFlAssign;
70     formula::RefEdit            aEdAssign;
71     formula::RefButton          aRbAssign;
72 
73     FixedLine           aFlOptions;
74     CheckBox            aBtnHeader;
75     CheckBox            aBtnDoSize;
76     CheckBox            aBtnKeepFmt;
77     CheckBox            aBtnStripData;
78     ScExpandedFixedText aFTSource;     //@18.09.97 erweiterter FixedText
79     FixedText           aFTOperations;
80 
81     OKButton        aBtnOk;
82     CancelButton    aBtnCancel;
83     HelpButton      aBtnHelp;
84     PushButton      aBtnAdd;
85     PushButton      aBtnRemove;
86     MoreButton      aBtnMore;
87 
88     sal_Bool            bSaved;
89 
90 
91     const String    aStrAdd;    // "Hinzufuegen"
92     const String    aStrModify; // "Aendern"
93     const String    aStrNoName; // "unbenannt"
94     const String    aStrInvalid;
95 
96     String          aStrSource;
97     String          aStrOperations;
98 
99     ScViewData*     pViewData;
100     ScDocument*     pDoc;
101     sal_Bool            bRefInputMode;
102     ScAddress::Details aAddrDetails;
103 
104     ScDBCollection  aLocalDbCol;
105     ScRange         theCurArea;
106     List            aRemoveList;
107 
108 #ifdef _DBNAMDLG_CXX
109 private:
110     void            Init();
111     void            UpdateNames();
112     void            UpdateDBData( const String& rStrName );
113     void            SetInfoStrings( const ScDBData* pDBData );
114 
115     DECL_LINK( CancelBtnHdl, void * );
116     DECL_LINK( OkBtnHdl, void * );
117     DECL_LINK( AddBtnHdl, void * );
118     DECL_LINK( RemoveBtnHdl, void * );
119     DECL_LINK( NameModifyHdl, void * );
120     DECL_LINK( AssModifyHdl, void * );
121 #endif
122 };
123 
124 
125 
126 #endif // SC_DBNAMDLG_HXX
127 
128