LCOV - code coverage report
Current view: top level - sw/inc - unoframe.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 7 8 87.5 %
Date: 2014-11-03 Functions: 5 6 83.3 %
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             : #ifndef INCLUDED_SW_INC_UNOFRAME_HXX
      20             : #define INCLUDED_SW_INC_UNOFRAME_HXX
      21             : 
      22             : #include <com/sun/star/beans/XPropertyState.hpp>
      23             : #include <com/sun/star/container/XNamed.hpp>
      24             : #include <com/sun/star/container/XEnumerationAccess.hpp>
      25             : #include <com/sun/star/document/XEmbeddedObjectSupplier2.hpp>
      26             : #include <com/sun/star/text/XTextFrame.hpp>
      27             : #include <com/sun/star/drawing/XShape.hpp>
      28             : #include <com/sun/star/util/XModifyListener.hpp>
      29             : #include <com/sun/star/frame/XModel.hpp>
      30             : #include <com/sun/star/document/XEventsSupplier.hpp>
      31             : 
      32             : #include <cppuhelper/implbase1.hxx>
      33             : #include <cppuhelper/implbase3.hxx>
      34             : #include <cppuhelper/implbase6.hxx>
      35             : 
      36             : #include <sfx2/objsh.hxx>
      37             : 
      38             : #include <flyenum.hxx>
      39             : #include <frmfmt.hxx>
      40             : #include <unotext.hxx>
      41             : 
      42             : class SdrObject;
      43             : class SwDoc;
      44             : class SwFmt;
      45             : class SwFlyFrmFmt;
      46             : 
      47             : class BaseFrameProperties_Impl;
      48             : class SwXFrame : public cppu::WeakImplHelper6
      49             : <
      50             :     ::com::sun::star::lang::XServiceInfo,
      51             :     ::com::sun::star::beans::XPropertySet,
      52             :     ::com::sun::star::beans::XPropertyState,
      53             :     ::com::sun::star::drawing::XShape,
      54             :     ::com::sun::star::container::XNamed,
      55             :     ::com::sun::star::lang::XUnoTunnel
      56             : >,
      57             :     public SwClient
      58             : {
      59             : private:
      60             :     class Impl;
      61             :     ::sw::UnoImplPtr<Impl> m_pImpl;
      62             : 
      63             :     const SfxItemPropertySet*       m_pPropSet;
      64             :     SwDoc*                          m_pDoc;
      65             : 
      66             :     const FlyCntType                eType;
      67             : 
      68             :     // Descriptor-interface
      69             :     BaseFrameProperties_Impl*       pProps;
      70             :     bool bIsDescriptor;
      71             :     OUString                        m_sName;
      72             : 
      73             :     SwPaM*                          m_pCopySource;
      74             : 
      75             : protected:
      76             :     com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > mxStyleData;
      77             :     com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >  mxStyleFamily;
      78             :    virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) SAL_OVERRIDE;
      79             : 
      80             :     virtual ~SwXFrame();
      81             : 
      82             :     SwXFrame(FlyCntType eSet,
      83             :                 const SfxItemPropertySet*    pPropSet,
      84             :                 SwDoc *pDoc ); //Descriptor-If
      85             :     SwXFrame(SwFrmFmt& rFrmFmt, FlyCntType eSet,
      86             :                 const SfxItemPropertySet*    pPropSet);
      87             : 
      88             :     template<class Interface, class Impl>
      89             :     static css::uno::Reference<Interface>
      90             :     CreateXFrame(SwDoc & rDoc, SwFrmFmt *const pFrmFmt);
      91             : 
      92             : public:
      93             :     static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
      94             : 
      95             :     //XUnoTunnel
      96             :     virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      97             : 
      98             :     TYPEINFO_OVERRIDE();
      99             : 
     100             :     //XNamed
     101             :     virtual OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     102             :     virtual void SAL_CALL setName(const OUString& Name_) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     103             : 
     104             :     //XPropertySet
     105             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     106             :     virtual void SAL_CALL setPropertyValue( const 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, std::exception) SAL_OVERRIDE;
     107             :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     108             :     virtual void SAL_CALL addPropertyChangeListener( const 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, std::exception) SAL_OVERRIDE;
     109             :     virtual void SAL_CALL removePropertyChangeListener( const 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, std::exception) SAL_OVERRIDE;
     110             :     virtual void SAL_CALL addVetoableChangeListener( const 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, std::exception) SAL_OVERRIDE;
     111             :     virtual void SAL_CALL removeVetoableChangeListener( const 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, std::exception) SAL_OVERRIDE;
     112             : 
     113             :      //XPropertyState
     114             :     virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     115             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     116             :     virtual void SAL_CALL setPropertyToDefault( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     117             :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     118             : 
     119             :    //XShape
     120             :     virtual ::com::sun::star::awt::Point SAL_CALL getPosition(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     121             :     virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     122             :     virtual ::com::sun::star::awt::Size SAL_CALL getSize(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     123             :     virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     124             : 
     125             :     //XShapeDescriptor
     126             :     virtual OUString SAL_CALL getShapeType(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     127             : 
     128             :     //Base implementation
     129             :     //XComponent
     130             :     virtual void SAL_CALL dispose(  ) throw(::com::sun::star::uno::RuntimeException, std::exception);
     131             :     virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw(::com::sun::star::uno::RuntimeException, std::exception);
     132             :     virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException, std::exception);
     133             : 
     134             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >  SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
     135             : 
     136             :     //XServiceInfo
     137             :     virtual OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     138             :     virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     139             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     140             : 
     141             :     void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw(css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception);
     142             :     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, std::exception);
     143             : 
     144        3536 :     const SwFrmFmt* GetFrmFmt() const
     145             :     {
     146        3536 :         return PTR_CAST ( SwFrmFmt, GetRegisteredIn() );
     147             :     }
     148       88244 :     SwFrmFmt* GetFrmFmt()
     149             :     {
     150       88244 :         return PTR_CAST ( SwFrmFmt, GetRegisteredIn() );
     151             :     }
     152           0 :     FlyCntType      GetFlyCntType()const {return eType;}
     153             : 
     154       42264 :     bool IsDescriptor() const {return bIsDescriptor;}
     155             :     void            ResetDescriptor();
     156             :     //copy text from a given source PaM
     157             :     void            SetSelection(SwPaM& rCopySource);
     158             :     static SW_DLLPUBLIC SdrObject *GetOrCreateSdrObject(SwFlyFrmFmt &rFmt);
     159             : };
     160             : 
     161             : typedef cppu::WeakImplHelper3
     162             : <
     163             :     ::com::sun::star::text::XTextFrame,
     164             :     ::com::sun::star::container::XEnumerationAccess,
     165             :     ::com::sun::star::document::XEventsSupplier
     166             : >
     167             : SwXTextFrameBaseClass;
     168             : 
     169             : class SwXTextFrame : public SwXTextFrameBaseClass,
     170             :     public SwXText,
     171             :     public SwXFrame
     172             : {
     173             : protected:
     174             :     friend class SwXFrame; // just for CreateXFrame
     175             : 
     176             :     virtual const SwStartNode *GetStartNode() const SAL_OVERRIDE;
     177             : 
     178             :     virtual ::com::sun::star::uno::Reference<
     179             :                 ::com::sun::star::text::XTextCursor >
     180             :         CreateCursor()
     181             :         throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
     182             : 
     183             :     virtual ~SwXTextFrame();
     184             : 
     185             :     SwXTextFrame(SwDoc *pDoc);
     186             :     SwXTextFrame(SwFrmFmt& rFmt);
     187             : 
     188             : public:
     189             :     static SW_DLLPUBLIC css::uno::Reference<css::text::XTextFrame>
     190             :             CreateXTextFrame(SwDoc & rDoc, SwFrmFmt * pFrmFmt);
     191             : 
     192             :     // FIXME: EVIL HACK:  make available for SwXFrame::attachToRange
     193        1506 :     void SetDoc(SwDoc *const pDoc) { SwXText::SetDoc(pDoc); };
     194             : 
     195             :     virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     196             :     virtual void SAL_CALL acquire(  ) throw() SAL_OVERRIDE;
     197             :     virtual void SAL_CALL release(  ) throw() SAL_OVERRIDE;
     198             : 
     199             :     //XTypeProvider
     200             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     201             :     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     202             : 
     203             :     //XTextFrame
     204             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >  SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     205             : 
     206             :     //XText
     207             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor >  SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     208             :     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, std::exception ) SAL_OVERRIDE;
     209             : 
     210             :     //XEnumerationAccess - frueher XParagraphEnumerationAccess
     211             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration >  SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     212             : 
     213             :     //XElementAccess
     214             :     virtual ::com::sun::star::uno::Type SAL_CALL getElementType(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     215             :     virtual sal_Bool SAL_CALL hasElements(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     216             : 
     217             :     //XTextContent
     218             :     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, std::exception) SAL_OVERRIDE;
     219             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     220             : 
     221             :     //XComponent
     222             :     virtual void SAL_CALL dispose(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     223             :     virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     224             :     virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     225             : 
     226             :     //XServiceInfo
     227             :     virtual OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     228             :     virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     229             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     230             : 
     231             :     // XEventsSupplier
     232             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     233             : 
     234             :     //XUnoTunnel
     235             :     virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     236             : 
     237             :     //XPropertySet
     238             :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     239             : 
     240             :     void * SAL_CALL operator new( size_t ) throw();
     241             :     void SAL_CALL operator delete( void * ) throw();
     242             : };
     243             : 
     244             : typedef cppu::WeakImplHelper2
     245             : <
     246             :     ::com::sun::star::text::XTextContent,
     247             :     ::com::sun::star::document::XEventsSupplier
     248             : >
     249             : SwXTextGraphicObjectBaseClass;
     250             : class SwXTextGraphicObject : public SwXTextGraphicObjectBaseClass,
     251             :                             public SwXFrame
     252             : {
     253             : protected:
     254             :     friend class SwXFrame; // just for CreateXFrame
     255             : 
     256             :     virtual ~SwXTextGraphicObject();
     257             : 
     258             :     SwXTextGraphicObject( SwDoc *pDoc );
     259             :     SwXTextGraphicObject(SwFrmFmt& rFmt);
     260             : 
     261             : public:
     262             : 
     263             :     static css::uno::Reference<css::text::XTextContent>
     264             :         CreateXTextGraphicObject(SwDoc & rDoc, SwFrmFmt * pFrmFmt);
     265             : 
     266             :     virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     267             :     virtual void SAL_CALL acquire(  ) throw() SAL_OVERRIDE;
     268             :     virtual void SAL_CALL release(  ) throw() SAL_OVERRIDE;
     269             : 
     270             :     //XTypeProvider
     271             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     272             :     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     273             : 
     274             :     //XTextContent
     275             :     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, std::exception ) SAL_OVERRIDE;
     276             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >  SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     277             : 
     278             :     //XComponent
     279             :     virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     280             :     virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     281             :     virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     282             : 
     283             :     //XServiceInfo
     284             :     virtual OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     285             :     virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     286             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     287             : 
     288             :     // XEventsSupplier
     289             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     290             :     void * SAL_CALL operator new( size_t ) throw();
     291             :     void SAL_CALL operator delete( void * ) throw();
     292             : };
     293             : 
     294             : class SwOLENode;
     295             : typedef cppu::WeakImplHelper3
     296             : <
     297             :     ::com::sun::star::text::XTextContent,
     298             :     ::com::sun::star::document::XEmbeddedObjectSupplier2,
     299             :     ::com::sun::star::document::XEventsSupplier
     300             : >SwXTextEmbeddedObjectBaseClass;
     301             : 
     302             : class SwXTextEmbeddedObject : public SwXTextEmbeddedObjectBaseClass,
     303             :                                 public SwXFrame
     304             : {
     305             : protected:
     306             :     friend class SwXFrame; // just for CreateXFrame
     307             : 
     308             :     virtual ~SwXTextEmbeddedObject();
     309             : 
     310             :     SwXTextEmbeddedObject( SwDoc *pDoc );
     311             :     SwXTextEmbeddedObject(SwFrmFmt& rFmt);
     312             : 
     313             : public:
     314             : 
     315             :     static css::uno::Reference<css::text::XTextContent>
     316             :         CreateXTextEmbeddedObject(SwDoc & rDoc, SwFrmFmt * pFrmFmt);
     317             : 
     318             :     virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     319             :     virtual void SAL_CALL acquire(  ) throw() SAL_OVERRIDE;
     320             :     virtual void SAL_CALL release(  ) throw() SAL_OVERRIDE;
     321             : 
     322             :     //XTypeProvider
     323             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     324             :     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     325             : 
     326             :     //XTextContent
     327             :     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, std::exception ) SAL_OVERRIDE;
     328             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >  SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     329             : 
     330             :     //XComponent
     331             :     virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     332             :     virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     333             :     virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     334             : 
     335             :     //XEmbeddedObjectSupplier2
     336             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >  SAL_CALL getEmbeddedObject(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     337             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject > SAL_CALL getExtendedControlOverEmbeddedObject(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     338             :     virtual ::sal_Int64 SAL_CALL getAspect() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     339             :     virtual void SAL_CALL setAspect( ::sal_Int64 _aspect ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     340             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > SAL_CALL getReplacementGraphic() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     341             : 
     342             :     //XServiceInfo
     343             :     virtual OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     344             :     virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     345             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     346             : 
     347             :     // XEventsSupplier
     348             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     349             :     void * SAL_CALL operator new( size_t ) throw();
     350             :     void SAL_CALL operator delete( void * ) throw();
     351             : };
     352             : 
     353             : class SwXOLEListener : public cppu::WeakImplHelper1
     354             : <
     355             :     ::com::sun::star::util::XModifyListener
     356             : >,
     357             :     public SwClient
     358             : {
     359             :     ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xOLEModel;
     360             : 
     361         508 :     SwFmt*       GetFmt() const    {  return (SwFmt*)GetRegisteredIn(); }
     362             : public:
     363             :     SwXOLEListener(SwFmt& rOLEFmt, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xOLE);
     364             :     virtual ~SwXOLEListener();
     365             :     TYPEINFO_OVERRIDE();
     366             : 
     367             : // ::com::sun::star::lang::XEventListener
     368             :     virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     369             : 
     370             : // ::com::sun::star::util::XModifyListener
     371             :     virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     372             : 
     373             : protected:
     374             :    virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) SAL_OVERRIDE;
     375             : };
     376             : 
     377             : #endif
     378             : 
     379             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10