LCOV - code coverage report
Current view: top level - editeng/source/uno - unopracc.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 6 38 15.8 %
Date: 2014-11-03 Functions: 4 15 26.7 %
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 <cppuhelper/typeprovider.hxx>
      22             : #include <com/sun/star/uno/Any.hxx>
      23             : #include <com/sun/star/uno/Reference.hxx>
      24             : #include <com/sun/star/lang/XComponent.hpp>
      25             : #include <comphelper/servicehelper.hxx>
      26             : #include <cppuhelper/supportsservice.hxx>
      27             : #include <cppuhelper/weakref.hxx>
      28             : #include <editeng/unopracc.hxx>
      29             : #include <editeng/unoedsrc.hxx>
      30             : #include <osl/mutex.hxx>
      31             : 
      32             : using namespace ::com::sun::star;
      33             : 
      34             : 
      35           4 : SvxAccessibleTextPropertySet::SvxAccessibleTextPropertySet( const SvxEditSource* pEditSrc, const SvxItemPropertySet* pPropSet )
      36           4 :     : SvxUnoTextRangeBase( pEditSrc, pPropSet )
      37             : {
      38           4 : }
      39             : 
      40           4 : SvxAccessibleTextPropertySet::~SvxAccessibleTextPropertySet() throw()
      41             : {
      42           4 : }
      43             : 
      44           0 : uno::Reference< text::XText > SAL_CALL SvxAccessibleTextPropertySet::getText() throw (uno::RuntimeException, std::exception)
      45             : {
      46             :   // TODO (empty?)
      47           0 :   return uno::Reference< text::XText > ();
      48             : }
      49             : 
      50           0 : uno::Any SAL_CALL SvxAccessibleTextPropertySet::queryAggregation( const uno::Type & ) throw(uno::RuntimeException)
      51             : {
      52             :   // TODO (empty?)
      53           0 :   return uno::Any();
      54             : }
      55             : 
      56           0 : uno::Any SAL_CALL SvxAccessibleTextPropertySet::queryInterface( const uno::Type & rType )
      57             :     throw(uno::RuntimeException, std::exception)
      58             : {
      59           0 :     return OWeakObject::queryInterface(rType);
      60             : }
      61             : 
      62           0 : void SAL_CALL SvxAccessibleTextPropertySet::acquire()
      63             :     throw()
      64             : {
      65           0 :     OWeakObject::acquire();
      66           0 : }
      67             : 
      68           0 : void SAL_CALL SvxAccessibleTextPropertySet::release()
      69             :     throw()
      70             : {
      71           0 :     OWeakObject::release();
      72           0 : }
      73             : 
      74             : // XTypeProvider
      75           0 : uno::Sequence< uno::Type > SAL_CALL SvxAccessibleTextPropertySet::getTypes() throw ( uno::RuntimeException, std::exception )
      76             : {
      77             :     static ::cppu::OTypeCollection* pTypeCollection = NULL ;
      78             : 
      79             :     // double-checked locking pattern.
      80           0 :     if ( pTypeCollection == NULL )
      81             :     {
      82           0 :         osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ;
      83             : 
      84             :         // Control these pointer again ... it can be, that another instance will be faster then these!
      85           0 :         if ( pTypeCollection == NULL )
      86             :         {
      87             :             // Create a static typecollection ...
      88             :             static ::cppu::OTypeCollection aTypeCollection(
      89           0 :                 ::cppu::UnoType<beans::XPropertySet>::get(),
      90           0 :                 ::cppu::UnoType<beans::XMultiPropertySet>::get(),
      91           0 :                 ::cppu::UnoType<beans::XPropertyState>::get(),
      92           0 :                 ::cppu::UnoType<lang::XServiceInfo>::get(),
      93           0 :                 ::cppu::UnoType<lang::XTypeProvider>::get() );
      94             : 
      95             :             // ... and set his address to static pointer!
      96           0 :             pTypeCollection = &aTypeCollection ;
      97           0 :         }
      98             :     }
      99             : 
     100           0 :     return pTypeCollection->getTypes() ;
     101             : }
     102             : 
     103           0 : uno::Sequence< sal_Int8 > SAL_CALL SvxAccessibleTextPropertySet::getImplementationId()
     104             :     throw (uno::RuntimeException, std::exception)
     105             : {
     106           0 :     return css::uno::Sequence<sal_Int8>();
     107             : }
     108             : 
     109             : // XServiceInfo
     110           0 : OUString SAL_CALL SAL_CALL SvxAccessibleTextPropertySet::getImplementationName (void) throw (uno::RuntimeException, std::exception)
     111             : {
     112           0 :     return OUString("SvxAccessibleTextPropertySet");
     113             : }
     114             : 
     115           0 : sal_Bool SAL_CALL SvxAccessibleTextPropertySet::supportsService (const OUString& sServiceName) throw (uno::RuntimeException, std::exception)
     116             : {
     117           0 :     return cppu::supportsService(this, sServiceName);
     118             : }
     119             : 
     120           0 : uno::Sequence< OUString> SAL_CALL SvxAccessibleTextPropertySet::getSupportedServiceNames (void) throw (uno::RuntimeException, std::exception)
     121             : {
     122             :     // TODO
     123           0 :     return SvxUnoTextRangeBase::getSupportedServiceNames();
     124         669 : }
     125             : 
     126             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10