LibreOffice Module sw (master) 1
unorefmark.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_UNOREFMARK_HXX
21#define INCLUDED_SW_SOURCE_CORE_INC_UNOREFMARK_HXX
22
23#include <com/sun/star/lang/XServiceInfo.hpp>
24#include <com/sun/star/beans/XPropertySet.hpp>
25#include <com/sun/star/container/XNamed.hpp>
26#include <com/sun/star/text/XTextContent.hpp>
27
29
30#include <unobaseclass.hxx>
31
32class SwDoc;
33class SwFormatRefMark;
34
35typedef ::cppu::WeakImplHelper
36< css::lang::XServiceInfo
37, css::beans::XPropertySet
38, css::container::XNamed
39, css::text::XTextContent
41
44{
45
46private:
47
48 class Impl;
50
51 virtual ~SwXReferenceMark() override;
52
53 SwXReferenceMark(SwDoc *const pDoc, SwFormatRefMark *const pMark);
54
55public:
56
58 CreateXReferenceMark(SwDoc & rDoc, SwFormatRefMark * pMarkFormat);
59
60 // XServiceInfo
61 virtual OUString SAL_CALL getImplementationName() override;
62 virtual sal_Bool SAL_CALL supportsService(
63 const OUString& rServiceName) override;
64 virtual css::uno::Sequence< OUString > SAL_CALL
65 getSupportedServiceNames() override;
66
67 // XComponent
68 virtual void SAL_CALL dispose() override;
69 virtual void SAL_CALL addEventListener(
70 const css::uno::Reference< css::lang::XEventListener > & xListener) override;
71 virtual void SAL_CALL removeEventListener(
72 const css::uno::Reference< css::lang::XEventListener > & xListener) override;
73
74 // XPropertySet
75 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
76 getPropertySetInfo() override;
77 virtual void SAL_CALL setPropertyValue(
78 const OUString& rPropertyName,
79 const css::uno::Any& rValue) override;
80 virtual css::uno::Any SAL_CALL getPropertyValue(
81 const OUString& rPropertyName) override;
82 virtual void SAL_CALL addPropertyChangeListener(
83 const OUString& rPropertyName,
84 const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener) override;
85 virtual void SAL_CALL removePropertyChangeListener(
86 const OUString& rPropertyName,
87 const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener) override;
88 virtual void SAL_CALL addVetoableChangeListener(
89 const OUString& rPropertyName,
90 const css::uno::Reference< css::beans::XVetoableChangeListener >& xListener) override;
91 virtual void SAL_CALL removeVetoableChangeListener(
92 const OUString& rPropertyName,
93 const css::uno::Reference< css::beans::XVetoableChangeListener >& xListener) override;
94
95 // XNamed
96 virtual OUString SAL_CALL getName() override;
97 virtual void SAL_CALL setName(const OUString& rName) override;
98
99 // XTextContent
100 virtual void SAL_CALL attach(
101 const css::uno::Reference< css::text::XTextRange > & xTextRange) override;
102 virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override;
103
104};
105
106#endif // INCLUDED_SW_SOURCE_CORE_INC_UNOREFMARK_HXX
107
108/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Definition: doc.hxx:197
virtual OUString SAL_CALL getName() override
Definition: unorefmk.cxx:359
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override
Definition: unorefmk.cxx:279
virtual ~SwXReferenceMark() override
Definition: unorefmk.cxx:121
virtual void SAL_CALL setName(const OUString &rName) override
Definition: unorefmk.cxx:370
virtual void SAL_CALL setPropertyValue(const OUString &rPropertyName, const css::uno::Any &rValue) override
Definition: unorefmk.cxx:428
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unorefmk.cxx:160
virtual void SAL_CALL dispose() override
Definition: unorefmk.cxx:311
static rtl::Reference< SwXReferenceMark > CreateXReferenceMark(SwDoc &rDoc, SwFormatRefMark *pMarkFormat)
Definition: unorefmk.cxx:126
virtual void SAL_CALL removePropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unorefmk.cxx:453
::sw::UnoImplPtr< Impl > m_pImpl
Definition: unorefmark.hxx:48
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
Definition: unorefmk.cxx:351
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unorefmk.cxx:418
SwXReferenceMark(SwDoc *const pDoc, SwFormatRefMark *const pMark)
Definition: unorefmk.cxx:115
virtual void SAL_CALL removeVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
Definition: unorefmk.cxx:467
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
Definition: unorefmk.cxx:343
virtual void SAL_CALL attach(const css::uno::Reference< css::text::XTextRange > &xTextRange) override
Definition: unorefmk.cxx:253
virtual void SAL_CALL addPropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unorefmk.cxx:446
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
Definition: unorefmk.cxx:154
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
Definition: unorefmk.cxx:435
virtual OUString SAL_CALL getImplementationName() override
Definition: unorefmk.cxx:148
virtual void SAL_CALL addVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
Definition: unorefmk.cxx:460
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::XNamed, css::text::XTextContent > SwXReferenceMark_Base
Definition: unorefmark.hxx:33