LibreOffice Module dbaccess (master) 1
DBTypeWizDlgSetup.cxx
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 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include "DBTypeWizDlgSetup.hxx"
21#include <dbwizsetup.hxx>
22#include <com/sun/star/beans/PropertyAttribute.hpp>
23#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
24#include <vcl/svapp.hxx>
25
26using namespace dbaui;
27
28extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
30 css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const& )
31{
32 return cppu::acquire(new ODBTypeWizDialogSetup(context));
33}
34
35namespace dbaui
36{
37
38 using namespace ::com::sun::star::uno;
39 using namespace ::com::sun::star::lang;
40 using namespace ::com::sun::star::beans;
41 using namespace ::com::sun::star::sdbc;
42
45 ,m_bOpenDatabase(true)
46 ,m_bStartTableWizard(false)
47{
48 registerProperty("OpenDatabase", 3, PropertyAttribute::TRANSIENT,
50
51 registerProperty("StartTableWizard", 4, PropertyAttribute::TRANSIENT,
53}
54
56{
57 return css::uno::Sequence<sal_Int8>();
58}
59
61{
62 return "org.openoffice.comp.dbu.ODBTypeWizDialogSetup";
63}
64
65css::uno::Sequence<OUString> SAL_CALL ODBTypeWizDialogSetup::getSupportedServiceNames()
66{
67 return { "com.sun.star.sdb.DatabaseWizardDialog" };
68}
69
71{
72 return createPropertySetInfo( getInfoHelper() );
73}
74
76{
77 return *getArrayHelper();
78}
79
81{
83 describeProperties(aProps);
84 return new ::cppu::OPropertyArrayHelper(aProps);
85}
86
87std::unique_ptr<weld::DialogController> ODBTypeWizDialogSetup::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
88{
89 return std::make_unique<ODbTypeWizDialogSetup>(Application::GetFrameWeld(rParent), m_pDatasourceItems.get(), m_aContext, m_aInitialSelection);
90}
91
92void ODBTypeWizDialogSetup::executedDialog(sal_Int16 nExecutionResult)
93{
94 if (nExecutionResult == css::ui::dialogs::ExecutableDialogResults::OK)
95 {
96 const ODbTypeWizDialogSetup* pDialog = static_cast<ODbTypeWizDialogSetup*>(m_xDialog.get());
99 }
100}
101
102} // namespace dbaui
103
104/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * org_openoffice_comp_dbu_ODBTypeWizDialogSetup_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
static weld::Window * GetFrameWeld(const css::uno::Reference< css::awt::XWindow > &rWindow)
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
ODBTypeWizDialogSetup(const css::uno::Reference< css::uno::XComponentContext > &_rxORB)
virtual std::unique_ptr< weld::DialogController > createDialog(const css::uno::Reference< css::awt::XWindow > &rParent) override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual ::cppu::IPropertyArrayHelper * createArrayHelper() const override
virtual OUString SAL_CALL getImplementationName() override
virtual void executedDialog(sal_Int16 _nExecutionResult) override
std::unique_ptr< SfxItemSet > m_pDatasourceItems
Definition: unoadmin.hxx:39
bool IsTableWizardToBeStarted() const
returns <TRUE> if the table wizard should be opened, otherwise <FALSE>.
Definition: dbwizsetup.cxx:732
bool IsDatabaseDocumentToBeOpened() const
returns <TRUE> if the database should be opened, otherwise <FALSE>.
Definition: dbwizsetup.cxx:721
std::unique_ptr< weld::DialogController > m_xDialog
css::uno::Reference< css::uno::XComponentContext > m_aContext