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

Generated by: LCOV version 1.11