xref: /aoo41x/main/sw/source/core/inc/unometa.hxx (revision 67e470da)
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_UNOMETA_HXX
25cdf0e10cSrcweir #define SW_UNOMETA_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <deque>
28cdf0e10cSrcweir 
29cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
30cdf0e10cSrcweir #include <com/sun/star/lang/XUnoTunnel.hpp>
31cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp>
32cdf0e10cSrcweir #include <com/sun/star/container/XChild.hpp>
33cdf0e10cSrcweir #include <com/sun/star/container/XEnumerationAccess.hpp>
34cdf0e10cSrcweir #include <com/sun/star/text/XTextContent.hpp>
35cdf0e10cSrcweir #include <com/sun/star/text/XTextField.hpp>
36cdf0e10cSrcweir 
37cdf0e10cSrcweir #include <cppuhelper/implbase2.hxx>
38cdf0e10cSrcweir #include <cppuhelper/implbase6.hxx>
39cdf0e10cSrcweir 
40cdf0e10cSrcweir #include <sfx2/Metadatable.hxx>
41cdf0e10cSrcweir 
42cdf0e10cSrcweir #include <unobaseclass.hxx>
43cdf0e10cSrcweir 
44cdf0e10cSrcweir 
45cdf0e10cSrcweir typedef ::std::deque<
46cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > >
47cdf0e10cSrcweir     TextRangeList_t;
48cdf0e10cSrcweir 
49cdf0e10cSrcweir class SwPaM;
50cdf0e10cSrcweir class SwTxtNode;
51cdf0e10cSrcweir 
52cdf0e10cSrcweir namespace sw {
53cdf0e10cSrcweir     class Meta;
54cdf0e10cSrcweir     class MetaField;
55cdf0e10cSrcweir }
56cdf0e10cSrcweir 
57cdf0e10cSrcweir typedef ::cppu::ImplInheritanceHelper6
58cdf0e10cSrcweir <   ::sfx2::MetadatableMixin
59cdf0e10cSrcweir ,   ::com::sun::star::lang::XUnoTunnel
60cdf0e10cSrcweir ,   ::com::sun::star::lang::XServiceInfo
61cdf0e10cSrcweir ,   ::com::sun::star::container::XChild
62cdf0e10cSrcweir ,   ::com::sun::star::container::XEnumerationAccess
63cdf0e10cSrcweir ,   ::com::sun::star::text::XTextContent
64cdf0e10cSrcweir ,   ::com::sun::star::text::XText
65cdf0e10cSrcweir > SwXMeta_Base;
66cdf0e10cSrcweir 
67cdf0e10cSrcweir class SwXMeta
68cdf0e10cSrcweir     : public SwXMeta_Base
69cdf0e10cSrcweir     , private ::boost::noncopyable
70cdf0e10cSrcweir {
71cdf0e10cSrcweir 
72cdf0e10cSrcweir public:
73cdf0e10cSrcweir 
74cdf0e10cSrcweir     class Impl;
75cdf0e10cSrcweir 
76cdf0e10cSrcweir protected:
77cdf0e10cSrcweir 
78cdf0e10cSrcweir     ::sw::UnoImplPtr<Impl> m_pImpl;
79cdf0e10cSrcweir 
80cdf0e10cSrcweir     virtual void SAL_CALL AttachImpl(
81cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
82cdf0e10cSrcweir                 ::com::sun::star::text::XTextRange > & xTextRange,
83cdf0e10cSrcweir             const sal_uInt16 nWhich)
84cdf0e10cSrcweir         throw (::com::sun::star::lang::IllegalArgumentException,
85cdf0e10cSrcweir                 ::com::sun::star::uno::RuntimeException);
86cdf0e10cSrcweir 
87cdf0e10cSrcweir     virtual ~SwXMeta();
88cdf0e10cSrcweir 
89cdf0e10cSrcweir     /// @param pDoc and pMeta != 0, but not & because of ImplInheritanceHelper
90cdf0e10cSrcweir     SwXMeta(SwDoc *const pDoc, ::sw::Meta *const pMeta,
91cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::text::XText> const&
92cdf0e10cSrcweir             xParentText,
93cdf0e10cSrcweir         TextRangeList_t const*const pPortions);
94cdf0e10cSrcweir 
95cdf0e10cSrcweir public:
96cdf0e10cSrcweir 
97cdf0e10cSrcweir     SwXMeta(SwDoc *const pDoc);
98cdf0e10cSrcweir 
99cdf0e10cSrcweir     static ::com::sun::star::uno::Reference<
100cdf0e10cSrcweir             ::com::sun::star::rdf::XMetadatable >
101cdf0e10cSrcweir         CreateXMeta(
102cdf0e10cSrcweir             ::sw::Meta & rMeta,
103cdf0e10cSrcweir             ::com::sun::star::uno::Reference< ::com::sun::star::text::XText>
104cdf0e10cSrcweir                 const& xParentText = 0,
105cdf0e10cSrcweir             ::std::auto_ptr<TextRangeList_t const> pPortions =
106cdf0e10cSrcweir                 ::std::auto_ptr<TextRangeList_t const>(0));
107cdf0e10cSrcweir 
108cdf0e10cSrcweir     /// init params with position of the attribute content (w/out CH_TXTATR)
109cdf0e10cSrcweir     bool SetContentRange(
110cdf0e10cSrcweir             SwTxtNode *& rpNode, xub_StrLen & rStart, xub_StrLen & rEnd) const;
111cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >
112cdf0e10cSrcweir         GetParentText() const;
113cdf0e10cSrcweir 
114cdf0e10cSrcweir     bool CheckForOwnMemberMeta(const SwPaM & rPam, const bool bAbsorb)
115cdf0e10cSrcweir         throw (::com::sun::star::lang::IllegalArgumentException,
116cdf0e10cSrcweir                ::com::sun::star::uno::RuntimeException);
117cdf0e10cSrcweir 
118cdf0e10cSrcweir     // MetadatableMixin
119cdf0e10cSrcweir     virtual ::sfx2::Metadatable * GetCoreObject();
120cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
121cdf0e10cSrcweir         GetModel();
122cdf0e10cSrcweir 
123cdf0e10cSrcweir     static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
124cdf0e10cSrcweir 
125cdf0e10cSrcweir     // XUnoTunnel
126cdf0e10cSrcweir     virtual sal_Int64 SAL_CALL getSomething(
127cdf0e10cSrcweir             const ::com::sun::star::uno::Sequence< sal_Int8 >& Identifier )
128cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
129cdf0e10cSrcweir 
130cdf0e10cSrcweir     // XServiceInfo
131cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL getImplementationName()
132cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
133cdf0e10cSrcweir     virtual sal_Bool SAL_CALL supportsService(
134cdf0e10cSrcweir             const ::rtl::OUString& rServiceName)
135cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
136cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
137cdf0e10cSrcweir         getSupportedServiceNames()
138cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
139cdf0e10cSrcweir 
140cdf0e10cSrcweir     // XComponent
141cdf0e10cSrcweir     virtual void SAL_CALL dispose()
142cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
143cdf0e10cSrcweir     virtual void SAL_CALL addEventListener(
144cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
145cdf0e10cSrcweir                 ::com::sun::star::lang::XEventListener > & xListener)
146cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
147cdf0e10cSrcweir     virtual void SAL_CALL removeEventListener(
148cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
149cdf0e10cSrcweir                 ::com::sun::star::lang::XEventListener > & xListener)
150cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
151cdf0e10cSrcweir 
152cdf0e10cSrcweir     // XChild
153cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference<
154cdf0e10cSrcweir             ::com::sun::star::uno::XInterface > SAL_CALL
155cdf0e10cSrcweir         getParent()
156cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
157cdf0e10cSrcweir     virtual void SAL_CALL setParent(
158cdf0e10cSrcweir             ::com::sun::star::uno::Reference<
159cdf0e10cSrcweir                 ::com::sun::star::uno::XInterface> const& xParent)
160cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException,
161cdf0e10cSrcweir             ::com::sun::star::lang::NoSupportException);
162cdf0e10cSrcweir 
163cdf0e10cSrcweir     // XElementAccess
164cdf0e10cSrcweir     virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
165cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
166cdf0e10cSrcweir     virtual sal_Bool SAL_CALL hasElements()
167cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
168cdf0e10cSrcweir 
169cdf0e10cSrcweir     // XEnumerationAccess
170cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference<
171cdf0e10cSrcweir             ::com::sun::star::container::XEnumeration >  SAL_CALL
172cdf0e10cSrcweir         createEnumeration()
173cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
174cdf0e10cSrcweir 
175cdf0e10cSrcweir     // XTextContent
176cdf0e10cSrcweir     virtual void SAL_CALL attach(
177cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
178cdf0e10cSrcweir                 ::com::sun::star::text::XTextRange > & xTextRange)
179cdf0e10cSrcweir         throw (::com::sun::star::lang::IllegalArgumentException,
180cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException);
181cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference<
182cdf0e10cSrcweir                 ::com::sun::star::text::XTextRange > SAL_CALL getAnchor()
183cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
184cdf0e10cSrcweir 
185cdf0e10cSrcweir     // XTextRange
186cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >
187cdf0e10cSrcweir         SAL_CALL getText() throw (::com::sun::star::uno::RuntimeException);
188cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference<
189cdf0e10cSrcweir                 ::com::sun::star::text::XTextRange > SAL_CALL getStart()
190cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
191cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference<
192cdf0e10cSrcweir                 ::com::sun::star::text::XTextRange > SAL_CALL getEnd()
193cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
194cdf0e10cSrcweir     virtual rtl::OUString SAL_CALL getString()
195cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
196cdf0e10cSrcweir     virtual void SAL_CALL setString(const rtl::OUString& rString)
197cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
198cdf0e10cSrcweir 
199cdf0e10cSrcweir     // XSimpleText
200cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference<
201cdf0e10cSrcweir                 ::com::sun::star::text::XTextCursor >  SAL_CALL
202cdf0e10cSrcweir         createTextCursor()
203cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
204cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference<
205cdf0e10cSrcweir                 ::com::sun::star::text::XTextCursor >  SAL_CALL
206cdf0e10cSrcweir         createTextCursorByRange(
207cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
208cdf0e10cSrcweir                 ::com::sun::star::text::XTextRange > & xTextPosition)
209cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
210cdf0e10cSrcweir     virtual void SAL_CALL insertString(
211cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
212cdf0e10cSrcweir                 ::com::sun::star::text::XTextRange > & xRange,
213cdf0e10cSrcweir             const rtl::OUString& aString, sal_Bool bAbsorb)
214cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
215cdf0e10cSrcweir     virtual void SAL_CALL insertControlCharacter(
216cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
217cdf0e10cSrcweir                 ::com::sun::star::text::XTextRange > & xRange,
218cdf0e10cSrcweir             sal_Int16 nControlCharacter, sal_Bool bAbsorb)
219cdf0e10cSrcweir         throw (::com::sun::star::lang::IllegalArgumentException,
220cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException);
221cdf0e10cSrcweir 
222cdf0e10cSrcweir     // XText
223cdf0e10cSrcweir     virtual void SAL_CALL insertTextContent(
224cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
225cdf0e10cSrcweir                 ::com::sun::star::text::XTextRange > & xRange,
226cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
227cdf0e10cSrcweir                 ::com::sun::star::text::XTextContent > & xContent,
228cdf0e10cSrcweir             sal_Bool bAbsorb)
229cdf0e10cSrcweir         throw (::com::sun::star::lang::IllegalArgumentException,
230cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException);
231cdf0e10cSrcweir     virtual void SAL_CALL removeTextContent(
232cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
233cdf0e10cSrcweir                 ::com::sun::star::text::XTextContent > & xContent)
234cdf0e10cSrcweir         throw (::com::sun::star::container::NoSuchElementException,
235cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException);
236cdf0e10cSrcweir 
237cdf0e10cSrcweir };
238cdf0e10cSrcweir 
239cdf0e10cSrcweir 
240cdf0e10cSrcweir typedef ::cppu::ImplInheritanceHelper2
241cdf0e10cSrcweir <   SwXMeta
242cdf0e10cSrcweir ,   ::com::sun::star::beans::XPropertySet
243cdf0e10cSrcweir ,   ::com::sun::star::text::XTextField
244cdf0e10cSrcweir > SwXMetaField_Base;
245cdf0e10cSrcweir 
246cdf0e10cSrcweir class SwXMetaField
247cdf0e10cSrcweir     : public SwXMetaField_Base
248cdf0e10cSrcweir {
249cdf0e10cSrcweir 
250cdf0e10cSrcweir private:
251cdf0e10cSrcweir 
252cdf0e10cSrcweir     virtual ~SwXMetaField();
253cdf0e10cSrcweir 
254cdf0e10cSrcweir     friend ::com::sun::star::uno::Reference<
255cdf0e10cSrcweir             ::com::sun::star::rdf::XMetadatable >
256cdf0e10cSrcweir         SwXMeta::CreateXMeta(::sw::Meta &,
257cdf0e10cSrcweir             ::com::sun::star::uno::Reference< ::com::sun::star::text::XText>
258cdf0e10cSrcweir                 const&,
259cdf0e10cSrcweir             ::std::auto_ptr<TextRangeList_t const> pPortions);
260cdf0e10cSrcweir 
261cdf0e10cSrcweir     SwXMetaField(SwDoc *const pDoc, ::sw::Meta *const pMeta,
262cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::text::XText> const&
263cdf0e10cSrcweir             xParentText,
264cdf0e10cSrcweir         TextRangeList_t const*const pPortions);
265cdf0e10cSrcweir 
266cdf0e10cSrcweir public:
267cdf0e10cSrcweir 
268cdf0e10cSrcweir     SwXMetaField(SwDoc *const pDoc);
269cdf0e10cSrcweir 
270cdf0e10cSrcweir     // XServiceInfo
271cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL getImplementationName()
272cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
273cdf0e10cSrcweir     virtual sal_Bool SAL_CALL supportsService(
274cdf0e10cSrcweir             const ::rtl::OUString& ServiceName)
275cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
276cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
277cdf0e10cSrcweir         getSupportedServiceNames( )
278cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
279cdf0e10cSrcweir 
280cdf0e10cSrcweir     // XComponent
281cdf0e10cSrcweir     virtual void SAL_CALL dispose()
282cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
283cdf0e10cSrcweir     virtual void SAL_CALL addEventListener(
284cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
285cdf0e10cSrcweir                 ::com::sun::star::lang::XEventListener > & xListener)
286cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
287cdf0e10cSrcweir     virtual void SAL_CALL removeEventListener(
288cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
289cdf0e10cSrcweir                 ::com::sun::star::lang::XEventListener > & xListener)
290cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
291cdf0e10cSrcweir 
292cdf0e10cSrcweir     // XPropertySet
293cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference<
294cdf0e10cSrcweir             ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
295cdf0e10cSrcweir         getPropertySetInfo()
296cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
297cdf0e10cSrcweir     virtual void SAL_CALL setPropertyValue(
298cdf0e10cSrcweir             const ::rtl::OUString& rPropertyName,
299cdf0e10cSrcweir             const ::com::sun::star::uno::Any& rValue)
300cdf0e10cSrcweir         throw (::com::sun::star::beans::UnknownPropertyException,
301cdf0e10cSrcweir             ::com::sun::star::beans::PropertyVetoException,
302cdf0e10cSrcweir             ::com::sun::star::lang::IllegalArgumentException,
303cdf0e10cSrcweir             ::com::sun::star::lang::WrappedTargetException,
304cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException);
305cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL
306cdf0e10cSrcweir         getPropertyValue(const ::rtl::OUString& rPropertyName)
307cdf0e10cSrcweir         throw (::com::sun::star::beans::UnknownPropertyException,
308cdf0e10cSrcweir             ::com::sun::star::lang::WrappedTargetException,
309cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException);
310cdf0e10cSrcweir     virtual void SAL_CALL addPropertyChangeListener(
311cdf0e10cSrcweir             const ::rtl::OUString& rPropertyName,
312cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
313cdf0e10cSrcweir                 ::com::sun::star::beans::XPropertyChangeListener >& xListener)
314cdf0e10cSrcweir         throw (::com::sun::star::beans::UnknownPropertyException,
315cdf0e10cSrcweir             ::com::sun::star::lang::WrappedTargetException,
316cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException);
317cdf0e10cSrcweir     virtual void SAL_CALL removePropertyChangeListener(
318cdf0e10cSrcweir             const ::rtl::OUString& rPropertyName,
319cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
320cdf0e10cSrcweir                 ::com::sun::star::beans::XPropertyChangeListener >& xListener)
321cdf0e10cSrcweir         throw (::com::sun::star::beans::UnknownPropertyException,
322cdf0e10cSrcweir             ::com::sun::star::lang::WrappedTargetException,
323cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException);
324cdf0e10cSrcweir     virtual void SAL_CALL addVetoableChangeListener(
325cdf0e10cSrcweir             const ::rtl::OUString& rPropertyName,
326cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
327cdf0e10cSrcweir                 ::com::sun::star::beans::XVetoableChangeListener >& xListener)
328cdf0e10cSrcweir         throw (::com::sun::star::beans::UnknownPropertyException,
329cdf0e10cSrcweir             ::com::sun::star::lang::WrappedTargetException,
330cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException);
331cdf0e10cSrcweir     virtual void SAL_CALL removeVetoableChangeListener(
332cdf0e10cSrcweir             const ::rtl::OUString& rPropertyName,
333cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
334cdf0e10cSrcweir                 ::com::sun::star::beans::XVetoableChangeListener >& xListener)
335cdf0e10cSrcweir         throw (::com::sun::star::beans::UnknownPropertyException,
336cdf0e10cSrcweir             ::com::sun::star::lang::WrappedTargetException,
337cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException);
338cdf0e10cSrcweir 
339cdf0e10cSrcweir     // XTextContent
340cdf0e10cSrcweir     virtual void SAL_CALL attach(
341cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
342cdf0e10cSrcweir                 ::com::sun::star::text::XTextRange > & xTextRange)
343cdf0e10cSrcweir         throw ( ::com::sun::star::lang::IllegalArgumentException,
344cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException );
345cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference<
346cdf0e10cSrcweir             ::com::sun::star::text::XTextRange > SAL_CALL getAnchor()
347cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
348cdf0e10cSrcweir 
349cdf0e10cSrcweir     // XTextField
350cdf0e10cSrcweir     virtual rtl::OUString SAL_CALL getPresentation(sal_Bool bShowCommand)
351cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
352cdf0e10cSrcweir 
353cdf0e10cSrcweir };
354cdf0e10cSrcweir 
355cdf0e10cSrcweir /// get prefix/suffix from the RDF repository. @throws RuntimeException
356cdf0e10cSrcweir void getPrefixAndSuffix(
357cdf0e10cSrcweir         const ::com::sun::star::uno::Reference<
358cdf0e10cSrcweir             ::com::sun::star::frame::XModel>& xModel,
359cdf0e10cSrcweir         const ::com::sun::star::uno::Reference<
360cdf0e10cSrcweir             ::com::sun::star::rdf::XMetadatable>& xMetaField,
361cdf0e10cSrcweir         ::rtl::OUString *const o_pPrefix, ::rtl::OUString *const o_pSuffix);
362cdf0e10cSrcweir 
363cdf0e10cSrcweir #endif // SW_UNOMETA_HXX
364cdf0e10cSrcweir 
365