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