Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / sc / source / ui / inc / datafdlg.hxx
blobca69b539a47beaad9edbef8c4e96bc10a3e79dd2
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 INCLUDED_SC_SOURCE_UI_INC_DATAFDLG_HXX
11 #define INCLUDED_SC_SOURCE_UI_INC_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 #define MAX_DATAFORM_COLS 256
24 #define MAX_DATAFORM_ROWS 32000
26 class ScDataFormDlg : public ModalDialog
28 private:
30 VclPtr<PushButton> m_pBtnNew;
31 VclPtr<PushButton> m_pBtnDelete;
32 VclPtr<PushButton> m_pBtnRestore;
33 VclPtr<PushButton> m_pBtnPrev;
34 VclPtr<PushButton> m_pBtnNext;
35 VclPtr<PushButton> m_pBtnClose;
36 VclPtr<ScrollBar> m_pSlider;
37 VclPtr<VclGrid> m_pGrid;
38 VclPtr<FixedText> m_pFixedText;
39 OUString sNewRecord;
41 ScTabViewShell* pTabViewShell;
42 ScDocument* pDoc;
43 sal_uInt16 aColLength;
44 SCROW nCurrentRow;
45 SCCOL nStartCol;
46 SCCOL nEndCol;
47 SCROW nStartRow;
48 SCROW nEndRow;
49 SCTAB nTab;
50 bool bNoSelection;
52 std::vector<VclPtr<FixedText> > maFixedTexts;
53 std::vector<VclPtr<Edit> > maEdits;
55 public:
56 ScDataFormDlg( vcl::Window* pParent, ScTabViewShell* pTabViewShell);
57 virtual ~ScDataFormDlg();
58 virtual void dispose() override;
60 void FillCtrls(SCROW nCurrentRow);
61 private:
63 void SetButtonState();
65 // Handler:
66 DECL_LINK_TYPED(Impl_NewHdl, Button*, void);
67 DECL_LINK_TYPED(Impl_PrevHdl, Button*, void);
68 DECL_LINK_TYPED(Impl_NextHdl, Button*, void);
70 DECL_LINK_TYPED(Impl_RestoreHdl, Button*, void);
71 DECL_LINK_TYPED(Impl_DeleteHdl, Button*, void);
72 DECL_LINK_TYPED(Impl_CloseHdl, Button*, void);
74 DECL_LINK_TYPED(Impl_ScrollHdl, ScrollBar*, void);
75 DECL_LINK_TYPED(Impl_DataModifyHdl, Edit&, void);
77 #endif // INCLUDED_SC_SOURCE_UI_INC_DATAFDLG_HXX
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */