merge the formfield patch from ooo-build
[ooovba.git] / oox / source / ppt / buildlistcontext.cxx
blob6afd5e9b7422b2b9188df453b49c5f60f5d75c81
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: buildlistcontext.cxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #include "buildlistcontext.hxx"
32 #include <rtl/ustring.hxx>
33 #include "oox/helper/attributelist.hxx"
34 #include "oox/core/namespaces.hxx"
37 using namespace ::oox::core;
38 using namespace ::com::sun::star::uno;
39 using namespace ::com::sun::star::xml::sax;
40 using ::rtl::OUString;
42 namespace oox { namespace ppt {
44 BuildListContext::BuildListContext( ContextHandler& rParent,
45 const Reference< XFastAttributeList >& /*xAttribs*/,
46 TimeNodePtrList & aTimeNodeList)
47 : ContextHandler( rParent )
48 , maTimeNodeList( aTimeNodeList )
49 , mbInBldGraphic( false )
50 , mbBuildAsOne( false )
54 BuildListContext::~BuildListContext( )
58 void SAL_CALL BuildListContext::endFastElement( sal_Int32 aElement ) throw ( SAXException, RuntimeException)
60 switch( aElement )
62 case NMSP_PPT|XML_bldGraphic:
63 mbInBldGraphic = false;
64 break;
65 default:
66 break;
70 Reference< XFastContextHandler > SAL_CALL BuildListContext::createFastChildContext( ::sal_Int32 aElementToken,
71 const Reference< XFastAttributeList >& xAttribs )
72 throw ( SAXException, RuntimeException )
74 Reference< XFastContextHandler > xRet;
76 switch( aElementToken )
78 case NMSP_PPT|XML_bldAsOne:
79 if( mbInBldGraphic )
81 mbBuildAsOne = true;
83 break;
84 case NMSP_PPT|XML_bldSub:
85 if( mbInBldGraphic )
88 break;
89 case NMSP_PPT|XML_bldGraphic:
91 mbInBldGraphic = true;
92 AttributeList attribs( xAttribs );
93 OUString sShapeId = xAttribs->getOptionalValue( XML_spid );
94 // TODO
95 // bool uiExpand = attribs.getBool( XML_uiExpand, true );
96 /* this is unsigned */
97 // sal_uInt32 nGroupId = attribs.getUnsignedInteger( XML_grpId, 0 );
98 break;
100 case NMSP_DRAWINGML|XML_bldDgm:
101 case NMSP_DRAWINGML|XML_bldOleChart:
102 case NMSP_DRAWINGML|XML_bldP:
104 break;
105 default:
106 break;
109 if( !xRet.is() )
110 xRet.set(this);
112 return xRet;