2010-10-12 15:59:03 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-14 17:39:53 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2004-08-02 15:20:11 +00:00
|
|
|
|
2014-04-13 22:40:55 +02:00
|
|
|
#include <sal/config.h>
|
|
|
|
|
|
|
|
#include "uiservices.hxx"
|
2007-11-01 14:38:20 +00:00
|
|
|
#include "unoadmin.hxx"
|
2004-08-02 15:20:11 +00:00
|
|
|
#include "dbu_reghelper.hxx"
|
2007-11-01 14:38:20 +00:00
|
|
|
#include "advancedsettingsdlg.hxx"
|
2013-03-19 13:08:47 +02:00
|
|
|
#include <comphelper/processfactory.hxx>
|
2004-08-02 15:20:11 +00:00
|
|
|
|
|
|
|
namespace dbaui
|
|
|
|
{
|
|
|
|
|
|
|
|
using namespace ::com::sun::star::uno;
|
|
|
|
using namespace ::com::sun::star::lang;
|
|
|
|
using namespace ::com::sun::star::beans;
|
|
|
|
|
2013-08-17 23:43:14 +02:00
|
|
|
// OAdvancedSettingsDialog
|
2007-11-01 14:38:20 +00:00
|
|
|
class OAdvancedSettingsDialog
|
|
|
|
:public ODatabaseAdministrationDialog
|
|
|
|
,public ::comphelper::OPropertyArrayUsageHelper< OAdvancedSettingsDialog >
|
|
|
|
{
|
|
|
|
|
|
|
|
protected:
|
2013-03-19 13:08:47 +02:00
|
|
|
OAdvancedSettingsDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB);
|
2007-11-01 14:38:20 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
// XTypeProvider
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2007-11-01 14:38:20 +00:00
|
|
|
|
|
|
|
// XServiceInfo
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
|
|
virtual ::comphelper::StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2007-11-01 14:38:20 +00:00
|
|
|
|
|
|
|
// XServiceInfo - static methods
|
2015-04-14 12:44:47 +02:00
|
|
|
static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static() throw( ::com::sun::star::uno::RuntimeException );
|
|
|
|
static OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException );
|
2007-11-01 14:38:20 +00:00
|
|
|
static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
|
|
|
|
SAL_CALL Create(const ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >&);
|
|
|
|
|
|
|
|
// XPropertySet
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
|
|
virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE;
|
2007-11-01 14:38:20 +00:00
|
|
|
|
|
|
|
// OPropertyArrayUsageHelper
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const SAL_OVERRIDE;
|
2007-11-01 14:38:20 +00:00
|
|
|
protected:
|
|
|
|
// OGenericUnoDialog overridables
|
2015-04-17 12:10:27 +01:00
|
|
|
virtual VclPtr<Dialog> createDialog(vcl::Window* _pParent) SAL_OVERRIDE;
|
2007-11-01 14:38:20 +00:00
|
|
|
};
|
|
|
|
|
2013-03-19 13:08:47 +02:00
|
|
|
OAdvancedSettingsDialog::OAdvancedSettingsDialog(const Reference< XComponentContext >& _rxORB)
|
2007-11-01 14:38:20 +00:00
|
|
|
:ODatabaseAdministrationDialog(_rxORB)
|
|
|
|
{
|
|
|
|
}
|
2014-02-25 21:31:58 +01:00
|
|
|
Sequence<sal_Int8> SAL_CALL OAdvancedSettingsDialog::getImplementationId( ) throw(RuntimeException, std::exception)
|
2007-11-01 14:38:20 +00:00
|
|
|
{
|
2014-03-10 13:08:29 +01:00
|
|
|
return css::uno::Sequence<sal_Int8>();
|
2007-11-01 14:38:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Reference< XInterface > SAL_CALL OAdvancedSettingsDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory)
|
|
|
|
{
|
2013-03-19 13:08:47 +02:00
|
|
|
return *(new OAdvancedSettingsDialog( comphelper::getComponentContext(_rxFactory) ));
|
2007-11-01 14:38:20 +00:00
|
|
|
}
|
|
|
|
|
2014-02-25 21:31:58 +01:00
|
|
|
OUString SAL_CALL OAdvancedSettingsDialog::getImplementationName() throw(RuntimeException, std::exception)
|
2007-11-01 14:38:20 +00:00
|
|
|
{
|
|
|
|
return getImplementationName_Static();
|
|
|
|
}
|
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString OAdvancedSettingsDialog::getImplementationName_Static() throw(RuntimeException)
|
2007-11-01 14:38:20 +00:00
|
|
|
{
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString("org.openoffice.comp.dbu.OAdvancedSettingsDialog");
|
2007-11-01 14:38:20 +00:00
|
|
|
}
|
|
|
|
|
2014-02-25 21:31:58 +01:00
|
|
|
::comphelper::StringSequence SAL_CALL OAdvancedSettingsDialog::getSupportedServiceNames() throw(RuntimeException, std::exception)
|
2007-11-01 14:38:20 +00:00
|
|
|
{
|
|
|
|
return getSupportedServiceNames_Static();
|
|
|
|
}
|
|
|
|
|
|
|
|
::comphelper::StringSequence OAdvancedSettingsDialog::getSupportedServiceNames_Static() throw(RuntimeException)
|
|
|
|
{
|
|
|
|
::comphelper::StringSequence aSupported(1);
|
2013-11-04 13:33:17 +02:00
|
|
|
aSupported[0] = "com.sun.star.sdb.AdvancedDatabaseSettingsDialog";
|
2007-11-01 14:38:20 +00:00
|
|
|
return aSupported;
|
|
|
|
}
|
|
|
|
|
2014-02-25 21:31:58 +01:00
|
|
|
Reference<XPropertySetInfo> SAL_CALL OAdvancedSettingsDialog::getPropertySetInfo() throw(RuntimeException, std::exception)
|
2007-11-01 14:38:20 +00:00
|
|
|
{
|
|
|
|
Reference<XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) );
|
|
|
|
return xInfo;
|
|
|
|
}
|
|
|
|
|
|
|
|
::cppu::IPropertyArrayHelper& OAdvancedSettingsDialog::getInfoHelper()
|
|
|
|
{
|
2015-04-13 12:35:57 +02:00
|
|
|
return *getArrayHelper();
|
2007-11-01 14:38:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
::cppu::IPropertyArrayHelper* OAdvancedSettingsDialog::createArrayHelper( ) const
|
|
|
|
{
|
|
|
|
Sequence< Property > aProps;
|
|
|
|
describeProperties(aProps);
|
|
|
|
return new ::cppu::OPropertyArrayHelper(aProps);
|
|
|
|
}
|
2015-04-17 12:10:27 +01:00
|
|
|
VclPtr<Dialog> OAdvancedSettingsDialog::createDialog(vcl::Window* _pParent)
|
2007-11-01 14:38:20 +00:00
|
|
|
{
|
2015-04-17 12:10:27 +01:00
|
|
|
return VclPtr<AdvancedSettingsDialog>::Create(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection);
|
2007-11-01 14:38:20 +00:00
|
|
|
}
|
2004-08-02 15:20:11 +00:00
|
|
|
|
|
|
|
} // namespace dbaui
|
|
|
|
|
2007-11-01 14:38:20 +00:00
|
|
|
extern "C" void SAL_CALL createRegistryInfo_OAdvancedSettingsDialog()
|
|
|
|
{
|
|
|
|
static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::OAdvancedSettingsDialog > aAutoRegistration;
|
|
|
|
}
|
2010-10-12 15:59:03 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|