1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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>
27 class SwXTextGraphicObject
;
28 class SwXTextEmbeddedObject
;
29 class SwFormatINetFormat
;
32 class ICoreFrameStyle
;
35 class SwHyperlinkEventDescriptor final
: public SvDetachedEventDescriptor
38 virtual OUString SAL_CALL
getImplementationName() override
;
40 virtual ~SwHyperlinkEventDescriptor() override
;
43 SwHyperlinkEventDescriptor();
45 void copyMacrosFromINetFormat(const SwFormatINetFormat
& aFormat
);
46 void copyMacrosIntoINetFormat(SwFormatINetFormat
& aFormat
);
49 copyMacrosFromNameReplace(css::uno::Reference
<css::container::XNameReplace
> const& xReplace
);
52 // SwEventDescriptor for
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
62 SwFrameEventDescriptor(SwXTextFrame
& rFrameRef
);
63 SwFrameEventDescriptor(SwXTextGraphicObject
& rGraphicRef
);
64 SwFrameEventDescriptor(SwXTextEmbeddedObject
& rObjectRef
);
66 virtual ~SwFrameEventDescriptor() override
;
68 virtual OUString SAL_CALL
getImplementationName() override
;
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
;
81 SwFrameStyleEventDescriptor(sw::ICoreFrameStyle
& rStyle
);
83 virtual ~SwFrameStyleEventDescriptor() override
;
85 virtual OUString SAL_CALL
getImplementationName() override
;
88 virtual void setMacroItem(const SvxMacroItem
& rItem
) override
;
89 virtual const SvxMacroItem
& getMacroItem() override
;
90 virtual sal_uInt16
getMacroItemWhich() const override
;
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */