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