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 .
22 #include <com/sun/star/lang/XServiceInfo.hpp>
23 #include <com/sun/star/beans/XPropertySet.hpp>
24 #include <com/sun/star/container/XNamed.hpp>
25 #include <com/sun/star/text/XTextContent.hpp>
27 #include <cppuhelper/implbase.hxx>
29 #include <unobaseclass.hxx>
32 class SwFormatRefMark
;
34 typedef ::cppu::WeakImplHelper
35 < css::lang::XServiceInfo
36 , css::beans::XPropertySet
37 , css::container::XNamed
38 , css::text::XTextContent
39 > SwXReferenceMark_Base
;
41 class SwXReferenceMark final
42 : public SwXReferenceMark_Base
48 ::sw::UnoImplPtr
<Impl
> m_pImpl
;
50 virtual ~SwXReferenceMark() override
;
52 SwXReferenceMark(SwDoc
*const pDoc
, SwFormatRefMark
*const pMark
);
56 static rtl::Reference
<SwXReferenceMark
>
57 CreateXReferenceMark(SwDoc
& rDoc
, SwFormatRefMark
* pMarkFormat
);
60 virtual OUString SAL_CALL
getImplementationName() override
;
61 virtual sal_Bool SAL_CALL
supportsService(
62 const OUString
& rServiceName
) override
;
63 virtual css::uno::Sequence
< OUString
> SAL_CALL
64 getSupportedServiceNames() override
;
67 virtual void SAL_CALL
dispose() override
;
68 virtual void SAL_CALL
addEventListener(
69 const css::uno::Reference
< css::lang::XEventListener
> & xListener
) override
;
70 virtual void SAL_CALL
removeEventListener(
71 const css::uno::Reference
< css::lang::XEventListener
> & xListener
) override
;
74 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
75 getPropertySetInfo() override
;
76 virtual void SAL_CALL
setPropertyValue(
77 const OUString
& rPropertyName
,
78 const css::uno::Any
& rValue
) override
;
79 virtual css::uno::Any SAL_CALL
getPropertyValue(
80 const OUString
& rPropertyName
) override
;
81 virtual void SAL_CALL
addPropertyChangeListener(
82 const OUString
& rPropertyName
,
83 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
) override
;
84 virtual void SAL_CALL
removePropertyChangeListener(
85 const OUString
& rPropertyName
,
86 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
) override
;
87 virtual void SAL_CALL
addVetoableChangeListener(
88 const OUString
& rPropertyName
,
89 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& xListener
) override
;
90 virtual void SAL_CALL
removeVetoableChangeListener(
91 const OUString
& rPropertyName
,
92 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& xListener
) override
;
95 virtual OUString SAL_CALL
getName() override
;
96 virtual void SAL_CALL
setName(const OUString
& rName
) override
;
99 virtual void SAL_CALL
attach(
100 const css::uno::Reference
< css::text::XTextRange
> & xTextRange
) override
;
101 virtual css::uno::Reference
< css::text::XTextRange
> SAL_CALL
getAnchor() override
;
103 void OnFormatRefMarkDeleted();
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */