LCOV - code coverage report
Current view: top level - toolkit/source/awt - vclxpointer.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 10 20 50.0 %
Date: 2015-06-13 12:38:46 Functions: 6 12 50.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 <com/sun/star/uno/XComponentContext.hpp>
      21             : #include <toolkit/awt/vclxpointer.hxx>
      22             : #include <toolkit/helper/macros.hxx>
      23             : #include <cppuhelper/supportsservice.hxx>
      24             : 
      25           1 : VCLXPointer::VCLXPointer()
      26             : {
      27           1 : }
      28             : 
      29           2 : VCLXPointer::~VCLXPointer()
      30             : {
      31           2 : }
      32             : 
      33             : // ::com::sun::star::lang::XUnoTunnel
      34           0 : IMPL_XUNOTUNNEL( VCLXPointer )
      35             : 
      36           0 : void VCLXPointer::setType( sal_Int32 nType ) throw(::com::sun::star::uno::RuntimeException, std::exception)
      37             : {
      38           0 :     ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
      39             : 
      40           0 :     maPointer = Pointer( (PointerStyle)nType );
      41           0 : }
      42             : 
      43           0 : sal_Int32 VCLXPointer::getType() throw(::com::sun::star::uno::RuntimeException, std::exception)
      44             : {
      45           0 :     ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
      46             : 
      47           0 :     return (sal_Int32)maPointer.GetStyle();
      48             : }
      49             : 
      50           1 : OUString VCLXPointer::getImplementationName()
      51             :     throw (css::uno::RuntimeException, std::exception)
      52             : {
      53           1 :     return OUString("stardiv.Toolkit.VCLXPointer");
      54             : }
      55             : 
      56           0 : sal_Bool VCLXPointer::supportsService(OUString const & ServiceName)
      57             :     throw (css::uno::RuntimeException, std::exception)
      58             : {
      59           0 :     return cppu::supportsService(this, ServiceName);
      60             : }
      61             : 
      62           1 : css::uno::Sequence<OUString> VCLXPointer::getSupportedServiceNames()
      63             :     throw (css::uno::RuntimeException, std::exception)
      64             : {
      65             :     return css::uno::Sequence<OUString>{
      66           1 :         "com.sun.star.awt.Pointer", "stardiv.vcl.Pointer"};
      67             : }
      68             : 
      69             : extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
      70           1 : stardiv_Toolkit_VCLXPointer_get_implementation(
      71             :     css::uno::XComponentContext *,
      72             :     css::uno::Sequence<css::uno::Any> const &)
      73             : {
      74           1 :     return cppu::acquire(new VCLXPointer());
      75             : }
      76             : 
      77             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11