CWS-TOOLING: integrate CWS kohei02

2009-01-13 16:54:47 +0100 kohei  r266237 : added dpshttab.obj to the list of EXCEPTIONFILES, to remove warning on Solaris.
2009-01-07 03:18:32 +0100 kohei  r265942 : Repeat values only on column, row, and page fields even for drill-down data.  Don't repeat values
on data fields.
2009-01-06 22:23:48 +0100 kohei  r265941 : Don't repeat if empty on data fields.  The "Identify category" option is not supposed to affect
data fields.
2009-01-05 17:42:52 +0100 kohei  r265884 : CWS-TOOLING: rebase CWS kohei02 to trunk@265758 (milestone: DEV300:m38)
2008-12-12 06:10:18 +0100 kohei  r265385 : instantiate string data only when it's visible.
2008-12-12 05:48:20 +0100 kohei  r265384 : when displaying the page field list box, only show visible page field members.
2008-12-11 22:41:11 +0100 kohei  r265375 : #i96689# added a list of German translations for CELL.
2008-12-11 22:24:41 +0100 kohei  r265373 : restored the old keyword file before it got stripped off.
2008-12-11 22:17:05 +0100 kohei  r265371 : #i96591# Honor the hidden members data in page fields.
2008-12-11 21:51:36 +0100 kohei  r265370 : #i96326# fixed pivot cache import that previously failed to import when
the field count is zero.  But when the postponed flag is on, the count 
may be sometimes zero even when the field contains data.
2008-12-11 21:44:44 +0100 kohei  r265369 : #i96171# fix for broken 'Identify Categories' option for grouped fields.
This commit is contained in:
Vladimir Glazounov 2009-01-19 16:17:46 +00:00
parent 601ed6045b
commit 024f0de540
18 changed files with 229 additions and 65 deletions

View file

@ -169,12 +169,12 @@ public:
/** Set filter on/off flag to each row to control visibility. The caller
must ensure that the table is filled before calling this function. */
void filterByPageDimension(const ::std::vector<Criterion>& rCriteria, bool bRepeatIfEmpty = false);
void filterByPageDimension(const ::std::vector<Criterion>& rCriteria, const ::std::hash_set<sal_Int32>& rRepeatIfEmptyDims);
/** Get the cell instance at specified location within the data grid. Note
that the data grid doesn't include the header row. Don't delete the
returned object! */
const ScDPCacheCell* getCell(SCCOL nCol, SCROW nRow, bool bRepeatIfEmpty = false) const;
const ScDPCacheCell* getCell(SCCOL nCol, SCROW nRow, bool bRepeatIfEmpty) const;
const String* getFieldName(sal_Int32 nIndex) const;
@ -193,7 +193,7 @@ public:
a drill-down data table. */
void filterTable(const ::std::vector<Criterion>& rCriteria,
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >& rTabData,
bool bRepeatIfEmpty = false);
const ::std::hash_set<sal_Int32>& rRepeatIfEmptyDims);
void clear();
void swap(ScDPCacheTable& rOther);
@ -205,8 +205,11 @@ private:
/**
* Check if a given row meets all specified criteria.
*
* @param nRow index of row to be tested.
* @param rCriteria a list of criteria
*/
bool isRowQualified(sal_Int32 nRow, const ::std::vector<Criterion>& rCriteria, bool bRepeatIfEmpty) const;
bool isRowQualified(sal_Int32 nRow, const ::std::vector<Criterion>& rCriteria, const ::std::hash_set<sal_Int32>& rRepeatIfEmptyDims) const;
void getValueData(ScDocument* pDoc, const ScAddress& rPos, ScDPCacheCell& rCell);
private:

View file

