Version 6.4.0.3, tag libreoffice-6.4.0.3
[LibreOffice.git] / sc / source / ui / inc / datafdlg.hxx
blobc7bd3d0b76107ba6234630d3fe86051dcb5a204e
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/weld.hxx>
14 #include <types.hxx>
15 #include "viewfunc.hxx"
17 class ScTabViewShell;
18 class ScDocument;
20 #define MAX_DATAFORM_COLS 256
21 #define MAX_DATAFORM_ROWS 32000
23 class ScDataFormDlg : public weld::GenericDialogController
25 private:
26 OUString sNewRecord;
28 ScTabViewShell* pTabViewShell;
29 ScDocument* pDoc;
30 sal_uInt16 aColLength;
31 SCROW nCurrentRow;
32 SCCOL nStartCol;
33 SCCOL nEndCol;
34 SCROW nStartRow;
35 SCROW nEndRow;
36 SCTAB nTab;
38 std::unique_ptr<weld::Button> m_xBtnNew;
39 std::unique_ptr<weld::Button> m_xBtnDelete;
40 std::unique_ptr<weld::Button> m_xBtnRestore;
41 std::unique_ptr<weld::Button> m_xBtnPrev;
42 std::unique_ptr<weld::Button> m_xBtnNext;
43 std::unique_ptr<weld::Button> m_xBtnClose;
44 std::unique_ptr<weld::ScrolledWindow> m_xSlider;
45 std::unique_ptr<weld::Container> m_xGrid;
46 std::unique_ptr<weld::Label> m_xFixedText;
47 std::vector<std::unique_ptr<ScDataFormFragment>> m_aEntries;
49 public:
50 ScDataFormDlg(weld::Window* pParent, ScTabViewShell* pTabViewShell);
51 virtual ~ScDataFormDlg() override;
53 void FillCtrls();
54 private:
56 void SetButtonState();
58 // Handler:
59 DECL_LINK(Impl_NewHdl, weld::Button&, void);
60 DECL_LINK(Impl_PrevHdl, weld::Button&, void);
61 DECL_LINK(Impl_NextHdl, weld::Button&, void);
63 DECL_LINK(Impl_RestoreHdl, weld::Button&, void);
64 DECL_LINK(Impl_DeleteHdl, weld::Button&, void);
65 DECL_LINK(Impl_CloseHdl, weld::Button&, void);
67 DECL_LINK(Impl_ScrollHdl, weld::ScrolledWindow&, void);
68 DECL_LINK(Impl_DataModifyHdl, weld::Entry&, void);
70 #endif // INCLUDED_SC_SOURCE_UI_INC_DATAFDLG_HXX
72 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */