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