LCOV - code coverage report
Current view: top level - libreoffice/comphelper/source/misc - ihwrapnofilter.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 39 0.0 %
Date: 2012-12-27 Functions: 0 11 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             : 
      21             : #include "comphelper/ihwrapnofilter.hxx"
      22             : #include <com/sun/star/document/NoSuchFilterRequest.hpp>
      23             : 
      24             : //.........................................................................
      25             : namespace comphelper
      26             : {
      27             : //.........................................................................
      28             : 
      29             :     using namespace ::com::sun::star;
      30             : 
      31             :     //----------------------------------------------------------------------------------------------------
      32           0 :     OIHWrapNoFilterDialog::OIHWrapNoFilterDialog( uno::Reference< task::XInteractionHandler > xInteraction )
      33           0 :         :m_xInter( xInteraction )
      34             :     {
      35           0 :     }
      36             : 
      37           0 :     OIHWrapNoFilterDialog::~OIHWrapNoFilterDialog()
      38             :     {
      39           0 :     }
      40             : 
      41             :     //----------------------------------------------------------------------------------------------------
      42           0 :     uno::Sequence< ::rtl::OUString > SAL_CALL OIHWrapNoFilterDialog::impl_staticGetSupportedServiceNames()
      43             :     {
      44           0 :         uno::Sequence< ::rtl::OUString > aRet(1);
      45           0 :         aRet[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.InteractionHandlerWrapper"));
      46           0 :         return aRet;
      47             :     }
      48             : 
      49           0 :     ::rtl::OUString SAL_CALL OIHWrapNoFilterDialog::impl_staticGetImplementationName()
      50             :     {
      51           0 :         return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.task.InteractionHandlerWrapper"));
      52             :     }
      53             : 
      54             :     //----------------------------------------------------------------------------------------------------
      55             :     // XInteractionHandler
      56             :     //----------------------------------------------------------------------------------------------------
      57           0 :     void SAL_CALL OIHWrapNoFilterDialog::handle( const uno::Reference< task::XInteractionRequest >& xRequest)
      58             :             throw( com::sun::star::uno::RuntimeException )
      59             :     {
      60           0 :         if( !m_xInter.is() )
      61             :             return;
      62             : 
      63           0 :         uno::Any aRequest = xRequest->getRequest();
      64           0 :         document::NoSuchFilterRequest aNoSuchFilterRequest;
      65           0 :         if ( aRequest >>= aNoSuchFilterRequest )
      66             :             return;
      67             :         else
      68           0 :             m_xInter->handle( xRequest );
      69             :     }
      70             : 
      71             :     //----------------------------------------------------------------------------------------------------
      72             :     // XInteractionHandler2
      73             :     //----------------------------------------------------------------------------------------------------
      74           0 :     sal_Bool SAL_CALL OIHWrapNoFilterDialog::handleInteractionRequest( const uno::Reference< task::XInteractionRequest >& xRequest)
      75             :             throw( com::sun::star::uno::RuntimeException )
      76             :     {
      77           0 :         if( !m_xInter.is() )
      78           0 :             return sal_False;
      79             : 
      80           0 :         uno::Any aRequest = xRequest->getRequest();
      81           0 :         document::NoSuchFilterRequest aNoSuchFilterRequest;
      82           0 :         if ( aRequest >>= aNoSuchFilterRequest )
      83           0 :             return sal_False;
      84             :         else
      85             :         {
      86           0 :             m_xInter->handle( xRequest );
      87           0 :             return sal_True;
      88           0 :         }
      89             :     }
      90             : 
      91             :     //----------------------------------------------------------------------------------------------------
      92             :     // XInitialization
      93             :     //----------------------------------------------------------------------------------------------------
      94           0 :     void SAL_CALL OIHWrapNoFilterDialog::initialize( const uno::Sequence< uno::Any >& )
      95             :         throw ( uno::Exception,
      96             :         uno::RuntimeException,
      97             :         frame::DoubleInitializationException )
      98             :     {
      99           0 :     }
     100             : 
     101             :     //----------------------------------------------------------------------------------------------------
     102             :     // XServiceInfo
     103             :     //----------------------------------------------------------------------------------------------------
     104             : 
     105           0 :     ::rtl::OUString SAL_CALL OIHWrapNoFilterDialog::getImplementationName()
     106             :         throw ( uno::RuntimeException )
     107             :     {
     108           0 :         return impl_staticGetImplementationName();
     109             :     }
     110             : 
     111           0 :     ::sal_Bool SAL_CALL OIHWrapNoFilterDialog::supportsService( const ::rtl::OUString& ServiceName )
     112             :         throw ( uno::RuntimeException )
     113             :     {
     114           0 :         uno::Sequence< ::rtl::OUString > aSeq = impl_staticGetSupportedServiceNames();
     115             : 
     116           0 :         for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ )
     117           0 :             if ( ServiceName.compareTo( aSeq[nInd] ) == 0 )
     118           0 :                 return sal_True;
     119             : 
     120           0 :         return sal_False;
     121             :     }
     122             : 
     123           0 :     uno::Sequence< ::rtl::OUString > SAL_CALL OIHWrapNoFilterDialog::getSupportedServiceNames()
     124             :         throw ( uno::RuntimeException )
     125             :     {
     126           0 :         return impl_staticGetSupportedServiceNames();
     127             :     }
     128             : }
     129             : 
     130             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10