LCOV - code coverage report
Current view: top level - forms/source/inc - controlfeatureinterception.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 1 2 50.0 %
Date: 2012-08-25 Functions: 1 2 50.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 1 2 50.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #ifndef FORMS_SOURCE_INC_CONTROLFEATUREINTERCEPTION_HXX
      30                 :            : #define FORMS_SOURCE_INC_CONTROLFEATUREINTERCEPTION_HXX
      31                 :            : 
      32                 :            : #include <com/sun/star/lang/XMultiServiceFactory.hpp>
      33                 :            : #include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
      34                 :            : 
      35                 :            : #include <memory>
      36                 :            : 
      37                 :            : //........................................................................
      38                 :            : namespace frm
      39                 :            : {
      40                 :            : //........................................................................
      41                 :            : 
      42                 :            :     class UrlTransformer;
      43                 :            :     //====================================================================
      44                 :            :     //= ControlFeatureInterception
      45                 :            :     //====================================================================
      46                 :            :     /** helper class for controls which allow some of their features to be intercepted
      47                 :            :         by external instances
      48                 :            : 
      49                 :            :         For using this class, instantiate it as member, derive yourself from
      50                 :            :         <type scope="com::sun::star::frame">XDispatchProviderInterception</type>, and forward all
      51                 :            :         respective methods to this member.
      52                 :            : 
      53                 :            :         Additionally, don't forget to call <member>dispose</member> when your class is disposed itself.
      54                 :            :     */
      55         [ +  - ]:        208 :     class ControlFeatureInterception
      56                 :            :     {
      57                 :            :     private:
      58                 :            :         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor >
      59                 :            :                                             m_xFirstDispatchInterceptor;
      60                 :            :         SAL_WNODEPRECATED_DECLARATIONS_PUSH
      61                 :            :         ::std::auto_ptr< UrlTransformer >   m_pUrlTransformer;
      62                 :            :         SAL_WNODEPRECATED_DECLARATIONS_POP
      63                 :            : 
      64                 :            :     public:
      65                 :            :         /** retrieves our URL transformer, so our clients may use it, too
      66                 :            :         */
      67                 :          0 :         const UrlTransformer& getTransformer() const { return *m_pUrlTransformer; }
      68                 :            : 
      69                 :            :     public:
      70                 :            :         ControlFeatureInterception( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB );
      71                 :            : 
      72                 :            :         // XDispatchProviderInterception
      73                 :            :         void SAL_CALL registerDispatchProviderInterceptor( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor >& Interceptor ) throw (::com::sun::star::uno::RuntimeException );
      74                 :            :         void SAL_CALL releaseDispatchProviderInterceptor( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor >& Interceptor ) throw (::com::sun::star::uno::RuntimeException );
      75                 :            : 
      76                 :            :         // XComponent
      77                 :            :         void SAL_CALL dispose();
      78                 :            : 
      79                 :            :         /** queries the interceptor chain for the given dispatch
      80                 :            :         */
      81                 :            :         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >
      82                 :            :             queryDispatch( const ::com::sun::star::util::URL& _rURL, const ::rtl::OUString& _rTargetFrameName, ::sal_Int32 _nSearchFlags ) SAL_THROW((::com::sun::star::uno::RuntimeException));
      83                 :            : 
      84                 :            :         /** queries the interceptor chain for the given dispatch, with a blank target frame and no frame search flags
      85                 :            :         */
      86                 :            :         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >
      87                 :            :             queryDispatch( const ::com::sun::star::util::URL& _rURL ) SAL_THROW((::com::sun::star::uno::RuntimeException));
      88                 :            : 
      89                 :            :         /** queries the interceptor chain for the URL given as ASCII string,
      90                 :            :             with a blank target frame and no frame search flags
      91                 :            :         */
      92                 :            :         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >
      93                 :            :             queryDispatch( const sal_Char* _pAsciiURL ) SAL_THROW((::com::sun::star::uno::RuntimeException));
      94                 :            :     };
      95                 :            : 
      96                 :            : //........................................................................
      97                 :            : } // namespace frm
      98                 :            : //........................................................................
      99                 :            : 
     100                 :            : #endif // FORMS_SOURCE_INC_CONTROLFEATUREINTERCEPTION_HXX
     101                 :            : 
     102                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10