fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / sc / source / core / data / userdat.cxx
blob9cc9aeddec9d29cf447bbd86981778801811f775
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 #include "userdat.hxx"
21 #include "drwlayer.hxx"
22 #include "rechead.hxx"
24 ScDrawObjFactory::ScDrawObjFactory()
26 SdrObjFactory::InsertMakeUserDataHdl( LINK ( this, ScDrawObjFactory, MakeUserData ) );
29 ScDrawObjFactory::~ScDrawObjFactory()
31 SdrObjFactory::RemoveMakeUserDataHdl( LINK ( this, ScDrawObjFactory, MakeUserData ) );
34 IMPL_STATIC_LINK(
35 ScDrawObjFactory, MakeUserData, SdrObjFactory *, pObjFactory )
37 if ( pObjFactory->nInventor == SC_DRAWLAYER )
39 if ( pObjFactory->nIdentifier == SC_UD_OBJDATA )
40 pObjFactory->pNewData = new ScDrawObjData;
41 else if ( pObjFactory->nIdentifier == SC_UD_IMAPDATA )
42 pObjFactory->pNewData = new ScIMapInfo;
43 else if ( pObjFactory->nIdentifier == SC_UD_MACRODATA )
44 pObjFactory->pNewData = new ScMacroInfo;
45 else
47 OSL_FAIL("MakeUserData: wrong ID");
50 return 0;
53 ScDrawObjData::ScDrawObjData() :
54 SdrObjUserData( SC_DRAWLAYER, SC_UD_OBJDATA, 0 ),
55 maStart( ScAddress::INITIALIZE_INVALID ),
56 maEnd( ScAddress::INITIALIZE_INVALID ),
57 meType( DrawingObject )
61 ScDrawObjData* ScDrawObjData::Clone( SdrObject* ) const
63 return new ScDrawObjData( *this );
66 ScIMapInfo::ScIMapInfo() :
67 SdrObjUserData( SC_DRAWLAYER, SC_UD_IMAPDATA, 0 )
71 ScIMapInfo::ScIMapInfo( const ImageMap& rImageMap ) :
72 SdrObjUserData( SC_DRAWLAYER, SC_UD_IMAPDATA, 0 ),
73 aImageMap( rImageMap )
77 ScIMapInfo::ScIMapInfo( const ScIMapInfo& rIMapInfo ) :
78 SdrObjUserData( rIMapInfo ),
79 aImageMap( rIMapInfo.aImageMap )
83 ScIMapInfo::~ScIMapInfo()
87 SdrObjUserData* ScIMapInfo::Clone( SdrObject* ) const
89 return new ScIMapInfo( *this );
92 ScMacroInfo::ScMacroInfo() :
93 SdrObjUserData( SC_DRAWLAYER, SC_UD_MACRODATA, 0 )
97 ScMacroInfo::~ScMacroInfo()
101 SdrObjUserData* ScMacroInfo::Clone( SdrObject* /*pObj*/ ) const
103 return new ScMacroInfo( *this );
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */