summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-09-21 15:26:50 +0200
committerAndras Timar <andras.timar@collabora.com>2015-10-02 14:58:30 +0200
commitd8b2bac2c962e08684366e8422d52e3c46ba7712 (patch)
tree300858315158d229def45776dbb043f57599d974
parent69caf9c8d2e9eb8a981bfef3c777b8d13a9c321c (diff)
Resolves: rhbz#1264585 check data pilot field name availability
Change-Id: Iaadf7044acb7299ee878de2fbc08992447587d62 (cherry picked from commit f09a91630c767370871389c28b81280807513431) Reviewed-on: https://gerrit.libreoffice.org/18752 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sc/source/filter/excel/xipivot.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx
index 2b48bcb116b0..fbf5995c8fe1 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -1026,13 +1026,19 @@ void XclImpPTField::ConvertDataField( ScDPSaveData& rSaveData ) const
XclPTDataFieldInfoList::const_iterator aIt = maDataInfoList.begin(), aEnd = maDataInfoList.end();
- ScDPSaveDimension& rSaveDim = *rSaveData.GetNewDimensionByName(aFieldName);
- ConvertDataField( rSaveDim, *aIt );
+ ScDPSaveDimension* pSaveDim = rSaveData.GetNewDimensionByName(aFieldName);
+ if (!pSaveDim)
+ {
+ SAL_WARN("sc.filter","XclImpPTField::ConvertDataField - field name not found: " << aFieldName);
+ return;
+ }
+
+ ConvertDataField( *pSaveDim, *aIt );
// multiple data fields -> clone dimension
for( ++aIt; aIt != aEnd; ++aIt )
{
- ScDPSaveDimension& rDupDim = rSaveData.DuplicateDimension( rSaveDim );
+ ScDPSaveDimension& rDupDim = rSaveData.DuplicateDimension( *pSaveDim );
ConvertDataFieldInfo( rDupDim, *aIt );
}
}