diff options
author | Eike Rathke <erack@redhat.com> | 2015-04-08 13:07:02 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-04-08 20:45:46 +0200 |
commit | a01356af7f53b1cfa648ac3085f9a78cb6de4e0e (patch) | |
tree | 9f9c60365a7a8fbe4d2548cd944343abd57856d5 /sc/source | |
parent | 54d35353ed76f3c84c9d9eaac4d762da484c5c25 (diff) |
TableRef: set errNoRef is there is no resulting range
Change-Id: I19ec176abf3291b2d4ad5baff06f66518680b378
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index a561b05ad297..7295dccd1b4e 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -4818,11 +4818,7 @@ bool ScCompiler::HandleTableRef() if (pDBData->HasTotals()) aRange.aEnd.IncRow(-1); if (aRange.aEnd.Row() < aRange.aStart.Row()) - { - /* TODO: add RefData with deleted rows to generate - * #REF! error? */ bAddRange = false; - } bForwardToClose = true; } break; @@ -4840,11 +4836,7 @@ bool ScCompiler::HandleTableRef() if (pDBData->HasHeader()) aRange.aStart.IncRow(); if (aRange.aEnd.Row() < aRange.aStart.Row()) - { - /* TODO: add RefData with deleted rows to generate - * #REF! error? */ bAddRange = false; - } bForwardToClose = true; } break; @@ -4856,11 +4848,7 @@ bool ScCompiler::HandleTableRef() aRange.aEnd.SetRow( aPos.Row()); } else - { - /* TODO: add RefData with deleted rows to generate - * #REF! error? */ bAddRange = false; - } bForwardToClose = true; } break; @@ -4872,6 +4860,10 @@ bool ScCompiler::HandleTableRef() aRefData.SetRange( aRange, aPos); pNew->AddDoubleReference( aRefData ); } + else + { + SetError( errNoRef); + } if (bForwardToClose) { while ((bGotToken = GetToken()) && mpToken->GetOpCode() != ocTableRefClose) |