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 : #include "scui_def.hxx"
32 :
33 :
34 : class ScFillSeriesDlg : public ModalDialog
35 : {
36 : public:
37 : ScFillSeriesDlg( Window* pParent,
38 : ScDocument& rDocument,
39 : FillDir eFillDir,
40 : FillCmd eFillCmd,
41 : FillDateCmd eFillDateCmd,
42 : const OUString& aStartStr,
43 : double fStep,
44 : double fMax,
45 : sal_uInt16 nPossDir );
46 : virtual ~ScFillSeriesDlg();
47 :
48 0 : FillDir GetFillDir() const { return theFillDir; }
49 0 : FillCmd GetFillCmd() const { return theFillCmd; }
50 0 : FillDateCmd GetFillDateCmd() const { return theFillDateCmd; }
51 0 : double GetStart() const { return fStartVal; }
52 0 : double GetStep() const { return fIncrement; }
53 0 : double GetMax() const { return fEndVal; }
54 :
55 0 : OUString GetStartStr() const { return m_pEdStartVal->GetText(); }
56 :
57 : void SetEdStartValEnabled(bool bFlag = false);
58 :
59 : private:
60 : FixedText* m_pFtStartVal;
61 : Edit* m_pEdStartVal;
62 : const OUString aStartStrVal;
63 :
64 : FixedText* m_pFtEndVal;
65 : Edit* m_pEdEndVal;
66 :
67 : FixedText* m_pFtIncrement;
68 : Edit* m_pEdIncrement;
69 : RadioButton* m_pBtnDown;
70 : RadioButton* m_pBtnRight;
71 : RadioButton* m_pBtnUp;
72 : RadioButton* m_pBtnLeft;
73 :
74 : RadioButton* m_pBtnArithmetic;
75 : RadioButton* m_pBtnGeometric;
76 : RadioButton* m_pBtnDate;
77 : RadioButton* m_pBtnAutoFill;
78 :
79 : FixedText* m_pFtTimeUnit;
80 : RadioButton* m_pBtnDay;
81 : RadioButton* m_pBtnDayOfWeek;
82 : RadioButton* m_pBtnMonth;
83 : RadioButton* m_pBtnYear;
84 :
85 : OKButton* m_pBtnOk;
86 :
87 : const OUString aErrMsgInvalidVal;
88 :
89 : ScDocument& rDoc;
90 : FillDir theFillDir;
91 : FillCmd theFillCmd;
92 : FillDateCmd theFillDateCmd;
93 : double fStartVal;
94 : double fIncrement;
95 : double fEndVal;
96 :
97 : bool bStartValFlag;
98 :
99 : #ifdef _FILLDLG_CXX
100 : private:
101 : void Init( sal_uInt16 nPossDir );
102 : bool CheckStartVal();
103 : bool CheckIncrementVal();
104 : bool CheckEndVal();
105 :
106 : DECL_LINK( OKHdl, void * );
107 : DECL_LINK( DisableHdl, Button * );
108 : #endif
109 : };
110 :
111 : #endif // SC_FILLDLG_HXX
112 :
113 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|