LibreOffice Module sw (master) 1
unotextbodyhf.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef INCLUDED_SW_INC_UNOTEXTBODYHF_HXX
21#define INCLUDED_SW_INC_UNOTEXTBODYHF_HXX
22
23#include <com/sun/star/lang/XServiceInfo.hpp>
24#include <com/sun/star/container/XEnumerationAccess.hpp>
25
28
29#include "unotext.hxx"
30
31class SwDoc;
32class SwFrameFormat;
33class SwXTextCursor;
35
37< css::lang::XServiceInfo
38, css::container::XEnumerationAccess
40
41class SwXBodyText final
42 : public SwXBodyText_Base
43 , public SwXText
44{
45
46 virtual ~SwXBodyText() override;
47
48public:
49
50 SwXBodyText(SwDoc *const pDoc);
51
52 rtl::Reference<SwXTextCursor> CreateTextCursor(const bool bIgnoreTables = false);
53
54 // XInterface
55 virtual css::uno::Any SAL_CALL queryInterface(
56 const css::uno::Type& rType) override;
57 virtual void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); }
58 virtual void SAL_CALL release() noexcept override { OWeakObject::release(); }
59
60 // XAggregation
61 virtual css::uno::Any SAL_CALL queryAggregation(
62 const css::uno::Type& rType) override;
63
64 // XTypeProvider
65 virtual css::uno::Sequence< css::uno::Type >
66 SAL_CALL getTypes() override;
67 virtual css::uno::Sequence< sal_Int8 > SAL_CALL
68 getImplementationId() override;
69
70 // XServiceInfo
71 virtual OUString SAL_CALL getImplementationName() override;
72 virtual sal_Bool SAL_CALL supportsService(
73 const OUString& rServiceName) override;
74 virtual css::uno::Sequence< OUString > SAL_CALL
75 getSupportedServiceNames() override;
76
77 // XElementAccess
78 virtual css::uno::Type SAL_CALL getElementType() override;
79 virtual sal_Bool SAL_CALL hasElements() override;
80
81 // XEnumerationAccess
82 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL
83 createEnumeration() override;
85
86 // XSimpleText
87 virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL
88 createTextCursor() override;
89 virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL
91 const css::uno::Reference< css::text::XTextRange > & xTextPosition) override;
92
93};
94
95typedef ::cppu::WeakImplHelper
96< css::lang::XServiceInfo
97, css::container::XEnumerationAccess
99
101 : public SwXHeadFootText_Base
102 , public SwXText
103{
104 class Impl;
106
107 virtual const SwStartNode *GetStartNode() const override;
108 virtual css::uno::Reference< css::text::XTextCursor >
109 CreateCursor() override;
110
111 virtual ~SwXHeadFootText() override;
112
113 SwXHeadFootText(SwFrameFormat & rHeadFootFormat, const bool bIsHeader);
114
115public:
116
117 static css::uno::Reference< css::text::XText >
118 CreateXHeadFootText(SwFrameFormat & rHeadFootFormat, const bool bIsHeader);
119
120 css::uno::Reference<css::text::XTextCursor> CreateTextCursor(const bool bIgnoreTables = false);
121
122 // XInterface
123 virtual css::uno::Any SAL_CALL queryInterface(
124 const css::uno::Type& rType) override;
125 virtual void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); }
126 virtual void SAL_CALL release() noexcept override { OWeakObject::release(); }
127
128 // XTypeProvider
129 virtual css::uno::Sequence< css::uno::Type >
130 SAL_CALL getTypes() override;
131 virtual css::uno::Sequence< sal_Int8 > SAL_CALL
132 getImplementationId() override;
133
134 // XServiceInfo
135 virtual OUString SAL_CALL getImplementationName() override;
136 virtual sal_Bool SAL_CALL supportsService(
137 const OUString& rServiceName) override;
138 virtual css::uno::Sequence< OUString > SAL_CALL
139 getSupportedServiceNames() override;
140
141 // XElementAccess
142 virtual css::uno::Type SAL_CALL getElementType() override;
143 virtual sal_Bool SAL_CALL hasElements() override;
144
145 // XEnumerationAccess
146 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL
147 createEnumeration() override;
148
149 // XSimpleText
150 virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL
151 createTextCursor() override;
152 virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL
154 const css::uno::Reference< css::text::XTextRange > & xTextPosition) override;
155
156};
157
158#endif // INCLUDED_SW_INC_UNOTEXTBODYHF_HXX
159
160/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Definition: doc.hxx:194
Style of a layout element.
Definition: frmfmt.hxx:62
Starts a section of nodes in the document model.
Definition: node.hxx:348
SwXBodyText(SwDoc *const pDoc)
Definition: unotext.cxx:2421
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursorByRange(const css::uno::Reference< css::text::XTextRange > &xTextPosition) override
Definition: unotext.cxx:2537
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursor() override
Definition: unotext.cxx:2521
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
Definition: unotext.cxx:2436
virtual sal_Bool SAL_CALL hasElements() override
Definition: unotext.cxx:2613
virtual void SAL_CALL acquire() noexcept override
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
Definition: unotext.cxx:2582
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &rType) override
Definition: unotext.cxx:2448
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unotext.cxx:2607
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unotext.cxx:2442
virtual OUString SAL_CALL getImplementationName() override
Definition: unotext.cxx:2431
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: unotext.cxx:2489
virtual void SAL_CALL release() noexcept override
rtl::Reference< SwXTextCursor > CreateTextCursor(const bool bIgnoreTables=false)
Definition: unotext.cxx:2497
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unotext.cxx:2475
rtl::Reference< SwXParagraphEnumeration > createParagraphEnumeration()
Definition: unotext.cxx:2588
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: unotext.cxx:2483
virtual ~SwXBodyText() override
Definition: unotext.cxx:2426
virtual sal_Bool SAL_CALL hasElements() override
Definition: unotext.cxx:2844
virtual const SwStartNode * GetStartNode() const override
Definition: unotext.cxx:2702
virtual void SAL_CALL acquire() noexcept override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unotext.cxx:2697
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
Definition: unotext.cxx:2823
::sw::UnoImplPtr< Impl > m_pImpl
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursor() override
Definition: unotext.cxx:2784
virtual ~SwXHeadFootText() override
Definition: unotext.cxx:2682
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursorByRange(const css::uno::Reference< css::text::XTextRange > &xTextPosition) override
Definition: unotext.cxx:2789
virtual css::uno::Reference< css::text::XTextCursor > CreateCursor() override
Definition: unotext.cxx:2717
SwXHeadFootText(SwFrameFormat &rHeadFootFormat, const bool bIsHeader)
Definition: unotext.cxx:2674
virtual void SAL_CALL release() noexcept override
static css::uno::Reference< css::text::XText > CreateXHeadFootText(SwFrameFormat &rHeadFootFormat, const bool bIsHeader)
Definition: unotext.cxx:2659
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
Definition: unotext.cxx:2691
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unotext.cxx:2722
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unotext.cxx:2841
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: unotext.cxx:2734
css::uno::Reference< css::text::XTextCursor > CreateTextCursor(const bool bIgnoreTables=false)
Definition: unotext.cxx:2742
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: unotext.cxx:2729
virtual OUString SAL_CALL getImplementationName() override
Definition: unotext.cxx:2686
std::unique_ptr< T, UnoImplPtrDeleter< T > > UnoImplPtr
Smart pointer class ensuring that the pointed object is deleted with a locked SolarMutex.
unsigned char sal_Bool
::cppu::WeakAggImplHelper2< css::lang::XServiceInfo, css::container::XEnumerationAccess > SwXBodyText_Base
::cppu::WeakImplHelper< css::lang::XServiceInfo, css::container::XEnumerationAccess > SwXHeadFootText_Base