[Libreoffice-commits] .: sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Tue Mar 20 21:42:48 PDT 2012
sc/source/filter/excel/xepivot.cxx | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
New commits:
commit aeed13079e9cfd95a25b9b4faac6c95b0b4c8f23
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Wed Mar 21 00:42:15 2012 -0400
Export to xls correct item values for grouped fields.
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index 324f802..df41e8c 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -548,18 +548,22 @@ void XclExpPCField::InsertNumDateGroupItems( const ScDPObject& rDPObj, const ScD
return;
ScSheetDPData aDPData(GetDocPtr(), *pSrcDesc, pCache);
- const std::vector< SCROW > aOrignial = aDPData.GetColumnEntries( static_cast< long >( GetBaseFieldIndex() ) );
+ long nDim = GetFieldIndex();
+ const std::vector< SCROW > aOrignial = aDPData.GetColumnEntries(nDim);
// get the string collection with generated grouping elements
ScDPNumGroupDimension aTmpDim( rNumInfo );
if( nDatePart != 0 )
aTmpDim.MakeDateHelper( rNumInfo, mnFieldIdx, nDatePart );
const std::vector<SCROW>& aMemberIds = aTmpDim.GetNumEntries(
- static_cast<SCCOL>(GetBaseFieldIndex()), aDPData.GetCacheTable().getCache());
+ static_cast<SCCOL>(nDim), pCache);
for ( size_t nIdx = 0 ; nIdx < aMemberIds.size(); nIdx++ )
{
- const ScDPItemData* pData = aDPData.GetMemberById( static_cast< long >( GetBaseFieldIndex() ) , aMemberIds[ nIdx] );
+ const ScDPItemData* pData = aDPData.GetMemberById(nDim , aMemberIds[nIdx]);
if ( pData )
- InsertGroupItem( new XclExpPCItem( pData->GetString() ) );
+ {
+ rtl::OUString aStr = pCache->GetFormattedString(nDim, *pData);
+ InsertGroupItem(new XclExpPCItem(aStr));
+ }
}
}
}
More information about the Libreoffice-commits
mailing list