Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef INCLUDED_SC_INC_USERDAT_HXX
21 : #define INCLUDED_SC_INC_USERDAT_HXX
22 :
23 : #include <svx/svdobj.hxx>
24 : #include <tools/link.hxx>
25 : #include <svtools/imap.hxx>
26 : #include "global.hxx"
27 : #include "address.hxx"
28 :
29 : #define SC_DRAWLAYER 0x30334353 // Inventor: "SC30"
30 :
31 : // Object-Ids fuer UserData
32 : #define SC_UD_OBJDATA 1
33 : #define SC_UD_IMAPDATA 2
34 : #define SC_UD_MACRODATA 3
35 :
36 : class ScDrawObjFactory
37 : {
38 : DECL_STATIC_LINK( ScDrawObjFactory, MakeUserData, SdrObjFactory * );
39 : public:
40 : ScDrawObjFactory();
41 : ~ScDrawObjFactory();
42 : };
43 :
44 1817 : class SC_DLLPUBLIC ScDrawObjData : public SdrObjUserData
45 : {
46 : public:
47 : enum Type { CellNote, ValidationCircle, DetectiveArrow, DrawingObject };
48 :
49 : ScAddress maStart;
50 : ScAddress maEnd;
51 : Point maStartOffset;
52 : Point maEndOffset;
53 : Type meType;
54 : Rectangle maLastRect;
55 :
56 : explicit ScDrawObjData();
57 :
58 : private:
59 : virtual ScDrawObjData* Clone( SdrObject* pObj ) const SAL_OVERRIDE;
60 : };
61 :
62 : class ScIMapInfo : public SdrObjUserData
63 : {
64 : ImageMap aImageMap;
65 :
66 : public:
67 : ScIMapInfo();
68 : ScIMapInfo( const ImageMap& rImageMap );
69 : ScIMapInfo( const ScIMapInfo& rIMapInfo );
70 : virtual ~ScIMapInfo();
71 :
72 : virtual SdrObjUserData* Clone( SdrObject* pObj ) const SAL_OVERRIDE;
73 :
74 0 : void SetImageMap( const ImageMap& rIMap ) { aImageMap = rIMap; }
75 0 : const ImageMap& GetImageMap() const { return aImageMap; }
76 : };
77 :
78 0 : class ScMacroInfo : public SdrObjUserData
79 : {
80 : public:
81 : ScMacroInfo();
82 : virtual ~ScMacroInfo();
83 :
84 : virtual SdrObjUserData* Clone( SdrObject* pObj ) const SAL_OVERRIDE;
85 :
86 1 : void SetMacro( const OUString& rMacro ) { maMacro = rMacro; }
87 6 : const OUString& GetMacro() const { return maMacro; }
88 :
89 7 : void SetHlink( const OUString& rHlink ) { maHlink = rHlink; }
90 6 : const OUString& GetHlink() const { return maHlink; }
91 :
92 : private:
93 : OUString maMacro;
94 : OUString maHlink;
95 : };
96 :
97 : #endif
98 :
99 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|