LCOV - code coverage report
Current view: top level - sw/inc - unoredline.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 6 0.0 %
Date: 2012-08-25 Functions: 0 7 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 6 0.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                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : #ifndef _UNOREDLINE_HXX
      29                 :            : #define _UNOREDLINE_HXX
      30                 :            : 
      31                 :            : #include <unoport.hxx>
      32                 :            : #include <unotext.hxx>
      33                 :            : 
      34                 :            : 
      35                 :            : class SwRedline;
      36                 :            : 
      37                 :            : /**
      38                 :            :  * SwXRedlineText provides an XText which may be used to write
      39                 :            :  * directly into a redline node. It got implemented to enable XML
      40                 :            :  * import of redlines and should not be used directly via the API.
      41                 :            :  */
      42 [ #  # ][ #  # ]:          0 : class SwXRedlineText :
                 [ #  # ]
      43                 :            :     public SwXText,
      44                 :            :     public cppu::OWeakObject,
      45                 :            :     public ::com::sun::star::container::XEnumerationAccess
      46                 :            : {
      47                 :            :     SwNodeIndex aNodeIndex;
      48                 :            :     virtual const SwStartNode *GetStartNode() const;
      49                 :            : 
      50                 :            : public:
      51                 :            :     SwXRedlineText(SwDoc* pDoc, SwNodeIndex aNodeIndex);
      52                 :            : 
      53                 :            :     virtual     ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
      54                 :          0 :     virtual void SAL_CALL acquire(  ) throw(){OWeakObject::acquire();}
      55                 :          0 :     virtual void SAL_CALL release(  ) throw(){OWeakObject::release();}
      56                 :            : 
      57                 :            :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException);
      58                 :            :     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) throw(::com::sun::star::uno::RuntimeException);
      59                 :            : 
      60                 :            :     //XText
      61                 :            :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor >  SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException );
      62                 :            :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor >  SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException );
      63                 :            : 
      64                 :            :     //XEnumerationAccess
      65                 :            :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration >  SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
      66                 :            : 
      67                 :            :     //XElementAccess (via XEnumerationAccess)
      68                 :            :     virtual ::com::sun::star::uno::Type SAL_CALL getElementType(  ) throw(::com::sun::star::uno::RuntimeException);
      69                 :            :     virtual sal_Bool SAL_CALL hasElements(  ) throw(::com::sun::star::uno::RuntimeException);
      70                 :            : };
      71                 :            : 
      72                 :            : class SwXRedlinePortion : public SwXTextPortion
      73                 :            : {
      74                 :            :     const SwRedline*    pRedline;
      75                 :            : 
      76                 :            :     void Validate() throw( ::com::sun::star::uno::RuntimeException );
      77                 :            : 
      78                 :            :     using SwXTextPortion::GetPropertyValue;
      79                 :            : 
      80                 :            : public:
      81                 :            :     SwXRedlinePortion(  const SwRedline* pRed,
      82                 :            :                         const SwUnoCrsr* pPortionCrsr,
      83                 :            :                         ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >  xParent,
      84                 :            :                         sal_Bool bIsStart);
      85                 :            : 
      86                 :            :     ~SwXRedlinePortion();
      87                 :            : 
      88                 :            :     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) throw(::com::sun::star::uno::RuntimeException);
      89                 :            : 
      90                 :            :     //XPropertySet
      91                 :            :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
      92                 :            : 
      93                 :            :     static ::com::sun::star::uno::Any  GetPropertyValue( const ::rtl::OUString& PropertyName, const SwRedline& rRedline ) throw();
      94                 :            :     static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > CreateRedlineProperties( const SwRedline& rRedline, sal_Bool bIsStart ) throw();
      95                 :            : 
      96                 :            : };
      97                 :            : 
      98                 :            : typedef
      99                 :            : cppu::WeakImplHelper1
     100                 :            : <
     101                 :            :     ::com::sun::star::container::XEnumerationAccess
     102                 :            : >
     103                 :            : SwXRedlineBaseClass;
     104                 :            : class SwXRedline :
     105                 :            :         public SwXRedlineBaseClass,
     106                 :            :         public SwXText,
     107                 :            :         public SwClient
     108                 :            : {
     109                 :            :     SwDoc*      pDoc;
     110                 :            :     SwRedline*  pRedline;
     111                 :            : public:
     112                 :            :     SwXRedline(SwRedline& rRedline, SwDoc& rDoc);
     113                 :            :     ~SwXRedline();
     114                 :            : 
     115                 :            :     TYPEINFO();
     116                 :            : 
     117                 :            :     virtual     ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
     118                 :          0 :     virtual void SAL_CALL acquire(  ) throw(){OWeakObject::acquire();}
     119                 :          0 :     virtual void SAL_CALL release(  ) throw(){OWeakObject::release();}
     120                 :            : 
     121                 :            :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException);
     122                 :            :     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) throw(::com::sun::star::uno::RuntimeException);
     123                 :            : 
     124                 :            :     //XText
     125                 :            :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor >  SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException );
     126                 :            :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor >  SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException );
     127                 :            : 
     128                 :            :     //XPropertySet
     129                 :            :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
     130                 :            :     virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
     131                 :            :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
     132                 :            :     virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
     133                 :            :     virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
     134                 :            :     virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
     135                 :            :     virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
     136                 :            : 
     137                 :            :     //XEnumerationAccess
     138                 :            :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration >  SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
     139                 :            : 
     140                 :            :     //XElementAccess
     141                 :            :     virtual ::com::sun::star::uno::Type SAL_CALL getElementType(  ) throw(::com::sun::star::uno::RuntimeException);
     142                 :            :     virtual sal_Bool SAL_CALL hasElements(  ) throw(::com::sun::star::uno::RuntimeException);
     143                 :            : 
     144                 :          0 :     const SwRedline*    GetRedline() const {return pRedline;}
     145                 :            : protected:
     146                 :            :     //SwClient
     147                 :            :    virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
     148                 :            : };
     149                 :            : #endif
     150                 :            : 
     151                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10