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
27
28#include "unotext.hxx"
29
30class SwDoc;
31class SwFrameFormat;
32class SwXTextCursor;
34
35typedef ::cppu::WeakImplHelper
36< css::lang::XServiceInfo
37, css::container::XEnumerationAccess
39
40class SwXBodyText final
41 : public SwXBodyText_Base
42 , public SwXText
43{
44
45 virtual ~SwXBodyText() override;
46
47public:
48
49 SwXBodyText(SwDoc *const pDoc);
50
51 rtl::Reference<SwXTextCursor> CreateTextCursor(const bool bIgnoreTables = false);
52
53 // XInterface
54 virtual css::uno::Any SAL_CALL queryInterface(
55 const css::uno::Type& rType) override;
56 virtual void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); }
57 virtual void SAL_CALL release() noexcept override { OWeakObject::release(); }
58
59 // XTypeProvider
60 virtual css::uno::Sequence< css::uno::Type >
61 SAL_CALL getTypes() override;
62 virtual css::uno::Sequence< sal_Int8 > SAL_CALL
63 getImplementationId() override;
64
65 // XServiceInfo
66 virtual OUString SAL_CALL getImplementationName() override;
67 virtual sal_Bool SAL_CALL supportsService(
68 const OUString& rServiceName) override;
69 virtual css::uno::Sequence< OUString > SAL_CALL
70 getSupportedServiceNames() override;
71
72 // XElementAccess
73 virtual css::uno::Type SAL_CALL getElementType() override;
74 virtual sal_Bool SAL_CALL hasElements() override;
75
76 // XEnumerationAccess
77 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL
78 createEnumeration() override;
80
81 // XSimpleText
84 const ::css::uno::Reference< ::css::text::XTextRange >& aTextPosition ) override;
85
86};
87
88typedef ::cppu::WeakImplHelper
89< css::lang::XServiceInfo
90, css::container::XEnumerationAccess
92
93class SwXHeadFootText final
95 , public SwXText
96{
97 class Impl;
99
100 virtual const SwStartNode *GetStartNode() const override;
101
102 virtual ~SwXHeadFootText() override;
103
104 SwXHeadFootText(SwFrameFormat & rHeadFootFormat, const bool bIsHeader);
105
106public:
107
108 static css::uno::Reference< css::text::XText >
109 CreateXHeadFootText(SwFrameFormat & rHeadFootFormat, const bool bIsHeader);
110
111 rtl::Reference< SwXTextCursor > CreateTextCursor(const bool bIgnoreTables = false);
112
113 // XInterface
114 virtual css::uno::Any SAL_CALL queryInterface(
115 const css::uno::Type& rType) override;
116 virtual void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); }
117 virtual void SAL_CALL release() noexcept override { OWeakObject::release(); }
118
119 // XTypeProvider
120 virtual css::uno::Sequence< css::uno::Type >
121 SAL_CALL getTypes() override;
122 virtual css::uno::Sequence< sal_Int8 > SAL_CALL
123 getImplementationId() override;
124
125 // XServiceInfo
126 virtual OUString SAL_CALL getImplementationName() override;
127 virtual sal_Bool SAL_CALL supportsService(
128 const OUString& rServiceName) override;
129 virtual css::uno::Sequence< OUString > SAL_CALL
130 getSupportedServiceNames() override;
131
132 // XElementAccess
133 virtual css::uno::Type SAL_CALL getElementType() override;
134 virtual sal_Bool SAL_CALL hasElements() override;
135
136 // XEnumerationAccess
137 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL
138 createEnumeration() override;
139
140 // XSimpleText
143 const ::css::uno::Reference< ::css::text::XTextRange >& aTextPosition ) override;
144
145};
146
147#endif // INCLUDED_SW_INC_UNOTEXTBODYHF_HXX
148
149/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Definition: doc.hxx:197
Style of a layout element.
Definition: frmfmt.hxx:72
Starts a section of nodes in the document model.
Definition: node.hxx:348
SwXBodyText(SwDoc *const pDoc)
Definition: unotext.cxx:2429
virtual rtl::Reference< SwXTextCursor > createXTextCursor() override
Definition: unotext.cxx:2502
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
Definition: unotext.cxx:2444
virtual sal_Bool SAL_CALL hasElements() override
Definition: unotext.cxx:2581
virtual void SAL_CALL acquire() noexcept override
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
Definition: unotext.cxx:2550
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unotext.cxx:2575
virtual rtl::Reference< SwXTextCursor > createXTextCursorByRange(const ::css::uno::Reference< ::css::text::XTextRange > &aTextPosition) override
Definition: unotext.cxx:2508
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unotext.cxx:2450
virtual OUString SAL_CALL getImplementationName() override
Definition: unotext.cxx:2439
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: unotext.cxx:2470
virtual void SAL_CALL release() noexcept override
rtl::Reference< SwXTextCursor > CreateTextCursor(const bool bIgnoreTables=false)
Definition: unotext.cxx:2478
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unotext.cxx:2456
rtl::Reference< SwXParagraphEnumeration > createParagraphEnumeration()
Definition: unotext.cxx:2556
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: unotext.cxx:2464
virtual ~SwXBodyText() override
Definition: unotext.cxx:2434
virtual sal_Bool SAL_CALL hasElements() override
Definition: unotext.cxx:2803
virtual const SwStartNode * GetStartNode() const override
Definition: unotext.cxx:2670
virtual void SAL_CALL acquire() noexcept override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unotext.cxx:2665
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
Definition: unotext.cxx:2782
::sw::UnoImplPtr< Impl > m_pImpl
virtual ~SwXHeadFootText() override
Definition: unotext.cxx:2650
virtual rtl::Reference< SwXTextCursor > createXTextCursorByRange(const ::css::uno::Reference< ::css::text::XTextRange > &aTextPosition) override
Definition: unotext.cxx:2750
SwXHeadFootText(SwFrameFormat &rHeadFootFormat, const bool bIsHeader)
Definition: unotext.cxx:2642
virtual void SAL_CALL release() noexcept override
static css::uno::Reference< css::text::XText > CreateXHeadFootText(SwFrameFormat &rHeadFootFormat, const bool bIsHeader)
Definition: unotext.cxx:2627
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
Definition: unotext.cxx:2659
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unotext.cxx:2685
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unotext.cxx:2800
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: unotext.cxx:2697
virtual rtl::Reference< SwXTextCursor > createXTextCursor() override
Definition: unotext.cxx:2745
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: unotext.cxx:2692
virtual OUString SAL_CALL getImplementationName() override
Definition: unotext.cxx:2654
rtl::Reference< SwXTextCursor > CreateTextCursor(const bool bIgnoreTables=false)
Definition: unotext.cxx:2705
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::WeakImplHelper< css::lang::XServiceInfo, css::container::XEnumerationAccess > SwXBodyText_Base
::cppu::WeakImplHelper< css::lang::XServiceInfo, css::container::XEnumerationAccess > SwXHeadFootText_Base