xref: /aoo4110/main/sc/inc/userdat.hxx (revision b1cdbd2c)
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 
24 #ifndef SC_USERDAT_HXX
25 #define SC_USERDAT_HXX
26 
27 #include <svx/svdobj.hxx>
28 #include <svtools/imap.hxx>
29 #include "global.hxx"
30 #include "address.hxx"
31 
32 
33 //-------------------------------------------------------------------------
34 
35 #define SC_DRAWLAYER 0x30334353		// Inventor: "SC30"
36 
37 // Object-Ids fuer UserData
38 #define SC_UD_OBJDATA		1
39 #define SC_UD_IMAPDATA		2
40 #define SC_UD_MACRODATA		3
41 
42 //-------------------------------------------------------------------------
43 
44 class ScDrawObjFactory
45 {
46 	DECL_LINK( MakeUserData, SdrObjFactory * );
47 public:
48 	ScDrawObjFactory();
49    ~ScDrawObjFactory();
50 };
51 
52 //-------------------------------------------------------------------------
53 
54 class ScDrawObjData : public SdrObjUserData
55 {
56 public:
57     ScAddress           maStart;
58     ScAddress           maEnd;
59     bool                mbNote;
60 
61     explicit            ScDrawObjData();
62 
63 private:
64 	virtual ScDrawObjData* Clone( SdrObject* pObj ) const;
65 };
66 
67 //-------------------------------------------------------------------------
68 
69 class ScIMapInfo : public SdrObjUserData
70 {
71 	ImageMap		aImageMap;
72 
73 public:
74 					ScIMapInfo();
75 					ScIMapInfo( const ImageMap& rImageMap );
76 					ScIMapInfo( const ScIMapInfo& rIMapInfo );
77 	virtual			~ScIMapInfo();
78 
79 	virtual	SdrObjUserData* Clone( SdrObject* pObj ) const;
80 
SetImageMap(const ImageMap & rIMap)81 	void 	SetImageMap( const ImageMap& rIMap )	{ aImageMap = rIMap; }
GetImageMap() const82 	const ImageMap&	GetImageMap() const				{ return aImageMap; }
83 };
84 
85 //-------------------------------------------------------------------------
86 
87 class ScMacroInfo : public SdrObjUserData
88 {
89 public:
90                     ScMacroInfo();
91     virtual         ~ScMacroInfo();
92 
93     virtual SdrObjUserData* Clone( SdrObject* pObj ) const;
94 
SetMacro(const rtl::OUString & rMacro)95     void            SetMacro( const rtl::OUString& rMacro ) { maMacro = rMacro; }
GetMacro() const96     const rtl::OUString& GetMacro() const { return maMacro; }
97 
98 #ifdef ISSUE66550_HLINK_FOR_SHAPES
SetHlink(const rtl::OUString & rHlink)99     void            SetHlink( const rtl::OUString& rHlink ) { maHlink = rHlink; }
GetHlink() const100     const rtl::OUString& GetHlink() const { return maHlink; }
101 #endif
102 
103 private:
104     rtl::OUString   maMacro;
105 #ifdef ISSUE66550_HLINK_FOR_SHAPES
106     rtl::OUString   maHlink;
107 #endif
108 };
109 
110 //-------------------------------------------------------------------------
111 
112 #endif
113 
114 
115