LCOV - code coverage report
Current view: top level - dbaccess/source/ui/uno - DBTypeWizDlgSetup.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 40 0.0 %
Date: 2014-04-14 Functions: 0 15 0.0 %
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 "dbu_reghelper.hxx"
      21             : #include <com/sun/star/document/XEventListener.hpp>
      22             : #include <com/sun/star/container/XSet.hpp>
      23             : #include "DBTypeWizDlgSetup.hxx"
      24             : #include "dbwizsetup.hxx"
      25             : #include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
      26             : #include <com/sun/star/sdbc/XDataSource.hpp>
      27             : #include <vcl/msgbox.hxx>
      28             : #include <comphelper/processfactory.hxx>
      29             : 
      30             : using namespace dbaui;
      31             : 
      32           0 : extern "C" void SAL_CALL createRegistryInfo_ODBTypeWizDialogSetup()
      33             : {
      34           0 :     static OMultiInstanceAutoRegistration< ODBTypeWizDialogSetup > aAutoRegistration;
      35           0 : }
      36             : 
      37             : namespace dbaui
      38             : {
      39             : 
      40             :     using namespace ::com::sun::star::uno;
      41             :     using namespace ::com::sun::star::lang;
      42             :     using namespace ::com::sun::star::beans;
      43             :     using namespace ::com::sun::star::sdb;
      44             :     using namespace ::com::sun::star::sdbc;
      45             : 
      46           0 : ODBTypeWizDialogSetup::ODBTypeWizDialogSetup(const Reference< XComponentContext >& _rxORB)
      47             :     :ODatabaseAdministrationDialog(_rxORB)
      48             :     ,m_bOpenDatabase(sal_True)
      49           0 :     ,m_bStartTableWizard(sal_False)
      50             : {
      51             :     registerProperty(OUString("OpenDatabase"), 3, PropertyAttribute::TRANSIENT,
      52           0 :         &m_bOpenDatabase, getBooleanCppuType());
      53             : 
      54             :     registerProperty(OUString("StartTableWizard"), 4, PropertyAttribute::TRANSIENT,
      55           0 :         &m_bStartTableWizard, getBooleanCppuType());
      56           0 : }
      57             : 
      58           0 : Sequence<sal_Int8> SAL_CALL ODBTypeWizDialogSetup::getImplementationId(  ) throw(RuntimeException, std::exception)
      59             : {
      60           0 :     return css::uno::Sequence<sal_Int8>();
      61             : }
      62             : 
      63           0 : Reference< XInterface > SAL_CALL ODBTypeWizDialogSetup::Create(const Reference< XMultiServiceFactory >& _rxFactory)
      64             : {
      65           0 :     Reference < XInterface > xDBWizard = *(new ODBTypeWizDialogSetup( comphelper::getComponentContext(_rxFactory) ));
      66           0 :     return xDBWizard;
      67             : }
      68             : 
      69           0 : OUString SAL_CALL ODBTypeWizDialogSetup::getImplementationName() throw(RuntimeException, std::exception)
      70             : {
      71           0 :     return getImplementationName_Static();
      72             : }
      73             : 
      74           0 : OUString ODBTypeWizDialogSetup::getImplementationName_Static() throw(RuntimeException)
      75             : {
      76           0 :     return OUString("org.openoffice.comp.dbu.ODBTypeWizDialogSetup");
      77             : }
      78             : 
      79           0 : ::comphelper::StringSequence SAL_CALL ODBTypeWizDialogSetup::getSupportedServiceNames() throw(RuntimeException, std::exception)
      80             : {
      81           0 :     return getSupportedServiceNames_Static();
      82             : }
      83             : 
      84           0 : ::comphelper::StringSequence ODBTypeWizDialogSetup::getSupportedServiceNames_Static() throw(RuntimeException)
      85             : {
      86           0 :     ::comphelper::StringSequence aSupported(1);
      87           0 :     aSupported[0] = "com.sun.star.sdb.DatabaseWizardDialog";
      88           0 :     return aSupported;
      89             : }
      90             : 
      91           0 : Reference<XPropertySetInfo>  SAL_CALL ODBTypeWizDialogSetup::getPropertySetInfo() throw(RuntimeException, std::exception)
      92             : {
      93           0 :     return createPropertySetInfo( getInfoHelper() );
      94             : }
      95             : 
      96           0 : ::cppu::IPropertyArrayHelper& ODBTypeWizDialogSetup::getInfoHelper()
      97             : {
      98           0 :     return *const_cast<ODBTypeWizDialogSetup*>(this)->getArrayHelper();
      99             : }
     100             : 
     101           0 : ::cppu::IPropertyArrayHelper* ODBTypeWizDialogSetup::createArrayHelper( ) const
     102             : {
     103           0 :     Sequence< Property > aProps;
     104           0 :     describeProperties(aProps);
     105           0 :     return new ::cppu::OPropertyArrayHelper(aProps);
     106             : }
     107             : 
     108           0 : Dialog* ODBTypeWizDialogSetup::createDialog(Window* _pParent)
     109             : {
     110           0 :     return new ODbTypeWizDialogSetup(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection);
     111             : }
     112             : 
     113           0 : void ODBTypeWizDialogSetup::executedDialog(sal_Int16 _nExecutionResult)
     114             : {
     115           0 :     if ( _nExecutionResult == RET_OK )
     116             :     {
     117           0 :         const ODbTypeWizDialogSetup* pDialog = static_cast< ODbTypeWizDialogSetup* >( m_pDialog );
     118           0 :         m_bOpenDatabase = pDialog->IsDatabaseDocumentToBeOpened();
     119           0 :         m_bStartTableWizard = pDialog->IsTableWizardToBeStarted();
     120             :     }
     121           0 : }
     122             : 
     123           0 : }   // namespace dbaui
     124             : 
     125             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10