Kaydet (Commit) 4703758a authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Removed unused.

üst 3507f0f0
...@@ -169,7 +169,6 @@ private: ...@@ -169,7 +169,6 @@ private:
void PostInit(); void PostInit();
void Clear(); void Clear();
void AddLabel(const rtl::OUString& rLabel); void AddLabel(const rtl::OUString& rLabel);
bool AddData(long nDim, const ScDPItemData& rData, sal_uLong nNumFormat);
const GroupItems* GetGroupItems(long nDim) const; const GroupItems* GetGroupItems(long nDim) const;
}; };
......
...@@ -64,44 +64,6 @@ using ::com::sun::star::uno::UNO_QUERY_THROW; ...@@ -64,44 +64,6 @@ using ::com::sun::star::uno::UNO_QUERY_THROW;
namespace { namespace {
/**
* Search for an item in the data array. If it's in the array, return its
* index to the caller.
*
* @param rArray dimension array
* @param rOrder global order (what's this?)
* @param item item to search for
* @param rIndex the index of the found item in the global order.
*
* @return true if the item is found, or false otherwise.
*/
bool hasItemInDimension(const ScDPCache::ItemsType& rArray, const ScDPCache::IndexArrayType& rOrder, const ScDPItemData& rItem, SCROW& rIndex)
{
rIndex = rArray.size();
bool bFound = false;
SCROW nLo = 0;
SCROW nHi = rArray.size() - 1;
long nCompare;
while (nLo <= nHi)
{
SCROW nIndex = (nLo + nHi) / 2;
nCompare = ScDPItemData::Compare(rArray[rOrder[nIndex]], rItem);
if (nCompare < 0)
nLo = nIndex + 1;
else
{
nHi = nIndex - 1;
if (nCompare == 0)
{
bFound = true;
nLo = nIndex;
}
}
}
rIndex = nLo;
return bFound;
}
void getItemValue( void getItemValue(
ScDPItemData& rData, const Reference<sdbc::XRow>& xRow, sal_Int32 nType, ScDPItemData& rData, const Reference<sdbc::XRow>& xRow, sal_Int32 nType,
long nCol, const Date& rNullDate, short& rNumType) long nCol, const Date& rNullDate, short& rNumType)
...@@ -755,35 +717,6 @@ bool ScDPCache::IsRowEmpty(SCROW nRow) const ...@@ -755,35 +717,6 @@ bool ScDPCache::IsRowEmpty(SCROW nRow) const
return bEmpty; return bEmpty;
} }
bool ScDPCache::AddData(long nDim, const ScDPItemData& rData, sal_uLong nNumFormat)
{
OSL_ENSURE( nDim < mnColumnCount && nDim >=0 , "dimension out of bound" );
SCROW nIndex = 0;
Field& rField = maFields[nDim];
if (!hasItemInDimension(rField.maItems, rField.maGlobalOrder, rData, nIndex))
{
// This item doesn't exist in the dimension array yet.
rField.maItems.push_back(rData);
rField.maGlobalOrder.insert(
rField.maGlobalOrder.begin()+nIndex, rField.maItems.size()-1);
OSL_ENSURE(rField.maGlobalOrder[nIndex] == sal::static_int_cast<SCROW>(rField.maItems.size())-1, "ScDPTableDataCache::AddData ");
rField.maData.push_back(rField.maItems.size()-1);
}
else
rField.maData.push_back(rField.maGlobalOrder[nIndex]);
size_t nCurRow = maFields[nDim].maData.size() - 1;
if (!rData.IsEmpty())
{
maEmptyRows.insert_back(nCurRow, nCurRow+1, false);
rField.mnNumFormat = nNumFormat;
}
return true;
}
const ScDPCache::GroupItems* ScDPCache::GetGroupItems(long nDim) const const ScDPCache::GroupItems* ScDPCache::GetGroupItems(long nDim) const
{ {
if (nDim < 0) if (nDim < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment