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