LibreOffice Module sw (master) 1
unofootnote.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_SOURCE_CORE_INC_UNOFOOTNOTE_HXX
21#define INCLUDED_SW_SOURCE_CORE_INC_UNOFOOTNOTE_HXX
22
23#include <com/sun/star/lang/XServiceInfo.hpp>
24#include <com/sun/star/beans/XPropertySet.hpp>
25#include <com/sun/star/container/XEnumerationAccess.hpp>
26#include <com/sun/star/text/XFootnote.hpp>
27
29
30#include <unotext.hxx>
31
32class SwDoc;
34
35typedef ::cppu::WeakImplHelper
36< css::lang::XServiceInfo
37, css::beans::XPropertySet
38, css::container::XEnumerationAccess
39, css::text::XFootnote
41
42class SwXFootnote final
43 : public SwXFootnote_Base
44 , public SwXText
45{
46 friend class SwXFootnotes;
47
48 class Impl;
50
51 virtual const SwStartNode *GetStartNode() const override;
52
53 virtual css::uno::Reference< css::text::XTextCursor > CreateCursor() override;
54
55 virtual ~SwXFootnote() override;
56
57 SwXFootnote(SwDoc & rDoc, SwFormatFootnote & rFormat);
58 SwXFootnote(const bool bEndnote);
59
60public:
61
63 CreateXFootnote(SwDoc & rDoc, SwFormatFootnote * pFootnoteFormat,
64 bool isEndnote = false);
65
66 // XInterface
67 virtual css::uno::Any SAL_CALL queryInterface(
68 const css::uno::Type& rType) override;
69 virtual void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); }
70 virtual void SAL_CALL release() noexcept override { OWeakObject::release(); }
71
72 // XTypeProvider
73 virtual css::uno::Sequence< css::uno::Type >
74 SAL_CALL getTypes() override;
75 virtual css::uno::Sequence< sal_Int8 > SAL_CALL
76 getImplementationId() override;
77
78 // XServiceInfo
79 virtual OUString SAL_CALL getImplementationName() override;
80 virtual sal_Bool SAL_CALL supportsService(
81 const OUString& rServiceName) override;
82 virtual css::uno::Sequence< OUString > SAL_CALL
83 getSupportedServiceNames() override;
84
85 // XComponent
86 virtual void SAL_CALL dispose() override;
87 virtual void SAL_CALL addEventListener(
88 const css::uno::Reference< css::lang::XEventListener > & xListener) override;
89 virtual void SAL_CALL removeEventListener(
90 const css::uno::Reference< css::lang::XEventListener > & xListener) override;
91
92 // XPropertySet
93 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
94 getPropertySetInfo() override;
95 virtual void SAL_CALL setPropertyValue(
96 const OUString& rPropertyName,
97 const css::uno::Any& rValue) override;
98 virtual css::uno::Any SAL_CALL getPropertyValue(
99 const OUString& rPropertyName) override;
100 virtual void SAL_CALL addPropertyChangeListener(
101 const OUString& rPropertyName,
102 const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener) override;
103 virtual void SAL_CALL removePropertyChangeListener(
104 const OUString& rPropertyName,
105 const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener) override;
106 virtual void SAL_CALL addVetoableChangeListener(
107 const OUString& rPropertyName,
108 const css::uno::Reference< css::beans::XVetoableChangeListener >& xListener) override;
109 virtual void SAL_CALL removeVetoableChangeListener(
110 const OUString& rPropertyName,
111 const css::uno::Reference< css::beans::XVetoableChangeListener >& xListener) override;
112
113 // XElementAccess
114 virtual css::uno::Type SAL_CALL getElementType() override;
115 virtual sal_Bool SAL_CALL hasElements() override;
116
117 // XEnumerationAccess
118 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL
119 createEnumeration() override;
120
121 // XTextContent
122 virtual void SAL_CALL attach(
123 const css::uno::Reference< css::text::XTextRange > & xTextRange) override;
124 virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override;
125
126 // XFootnote
127 virtual OUString SAL_CALL getLabel() override;
128 virtual void SAL_CALL setLabel(const OUString& rLabel) override;
129
130 // XSimpleText
131 virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL
132 createTextCursor() override;
133 virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL
135 const css::uno::Reference< css::text::XTextRange > & xTextPosition) override;
136
137};
138
139#endif // INCLUDED_SW_SOURCE_CORE_INC_UNOFOOTNOTE_HXX
140
141/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Definition: doc.hxx:195
Starts a section of nodes in the document model.
Definition: node.hxx:348
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override
Definition: unoftn.cxx:337
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
Definition: unoftn.cxx:184
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unoftn.cxx:199
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
Definition: unoftn.cxx:483
virtual void SAL_CALL removeVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
Definition: unoftn.cxx:544
::sw::UnoImplPtr< Impl > m_pImpl
Definition: unofootnote.hxx:48
virtual ~SwXFootnote() override
Definition: unoftn.cxx:137
virtual void SAL_CALL setLabel(const OUString &rLabel) override
Definition: unoftn.cxx:243
virtual void SAL_CALL release() noexcept override
Definition: unofootnote.hxx:70
SwXFootnote(SwDoc &rDoc, SwFormatFootnote &rFormat)
Definition: unoftn.cxx:131
virtual void SAL_CALL addPropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unoftn.cxx:520
virtual OUString SAL_CALL getImplementationName() override
Definition: unoftn.cxx:167
virtual void SAL_CALL addVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
Definition: unoftn.cxx:536
virtual void SAL_CALL setPropertyValue(const OUString &rPropertyName, const css::uno::Any &rValue) override
Definition: unoftn.cxx:476
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: unoftn.cxx:207
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
Definition: unoftn.cxx:358
virtual void SAL_CALL removePropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unoftn.cxx:528
virtual sal_Bool SAL_CALL hasElements() override
Definition: unoftn.cxx:460
virtual void SAL_CALL acquire() noexcept override
Definition: unofootnote.hxx:69
virtual OUString SAL_CALL getLabel() override
Definition: unoftn.cxx:221
virtual void SAL_CALL dispose() override
Definition: unoftn.cxx:343
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unoftn.cxx:455
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursorByRange(const css::uno::Reference< css::text::XTextRange > &xTextPosition) override
Definition: unoftn.cxx:412
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unoftn.cxx:466
static rtl::Reference< SwXFootnote > CreateXFootnote(SwDoc &rDoc, SwFormatFootnote *pFootnoteFormat, bool isEndnote=false)
Definition: unoftn.cxx:142
virtual css::uno::Reference< css::text::XTextCursor > CreateCursor() override
Definition: unoftn.cxx:390
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unoftn.cxx:190
virtual const SwStartNode * GetStartNode() const override
Definition: unoftn.cxx:375
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
Definition: unoftn.cxx:367
virtual void SAL_CALL attach(const css::uno::Reference< css::text::XTextRange > &xTextRange) override
Definition: unoftn.cxx:273
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursor() override
Definition: unoftn.cxx:396
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: unoftn.cxx:213
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
Definition: unoftn.cxx:442
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::beans::XPropertySet, css::container::XEnumerationAccess, css::text::XFootnote > SwXFootnote_Base
Definition: unofootnote.hxx:33