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_UNOREFMARK_HXX 25cdf0e10cSrcweir #define SW_UNOREFMARK_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/XNamed.hpp> 31cdf0e10cSrcweir #include <com/sun/star/text/XTextContent.hpp> 32cdf0e10cSrcweir 33cdf0e10cSrcweir #include <cppuhelper/implbase5.hxx> 34cdf0e10cSrcweir 35cdf0e10cSrcweir #include <unobaseclass.hxx> 36cdf0e10cSrcweir 37cdf0e10cSrcweir 38cdf0e10cSrcweir class SwDoc; 39cdf0e10cSrcweir class SwModify; 40cdf0e10cSrcweir class SwFmtRefMark; 41cdf0e10cSrcweir 42cdf0e10cSrcweir 43cdf0e10cSrcweir /* -----------------27.08.98 15:11------------------- 44cdf0e10cSrcweir * 45cdf0e10cSrcweir * --------------------------------------------------*/ 46cdf0e10cSrcweir typedef ::cppu::WeakImplHelper5 47cdf0e10cSrcweir < ::com::sun::star::lang::XUnoTunnel 48cdf0e10cSrcweir , ::com::sun::star::lang::XServiceInfo 49cdf0e10cSrcweir , ::com::sun::star::beans::XPropertySet 50cdf0e10cSrcweir , ::com::sun::star::container::XNamed 51cdf0e10cSrcweir , ::com::sun::star::text::XTextContent 52cdf0e10cSrcweir > SwXReferenceMark_Base; 53cdf0e10cSrcweir 54cdf0e10cSrcweir class SwXReferenceMark 55cdf0e10cSrcweir : public SwXReferenceMark_Base 56cdf0e10cSrcweir { 57cdf0e10cSrcweir 58cdf0e10cSrcweir private: 59cdf0e10cSrcweir 60cdf0e10cSrcweir class Impl; 61cdf0e10cSrcweir ::sw::UnoImplPtr<Impl> m_pImpl; 62cdf0e10cSrcweir 63cdf0e10cSrcweir virtual ~SwXReferenceMark(); 64cdf0e10cSrcweir 65cdf0e10cSrcweir public: 66cdf0e10cSrcweir 67cdf0e10cSrcweir SwXReferenceMark(SwDoc *const pDoc, const SwFmtRefMark *const pMark); 68cdf0e10cSrcweir 69cdf0e10cSrcweir static SwXReferenceMark * 70cdf0e10cSrcweir CreateXReferenceMark(SwDoc & rDoc, SwFmtRefMark const& rMarkFmt); 71cdf0e10cSrcweir /// may return 0 72cdf0e10cSrcweir static SwXReferenceMark * 73cdf0e10cSrcweir GetReferenceMark(SwModify const& rUnoCB, SwFmtRefMark const& rMarkFmt); 74cdf0e10cSrcweir 75cdf0e10cSrcweir static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId(); 76cdf0e10cSrcweir 77cdf0e10cSrcweir // XUnoTunnel 78cdf0e10cSrcweir virtual sal_Int64 SAL_CALL getSomething( 79cdf0e10cSrcweir const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier) 80cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 81cdf0e10cSrcweir 82cdf0e10cSrcweir // XServiceInfo 83cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() 84cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 85cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( 86cdf0e10cSrcweir const ::rtl::OUString& rServiceName) 87cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 88cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL 89cdf0e10cSrcweir getSupportedServiceNames() 90cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 91cdf0e10cSrcweir 92cdf0e10cSrcweir // XComponent 93cdf0e10cSrcweir virtual void SAL_CALL dispose() 94cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 95cdf0e10cSrcweir virtual void SAL_CALL addEventListener( 96cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 97cdf0e10cSrcweir ::com::sun::star::lang::XEventListener > & xListener) 98cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 99cdf0e10cSrcweir virtual void SAL_CALL removeEventListener( 100cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 101cdf0e10cSrcweir ::com::sun::star::lang::XEventListener > & xListener) 102cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 103cdf0e10cSrcweir 104cdf0e10cSrcweir // XPropertySet 105cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< 106cdf0e10cSrcweir ::com::sun::star::beans::XPropertySetInfo > SAL_CALL 107cdf0e10cSrcweir getPropertySetInfo() 108cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 109cdf0e10cSrcweir virtual void SAL_CALL setPropertyValue( 110cdf0e10cSrcweir const ::rtl::OUString& rPropertyName, 111cdf0e10cSrcweir const ::com::sun::star::uno::Any& rValue) 112cdf0e10cSrcweir throw (::com::sun::star::beans::UnknownPropertyException, 113cdf0e10cSrcweir ::com::sun::star::beans::PropertyVetoException, 114cdf0e10cSrcweir ::com::sun::star::lang::IllegalArgumentException, 115cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 116cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 117cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( 118cdf0e10cSrcweir const ::rtl::OUString& rPropertyName) 119cdf0e10cSrcweir throw (::com::sun::star::beans::UnknownPropertyException, 120cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 121cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 122cdf0e10cSrcweir virtual void SAL_CALL addPropertyChangeListener( 123cdf0e10cSrcweir const ::rtl::OUString& rPropertyName, 124cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 125cdf0e10cSrcweir ::com::sun::star::beans::XPropertyChangeListener >& xListener) 126cdf0e10cSrcweir throw (::com::sun::star::beans::UnknownPropertyException, 127cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 128cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 129cdf0e10cSrcweir virtual void SAL_CALL removePropertyChangeListener( 130cdf0e10cSrcweir const ::rtl::OUString& rPropertyName, 131cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 132cdf0e10cSrcweir ::com::sun::star::beans::XPropertyChangeListener >& xListener) 133cdf0e10cSrcweir throw (::com::sun::star::beans::UnknownPropertyException, 134cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 135cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 136cdf0e10cSrcweir virtual void SAL_CALL addVetoableChangeListener( 137cdf0e10cSrcweir const ::rtl::OUString& rPropertyName, 138cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 139cdf0e10cSrcweir ::com::sun::star::beans::XVetoableChangeListener >& xListener) 140cdf0e10cSrcweir throw (::com::sun::star::beans::UnknownPropertyException, 141cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 142cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 143cdf0e10cSrcweir virtual void SAL_CALL removeVetoableChangeListener( 144cdf0e10cSrcweir const ::rtl::OUString& rPropertyName, 145cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 146cdf0e10cSrcweir ::com::sun::star::beans::XVetoableChangeListener >& xListener) 147cdf0e10cSrcweir throw (::com::sun::star::beans::UnknownPropertyException, 148cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 149cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 150cdf0e10cSrcweir 151cdf0e10cSrcweir // XNamed 152cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getName() 153cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 154cdf0e10cSrcweir virtual void SAL_CALL setName(const ::rtl::OUString& rName) 155cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 156cdf0e10cSrcweir 157cdf0e10cSrcweir // XTextContent 158cdf0e10cSrcweir virtual void SAL_CALL attach( 159cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 160cdf0e10cSrcweir ::com::sun::star::text::XTextRange > & xTextRange) 161cdf0e10cSrcweir throw (::com::sun::star::lang::IllegalArgumentException, 162cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 163cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< 164cdf0e10cSrcweir ::com::sun::star::text::XTextRange > SAL_CALL getAnchor() 165cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 166cdf0e10cSrcweir 167cdf0e10cSrcweir }; 168cdf0e10cSrcweir 169cdf0e10cSrcweir #endif // SW_UNOREFMARK_HXX 170cdf0e10cSrcweir 171