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 24cdf0e10cSrcweir #ifndef SW_UNOFOOTNOTE_HXX 25cdf0e10cSrcweir #define SW_UNOFOOTNOTE_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <com/sun/star/lang/XUnoTunnel.hpp> 28cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp> 29cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp> 30cdf0e10cSrcweir #include <com/sun/star/container/XEnumerationAccess.hpp> 31cdf0e10cSrcweir #include <com/sun/star/text/XTextContent.hpp> 32cdf0e10cSrcweir #include <com/sun/star/text/XFootnote.hpp> 33cdf0e10cSrcweir 34cdf0e10cSrcweir #include <cppuhelper/implbase5.hxx> 35cdf0e10cSrcweir 36cdf0e10cSrcweir #include <unotext.hxx> 37cdf0e10cSrcweir 38cdf0e10cSrcweir 39cdf0e10cSrcweir class SwDoc; 40cdf0e10cSrcweir class SwModify; 41cdf0e10cSrcweir class SwFmtFtn; 42cdf0e10cSrcweir 43cdf0e10cSrcweir 44cdf0e10cSrcweir /*-----------------12.02.98 08:01------------------- 45cdf0e10cSrcweir 46cdf0e10cSrcweir --------------------------------------------------*/ 47cdf0e10cSrcweir typedef ::cppu::WeakImplHelper5 48cdf0e10cSrcweir < ::com::sun::star::lang::XUnoTunnel 49cdf0e10cSrcweir , ::com::sun::star::lang::XServiceInfo 50cdf0e10cSrcweir , ::com::sun::star::beans::XPropertySet 51cdf0e10cSrcweir , ::com::sun::star::container::XEnumerationAccess 52cdf0e10cSrcweir , ::com::sun::star::text::XFootnote 53cdf0e10cSrcweir > SwXFootnote_Base; 54cdf0e10cSrcweir 55cdf0e10cSrcweir class SwXFootnote 56cdf0e10cSrcweir : public SwXFootnote_Base 57cdf0e10cSrcweir , public SwXText 58cdf0e10cSrcweir { 59cdf0e10cSrcweir 60cdf0e10cSrcweir private: 61cdf0e10cSrcweir 62cdf0e10cSrcweir friend class SwXFootnotes; 63cdf0e10cSrcweir 64cdf0e10cSrcweir class Impl; 65cdf0e10cSrcweir ::sw::UnoImplPtr<Impl> m_pImpl; 66cdf0e10cSrcweir 67cdf0e10cSrcweir 68cdf0e10cSrcweir protected: 69cdf0e10cSrcweir 70cdf0e10cSrcweir virtual const SwStartNode *GetStartNode() const; 71cdf0e10cSrcweir 72cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< 73cdf0e10cSrcweir ::com::sun::star::text::XTextCursor > 74cdf0e10cSrcweir CreateCursor() 75cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 76cdf0e10cSrcweir 77cdf0e10cSrcweir virtual ~SwXFootnote(); 78cdf0e10cSrcweir 79cdf0e10cSrcweir SwXFootnote(SwDoc & rDoc, const SwFmtFtn & rFmt); 80cdf0e10cSrcweir 81cdf0e10cSrcweir public: 82cdf0e10cSrcweir 83cdf0e10cSrcweir SwXFootnote(const bool bEndnote); 84cdf0e10cSrcweir 85cdf0e10cSrcweir static SwXFootnote * 86cdf0e10cSrcweir CreateXFootnote(SwDoc & rDoc, SwFmtFtn const& rFootnoteFmt); 87cdf0e10cSrcweir /// may return 0 88cdf0e10cSrcweir static SwXFootnote * 89cdf0e10cSrcweir GetXFootnote(SwModify const& rUnoCB, SwFmtFtn const& rFootnoteFmt); 90cdf0e10cSrcweir 91cdf0e10cSrcweir // XInterface 92cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( 93cdf0e10cSrcweir const ::com::sun::star::uno::Type& rType) 94cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); acquire()95cdf0e10cSrcweir virtual void SAL_CALL acquire() throw() { OWeakObject::acquire(); } release()96cdf0e10cSrcweir virtual void SAL_CALL release() throw() { OWeakObject::release(); } 97cdf0e10cSrcweir 98cdf0e10cSrcweir // XTypeProvider 99cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > 100cdf0e10cSrcweir SAL_CALL getTypes() 101cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 102cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL 103cdf0e10cSrcweir getImplementationId() 104cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 105cdf0e10cSrcweir 106cdf0e10cSrcweir static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId(); 107cdf0e10cSrcweir 108cdf0e10cSrcweir // XUnoTunnel 109cdf0e10cSrcweir virtual sal_Int64 SAL_CALL getSomething( 110cdf0e10cSrcweir const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier) 111cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 112cdf0e10cSrcweir 113cdf0e10cSrcweir // XServiceInfo 114cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() 115cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 116cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( 117cdf0e10cSrcweir const ::rtl::OUString& rServiceName) 118cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 119cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL 120cdf0e10cSrcweir getSupportedServiceNames() 121cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 122cdf0e10cSrcweir 123cdf0e10cSrcweir // XComponent 124cdf0e10cSrcweir virtual void SAL_CALL dispose() 125cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 126cdf0e10cSrcweir virtual void SAL_CALL addEventListener( 127cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 128cdf0e10cSrcweir ::com::sun::star::lang::XEventListener > & xListener) 129cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 130cdf0e10cSrcweir virtual void SAL_CALL removeEventListener( 131cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 132cdf0e10cSrcweir ::com::sun::star::lang::XEventListener > & xListener) 133cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 134cdf0e10cSrcweir 135cdf0e10cSrcweir // XPropertySet 136cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< 137cdf0e10cSrcweir ::com::sun::star::beans::XPropertySetInfo > SAL_CALL 138cdf0e10cSrcweir getPropertySetInfo() 139cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 140cdf0e10cSrcweir virtual void SAL_CALL setPropertyValue( 141cdf0e10cSrcweir const ::rtl::OUString& rPropertyName, 142cdf0e10cSrcweir const ::com::sun::star::uno::Any& rValue) 143cdf0e10cSrcweir throw (::com::sun::star::beans::UnknownPropertyException, 144cdf0e10cSrcweir ::com::sun::star::beans::PropertyVetoException, 145cdf0e10cSrcweir ::com::sun::star::lang::IllegalArgumentException, 146cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 147cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 148cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( 149cdf0e10cSrcweir const ::rtl::OUString& rPropertyName) 150cdf0e10cSrcweir throw (::com::sun::star::beans::UnknownPropertyException, 151cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 152cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 153cdf0e10cSrcweir virtual void SAL_CALL addPropertyChangeListener( 154cdf0e10cSrcweir const ::rtl::OUString& rPropertyName, 155cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 156cdf0e10cSrcweir ::com::sun::star::beans::XPropertyChangeListener >& xListener) 157cdf0e10cSrcweir throw (::com::sun::star::beans::UnknownPropertyException, 158cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 159cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 160cdf0e10cSrcweir virtual void SAL_CALL removePropertyChangeListener( 161cdf0e10cSrcweir const ::rtl::OUString& rPropertyName, 162cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 163cdf0e10cSrcweir ::com::sun::star::beans::XPropertyChangeListener >& xListener) 164cdf0e10cSrcweir throw (::com::sun::star::beans::UnknownPropertyException, 165cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 166cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 167cdf0e10cSrcweir virtual void SAL_CALL addVetoableChangeListener( 168cdf0e10cSrcweir const ::rtl::OUString& rPropertyName, 169cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 170cdf0e10cSrcweir ::com::sun::star::beans::XVetoableChangeListener >& xListener) 171cdf0e10cSrcweir throw (::com::sun::star::beans::UnknownPropertyException, 172cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 173cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 174cdf0e10cSrcweir virtual void SAL_CALL removeVetoableChangeListener( 175cdf0e10cSrcweir const ::rtl::OUString& rPropertyName, 176cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 177cdf0e10cSrcweir ::com::sun::star::beans::XVetoableChangeListener >& xListener) 178cdf0e10cSrcweir throw (::com::sun::star::beans::UnknownPropertyException, 179cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 180cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 181cdf0e10cSrcweir 182cdf0e10cSrcweir // XElementAccess 183cdf0e10cSrcweir virtual ::com::sun::star::uno::Type SAL_CALL getElementType() 184cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 185cdf0e10cSrcweir virtual sal_Bool SAL_CALL hasElements() 186cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 187cdf0e10cSrcweir 188cdf0e10cSrcweir // XEnumerationAccess 189cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< 190cdf0e10cSrcweir ::com::sun::star::container::XEnumeration > SAL_CALL 191cdf0e10cSrcweir createEnumeration() 192cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 193cdf0e10cSrcweir 194cdf0e10cSrcweir // XTextContent 195cdf0e10cSrcweir virtual void SAL_CALL attach( 196cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 197cdf0e10cSrcweir ::com::sun::star::text::XTextRange > & xTextRange) 198cdf0e10cSrcweir throw (::com::sun::star::lang::IllegalArgumentException, 199cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 200cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< 201cdf0e10cSrcweir ::com::sun::star::text::XTextRange > SAL_CALL getAnchor() 202cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 203cdf0e10cSrcweir 204cdf0e10cSrcweir // XFootnote 205cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getLabel() 206cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 207cdf0e10cSrcweir virtual void SAL_CALL setLabel(const ::rtl::OUString& rLabel) 208cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 209cdf0e10cSrcweir 210cdf0e10cSrcweir // XSimpleText 211cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< 212cdf0e10cSrcweir ::com::sun::star::text::XTextCursor > SAL_CALL 213cdf0e10cSrcweir createTextCursor() 214cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 215cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< 216cdf0e10cSrcweir ::com::sun::star::text::XTextCursor > SAL_CALL 217cdf0e10cSrcweir createTextCursorByRange( 218cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 219cdf0e10cSrcweir ::com::sun::star::text::XTextRange > & xTextPosition) 220cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 221cdf0e10cSrcweir 222cdf0e10cSrcweir }; 223cdf0e10cSrcweir 224cdf0e10cSrcweir #endif // SW_UNOFOOTNOTE_HXX 225cdf0e10cSrcweir 226