1*b1cdbd2cSJim Jagielski /************************************************************** 2*b1cdbd2cSJim Jagielski * 3*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one 4*b1cdbd2cSJim Jagielski * or more contributor license agreements. See the NOTICE file 5*b1cdbd2cSJim Jagielski * distributed with this work for additional information 6*b1cdbd2cSJim Jagielski * regarding copyright ownership. The ASF licenses this file 7*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the 8*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance 9*b1cdbd2cSJim Jagielski * with the License. You may obtain a copy of the License at 10*b1cdbd2cSJim Jagielski * 11*b1cdbd2cSJim Jagielski * http://www.apache.org/licenses/LICENSE-2.0 12*b1cdbd2cSJim Jagielski * 13*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing, 14*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an 15*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*b1cdbd2cSJim Jagielski * KIND, either express or implied. See the License for the 17*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations 18*b1cdbd2cSJim Jagielski * under the License. 19*b1cdbd2cSJim Jagielski * 20*b1cdbd2cSJim Jagielski *************************************************************/ 21*b1cdbd2cSJim Jagielski 22*b1cdbd2cSJim Jagielski 23*b1cdbd2cSJim Jagielski #ifndef _UNOREDLINE_HXX 24*b1cdbd2cSJim Jagielski #define _UNOREDLINE_HXX 25*b1cdbd2cSJim Jagielski 26*b1cdbd2cSJim Jagielski #include <unoport.hxx> 27*b1cdbd2cSJim Jagielski #include <unotext.hxx> 28*b1cdbd2cSJim Jagielski 29*b1cdbd2cSJim Jagielski 30*b1cdbd2cSJim Jagielski class SwRedline; 31*b1cdbd2cSJim Jagielski 32*b1cdbd2cSJim Jagielski /* -----------------------------19.12.00 11:35-------------------------------- 33*b1cdbd2cSJim Jagielski 34*b1cdbd2cSJim Jagielski ---------------------------------------------------------------------------*/ 35*b1cdbd2cSJim Jagielski 36*b1cdbd2cSJim Jagielski /** 37*b1cdbd2cSJim Jagielski * SwXRedlineText provides an XText which may be used to write 38*b1cdbd2cSJim Jagielski * directly into a redline node. It got implemented to enable XML 39*b1cdbd2cSJim Jagielski * import of redlines and should not be used directly via the API. 40*b1cdbd2cSJim Jagielski */ 41*b1cdbd2cSJim Jagielski class SwXRedlineText : 42*b1cdbd2cSJim Jagielski public SwXText, 43*b1cdbd2cSJim Jagielski public cppu::OWeakObject, 44*b1cdbd2cSJim Jagielski public ::com::sun::star::container::XEnumerationAccess 45*b1cdbd2cSJim Jagielski { 46*b1cdbd2cSJim Jagielski SwNodeIndex aNodeIndex; 47*b1cdbd2cSJim Jagielski virtual const SwStartNode *GetStartNode() const; 48*b1cdbd2cSJim Jagielski 49*b1cdbd2cSJim Jagielski public: 50*b1cdbd2cSJim Jagielski SwXRedlineText(SwDoc* pDoc, SwNodeIndex aNodeIndex); 51*b1cdbd2cSJim Jagielski 52*b1cdbd2cSJim Jagielski virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); acquire()53*b1cdbd2cSJim Jagielski virtual void SAL_CALL acquire( ) throw(){OWeakObject::acquire();} release()54*b1cdbd2cSJim Jagielski virtual void SAL_CALL release( ) throw(){OWeakObject::release();} 55*b1cdbd2cSJim Jagielski 56*b1cdbd2cSJim Jagielski virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); 57*b1cdbd2cSJim Jagielski virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); 58*b1cdbd2cSJim Jagielski 59*b1cdbd2cSJim Jagielski //XText 60*b1cdbd2cSJim Jagielski virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException ); 61*b1cdbd2cSJim Jagielski 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 ); 62*b1cdbd2cSJim Jagielski 63*b1cdbd2cSJim Jagielski //XEnumerationAccess 64*b1cdbd2cSJim Jagielski virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException ); 65*b1cdbd2cSJim Jagielski 66*b1cdbd2cSJim Jagielski //XElementAccess (via XEnumerationAccess) 67*b1cdbd2cSJim Jagielski virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); 68*b1cdbd2cSJim Jagielski virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); 69*b1cdbd2cSJim Jagielski }; 70*b1cdbd2cSJim Jagielski /* --------------------------------------------------------------------------- 71*b1cdbd2cSJim Jagielski 72*b1cdbd2cSJim Jagielski ---------------------------------------------------------------------------*/ 73*b1cdbd2cSJim Jagielski class SwXRedlinePortion : public SwXTextPortion 74*b1cdbd2cSJim Jagielski { 75*b1cdbd2cSJim Jagielski const SwRedline* pRedline; 76*b1cdbd2cSJim Jagielski 77*b1cdbd2cSJim Jagielski void Validate() throw( ::com::sun::star::uno::RuntimeException ); 78*b1cdbd2cSJim Jagielski 79*b1cdbd2cSJim Jagielski using SwXTextPortion::GetPropertyValue; 80*b1cdbd2cSJim Jagielski 81*b1cdbd2cSJim Jagielski public: 82*b1cdbd2cSJim Jagielski SwXRedlinePortion( const SwRedline* pRed, 83*b1cdbd2cSJim Jagielski const SwUnoCrsr* pPortionCrsr, 84*b1cdbd2cSJim Jagielski ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParent, 85*b1cdbd2cSJim Jagielski sal_Bool bIsStart); 86*b1cdbd2cSJim Jagielski 87*b1cdbd2cSJim Jagielski ~SwXRedlinePortion(); 88*b1cdbd2cSJim Jagielski 89*b1cdbd2cSJim Jagielski virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); 90*b1cdbd2cSJim Jagielski 91*b1cdbd2cSJim Jagielski //XPropertySet 92*b1cdbd2cSJim Jagielski 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); 93*b1cdbd2cSJim Jagielski 94*b1cdbd2cSJim Jagielski static ::com::sun::star::uno::Any GetPropertyValue( const ::rtl::OUString& PropertyName, const SwRedline& rRedline ) throw(); 95*b1cdbd2cSJim Jagielski static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > CreateRedlineProperties( const SwRedline& rRedline, sal_Bool bIsStart ) throw(); 96*b1cdbd2cSJim Jagielski 97*b1cdbd2cSJim Jagielski }; 98*b1cdbd2cSJim Jagielski /* -----------------------------11.01.01 16:52-------------------------------- 99*b1cdbd2cSJim Jagielski 100*b1cdbd2cSJim Jagielski ---------------------------------------------------------------------------*/ 101*b1cdbd2cSJim Jagielski typedef 102*b1cdbd2cSJim Jagielski cppu::WeakImplHelper1 103*b1cdbd2cSJim Jagielski < 104*b1cdbd2cSJim Jagielski ::com::sun::star::container::XEnumerationAccess 105*b1cdbd2cSJim Jagielski > 106*b1cdbd2cSJim Jagielski SwXRedlineBaseClass; 107*b1cdbd2cSJim Jagielski class SwXRedline : 108*b1cdbd2cSJim Jagielski public SwXRedlineBaseClass, 109*b1cdbd2cSJim Jagielski public SwXText, 110*b1cdbd2cSJim Jagielski public SwClient 111*b1cdbd2cSJim Jagielski { 112*b1cdbd2cSJim Jagielski SwDoc* pDoc; 113*b1cdbd2cSJim Jagielski SwRedline* pRedline; 114*b1cdbd2cSJim Jagielski public: 115*b1cdbd2cSJim Jagielski SwXRedline(SwRedline& rRedline, SwDoc& rDoc); 116*b1cdbd2cSJim Jagielski ~SwXRedline(); 117*b1cdbd2cSJim Jagielski 118*b1cdbd2cSJim Jagielski TYPEINFO(); 119*b1cdbd2cSJim Jagielski 120*b1cdbd2cSJim Jagielski virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); acquire()121*b1cdbd2cSJim Jagielski virtual void SAL_CALL acquire( ) throw(){OWeakObject::acquire();} release()122*b1cdbd2cSJim Jagielski virtual void SAL_CALL release( ) throw(){OWeakObject::release();} 123*b1cdbd2cSJim Jagielski 124*b1cdbd2cSJim Jagielski virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); 125*b1cdbd2cSJim Jagielski virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); 126*b1cdbd2cSJim Jagielski 127*b1cdbd2cSJim Jagielski //XText 128*b1cdbd2cSJim Jagielski virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException ); 129*b1cdbd2cSJim Jagielski 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 ); 130*b1cdbd2cSJim Jagielski 131*b1cdbd2cSJim Jagielski //XPropertySet 132*b1cdbd2cSJim Jagielski virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); 133*b1cdbd2cSJim Jagielski 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); 134*b1cdbd2cSJim Jagielski 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); 135*b1cdbd2cSJim Jagielski 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); 136*b1cdbd2cSJim Jagielski 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); 137*b1cdbd2cSJim Jagielski 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); 138*b1cdbd2cSJim Jagielski 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); 139*b1cdbd2cSJim Jagielski 140*b1cdbd2cSJim Jagielski //XEnumerationAccess 141*b1cdbd2cSJim Jagielski virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException ); 142*b1cdbd2cSJim Jagielski 143*b1cdbd2cSJim Jagielski //XElementAccess 144*b1cdbd2cSJim Jagielski virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); 145*b1cdbd2cSJim Jagielski virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); 146*b1cdbd2cSJim Jagielski GetRedline() const147*b1cdbd2cSJim Jagielski const SwRedline* GetRedline() const {return pRedline;} 148*b1cdbd2cSJim Jagielski protected: 149*b1cdbd2cSJim Jagielski //SwClient 150*b1cdbd2cSJim Jagielski virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); 151*b1cdbd2cSJim Jagielski }; 152*b1cdbd2cSJim Jagielski #endif 153