1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef _UNOEVENT_HXX 24 #define _UNOEVENT_HXX 25 26 #include <svtools/unoevent.hxx> 27 #include <svl/macitem.hxx> 28 29 30 class SvxMacroItem; 31 class SvxMacro; 32 class SwXFrame; 33 class SwXTextFrame; 34 class SwXTextGraphicObject; 35 class SwXTextEmbeddedObject; 36 class SwXFrameStyle; 37 class SwFmtINetFmt; 38 39 40 41 class SwHyperlinkEventDescriptor : public SvDetachedEventDescriptor 42 { 43 const ::rtl::OUString sImplName; 44 45 //XServiceInfo 46 virtual rtl::OUString SAL_CALL getImplementationName(void); 47 protected: 48 virtual ~SwHyperlinkEventDescriptor(); 49 public: 50 51 SwHyperlinkEventDescriptor(); 52 53 54 55 void copyMacrosFromINetFmt(const SwFmtINetFmt& aFmt); 56 void copyMacrosIntoINetFmt(SwFmtINetFmt& aFmt); 57 58 void copyMacrosFromNameReplace( 59 ::com::sun::star::uno::Reference< 60 ::com::sun::star::container::XNameReplace> & xReplace); 61 }; 62 63 64 65 // SwEventDescriptor for 66 // 1) SwXTextFrame 67 // 2) SwXGraphicObject 68 // 3) SwXEmbeddedObject 69 // All these objects are an SwXFrame, so they can use a common implementation 70 class SwFrameEventDescriptor : public SvEventDescriptor 71 { 72 ::rtl::OUString sSwFrameEventDescriptor; 73 74 SwXFrame& rFrame; 75 76 public: 77 SwFrameEventDescriptor( SwXTextFrame& rFrameRef ); 78 SwFrameEventDescriptor( SwXTextGraphicObject& rGraphicRef ); 79 SwFrameEventDescriptor( SwXTextEmbeddedObject& rObjectRef ); 80 81 ~SwFrameEventDescriptor(); 82 83 virtual rtl::OUString SAL_CALL getImplementationName(void); 84 85 protected: 86 virtual void setMacroItem(const SvxMacroItem& rItem); 87 virtual const SvxMacroItem& getMacroItem(); 88 virtual sal_uInt16 getMacroItemWhich() const; 89 }; 90 91 class SwFrameStyleEventDescriptor : public SvEventDescriptor 92 { 93 ::rtl::OUString sSwFrameStyleEventDescriptor; 94 95 SwXFrameStyle& rStyle; 96 97 public: 98 SwFrameStyleEventDescriptor( SwXFrameStyle& rStyleRef ); 99 100 ~SwFrameStyleEventDescriptor(); 101 102 virtual rtl::OUString SAL_CALL getImplementationName(void); 103 104 protected: 105 virtual void setMacroItem(const SvxMacroItem& rItem); 106 virtual const SvxMacroItem& getMacroItem(); 107 virtual sal_uInt16 getMacroItemWhich() const; 108 }; 109 110 111 #endif 112