LCOV - code coverage report
Current view: top level - libreoffice/sw/inc - unotextbodyhf.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 4 4 100.0 %
Date: 2012-12-27 Functions: 4 4 100.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             : #ifndef SW_UNOTEXTBODYHF_HXX
      21             : #define SW_UNOTEXTBODYHF_HXX
      22             : 
      23             : #include <com/sun/star/lang/XUnoTunnel.hpp>
      24             : #include <com/sun/star/lang/XServiceInfo.hpp>
      25             : #include <com/sun/star/container/XEnumerationAccess.hpp>
      26             : 
      27             : #include <cppuhelper/implbase2.hxx>
      28             : 
      29             : #include <unotext.hxx>
      30             : 
      31             : 
      32             : class SwDoc;
      33             : class SwFrmFmt;
      34             : class SwXTextCursor;
      35             : 
      36             : 
      37             : typedef ::cppu::WeakAggImplHelper2
      38             : <   ::com::sun::star::lang::XServiceInfo
      39             : ,   ::com::sun::star::container::XEnumerationAccess
      40             : > SwXBodyText_Base;
      41             : 
      42             : class SwXBodyText
      43             :     : public SwXBodyText_Base
      44             :     , public SwXText
      45             : {
      46             : 
      47             : protected:
      48             : 
      49             :     virtual ~SwXBodyText();
      50             : 
      51             : public:
      52             : 
      53             :     SwXBodyText(SwDoc *const pDoc);
      54             : 
      55             :     SwXTextCursor * CreateTextCursor(const bool bIgnoreTables = false);
      56             : 
      57             :     // XInterface
      58             :     virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
      59             :             const ::com::sun::star::uno::Type& rType)
      60             :         throw (::com::sun::star::uno::RuntimeException);
      61       24994 :     virtual void SAL_CALL acquire() throw() { OWeakObject::acquire(); }
      62       24824 :     virtual void SAL_CALL release() throw() { OWeakObject::release(); }
      63             : 
      64             :     // XAggregation
      65             :     virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation(
      66             :             const ::com::sun::star::uno::Type& rType)
      67             :         throw (::com::sun::star::uno::RuntimeException);
      68             : 
      69             :     // XTypeProvider
      70             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
      71             :         SAL_CALL getTypes()
      72             :         throw (::com::sun::star::uno::RuntimeException);
      73             :     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
      74             :         getImplementationId()
      75             :         throw (::com::sun::star::uno::RuntimeException);
      76             : 
      77             :     // XServiceInfo
      78             :     virtual ::rtl::OUString SAL_CALL getImplementationName()
      79             :         throw (::com::sun::star::uno::RuntimeException);
      80             :     virtual sal_Bool SAL_CALL supportsService(
      81             :             const ::rtl::OUString& rServiceName)
      82             :         throw (::com::sun::star::uno::RuntimeException);
      83             :     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
      84             :         getSupportedServiceNames()
      85             :         throw (::com::sun::star::uno::RuntimeException);
      86             : 
      87             :     // XElementAccess
      88             :     virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
      89             :         throw (::com::sun::star::uno::RuntimeException);
      90             :     virtual sal_Bool SAL_CALL hasElements()
      91             :         throw (::com::sun::star::uno::RuntimeException);
      92             : 
      93             :     // XEnumerationAccess
      94             :     virtual ::com::sun::star::uno::Reference<
      95             :             ::com::sun::star::container::XEnumeration >  SAL_CALL
      96             :         createEnumeration()
      97             :         throw (::com::sun::star::uno::RuntimeException);
      98             : 
      99             :     // XSimpleText
     100             :     virtual ::com::sun::star::uno::Reference<
     101             :                 ::com::sun::star::text::XTextCursor >  SAL_CALL
     102             :         createTextCursor()
     103             :         throw (::com::sun::star::uno::RuntimeException);
     104             :     virtual ::com::sun::star::uno::Reference<
     105             :                 ::com::sun::star::text::XTextCursor >  SAL_CALL
     106             :         createTextCursorByRange(
     107             :             const ::com::sun::star::uno::Reference<
     108             :                 ::com::sun::star::text::XTextRange > & xTextPosition)
     109             :         throw (::com::sun::star::uno::RuntimeException);
     110             : 
     111             : };
     112             : 
     113             : 
     114             : typedef ::cppu::WeakImplHelper2
     115             : <   ::com::sun::star::lang::XServiceInfo
     116             : ,   ::com::sun::star::container::XEnumerationAccess
     117             : > SwXHeadFootText_Base;
     118             : 
     119             : class SwXHeadFootText
     120             :     : public SwXHeadFootText_Base
     121             :     , public SwXText
     122             : {
     123             : 
     124             : private:
     125             : 
     126             :     class Impl;
     127             :     ::sw::UnoImplPtr<Impl> m_pImpl;
     128             : 
     129             : protected:
     130             : 
     131             :     virtual const SwStartNode *GetStartNode() const;
     132             :     virtual ::com::sun::star::uno::Reference<
     133             :                 ::com::sun::star::text::XTextCursor >
     134             :         CreateCursor()
     135             :         throw (::com::sun::star::uno::RuntimeException);
     136             : 
     137             :     virtual ~SwXHeadFootText();
     138             : 
     139             :     SwXHeadFootText(SwFrmFmt & rHeadFootFmt, const bool bIsHeader);
     140             : 
     141             : public:
     142             : 
     143             :     static ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >
     144             :         CreateXHeadFootText(SwFrmFmt & rHeadFootFmt, const bool bIsHeader);
     145             :     static bool IsXHeadFootText(SwClient *const pClient);
     146             : 
     147             :     // XInterface
     148             :     virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
     149             :             const ::com::sun::star::uno::Type& rType)
     150             :         throw (::com::sun::star::uno::RuntimeException);
     151        3033 :     virtual void SAL_CALL acquire() throw() { OWeakObject::acquire(); }
     152        3033 :     virtual void SAL_CALL release() throw() { OWeakObject::release(); }
     153             : 
     154             :     // XTypeProvider
     155             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
     156             :         SAL_CALL getTypes()
     157             :         throw (::com::sun::star::uno::RuntimeException);
     158             :     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
     159             :         getImplementationId()
     160             :         throw (::com::sun::star::uno::RuntimeException);
     161             : 
     162             :     // XServiceInfo
     163             :     virtual ::rtl::OUString SAL_CALL getImplementationName()
     164             :         throw (::com::sun::star::uno::RuntimeException);
     165             :     virtual sal_Bool SAL_CALL supportsService(
     166             :             const ::rtl::OUString& rServiceName)
     167             :         throw (::com::sun::star::uno::RuntimeException);
     168             :     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
     169             :         getSupportedServiceNames()
     170             :         throw (::com::sun::star::uno::RuntimeException);
     171             : 
     172             :     // XElementAccess
     173             :     virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
     174             :         throw (::com::sun::star::uno::RuntimeException);
     175             :     virtual sal_Bool SAL_CALL hasElements()
     176             :         throw (::com::sun::star::uno::RuntimeException);
     177             : 
     178             :     // XEnumerationAccess
     179             :     virtual ::com::sun::star::uno::Reference<
     180             :             ::com::sun::star::container::XEnumeration >  SAL_CALL
     181             :         createEnumeration()
     182             :         throw (::com::sun::star::uno::RuntimeException);
     183             : 
     184             :     // XSimpleText
     185             :     virtual ::com::sun::star::uno::Reference<
     186             :                 ::com::sun::star::text::XTextCursor >  SAL_CALL
     187             :         createTextCursor()
     188             :         throw (::com::sun::star::uno::RuntimeException);
     189             :     virtual ::com::sun::star::uno::Reference<
     190             :                 ::com::sun::star::text::XTextCursor >  SAL_CALL
     191             :         createTextCursorByRange(
     192             :             const ::com::sun::star::uno::Reference<
     193             :                 ::com::sun::star::text::XTextRange > & xTextPosition)
     194             :         throw (::com::sun::star::uno::RuntimeException);
     195             : 
     196             : };
     197             : 
     198             : #endif // SW_UNOTEXTBODYHF_HXX
     199             : 
     200             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10