1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef SW_UNOTEXTBODYHF_HXX
21 #define SW_UNOTEXTBODYHF_HXX
23 #include <com/sun/star/lang/XUnoTunnel.hpp>
24 #include <com/sun/star/lang/XServiceInfo.hpp>
25 #include <com/sun/star/container/XEnumerationAccess.hpp>
27 #include <cppuhelper/implbase2.hxx>
29 #include <unotext.hxx>
37 typedef ::cppu::WeakAggImplHelper2
38 < ::com::sun::star::lang::XServiceInfo
39 , ::com::sun::star::container::XEnumerationAccess
43 : public SwXBodyText_Base
49 virtual ~SwXBodyText();
53 SwXBodyText(SwDoc
*const pDoc
);
55 SwXTextCursor
* CreateTextCursor(const bool bIgnoreTables
= false);
58 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface(
59 const ::com::sun::star::uno::Type
& rType
)
60 throw (::com::sun::star::uno::RuntimeException
);
61 virtual void SAL_CALL
acquire() throw() { OWeakObject::acquire(); }
62 virtual void SAL_CALL
release() throw() { OWeakObject::release(); }
65 virtual ::com::sun::star::uno::Any SAL_CALL
queryAggregation(
66 const ::com::sun::star::uno::Type
& rType
)
67 throw (::com::sun::star::uno::RuntimeException
);
70 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
>
72 throw (::com::sun::star::uno::RuntimeException
);
73 virtual ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
75 throw (::com::sun::star::uno::RuntimeException
);
78 virtual OUString SAL_CALL
getImplementationName()
79 throw (::com::sun::star::uno::RuntimeException
);
80 virtual sal_Bool SAL_CALL
supportsService(
81 const OUString
& rServiceName
)
82 throw (::com::sun::star::uno::RuntimeException
);
83 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
84 getSupportedServiceNames()
85 throw (::com::sun::star::uno::RuntimeException
);
88 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType()
89 throw (::com::sun::star::uno::RuntimeException
);
90 virtual sal_Bool SAL_CALL
hasElements()
91 throw (::com::sun::star::uno::RuntimeException
);
94 virtual ::com::sun::star::uno::Reference
<
95 ::com::sun::star::container::XEnumeration
> SAL_CALL
97 throw (::com::sun::star::uno::RuntimeException
);
100 virtual ::com::sun::star::uno::Reference
<
101 ::com::sun::star::text::XTextCursor
> SAL_CALL
103 throw (::com::sun::star::uno::RuntimeException
);
104 virtual ::com::sun::star::uno::Reference
<
105 ::com::sun::star::text::XTextCursor
> SAL_CALL
106 createTextCursorByRange(
107 const ::com::sun::star::uno::Reference
<
108 ::com::sun::star::text::XTextRange
> & xTextPosition
)
109 throw (::com::sun::star::uno::RuntimeException
);
114 typedef ::cppu::WeakImplHelper2
115 < ::com::sun::star::lang::XServiceInfo
116 , ::com::sun::star::container::XEnumerationAccess
117 > SwXHeadFootText_Base
;
119 class SwXHeadFootText
120 : public SwXHeadFootText_Base
127 ::sw::UnoImplPtr
<Impl
> m_pImpl
;
131 virtual const SwStartNode
*GetStartNode() const;
132 virtual ::com::sun::star::uno::Reference
<
133 ::com::sun::star::text::XTextCursor
>
135 throw (::com::sun::star::uno::RuntimeException
);
137 virtual ~SwXHeadFootText();
139 SwXHeadFootText(SwFrmFmt
& rHeadFootFmt
, const bool bIsHeader
);
143 static ::com::sun::star::uno::Reference
< ::com::sun::star::text::XText
>
144 CreateXHeadFootText(SwFrmFmt
& rHeadFootFmt
, const bool bIsHeader
);
145 static bool IsXHeadFootText(SwClient
*const pClient
);
148 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface(
149 const ::com::sun::star::uno::Type
& rType
)
150 throw (::com::sun::star::uno::RuntimeException
);
151 virtual void SAL_CALL
acquire() throw() { OWeakObject::acquire(); }
152 virtual void SAL_CALL
release() throw() { OWeakObject::release(); }
155 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
>
157 throw (::com::sun::star::uno::RuntimeException
);
158 virtual ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
159 getImplementationId()
160 throw (::com::sun::star::uno::RuntimeException
);
163 virtual OUString SAL_CALL
getImplementationName()
164 throw (::com::sun::star::uno::RuntimeException
);
165 virtual sal_Bool SAL_CALL
supportsService(
166 const OUString
& rServiceName
)
167 throw (::com::sun::star::uno::RuntimeException
);
168 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
169 getSupportedServiceNames()
170 throw (::com::sun::star::uno::RuntimeException
);
173 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType()
174 throw (::com::sun::star::uno::RuntimeException
);
175 virtual sal_Bool SAL_CALL
hasElements()
176 throw (::com::sun::star::uno::RuntimeException
);
178 // XEnumerationAccess
179 virtual ::com::sun::star::uno::Reference
<
180 ::com::sun::star::container::XEnumeration
> SAL_CALL
182 throw (::com::sun::star::uno::RuntimeException
);
185 virtual ::com::sun::star::uno::Reference
<
186 ::com::sun::star::text::XTextCursor
> SAL_CALL
188 throw (::com::sun::star::uno::RuntimeException
);
189 virtual ::com::sun::star::uno::Reference
<
190 ::com::sun::star::text::XTextCursor
> SAL_CALL
191 createTextCursorByRange(
192 const ::com::sun::star::uno::Reference
<
193 ::com::sun::star::text::XTextRange
> & xTextPosition
)
194 throw (::com::sun::star::uno::RuntimeException
);
198 #endif // SW_UNOTEXTBODYHF_HXX
200 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */