1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
12 #include "excelhandlers.hxx"
13 #include <oox/core/contexthandler.hxx>
14 #include <SparklineGroup.hxx>
26 /** Transitional sparkline data */
30 ScRangeList m_aInputRange
;
31 ScRangeList m_aTargetRange
;
35 /** Transitional sparkline group data */
39 std::vector
<Sparkline
> m_aSparklines
;
41 std::shared_ptr
<sc::SparklineGroup
> m_pSparklineGroup
;
45 : m_pSparklineGroup(new sc::SparklineGroup
)
49 const std::shared_ptr
<sc::SparklineGroup
>& getSparklineGroup() { return m_pSparklineGroup
; }
51 std::vector
<Sparkline
>& getSparklines() { return m_aSparklines
; }
54 /** Handle import of the sparkline, sparkline group and attributes */
55 class SparklineGroupsContext
: public WorksheetContextBase
58 std::vector
<SparklineGroup
> m_aSparklineGroups
;
61 explicit SparklineGroupsContext(WorksheetContextBase
& rFragment
);
63 oox::core::ContextHandlerRef
onCreateContext(sal_Int32 nElement
,
64 const AttributeList
& rAttribs
) override
;
65 void onStartElement(const AttributeList
& rAttribs
) override
;
66 void onCharacters(const OUString
& rCharacters
) override
;
67 void onEndElement() override
;
69 void insertSparkline(SparklineGroup
& rSparklineGroup
, Sparkline
& rSparkline
);
72 } //namespace oox::xls
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */