Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef SC_FILLDLG_HXX
21 : #define SC_FILLDLG_HXX
22 :
23 : #include <vcl/dialog.hxx>
24 : #include <vcl/button.hxx>
25 : #include <vcl/fixed.hxx>
26 : #include <vcl/edit.hxx>
27 : #include "global.hxx"
28 :
29 : class ScDocument;
30 :
31 : //----------------------------------------------------------------------------
32 :
33 : #include "scui_def.hxx"
34 : //============================================================================
35 :
36 : class ScFillSeriesDlg : public ModalDialog
37 : {
38 : public:
39 : ScFillSeriesDlg( Window* pParent,
40 : ScDocument& rDocument,
41 : FillDir eFillDir,
42 : FillCmd eFillCmd,
43 : FillDateCmd eFillDateCmd,
44 : const rtl::OUString& aStartStr,
45 : double fStep,
46 : double fMax,
47 : sal_uInt16 nPossDir );
48 : ~ScFillSeriesDlg();
49 :
50 0 : FillDir GetFillDir() const { return theFillDir; }
51 0 : FillCmd GetFillCmd() const { return theFillCmd; }
52 0 : FillDateCmd GetFillDateCmd() const { return theFillDateCmd; }
53 0 : double GetStart() const { return fStartVal; }
54 0 : double GetStep() const { return fIncrement; }
55 0 : double GetMax() const { return fEndVal; }
56 :
57 0 : rtl::OUString GetStartStr() const { return aEdStartVal.GetText(); }
58 :
59 : void SetEdStartValEnabled(bool bFlag = false);
60 :
61 : private:
62 : FixedText aFtStartVal;
63 : Edit aEdStartVal;
64 : const rtl::OUString aStartStrVal;
65 :
66 : FixedText aFtEndVal;
67 : Edit aEdEndVal;
68 :
69 : FixedText aFtIncrement;
70 : Edit aEdIncrement;
71 : FixedLine aFlDirection;
72 : RadioButton aBtnDown;
73 : RadioButton aBtnRight;
74 : RadioButton aBtnUp;
75 : RadioButton aBtnLeft;
76 :
77 : FixedLine aFlSep1;
78 : FixedLine aFlType;
79 : RadioButton aBtnArithmetic;
80 : RadioButton aBtnGeometric;
81 : RadioButton aBtnDate;
82 : RadioButton aBtnAutoFill;
83 :
84 : FixedLine aFlSep2;
85 : FixedLine aFlTimeUnit;
86 : RadioButton aBtnDay;
87 : RadioButton aBtnDayOfWeek;
88 : RadioButton aBtnMonth;
89 : RadioButton aBtnYear;
90 :
91 : OKButton aBtnOk;
92 : CancelButton aBtnCancel;
93 : HelpButton aBtnHelp;
94 :
95 : const rtl::OUString aErrMsgInvalidVal;
96 :
97 : //----------------------------------------------------------
98 :
99 : ScDocument& rDoc;
100 : FillDir theFillDir;
101 : FillCmd theFillCmd;
102 : FillDateCmd theFillDateCmd;
103 : double fStartVal;
104 : double fIncrement;
105 : double fEndVal;
106 :
107 : bool bStartValFlag;
108 :
109 : #ifdef _FILLDLG_CXX
110 : private:
111 : void Init( sal_uInt16 nPossDir );
112 : bool CheckStartVal();
113 : bool CheckIncrementVal();
114 : bool CheckEndVal();
115 :
116 : DECL_LINK( OKHdl, void * );
117 : DECL_LINK( DisableHdl, Button * );
118 : #endif
119 : };
120 :
121 :
122 :
123 : #endif // SC_FILLDLG_HXX
124 :
125 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|