1*1d2dbeb0SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*1d2dbeb0SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*1d2dbeb0SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*1d2dbeb0SAndrew Rist * distributed with this work for additional information 6*1d2dbeb0SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*1d2dbeb0SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*1d2dbeb0SAndrew Rist * "License"); you may not use this file except in compliance 9*1d2dbeb0SAndrew Rist * with the License. You may obtain a copy of the License at 10*1d2dbeb0SAndrew Rist * 11*1d2dbeb0SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*1d2dbeb0SAndrew Rist * 13*1d2dbeb0SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*1d2dbeb0SAndrew Rist * software distributed under the License is distributed on an 15*1d2dbeb0SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*1d2dbeb0SAndrew Rist * KIND, either express or implied. See the License for the 17*1d2dbeb0SAndrew Rist * specific language governing permissions and limitations 18*1d2dbeb0SAndrew Rist * under the License. 19*1d2dbeb0SAndrew Rist * 20*1d2dbeb0SAndrew Rist *************************************************************/ 21*1d2dbeb0SAndrew Rist 22*1d2dbeb0SAndrew Rist 23cdf0e10cSrcweir #ifndef _UNOFRAME_HXX 24cdf0e10cSrcweir #define _UNOFRAME_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include <com/sun/star/beans/XPropertyState.hpp> 27cdf0e10cSrcweir #include <com/sun/star/container/XNamed.hpp> 28cdf0e10cSrcweir #include <com/sun/star/container/XEnumerationAccess.hpp> 29cdf0e10cSrcweir #include <com/sun/star/document/XEmbeddedObjectSupplier2.hpp> 30cdf0e10cSrcweir #include <com/sun/star/text/XTextFrame.hpp> 31cdf0e10cSrcweir #include <com/sun/star/drawing/XShape.hpp> 32cdf0e10cSrcweir #include <com/sun/star/util/XModifyListener.hpp> 33cdf0e10cSrcweir #include <com/sun/star/frame/XModel.hpp> 34cdf0e10cSrcweir #include <com/sun/star/document/XEventsSupplier.hpp> 35cdf0e10cSrcweir 36cdf0e10cSrcweir #include <cppuhelper/implbase1.hxx> 37cdf0e10cSrcweir #include <cppuhelper/implbase3.hxx> 38cdf0e10cSrcweir #include <cppuhelper/implbase6.hxx> 39cdf0e10cSrcweir 40cdf0e10cSrcweir #include <sfx2/objsh.hxx> 41cdf0e10cSrcweir 42cdf0e10cSrcweir #include <flyenum.hxx> 43cdf0e10cSrcweir #include <frmfmt.hxx> 44cdf0e10cSrcweir #include <unoevtlstnr.hxx> 45cdf0e10cSrcweir #include <unotext.hxx> 46cdf0e10cSrcweir 47cdf0e10cSrcweir 48cdf0e10cSrcweir class SfxItemPropertSet; 49cdf0e10cSrcweir class SdrObject; 50cdf0e10cSrcweir class SwDoc; 51cdf0e10cSrcweir class SwFmt; 52cdf0e10cSrcweir class SwFlyFrmFmt; 53cdf0e10cSrcweir 54cdf0e10cSrcweir class BaseFrameProperties_Impl; 55cdf0e10cSrcweir class SwXFrame : public cppu::WeakImplHelper6 56cdf0e10cSrcweir < 57cdf0e10cSrcweir ::com::sun::star::lang::XServiceInfo, 58cdf0e10cSrcweir ::com::sun::star::beans::XPropertySet, 59cdf0e10cSrcweir ::com::sun::star::beans::XPropertyState, 60cdf0e10cSrcweir ::com::sun::star::drawing::XShape, 61cdf0e10cSrcweir ::com::sun::star::container::XNamed, 62cdf0e10cSrcweir ::com::sun::star::lang::XUnoTunnel 63cdf0e10cSrcweir >, 64cdf0e10cSrcweir public SwClient 65cdf0e10cSrcweir { 66cdf0e10cSrcweir SwEventListenerContainer aLstnrCntnr; 67cdf0e10cSrcweir const SfxItemPropertySet* m_pPropSet; 68cdf0e10cSrcweir SwDoc* m_pDoc; 69cdf0e10cSrcweir 70cdf0e10cSrcweir const FlyCntType eType; 71cdf0e10cSrcweir 72cdf0e10cSrcweir // Descriptor-interface 73cdf0e10cSrcweir BaseFrameProperties_Impl* pProps; 74cdf0e10cSrcweir sal_Bool bIsDescriptor; 75cdf0e10cSrcweir String sName; 76cdf0e10cSrcweir 77cdf0e10cSrcweir SwPaM* m_pCopySource; 78cdf0e10cSrcweir 79cdf0e10cSrcweir protected: 80cdf0e10cSrcweir com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > mxStyleData; 81cdf0e10cSrcweir com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > mxStyleFamily; 82cdf0e10cSrcweir virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); 83cdf0e10cSrcweir 84cdf0e10cSrcweir virtual ~SwXFrame(); 85cdf0e10cSrcweir public: 86cdf0e10cSrcweir SwXFrame(FlyCntType eSet, 87cdf0e10cSrcweir const SfxItemPropertySet* pPropSet, 88cdf0e10cSrcweir SwDoc *pDoc ); //Descriptor-If 89cdf0e10cSrcweir SwXFrame(SwFrmFmt& rFrmFmt, FlyCntType eSet, 90cdf0e10cSrcweir const SfxItemPropertySet* pPropSet); 91cdf0e10cSrcweir 92cdf0e10cSrcweir 93cdf0e10cSrcweir static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); 94cdf0e10cSrcweir 95cdf0e10cSrcweir //XUnoTunnel 96cdf0e10cSrcweir virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); 97cdf0e10cSrcweir 98cdf0e10cSrcweir TYPEINFO(); 99cdf0e10cSrcweir 100cdf0e10cSrcweir //XNamed 101cdf0e10cSrcweir virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException ); 102cdf0e10cSrcweir virtual void SAL_CALL setName(const rtl::OUString& Name_) throw( ::com::sun::star::uno::RuntimeException ); 103cdf0e10cSrcweir 104cdf0e10cSrcweir //XPropertySet 105cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); 106cdf0e10cSrcweir 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); 107cdf0e10cSrcweir 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); 108cdf0e10cSrcweir 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); 109cdf0e10cSrcweir 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); 110cdf0e10cSrcweir 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); 111cdf0e10cSrcweir 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); 112cdf0e10cSrcweir 113cdf0e10cSrcweir //XPropertyState 114cdf0e10cSrcweir virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); 115cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); 116cdf0e10cSrcweir virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); 117cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); 118cdf0e10cSrcweir 119cdf0e10cSrcweir //XShape 120cdf0e10cSrcweir virtual ::com::sun::star::awt::Point SAL_CALL getPosition( ) throw(::com::sun::star::uno::RuntimeException); 121cdf0e10cSrcweir virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw(::com::sun::star::uno::RuntimeException); 122cdf0e10cSrcweir virtual ::com::sun::star::awt::Size SAL_CALL getSize( ) throw(::com::sun::star::uno::RuntimeException); 123cdf0e10cSrcweir virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException); 124cdf0e10cSrcweir 125cdf0e10cSrcweir //XShapeDescriptor 126cdf0e10cSrcweir virtual rtl::OUString SAL_CALL getShapeType(void) throw( ::com::sun::star::uno::RuntimeException ); 127cdf0e10cSrcweir 128cdf0e10cSrcweir //Basisimplementierung 129cdf0e10cSrcweir //XComponent 130cdf0e10cSrcweir virtual void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException); 131cdf0e10cSrcweir virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw(::com::sun::star::uno::RuntimeException); 132cdf0e10cSrcweir virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException); 133cdf0e10cSrcweir 134cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException ); 135cdf0e10cSrcweir 136cdf0e10cSrcweir //XServiceInfo 137cdf0e10cSrcweir virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); 138cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); 139cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); 140cdf0e10cSrcweir 141cdf0e10cSrcweir void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); 142cdf0e10cSrcweir void attach( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xTextRange ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); 143cdf0e10cSrcweir GetFrmFmt() const144cdf0e10cSrcweir SwFrmFmt* GetFrmFmt() const 145cdf0e10cSrcweir { 146cdf0e10cSrcweir return PTR_CAST ( SwFrmFmt, GetRegisteredIn() ); 147cdf0e10cSrcweir } GetFlyCntType() const148cdf0e10cSrcweir FlyCntType GetFlyCntType()const {return eType;} 149cdf0e10cSrcweir IsDescriptor() const150cdf0e10cSrcweir sal_Bool IsDescriptor() const {return bIsDescriptor;} 151cdf0e10cSrcweir void ResetDescriptor(); 152cdf0e10cSrcweir //copy text from a given source PaM 153cdf0e10cSrcweir void SetSelection(SwPaM& rCopySource); 154cdf0e10cSrcweir static SW_DLLPUBLIC SdrObject *GetOrCreateSdrObject( SwFlyFrmFmt *pFmt ); 155cdf0e10cSrcweir }; 156cdf0e10cSrcweir 157cdf0e10cSrcweir typedef cppu::WeakImplHelper3 158cdf0e10cSrcweir < 159cdf0e10cSrcweir ::com::sun::star::text::XTextFrame, 160cdf0e10cSrcweir ::com::sun::star::container::XEnumerationAccess, 161cdf0e10cSrcweir ::com::sun::star::document::XEventsSupplier 162cdf0e10cSrcweir > 163cdf0e10cSrcweir SwXTextFrameBaseClass; 164cdf0e10cSrcweir 165cdf0e10cSrcweir class SwXTextFrame : public SwXTextFrameBaseClass, 166cdf0e10cSrcweir public SwXText, 167cdf0e10cSrcweir public SwXFrame 168cdf0e10cSrcweir { 169cdf0e10cSrcweir const SfxItemPropertSet* _pPropSet; 170cdf0e10cSrcweir 171cdf0e10cSrcweir protected: 172cdf0e10cSrcweir virtual const SwStartNode *GetStartNode() const; 173cdf0e10cSrcweir 174cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< 175cdf0e10cSrcweir ::com::sun::star::text::XTextCursor > 176cdf0e10cSrcweir CreateCursor() 177cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 178cdf0e10cSrcweir 179cdf0e10cSrcweir virtual ~SwXTextFrame(); 180cdf0e10cSrcweir public: 181cdf0e10cSrcweir SwXTextFrame(SwDoc *pDoc); 182cdf0e10cSrcweir SwXTextFrame(SwFrmFmt& rFmt); 183cdf0e10cSrcweir 184cdf0e10cSrcweir // FIXME: EVIL HACK: make available for SwXFrame::attachToRange SetDoc(SwDoc * const pDoc)185cdf0e10cSrcweir void SetDoc(SwDoc *const pDoc) { SwXText::SetDoc(pDoc); }; 186cdf0e10cSrcweir 187cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); 188cdf0e10cSrcweir virtual void SAL_CALL acquire( ) throw(); 189cdf0e10cSrcweir virtual void SAL_CALL release( ) throw(); 190cdf0e10cSrcweir 191cdf0e10cSrcweir //XTypeProvider 192cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); 193cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); 194cdf0e10cSrcweir 195cdf0e10cSrcweir //XTextFrame 196cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException ); 197cdf0e10cSrcweir 198cdf0e10cSrcweir //XText 199cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException ); 200cdf0e10cSrcweir 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 ); 201cdf0e10cSrcweir 202cdf0e10cSrcweir //XEnumerationAccess - frueher XParagraphEnumerationAccess 203cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException ); 204cdf0e10cSrcweir 205cdf0e10cSrcweir //XElementAccess 206cdf0e10cSrcweir virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); 207cdf0e10cSrcweir virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); 208cdf0e10cSrcweir 209cdf0e10cSrcweir //XTextContent 210cdf0e10cSrcweir virtual void SAL_CALL attach( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xTextRange ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); 211cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException); 212cdf0e10cSrcweir 213cdf0e10cSrcweir //XComponent 214cdf0e10cSrcweir virtual void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException); 215cdf0e10cSrcweir virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw(::com::sun::star::uno::RuntimeException); 216cdf0e10cSrcweir virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException); 217cdf0e10cSrcweir 218cdf0e10cSrcweir //XServiceInfo 219cdf0e10cSrcweir virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); 220cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); 221cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); 222cdf0e10cSrcweir 223cdf0e10cSrcweir // XEventsSupplier 224cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents( ) throw(::com::sun::star::uno::RuntimeException); 225cdf0e10cSrcweir 226cdf0e10cSrcweir //XUnoTunnel 227cdf0e10cSrcweir virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); 228cdf0e10cSrcweir 229cdf0e10cSrcweir //XPropertySet 230cdf0e10cSrcweir 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); 231cdf0e10cSrcweir 232cdf0e10cSrcweir void * SAL_CALL operator new( size_t ) throw(); 233cdf0e10cSrcweir void SAL_CALL operator delete( void * ) throw(); 234cdf0e10cSrcweir }; 235cdf0e10cSrcweir 236cdf0e10cSrcweir typedef cppu::WeakImplHelper2 237cdf0e10cSrcweir < 238cdf0e10cSrcweir ::com::sun::star::text::XTextContent, 239cdf0e10cSrcweir ::com::sun::star::document::XEventsSupplier 240cdf0e10cSrcweir > 241cdf0e10cSrcweir SwXTextGraphicObjectBaseClass; 242cdf0e10cSrcweir class SwXTextGraphicObject : public SwXTextGraphicObjectBaseClass, 243cdf0e10cSrcweir public SwXFrame 244cdf0e10cSrcweir { 245cdf0e10cSrcweir protected: 246cdf0e10cSrcweir virtual ~SwXTextGraphicObject(); 247cdf0e10cSrcweir public: 248cdf0e10cSrcweir SwXTextGraphicObject( SwDoc *pDoc ); 249cdf0e10cSrcweir SwXTextGraphicObject(SwFrmFmt& rFmt); 250cdf0e10cSrcweir 251cdf0e10cSrcweir 252cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); 253cdf0e10cSrcweir virtual void SAL_CALL acquire( ) throw(); 254cdf0e10cSrcweir virtual void SAL_CALL release( ) throw(); 255cdf0e10cSrcweir 256cdf0e10cSrcweir //XTypeProvider 257cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); 258cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); 259cdf0e10cSrcweir 260cdf0e10cSrcweir //XTextContent 261cdf0e10cSrcweir virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); 262cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException ); 263cdf0e10cSrcweir 264cdf0e10cSrcweir //XComponent 265cdf0e10cSrcweir virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException ); 266cdf0e10cSrcweir virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); 267cdf0e10cSrcweir virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); 268cdf0e10cSrcweir 269cdf0e10cSrcweir //XServiceInfo 270cdf0e10cSrcweir virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); 271cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); 272cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); 273cdf0e10cSrcweir 274cdf0e10cSrcweir // XEventsSupplier 275cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents( ) throw(::com::sun::star::uno::RuntimeException); 276cdf0e10cSrcweir void * SAL_CALL operator new( size_t ) throw(); 277cdf0e10cSrcweir void SAL_CALL operator delete( void * ) throw(); 278cdf0e10cSrcweir }; 279cdf0e10cSrcweir /*-----------------20.02.98 11:28------------------- 280cdf0e10cSrcweir 281cdf0e10cSrcweir --------------------------------------------------*/ 282cdf0e10cSrcweir class SwOLENode; 283cdf0e10cSrcweir typedef cppu::WeakImplHelper3 284cdf0e10cSrcweir < 285cdf0e10cSrcweir ::com::sun::star::text::XTextContent, 286cdf0e10cSrcweir ::com::sun::star::document::XEmbeddedObjectSupplier2, 287cdf0e10cSrcweir ::com::sun::star::document::XEventsSupplier 288cdf0e10cSrcweir >SwXTextEmbeddedObjectBaseClass; 289cdf0e10cSrcweir 290cdf0e10cSrcweir class SwXTextEmbeddedObject : public SwXTextEmbeddedObjectBaseClass, 291cdf0e10cSrcweir public SwXFrame 292cdf0e10cSrcweir { 293cdf0e10cSrcweir protected: 294cdf0e10cSrcweir virtual ~SwXTextEmbeddedObject(); 295cdf0e10cSrcweir 296cdf0e10cSrcweir public: 297cdf0e10cSrcweir SwXTextEmbeddedObject( SwDoc *pDoc ); 298cdf0e10cSrcweir SwXTextEmbeddedObject(SwFrmFmt& rFmt); 299cdf0e10cSrcweir 300cdf0e10cSrcweir 301cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); 302cdf0e10cSrcweir virtual void SAL_CALL acquire( ) throw(); 303cdf0e10cSrcweir virtual void SAL_CALL release( ) throw(); 304cdf0e10cSrcweir 305cdf0e10cSrcweir //XTypeProvider 306cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); 307cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); 308cdf0e10cSrcweir 309cdf0e10cSrcweir //XTextContent 310cdf0e10cSrcweir virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); 311cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException ); 312cdf0e10cSrcweir 313cdf0e10cSrcweir //XComponent 314cdf0e10cSrcweir virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException ); 315cdf0e10cSrcweir virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); 316cdf0e10cSrcweir virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); 317cdf0e10cSrcweir 318cdf0e10cSrcweir //XEmbeddedObjectSupplier2 319cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > SAL_CALL getEmbeddedObject(void) throw( ::com::sun::star::uno::RuntimeException ); 320cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject > SAL_CALL getExtendedControlOverEmbeddedObject(void) throw( ::com::sun::star::uno::RuntimeException ); 321cdf0e10cSrcweir virtual ::sal_Int64 SAL_CALL getAspect() throw (::com::sun::star::uno::RuntimeException); 322cdf0e10cSrcweir virtual void SAL_CALL setAspect( ::sal_Int64 _aspect ) throw (::com::sun::star::uno::RuntimeException); 323cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > SAL_CALL getReplacementGraphic() throw (::com::sun::star::uno::RuntimeException); 324cdf0e10cSrcweir 325cdf0e10cSrcweir //XServiceInfo 326cdf0e10cSrcweir virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); 327cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); 328cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); 329cdf0e10cSrcweir 330cdf0e10cSrcweir // XEventsSupplier 331cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents( ) throw(::com::sun::star::uno::RuntimeException); 332cdf0e10cSrcweir void * SAL_CALL operator new( size_t ) throw(); 333cdf0e10cSrcweir void SAL_CALL operator delete( void * ) throw(); 334cdf0e10cSrcweir }; 335cdf0e10cSrcweir 336cdf0e10cSrcweir 337cdf0e10cSrcweir 338cdf0e10cSrcweir class SwXOLEListener : public cppu::WeakImplHelper1 339cdf0e10cSrcweir < 340cdf0e10cSrcweir ::com::sun::star::util::XModifyListener 341cdf0e10cSrcweir >, 342cdf0e10cSrcweir public SwClient 343cdf0e10cSrcweir { 344cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xOLEModel; 345cdf0e10cSrcweir // SfxObjectShell* GetObjShell( const SwFmt& rFmt, 346cdf0e10cSrcweir // SwOLENode** ppNd = 0 ) const; GetFmt() const347cdf0e10cSrcweir SwFmt* GetFmt() const { return (SwFmt*)GetRegisteredIn(); } 348cdf0e10cSrcweir public: 349cdf0e10cSrcweir SwXOLEListener(SwFmt& rOLEFmt, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xOLE); 350cdf0e10cSrcweir ~SwXOLEListener(); 351cdf0e10cSrcweir TYPEINFO(); 352cdf0e10cSrcweir 353cdf0e10cSrcweir // ::com::sun::star::lang::XEventListener 354cdf0e10cSrcweir virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException); 355cdf0e10cSrcweir 356cdf0e10cSrcweir // ::com::sun::star::util::XModifyListener 357cdf0e10cSrcweir virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw(::com::sun::star::uno::RuntimeException); 358cdf0e10cSrcweir 359cdf0e10cSrcweir protected: 360cdf0e10cSrcweir virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); 361cdf0e10cSrcweir }; 362cdf0e10cSrcweir 363cdf0e10cSrcweir 364cdf0e10cSrcweir 365cdf0e10cSrcweir #endif 366cdf0e10cSrcweir 367