1*38d50f7bSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*38d50f7bSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*38d50f7bSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*38d50f7bSAndrew Rist * distributed with this work for additional information 6*38d50f7bSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*38d50f7bSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*38d50f7bSAndrew Rist * "License"); you may not use this file except in compliance 9*38d50f7bSAndrew Rist * with the License. You may obtain a copy of the License at 10*38d50f7bSAndrew Rist * 11*38d50f7bSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*38d50f7bSAndrew Rist * 13*38d50f7bSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*38d50f7bSAndrew Rist * software distributed under the License is distributed on an 15*38d50f7bSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*38d50f7bSAndrew Rist * KIND, either express or implied. See the License for the 17*38d50f7bSAndrew Rist * specific language governing permissions and limitations 18*38d50f7bSAndrew Rist * under the License. 19*38d50f7bSAndrew Rist * 20*38d50f7bSAndrew Rist *************************************************************/ 21*38d50f7bSAndrew Rist 22*38d50f7bSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef SC_DPSHTTAB_HXX 25cdf0e10cSrcweir #define SC_DPSHTTAB_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include "dptabdat.hxx" 28cdf0e10cSrcweir #include "global.hxx" 29cdf0e10cSrcweir #include "address.hxx" 30cdf0e10cSrcweir #include "scdllapi.h" 31cdf0e10cSrcweir #include "queryparam.hxx" 32cdf0e10cSrcweir 33cdf0e10cSrcweir #include <vector> 34cdf0e10cSrcweir 35cdf0e10cSrcweir namespace com { namespace sun { namespace star { namespace sheet { 36cdf0e10cSrcweir struct DataPilotFieldFilter; 37cdf0e10cSrcweir }}}} 38cdf0e10cSrcweir 39cdf0e10cSrcweir class ScDPDimension; 40cdf0e10cSrcweir // Wang Xu Ming -- 2009-8-17 41cdf0e10cSrcweir // DataPilot Migration - Cache&&Performance 42cdf0e10cSrcweir class ScDPItemData; 43cdf0e10cSrcweir // End Comments 44cdf0e10cSrcweir // -------------------------------------------------------------------- 45cdf0e10cSrcweir // 46cdf0e10cSrcweir // implementation of ScDPTableData with sheet data 47cdf0e10cSrcweir // 48cdf0e10cSrcweir 49cdf0e10cSrcweir struct ScSheetSourceDesc 50cdf0e10cSrcweir { 51cdf0e10cSrcweir ScRange aSourceRange; 52cdf0e10cSrcweir ScQueryParam aQueryParam; 53cdf0e10cSrcweir operator ==ScSheetSourceDesc54cdf0e10cSrcweir sal_Bool operator== ( const ScSheetSourceDesc& rOther ) const 55cdf0e10cSrcweir { return aSourceRange == rOther.aSourceRange && 56cdf0e10cSrcweir aQueryParam == rOther.aQueryParam; } 57cdf0e10cSrcweir // Wang Xu Ming - DataPilot migration 58cdf0e10cSrcweir // Buffer&&Performance 59cdf0e10cSrcweir ScDPTableDataCache* CreateCache( ScDocument* pDoc, long nID = -1) const; 60cdf0e10cSrcweir sal_uLong CheckValidate( ScDocument* pDoc ) const; 61cdf0e10cSrcweir ScDPTableDataCache* GetCache( ScDocument* pDoc, long nID ) const; 62cdf0e10cSrcweir ScDPTableDataCache* GetExistDPObjectCache ( ScDocument* pDoc ) const; 63cdf0e10cSrcweir long GetCacheId( ScDocument* pDoc, long nID ) const; 64cdf0e10cSrcweir 65cdf0e10cSrcweir // End Comments 66cdf0e10cSrcweir }; 67cdf0e10cSrcweir 68cdf0e10cSrcweir class SC_DLLPUBLIC ScSheetDPData : public ScDPTableData 69cdf0e10cSrcweir { 70cdf0e10cSrcweir private: 71cdf0e10cSrcweir ScQueryParam aQuery; 72cdf0e10cSrcweir sal_Bool* pSpecial; 73cdf0e10cSrcweir sal_Bool bIgnoreEmptyRows; 74cdf0e10cSrcweir sal_Bool bRepeatIfEmpty; 75cdf0e10cSrcweir 76cdf0e10cSrcweir ScDPCacheTable aCacheTable; 77cdf0e10cSrcweir 78cdf0e10cSrcweir public: 79cdf0e10cSrcweir // Wang Xu Ming -- 2009-8-17 80cdf0e10cSrcweir // DataPilot Migration - Cache&&Performance 81cdf0e10cSrcweir ScSheetDPData( ScDocument* pD, const ScSheetSourceDesc& rDesc, long nCacheId = -1 ); 82cdf0e10cSrcweir virtual ~ScSheetDPData(); 83cdf0e10cSrcweir // End Comments 84cdf0e10cSrcweir virtual long GetColumnCount(); 85cdf0e10cSrcweir virtual String getDimensionName(long nColumn); 86cdf0e10cSrcweir virtual sal_Bool getIsDataLayoutDimension(long nColumn); 87cdf0e10cSrcweir virtual sal_Bool IsDateDimension(long nDim); 88cdf0e10cSrcweir virtual sal_uLong GetNumberFormat(long nDim); 89cdf0e10cSrcweir virtual void DisposeData(); 90cdf0e10cSrcweir virtual void SetEmptyFlags( sal_Bool bIgnoreEmptyRows, sal_Bool bRepeatIfEmpty ); 91cdf0e10cSrcweir 92cdf0e10cSrcweir virtual bool IsRepeatIfEmpty(); 93cdf0e10cSrcweir 94cdf0e10cSrcweir virtual void CreateCacheTable(); 95cdf0e10cSrcweir virtual void FilterCacheTable(const ::std::vector<ScDPCacheTable::Criterion>& rCriteria, const ::std::hash_set<sal_Int32>& rCatDims); 96cdf0e10cSrcweir virtual void GetDrillDownData(const ::std::vector<ScDPCacheTable::Criterion>& rCriteria, 97cdf0e10cSrcweir const ::std::hash_set<sal_Int32>& rCatDims, 98cdf0e10cSrcweir ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >& rData); 99cdf0e10cSrcweir virtual void CalcResults(CalcInfo& rInfo, bool bAutoShow); 100cdf0e10cSrcweir virtual const ScDPCacheTable& GetCacheTable() const; 101cdf0e10cSrcweir }; 102cdf0e10cSrcweir 103cdf0e10cSrcweir 104cdf0e10cSrcweir 105cdf0e10cSrcweir #endif 106cdf0e10cSrcweir 107