[Libreoffice-commits] core.git: sc/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Fri Feb 9 06:30:55 UTC 2018
sc/source/core/data/document.cxx | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
New commits:
commit cdc44358a5a2530eb2c8bb6beb90b00cc8c1b6cb
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Thu Feb 8 01:13:56 2018 +0100
always check whether pChartListenerCollection is not a nullptr
Change-Id: Ibe3ade28884b4e1264cd5a5a68a8e428ee3d9a48
Reviewed-on: https://gerrit.libreoffice.org/49454
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 7d1f821de849..7ebdb404d7e8 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -764,7 +764,8 @@ bool ScDocument::DeleteTab( SCTAB nTab )
SetAllFormulasDirty(aFormulaDirtyCxt);
}
// sheet names of references are not valid until sheet is deleted
- pChartListenerCollection->UpdateScheduledSeriesRanges();
+ if (pChartListenerCollection)
+ pChartListenerCollection->UpdateScheduledSeriesRanges();
if (comphelper::LibreOfficeKit::isActive())
{
@@ -864,7 +865,8 @@ bool ScDocument::DeleteTabs( SCTAB nTab, SCTAB nSheets )
SetAllFormulasDirty(aFormulaDirtyCxt);
}
// sheet names of references are not valid until sheet is deleted
- pChartListenerCollection->UpdateScheduledSeriesRanges();
+ if (pChartListenerCollection)
+ pChartListenerCollection->UpdateScheduledSeriesRanges();
if (comphelper::LibreOfficeKit::isActive())
{
@@ -1367,7 +1369,7 @@ bool ScDocument::InsertRow( SCCOL nStartCol, SCTAB nStartTab,
bRet = true;
}
SetAutoCalc( bOldAutoCalc );
- if ( bRet )
+ if ( bRet && pChartListenerCollection )
pChartListenerCollection->UpdateDirtyCharts();
return bRet;
}
@@ -1475,7 +1477,8 @@ void ScDocument::DeleteRow( SCCOL nStartCol, SCTAB nStartTab,
std::for_each(maTabs.begin(), maTabs.end(), BroadcastRecalcOnRefMoveHandler( this));
}
- pChartListenerCollection->UpdateDirtyCharts();
+ if (pChartListenerCollection)
+ pChartListenerCollection->UpdateDirtyCharts();
}
void ScDocument::DeleteRow( const ScRange& rRange )
@@ -1676,7 +1679,8 @@ void ScDocument::DeleteCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTA
std::for_each(maTabs.begin(), maTabs.end(), BroadcastRecalcOnRefMoveHandler( this));
}
- pChartListenerCollection->UpdateDirtyCharts();
+ if (pChartListenerCollection)
+ pChartListenerCollection->UpdateDirtyCharts();
}
void ScDocument::DeleteCol( const ScRange& rRange )
More information about the Libreoffice-commits
mailing list