android: Update app icon to new startcenter icon
[LibreOffice.git] / dbaccess / source / ui / uno / DBTypeWizDlgSetup.cxx
blob63c3d6304b0d33cae895b50069e74c9a1a47fe65
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/.
9 * This file incorporates work covered by the following license notice:
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 .
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>
26 using namespace dbaui;
28 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
29 org_openoffice_comp_dbu_ODBTypeWizDialogSetup_get_implementation(
30 css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const& )
32 return cppu::acquire(new ODBTypeWizDialogSetup(context));
35 namespace dbaui
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;
43 ODBTypeWizDialogSetup::ODBTypeWizDialogSetup(const Reference< XComponentContext >& _rxORB)
44 :ODatabaseAdministrationDialog(_rxORB)
45 ,m_bOpenDatabase(true)
46 ,m_bStartTableWizard(false)
48 registerProperty("OpenDatabase", 3, PropertyAttribute::TRANSIENT,
49 &m_bOpenDatabase, cppu::UnoType<bool>::get());
51 registerProperty("StartTableWizard", 4, PropertyAttribute::TRANSIENT,
52 &m_bStartTableWizard, cppu::UnoType<bool>::get());
55 Sequence<sal_Int8> SAL_CALL ODBTypeWizDialogSetup::getImplementationId( )
57 return css::uno::Sequence<sal_Int8>();
60 OUString SAL_CALL ODBTypeWizDialogSetup::getImplementationName()
62 return "org.openoffice.comp.dbu.ODBTypeWizDialogSetup";
65 css::uno::Sequence<OUString> SAL_CALL ODBTypeWizDialogSetup::getSupportedServiceNames()
67 return { "com.sun.star.sdb.DatabaseWizardDialog" };
70 Reference<XPropertySetInfo> SAL_CALL ODBTypeWizDialogSetup::getPropertySetInfo()
72 return createPropertySetInfo( getInfoHelper() );
75 ::cppu::IPropertyArrayHelper& ODBTypeWizDialogSetup::getInfoHelper()
77 return *getArrayHelper();
80 ::cppu::IPropertyArrayHelper* ODBTypeWizDialogSetup::createArrayHelper( ) const
82 Sequence< Property > aProps;
83 describeProperties(aProps);
84 return new ::cppu::OPropertyArrayHelper(aProps);
87 std::unique_ptr<weld::DialogController> ODBTypeWizDialogSetup::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
89 return std::make_unique<ODbTypeWizDialogSetup>(Application::GetFrameWeld(rParent), m_pDatasourceItems.get(), m_aContext, m_aInitialSelection);
92 void ODBTypeWizDialogSetup::executedDialog(sal_Int16 nExecutionResult)
94 if (nExecutionResult == css::ui::dialogs::ExecutableDialogResults::OK)
96 const ODbTypeWizDialogSetup* pDialog = static_cast<ODbTypeWizDialogSetup*>(m_xDialog.get());
97 m_bOpenDatabase = pDialog->IsDatabaseDocumentToBeOpened();
98 m_bStartTableWizard = pDialog->IsTableWizardToBeStarted();
102 } // namespace dbaui
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */