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/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>
28
30
31#include <unobaseclass.hxx>
32
33class SwDoc;
34class SwFormatRefMark;
35
36typedef ::cppu::WeakImplHelper
37< css::lang::XUnoTunnel
38, css::lang::XServiceInfo
39, css::beans::XPropertySet
40, css::container::XNamed
41, css::text::XTextContent
43
46{
47
48private:
49
50 class Impl;
52
53 virtual ~SwXReferenceMark() override;
54
55 SwXReferenceMark(SwDoc *const pDoc, SwFormatRefMark *const pMark);
56
57public:
58
60 CreateXReferenceMark(SwDoc & rDoc, SwFormatRefMark * pMarkFormat);
61
62 static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
63
64 // XUnoTunnel
65 virtual sal_Int64 SAL_CALL getSomething(
66 const css::uno::Sequence< sal_Int8 >& rIdentifier) override;
67
68 // XServiceInfo
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;
74
75 // XComponent
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;
81
82 // XPropertySet
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;
102
103 // XNamed
104 virtual OUString SAL_CALL getName() override;
105 virtual void SAL_CALL setName(const OUString& rName) override;
106
107 // XTextContent
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;
111
112};
113
114#endif // INCLUDED_SW_SOURCE_CORE_INC_UNOREFMARK_HXX
115
116/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Definition: doc.hxx:194
virtual OUString SAL_CALL getName() override
Definition: unorefmk.cxx:372
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override
Definition: unorefmk.cxx:292
virtual ~SwXReferenceMark() override
Definition: unorefmk.cxx:121
virtual void SAL_CALL setName(const OUString &rName) override
Definition: unorefmk.cxx:383
virtual void SAL_CALL setPropertyValue(const OUString &rPropertyName, const css::uno::Any &rValue) override
Definition: unorefmk.cxx:441
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unorefmk.cxx:172
virtual void SAL_CALL dispose() override
Definition: unorefmk.cxx:324
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:466
::sw::UnoImplPtr< Impl > m_pImpl
Definition: unorefmark.hxx:50
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
Definition: unorefmk.cxx:364
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unorefmk.cxx:431
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:480
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
Definition: unorefmk.cxx:356
virtual void SAL_CALL attach(const css::uno::Reference< css::text::XTextRange > &xTextRange) override
Definition: unorefmk.cxx:265
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId()
Definition: unorefmk.cxx:148
virtual void SAL_CALL addPropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unorefmk.cxx:459
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
Definition: unorefmk.cxx:166
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
Definition: unorefmk.cxx:448
virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &rIdentifier) override
Definition: unorefmk.cxx:155
virtual OUString SAL_CALL getImplementationName() override
Definition: unorefmk.cxx:160
virtual void SAL_CALL addVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
Definition: unorefmk.cxx:473
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::XUnoTunnel, css::lang::XServiceInfo, css::beans::XPropertySet, css::container::XNamed, css::text::XTextContent > SwXReferenceMark_Base
Definition: unorefmark.hxx:34