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 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef OOX_XLS_PIVOTTABLEFRAGMENT_HXX
21 : #define OOX_XLS_PIVOTTABLEFRAGMENT_HXX
22 :
23 : #include "excelhandlers.hxx"
24 : #include "worksheethelper.hxx"
25 :
26 : namespace oox {
27 : namespace xls {
28 :
29 : class PivotTable;
30 : class PivotTableField;
31 : class PivotTableFilter;
32 :
33 : // ============================================================================
34 :
35 0 : class PivotTableFieldContext : public WorksheetContextBase
36 : {
37 : public:
38 : explicit PivotTableFieldContext(
39 : WorksheetFragmentBase& rFragment,
40 : PivotTableField& rTableField );
41 :
42 : protected:
43 : virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
44 : virtual void onStartElement( const AttributeList& rAttribs );
45 : virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
46 : virtual void onStartRecord( SequenceInputStream& rStrm );
47 :
48 : private:
49 : PivotTableField& mrTableField;
50 : };
51 :
52 : // ============================================================================
53 :
54 0 : class PivotTableFilterContext : public WorksheetContextBase
55 : {
56 : public:
57 : explicit PivotTableFilterContext(
58 : WorksheetFragmentBase& rFragment,
59 : PivotTableFilter& rTableFilter );
60 :
61 : protected:
62 : virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
63 : virtual void onStartElement( const AttributeList& rAttribs );
64 : virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
65 : virtual void onStartRecord( SequenceInputStream& rStrm );
66 :
67 : private:
68 : PivotTableFilter& mrTableFilter;
69 : };
70 :
71 : // ============================================================================
72 :
73 0 : class PivotTableFragment : public WorksheetFragmentBase
74 : {
75 : public:
76 : explicit PivotTableFragment(
77 : const WorksheetHelper& rHelper,
78 : const ::rtl::OUString& rFragmentPath );
79 :
80 : protected:
81 : virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
82 : virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
83 : virtual const ::oox::core::RecordInfo* getRecordInfos() const;
84 :
85 : private:
86 : PivotTable& mrPivotTable;
87 : };
88 :
89 : // ============================================================================
90 :
91 : } // namespace xls
92 : } // namespace oox
93 :
94 : #endif
95 :
96 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|