diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx index f033a9dbe317..9d7410046a28 100644 --- a/scripting/source/provider/MasterScriptProvider.cxx +++ b/scripting/source/provider/MasterScriptProvider.cxx @@ -51,15 +51,6 @@ using namespace ::sf_misc; namespace func_provider { -static bool endsWith( std::u16string_view target, std::u16string_view item ) -{ - size_t index = target.find( item ); - return index != std::u16string_view::npos && - index == ( target.size() - item.size() ); -} - -/* should be available in some central location. */ - // XScriptProvider implementation @@ -286,7 +277,7 @@ MasterScriptProvider::getScript( const OUString& scriptURI ) if ( ( location == "document" && m_xModel.is() ) - || ( endsWith( m_sCtxString, location ) ) + || ( m_sCtxString == location ) || ( language == "Basic" ) ) {