From 8474c5f14966c9268f92499870feb3c3d21658b3 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Mon, 2 May 2016 19:52:23 +0200 Subject: silence ScTableRefToken::GetSheet() SAL_WARN about unhandled Change-Id: I539bad573bfc459103acc0cb0227bad7681b79aa --- sc/source/core/data/formulacell.cxx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'sc') diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 57a7e647043c..fefde27b1269 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -3908,8 +3908,20 @@ ScFormulaCell::CompareState ScFormulaCell::CompareByTokenArray( ScFormulaCell& r // different OpCode values. case formula::svIndex: { - if (pThisTok->GetIndex() != pOtherTok->GetIndex() || pThisTok->GetSheet() != pOtherTok->GetSheet()) + if (pThisTok->GetIndex() != pOtherTok->GetIndex()) return NotEqual; + switch (pThisTok->GetOpCode()) + { + case ocTableRef: + // nothing, sheet value assumed as -1, silence + // ScTableRefToken::GetSheet() SAL_WARN about + // unhandled + ; + break; + default: // ocName, ocDBArea + if (pThisTok->GetSheet() != pOtherTok->GetSheet()) + return NotEqual; + } } break; default: -- cgit