Update ooo320-m1
[ooovba.git] / binfilter / inc / bf_sw / unoevent.hxx
blob642fe12c540e51dbb462617eb9b678afccf264fd
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.7 $
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 #ifndef _SVTOOLS_UNOEVENT_HXX_
34 #include <bf_svtools/unoevent.hxx>
35 #endif
37 namespace binfilter {
39 class SvxMacroItem;
40 class SvxMacro;
42 class SwXFrame;
43 class SwXTextFrame;
44 class SwXTextGraphicObject;
45 class SwXTextEmbeddedObject;
46 class SwXFrameStyle;
47 class SwFmtINetFmt;
51 class SwHyperlinkEventDescriptor : public SvDetachedEventDescriptor
53 const ::rtl::OUString sImplName;
55 //XServiceInfo
56 virtual ::rtl::OUString SAL_CALL getImplementationName(void)
57 throw( ::com::sun::star::uno::RuntimeException );
58 protected:
59 virtual ~SwHyperlinkEventDescriptor();
60 public:
62 SwHyperlinkEventDescriptor();
66 void copyMacrosFromINetFmt(const SwFmtINetFmt& aFmt);
67 void copyMacrosIntoINetFmt(SwFmtINetFmt& aFmt);
69 void copyMacrosFromNameReplace(
70 ::com::sun::star::uno::Reference<
71 ::com::sun::star::container::XNameReplace> & xReplace);
76 // SwEventDescriptor for
77 // 1) SwXTextFrame
78 // 2) SwXGraphicObject
79 // 3) SwXEmbeddedObject
80 // All these objects are an SwXFrame, so they can use a common implementation
81 class SwFrameEventDescriptor : public SvEventDescriptor
83 ::rtl::OUString sSwFrameEventDescriptor;
85 SwXFrame& rFrame;
87 public:
88 SwFrameEventDescriptor( SwXTextFrame& rFrameRef );
89 SwFrameEventDescriptor( SwXTextGraphicObject& rGraphicRef );
90 SwFrameEventDescriptor( SwXTextEmbeddedObject& rObjectRef );
92 ~SwFrameEventDescriptor();
94 virtual ::rtl::OUString SAL_CALL getImplementationName(void)
95 throw( ::com::sun::star::uno::RuntimeException );
97 protected:
98 virtual void setMacroItem(const SvxMacroItem& rItem);
99 virtual const SvxMacroItem& getMacroItem();
100 virtual sal_uInt16 getMacroItemWhich() const;
103 class SwFrameStyleEventDescriptor : public SvEventDescriptor
105 ::rtl::OUString sSwFrameStyleEventDescriptor;
107 SwXFrameStyle& rStyle;
109 public:
110 SwFrameStyleEventDescriptor( SwXFrameStyle& rStyleRef );
112 ~SwFrameStyleEventDescriptor();
114 virtual ::rtl::OUString SAL_CALL getImplementationName(void)
115 throw( ::com::sun::star::uno::RuntimeException );
117 protected:
118 virtual void setMacroItem(const SvxMacroItem& rItem);
119 virtual const SvxMacroItem& getMacroItem();
120 virtual sal_uInt16 getMacroItemWhich() const;
124 } //namespace binfilter
125 #endif