Line data Source code
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 "excelhandlers.hxx"
11 : #include "worksheetfragment.hxx"
12 :
13 : namespace oox {
14 : namespace xls {
15 :
16 10 : class ExtCfRuleContext : public WorksheetContextBase
17 : {
18 : public:
19 : explicit ExtCfRuleContext( WorksheetContextBase& rFragment, void* pDataBar );
20 :
21 : virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
22 : virtual void onStartElement( const AttributeList& rAttribs );
23 :
24 : private:
25 : void* mpTarget;
26 :
27 : bool mbFirstEntry;
28 : };
29 :
30 : /**
31 : * Handle ExtLst entries in xlsx. These entries are a way to extend the standard
32 : * without actually changing it
33 : *
34 : * Needed right now for data bars
35 : *
36 : * ExtLstLocalContext is for the entry in the datastructure that needs to be extended
37 : */
38 10 : class ExtLstLocalContext : public WorksheetContextBase
39 : {
40 : public:
41 : explicit ExtLstLocalContext( WorksheetContextBase& rFragment, void* pTarget ); // until now a ExtLst always extends an existing entry
42 :
43 : protected:
44 : virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
45 : virtual void onStartElement( const AttributeList& rAttribs );
46 : virtual void onCharacters( const OUString& rChars );
47 :
48 : private:
49 : void* mpTarget;
50 : };
51 :
52 : /**
53 : * A single ext entry. Will be skipped until the actual entry with the correct uri is found
54 : */
55 2 : class ExtGlobalContext : public WorksheetContextBase
56 : {
57 : public:
58 : explicit ExtGlobalContext( WorksheetContextBase& rFragment );
59 :
60 : protected:
61 : virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
62 : virtual void onStartElement( const AttributeList& rAttribs );
63 :
64 : private:
65 : };
66 :
67 : /**
68 : * Used for the actual ExtLst containing the new extended definition.
69 : * Uses the saved data from the ExtLstLocalContext
70 : */
71 2 : class ExtLstGlobalContext : public WorksheetContextBase
72 : {
73 : public:
74 : explicit ExtLstGlobalContext( WorksheetFragment& rFragment );
75 :
76 : protected:
77 : virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
78 : };
79 :
80 : } //namespace xls
81 : } //namespace oox
82 :
83 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|