1 /*************************************************************************
3 * OpenOffice.org - a multi-platform office productivity suite
5 * $RCSfile: objectdefaultcontext.cxx,v $
9 * last change: $Author: rt $ $Date: 2008-01-17 08:05:51 $
11 * The Contents of this file are made available subject to
12 * the terms of GNU Lesser General Public License Version 2.1.
15 * GNU Lesser General Public License Version 2.1
16 * =============================================
17 * Copyright 2005 by Sun Microsystems, Inc.
18 * 901 San Antonio Road, Palo Alto, CA 94303, USA
20 * This library is free software; you can redistribute it and/or
21 * modify it under the terms of the GNU Lesser General Public
22 * License version 2.1, as published by the Free Software Foundation.
24 * This library is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27 * Lesser General Public License for more details.
29 * You should have received a copy of the GNU Lesser General Public
30 * License along with this library; if not, write to the Free Software
31 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
34 ************************************************************************/
36 #include "oox/drawingml/objectdefaultcontext.hxx"
37 #include "oox/drawingml/spdefcontext.hxx"
38 #include "oox/core/namespaces.hxx"
42 using namespace ::oox::core
;
43 using namespace ::com::sun::star::uno
;
44 using namespace ::com::sun::star::xml::sax
;
46 namespace oox
{ namespace drawingml
{
48 objectDefaultContext::objectDefaultContext( const ::oox::core::FragmentHandlerRef
& xHandler
, Theme
& rTheme
)
54 Reference
< XFastContextHandler
> objectDefaultContext::createFastChildContext( sal_Int32 aElementToken
, const Reference
< XFastAttributeList
>& /* xAttribs */ ) throw (SAXException
, RuntimeException
)
56 Reference
< XFastContextHandler
> xRet
;
57 switch( aElementToken
)
59 case NMSP_DRAWINGML
|XML_spDef
:
61 xRet
.set( new spDefContext( getHandler(), *(mrTheme
.getspDef().get()) ) );
64 case NMSP_DRAWINGML
|XML_lnDef
:
66 xRet
.set( new spDefContext( getHandler(), *(mrTheme
.getlnDef().get()) ) );
69 case NMSP_DRAWINGML
|XML_txDef
:
71 xRet
.set( new spDefContext( getHandler(), *(mrTheme
.gettxDef().get()) ) );