LibreOffice Module sc (master) 1
extlstcontext.hxx
Go to the documentation of this file.
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#pragma once
11
12#include "excelhandlers.hxx"
14#include "condformatbuffer.hxx"
15
16#include <vector>
17#include <memory>
18
19extern sal_Int32 rStyleIdx; // Holds index of the <extlst> <cfRule> style (Will be reset by finalize import)
20
22namespace oox { class AttributeList; }
23namespace oox::xls { class WorkbookFragment; }
24namespace oox::xls { class WorksheetFragment; }
25
26namespace oox::xls {
27
29{
30public:
31 explicit ExtCfRuleContext( WorksheetContextBase& rFragment, ScDataBarFormatData* pDataBar );
32
33 virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
34 virtual void onStartElement( const AttributeList& rAttribs ) override;
35 virtual void onCharacters( const OUString& rChars ) override;
36 virtual void onEndElement() override;
37
38private:
42};
43
45{
46 sal_Int32 nPriority;
48 OUString aFormula;
49 OUString aStyle;
50};
51
53{
54public:
56
57 virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
58 virtual void onStartElement( const AttributeList& rAttribs ) override;
59 virtual void onCharacters(const OUString& rCharacters) override;
60 virtual void onEndElement() override;
61
62private:
64 sal_Int32 nFormulaCount;
65 OUString aChars; // Characters of between xml elements.
66 sal_Int32 nPriority; // Priority of last cfRule element.
67 ScConditionMode eOperator; // Used only when cfRule type is "cellIs"
68 bool isPreviousElementF; // Used to distinguish alone <sqref> from <f> and <sqref>
69 std::vector<std::unique_ptr<ScFormatEntry> > maEntries;
70 std::unique_ptr<IconSetRule> mpCurrentRule;
71 std::vector<sal_Int32> maPriorities;
72 std::vector<ExtCondFormatRuleModel> maModels;
73};
74
84{
85public:
86 explicit ExtLstLocalContext( WorksheetContextBase& rFragment, ScDataBarFormatData* pTarget ); // until now a ExtLst always extends an existing entry
87
88protected:
89 virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
90 virtual void onStartElement( const AttributeList& rAttribs ) override;
91 virtual void onCharacters( const OUString& rChars ) override;
92
93private:
95};
96
101{
102public:
103 explicit ExtGlobalContext( WorksheetContextBase& rFragment );
104
105protected:
106 virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
107 virtual void onStartElement( const AttributeList& rAttribs ) override;
108
109private:
110};
111
117{
118public:
119 explicit ExtLstGlobalContext( WorksheetFragment& rFragment );
120
121protected:
122 virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
123};
124
126{
127public:
128 explicit ExtGlobalWorkbookContext( WorkbookContextBase& rFragment );
129
130protected:
131 virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
132 virtual void onStartElement( const AttributeList& rAttribs ) override;
133
134private:
135};
136
138{
139public:
140 explicit ExtLstGlobalWorkbookContext( WorkbookFragment& rFragment );
141
142protected:
143 virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
144};
145
146} //namespace oox::xls
147
148/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
ScDataBarFormatData * mpTarget
virtual void onEndElement() override
virtual void onStartElement(const AttributeList &rAttribs) override
ExtCfDataBarRuleRef mpRule
ExtCfRuleContext(WorksheetContextBase &rFragment, ScDataBarFormatData *pDataBar)
virtual void onCharacters(const OUString &rChars) override
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
virtual void onStartElement(const AttributeList &rAttribs) override
std::vector< std::unique_ptr< ScFormatEntry > > maEntries
std::unique_ptr< IconSetRule > mpCurrentRule
virtual void onCharacters(const OUString &rCharacters) override
ExtConditionalFormattingContext(WorksheetContextBase &rFragment)
std::vector< ExtCondFormatRuleModel > maModels
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
virtual void onStartElement(const AttributeList &rAttribs) override
ExtGlobalContext(WorksheetContextBase &rFragment)
virtual void onStartElement(const AttributeList &rAttribs) override
ExtGlobalWorkbookContext(WorkbookContextBase &rFragment)
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
Used for the actual ExtLst containing the new extended definition.
ExtLstGlobalContext(WorksheetFragment &rFragment)
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
ExtLstGlobalWorkbookContext(WorkbookFragment &rFragment)
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
Handle ExtLst entries in xlsx.
virtual void onStartElement(const AttributeList &rAttribs) override
ExtLstLocalContext(WorksheetContextBase &rFragment, ScDataBarFormatData *pTarget)
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
ScDataBarFormatData * mpTarget
virtual void onCharacters(const OUString &rChars) override
Context handler derived from the WorkbookHelper helper class.
Context handler derived from the WorksheetHelper helper class.
ScConditionMode
Definition: conditio.hxx:60
sal_Int32 rStyleIdx
std::shared_ptr< ExtCfDataBarRule > ExtCfDataBarRuleRef