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

Generated by: LCOV version 1.10