android: Update app icon to new startcenter icon
[LibreOffice.git] / dbaccess / source / ui / uno / admindlg.cxx
blob3e524372eea5c87e046fce9b089e6a53b2bd8fa8
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 "admindlg.hxx"
21 #include <dbadmin.hxx>
22 #include <vcl/svapp.hxx>
24 using namespace dbaui;
26 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
27 org_openoffice_comp_dbu_ODatasourceAdministrationDialog_get_implementation(
28 css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
30 return cppu::acquire(new ODataSourcePropertyDialog(context));
33 namespace dbaui
35 using namespace ::com::sun::star::uno;
36 using namespace ::com::sun::star::lang;
37 using namespace ::com::sun::star::beans;
39 ODataSourcePropertyDialog::ODataSourcePropertyDialog(const Reference<XComponentContext>& _rxORB)
40 : ODatabaseAdministrationDialog(_rxORB)
44 Sequence<sal_Int8> SAL_CALL ODataSourcePropertyDialog::getImplementationId()
46 return css::uno::Sequence<sal_Int8>();
49 OUString SAL_CALL ODataSourcePropertyDialog::getImplementationName()
51 return "org.openoffice.comp.dbu.ODatasourceAdministrationDialog";
54 css::uno::Sequence<OUString> SAL_CALL ODataSourcePropertyDialog::getSupportedServiceNames()
56 return { "com.sun.star.sdb.DatasourceAdministrationDialog" };
59 Reference<XPropertySetInfo> SAL_CALL ODataSourcePropertyDialog::getPropertySetInfo()
61 Reference<XPropertySetInfo> xInfo(createPropertySetInfo(getInfoHelper()));
62 return xInfo;
65 ::cppu::IPropertyArrayHelper& ODataSourcePropertyDialog::getInfoHelper()
67 return *getArrayHelper();
70 ::cppu::IPropertyArrayHelper* ODataSourcePropertyDialog::createArrayHelper() const
72 Sequence<Property> aProps;
73 describeProperties(aProps);
74 return new ::cppu::OPropertyArrayHelper(aProps);
77 std::unique_ptr<weld::DialogController>
78 ODataSourcePropertyDialog::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
80 std::unique_ptr<ODbAdminDialog> xDialog(new ODbAdminDialog(
81 Application::GetFrameWeld(rParent), m_pDatasourceItems.get(), m_aContext));
83 // the initial selection
84 if (m_aInitialSelection.hasValue())
85 xDialog->selectDataSource(m_aInitialSelection);
87 return xDialog;
90 } // namespace dbaui
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */