xref: /AOO41X/main/sc/source/ui/inc/filldlg.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir #ifndef SC_FILLDLG_HXX
29*cdf0e10cSrcweir #define SC_FILLDLG_HXX
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir #ifndef _DIALOG_HXX //autogen
32*cdf0e10cSrcweir #include <vcl/dialog.hxx>
33*cdf0e10cSrcweir #endif
34*cdf0e10cSrcweir #ifndef _BUTTON_HXX //autogen
35*cdf0e10cSrcweir #include <vcl/button.hxx>
36*cdf0e10cSrcweir #endif
37*cdf0e10cSrcweir #ifndef _FIXED_HXX //autogen
38*cdf0e10cSrcweir #include <vcl/fixed.hxx>
39*cdf0e10cSrcweir #endif
40*cdf0e10cSrcweir #ifndef _EDIT_HXX //autogen
41*cdf0e10cSrcweir #include <vcl/edit.hxx>
42*cdf0e10cSrcweir #endif
43*cdf0e10cSrcweir #include "global.hxx"
44*cdf0e10cSrcweir 
45*cdf0e10cSrcweir class ScDocument;
46*cdf0e10cSrcweir 
47*cdf0e10cSrcweir //----------------------------------------------------------------------------
48*cdf0e10cSrcweir 
49*cdf0e10cSrcweir //CHINA001 #define	FDS_OPT_NONE		0
50*cdf0e10cSrcweir //CHINA001 #define	FDS_OPT_HORZ		1
51*cdf0e10cSrcweir //CHINA001 #define	FDS_OPT_VERT		2
52*cdf0e10cSrcweir //CHINA001
53*cdf0e10cSrcweir #include "scui_def.hxx" //CHINA001
54*cdf0e10cSrcweir //============================================================================
55*cdf0e10cSrcweir 
56*cdf0e10cSrcweir class ScFillSeriesDlg : public ModalDialog
57*cdf0e10cSrcweir {
58*cdf0e10cSrcweir public:
59*cdf0e10cSrcweir 			ScFillSeriesDlg( Window*		pParent,
60*cdf0e10cSrcweir 							 ScDocument&	rDocument,
61*cdf0e10cSrcweir 							 FillDir		eFillDir,
62*cdf0e10cSrcweir 							 FillCmd		eFillCmd,
63*cdf0e10cSrcweir 							 FillDateCmd	eFillDateCmd,
64*cdf0e10cSrcweir 							 String			aStartStr,
65*cdf0e10cSrcweir 							 double			fStep,
66*cdf0e10cSrcweir 							 double			fMax,
67*cdf0e10cSrcweir 							 sal_uInt16			nPossDir );
68*cdf0e10cSrcweir 			~ScFillSeriesDlg();
69*cdf0e10cSrcweir 
70*cdf0e10cSrcweir 	FillDir		GetFillDir() const			{ return theFillDir; }
71*cdf0e10cSrcweir 	FillCmd		GetFillCmd() const			{ return theFillCmd; }
72*cdf0e10cSrcweir 	FillDateCmd	GetFillDateCmd() const		{ return theFillDateCmd; }
73*cdf0e10cSrcweir 	double		GetStart() const			{ return fStartVal; }
74*cdf0e10cSrcweir 	double		GetStep() const				{ return fIncrement; }
75*cdf0e10cSrcweir 	double		GetMax() const				{ return fEndVal; }
76*cdf0e10cSrcweir 
77*cdf0e10cSrcweir 	String		GetStartStr() const			{ return aEdStartVal.GetText(); }
78*cdf0e10cSrcweir 
79*cdf0e10cSrcweir 	void		SetEdStartValEnabled(sal_Bool bFlag=sal_False);
80*cdf0e10cSrcweir 
81*cdf0e10cSrcweir private:
82*cdf0e10cSrcweir 	FixedText		aFtStartVal;
83*cdf0e10cSrcweir 	Edit			aEdStartVal;
84*cdf0e10cSrcweir 	String			aStartStrVal;
85*cdf0e10cSrcweir 
86*cdf0e10cSrcweir 	FixedText		aFtEndVal;
87*cdf0e10cSrcweir 	Edit			aEdEndVal;
88*cdf0e10cSrcweir 
89*cdf0e10cSrcweir 	FixedText		aFtIncrement;
90*cdf0e10cSrcweir 	Edit			aEdIncrement;
91*cdf0e10cSrcweir     FixedLine       aFlDirection;
92*cdf0e10cSrcweir 	RadioButton		aBtnDown;
93*cdf0e10cSrcweir 	RadioButton		aBtnRight;
94*cdf0e10cSrcweir 	RadioButton		aBtnUp;
95*cdf0e10cSrcweir 	RadioButton		aBtnLeft;
96*cdf0e10cSrcweir 
97*cdf0e10cSrcweir     FixedLine       aFlSep1;
98*cdf0e10cSrcweir     FixedLine       aFlType;
99*cdf0e10cSrcweir 	RadioButton		aBtnArithmetic;
100*cdf0e10cSrcweir 	RadioButton		aBtnGeometric;
101*cdf0e10cSrcweir 	RadioButton		aBtnDate;
102*cdf0e10cSrcweir 	RadioButton		aBtnAutoFill;
103*cdf0e10cSrcweir 
104*cdf0e10cSrcweir     FixedLine       aFlSep2;
105*cdf0e10cSrcweir     FixedLine       aFlTimeUnit;
106*cdf0e10cSrcweir 	RadioButton		aBtnDay;
107*cdf0e10cSrcweir 	RadioButton		aBtnDayOfWeek;
108*cdf0e10cSrcweir 	RadioButton		aBtnMonth;
109*cdf0e10cSrcweir 	RadioButton		aBtnYear;
110*cdf0e10cSrcweir 	sal_Bool		bStartValFlag;
111*cdf0e10cSrcweir 
112*cdf0e10cSrcweir 	OKButton		aBtnOk;
113*cdf0e10cSrcweir 	CancelButton	aBtnCancel;
114*cdf0e10cSrcweir 	HelpButton		aBtnHelp;
115*cdf0e10cSrcweir 
116*cdf0e10cSrcweir 	const String	errMsgInvalidVal;
117*cdf0e10cSrcweir 
118*cdf0e10cSrcweir 	//----------------------------------------------------------
119*cdf0e10cSrcweir 
120*cdf0e10cSrcweir 	ScDocument&	rDoc;
121*cdf0e10cSrcweir 	FillDir		theFillDir;
122*cdf0e10cSrcweir 	FillCmd		theFillCmd;
123*cdf0e10cSrcweir 	FillDateCmd	theFillDateCmd;
124*cdf0e10cSrcweir 	double		fStartVal;
125*cdf0e10cSrcweir 	double		fIncrement;
126*cdf0e10cSrcweir 	double		fEndVal;
127*cdf0e10cSrcweir 
128*cdf0e10cSrcweir #ifdef _FILLDLG_CXX
129*cdf0e10cSrcweir private:
130*cdf0e10cSrcweir 	void Init( sal_uInt16 nPossDir );
131*cdf0e10cSrcweir 	sal_Bool CheckStartVal();
132*cdf0e10cSrcweir 	sal_Bool CheckIncrementVal();
133*cdf0e10cSrcweir 	sal_Bool CheckEndVal();
134*cdf0e10cSrcweir 
135*cdf0e10cSrcweir 	DECL_LINK( OKHdl, void * );
136*cdf0e10cSrcweir 	DECL_LINK( DisableHdl, Button * );
137*cdf0e10cSrcweir #endif
138*cdf0e10cSrcweir };
139*cdf0e10cSrcweir 
140*cdf0e10cSrcweir 
141*cdf0e10cSrcweir 
142*cdf0e10cSrcweir #endif // SC_FILLDLG_HXX
143*cdf0e10cSrcweir 
144