summaryrefslogtreecommitdiff
path: root/sc/source/filter/oox/pivottablebuffer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/filter/oox/pivottablebuffer.cxx')
-rw-r--r--sc/source/filter/oox/pivottablebuffer.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sc/source/filter/oox/pivottablebuffer.cxx b/sc/source/filter/oox/pivottablebuffer.cxx
index cd1025f73abc..e10360a39023 100644
--- a/sc/source/filter/oox/pivottablebuffer.cxx
+++ b/sc/source/filter/oox/pivottablebuffer.cxx
@@ -52,6 +52,7 @@
#include "dpdimsave.hxx"
#include "document.hxx"
#include "documentimport.hxx"
+#include "workbooksettings.hxx"
namespace oox {
namespace xls {
@@ -547,7 +548,10 @@ void PivotTableField::convertPageField( const PTPageFieldModel& rPageField )
{
if( const PivotCacheItem* pSharedItem = pCacheField->getCacheItem( nCacheItem ) )
{
- OUString aSelectedPage = pSharedItem->getName();
+ ScDPObject* pDPObj = mrPivotTable.getDPObject();
+ ScDPSaveData* pSaveData = pDPObj->GetSaveData();
+ ScDPSaveDimension* pDim = pSaveData->GetDimensionByName(pCacheField->getName());
+ OUString aSelectedPage = pSharedItem->getFormattedName(*pDim, pDPObj, DateTime(getWorkbookSettings().getNullDate()));
aPropSet.setProperty( PROP_SelectedPage, aSelectedPage );
}
}
@@ -748,7 +752,7 @@ Reference< XDataPilotField > PivotTableField::convertRowColPageField( sal_Int32
try
{
- ScDPSaveMember* pMem = pDim->GetMemberByName(pSharedItem->getName());
+ ScDPSaveMember* pMem = pDim->GetMemberByName(pSharedItem->getFormattedName(*pDim, pDPObj, DateTime(getWorkbookSettings().getNullDate())));
pMem->SetShowDetails(aIt->mbShowDetails);
pMem->SetIsVisible(!aIt->mbHidden);
}