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