Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / source / ui / inc / datafdlg.hxx
blob56b842123e40d15e61254e3ee9e0932903f83b37
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/.
8 */
10 #ifndef SC_DATAFDLG_HXX
11 #define SC_DATAFDLG_HXX
13 #include <vcl/dialog.hxx>
14 #include <vcl/button.hxx>
15 #include <vcl/fixed.hxx>
17 #include "global.hxx"
19 #include <tabvwsh.hxx>
20 #include <sfx2/bindings.hxx>
21 #include <sfx2/dispatch.hxx>
23 #include <boost/ptr_container/ptr_vector.hpp>
25 #define MAX_DATAFORM_COLS 256
26 #define MAX_DATAFORM_ROWS 32000
27 #define FIXED_WIDTH 54
28 #define EDIT_WIDTH 86
29 #define FIXED_HEIGHT 10
30 #define EDIT_HEIGHT 12
31 #define FIXED_LEFT 6
32 #define EDIT_LEFT 62
33 #define LINE_HEIGHT 16
35 class ScDataFormDlg : public ModalDialog
37 private:
39 PushButton* m_pBtnNew;
40 PushButton* m_pBtnDelete;
41 PushButton* m_pBtnRestore;
42 PushButton* m_pBtnPrev;
43 PushButton* m_pBtnNext;
44 PushButton* m_pBtnClose;
45 ScrollBar* m_pSlider;
46 VclGrid* m_pGrid;
47 FixedText* m_pFixedText;
48 OUString sNewRecord;
50 ScTabViewShell* pTabViewShell;
51 ScDocument* pDoc;
52 sal_uInt16 aColLength;
53 SCROW nCurrentRow;
54 SCCOL nStartCol;
55 SCCOL nEndCol;
56 SCROW nStartRow;
57 SCROW nEndRow;
58 SCTAB nTab;
59 bool bNoSelection;
61 boost::ptr_vector<boost::nullable<FixedText> > maFixedTexts;
62 boost::ptr_vector<boost::nullable<Edit> > maEdits;
64 public:
65 ScDataFormDlg( Window* pParent, ScTabViewShell* pTabViewShell);
66 ~ScDataFormDlg();
68 void FillCtrls(SCROW nCurrentRow);
69 private:
71 void SetButtonState();
73 // Handler:
74 DECL_LINK(Impl_NewHdl, void *);
75 DECL_LINK(Impl_PrevHdl, void *);
76 DECL_LINK(Impl_NextHdl, void *);
78 DECL_LINK(Impl_RestoreHdl, void *);
79 DECL_LINK(Impl_DeleteHdl, void *);
80 DECL_LINK(Impl_CloseHdl, void *);
82 DECL_LINK(Impl_ScrollHdl, void *);
83 DECL_LINK( Impl_DataModifyHdl, Edit* );
85 #endif // SC_DATAFDLG_HXX
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */