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
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 12:28:43 -05:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2010-02-12 08:01:35 -06:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 12:28:43 -05:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 12:28:43 -05:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 12:28:43 -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
|
|
|
*
|
2008-04-10 12:28:43 -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
|
|
|
*
|
2008-04-10 12:28:43 -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
|
|
|
|
|
2000-10-19 09:29:41 -05:00
|
|
|
#include <com/sun/star/uno/Reference.hxx>
|
|
|
|
|
2000-09-18 11:07:07 -05:00
|
|
|
#include "dptabdat.hxx"
|
|
|
|
|
2008-05-20 07:05:58 -05:00
|
|
|
#include <vector>
|
2011-02-05 17:56:21 -06:00
|
|
|
#include <boost/unordered_set.hpp>
|
2008-05-20 07:05:58 -05:00
|
|
|
|
|
|
|
class ScDPCacheTable;
|
2008-11-27 09:23:33 -06:00
|
|
|
class ScDocument;
|
2008-05-20 07:05:58 -05:00
|
|
|
|
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;
|
|
|
|
|
2009-12-11 12:37:02 -06:00
|
|
|
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; }
|
|
|
|
|
2010-02-03 10:59:00 -06:00
|
|
|
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:
|
2010-02-03 10:59:00 -06:00
|
|
|
ScDPCacheTable aCacheTable;
|
2000-09-18 11:07:07 -05:00
|
|
|
public:
|
2010-02-03 10:59:00 -06:00
|
|
|
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 );
|
|
|
|
|
2008-05-20 07:05:58 -05:00
|
|
|
virtual void CreateCacheTable();
|
2011-02-05 17:56:21 -06:00
|
|
|
virtual void FilterCacheTable(const ::std::vector<ScDPCacheTable::Criterion>& rCriteria, const ::boost::unordered_set<sal_Int32>& rDataDims);
|
2008-05-20 07:05:58 -05:00
|
|
|
virtual void GetDrillDownData(const ::std::vector<ScDPCacheTable::Criterion>& rCriteria,
|
2011-02-05 17:56:21 -06:00
|
|
|
const ::boost::unordered_set<sal_Int32>& rCatDims,
|
2008-05-20 07:05:58 -05:00
|
|
|
::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: */
|