1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef SC_USERDAT_HXX 29 #define SC_USERDAT_HXX 30 31 #include <svx/svdobj.hxx> 32 #include <svtools/imap.hxx> 33 #include "global.hxx" 34 #include "address.hxx" 35 36 37 //------------------------------------------------------------------------- 38 39 #define SC_DRAWLAYER 0x30334353 // Inventor: "SC30" 40 41 // Object-Ids fuer UserData 42 #define SC_UD_OBJDATA 1 43 #define SC_UD_IMAPDATA 2 44 #define SC_UD_MACRODATA 3 45 46 //------------------------------------------------------------------------- 47 48 class ScDrawObjFactory 49 { 50 DECL_LINK( MakeUserData, SdrObjFactory * ); 51 public: 52 ScDrawObjFactory(); 53 ~ScDrawObjFactory(); 54 }; 55 56 //------------------------------------------------------------------------- 57 58 class ScDrawObjData : public SdrObjUserData 59 { 60 public: 61 ScAddress maStart; 62 ScAddress maEnd; 63 bool mbNote; 64 65 explicit ScDrawObjData(); 66 67 private: 68 virtual ScDrawObjData* Clone( SdrObject* pObj ) const; 69 }; 70 71 //------------------------------------------------------------------------- 72 73 class ScIMapInfo : public SdrObjUserData 74 { 75 ImageMap aImageMap; 76 77 public: 78 ScIMapInfo(); 79 ScIMapInfo( const ImageMap& rImageMap ); 80 ScIMapInfo( const ScIMapInfo& rIMapInfo ); 81 virtual ~ScIMapInfo(); 82 83 virtual SdrObjUserData* Clone( SdrObject* pObj ) const; 84 85 void SetImageMap( const ImageMap& rIMap ) { aImageMap = rIMap; } 86 const ImageMap& GetImageMap() const { return aImageMap; } 87 }; 88 89 //------------------------------------------------------------------------- 90 91 class ScMacroInfo : public SdrObjUserData 92 { 93 public: 94 ScMacroInfo(); 95 virtual ~ScMacroInfo(); 96 97 virtual SdrObjUserData* Clone( SdrObject* pObj ) const; 98 99 void SetMacro( const rtl::OUString& rMacro ) { maMacro = rMacro; } 100 const rtl::OUString& GetMacro() const { return maMacro; } 101 102 #ifdef ISSUE66550_HLINK_FOR_SHAPES 103 void SetHlink( const rtl::OUString& rHlink ) { maHlink = rHlink; } 104 const rtl::OUString& GetHlink() const { return maHlink; } 105 #endif 106 107 private: 108 rtl::OUString maMacro; 109 #ifdef ISSUE66550_HLINK_FOR_SHAPES 110 rtl::OUString maHlink; 111 #endif 112 }; 113 114 //------------------------------------------------------------------------- 115 116 #endif 117 118 119