@ -218,9 +218,12 @@ public:
virtual void DisposeData();
virtual void SetEmptyFlags( BOOL bIgnoreEmptyRows, BOOL bRepeatIfEmpty );
virtual bool IsRepeatIfEmpty();
virtual void CreateCacheTable();
virtual void FilterCacheTable(const ::std::vector<ScDPCacheTable::Criterion>& rCriteria);
virtual void FilterCacheTable(const ::std::vector<ScDPCacheTable::Criterion>& rCriteria, const ::std::hash_set<sal_Int32>& rDataDims);
virtual void GetDrillDownData(const ::std::vector<ScDPCacheTable::Criterion>& rCriteria,
const ::std::hash_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;

View file

@ -82,8 +82,9 @@ public:
virtual void SetEmptyFlags( BOOL bIgnoreEmptyRows, BOOL bRepeatIfEmpty );
virtual void CreateCacheTable();
virtual void FilterCacheTable(const ::std::vector<ScDPCacheTable::Criterion>& rCriteria);
virtual void FilterCacheTable(const ::std::vector<ScDPCacheTable::Criterion>& rCriteria, const ::std::hash_set<sal_Int32>& rDataDims);
virtual void GetDrillDownData(const ::std::vector<ScDPCacheTable::Criterion>& rCriteria,
const ::std::hash_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;

View file

@ -83,8 +83,9 @@ public:
virtual bool IsRepeatIfEmpty();
virtual void CreateCacheTable();
virtual void FilterCacheTable(const ::std::vector<ScDPCacheTable::Criterion>& rCriteria);
virtual void FilterCacheTable(const ::std::vector<ScDPCacheTable::Criterion>& rCriteria, const ::std::hash_set<sal_Int32>& rCatDims);
virtual void GetDrillDownData(const ::std::vector<ScDPCacheTable::Criterion>& rCriteria,
const ::std::hash_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;

View file

@ -40,6 +40,7 @@
#include <vector>
#include <set>
#include <hash_map>
#include <hash_set>
namespace com { namespace sun { namespace star { namespace sheet {
struct DataPilotFieldFilter;
@ -169,8 +170,9 @@ public:
virtual bool IsRepeatIfEmpty();
virtual void CreateCacheTable() = 0;
virtual void FilterCacheTable(const ::std::vector<ScDPCacheTable::Criterion>& rCriteria) = 0;
virtual void FilterCacheTable(const ::std::vector<ScDPCacheTable::Criterion>& rCriteria, const ::std::hash_set<sal_Int32>& rDataDims) = 0;
virtual void GetDrillDownData(const ::std::vector<ScDPCacheTable::Criterion>& rCriteria,
const ::std::hash_set<sal_Int32>& rCatDims,
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >& rData) = 0;
virtual void CalcResults(CalcInfo& rInfo, bool bAutoShow) = 0;
virtual const ScDPCacheTable& GetCacheTable() const = 0;

View file

@ -107,9 +107,6 @@ class ScDPSource : public cppu::WeakImplHelper6<
com::sun::star::beans::XPropertySet,
com::sun::star::lang::XServiceInfo >
{
private:
void FillCalcInfo(bool bIsRow, ScDPTableData::CalcInfo& rInfo, bool &bHasAutoShow);
private:
ScDPTableData* pData; // data source
ScDPDimensions* pDimensions; // api objects
@ -142,6 +139,19 @@ private:
void CreateRes_Impl();
void FillMemberResults();
void FillLevelList( USHORT nOrientation, List& rList );
void FillCalcInfo(bool bIsRow, ScDPTableData::CalcInfo& rInfo, bool &bHasAutoShow);
/**
* Compile a list of dimension indices that are either, column, row or
* page dimensions (i.e. all but data dimensions).
*/
void GetCategoryDimensionIndices(::std::hash_set<sal_Int32>& rCatDims);
/**
* Set visibilities of individual rows in the cache table based on the
* page field data.
*/
void FilterCacheTableByPageDimensions();
void SetDupCount( long nNew );

View file

@ -57,6 +57,7 @@ using ::rtl::OUString;
using ::std::vector;
using ::std::pair;
using ::std::hash_map;
using ::std::hash_set;
using ::std::auto_ptr;
using ::com::sun::star::i18n::LocaleDataItem;
using ::com::sun::star::uno::Exception;
@ -489,7 +490,7 @@ bool ScDPCacheTable::isRowActive(sal_Int32 nRow) const
return maRowsVisible[nRow];
}
void ScDPCacheTable::filterByPageDimension(const vector<Criterion>& rCriteria, bool bRepeatIfEmpty)
void ScDPCacheTable::filterByPageDimension(const vector<Criterion>& rCriteria, const hash_set<sal_Int32>& rRepeatIfEmptyDims)
{
sal_Int32 nRowSize = getRowSize();
if (nRowSize != static_cast<sal_Int32>(maRowsVisible.size()))
@ -499,7 +500,7 @@ void ScDPCacheTable::filterByPageDimension(const vector<Criterion>& rCriteria, b
}
for (sal_Int32 nRow = 0; nRow < nRowSize; ++nRow)
maRowsVisible[nRow] = isRowQualified(nRow, rCriteria, bRepeatIfEmpty);
maRowsVisible[nRow] = isRowQualified(nRow, rCriteria, rRepeatIfEmptyDims);
}
const ScDPCacheCell* ScDPCacheTable::getCell(SCCOL nCol, SCROW nRow, bool bRepeatIfEmpty) const
@ -556,7 +557,8 @@ const TypedScStrCollection& ScDPCacheTable::getFieldEntries(sal_Int32 nIndex) co
return *maFieldEntries[nIndex].get();
}
void ScDPCacheTable::filterTable(const vector<Criterion>& rCriteria, Sequence< Sequence<Any> >& rTabData, bool bRepeatIfEmpty)
void ScDPCacheTable::filterTable(const vector<Criterion>& rCriteria, Sequence< Sequence<Any> >& rTabData,
const hash_set<sal_Int32>& rRepeatIfEmptyDims)
{
sal_Int32 nRowSize = getRowSize();
sal_Int32 nColSize = getColSize();
@ -591,7 +593,7 @@ void ScDPCacheTable::filterTable(const vector<Criterion>& rCriteria, Sequence< S
// This row is filtered out.
continue;
if (!isRowQualified(nRow, rCriteria, bRepeatIfEmpty))
if (!isRowQualified(nRow, rCriteria, rRepeatIfEmptyDims))
continue;
// Insert this row into table.
@ -600,6 +602,7 @@ void ScDPCacheTable::filterTable(const vector<Criterion>& rCriteria, Sequence< S
for (SCCOL nCol = 0; nCol < nColSize; ++nCol)
{
Any any;
bool bRepeatIfEmpty = rRepeatIfEmptyDims.count(nCol) > 0;
const ScDPCacheCell* pCell = getCell(nCol, nRow, bRepeatIfEmpty);
if (!pCell)
{
@ -654,7 +657,8 @@ bool ScDPCacheTable::empty() const
return maTable.empty();
}
bool ScDPCacheTable::isRowQualified(sal_Int32 nRow, const vector<Criterion>& rCriteria, bool bRepeatIfEmpty) const
bool ScDPCacheTable::isRowQualified(sal_Int32 nRow, const vector<Criterion>& rCriteria,
const hash_set<sal_Int32>& rRepeatIfEmptyDims) const
{
sal_Int32 nColSize = getColSize();
vector<Criterion>::const_iterator itrEnd = rCriteria.end();
@ -665,6 +669,8 @@ bool ScDPCacheTable::isRowQualified(sal_Int32 nRow, const vector<Criterion>& rCr
// use this criterion.
continue;
// Check if the 'repeat if empty' flag is set for this field.
bool bRepeatIfEmpty = rRepeatIfEmptyDims.count(itr->mnFieldIndex) > 0;
const ScDPCacheCell* pCell = getCell(static_cast<SCCOL>(itr->mnFieldIndex), nRow, bRepeatIfEmpty);
if (!pCell)
// This should never happen, but just in case...

View file

@ -1133,6 +1133,11 @@ void ScDPGroupTableData::SetEmptyFlags( BOOL bIgnoreEmptyRows, BOOL bRepeatIfEmp
pSourceData->SetEmptyFlags( bIgnoreEmptyRows, bRepeatIfEmpty );
}
bool ScDPGroupTableData::IsRepeatIfEmpty()
{
return pSourceData->IsRepeatIfEmpty();
}
void ScDPGroupTableData::CreateCacheTable()
{
pSourceData->CreateCacheTable();
@ -1240,18 +1245,18 @@ void ScDPGroupTableData::ModifyFilterCriteria(vector<ScDPCacheTable::Criterion>&
rCriteria.swap(aNewCriteria);
}
void ScDPGroupTableData::FilterCacheTable(const vector<ScDPCacheTable::Criterion>& rCriteria)
void ScDPGroupTableData::FilterCacheTable(const vector<ScDPCacheTable::Criterion>& rCriteria, const hash_set<sal_Int32>& rCatDims)
{
vector<ScDPCacheTable::Criterion> aNewCriteria(rCriteria);
ModifyFilterCriteria(aNewCriteria);
pSourceData->FilterCacheTable(aNewCriteria);
pSourceData->FilterCacheTable(aNewCriteria, rCatDims);
}
void ScDPGroupTableData::GetDrillDownData(const vector<ScDPCacheTable::Criterion>& rCriteria, Sequence< Sequence<Any> >& rData)
void ScDPGroupTableData::GetDrillDownData(const vector<ScDPCacheTable::Criterion>& rCriteria, const hash_set<sal_Int32>& rCatDims, Sequence< Sequence<Any> >& rData)
{
vector<ScDPCacheTable::Criterion> aNewCriteria(rCriteria);
ModifyFilterCriteria(aNewCriteria);
pSourceData->GetDrillDownData(aNewCriteria, rData);
pSourceData->GetDrillDownData(aNewCriteria, rCatDims, rData);
}
void ScDPGroupTableData::CalcResults(CalcInfo& rInfo, bool bAutoShow)

View file

@ -56,6 +56,7 @@
#include "scitems.hxx"
#include "unonames.hxx"
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/sheet/GeneralFunction.hpp>
#include <com/sun/star/sheet/DataPilotFieldFilter.hpp>
#include <com/sun/star/sheet/DataPilotFieldOrientation.hpp>
@ -83,6 +84,8 @@ using ::com::sun::star::uno::UNO_QUERY;
using ::com::sun::star::uno::Any;
using ::com::sun::star::sheet::DataPilotTableHeaderData;
using ::com::sun::star::sheet::DataPilotTablePositionData;
using ::com::sun::star::beans::XPropertySet;
using ::rtl::OUString;
// -----------------------------------------------------------------------
@ -835,16 +838,24 @@ void ScDPObject::FillPageList( TypedScStrCollection& rStrings, long nField )
uno::Sequence<rtl::OUString> aNames = xMembers->getElementNames();
long nNameCount = aNames.getLength();
const rtl::OUString* pNameArr = aNames.getConstArray();
for (long nPos=0; nPos<nNameCount; nPos++)
for (long nPos = 0; nPos < nNameCount; ++nPos)
{
TypedStrData* pData = new TypedStrData( pNameArr[nPos] );
// Make sure to insert only visible members.
Reference<XPropertySet> xPropSet(xMembers->getByName(pNameArr[nPos]), UNO_QUERY);
sal_Bool bVisible = false;
if (xPropSet.is())
{
Any any = xPropSet->getPropertyValue(OUString::createFromAscii(SC_UNO_ISVISIBL));
any >>= bVisible;
}
// if ( !rStrings.Insert( pData ) )
// delete pData; // duplicate
// use the order from getElementNames
if ( !rStrings.AtInsert( rStrings.GetCount(), pData ) )
delete pData;
if (bVisible)
{
// use the order from getElementNames
TypedStrData* pData = new TypedStrData( pNameArr[nPos] );
if ( !rStrings.AtInsert( rStrings.GetCount(), pData ) )
delete pData;
}
}
// add "-all-" entry to the top (unsorted)

View file

@ -64,8 +64,8 @@
using namespace com::sun::star;
using ::std::vector;
using ::std::set;
using ::std::hash_map;
using ::std::hash_set;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Any;
@ -293,20 +293,22 @@ void ScDatabaseDPData::CreateCacheTable()
pImpl->aCacheTable.fillTable(pImpl->xRowSet, *pImpl->pFormatter->GetNullDate());
}
void ScDatabaseDPData::FilterCacheTable(const vector<ScDPCacheTable::Criterion>& rCriteria)
void ScDatabaseDPData::FilterCacheTable(const vector<ScDPCacheTable::Criterion>& rCriteria, const hash_set<sal_Int32>& rCatDims)
{
CreateCacheTable();
pImpl->aCacheTable.filterByPageDimension(rCriteria, IsRepeatIfEmpty());
pImpl->aCacheTable.filterByPageDimension(
rCriteria, (IsRepeatIfEmpty() ? rCatDims : hash_set<sal_Int32>()));
}
void ScDatabaseDPData::GetDrillDownData(const vector<ScDPCacheTable::Criterion>& rCriteria, Sequence< Sequence<Any> >& rData)
void ScDatabaseDPData::GetDrillDownData(const vector<ScDPCacheTable::Criterion>& rCriteria, const hash_set<sal_Int32>& rCatDims, Sequence< Sequence<Any> >& rData)
{
CreateCacheTable();
sal_Int32 nRowSize = pImpl->aCacheTable.getRowSize();
if (!nRowSize)
return;
pImpl->aCacheTable.filterTable(rCriteria, rData, IsRepeatIfEmpty());
pImpl->aCacheTable.filterTable(
rCriteria, rData, IsRepeatIfEmpty() ? rCatDims : hash_set<sal_Int32>());
}
void ScDatabaseDPData::CalcResults(CalcInfo& rInfo, bool bAutoShow)

View file

@ -56,8 +56,8 @@ using namespace ::com::sun::star;
using ::com::sun::star::uno::Any;
using ::com::sun::star::uno::Sequence;
using ::std::vector;
using ::std::set;
using ::std::hash_map;
using ::std::hash_set;
// -----------------------------------------------------------------------
@ -269,20 +269,22 @@ void ScSheetDPData::CreateCacheTable()
pImpl->bIgnoreEmptyRows);
}
void ScSheetDPData::FilterCacheTable(const vector<ScDPCacheTable::Criterion>& rCriteria)
void ScSheetDPData::FilterCacheTable(const vector<ScDPCacheTable::Criterion>& rCriteria, const hash_set<sal_Int32>& rCatDims)
{
CreateCacheTable();
pImpl->aCacheTable.filterByPageDimension(rCriteria, IsRepeatIfEmpty());
pImpl->aCacheTable.filterByPageDimension(
rCriteria, (IsRepeatIfEmpty() ? rCatDims : hash_set<sal_Int32>()));
}
void ScSheetDPData::GetDrillDownData(const vector<ScDPCacheTable::Criterion>& rCriteria, Sequence< Sequence<Any> >& rData)
void ScSheetDPData::GetDrillDownData(const vector<ScDPCacheTable::Criterion>& rCriteria, const hash_set<sal_Int32>& rCatDims, Sequence< Sequence<Any> >& rData)
{
CreateCacheTable();
sal_Int32 nRowSize = pImpl->aCacheTable.getRowSize();
if (!nRowSize)
return;
pImpl->aCacheTable.filterTable(rCriteria, rData, IsRepeatIfEmpty());
pImpl->aCacheTable.filterTable(
rCriteria, rData, IsRepeatIfEmpty() ? rCatDims : hash_set<sal_Int32>());
}
void ScSheetDPData::CalcResults(CalcInfo& rInfo, bool bAutoShow)

View file

@ -247,7 +247,7 @@ void ScDPTableData::FillRowDataFromCacheTable(sal_Int32 nRow, const ScDPCacheTab
rData.aValues.push_back( ScDPValueData() );
ScDPValueData& rVal = rData.aValues.back();
const ScDPCacheCell* pCell = rCacheTable.getCell(
static_cast<SCCOL>(nDim), static_cast<SCROW>(nRow));
static_cast<SCCOL>(nDim), static_cast<SCROW>(nRow), false);
if (pCell)
{
rVal.fValue = pCell->mbNumeric ? pCell->mfValue : 0.0;

View file

@ -40,6 +40,7 @@
#include <vector>
#include <set>
#include <hash_map>
#include <hash_set>
#include <tools/debug.hxx>
#include <rtl/math.hxx>
@ -79,6 +80,7 @@ using namespace com::sun::star;
using ::std::vector;
using ::std::set;
using ::std::hash_map;
using ::std::hash_set;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Any;
@ -470,7 +472,9 @@ Sequence< Sequence<Any> > SAL_CALL ScDPSource::getDrillDownData(const Sequence<s
aResVisData.fillFieldFilters(aFilterCriteria);
Sequence< Sequence<Any> > aTabData;
pData->GetDrillDownData(aFilterCriteria, aTabData);
hash_set<sal_Int32> aCatDims;
GetCategoryDimensionIndices(aCatDims);
pData->GetDrillDownData(aFilterCriteria, aCatDims, aTabData);
return aTabData;
}
@ -685,6 +689,86 @@ void ScDPSource::FillCalcInfo(bool bIsRow, ScDPTableData::CalcInfo& rInfo, bool
}
}
void ScDPSource::GetCategoryDimensionIndices(hash_set<sal_Int32>& rCatDims)
{
hash_set<sal_Int32> aCatDims;
for (long i = 0; i < nColDimCount; ++i)
{
sal_Int32 nDim = static_cast<sal_Int32>(nColDims[i]);
if (!IsDataLayoutDimension(nDim))
aCatDims.insert(nDim);
}
for (long i = 0; i < nRowDimCount; ++i)
{
sal_Int32 nDim = static_cast<sal_Int32>(nRowDims[i]);
if (!IsDataLayoutDimension(nDim))
aCatDims.insert(nDim);
}
for (long i = 0; i < nPageDimCount; ++i)
{
sal_Int32 nDim = static_cast<sal_Int32>(nPageDims[i]);
if (!IsDataLayoutDimension(nDim))
aCatDims.insert(nDim);
}
rCatDims.swap(aCatDims);
}
void ScDPSource::FilterCacheTableByPageDimensions()
{
ScSimpleSharedString& rSharedString = GetData()->GetSharedString();
// filter table by page dimensions.
vector<ScDPCacheTable::Criterion> aCriteria;
for (long i = 0; i < nPageDimCount; ++i)
{
ScDPDimension* pDim = GetDimensionsObject()->getByIndex(nPageDims[i]);
long nField = pDim->GetDimension();
ScDPMembers* pMems = pDim->GetHierarchiesObject()->getByIndex(0)->
GetLevelsObject()->getByIndex(0)->GetMembersObject();
long nMemCount = pMems->getCount();
ScDPCacheTable::Criterion aFilter;
aFilter.mnFieldIndex = static_cast<sal_Int32>(nField);
aFilter.mpFilter.reset(new ScDPCacheTable::GroupFilter(rSharedString));
ScDPCacheTable::GroupFilter* pGrpFilter =
static_cast<ScDPCacheTable::GroupFilter*>(aFilter.mpFilter.get());
for (long j = 0; j < nMemCount; ++j)
{
ScDPMember* pMem = pMems->getByIndex(j);
if (pMem->getIsVisible())
{
ScDPItemData aData;
pMem->FillItemData(aData);
pGrpFilter->addMatchItem(aData.aString, aData.fValue, aData.bHasValue);
}
}
if (pGrpFilter->getMatchItemCount() < static_cast<size_t>(nMemCount))
// there is at least one invisible item. Add this filter criterion to the mix.
aCriteria.push_back(aFilter);
if (!pDim || !pDim->HasSelectedPage())
continue;
const ScDPItemData& rData = pDim->GetSelectedData();
aCriteria.push_back(ScDPCacheTable::Criterion());
ScDPCacheTable::Criterion& r = aCriteria.back();
r.mnFieldIndex = static_cast<sal_Int32>(nField);
sal_Int32 nStrId = rSharedString.getStringId(rData.aString);
r.mpFilter.reset(
new ScDPCacheTable::SingleFilter(rSharedString, nStrId, rData.fValue, rData.bHasValue));
}
if (!aCriteria.empty())
{
hash_set<sal_Int32> aCatDims;
GetCategoryDimensionIndices(aCatDims);
pData->FilterCacheTable(aCriteria, aCatDims);
}
}
void ScDPSource::CreateRes_Impl()
{
if ( !pResData )
@ -850,29 +934,8 @@ void ScDPSource::CreateRes_Impl()
}
else
{
{
ScSimpleSharedString& rSharedString = GetData()->GetSharedString();
FilterCacheTableByPageDimensions();
// filter table by page dimensions.
vector<ScDPCacheTable::Criterion> aCriteria;
for (i = 0; i < nPageDimCount; ++i)
{
ScDPDimension* pDim = GetDimensionsObject()->getByIndex(nPageDims[i]);
if (!pDim || !pDim->HasSelectedPage())
continue;
long nField = pDim->GetDimension();
const ScDPItemData& rData = pDim->GetSelectedData();
aCriteria.push_back(ScDPCacheTable::Criterion());
ScDPCacheTable::Criterion& r = aCriteria.back();
r.mnFieldIndex = static_cast<sal_Int32>(nField);
sal_Int32 nStrId = rSharedString.getStringId(rData.aString);
r.mpFilter.reset(
new ScDPCacheTable::SingleFilter(rSharedString, nStrId, rData.fValue, rData.bHasValue));
}
if (!aCriteria.empty())
pData->FilterCacheTable(aCriteria);
}
aInfo.aPageDims.reserve(nPageDimCount);
for (i = 0; i < nPageDimCount; ++i)
aInfo.aPageDims.push_back(nPageDims[i]);

View file

@ -121,6 +121,7 @@ EXCEPTIONSFILES= \
$(SLO)$/document.obj \
$(SLO)$/dpdimsave.obj \
$(SLO)$/dpgroup.obj \
$(SLO)$/dpshttab.obj \
$(SLO)$/dptabres.obj \
$(SLO)$/dptabdat.obj \
$(SLO)$/global2.obj \

View file

@ -124,3 +124,58 @@ static const TransItem pHu[] = {
};
addToMap(pHu, aHu);
// ---------------------------------------------------------------------------
// German language locale (automatically generated)
// ---------------------------------------------------------------------------
static const Locale aDe(OUString::createFromAscii("de"), OUString(), OUString());
// pre instantiations of localized function names
static const sal_Unicode cell_row_de[] = {
0x005A, 0x0045, 0x0049, 0x004C, 0x0045, 0x0000};
static const sal_Unicode cell_col_de[] = {
0x0053, 0x0050, 0x0041, 0x004C, 0x0054, 0x0045, 0x0000};
static const sal_Unicode cell_width_de[] = {
0x0042, 0x0052, 0x0045, 0x0049, 0x0054, 0x0045, 0x0000};
static const sal_Unicode cell_address_de[] = {
0x0041, 0x0044, 0x0052, 0x0045, 0x0053, 0x0053, 0x0045, 0x0000};
static const sal_Unicode cell_filename_de[] = {
0x0044, 0x0041, 0x0054, 0x0045, 0x0049, 0x004E, 0x0041, 0x004D, 0x0045, 0x0000};
static const sal_Unicode cell_color_de[] = {
0x0046, 0x0041, 0x0052, 0x0042, 0x0045, 0x0000};
static const sal_Unicode cell_format_de[] = {
0x0046, 0x004F, 0x0052, 0x004D, 0x0041, 0x0054, 0x0000};
static const sal_Unicode cell_contents_de[] = {
0x0049, 0x004E, 0x0048, 0x0041, 0x004C, 0x0054, 0x0000};
static const sal_Unicode cell_parentheses_de[] = {
0x004B, 0x004C, 0x0041, 0x004D, 0x004D, 0x0045, 0x0052, 0x004E, 0x0000};
static const sal_Unicode cell_protect_de[] = {
0x0053, 0x0043, 0x0048, 0x0055, 0x0054, 0x005A, 0x0000};
static const sal_Unicode cell_type_de[] = {
0x0054, 0x0059, 0x0050, 0x0000};
static const sal_Unicode cell_prefix_de[] = {
0x0050, 0x0052, 0x00C4, 0x0046, 0x0049, 0x0058, 0x0000};
static const sal_Unicode cell_sheet_de[] = {
0x0042, 0x004C, 0x0041, 0x0054, 0x0054, 0x0000};
static const sal_Unicode cell_coord_de[] = {
0x004B, 0x004F, 0x004F, 0x0052, 0x0044, 0x0000};
static const TransItem pDe[] = {
{cell_row_de, "ROW", ocCell},
{cell_col_de, "COL", ocCell},
{cell_width_de, "WIDTH", ocCell},
{cell_address_de, "ADDRESS", ocCell},
{cell_filename_de, "FILENAME", ocCell},
{cell_color_de, "COLOR", ocCell},
{cell_format_de, "FORMAT", ocCell},
{cell_contents_de, "CONTENTS", ocCell},
{cell_parentheses_de, "PARENTHESES", ocCell},
{cell_protect_de, "PROTECT", ocCell},
{cell_type_de, "TYPE", ocCell},
{cell_prefix_de, "PREFIX", ocCell},
{cell_sheet_de, "SHEET", ocCell},
{cell_coord_de, "COORD", ocCell},
{NULL, NULL, ocNone}
};
addToMap(pDe, aDe);

View file

@ -286,9 +286,8 @@ void XclImpPCField::ReadSxfield( XclImpStream& rStrm )
// for now, ignore data type of calculated fields
DBG_ASSERT( bCalced || bType || bTypeNone, "XclImpPCField::ReadSxfield - unknown item data type" );
if( nVisC > 0 )
if( nVisC > 0 || bPostp )
{
DBG_ASSERT( !bItems || !bPostp, "XclImpPCField::ReadSxfield - postponed field with inline items" );
if( bItems && !bPostp )
{
if( !bCalced )

View file

@ -32,7 +32,7 @@
import sys
localeNames = {'fr': 'French', 'hu': 'Hungarian'}
localeNames = {'fr': 'French', 'hu': 'Hungarian', 'de': 'German'}
def getLocaleName (code):
global localeNames
if localeNames.has_key(code):