1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: unoevent.hxx,v $
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 ************************************************************************/
33 #include <svtools/unoevent.hxx>
34 #include <svtools/macitem.hxx>
41 class SwXTextGraphicObject
;
42 class SwXTextEmbeddedObject
;
48 class SwHyperlinkEventDescriptor
: public SvDetachedEventDescriptor
50 const ::rtl::OUString sImplName
;
53 virtual rtl::OUString SAL_CALL
getImplementationName(void)
54 throw( ::com::sun::star::uno::RuntimeException
);
56 virtual ~SwHyperlinkEventDescriptor();
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
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
;
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
);
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
;
107 SwFrameStyleEventDescriptor( SwXFrameStyle
& rStyleRef
);
109 ~SwFrameStyleEventDescriptor();
111 virtual rtl::OUString SAL_CALL
getImplementationName(void)
112 throw( ::com::sun::star::uno::RuntimeException
);
115 virtual void setMacroItem(const SvxMacroItem
& rItem
);
116 virtual const SvxMacroItem
& getMacroItem();
117 virtual sal_uInt16
getMacroItemWhich() const;