sc/source/filter/excel/xipivot.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
New commits: commit 24db3ec37d974402c0d3ce476c3aeffcff327ad7 Author: Eike Rathke <er...@redhat.com> Date: Mon Sep 21 15:26:50 2015 +0200 Resolves: rhbz#1264585 check data pilot field name availability Change-Id: Iaadf7044acb7299ee878de2fbc08992447587d62 (cherry picked from commit f09a91630c767370871389c28b81280807513431) Reviewed-on: https://gerrit.libreoffice.org/18751 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx index 48fe3b3..92bad1d 100644 --- a/sc/source/filter/excel/xipivot.cxx +++ b/sc/source/filter/excel/xipivot.cxx @@ -1031,13 +1031,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 ); } }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits