LCOV - code coverage report
Current view: top level - sw/inc - unoparagraph.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 1 1 100.0 %
Date: 2015-06-13 12:38:46 Functions: 2 3 66.7 %
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_UNOPARAGRAPH_HXX
      21             : #define INCLUDED_SW_INC_UNOPARAGRAPH_HXX
      22             : 
      23             : #include <memory>
      24             : 
      25             : #include <com/sun/star/lang/XUnoTunnel.hpp>
      26             : #include <com/sun/star/lang/XServiceInfo.hpp>
      27             : #include <com/sun/star/beans/XPropertySet.hpp>
      28             : #include <com/sun/star/beans/XPropertyState.hpp>
      29             : #include <com/sun/star/beans/XMultiPropertySet.hpp>
      30             : #include <com/sun/star/beans/XTolerantMultiPropertySet.hpp>
      31             : #include <com/sun/star/container/XEnumerationAccess.hpp>
      32             : #include <com/sun/star/container/XContentEnumerationAccess.hpp>
      33             : #include <com/sun/star/text/XTextContent.hpp>
      34             : #include <com/sun/star/text/XTextRange.hpp>
      35             : 
      36             : #include <cppuhelper/implbase10.hxx>
      37             : 
      38             : #include <sfx2/Metadatable.hxx>
      39             : 
      40             : #include <unobaseclass.hxx>
      41             : 
      42             : struct SwPosition;
      43             : class SwPaM;
      44             : class SwUnoCrsr;
      45             : class SwStartNode;
      46             : class SwTextNode;
      47             : class SwTable;
      48             : class SwXText;
      49             : 
      50             : typedef ::cppu::ImplInheritanceHelper10
      51             : <   ::sfx2::MetadatableMixin
      52             : ,   ::com::sun::star::lang::XUnoTunnel
      53             : ,   ::com::sun::star::lang::XServiceInfo
      54             : ,   ::com::sun::star::beans::XPropertySet
      55             : ,   ::com::sun::star::beans::XPropertyState
      56             : ,   ::com::sun::star::beans::XMultiPropertySet
      57             : ,   ::com::sun::star::beans::XTolerantMultiPropertySet
      58             : ,   ::com::sun::star::container::XEnumerationAccess
      59             : ,   ::com::sun::star::container::XContentEnumerationAccess
      60             : ,   ::com::sun::star::text::XTextContent
      61             : ,   ::com::sun::star::text::XTextRange
      62             : > SwXParagraph_Base;
      63             : 
      64             : class SwXParagraph
      65             :     : public SwXParagraph_Base
      66             : {
      67             : 
      68             : private:
      69             : 
      70             :     class Impl;
      71             :     ::sw::UnoImplPtr<Impl> m_pImpl;
      72             : 
      73             :     virtual ~SwXParagraph();
      74             : 
      75             :     SwXParagraph(::com::sun::star::uno::Reference<
      76             :                     ::com::sun::star::text::XText > const & xParent,
      77             :             SwTextNode & rTextNode,
      78             :             const sal_Int32 nSelStart = -1, const sal_Int32 nSelEnd = - 1);
      79             : 
      80             :     /// descriptor
      81             :     SwXParagraph();
      82             : 
      83             : public:
      84             : 
      85             :     static ::com::sun::star::uno::Reference<
      86             :             ::com::sun::star::text::XTextContent>
      87             :         CreateXParagraph(SwDoc & rDoc, SwTextNode * pTextNode,
      88             :             ::com::sun::star::uno::Reference< ::com::sun::star::text::XText>
      89             :                 const& xParentText = 0,
      90             :             const sal_Int32 nSelStart = -1, const sal_Int32 nSelEnd = - 1);
      91             : 
      92             :     const SwTextNode * GetTextNode() const;
      93             :     bool            IsDescriptor() const;
      94             :     /// make rPaM select the paragraph
      95             :     bool SelectPaM(SwPaM & rPaM);
      96             :     /// for SwXText
      97             :     void attachToText(SwXText & rParent, SwTextNode & rTextNode);
      98             : 
      99             :     // MetadatableMixin
     100             :     virtual ::sfx2::Metadatable* GetCoreObject() SAL_OVERRIDE;
     101             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
     102             :         GetModel() SAL_OVERRIDE;
     103             : 
     104             :     static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId();
     105             : 
     106             :     // XUnoTunnel
     107             :     virtual sal_Int64 SAL_CALL getSomething(
     108             :             const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier)
     109             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     110             : 
     111             :     // XServiceInfo
     112             :     virtual OUString SAL_CALL getImplementationName()
     113             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     114             :     virtual sal_Bool SAL_CALL supportsService(
     115             :             const OUString& rServiceName)
     116             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     117             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL
     118             :         getSupportedServiceNames()
     119             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     120             : 
     121             :     // XComponent
     122             :     virtual void SAL_CALL dispose()
     123             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     124             :     virtual void SAL_CALL addEventListener(
     125             :             const ::com::sun::star::uno::Reference<
     126             :                 ::com::sun::star::lang::XEventListener > & xListener)
     127             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     128             :     virtual void SAL_CALL removeEventListener(
     129             :             const ::com::sun::star::uno::Reference<
     130             :                 ::com::sun::star::lang::XEventListener > & xListener)
     131             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     132             : 
     133             :     // XPropertySet
     134             :     virtual ::com::sun::star::uno::Reference<
     135             :                 ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
     136             :         getPropertySetInfo()
     137             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     138             :     virtual void SAL_CALL setPropertyValue(
     139             :             const OUString& rPropertyName,
     140             :             const ::com::sun::star::uno::Any& rValue)
     141             :         throw (::com::sun::star::beans::UnknownPropertyException,
     142             :                 ::com::sun::star::beans::PropertyVetoException,
     143             :                 ::com::sun::star::lang::IllegalArgumentException,
     144             :                 ::com::sun::star::lang::WrappedTargetException,
     145             :                 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     146             :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
     147             :             const OUString& rPropertyName)
     148             :         throw (::com::sun::star::beans::UnknownPropertyException,
     149             :                 ::com::sun::star::lang::WrappedTargetException,
     150             :                 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     151             :     virtual void SAL_CALL addPropertyChangeListener(
     152             :             const OUString& rPropertyName,
     153             :             const ::com::sun::star::uno::Reference<
     154             :                 ::com::sun::star::beans::XPropertyChangeListener >& xListener)
     155             :         throw (::com::sun::star::beans::UnknownPropertyException,
     156             :                 ::com::sun::star::lang::WrappedTargetException,
     157             :                 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     158             :     virtual void SAL_CALL removePropertyChangeListener(
     159             :             const OUString& rPropertyName,
     160             :             const ::com::sun::star::uno::Reference<
     161             :                 ::com::sun::star::beans::XPropertyChangeListener >& xListener)
     162             :         throw (::com::sun::star::beans::UnknownPropertyException,
     163             :                 ::com::sun::star::lang::WrappedTargetException,
     164             :                 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     165             :     virtual void SAL_CALL addVetoableChangeListener(
     166             :             const OUString& rPropertyName,
     167             :             const ::com::sun::star::uno::Reference<
     168             :                 ::com::sun::star::beans::XVetoableChangeListener >& xListener)
     169             :         throw (::com::sun::star::beans::UnknownPropertyException,
     170             :                 ::com::sun::star::lang::WrappedTargetException,
     171             :                 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     172             :     virtual void SAL_CALL removeVetoableChangeListener(
     173             :             const OUString& rPropertyName,
     174             :             const ::com::sun::star::uno::Reference<
     175             :                 ::com::sun::star::beans::XVetoableChangeListener >& xListener)
     176             :         throw (::com::sun::star::beans::UnknownPropertyException,
     177             :                 ::com::sun::star::lang::WrappedTargetException,
     178             :                 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     179             : 
     180             :     // XPropertyState
     181             :     virtual ::com::sun::star::beans::PropertyState SAL_CALL
     182             :         getPropertyState(const OUString& rPropertyName)
     183             :         throw (::com::sun::star::beans::UnknownPropertyException,
     184             :                 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     185             :     virtual ::com::sun::star::uno::Sequence<
     186             :             ::com::sun::star::beans::PropertyState > SAL_CALL
     187             :         getPropertyStates(
     188             :             const ::com::sun::star::uno::Sequence<
     189             :                 OUString >& rPropertyNames)
     190             :         throw (::com::sun::star::beans::UnknownPropertyException,
     191             :                 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     192             :     virtual void SAL_CALL setPropertyToDefault(
     193             :             const OUString& rPropertyName)
     194             :         throw (::com::sun::star::beans::UnknownPropertyException,
     195             :                 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     196             :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault(
     197             :             const OUString& rPropertyName)
     198             :         throw (::com::sun::star::beans::UnknownPropertyException,
     199             :                 ::com::sun::star::lang::WrappedTargetException,
     200             :                 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     201             : 
     202             :     // XMultiPropertySet
     203             :     virtual void SAL_CALL setPropertyValues(
     204             :             const ::com::sun::star::uno::Sequence< OUString >&
     205             :                 rPropertyNames,
     206             :             const ::com::sun::star::uno::Sequence<
     207             :                 ::com::sun::star::uno::Any >& rValues)
     208             :         throw (::com::sun::star::beans::PropertyVetoException,
     209             :                 ::com::sun::star::lang::IllegalArgumentException,
     210             :                 ::com::sun::star::lang::WrappedTargetException,
     211             :                 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     212             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
     213             :         SAL_CALL getPropertyValues(
     214             :             const ::com::sun::star::uno::Sequence< OUString >&
     215             :                 rPropertyNames)
     216             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     217             :     virtual void SAL_CALL addPropertiesChangeListener(
     218             :             const ::com::sun::star::uno::Sequence< OUString >&
     219             :                 rPropertyNames,
     220             :             const ::com::sun::star::uno::Reference<
     221             :                 ::com::sun::star::beans::XPropertiesChangeListener >& xListener)
     222             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     223             :     virtual void SAL_CALL removePropertiesChangeListener(
     224             :             const ::com::sun::star::uno::Reference<
     225             :                 ::com::sun::star::beans::XPropertiesChangeListener >& xListener)
     226             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     227             :     virtual void SAL_CALL firePropertiesChangeEvent(
     228             :             const ::com::sun::star::uno::Sequence< OUString >&
     229             :                 rPropertyNames,
     230             :             const ::com::sun::star::uno::Reference<
     231             :                 ::com::sun::star::beans::XPropertiesChangeListener >& xListener)
     232             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     233             : 
     234             :     // XTolerantMultiPropertySet
     235             :     virtual ::com::sun::star::uno::Sequence<
     236             :                 ::com::sun::star::beans::SetPropertyTolerantFailed > SAL_CALL
     237             :         setPropertyValuesTolerant(
     238             :             const ::com::sun::star::uno::Sequence< OUString >&
     239             :                 rPropertyNames,
     240             :             const ::com::sun::star::uno::Sequence<
     241             :                 ::com::sun::star::uno::Any >& rValues)
     242             :         throw (::com::sun::star::lang::IllegalArgumentException,
     243             :                 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     244             :     virtual ::com::sun::star::uno::Sequence<
     245             :                 ::com::sun::star::beans::GetPropertyTolerantResult > SAL_CALL
     246             :         getPropertyValuesTolerant(
     247             :             const ::com::sun::star::uno::Sequence< OUString >&
     248             :                 rPropertyNames)
     249             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     250             :     virtual ::com::sun::star::uno::Sequence<
     251             :             ::com::sun::star::beans::GetDirectPropertyTolerantResult > SAL_CALL
     252             :         getDirectPropertyValuesTolerant(
     253             :             const ::com::sun::star::uno::Sequence< OUString >&
     254             :                 rPropertyNames)
     255             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     256             : 
     257             :     // XElementAccess
     258             :     virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
     259             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     260             :     virtual sal_Bool SAL_CALL hasElements()
     261             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     262             : 
     263             :     // XEnumerationAccess
     264             :     virtual ::com::sun::star::uno::Reference<
     265             :             ::com::sun::star::container::XEnumeration >  SAL_CALL
     266             :         createEnumeration()
     267             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     268             : 
     269             :     // XContentEnumerationAccess
     270             :     virtual ::com::sun::star::uno::Reference<
     271             :                 ::com::sun::star::container::XEnumeration > SAL_CALL
     272             :         createContentEnumeration(const OUString& rServiceName)
     273             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     274             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL
     275             :         getAvailableServiceNames()
     276             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     277             : 
     278             :     // XTextContent
     279             :     virtual void SAL_CALL attach(
     280             :             const ::com::sun::star::uno::Reference<
     281             :                 ::com::sun::star::text::XTextRange > & xTextRange)
     282             :         throw (::com::sun::star::lang::IllegalArgumentException,
     283             :                 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     284             :     virtual ::com::sun::star::uno::Reference<
     285             :                 ::com::sun::star::text::XTextRange > SAL_CALL getAnchor()
     286             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     287             : 
     288             :     // XTextRange
     289             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >
     290             :         SAL_CALL getText()
     291             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     292             :     virtual ::com::sun::star::uno::Reference<
     293             :                 ::com::sun::star::text::XTextRange > SAL_CALL getStart()
     294             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     295             :     virtual ::com::sun::star::uno::Reference<
     296             :                 ::com::sun::star::text::XTextRange > SAL_CALL getEnd()
     297             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     298             :     virtual OUString SAL_CALL getString()
     299             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     300             :     virtual void SAL_CALL setString(const OUString& rString)
     301             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     302             : 
     303             : };
     304             : 
     305             : 
     306       18206 : struct SwXParagraphEnumeration
     307             :     : public SwSimpleEnumeration_Base
     308             : {
     309             :     static SwXParagraphEnumeration* Create(
     310             :         ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > const & xParent,
     311             :         std::shared_ptr<SwUnoCrsr> pCursor,
     312             :         const CursorType eType,
     313             :         SwStartNode const*const pStartNode = 0,
     314             :         SwTable const*const pTable = 0);
     315             : };
     316             : 
     317             : #endif // INCLUDED_SW_INC_UNOPARAGRAPH_HXX
     318             : 
     319             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11