fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / dbaccess / source / ui / uno / AdvancedSettingsDlg.cxx
blob3e2cb86fb94e3fd4fe13c4fed2a5bc32df01c724
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 <sal/config.h>
22 #include "uiservices.hxx"
23 #include "unoadmin.hxx"
24 #include "dbu_reghelper.hxx"
25 #include "advancedsettingsdlg.hxx"
26 #include <comphelper/processfactory.hxx>
28 namespace dbaui
31 using namespace ::com::sun::star::uno;
32 using namespace ::com::sun::star::lang;
33 using namespace ::com::sun::star::beans;
35 // OAdvancedSettingsDialog
36 class OAdvancedSettingsDialog
37 :public ODatabaseAdministrationDialog
38 ,public ::comphelper::OPropertyArrayUsageHelper< OAdvancedSettingsDialog >
41 protected:
42 OAdvancedSettingsDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB);
44 public:
45 // XTypeProvider
46 virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
48 // XServiceInfo
49 virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
50 virtual ::comphelper::StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
52 // XServiceInfo - static methods
53 static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static() throw( ::com::sun::star::uno::RuntimeException );
54 static OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException );
55 static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
56 SAL_CALL Create(const ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >&);
58 // XPropertySet
59 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
60 virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE;
62 // OPropertyArrayUsageHelper
63 virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const SAL_OVERRIDE;
64 protected:
65 // OGenericUnoDialog overridables
66 virtual VclPtr<Dialog> createDialog(vcl::Window* _pParent) SAL_OVERRIDE;
69 OAdvancedSettingsDialog::OAdvancedSettingsDialog(const Reference< XComponentContext >& _rxORB)
70 :ODatabaseAdministrationDialog(_rxORB)
73 Sequence<sal_Int8> SAL_CALL OAdvancedSettingsDialog::getImplementationId( ) throw(RuntimeException, std::exception)
75 return css::uno::Sequence<sal_Int8>();
78 Reference< XInterface > SAL_CALL OAdvancedSettingsDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory)
80 return *(new OAdvancedSettingsDialog( comphelper::getComponentContext(_rxFactory) ));
83 OUString SAL_CALL OAdvancedSettingsDialog::getImplementationName() throw(RuntimeException, std::exception)
85 return getImplementationName_Static();
88 OUString OAdvancedSettingsDialog::getImplementationName_Static() throw(RuntimeException)
90 return OUString("org.openoffice.comp.dbu.OAdvancedSettingsDialog");
93 ::comphelper::StringSequence SAL_CALL OAdvancedSettingsDialog::getSupportedServiceNames() throw(RuntimeException, std::exception)
95 return getSupportedServiceNames_Static();
98 ::comphelper::StringSequence OAdvancedSettingsDialog::getSupportedServiceNames_Static() throw(RuntimeException)
100 ::comphelper::StringSequence aSupported(1);
101 aSupported[0] = "com.sun.star.sdb.AdvancedDatabaseSettingsDialog";
102 return aSupported;
105 Reference<XPropertySetInfo> SAL_CALL OAdvancedSettingsDialog::getPropertySetInfo() throw(RuntimeException, std::exception)
107 Reference<XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) );
108 return xInfo;
111 ::cppu::IPropertyArrayHelper& OAdvancedSettingsDialog::getInfoHelper()
113 return *getArrayHelper();
116 ::cppu::IPropertyArrayHelper* OAdvancedSettingsDialog::createArrayHelper( ) const
118 Sequence< Property > aProps;
119 describeProperties(aProps);
120 return new ::cppu::OPropertyArrayHelper(aProps);
122 VclPtr<Dialog> OAdvancedSettingsDialog::createDialog(vcl::Window* _pParent)
124 return VclPtr<AdvancedSettingsDialog>::Create(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection);
127 } // namespace dbaui
129 extern "C" void SAL_CALL createRegistryInfo_OAdvancedSettingsDialog()
131 static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::OAdvancedSettingsDialog > aAutoRegistration;
134 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */