LibreOffice Module dbaccess (master) 1
admindlg.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 "admindlg.hxx"
21#include <dbadmin.hxx>
22#include <vcl/svapp.hxx>
23
24using namespace dbaui;
25
26extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
28 css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
29{
30 return cppu::acquire(new ODataSourcePropertyDialog(context));
31}
32
33namespace dbaui
34{
35using namespace ::com::sun::star::uno;
36using namespace ::com::sun::star::lang;
37using namespace ::com::sun::star::beans;
38
41{
42}
43
45{
46 return css::uno::Sequence<sal_Int8>();
47}
48
50{
51 return "org.openoffice.comp.dbu.ODatasourceAdministrationDialog";
52}
53
54css::uno::Sequence<OUString> SAL_CALL ODataSourcePropertyDialog::getSupportedServiceNames()
55{
56 return { "com.sun.star.sdb.DatasourceAdministrationDialog" };
57}
58
60{
61 Reference<XPropertySetInfo> xInfo(createPropertySetInfo(getInfoHelper()));
62 return xInfo;
63}
64
66{
67 return *getArrayHelper();
68}
69
71{
72 Sequence<Property> aProps;
73 describeProperties(aProps);
74 return new ::cppu::OPropertyArrayHelper(aProps);
75}
76
77std::unique_ptr<weld::DialogController>
78ODataSourcePropertyDialog::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
79{
80 std::unique_ptr<ODbAdminDialog> xDialog(new ODbAdminDialog(
82
83 // the initial selection
84 if (m_aInitialSelection.hasValue())
85 xDialog->selectDataSource(m_aInitialSelection);
86
87 return xDialog;
88}
89
90} // namespace dbaui
91
92/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * org_openoffice_comp_dbu_ODatasourceAdministrationDialog_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
Definition: admindlg.cxx:27
static weld::Window * GetFrameWeld(const css::uno::Reference< css::awt::XWindow > &rWindow)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: admindlg.cxx:54
virtual ::cppu::IPropertyArrayHelper * createArrayHelper() const override
Definition: admindlg.cxx:70
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: admindlg.cxx:44
virtual OUString SAL_CALL getImplementationName() override
Definition: admindlg.cxx:49
virtual std::unique_ptr< weld::DialogController > createDialog(const css::uno::Reference< css::awt::XWindow > &rParent) override
Definition: admindlg.cxx:78
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: admindlg.cxx:59
ODataSourcePropertyDialog(const css::uno::Reference< css::uno::XComponentContext > &_rxORB)
Definition: admindlg.cxx:39
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
Definition: admindlg.cxx:65
std::unique_ptr< SfxItemSet > m_pDatasourceItems
Definition: unoadmin.hxx:39
tab dialog for administrating the office wide registered data sources
Definition: dbadmin.hxx:48
css::uno::Reference< css::uno::XComponentContext > m_aContext