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 
29 #include <cppuhelper/implbase.hxx>
30 
31 #include <unobaseclass.hxx>
32 
33 class SwDoc;
35 
36 typedef ::cppu::WeakImplHelper
37 < css::lang::XUnoTunnel
38 , css::lang::XServiceInfo
39 , css::beans::XPropertySet
40 , css::container::XNamed
41 , css::text::XTextContent
43 
45  : public SwXReferenceMark_Base
46 {
47 
48 private:
49 
50  class Impl;
52 
53  virtual ~SwXReferenceMark() override;
54 
55  SwXReferenceMark(SwDoc *const pDoc, SwFormatRefMark *const pMark);
56 
57 public:
58 
59  static css::uno::Reference<css::text::XTextContent>
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: */
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
Definition: unorefmk.cxx:366
virtual void SAL_CALL addPropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unorefmk.cxx:467
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override
Definition: unorefmk.cxx:304
Definition: doc.hxx:185
virtual void SAL_CALL removePropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unorefmk.cxx:474
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unorefmk.cxx:182
SwXReferenceMark(SwDoc *const pDoc, SwFormatRefMark *const pMark)
Definition: unorefmk.cxx:120
virtual void SAL_CALL addVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
Definition: unorefmk.cxx:481
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unorefmk.cxx:439
virtual OUString SAL_CALL getImplementationName() override
Definition: unorefmk.cxx:170
virtual ~SwXReferenceMark() override
Definition: unorefmk.cxx:126
std::unique_ptr< T, UnoImplPtrDeleter< T > > UnoImplPtr
Smart pointer class ensuring that the pointed object is deleted with a locked SolarMutex.
virtual void SAL_CALL dispose() override
Definition: unorefmk.cxx:334
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
Definition: unorefmk.cxx:176
virtual void SAL_CALL setName(const OUString &rName) override
Definition: unorefmk.cxx:391
virtual void SAL_CALL removeVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
Definition: unorefmk.cxx:488
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
Definition: unorefmk.cxx:373
virtual void SAL_CALL attach(const css::uno::Reference< css::text::XTextRange > &xTextRange) override
Definition: unorefmk.cxx:271
::cppu::WeakImplHelper< css::lang::XUnoTunnel, css::lang::XServiceInfo, css::beans::XPropertySet, css::container::XNamed, css::text::XTextContent > SwXReferenceMark_Base
Definition: unorefmark.hxx:34
unsigned char sal_Bool
static css::uno::Reference< css::text::XTextContent > CreateXReferenceMark(SwDoc &rDoc, SwFormatRefMark *pMarkFormat)
Definition: unorefmk.cxx:131
virtual OUString SAL_CALL getName() override
Definition: unorefmk.cxx:380
virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &rIdentifier) override
Definition: unorefmk.cxx:165
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
Definition: unorefmk.cxx:456
virtual void SAL_CALL setPropertyValue(const OUString &rPropertyName, const css::uno::Any &rValue) override
Definition: unorefmk.cxx:449
::sw::UnoImplPtr< Impl > m_pImpl
Definition: unorefmark.hxx:50
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId()
Definition: unorefmk.cxx:159