update dev300-m58
[ooovba.git] / oox / source / ppt / slidetimingcontext.cxx
blob7fc20d0066e23f4ac4d6220401ec2334a4bc19b4
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: slidetimingcontext.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 "oox/ppt/slidetimingcontext.hxx"
33 #include "comphelper/anytostring.hxx"
34 #include "cppuhelper/exc_hlp.hxx"
36 #include "oox/ppt/backgroundproperties.hxx"
37 #include "oox/ppt/slidefragmenthandler.hxx"
38 #include "oox/drawingml/shapegroupcontext.hxx"
39 #include "oox/helper/attributelist.hxx"
40 #include "oox/core/namespaces.hxx"
41 #include "oox/ppt/timenodelistcontext.hxx"
42 #include "buildlistcontext.hxx"
43 #include "tokens.hxx"
45 using rtl::OUString;
46 using namespace ::com::sun::star;
47 using namespace ::oox::core;
48 using namespace ::oox::drawingml;
49 using namespace ::com::sun::star::uno;
50 using namespace ::com::sun::star::lang;
51 using namespace ::com::sun::star::xml::sax;
52 using namespace ::com::sun::star::container;
54 namespace oox { namespace ppt {
56 SlideTimingContext::SlideTimingContext( ContextHandler& rParent, TimeNodePtrList & aTimeNodeList ) throw()
57 : ContextHandler( rParent )
58 , maTimeNodeList( aTimeNodeList )
62 SlideTimingContext::~SlideTimingContext() throw()
67 void SlideTimingContext::endFastElement( sal_Int32 /*aElement*/ ) throw ( SAXException, RuntimeException)
72 Reference< XFastContextHandler > SlideTimingContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
74 Reference< XFastContextHandler > xRet;
76 switch( aElementToken )
78 case NMSP_PPT|XML_bldLst:
79 xRet.set( new BuildListContext( *this, xAttribs, maTimeNodeList ) );
80 break;
81 case NMSP_PPT|XML_extLst:
82 return xRet;
83 case NMSP_PPT|XML_tnLst:
84 // timing nodes
86 xRet.set( new TimeNodeListContext( *this, maTimeNodeList ) );
88 break;
90 default:
91 break;
94 if( !xRet.is() )
95 xRet.set(this);
97 return xRet;
100 void SAL_CALL SlideTimingContext::endDocument( ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException)