xref: /trunk/main/sc/source/ui/inc/filldlg.hxx (revision 914d351e5f5b84e4342a86d6ab8d4aca7308b9bd)
1*38d50f7bSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*38d50f7bSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*38d50f7bSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*38d50f7bSAndrew Rist  * distributed with this work for additional information
6*38d50f7bSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*38d50f7bSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*38d50f7bSAndrew Rist  * "License"); you may not use this file except in compliance
9*38d50f7bSAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*38d50f7bSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*38d50f7bSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*38d50f7bSAndrew Rist  * software distributed under the License is distributed on an
15*38d50f7bSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*38d50f7bSAndrew Rist  * KIND, either express or implied.  See the License for the
17*38d50f7bSAndrew Rist  * specific language governing permissions and limitations
18*38d50f7bSAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*38d50f7bSAndrew Rist  *************************************************************/
21*38d50f7bSAndrew Rist 
22*38d50f7bSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef SC_FILLDLG_HXX
25cdf0e10cSrcweir #define SC_FILLDLG_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #ifndef _DIALOG_HXX //autogen
28cdf0e10cSrcweir #include <vcl/dialog.hxx>
29cdf0e10cSrcweir #endif
30cdf0e10cSrcweir #ifndef _BUTTON_HXX //autogen
31cdf0e10cSrcweir #include <vcl/button.hxx>
32cdf0e10cSrcweir #endif
33cdf0e10cSrcweir #ifndef _FIXED_HXX //autogen
34cdf0e10cSrcweir #include <vcl/fixed.hxx>
35cdf0e10cSrcweir #endif
36cdf0e10cSrcweir #ifndef _EDIT_HXX //autogen
37cdf0e10cSrcweir #include <vcl/edit.hxx>
38cdf0e10cSrcweir #endif
39cdf0e10cSrcweir #include "global.hxx"
40cdf0e10cSrcweir 
41cdf0e10cSrcweir class ScDocument;
42cdf0e10cSrcweir 
43cdf0e10cSrcweir //----------------------------------------------------------------------------
44cdf0e10cSrcweir 
45cdf0e10cSrcweir //CHINA001 #define  FDS_OPT_NONE        0
46cdf0e10cSrcweir //CHINA001 #define  FDS_OPT_HORZ        1
47cdf0e10cSrcweir //CHINA001 #define  FDS_OPT_VERT        2
48cdf0e10cSrcweir //CHINA001
49cdf0e10cSrcweir #include "scui_def.hxx" //CHINA001
50cdf0e10cSrcweir //============================================================================
51cdf0e10cSrcweir 
52cdf0e10cSrcweir class ScFillSeriesDlg : public ModalDialog
53cdf0e10cSrcweir {
54cdf0e10cSrcweir public:
55cdf0e10cSrcweir             ScFillSeriesDlg( Window*        pParent,
56cdf0e10cSrcweir                              ScDocument&    rDocument,
57cdf0e10cSrcweir                              FillDir        eFillDir,
58cdf0e10cSrcweir                              FillCmd        eFillCmd,
59cdf0e10cSrcweir                              FillDateCmd    eFillDateCmd,
60cdf0e10cSrcweir                              String         aStartStr,
61cdf0e10cSrcweir                              double         fStep,
62cdf0e10cSrcweir                              double         fMax,
63cdf0e10cSrcweir                              sal_uInt16         nPossDir );
64cdf0e10cSrcweir             ~ScFillSeriesDlg();
65cdf0e10cSrcweir 
GetFillDir() const66cdf0e10cSrcweir     FillDir     GetFillDir() const          { return theFillDir; }
GetFillCmd() const67cdf0e10cSrcweir     FillCmd     GetFillCmd() const          { return theFillCmd; }
GetFillDateCmd() const68cdf0e10cSrcweir     FillDateCmd GetFillDateCmd() const      { return theFillDateCmd; }
GetStart() const69cdf0e10cSrcweir     double      GetStart() const            { return fStartVal; }
GetStep() const70cdf0e10cSrcweir     double      GetStep() const             { return fIncrement; }
GetMax() const71cdf0e10cSrcweir     double      GetMax() const              { return fEndVal; }
72cdf0e10cSrcweir 
GetStartStr() const73cdf0e10cSrcweir     String      GetStartStr() const         { return aEdStartVal.GetText(); }
74cdf0e10cSrcweir 
75cdf0e10cSrcweir     void        SetEdStartValEnabled(sal_Bool bFlag=sal_False);
76cdf0e10cSrcweir 
77cdf0e10cSrcweir private:
78cdf0e10cSrcweir     FixedText       aFtStartVal;
79cdf0e10cSrcweir     Edit            aEdStartVal;
80cdf0e10cSrcweir     String          aStartStrVal;
81cdf0e10cSrcweir 
82cdf0e10cSrcweir     FixedText       aFtEndVal;
83cdf0e10cSrcweir     Edit            aEdEndVal;
84cdf0e10cSrcweir 
85cdf0e10cSrcweir     FixedText       aFtIncrement;
86cdf0e10cSrcweir     Edit            aEdIncrement;
87cdf0e10cSrcweir     FixedLine       aFlDirection;
88cdf0e10cSrcweir     RadioButton     aBtnDown;
89cdf0e10cSrcweir     RadioButton     aBtnRight;
90cdf0e10cSrcweir     RadioButton     aBtnUp;
91cdf0e10cSrcweir     RadioButton     aBtnLeft;
92cdf0e10cSrcweir 
93cdf0e10cSrcweir     FixedLine       aFlSep1;
94cdf0e10cSrcweir     FixedLine       aFlType;
95cdf0e10cSrcweir     RadioButton     aBtnArithmetic;
96cdf0e10cSrcweir     RadioButton     aBtnGeometric;
97cdf0e10cSrcweir     RadioButton     aBtnDate;
98cdf0e10cSrcweir     RadioButton     aBtnAutoFill;
99cdf0e10cSrcweir 
100cdf0e10cSrcweir     FixedLine       aFlSep2;
101cdf0e10cSrcweir     FixedLine       aFlTimeUnit;
102cdf0e10cSrcweir     RadioButton     aBtnDay;
103cdf0e10cSrcweir     RadioButton     aBtnDayOfWeek;
104cdf0e10cSrcweir     RadioButton     aBtnMonth;
105cdf0e10cSrcweir     RadioButton     aBtnYear;
106cdf0e10cSrcweir     sal_Bool        bStartValFlag;
107cdf0e10cSrcweir 
108cdf0e10cSrcweir     OKButton        aBtnOk;
109cdf0e10cSrcweir     CancelButton    aBtnCancel;
110cdf0e10cSrcweir     HelpButton      aBtnHelp;
111cdf0e10cSrcweir 
112cdf0e10cSrcweir     const String    errMsgInvalidVal;
113cdf0e10cSrcweir 
114cdf0e10cSrcweir     //----------------------------------------------------------
115cdf0e10cSrcweir 
116cdf0e10cSrcweir     ScDocument& rDoc;
117cdf0e10cSrcweir     FillDir     theFillDir;
118cdf0e10cSrcweir     FillCmd     theFillCmd;
119cdf0e10cSrcweir     FillDateCmd theFillDateCmd;
120cdf0e10cSrcweir     double      fStartVal;
121cdf0e10cSrcweir     double      fIncrement;
122cdf0e10cSrcweir     double      fEndVal;
123cdf0e10cSrcweir 
124cdf0e10cSrcweir #ifdef _FILLDLG_CXX
125cdf0e10cSrcweir private:
126cdf0e10cSrcweir     void Init( sal_uInt16 nPossDir );
127cdf0e10cSrcweir     sal_Bool CheckStartVal();
128cdf0e10cSrcweir     sal_Bool CheckIncrementVal();
129cdf0e10cSrcweir     sal_Bool CheckEndVal();
130cdf0e10cSrcweir 
131cdf0e10cSrcweir     DECL_LINK( OKHdl, void * );
132cdf0e10cSrcweir     DECL_LINK( DisableHdl, Button * );
133cdf0e10cSrcweir #endif
134cdf0e10cSrcweir };
135cdf0e10cSrcweir 
136cdf0e10cSrcweir 
137cdf0e10cSrcweir 
138cdf0e10cSrcweir #endif // SC_FILLDLG_HXX
139