xref: /trunk/main/sc/source/ui/inc/filldlg.hxx (revision 38d50f7b)
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_FILLDLG_HXX
25 #define SC_FILLDLG_HXX
26 
27 #ifndef _DIALOG_HXX //autogen
28 #include <vcl/dialog.hxx>
29 #endif
30 #ifndef _BUTTON_HXX //autogen
31 #include <vcl/button.hxx>
32 #endif
33 #ifndef _FIXED_HXX //autogen
34 #include <vcl/fixed.hxx>
35 #endif
36 #ifndef _EDIT_HXX //autogen
37 #include <vcl/edit.hxx>
38 #endif
39 #include "global.hxx"
40 
41 class ScDocument;
42 
43 //----------------------------------------------------------------------------
44 
45 //CHINA001 #define	FDS_OPT_NONE		0
46 //CHINA001 #define	FDS_OPT_HORZ		1
47 //CHINA001 #define	FDS_OPT_VERT		2
48 //CHINA001
49 #include "scui_def.hxx" //CHINA001
50 //============================================================================
51 
52 class ScFillSeriesDlg : public ModalDialog
53 {
54 public:
55 			ScFillSeriesDlg( Window*		pParent,
56 							 ScDocument&	rDocument,
57 							 FillDir		eFillDir,
58 							 FillCmd		eFillCmd,
59 							 FillDateCmd	eFillDateCmd,
60 							 String			aStartStr,
61 							 double			fStep,
62 							 double			fMax,
63 							 sal_uInt16			nPossDir );
64 			~ScFillSeriesDlg();
65 
GetFillDir() const66 	FillDir		GetFillDir() const			{ return theFillDir; }
GetFillCmd() const67 	FillCmd		GetFillCmd() const			{ return theFillCmd; }
GetFillDateCmd() const68 	FillDateCmd	GetFillDateCmd() const		{ return theFillDateCmd; }
GetStart() const69 	double		GetStart() const			{ return fStartVal; }
GetStep() const70 	double		GetStep() const				{ return fIncrement; }
GetMax() const71 	double		GetMax() const				{ return fEndVal; }
72 
GetStartStr() const73 	String		GetStartStr() const			{ return aEdStartVal.GetText(); }
74 
75 	void		SetEdStartValEnabled(sal_Bool bFlag=sal_False);
76 
77 private:
78 	FixedText		aFtStartVal;
79 	Edit			aEdStartVal;
80 	String			aStartStrVal;
81 
82 	FixedText		aFtEndVal;
83 	Edit			aEdEndVal;
84 
85 	FixedText		aFtIncrement;
86 	Edit			aEdIncrement;
87     FixedLine       aFlDirection;
88 	RadioButton		aBtnDown;
89 	RadioButton		aBtnRight;
90 	RadioButton		aBtnUp;
91 	RadioButton		aBtnLeft;
92 
93     FixedLine       aFlSep1;
94     FixedLine       aFlType;
95 	RadioButton		aBtnArithmetic;
96 	RadioButton		aBtnGeometric;
97 	RadioButton		aBtnDate;
98 	RadioButton		aBtnAutoFill;
99 
100     FixedLine       aFlSep2;
101     FixedLine       aFlTimeUnit;
102 	RadioButton		aBtnDay;
103 	RadioButton		aBtnDayOfWeek;
104 	RadioButton		aBtnMonth;
105 	RadioButton		aBtnYear;
106 	sal_Bool		bStartValFlag;
107 
108 	OKButton		aBtnOk;
109 	CancelButton	aBtnCancel;
110 	HelpButton		aBtnHelp;
111 
112 	const String	errMsgInvalidVal;
113 
114 	//----------------------------------------------------------
115 
116 	ScDocument&	rDoc;
117 	FillDir		theFillDir;
118 	FillCmd		theFillCmd;
119 	FillDateCmd	theFillDateCmd;
120 	double		fStartVal;
121 	double		fIncrement;
122 	double		fEndVal;
123 
124 #ifdef _FILLDLG_CXX
125 private:
126 	void Init( sal_uInt16 nPossDir );
127 	sal_Bool CheckStartVal();
128 	sal_Bool CheckIncrementVal();
129 	sal_Bool CheckEndVal();
130 
131 	DECL_LINK( OKHdl, void * );
132 	DECL_LINK( DisableHdl, Button * );
133 #endif
134 };
135 
136 
137 
138 #endif // SC_FILLDLG_HXX
139 
140