office-gobmx/sc/inc/dpsdbtab.hxx

97 lines
3.7 KiB
C++
Raw Normal View History

2010-10-27 06:43:08 -05:00
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2000-09-18 11:07:07 -05:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2000-09-18 11:07:07 -05:00
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
2000-09-18 11:07:07 -05:00
*
* OpenOffice.org - a multi-platform office productivity suite
2000-09-18 11:07:07 -05:00
*
* This file is part of OpenOffice.org.
2000-09-18 11:07:07 -05:00
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
2000-09-18 11:07:07 -05:00
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
2000-09-18 11:07:07 -05:00
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
2000-09-18 11:07:07 -05:00
*
************************************************************************/
#ifndef SC_DPSDBTAB_HXX
#define SC_DPSDBTAB_HXX
#include <com/sun/star/uno/Reference.hxx>
2000-09-18 11:07:07 -05:00
#include "dptabdat.hxx"
#include <vector>
#include <boost/unordered_set.hpp>
class ScDPCacheTable;
CWS-TOOLING: integrate CWS koheidatapilot02 2008-11-24 15:34:25 +0100 kohei r264231 : modified ScViewData::IsMultiMarked() to treat simple-filtered areas as simple-marked areas, for backword compatibility. Simple-filtered areas are not multi-marked areas. 2008-11-07 20:38:51 +0100 kohei r263485 : more unused methods in the header without definitions. 2008-11-07 20:26:25 +0100 kohei r263484 : removed more unused methods. 2008-11-07 19:40:39 +0100 kohei r263481 : removed unused methods based on Caolan's callcatcher output on m35. 2008-11-06 19:32:22 +0100 kohei r263405 : CWS-TOOLING: rebase CWS koheidatapilot02 to trunk@263288 (milestone: DEV300:m35) 2008-10-06 15:18:57 +0200 kohei r262062 : #i94619# allow XDataPilotTable interface to be queried again. Patch submitted by Noel Power. 2008-10-01 21:49:39 +0200 kohei r262020 : #i90402# don't insert drill-down sheet when the document is in read-only mode. 2008-10-01 03:03:19 +0200 kohei r261982 : #i93918# exclude hidden items and items that are excluded due to ranks (i.e. top X items). #i93998# reduce memory consumption of datapilot cache tables by pooling cache table cell data & use null pointers to represent empty cells. 2008-09-30 23:35:14 +0200 kohei r261981 : #i92378# keep the layout dialog open when the destination range is not empty and the user has decided to cancel data pilot creation. 2008-09-30 23:14:55 +0200 kohei r261980 : #i94281# fixed a regression where the data pilot layout dialog fails to appear on a filtered cell range.
2008-11-27 09:23:33 -06:00
class ScDocument;
2000-09-18 11:07:07 -05:00
// --------------------------------------------------------------------
//
// implementation of ScDPTableData with database data
//
struct ScImportSourceDesc
{
String aDBName;
String aObject;
USHORT nType; // enum DataImportMode
BOOL bNative;
ScImportSourceDesc() : nType(0), bNative(FALSE) {}
2000-09-18 11:07:07 -05:00
BOOL operator== ( const ScImportSourceDesc& rOther ) const
{ return aDBName == rOther.aDBName &&
aObject == rOther.aObject &&
nType == rOther.nType &&
bNative == rOther.bNative; }
ScDPTableDataCache* GetExistDPObjectCache( ScDocument* pDoc ) const;
ScDPTableDataCache* CreateCache( ScDocument* pDoc , long nID ) const;
ScDPTableDataCache* GetCache( ScDocument* pDoc, long nID ) const;
long GetCacheId( ScDocument* pDoc, long nID ) const;
};
2000-09-18 11:07:07 -05:00
class ScDatabaseDPData : public ScDPTableData
{
private:
ScDPCacheTable aCacheTable;
2000-09-18 11:07:07 -05:00
public:
ScDatabaseDPData(ScDocument* pDoc, const ScImportSourceDesc& rImport, long nCacheId = -1);
2000-09-18 11:07:07 -05:00
virtual ~ScDatabaseDPData();
virtual long GetColumnCount();
virtual String getDimensionName(long nColumn);
virtual BOOL getIsDataLayoutDimension(long nColumn);
virtual BOOL IsDateDimension(long nDim);
virtual void DisposeData();
virtual void SetEmptyFlags( BOOL bIgnoreEmptyRows, BOOL bRepeatIfEmpty );
virtual void CreateCacheTable();
virtual void FilterCacheTable(const ::std::vector<ScDPCacheTable::Criterion>& rCriteria, const ::boost::unordered_set<sal_Int32>& rDataDims);
virtual void GetDrillDownData(const ::std::vector<ScDPCacheTable::Criterion>& rCriteria,
const ::boost::unordered_set<sal_Int32>& rCatDims,
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >& rData);
virtual void CalcResults(CalcInfo& rInfo, bool bAutoShow);
virtual const ScDPCacheTable& GetCacheTable() const;
2000-09-18 11:07:07 -05:00
};
#endif
2010-10-27 06:43:08 -05:00
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */