LCOV - code coverage report
Current view: top level - ucbhelper/source/client - commandenvironment.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 13 16 81.2 %
Date: 2012-08-25 Functions: 9 12 75.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 7 56 12.5 %

           Branch data     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                 :            : /**************************************************************************
      22                 :            :                                 TODO
      23                 :            :  **************************************************************************
      24                 :            : 
      25                 :            :  *************************************************************************/
      26                 :            : #include <com/sun/star/lang/XMultiServiceFactory.hpp>
      27                 :            : #include <com/sun/star/lang/XComponent.hpp>
      28                 :            : #include <com/sun/star/ucb/XContentIdentifierFactory.hpp>
      29                 :            : #include <com/sun/star/ucb/XContentProvider.hpp>
      30                 :            : #include <com/sun/star/ucb/XContentProviderManager.hpp>
      31                 :            : #include <ucbhelper/commandenvironment.hxx>
      32                 :            : 
      33                 :            : using namespace com::sun::star::lang;
      34                 :            : using namespace com::sun::star::task;
      35                 :            : using namespace com::sun::star::ucb;
      36                 :            : using namespace com::sun::star::uno;
      37                 :            : 
      38                 :            : namespace ucbhelper
      39                 :            : {
      40                 :            : 
      41                 :            : //=========================================================================
      42                 :            : //=========================================================================
      43                 :            : //
      44                 :            : // struct CommandEnvironment_Impl.
      45                 :            : //
      46                 :            : //=========================================================================
      47                 :            : //=========================================================================
      48                 :            : 
      49                 :       2693 : struct CommandEnvironment_Impl
      50                 :            : {
      51                 :            :     Reference< XInteractionHandler > m_xInteractionHandler;
      52                 :            :     Reference< XProgressHandler >    m_xProgressHandler;
      53                 :            : 
      54                 :       2693 :     CommandEnvironment_Impl(
      55                 :            :         const Reference< XInteractionHandler >& rxInteractionHandler,
      56                 :            :         const Reference< XProgressHandler >& rxProgressHandler )
      57                 :            :     : m_xInteractionHandler( rxInteractionHandler ),
      58                 :       2693 :       m_xProgressHandler( rxProgressHandler ) {}
      59                 :            : };
      60                 :            : 
      61                 :            : //=========================================================================
      62                 :            : //=========================================================================
      63                 :            : //
      64                 :            : // CommandEnvironment Implementation.
      65                 :            : //
      66                 :            : //=========================================================================
      67                 :            : //=========================================================================
      68                 :            : 
      69                 :       2693 : CommandEnvironment::CommandEnvironment(
      70                 :            :         const Reference< XInteractionHandler >& rxInteractionHandler,
      71                 :       2693 :         const Reference< XProgressHandler >& rxProgressHandler )
      72                 :            : {
      73                 :            :     m_pImpl = new CommandEnvironment_Impl( rxInteractionHandler,
      74 [ +  - ][ +  - ]:       2693 :                                            rxProgressHandler );
      75                 :       2693 : }
      76                 :            : 
      77                 :            : //=========================================================================
      78                 :            : // virtual
      79                 :       2693 : CommandEnvironment::~CommandEnvironment()
      80                 :            : {
      81 [ +  - ][ +  - ]:       2693 :     delete m_pImpl;
      82         [ -  + ]:       5386 : }
      83                 :            : 
      84                 :            : //=========================================================================
      85                 :            : //
      86                 :            : // XInterface methods
      87                 :            : //
      88                 :            : //=========================================================================
      89                 :            : 
      90 [ +  - ][ +  - ]:      48050 : XINTERFACE_IMPL_2( CommandEnvironment,
                 [ #  # ]
      91                 :            :                    XTypeProvider,
      92                 :            :                    XCommandEnvironment );
      93                 :            : 
      94                 :            : //=========================================================================
      95                 :            : //
      96                 :            : // XTypeProvider methods
      97                 :            : //
      98                 :            : //=========================================================================
      99                 :            : 
     100 [ #  # ][ #  # ]:          0 : XTYPEPROVIDER_IMPL_2( CommandEnvironment,
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     101                 :            :                       XTypeProvider,
     102                 :            :                       XCommandEnvironment );
     103                 :            : 
     104                 :            : //=========================================================================
     105                 :            : //
     106                 :            : // XCommandEnvironemnt methods.
     107                 :            : //
     108                 :            : //=========================================================================
     109                 :            : 
     110                 :            : // virtual
     111                 :            : Reference< XInteractionHandler > SAL_CALL
     112                 :         93 : CommandEnvironment::getInteractionHandler()
     113                 :            :     throw ( RuntimeException )
     114                 :            : {
     115                 :         93 :     return m_pImpl->m_xInteractionHandler;
     116                 :            : }
     117                 :            : 
     118                 :            : //=========================================================================
     119                 :            : // virtual
     120                 :            : Reference< XProgressHandler > SAL_CALL
     121                 :          0 : CommandEnvironment::getProgressHandler()
     122                 :            :     throw ( RuntimeException )
     123                 :            : {
     124                 :          0 :     return m_pImpl->m_xProgressHandler;
     125                 :            : }
     126                 :            : 
     127                 :            : } /* namespace ucbhelper */
     128                 :            : 
     129                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10