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_UNOREFMARK_HXX
21 #define INCLUDED_SW_SOURCE_CORE_INC_UNOREFMARK_HXX
23 #include <com/sun/star/lang/XUnoTunnel.hpp>
24 #include <com/sun/star/lang/XServiceInfo.hpp>
25 #include <com/sun/star/beans/XPropertySet.hpp>
26 #include <com/sun/star/container/XNamed.hpp>
27 #include <com/sun/star/text/XTextContent.hpp>
29 #include <cppuhelper/implbase.hxx>
31 #include <unobaseclass.hxx>
34 class SwFormatRefMark
;
36 typedef ::cppu::WeakImplHelper
37 < css::lang::XUnoTunnel
38 , css::lang::XServiceInfo
39 , css::beans::XPropertySet
40 , css::container::XNamed
41 , css::text::XTextContent
42 > SwXReferenceMark_Base
;
44 class SwXReferenceMark
45 : public SwXReferenceMark_Base
51 ::sw::UnoImplPtr
<Impl
> m_pImpl
;
53 virtual ~SwXReferenceMark() override
;
55 SwXReferenceMark(SwDoc
*const pDoc
, SwFormatRefMark
*const pMark
);
59 static css::uno::Reference
<css::text::XTextContent
>
60 CreateXReferenceMark(SwDoc
& rDoc
, SwFormatRefMark
* pMarkFormat
);
62 static const css::uno::Sequence
< sal_Int8
>& getUnoTunnelId();
65 virtual sal_Int64 SAL_CALL
getSomething(
66 const css::uno::Sequence
< sal_Int8
>& rIdentifier
) override
;
69 virtual OUString SAL_CALL
getImplementationName() override
;
70 virtual sal_Bool SAL_CALL
supportsService(
71 const OUString
& rServiceName
) override
;
72 virtual css::uno::Sequence
< OUString
> SAL_CALL
73 getSupportedServiceNames() override
;
76 virtual void SAL_CALL
dispose() override
;
77 virtual void SAL_CALL
addEventListener(
78 const css::uno::Reference
< css::lang::XEventListener
> & xListener
) override
;
79 virtual void SAL_CALL
removeEventListener(
80 const css::uno::Reference
< css::lang::XEventListener
> & xListener
) override
;
83 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
84 getPropertySetInfo() override
;
85 virtual void SAL_CALL
setPropertyValue(
86 const OUString
& rPropertyName
,
87 const css::uno::Any
& rValue
) override
;
88 virtual css::uno::Any SAL_CALL
getPropertyValue(
89 const OUString
& rPropertyName
) override
;
90 virtual void SAL_CALL
addPropertyChangeListener(
91 const OUString
& rPropertyName
,
92 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
) override
;
93 virtual void SAL_CALL
removePropertyChangeListener(
94 const OUString
& rPropertyName
,
95 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
) override
;
96 virtual void SAL_CALL
addVetoableChangeListener(
97 const OUString
& rPropertyName
,
98 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& xListener
) override
;
99 virtual void SAL_CALL
removeVetoableChangeListener(
100 const OUString
& rPropertyName
,
101 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& xListener
) override
;
104 virtual OUString SAL_CALL
getName() override
;
105 virtual void SAL_CALL
setName(const OUString
& rName
) override
;
108 virtual void SAL_CALL
attach(
109 const css::uno::Reference
< css::text::XTextRange
> & xTextRange
) override
;
110 virtual css::uno::Reference
< css::text::XTextRange
> SAL_CALL
getAnchor() override
;
114 #endif // INCLUDED_SW_SOURCE_CORE_INC_UNOREFMARK_HXX
116 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */