LCOV - code coverage report
Current view: top level - extensions/source/propctrlr - pcrunodialogs.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 11 56 19.6 %
Date: 2014-11-03 Functions: 5 17 29.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             : #include <sal/config.h>
      21             : 
      22             : #include <com/sun/star/beans/NamedValue.hpp>
      23             : 
      24             : #include "pcrservices.hxx"
      25             : #include "pcrunodialogs.hxx"
      26             : #include "formstrings.hxx"
      27             : #include "pcrstrings.hxx"
      28             : #include "taborder.hxx"
      29             : #include "pcrcommon.hxx"
      30             : 
      31           4 : extern "C" void SAL_CALL createRegistryInfo_OTabOrderDialog()
      32             : {
      33           4 :     ::pcr::OAutoRegistration< ::pcr::OTabOrderDialog > aAutoRegistration;
      34           4 : }
      35             : 
      36             : 
      37             : namespace pcr
      38             : {
      39             : 
      40             : 
      41             :     using namespace ::com::sun::star::uno;
      42             :     using namespace ::com::sun::star::lang;
      43             :     using namespace ::com::sun::star::beans;
      44             : 
      45             : 
      46             :     //= OTabOrderDialog
      47             : 
      48             : 
      49           0 :     OTabOrderDialog::OTabOrderDialog( const Reference< XComponentContext >& _rxContext )
      50           0 :         :OGenericUnoDialog( _rxContext )
      51             :     {
      52             :         registerProperty( PROPERTY_CONTROLCONTEXT, OWN_PROPERTY_ID_CONTROLCONTEXT,
      53             :             PropertyAttribute::BOUND | PropertyAttribute::TRANSIENT,
      54           0 :             &m_xControlContext, ::getCppuType( &m_xControlContext ) );
      55             : 
      56             :         registerProperty( PROPERTY_TABBINGMODEL, OWN_PROPERTY_ID_TABBINGMODEL,
      57             :             PropertyAttribute::BOUND | PropertyAttribute::TRANSIENT,
      58           0 :             &m_xTabbingModel, ::getCppuType( &m_xTabbingModel ) );
      59           0 :     }
      60             : 
      61             : 
      62           0 :     OTabOrderDialog::~OTabOrderDialog()
      63             :     {
      64           0 :         if ( m_pDialog )
      65             :         {
      66           0 :             ::osl::MutexGuard aGuard( m_aMutex );
      67           0 :             if ( m_pDialog )
      68           0 :                 destroyDialog();
      69             :         }
      70           0 :     }
      71             : 
      72             : 
      73           0 :     Sequence<sal_Int8> SAL_CALL OTabOrderDialog::getImplementationId(  ) throw(RuntimeException, std::exception)
      74             :     {
      75           0 :         return css::uno::Sequence<sal_Int8>();
      76             :     }
      77             : 
      78             : 
      79           0 :     Reference< XInterface > SAL_CALL OTabOrderDialog::Create( const Reference< XComponentContext >& _rxContext )
      80             :     {
      81           0 :         return *( new OTabOrderDialog( _rxContext ) );
      82             :     }
      83             : 
      84             : 
      85           0 :     OUString SAL_CALL OTabOrderDialog::getImplementationName() throw(RuntimeException, std::exception)
      86             :     {
      87           0 :         return getImplementationName_static();
      88             :     }
      89             : 
      90             : 
      91           4 :     OUString OTabOrderDialog::getImplementationName_static() throw(RuntimeException)
      92             :     {
      93           4 :         return OUString("org.openoffice.comp.form.ui.OTabOrderDialog");
      94             :     }
      95             : 
      96             : 
      97           0 :     ::comphelper::StringSequence SAL_CALL OTabOrderDialog::getSupportedServiceNames() throw(RuntimeException, std::exception)
      98             :     {
      99           0 :         return getSupportedServiceNames_static();
     100             :     }
     101             : 
     102             : 
     103           4 :     ::comphelper::StringSequence OTabOrderDialog::getSupportedServiceNames_static() throw(RuntimeException)
     104             :     {
     105           4 :         ::comphelper::StringSequence aSupported(2);
     106           4 :         aSupported.getArray()[0] = "com.sun.star.form.ui.TabOrderDialog";
     107           4 :         aSupported.getArray()[1] = "com.sun.star.form.TabOrderDialog";
     108           4 :         return aSupported;
     109             :     }
     110             : 
     111             : 
     112           0 :     Reference<XPropertySetInfo>  SAL_CALL OTabOrderDialog::getPropertySetInfo() throw(RuntimeException, std::exception)
     113             :     {
     114           0 :         Reference<XPropertySetInfo>  xInfo( createPropertySetInfo( getInfoHelper() ) );
     115           0 :         return xInfo;
     116             :     }
     117             : 
     118             : 
     119           0 :     ::cppu::IPropertyArrayHelper& OTabOrderDialog::getInfoHelper()
     120             :     {
     121           0 :         return *const_cast< OTabOrderDialog* >( this )->getArrayHelper();
     122             :     }
     123             : 
     124             : 
     125           0 :     ::cppu::IPropertyArrayHelper* OTabOrderDialog::createArrayHelper( ) const
     126             :     {
     127           0 :         Sequence< Property > aProps;
     128           0 :         describeProperties( aProps );
     129           0 :         return new ::cppu::OPropertyArrayHelper( aProps );
     130             :     }
     131             : 
     132             : 
     133           0 :     Dialog* OTabOrderDialog::createDialog( vcl::Window* _pParent )
     134             :     {
     135           0 :         return new TabOrderDialog( _pParent, m_xTabbingModel, m_xControlContext, m_aContext );
     136             :     }
     137             : 
     138           0 :     void OTabOrderDialog::initialize( const Sequence< Any >& aArguments ) throw(Exception, RuntimeException, std::exception)
     139             :     {
     140           0 :         Reference<css::awt::XTabControllerModel> xTabbingModel;
     141           0 :         Reference<css::awt::XControlContainer> xControlContext;
     142           0 :         Reference<css::awt::XWindow> xParentWindow;
     143           0 :         if (aArguments.getLength() == 3 && (aArguments[0] >>= xTabbingModel) && (aArguments[1] >>= xControlContext) && (aArguments[2] >>= xParentWindow))
     144             :         {
     145           0 :             Sequence< Any > aNewArguments( 3 );
     146           0 :             aNewArguments[0] <<= NamedValue(
     147             :                 OUString( "TabbingModel" ),
     148             :                 makeAny( xTabbingModel )
     149           0 :             );
     150           0 :             aNewArguments[1] <<= NamedValue(
     151             :                 OUString( "ControlContext" ),
     152             :                 makeAny( xControlContext )
     153           0 :             );
     154           0 :             aNewArguments[2] <<= NamedValue(
     155             :                 OUString( "ParentWindow"  ),
     156             :                 makeAny( xParentWindow )
     157           0 :             );
     158           0 :             OTabOrderDialog_DBase::initialize(aNewArguments);
     159             :         }
     160             :         else
     161           0 :             OTabOrderDialog_DBase::initialize(aArguments);
     162           0 :     }
     163             : 
     164             : 
     165             : 
     166             : 
     167          12 : }   // namespace pcr
     168             : 
     169             : 
     170             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10