LibreOffice Module sc (master) 1
dataproviderdlg.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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 */
9
10#pragma once
11
12#include <datamapper.hxx>
13
14#include <sal/config.h>
15
16#include <com/sun/star/awt/XWindow.hpp>
17#include <vcl/idle.hxx>
18#include <vcl/weld.hxx>
19#include "datatableview.hxx"
20#include <memory>
21
22class ScDocument;
24class ScDBData;
25
27{
28private:
29 std::shared_ptr<ScDocument> mxDoc;
30 std::unique_ptr<weld::Container> mxBox;
31 css::uno::Reference<css::awt::XWindow> m_xTableParent;
33 std::unique_ptr<weld::Container> mxList;
34 std::unique_ptr<weld::ComboBox> mxDBRanges;
35 std::unique_ptr<weld::Button> mxOKBtn;
36 std::unique_ptr<weld::Button> mxCancelBtn;
37 std::unique_ptr<weld::Button> mxAddTransformationBtn;
38 std::unique_ptr<weld::ScrolledWindow> mxScroll;
39 std::unique_ptr<weld::Container> mxTransformationList;
40 std::unique_ptr<weld::ComboBox> mxTransformationBox;
41 std::unique_ptr<weld::ComboBox> mxProviderList;
42 std::unique_ptr<weld::Entry> mxEditURL;
43 std::unique_ptr<weld::Entry> mxEditID;
44 std::unique_ptr<weld::Button> mxApplyBtn;
45 std::unique_ptr<weld::Button> mxBrowseBtn;
46
49
50 std::vector<std::unique_ptr<ScDataTransformationBaseControl>> maControls;
51
53
54 sal_uInt32 mnIndex;
56
57 DECL_LINK(StartMenuHdl, const OString&, void);
58 DECL_LINK(ColumnMenuHdl, const weld::ComboBox&, void);
59 DECL_LINK(ScrollToEnd, Timer*, void);
60 DECL_LINK(ApplyQuitHdl, weld::Button&, void);
61 DECL_LINK(CancelQuitHdl, weld::Button&, void);
62 DECL_LINK(TransformationListHdl, weld::Button&, void);
63 DECL_LINK(ProviderSelectHdl, weld::ComboBox&, void);
64 DECL_LINK(TransformationSelectHdl, weld::ComboBox&, void);
65 DECL_LINK(IDEditHdl, weld::Entry&, void);
66 DECL_LINK(URLEditHdl, weld::Entry&, void);
67 DECL_LINK(ApplyBtnHdl, weld::Button&, void);
68 DECL_LINK(BrowseBtnHdl, weld::Button&, void);
69
70public:
71 ScDataProviderDlg(weld::Window* pWindow, std::shared_ptr<ScDocument> pDoc,
72 const ScDocument* pDocument);
73 virtual ~ScDataProviderDlg() override;
74
77
78 void deleteColumn();
79 void splitColumn();
80 void mergeColumns();
81 void textTransformation();
82 void sortTransformation();
83 void aggregateFunction();
85 void deletefromList(sal_uInt32 nIndex);
91
92 void updateApplyBtn(bool bValidConfig);
93 void isValid();
94
96
97 void import(ScDocument& rDoc, bool bInternal = false);
98};
99
100/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::ComboBox > mxDBRanges
VclPtr< ScDataTableView > mxTable
std::unique_ptr< weld::Entry > mxEditURL
DECL_LINK(CancelQuitHdl, weld::Button &, void)
virtual ~ScDataProviderDlg() override
css::uno::Reference< css::awt::XWindow > m_xTableParent
std::unique_ptr< weld::ScrolledWindow > mxScroll
ScDataProviderDlg(weld::Window *pWindow, std::shared_ptr< ScDocument > pDoc, const ScDocument *pDocument)
std::unique_ptr< weld::Button > mxAddTransformationBtn
DECL_LINK(ColumnMenuHdl, const weld::ComboBox &, void)
DECL_LINK(TransformationSelectHdl, weld::ComboBox &, void)
std::unique_ptr< weld::Container > mxBox
DECL_LINK(ScrollToEnd, Timer *, void)
std::unique_ptr< weld::Container > mxTransformationList
DECL_LINK(ApplyQuitHdl, weld::Button &, void)
std::unique_ptr< weld::Entry > mxEditID
std::unique_ptr< weld::Button > mxOKBtn
DECL_LINK(IDEditHdl, weld::Entry &, void)
DECL_LINK(ApplyBtnHdl, weld::Button &, void)
sc::ExternalDataSource getDataSource(ScDocument *pDoc)
OUString msAddTransformationToolTip
DECL_LINK(StartMenuHdl, const OString &, void)
std::vector< std::unique_ptr< ScDataTransformationBaseControl > > maControls
std::unique_ptr< weld::Button > mxBrowseBtn
std::unique_ptr< weld::ComboBox > mxProviderList
std::unique_ptr< weld::Button > mxCancelBtn
DECL_LINK(ProviderSelectHdl, weld::ComboBox &, void)
std::unique_ptr< weld::Button > mxApplyBtn
DECL_LINK(TransformationListHdl, weld::Button &, void)
DECL_LINK(BrowseBtnHdl, weld::Button &, void)
DECL_LINK(URLEditHdl, weld::Entry &, void)
void updateApplyBtn(bool bValidConfig)
std::unique_ptr< weld::Container > mxList
void deletefromList(sal_uInt32 nIndex)
std::shared_ptr< ScDocument > mxDoc
std::unique_ptr< weld::ComboBox > mxTransformationBox