Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / source / ui / inc / filldlg.hxx
blob7fcd1b0ef7fdaf2a6c9c5785c27f25d4cc04aa13
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 SC_FILLDLG_HXX
21 #define SC_FILLDLG_HXX
23 #include <vcl/dialog.hxx>
24 #include <vcl/button.hxx>
25 #include <vcl/fixed.hxx>
26 #include <vcl/edit.hxx>
27 #include "global.hxx"
29 class ScDocument;
31 //----------------------------------------------------------------------------
33 #include "scui_def.hxx"
34 //============================================================================
36 class ScFillSeriesDlg : public ModalDialog
38 public:
39 ScFillSeriesDlg( Window* pParent,
40 ScDocument& rDocument,
41 FillDir eFillDir,
42 FillCmd eFillCmd,
43 FillDateCmd eFillDateCmd,
44 const OUString& aStartStr,
45 double fStep,
46 double fMax,
47 sal_uInt16 nPossDir );
48 ~ScFillSeriesDlg();
50 FillDir GetFillDir() const { return theFillDir; }
51 FillCmd GetFillCmd() const { return theFillCmd; }
52 FillDateCmd GetFillDateCmd() const { return theFillDateCmd; }
53 double GetStart() const { return fStartVal; }
54 double GetStep() const { return fIncrement; }
55 double GetMax() const { return fEndVal; }
57 OUString GetStartStr() const { return m_pEdStartVal->GetText(); }
59 void SetEdStartValEnabled(bool bFlag = false);
61 private:
62 FixedText* m_pFtStartVal;
63 Edit* m_pEdStartVal;
64 const OUString aStartStrVal;
66 FixedText* m_pFtEndVal;
67 Edit* m_pEdEndVal;
69 FixedText* m_pFtIncrement;
70 Edit* m_pEdIncrement;
71 RadioButton* m_pBtnDown;
72 RadioButton* m_pBtnRight;
73 RadioButton* m_pBtnUp;
74 RadioButton* m_pBtnLeft;
76 RadioButton* m_pBtnArithmetic;
77 RadioButton* m_pBtnGeometric;
78 RadioButton* m_pBtnDate;
79 RadioButton* m_pBtnAutoFill;
81 FixedText* m_pFtTimeUnit;
82 RadioButton* m_pBtnDay;
83 RadioButton* m_pBtnDayOfWeek;
84 RadioButton* m_pBtnMonth;
85 RadioButton* m_pBtnYear;
87 OKButton* m_pBtnOk;
89 const OUString aErrMsgInvalidVal;
91 //----------------------------------------------------------
93 ScDocument& rDoc;
94 FillDir theFillDir;
95 FillCmd theFillCmd;
96 FillDateCmd theFillDateCmd;
97 double fStartVal;
98 double fIncrement;
99 double fEndVal;
101 bool bStartValFlag;
103 #ifdef _FILLDLG_CXX
104 private:
105 void Init( sal_uInt16 nPossDir );
106 bool CheckStartVal();
107 bool CheckIncrementVal();
108 bool CheckEndVal();
110 DECL_LINK( OKHdl, void * );
111 DECL_LINK( DisableHdl, Button * );
112 #endif
117 #endif // SC_FILLDLG_HXX
119 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */