From 7ee79a963f9f0e75b158425755ae7d40cc3469c0 Mon Sep 17 00:00:00 2001 From: Oliver Bolte Date: Mon, 18 Apr 2005 10:46:57 +0000 Subject: [PATCH] INTEGRATION: CWS fwkfinal8 (1.16.8); FILE MERGED 2005/04/06 15:26:46 tbe 1.16.8.1: #i42647# Badly Viewed Filenames for the Macro Assignments Saving in Customize Dialog --- .../source/provider/MasterScriptProvider.cxx | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx index 2df5929a8fbd..7e9fdba0e8e6 100755 --- a/scripting/source/provider/MasterScriptProvider.cxx +++ b/scripting/source/provider/MasterScriptProvider.cxx @@ -2,9 +2,9 @@ * * $RCSfile: MasterScriptProvider.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: kz $ $Date: 2005-03-04 09:17:51 $ + * last change: $Author: obo $ $Date: 2005-04-18 11:46:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -527,15 +527,9 @@ MasterScriptProvider::parseLocationName( const ::rtl::OUString& location ) // strip out the last leaf of location name // e.g. file://dir1/dir2/Blah.sxw - > Blah.sxw ::rtl::OUString temp = location; - sal_Int32 lastSlashIndex = temp.lastIndexOf( ::rtl::OUString::createFromAscii( "/" ) ); - - if ( lastSlashIndex > -1 ) - { - if ( ( lastSlashIndex + 1 ) < temp.getLength() ) - { - temp = temp.copy( lastSlashIndex + 1 ); - } - } + INetURLObject aURLObj( temp ); + if ( !aURLObj.HasError() ) + temp = aURLObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ); return temp; }