From 59b1f948f1cee157bf7fc8adad57f678406c904b Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Thu, 20 Oct 2011 19:14:20 +0200 Subject: increment table position correctly if more than one table is inserted --- sc/source/core/data/cell2.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sc/source') diff --git a/sc/source/core/data/cell2.cxx b/sc/source/core/data/cell2.cxx index c2200622a53b..28fb6348ebc8 100644 --- a/sc/source/core/data/cell2.cxx +++ b/sc/source/core/data/cell2.cxx @@ -1156,7 +1156,7 @@ void ScFormulaCell::UpdateInsertTab(SCTAB nTable, SCTAB nNewSheets) EndListeningTo( pDocument ); // IncTab _nach_ EndListeningTo und _vor_ Compiler UpdateInsertTab ! if ( bPosChanged ) - aPos.IncTab(); + aPos.IncTab(nNewSheets); ScRangeData* pRangeData; ScCompiler aComp(pDocument, aPos, *pCode); aComp.SetGrammar(pDocument->GetGrammar()); -- cgit