diff options
author | Eike Rathke <erack@redhat.com> | 2014-09-05 14:52:13 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2014-09-05 14:56:13 +0200 |
commit | 02969a1446fa107813cd138ef4053bed1bedb16b (patch) | |
tree | 3938f0960edc966e7bc6032589d7aa55e93ba1b1 | |
parent | 5bc9fdf51d4ca545371b4e610858b73d076350f6 (diff) |
don't use OSL_FAIL in new code; in this case use assert instead
Change-Id: I67e96a4a394429045655d33825ce77664ff6dc9b
-rw-r--r-- | sc/source/core/tool/reffind.cxx | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/sc/source/core/tool/reffind.cxx b/sc/source/core/tool/reffind.cxx index d109d68e1928..94db172b2447 100644 --- a/sc/source/core/tool/reffind.cxx +++ b/sc/source/core/tool/reffind.cxx @@ -284,14 +284,19 @@ void ScRefFinder::ToggleRel( sal_Int32 nStartPos, sal_Int32 nEndPos ) nSep = aExpr.lastIndexOf('.'); break; } - if( nSep < 0 ) - OSL_FAIL( "Invalid syntax according to address convention." ); - OUString aRef = aExpr.copy(nSep+1); - OUString aExtDocNameTabName = aExpr.copy(0, nSep+1); - nResult = aAddr.Parse(aRef, mpDoc, aDetails); - aAddr.SetTab(0); // force to first tab to avoid error on checking - nFlags = lcl_NextFlags( nResult ); - aExpr = aExtDocNameTabName + aAddr.Format(nFlags, mpDoc, aDetails); + if (nSep < 0) + { + assert(!"Invalid syntax according to address convention."); + } + else + { + OUString aRef = aExpr.copy(nSep+1); + OUString aExtDocNameTabName = aExpr.copy(0, nSep+1); + nResult = aAddr.Parse(aRef, mpDoc, aDetails); + aAddr.SetTab(0); // force to first tab to avoid error on checking + nFlags = lcl_NextFlags( nResult ); + aExpr = aExtDocNameTabName + aAddr.Format(nFlags, mpDoc, aDetails); + } } else { |