LCOV - code coverage report
Current view: top level - dbaccess/source/ui/uno - AdvancedSettingsDlg.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 9 33 27.3 %
Date: 2014-11-03 Functions: 5 16 31.2 %
Legend: Lines: hit not hit

          Line data    Source code
       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 <sal/config.h>
      21             : 
      22             : #include "uiservices.hxx"
      23             : #include "unoadmin.hxx"
      24             : #include "dbu_reghelper.hxx"
      25             : #include "advancedsettingsdlg.hxx"
      26             : #include <comphelper/processfactory.hxx>
      27             : 
      28             : namespace dbaui
      29             : {
      30             : 
      31             :     using namespace ::com::sun::star::uno;
      32             :     using namespace ::com::sun::star::lang;
      33             :     using namespace ::com::sun::star::beans;
      34             : 
      35             :     // OAdvancedSettingsDialog
      36           0 :     class OAdvancedSettingsDialog
      37             :             :public ODatabaseAdministrationDialog
      38             :             ,public ::comphelper::OPropertyArrayUsageHelper< OAdvancedSettingsDialog >
      39             :     {
      40             : 
      41             :     protected:
      42             :         OAdvancedSettingsDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB);
      43             : 
      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;
      47             : 
      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;
      51             : 
      52             :         // XServiceInfo - static methods
      53             :         static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
      54             :         static OUString getImplementationName_Static(void) 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 >&);
      57             : 
      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;
      61             : 
      62             :         // OPropertyArrayUsageHelper
      63             :         virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const SAL_OVERRIDE;
      64             :     protected:
      65             :     // OGenericUnoDialog overridables
      66             :         virtual Dialog* createDialog(vcl::Window* _pParent) SAL_OVERRIDE;
      67             :     };
      68             : 
      69           0 :     OAdvancedSettingsDialog::OAdvancedSettingsDialog(const Reference< XComponentContext >& _rxORB)
      70           0 :         :ODatabaseAdministrationDialog(_rxORB)
      71             :     {
      72           0 :     }
      73           0 :     Sequence<sal_Int8> SAL_CALL OAdvancedSettingsDialog::getImplementationId(  ) throw(RuntimeException, std::exception)
      74             :     {
      75           0 :         return css::uno::Sequence<sal_Int8>();
      76             :     }
      77             : 
      78           0 :     Reference< XInterface > SAL_CALL OAdvancedSettingsDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory)
      79             :     {
      80           0 :         return *(new OAdvancedSettingsDialog( comphelper::getComponentContext(_rxFactory) ));
      81             :     }
      82             : 
      83           0 :     OUString SAL_CALL OAdvancedSettingsDialog::getImplementationName() throw(RuntimeException, std::exception)
      84             :     {
      85           0 :         return getImplementationName_Static();
      86             :     }
      87             : 
      88          48 :     OUString OAdvancedSettingsDialog::getImplementationName_Static() throw(RuntimeException)
      89             :     {
      90          48 :         return OUString("org.openoffice.comp.dbu.OAdvancedSettingsDialog");
      91             :     }
      92             : 
      93           0 :     ::comphelper::StringSequence SAL_CALL OAdvancedSettingsDialog::getSupportedServiceNames() throw(RuntimeException, std::exception)
      94             :     {
      95           0 :         return getSupportedServiceNames_Static();
      96             :     }
      97             : 
      98          24 :     ::comphelper::StringSequence OAdvancedSettingsDialog::getSupportedServiceNames_Static() throw(RuntimeException)
      99             :     {
     100          24 :         ::comphelper::StringSequence aSupported(1);
     101          24 :         aSupported[0] = "com.sun.star.sdb.AdvancedDatabaseSettingsDialog";
     102          24 :         return aSupported;
     103             :     }
     104             : 
     105           0 :     Reference<XPropertySetInfo>  SAL_CALL OAdvancedSettingsDialog::getPropertySetInfo() throw(RuntimeException, std::exception)
     106             :     {
     107           0 :         Reference<XPropertySetInfo>  xInfo( createPropertySetInfo( getInfoHelper() ) );
     108           0 :         return xInfo;
     109             :     }
     110             : 
     111           0 :     ::cppu::IPropertyArrayHelper& OAdvancedSettingsDialog::getInfoHelper()
     112             :     {
     113           0 :         return *const_cast<OAdvancedSettingsDialog*>(this)->getArrayHelper();
     114             :     }
     115             : 
     116           0 :     ::cppu::IPropertyArrayHelper* OAdvancedSettingsDialog::createArrayHelper( ) const
     117             :     {
     118           0 :         Sequence< Property > aProps;
     119           0 :         describeProperties(aProps);
     120           0 :         return new ::cppu::OPropertyArrayHelper(aProps);
     121             :     }
     122           0 :     Dialog* OAdvancedSettingsDialog::createDialog(vcl::Window* _pParent)
     123             :     {
     124           0 :         AdvancedSettingsDialog* pDlg = new AdvancedSettingsDialog(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection);
     125           0 :         return pDlg;
     126             :     }
     127             : 
     128             : }   // namespace dbaui
     129             : 
     130          24 : extern "C" void SAL_CALL createRegistryInfo_OAdvancedSettingsDialog()
     131             : {
     132          24 :     static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::OAdvancedSettingsDialog > aAutoRegistration;
     133          96 : }
     134             : 
     135             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10