LCOV - code coverage report
Current view: top level - sw/source/filter/ww8 - rtfexportfilter.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 1 2 50.0 %
Date: 2012-08-25 Functions: 2 4 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                 :            :  * Copyright 2010 Miklos Vajna.
       8                 :            :  *
       9                 :            :  * OpenOffice.org - a multi-platform office productivity suite
      10                 :            :  *
      11                 :            :  * This file is part of OpenOffice.org.
      12                 :            :  *
      13                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      14                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      15                 :            :  * only, as published by the Free Software Foundation.
      16                 :            :  *
      17                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      18                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      19                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      20                 :            :  * GNU Lesser General Public License version 3 for more details
      21                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      22                 :            :  *
      23                 :            :  * You should have received a copy of the GNU Lesser General Public License
      24                 :            :  * version 3 along with OpenOffice.org.  If not, see
      25                 :            :  * <http://www.openoffice.org/license.html>
      26                 :            :  * for a copy of the LGPLv3 License.
      27                 :            :  *
      28                 :            :  ************************************************************************/
      29                 :            : 
      30                 :            : #ifndef _RTFEXPORTFILTER_HXX_
      31                 :            : #define _RTFEXPORTFILTER_HXX_
      32                 :            : 
      33                 :            : #include <com/sun/star/document/XFilter.hpp>
      34                 :            : #include <com/sun/star/document/XExporter.hpp>
      35                 :            : #include <com/sun/star/uno/XComponentContext.hpp>
      36                 :            : #include <cppuhelper/implbase2.hxx>
      37                 :            : #include <shellio.hxx>
      38                 :            : 
      39                 :            : /// Dummy Writer implementation to be able to use the string format methods of the base class
      40         [ -  + ]:        156 : class RtfWriter : public Writer
      41                 :            : {
      42                 :            : protected:
      43                 :          0 :     sal_uLong WriteStream() { return 0; }
      44                 :            : };
      45                 :            : 
      46                 :            : /// The physical access to the RTF document (for writing).
      47                 :            : class RtfExportFilter : public cppu::WeakImplHelper2
      48                 :            : <
      49                 :            :     com::sun::star::document::XFilter,
      50                 :            :     com::sun::star::document::XExporter
      51                 :            : >
      52                 :            : {
      53                 :            : protected:
      54                 :            :     ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xCtx;
      55                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xSrcDoc;
      56                 :            :     SvStream* m_pStream;
      57                 :            : public:
      58                 :            :     RtfExportFilter( const ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xCtx );
      59                 :            :     virtual ~RtfExportFilter();
      60                 :            : 
      61                 :            :     // XFilter
      62                 :            :     virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
      63                 :            :         throw (::com::sun::star::uno::RuntimeException);
      64                 :            :     virtual void SAL_CALL cancel(  )
      65                 :            :         throw (::com::sun::star::uno::RuntimeException);
      66                 :            : 
      67                 :            :     // XExporter
      68                 :            :     virtual void SAL_CALL setSourceDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc )
      69                 :            :         throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
      70                 :            : 
      71                 :            :     RtfWriter m_aWriter;
      72                 :            : };
      73                 :            : 
      74                 :            : ::rtl::OUString RtfExport_getImplementationName();
      75                 :            : ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL RtfExport_getSupportedServiceNames()
      76                 :            :     throw();
      77                 :            : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL RtfExport_createInstance(
      78                 :            :                                                                         const ::com::sun::star::uno::Reference<
      79                 :            :                                                                         com::sun::star::uno::XComponentContext > &xCtx)
      80                 :            :     throw( ::com::sun::star::uno::Exception );
      81                 :            : 
      82                 :            : #define IMPL_NAME_RTFEXPORT "com.sun.star.comp.Writer.RtfExport"
      83                 :            : 
      84                 :            : #endif // _RTFEXPORTFILTER_HXX_
      85                 :            : 
      86                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10