Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / sw / source / core / inc / unoevent.hxx
blob4906f447f685e091740630ce683c88bc11aa6b9c
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 .
19 #ifndef INCLUDED_SW_SOURCE_CORE_INC_UNOEVENT_HXX
20 #define INCLUDED_SW_SOURCE_CORE_INC_UNOEVENT_HXX
22 #include <svtools/unoevent.hxx>
24 class SvxMacroItem;
25 class SwXFrame;
26 class SwXTextFrame;
27 class SwXTextGraphicObject;
28 class SwXTextEmbeddedObject;
29 class SwFormatINetFormat;
30 namespace sw
32 class ICoreFrameStyle;
35 class SwHyperlinkEventDescriptor final : public SvDetachedEventDescriptor
37 //XServiceInfo
38 virtual OUString SAL_CALL getImplementationName() override;
40 virtual ~SwHyperlinkEventDescriptor() override;
42 public:
43 SwHyperlinkEventDescriptor();
45 void copyMacrosFromINetFormat(const SwFormatINetFormat& aFormat);
46 void copyMacrosIntoINetFormat(SwFormatINetFormat& aFormat);
48 void
49 copyMacrosFromNameReplace(css::uno::Reference<css::container::XNameReplace> const& xReplace);
52 // SwEventDescriptor for
53 // 1) SwXTextFrame
54 // 2) SwXGraphicObject
55 // 3) SwXEmbeddedObject
56 // All these objects are an SwXFrame, so they can use a common implementation
57 class SwFrameEventDescriptor final : public SvEventDescriptor
59 SwXFrame& m_rFrame;
61 public:
62 SwFrameEventDescriptor(SwXTextFrame& rFrameRef);
63 SwFrameEventDescriptor(SwXTextGraphicObject& rGraphicRef);
64 SwFrameEventDescriptor(SwXTextEmbeddedObject& rObjectRef);
66 virtual ~SwFrameEventDescriptor() override;
68 virtual OUString SAL_CALL getImplementationName() override;
70 private:
71 virtual void setMacroItem(const SvxMacroItem& rItem) override;
72 virtual const SvxMacroItem& getMacroItem() override;
73 virtual sal_uInt16 getMacroItemWhich() const override;
76 class SwFrameStyleEventDescriptor final : public SvEventDescriptor
78 sw::ICoreFrameStyle& m_rStyle;
80 public:
81 SwFrameStyleEventDescriptor(sw::ICoreFrameStyle& rStyle);
83 virtual ~SwFrameStyleEventDescriptor() override;
85 virtual OUString SAL_CALL getImplementationName() override;
87 private:
88 virtual void setMacroItem(const SvxMacroItem& rItem) override;
89 virtual const SvxMacroItem& getMacroItem() override;
90 virtual sal_uInt16 getMacroItemWhich() const override;
93 #endif
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */