Version 6.4.0.3, tag libreoffice-6.4.0.3
[LibreOffice.git] / sc / source / ui / inc / dataproviderdlg.hxx
blob2cc636973145f523cc74290175070172e10029ed
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_DATAPROVIDERDLG_HXX
11 #define INCLUDED_SC_SOURCE_UI_INC_DATAPROVIDERDLG_HXX
13 #include <sal/config.h>
15 #include <com/sun/star/awt/XWindow.hpp>
16 #include <vcl/idle.hxx>
17 #include <vcl/weld.hxx>
18 #include "datatableview.hxx"
19 #include <memory>
21 class ScDocument;
22 class ScDataProviderBaseControl;
23 class ScDataTransformationBaseControl;
24 class ScDBData;
26 class ScDataProviderDlg : public weld::GenericDialogController
28 private:
29 std::shared_ptr<ScDocument> mxDoc;
30 std::unique_ptr<weld::Menu> mxStartMenu;
31 std::unique_ptr<weld::Menu> mxColumnMenu;
32 std::unique_ptr<weld::Container> mxBox;
33 css::uno::Reference<css::awt::XWindow> m_xTableParent;
34 VclPtr<ScDataTableView> mxTable;
35 std::unique_ptr<weld::ScrolledWindow> mxScroll;
36 std::unique_ptr<weld::Container> mxList;
37 std::unique_ptr<ScDataProviderBaseControl> mxDataProviderCtrl;
38 std::unique_ptr<weld::ComboBox> mxDBRanges;
40 std::vector<std::unique_ptr<ScDataTransformationBaseControl>> maControls;
42 Idle maIdle;
44 sal_uInt32 mnIndex;
45 ScDBData* pDBData;
47 void InitMenu();
49 DECL_LINK( StartMenuHdl, const OString&, void );
50 DECL_LINK( ColumnMenuHdl, const OString&, void );
51 DECL_LINK( ImportHdl, ScDataProviderBaseControl*, void );
52 DECL_LINK( ScrollToEnd, Timer*, void );
54 public:
55 ScDataProviderDlg(weld::Window* pWindow, std::shared_ptr<ScDocument> pDoc, const ScDocument* pDocument);
56 virtual ~ScDataProviderDlg() override;
58 void applyAndQuit();
59 void cancelAndQuit();
61 void deleteColumn();
62 void splitColumn();
63 void mergeColumns();
64 void textTransformation();
65 void sortTransformation();
66 void aggregateFunction();
67 void numberTransformation();
68 void deletefromList(sal_uInt32 nIndex);
69 void replaceNullTransformation();
70 void dateTimeTransformation();
72 void import(ScDocument* pDoc, bool bInternal = false);
75 #endif
77 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */