Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * Version: MPL 1.1 / GPLv3+ / LGPLv3+
4 : : *
5 : : * The contents of this file are subject to the Mozilla Public License Version
6 : : * 1.1 (the "License"); you may not use this file except in compliance with
7 : : * the License. You may obtain a copy of the License at
8 : : * http://www.mozilla.org/MPL/
9 : : *
10 : : * Software distributed under the License is distributed on an "AS IS" basis,
11 : : * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 : : * for the specific language governing rights and limitations under the
13 : : * License.
14 : : *
15 : : * The Initial Developer of the Original Code is
16 : : * Miklos Vajna <vmiklos@suse.cz> (SUSE, Inc.)
17 : : * Portions created by the Initial Developer are Copyright (C) 2012 the
18 : : * Initial Developer. All Rights Reserved.
19 : : *
20 : : * Contributor(s):
21 : : *
22 : : * Alternatively, the contents of this file may be used under the terms of
23 : : * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
24 : : * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
25 : : * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
26 : : * instead of those above.
27 : : */
28 : :
29 : : #include "ShapeDrawingFragmentHandler.hxx"
30 : :
31 : : using namespace com::sun::star;
32 : : using rtl::OUString;
33 : :
34 : : namespace oox { namespace shape {
35 : :
36 : 3 : ShapeDrawingFragmentHandler::ShapeDrawingFragmentHandler(oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath, oox::drawingml::ShapePtr pGroupShapePtr ) throw()
37 : : : FragmentHandler(rFilter, rFragmentPath),
38 [ + - ]: 3 : mpGroupShapePtr(pGroupShapePtr)
39 : : {
40 : 3 : }
41 : :
42 [ + - ]: 3 : ShapeDrawingFragmentHandler::~ShapeDrawingFragmentHandler() throw()
43 : : {
44 [ - + ]: 6 : }
45 : :
46 : 3 : void SAL_CALL ShapeDrawingFragmentHandler::endDocument() throw (xml::sax::SAXException, uno::RuntimeException)
47 : : {
48 : 3 : }
49 : :
50 : 6 : uno::Reference<xml::sax::XFastContextHandler> SAL_CALL ShapeDrawingFragmentHandler::createFastChildContext(sal_Int32 Element, const uno::Reference<xml::sax::XFastAttributeList>& /*Attribs*/ ) throw (xml::sax::SAXException, uno::RuntimeException)
51 : : {
52 : 6 : uno::Reference< XFastContextHandler > xRet;
53 : :
54 [ + + ]: 6 : switch( Element )
55 : : {
56 : : case DSP_TOKEN( spTree ):
57 [ + - ][ + - ]: 3 : xRet.set( new oox::drawingml::ShapeGroupContext(*this, oox::drawingml::ShapePtr((oox::drawingml::Shape*)0), mpGroupShapePtr));
[ + - ][ + - ]
[ + - ][ + - ]
[ + - ]
58 : 3 : break;
59 : : default:
60 : 3 : break;
61 : : }
62 : :
63 [ + + ]: 6 : if( !xRet.is() )
64 [ + - ][ + - ]: 3 : xRet = getFastContextHandler();
65 : :
66 : 6 : return xRet;
67 : : }
68 : :
69 [ + - ][ + - ]: 285 : } }
70 : :
71 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|