re-enabled user-defined numeric fields for dBase export
[LibreOffice.git] / sc / source / core / data / userdat.cxx
blobd4226fd01f2e844bacdf212b7fad75ec77ea252b
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 // -----------------------------------------------------------------------
26 ScDrawObjFactory::ScDrawObjFactory()
28 SdrObjFactory::InsertMakeUserDataHdl( LINK ( this, ScDrawObjFactory, MakeUserData ) );
31 ScDrawObjFactory::~ScDrawObjFactory()
33 SdrObjFactory::RemoveMakeUserDataHdl( LINK ( this, ScDrawObjFactory, MakeUserData ) );
36 IMPL_LINK_INLINE_START( ScDrawObjFactory, MakeUserData, SdrObjFactory *, pObjFactory )
38 if ( pObjFactory->nInventor == SC_DRAWLAYER )
40 if ( pObjFactory->nIdentifier == SC_UD_OBJDATA )
41 pObjFactory->pNewData = new ScDrawObjData;
42 else if ( pObjFactory->nIdentifier == SC_UD_IMAPDATA )
43 pObjFactory->pNewData = new ScIMapInfo;
44 else if ( pObjFactory->nIdentifier == SC_UD_MACRODATA )
45 pObjFactory->pNewData = new ScMacroInfo;
46 else
48 OSL_FAIL("MakeUserData: wrong ID");
51 return 0;
53 IMPL_LINK_INLINE_END( ScDrawObjFactory, MakeUserData, SdrObjFactory *, pObjFactory )
55 //------------------------------------------------------------------------
57 ScDrawObjData::ScDrawObjData() :
58 SdrObjUserData( SC_DRAWLAYER, SC_UD_OBJDATA, 0 ),
59 maStart( ScAddress::INITIALIZE_INVALID ),
60 maEnd( ScAddress::INITIALIZE_INVALID ),
61 meType( DrawingObject )
65 ScDrawObjData* ScDrawObjData::Clone( SdrObject* ) const
67 return new ScDrawObjData( *this );
70 //------------------------------------------------------------------------
72 ScIMapInfo::ScIMapInfo() :
73 SdrObjUserData( SC_DRAWLAYER, SC_UD_IMAPDATA, 0 )
77 ScIMapInfo::ScIMapInfo( const ImageMap& rImageMap ) :
78 SdrObjUserData( SC_DRAWLAYER, SC_UD_IMAPDATA, 0 ),
79 aImageMap( rImageMap )
83 ScIMapInfo::ScIMapInfo( const ScIMapInfo& rIMapInfo ) :
84 SdrObjUserData( rIMapInfo ),
85 aImageMap( rIMapInfo.aImageMap )
89 ScIMapInfo::~ScIMapInfo()
93 SdrObjUserData* ScIMapInfo::Clone( SdrObject* ) const
95 return new ScIMapInfo( *this );
98 //------------------------------------------------------------------------
100 ScMacroInfo::ScMacroInfo() :
101 SdrObjUserData( SC_DRAWLAYER, SC_UD_MACRODATA, 0 )
105 ScMacroInfo::~ScMacroInfo()
109 SdrObjUserData* ScMacroInfo::Clone( SdrObject* /*pObj*/ ) const
111 return new ScMacroInfo( *this );
114 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */