Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / inc / userdat.hxx
blob86f124ea81b7cd8caeefd81d8f926099317ddada
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef SC_USERDAT_HXX
21 #define SC_USERDAT_HXX
23 #include <svx/svdobj.hxx>
24 #include <svtools/imap.hxx>
25 #include "global.hxx"
26 #include "address.hxx"
28 #define SC_DRAWLAYER 0x30334353 // Inventor: "SC30"
30 // Object-Ids fuer UserData
31 #define SC_UD_OBJDATA 1
32 #define SC_UD_IMAPDATA 2
33 #define SC_UD_MACRODATA 3
34 #define SC_UD_ALTOBJDATA 4
36 class ScDrawObjFactory
38 DECL_LINK( MakeUserData, SdrObjFactory * );
39 public:
40 ScDrawObjFactory();
41 ~ScDrawObjFactory();
44 class SC_DLLPUBLIC ScDrawObjData : public SdrObjUserData
46 public:
47 enum Type { CellNote, ValidationCircle, DetectiveArrow, DrawingObject };
49 ScAddress maStart;
50 ScAddress maEnd;
51 Point maStartOffset;
52 Point maEndOffset;
53 Type meType;
54 Rectangle maLastRect;
56 explicit ScDrawObjData();
58 private:
59 virtual ScDrawObjData* Clone( SdrObject* pObj ) const;
62 class ScIMapInfo : public SdrObjUserData
64 ImageMap aImageMap;
66 public:
67 ScIMapInfo();
68 ScIMapInfo( const ImageMap& rImageMap );
69 ScIMapInfo( const ScIMapInfo& rIMapInfo );
70 virtual ~ScIMapInfo();
72 virtual SdrObjUserData* Clone( SdrObject* pObj ) const;
74 void SetImageMap( const ImageMap& rIMap ) { aImageMap = rIMap; }
75 const ImageMap& GetImageMap() const { return aImageMap; }
78 class ScMacroInfo : public SdrObjUserData
80 public:
81 ScMacroInfo();
82 virtual ~ScMacroInfo();
84 virtual SdrObjUserData* Clone( SdrObject* pObj ) const;
86 void SetMacro( const OUString& rMacro ) { maMacro = rMacro; }
87 const OUString& GetMacro() const { return maMacro; }
89 void SetHlink( const OUString& rHlink ) { maHlink = rHlink; }
90 const OUString& GetHlink() const { return maHlink; }
92 private:
93 OUString maMacro;
94 OUString maHlink;
97 #endif
99 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */