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_AUTOFILTERCONTEXT_HXX
21 : #define OOX_XLS_AUTOFILTERCONTEXT_HXX
22 :
23 : #include "excelhandlers.hxx"
24 :
25 : namespace oox {
26 : namespace xls {
27 :
28 : class AutoFilter;
29 : class FilterColumn;
30 : class FilterSettingsBase;
31 :
32 : // ============================================================================
33 :
34 2 : class FilterSettingsContext : public WorksheetContextBase
35 : {
36 : public:
37 : explicit FilterSettingsContext( WorksheetContextBase& rParent, FilterSettingsBase& rFilterSettings );
38 :
39 : protected:
40 : virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
41 : virtual void onStartElement( const AttributeList& rAttribs );
42 :
43 : virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
44 : virtual void onStartRecord( SequenceInputStream& rStrm );
45 :
46 : private:
47 : FilterSettingsBase& mrFilterSettings;
48 : };
49 :
50 : // ============================================================================
51 :
52 2 : class FilterColumnContext : public WorksheetContextBase
53 : {
54 : public:
55 : explicit FilterColumnContext( WorksheetContextBase& rParent, FilterColumn& rFilterColumn );
56 :
57 : protected:
58 : virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
59 : virtual void onStartElement( const AttributeList& rAttribs );
60 :
61 : virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
62 : virtual void onStartRecord( SequenceInputStream& rStrm );
63 :
64 : private:
65 : FilterColumn& mrFilterColumn;
66 : };
67 :
68 : // ============================================================================
69 :
70 2 : class AutoFilterContext : public WorksheetContextBase
71 : {
72 : public:
73 : explicit AutoFilterContext( WorksheetFragmentBase& rFragment, AutoFilter& rAutoFilter );
74 :
75 : protected:
76 : virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
77 : virtual void onStartElement( const AttributeList& rAttribs );
78 :
79 : virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
80 : virtual void onStartRecord( SequenceInputStream& rStrm );
81 :
82 : private:
83 : AutoFilter& mrAutoFilter;
84 : };
85 :
86 : // ============================================================================
87 :
88 : } // namespace xls
89 : } // namespace oox
90 :
91 : #endif
92 :
93 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|