/src/libreoffice/oox/source/shape/ShapeDrawingFragmentHandler.cxx
Line | Count | Source |
1 | | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
2 | | /* |
3 | | * This file is part of the LibreOffice project. |
4 | | * |
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/. |
8 | | */ |
9 | | |
10 | | #include <oox/shape/ShapeDrawingFragmentHandler.hxx> |
11 | | |
12 | | #include <oox/drawingml/shapegroupcontext.hxx> |
13 | | #include <oox/token/namespaces.hxx> |
14 | | #include <utility> |
15 | | |
16 | | using namespace com::sun::star; |
17 | | |
18 | | namespace oox::shape { |
19 | | |
20 | | ShapeDrawingFragmentHandler::ShapeDrawingFragmentHandler(oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath, oox::drawingml::ShapePtr pGroupShapePtr) |
21 | 75 | : FragmentHandler2(rFilter, rFragmentPath) |
22 | 75 | , mpGroupShapePtr(std::move(pGroupShapePtr)) |
23 | 75 | { |
24 | 75 | } |
25 | | |
26 | | ShapeDrawingFragmentHandler::~ShapeDrawingFragmentHandler() noexcept |
27 | 75 | { |
28 | 75 | } |
29 | | |
30 | | void SAL_CALL ShapeDrawingFragmentHandler::endDocument() |
31 | 75 | { |
32 | 75 | } |
33 | | |
34 | | ::oox::core::ContextHandlerRef ShapeDrawingFragmentHandler::onCreateContext(sal_Int32 Element, const AttributeList& /*Attribs*/ ) |
35 | 150 | { |
36 | 150 | switch( Element ) |
37 | 150 | { |
38 | 75 | case DSP_TOKEN( spTree ): |
39 | 75 | return new oox::drawingml::ShapeGroupContext(*this, oox::drawingml::ShapePtr(nullptr), mpGroupShapePtr); |
40 | 75 | default: |
41 | 75 | break; |
42 | 150 | } |
43 | | |
44 | 75 | return this; |
45 | 150 | } |
46 | | |
47 | | } |
48 | | |
49 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |