Version 6.4.0.3, tag libreoffice-6.4.0.3
[LibreOffice.git] / sc / source / ui / inc / filldlg.hxx
blobafa1527b84d9b503b895b73dd3498a7b317d9216
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SC_SOURCE_UI_INC_FILLDLG_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_FILLDLG_HXX
23 #include <vcl/weld.hxx>
24 #include <global.hxx>
26 class ScDocument;
28 class ScFillSeriesDlg : public weld::GenericDialogController
30 public:
31 ScFillSeriesDlg( weld::Window* pParent,
32 ScDocument& rDocument,
33 FillDir eFillDir,
34 FillCmd eFillCmd,
35 FillDateCmd eFillDateCmd,
36 const OUString& aStartStr,
37 double fStep,
38 double fMax,
39 sal_uInt16 nPossDir );
40 virtual ~ScFillSeriesDlg() override;
42 FillDir GetFillDir() const { return theFillDir; }
43 FillCmd GetFillCmd() const { return theFillCmd; }
44 FillDateCmd GetFillDateCmd() const { return theFillDateCmd; }
45 double GetStart() const { return fStartVal; }
46 double GetStep() const { return fIncrement; }
47 double GetMax() const { return fEndVal; }
49 OUString GetStartStr() const { return m_xEdStartVal->get_text(); }
51 void SetEdStartValEnabled(bool bFlag);
53 private:
54 const OUString aStartStrVal;
55 const OUString aErrMsgInvalidVal;
57 ScDocument& rDoc;
58 FillDir theFillDir;
59 FillCmd theFillCmd;
60 FillDateCmd theFillDateCmd;
61 double fStartVal;
62 double fIncrement;
63 double fEndVal;
65 std::unique_ptr<weld::Label> m_xFtStartVal;
66 std::unique_ptr<weld::Entry> m_xEdStartVal;
68 std::unique_ptr<weld::Label> m_xFtEndVal;
69 std::unique_ptr<weld::Entry> m_xEdEndVal;
71 std::unique_ptr<weld::Label> m_xFtIncrement;
72 std::unique_ptr<weld::Entry> m_xEdIncrement;
73 std::unique_ptr<weld::RadioButton> m_xBtnDown;
74 std::unique_ptr<weld::RadioButton> m_xBtnRight;
75 std::unique_ptr<weld::RadioButton> m_xBtnUp;
76 std::unique_ptr<weld::RadioButton> m_xBtnLeft;
78 std::unique_ptr<weld::RadioButton> m_xBtnArithmetic;
79 std::unique_ptr<weld::RadioButton> m_xBtnGeometric;
80 std::unique_ptr<weld::RadioButton> m_xBtnDate;
81 std::unique_ptr<weld::RadioButton> m_xBtnAutoFill;
83 std::unique_ptr<weld::Label> m_xFtTimeUnit;
84 std::unique_ptr<weld::RadioButton> m_xBtnDay;
85 std::unique_ptr<weld::RadioButton> m_xBtnDayOfWeek;
86 std::unique_ptr<weld::RadioButton> m_xBtnMonth;
87 std::unique_ptr<weld::RadioButton> m_xBtnYear;
89 std::unique_ptr<weld::Button> m_xBtnOk;
91 void Init( sal_uInt16 nPossDir );
92 bool CheckStartVal();
93 bool CheckIncrementVal();
94 bool CheckEndVal();
96 DECL_LINK(OKHdl, weld::Button&, void);
97 DECL_LINK(DisableHdl, weld::ToggleButton&, void);
100 #endif // INCLUDED_SC_SOURCE_UI_INC_FILLDLG_HXX
102 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */