Add a comment to clarify what kind of inputs the class handles
[LibreOffice.git] / sw / source / core / inc / unorefmark.hxx
blob735350bb5c2022478218f4f109c33cf2f04a789f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 #pragma once
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>
31 class SwDoc;
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
45 private:
47 class Impl;
48 ::sw::UnoImplPtr<Impl> m_pImpl;
50 virtual ~SwXReferenceMark() override;
52 SwXReferenceMark(SwDoc *const pDoc, SwFormatRefMark *const pMark);
54 public:
56 static rtl::Reference<SwXReferenceMark>
57 CreateXReferenceMark(SwDoc & rDoc, SwFormatRefMark * pMarkFormat);
59 // XServiceInfo
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;
66 // XComponent
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;
73 // XPropertySet
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;
94 // XNamed
95 virtual OUString SAL_CALL getName() override;
96 virtual void SAL_CALL setName(const OUString& rName) override;
98 // XTextContent
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: */