1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef SW_UNOREFMARK_HXX 25 #define SW_UNOREFMARK_HXX 26 27 #include <com/sun/star/lang/XUnoTunnel.hpp> 28 #include <com/sun/star/lang/XServiceInfo.hpp> 29 #include <com/sun/star/beans/XPropertySet.hpp> 30 #include <com/sun/star/container/XNamed.hpp> 31 #include <com/sun/star/text/XTextContent.hpp> 32 33 #include <cppuhelper/implbase5.hxx> 34 35 #include <unobaseclass.hxx> 36 37 38 class SwDoc; 39 class SwModify; 40 class SwFmtRefMark; 41 42 43 /* -----------------27.08.98 15:11------------------- 44 * 45 * --------------------------------------------------*/ 46 typedef ::cppu::WeakImplHelper5 47 < ::com::sun::star::lang::XUnoTunnel 48 , ::com::sun::star::lang::XServiceInfo 49 , ::com::sun::star::beans::XPropertySet 50 , ::com::sun::star::container::XNamed 51 , ::com::sun::star::text::XTextContent 52 > SwXReferenceMark_Base; 53 54 class SwXReferenceMark 55 : public SwXReferenceMark_Base 56 { 57 58 private: 59 60 class Impl; 61 ::sw::UnoImplPtr<Impl> m_pImpl; 62 63 virtual ~SwXReferenceMark(); 64 65 public: 66 67 SwXReferenceMark(SwDoc *const pDoc, const SwFmtRefMark *const pMark); 68 69 static SwXReferenceMark * 70 CreateXReferenceMark(SwDoc & rDoc, SwFmtRefMark const& rMarkFmt); 71 /// may return 0 72 static SwXReferenceMark * 73 GetReferenceMark(SwModify const& rUnoCB, SwFmtRefMark const& rMarkFmt); 74 75 static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId(); 76 77 // XUnoTunnel 78 virtual sal_Int64 SAL_CALL getSomething( 79 const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier); 80 81 // XServiceInfo 82 virtual ::rtl::OUString SAL_CALL getImplementationName(); 83 virtual sal_Bool SAL_CALL supportsService( 84 const ::rtl::OUString& rServiceName); 85 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL 86 getSupportedServiceNames(); 87 88 // XComponent 89 virtual void SAL_CALL dispose(); 90 virtual void SAL_CALL addEventListener( 91 const ::com::sun::star::uno::Reference< 92 ::com::sun::star::lang::XEventListener > & xListener); 93 virtual void SAL_CALL removeEventListener( 94 const ::com::sun::star::uno::Reference< 95 ::com::sun::star::lang::XEventListener > & xListener); 96 97 // XPropertySet 98 virtual ::com::sun::star::uno::Reference< 99 ::com::sun::star::beans::XPropertySetInfo > SAL_CALL 100 getPropertySetInfo(); 101 virtual void SAL_CALL setPropertyValue( 102 const ::rtl::OUString& rPropertyName, 103 const ::com::sun::star::uno::Any& rValue); 104 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( 105 const ::rtl::OUString& rPropertyName); 106 virtual void SAL_CALL addPropertyChangeListener( 107 const ::rtl::OUString& rPropertyName, 108 const ::com::sun::star::uno::Reference< 109 ::com::sun::star::beans::XPropertyChangeListener >& xListener); 110 virtual void SAL_CALL removePropertyChangeListener( 111 const ::rtl::OUString& rPropertyName, 112 const ::com::sun::star::uno::Reference< 113 ::com::sun::star::beans::XPropertyChangeListener >& xListener); 114 virtual void SAL_CALL addVetoableChangeListener( 115 const ::rtl::OUString& rPropertyName, 116 const ::com::sun::star::uno::Reference< 117 ::com::sun::star::beans::XVetoableChangeListener >& xListener); 118 virtual void SAL_CALL removeVetoableChangeListener( 119 const ::rtl::OUString& rPropertyName, 120 const ::com::sun::star::uno::Reference< 121 ::com::sun::star::beans::XVetoableChangeListener >& xListener); 122 123 // XNamed 124 virtual ::rtl::OUString SAL_CALL getName(); 125 virtual void SAL_CALL setName(const ::rtl::OUString& rName); 126 127 // XTextContent 128 virtual void SAL_CALL attach( 129 const ::com::sun::star::uno::Reference< 130 ::com::sun::star::text::XTextRange > & xTextRange); 131 virtual ::com::sun::star::uno::Reference< 132 ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(); 133 134 }; 135 136 #endif // SW_UNOREFMARK_HXX 137