update dev300-m58
[ooovba.git] / sw / inc / unoevent.hxx
blob8f63bf4c308b6a126888aebeaf3001364929a054
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: unoevent.hxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _UNOEVENT_HXX
31 #define _UNOEVENT_HXX
33 #include <svtools/unoevent.hxx>
34 #include <svtools/macitem.hxx>
37 class SvxMacroItem;
38 class SvxMacro;
39 class SwXFrame;
40 class SwXTextFrame;
41 class SwXTextGraphicObject;
42 class SwXTextEmbeddedObject;
43 class SwXFrameStyle;
44 class SwFmtINetFmt;
48 class SwHyperlinkEventDescriptor : public SvDetachedEventDescriptor
50 const ::rtl::OUString sImplName;
52 //XServiceInfo
53 virtual rtl::OUString SAL_CALL getImplementationName(void)
54 throw( ::com::sun::star::uno::RuntimeException );
55 protected:
56 virtual ~SwHyperlinkEventDescriptor();
57 public:
59 SwHyperlinkEventDescriptor();
63 void copyMacrosFromINetFmt(const SwFmtINetFmt& aFmt);
64 void copyMacrosIntoINetFmt(SwFmtINetFmt& aFmt);
66 void copyMacrosFromNameReplace(
67 ::com::sun::star::uno::Reference<
68 ::com::sun::star::container::XNameReplace> & xReplace);
73 // SwEventDescriptor for
74 // 1) SwXTextFrame
75 // 2) SwXGraphicObject
76 // 3) SwXEmbeddedObject
77 // All these objects are an SwXFrame, so they can use a common implementation
78 class SwFrameEventDescriptor : public SvEventDescriptor
80 ::rtl::OUString sSwFrameEventDescriptor;
82 SwXFrame& rFrame;
84 public:
85 SwFrameEventDescriptor( SwXTextFrame& rFrameRef );
86 SwFrameEventDescriptor( SwXTextGraphicObject& rGraphicRef );
87 SwFrameEventDescriptor( SwXTextEmbeddedObject& rObjectRef );
89 ~SwFrameEventDescriptor();
91 virtual rtl::OUString SAL_CALL getImplementationName(void)
92 throw( ::com::sun::star::uno::RuntimeException );
94 protected:
95 virtual void setMacroItem(const SvxMacroItem& rItem);
96 virtual const SvxMacroItem& getMacroItem();
97 virtual sal_uInt16 getMacroItemWhich() const;
100 class SwFrameStyleEventDescriptor : public SvEventDescriptor
102 ::rtl::OUString sSwFrameStyleEventDescriptor;
104 SwXFrameStyle& rStyle;
106 public:
107 SwFrameStyleEventDescriptor( SwXFrameStyle& rStyleRef );
109 ~SwFrameStyleEventDescriptor();
111 virtual rtl::OUString SAL_CALL getImplementationName(void)
112 throw( ::com::sun::star::uno::RuntimeException );
114 protected:
115 virtual void setMacroItem(const SvxMacroItem& rItem);
116 virtual const SvxMacroItem& getMacroItem();
117 virtual sal_uInt16 getMacroItemWhich() const;
121 #endif