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 INCLUDED_SW_INC_UNOTEXTBODYHF_HXX
21 #define INCLUDED_SW_INC_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/implbase.hxx>
28 #include <cppuhelper/implbase2.hxx>
30 #include <unotext.hxx>
36 typedef ::cppu::WeakAggImplHelper2
37 < ::com::sun::star::lang::XServiceInfo
38 , ::com::sun::star::container::XEnumerationAccess
42 : public SwXBodyText_Base
48 virtual ~SwXBodyText();
52 SwXBodyText(SwDoc
*const pDoc
);
54 SwXTextCursor
* CreateTextCursor(const bool bIgnoreTables
= false);
57 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface(
58 const ::com::sun::star::uno::Type
& rType
)
59 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
60 virtual void SAL_CALL
acquire() throw() SAL_OVERRIDE
{ OWeakObject::acquire(); }
61 virtual void SAL_CALL
release() throw() SAL_OVERRIDE
{ OWeakObject::release(); }
64 virtual ::com::sun::star::uno::Any SAL_CALL
queryAggregation(
65 const ::com::sun::star::uno::Type
& rType
)
66 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
69 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
>
71 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
72 virtual ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
74 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
77 virtual OUString SAL_CALL
getImplementationName()
78 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
79 virtual sal_Bool SAL_CALL
supportsService(
80 const OUString
& rServiceName
)
81 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
82 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
83 getSupportedServiceNames()
84 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
87 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType()
88 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
89 virtual sal_Bool SAL_CALL
hasElements()
90 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
93 virtual ::com::sun::star::uno::Reference
<
94 ::com::sun::star::container::XEnumeration
> SAL_CALL
96 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
99 virtual ::com::sun::star::uno::Reference
<
100 ::com::sun::star::text::XTextCursor
> SAL_CALL
102 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
103 virtual ::com::sun::star::uno::Reference
<
104 ::com::sun::star::text::XTextCursor
> SAL_CALL
105 createTextCursorByRange(
106 const ::com::sun::star::uno::Reference
<
107 ::com::sun::star::text::XTextRange
> & xTextPosition
)
108 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
112 typedef ::cppu::WeakImplHelper
113 < ::com::sun::star::lang::XServiceInfo
114 , ::com::sun::star::container::XEnumerationAccess
115 > SwXHeadFootText_Base
;
117 class SwXHeadFootText
118 : public SwXHeadFootText_Base
125 ::sw::UnoImplPtr
<Impl
> m_pImpl
;
129 virtual const SwStartNode
*GetStartNode() const SAL_OVERRIDE
;
130 virtual ::com::sun::star::uno::Reference
<
131 ::com::sun::star::text::XTextCursor
>
133 throw (::com::sun::star::uno::RuntimeException
) SAL_OVERRIDE
;
135 virtual ~SwXHeadFootText();
137 SwXHeadFootText(SwFrameFormat
& rHeadFootFormat
, const bool bIsHeader
);
141 static ::com::sun::star::uno::Reference
< ::com::sun::star::text::XText
>
142 CreateXHeadFootText(SwFrameFormat
& rHeadFootFormat
, const bool bIsHeader
);
143 static bool IsXHeadFootText(SwClient
*const pClient
);
146 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface(
147 const ::com::sun::star::uno::Type
& rType
)
148 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
149 virtual void SAL_CALL
acquire() throw() SAL_OVERRIDE
{ OWeakObject::acquire(); }
150 virtual void SAL_CALL
release() throw() SAL_OVERRIDE
{ OWeakObject::release(); }
153 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
>
155 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
156 virtual ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
157 getImplementationId()
158 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
161 virtual OUString SAL_CALL
getImplementationName()
162 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
163 virtual sal_Bool SAL_CALL
supportsService(
164 const OUString
& rServiceName
)
165 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
166 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
167 getSupportedServiceNames()
168 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
171 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType()
172 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
173 virtual sal_Bool SAL_CALL
hasElements()
174 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
176 // XEnumerationAccess
177 virtual ::com::sun::star::uno::Reference
<
178 ::com::sun::star::container::XEnumeration
> SAL_CALL
180 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
183 virtual ::com::sun::star::uno::Reference
<
184 ::com::sun::star::text::XTextCursor
> SAL_CALL
186 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
187 virtual ::com::sun::star::uno::Reference
<
188 ::com::sun::star::text::XTextCursor
> SAL_CALL
189 createTextCursorByRange(
190 const ::com::sun::star::uno::Reference
<
191 ::com::sun::star::text::XTextRange
> & xTextPosition
)
192 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
196 #endif // INCLUDED_SW_INC_UNOTEXTBODYHF_HXX
198 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */