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_SOURCE_CORE_INC_UNOFOOTNOTE_HXX
21 #define INCLUDED_SW_SOURCE_CORE_INC_UNOFOOTNOTE_HXX
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>
28 #include <cppuhelper/implbase.hxx>
30 #include <unotext.hxx>
33 class SwFormatFootnote
;
35 typedef ::cppu::WeakImplHelper
36 < css::lang::XServiceInfo
37 , css::beans::XPropertySet
38 , css::container::XEnumerationAccess
39 , css::text::XFootnote
42 class SwXFootnote final
43 : public SwXFootnote_Base
46 friend class SwXFootnotes
;
49 ::sw::UnoImplPtr
<Impl
> m_pImpl
;
51 virtual const SwStartNode
*GetStartNode() const override
;
53 virtual ~SwXFootnote() override
;
55 SwXFootnote(SwDoc
& rDoc
, SwFormatFootnote
& rFormat
);
56 SwXFootnote(const bool bEndnote
);
60 static rtl::Reference
<SwXFootnote
>
61 CreateXFootnote(SwDoc
& rDoc
, SwFormatFootnote
* pFootnoteFormat
,
62 bool isEndnote
= false);
65 virtual css::uno::Any SAL_CALL
queryInterface(
66 const css::uno::Type
& rType
) override
;
67 virtual void SAL_CALL
acquire() noexcept override
{ OWeakObject::acquire(); }
68 virtual void SAL_CALL
release() noexcept override
{ OWeakObject::release(); }
71 virtual css::uno::Sequence
< css::uno::Type
>
72 SAL_CALL
getTypes() override
;
73 virtual css::uno::Sequence
< sal_Int8
> SAL_CALL
74 getImplementationId() override
;
77 virtual OUString SAL_CALL
getImplementationName() override
;
78 virtual sal_Bool SAL_CALL
supportsService(
79 const OUString
& rServiceName
) override
;
80 virtual css::uno::Sequence
< OUString
> SAL_CALL
81 getSupportedServiceNames() override
;
84 virtual void SAL_CALL
dispose() override
;
85 virtual void SAL_CALL
addEventListener(
86 const css::uno::Reference
< css::lang::XEventListener
> & xListener
) override
;
87 virtual void SAL_CALL
removeEventListener(
88 const css::uno::Reference
< css::lang::XEventListener
> & xListener
) override
;
91 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
92 getPropertySetInfo() override
;
93 virtual void SAL_CALL
setPropertyValue(
94 const OUString
& rPropertyName
,
95 const css::uno::Any
& rValue
) override
;
96 virtual css::uno::Any SAL_CALL
getPropertyValue(
97 const OUString
& rPropertyName
) override
;
98 virtual void SAL_CALL
addPropertyChangeListener(
99 const OUString
& rPropertyName
,
100 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
) override
;
101 virtual void SAL_CALL
removePropertyChangeListener(
102 const OUString
& rPropertyName
,
103 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
) override
;
104 virtual void SAL_CALL
addVetoableChangeListener(
105 const OUString
& rPropertyName
,
106 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& xListener
) override
;
107 virtual void SAL_CALL
removeVetoableChangeListener(
108 const OUString
& rPropertyName
,
109 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& xListener
) override
;
112 virtual css::uno::Type SAL_CALL
getElementType() override
;
113 virtual sal_Bool SAL_CALL
hasElements() override
;
115 // XEnumerationAccess
116 virtual css::uno::Reference
< css::container::XEnumeration
> SAL_CALL
117 createEnumeration() override
;
120 virtual void SAL_CALL
attach(
121 const css::uno::Reference
< css::text::XTextRange
> & xTextRange
) override
;
122 virtual css::uno::Reference
< css::text::XTextRange
> SAL_CALL
getAnchor() override
;
125 virtual OUString SAL_CALL
getLabel() override
;
126 virtual void SAL_CALL
setLabel(const OUString
& rLabel
) override
;
129 virtual rtl::Reference
< SwXTextCursor
> createXTextCursor() override
;
130 virtual rtl::Reference
< SwXTextCursor
> createXTextCursorByRange(
131 const ::css::uno::Reference
< ::css::text::XTextRange
>& aTextPosition
) override
;
134 #endif // INCLUDED_SW_SOURCE_CORE_INC_UNOFOOTNOTE_HXX
136 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */