From 1f56cb61e2b991d2e9c7a639ec3b2f2994f93888 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 6 Jan 2017 10:01:05 +0100 Subject: This apparently doesn't happen The code has been like this ever since ed8c4fd992a4e2e43e65d05e6f06336bfe2fdba2 "INTEGRATION: CWS eforms2", but it doesn't make sense: It apparently wants to clear XCurrent to leave the for-loop early, but would acutally cause a null deref instead. So this branch apparently doesn't get executed routinely. Is it impossible to be reached? To play it safe, assume no. But I can't find anything substantiating the "we'll remove the slash below" claim, so just return an empty string instead. Change-Id: I18e05385bbef05e7682a2eb4d525cfee25d9a6f5 --- forms/source/xforms/model_ui.cxx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'forms/source') diff --git a/forms/source/xforms/model_ui.cxx b/forms/source/xforms/model_ui.cxx index 80442cc91ee6..fa4be64f2e54 100644 --- a/forms/source/xforms/model_ui.cxx +++ b/forms/source/xforms/model_ui.cxx @@ -241,11 +241,7 @@ OUString Model::getDefaultBindingExpressionForNode( default: // unknown type? fail! OSL_FAIL( "unknown node type!" ); - xCurrent.set( nullptr ); - aBuffer.setLength(0); - // we'll remove the slash below - aBuffer.insert( 0, '/' ); - break; + return OUString(); } } -- cgit