build fix
[LibreOffice.git] / sc / inc / userdat.hxx
blobc8e8d6a98ec04c6a24d28b365d71bf17e1d03ef7
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 INCLUDED_SC_INC_USERDAT_HXX
21 #define INCLUDED_SC_INC_USERDAT_HXX
23 #include <svx/svdobj.hxx>
24 #include <tools/link.hxx>
25 #include <svtools/imap.hxx>
26 #include "global.hxx"
27 #include "address.hxx"
29 // Object-Ids fuer UserData
30 #define SC_UD_OBJDATA 1
31 #define SC_UD_IMAPDATA 2
32 #define SC_UD_MACRODATA 3
34 class ScDrawObjFactory
36 DECL_STATIC_LINK( ScDrawObjFactory, MakeUserData, SdrObjUserDataCreatorParams, SdrObjUserData* );
37 public:
38 ScDrawObjFactory();
39 ~ScDrawObjFactory();
42 class SC_DLLPUBLIC ScDrawObjData : public SdrObjUserData
44 public:
45 enum Type { CellNote, ValidationCircle, DetectiveArrow, DrawingObject };
47 ScAddress maStart;
48 ScAddress maEnd;
49 Point maStartOffset;
50 Point maEndOffset;
51 Type meType;
52 Rectangle maLastRect;
54 explicit ScDrawObjData();
56 private:
57 virtual ScDrawObjData* Clone( SdrObject* pObj ) const override;
60 class ScIMapInfo : public SdrObjUserData
62 ImageMap aImageMap;
64 public:
65 ScIMapInfo();
66 ScIMapInfo( const ImageMap& rImageMap );
67 ScIMapInfo( const ScIMapInfo& rIMapInfo );
68 virtual ~ScIMapInfo() override;
70 virtual SdrObjUserData* Clone( SdrObject* pObj ) const override;
72 void SetImageMap( const ImageMap& rIMap ) { aImageMap = rIMap; }
73 const ImageMap& GetImageMap() const { return aImageMap; }
76 class ScMacroInfo : public SdrObjUserData
78 public:
79 ScMacroInfo();
80 virtual ~ScMacroInfo() override;
82 virtual SdrObjUserData* Clone( SdrObject* pObj ) const override;
84 void SetMacro( const OUString& rMacro ) { maMacro = rMacro; }
85 const OUString& GetMacro() const { return maMacro; }
87 void SetHlink( const OUString& rHlink ) { maHlink = rHlink; }
88 const OUString& GetHlink() const { return maHlink; }
90 private:
91 OUString maMacro;
92 OUString maHlink;
95 #endif
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */