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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SC_SOURCE_FILTER_INC_EXCIMP8_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_INC_EXCIMP8_HXX
25 #include <boost/ptr_container/ptr_vector.hpp>
29 #include "excscen.hxx"
30 #include "excdefs.hxx"
32 #include "queryparam.hxx"
37 class ImportExcel8
: public ImportExcel
40 ImportExcel8( XclImpRootData
& rImpData
, SvStream
& rStrm
);
41 virtual ~ImportExcel8();
43 virtual FltError
Read() SAL_OVERRIDE
;
45 void Calccount(); // 0x0C
46 void Precision(); // 0x0E
48 void Iteration(); // 0x11
49 void Boundsheet(); // 0x85
50 void FilterMode(); // 0x9B
51 void AutoFilterInfo(); // 0x9D
52 void AutoFilter(); // 0x9E
53 void Scenman(); // 0xAE
54 void Scenario(); // 0xAF
55 void ReadBasic(); // 0xD3
56 void Labelsst(); // 0xFD
58 void Hlink(); // 0x01B8
59 void FeatHdr(); // 0x0867
60 void Feat(); // 0x0868
62 virtual void EndSheet() SAL_OVERRIDE
;
63 virtual void PostDocLoad() SAL_OVERRIDE
;
66 void LoadDocumentProperties();
69 // represents codename ( and associated modules )
70 // not speficied directly in the binary format
71 std::vector
<OUString
> maAutoGeneratedCodeNames
;
72 ExcScenarioList maScenList
;
75 // classes AutoFilterData, AutoFilterBuffer
77 class XclImpAutoFilterData
: private ExcRoot
80 ScDBData
* pCurrDBData
;
82 ScRange aCriteriaRange
;
85 bool bAutoOrAdvanced
:1;
87 void SetCellAttribs();
88 void InsertQueryParam();
94 const ScRange
& rRange
);
96 inline bool IsActive() const { return bActive
; }
97 inline bool IsFiltered() const { return bAutoOrAdvanced
; }
98 inline SCTAB
Tab() const { return aParam
.nTab
; }
99 inline SCCOL
StartCol() const { return aParam
.nCol1
; }
100 inline SCROW
StartRow() const { return aParam
.nRow1
; }
101 inline SCCOL
EndCol() const { return aParam
.nCol2
; }
102 inline SCROW
EndRow() const { return aParam
.nRow2
; }
104 void ReadAutoFilter( XclImpStream
& rStrm
, svl::SharedStringPool
& rPool
);
106 inline void Activate() { bActive
= true; }
107 void SetAdvancedRange( const ScRange
* pRange
);
108 void SetExtractPos( const ScAddress
& rAddr
);
109 inline void SetAutoOrAdvanced() { bAutoOrAdvanced
= true; }
111 void CreateScDBData();
112 void EnableRemoveFilter();
115 class XclImpAutoFilterBuffer
119 void Insert( RootData
* pRoot
, const ScRange
& rRange
);
120 void AddAdvancedRange( const ScRange
& rRange
);
121 void AddExtractPos( const ScRange
& rRange
);
124 XclImpAutoFilterData
* GetByTab( SCTAB nTab
);
128 boost::ptr_vector
<XclImpAutoFilterData
> maFilters
;
133 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */