LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/dbaccess/source/ui/uno - admindlg.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 24 36 66.7 %
Date: 2013-07-09 Functions: 10 14 71.4 %
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             : 
      21             : #include "dbu_reghelper.hxx"
      22             : #include "admindlg.hxx"
      23             : #include "dbadmin.hxx"
      24             : #include <comphelper/processfactory.hxx>
      25             : 
      26             : 
      27             : using namespace dbaui;
      28             : 
      29           4 : extern "C" void SAL_CALL createRegistryInfo_ODataSourcePropertyDialog()
      30             : {
      31           4 :     static OMultiInstanceAutoRegistration< ODataSourcePropertyDialog > aAutoRegistration;
      32           4 : }
      33             : 
      34             : //.........................................................................
      35             : namespace dbaui
      36             : {
      37             : //.........................................................................
      38             : 
      39             :     using namespace ::com::sun::star::uno;
      40             :     using namespace ::com::sun::star::lang;
      41             :     using namespace ::com::sun::star::beans;
      42             : 
      43             : //=========================================================================
      44             : //-------------------------------------------------------------------------
      45           2 : ODataSourcePropertyDialog::ODataSourcePropertyDialog(const Reference< XComponentContext >& _rxORB)
      46           2 :     :ODatabaseAdministrationDialog(_rxORB)
      47             : {
      48           2 : }
      49             : //-------------------------------------------------------------------------
      50           0 : Sequence<sal_Int8> SAL_CALL ODataSourcePropertyDialog::getImplementationId(  ) throw(RuntimeException)
      51             : {
      52           0 :     static ::cppu::OImplementationId aId;
      53           0 :     return aId.getImplementationId();
      54             : }
      55             : 
      56             : //-------------------------------------------------------------------------
      57           2 : Reference< XInterface > SAL_CALL ODataSourcePropertyDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory)
      58             : {
      59           2 :     return *(new ODataSourcePropertyDialog( comphelper::getComponentContext(_rxFactory) ));
      60             : }
      61             : 
      62             : //-------------------------------------------------------------------------
      63           0 : OUString SAL_CALL ODataSourcePropertyDialog::getImplementationName() throw(RuntimeException)
      64             : {
      65           0 :     return getImplementationName_Static();
      66             : }
      67             : 
      68             : //-------------------------------------------------------------------------
      69           8 : OUString ODataSourcePropertyDialog::getImplementationName_Static() throw(RuntimeException)
      70             : {
      71           8 :     return OUString("org.openoffice.comp.dbu.ODatasourceAdministrationDialog");
      72             : }
      73             : 
      74             : //-------------------------------------------------------------------------
      75           0 : ::comphelper::StringSequence SAL_CALL ODataSourcePropertyDialog::getSupportedServiceNames() throw(RuntimeException)
      76             : {
      77           0 :     return getSupportedServiceNames_Static();
      78             : }
      79             : 
      80             : //-------------------------------------------------------------------------
      81           4 : ::comphelper::StringSequence ODataSourcePropertyDialog::getSupportedServiceNames_Static() throw(RuntimeException)
      82             : {
      83           4 :     ::comphelper::StringSequence aSupported(1);
      84           4 :     aSupported.getArray()[0] = OUString("com.sun.star.sdb.DatasourceAdministrationDialog");
      85           4 :     return aSupported;
      86             : }
      87             : 
      88             : //-------------------------------------------------------------------------
      89           1 : Reference<XPropertySetInfo>  SAL_CALL ODataSourcePropertyDialog::getPropertySetInfo() throw(RuntimeException)
      90             : {
      91           1 :     Reference<XPropertySetInfo>  xInfo( createPropertySetInfo( getInfoHelper() ) );
      92           1 :     return xInfo;
      93             : }
      94             : 
      95             : //-------------------------------------------------------------------------
      96          22 : ::cppu::IPropertyArrayHelper& ODataSourcePropertyDialog::getInfoHelper()
      97             : {
      98          22 :     return *const_cast<ODataSourcePropertyDialog*>(this)->getArrayHelper();
      99             : }
     100             : 
     101             : //------------------------------------------------------------------------------
     102           1 : ::cppu::IPropertyArrayHelper* ODataSourcePropertyDialog::createArrayHelper( ) const
     103             : {
     104           1 :     Sequence< Property > aProps;
     105           1 :     describeProperties(aProps);
     106           1 :     return new ::cppu::OPropertyArrayHelper(aProps);
     107             : }
     108             : //------------------------------------------------------------------------------
     109           0 : Dialog* ODataSourcePropertyDialog::createDialog(Window* _pParent)
     110             : {
     111             : 
     112           0 :     ODbAdminDialog* pDialog = new ODbAdminDialog(_pParent, m_pDatasourceItems, m_aContext);
     113             : 
     114             :     // the initial selection
     115           0 :     if ( m_aInitialSelection.hasValue() )
     116           0 :         pDialog->selectDataSource(m_aInitialSelection);
     117             : 
     118           0 :     return pDialog;
     119             : }
     120             : 
     121             : //.........................................................................
     122          12 : }   // namespace dbaui
     123             : //.........................................................................
     124             : 
     125             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10