summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorVishv Brahmbhatt <vishvbrahmbhatt19@gmail.com>2013-09-13 01:01:52 +0530
committerStephan Bergmann <sbergman@redhat.com>2014-12-03 20:30:18 +0100
commit9de4fe985349401fda68e8384860b14ef6b071d2 (patch)
tree2e8618c1881635aa19262e292a8b6c6e69d1fba8 /basic
parent5d8001c801efeed3dced312862d667d650b5dbfa (diff)
Code clean-up/consolidation task.
Removing the duplicate code,and consolidating changes by using method "getExpandedFilePath" of comphelper. Signed-off-by: Stephan Bergmann <sbergman@redhat.com>: adapted to recent change from comphelper::getExpandedFilePath to comphelper::getExpandedUri; fixed the two changes in framework to actually modify the by--non-const--ref argument; fixed a loplugin:unreffun. More clean-up to follow. Change-Id: Ie8875bcb61b616385bd64151f0a915bf7cce04e5
Diffstat (limited to 'basic')
-rw-r--r--basic/source/uno/namecont.cxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index da1ec5a6506a..09fc0e63ec06 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -33,6 +33,7 @@
#include <rtl/ustring.hxx>
#include <rtl/uri.hxx>
#include <rtl/strbuf.hxx>
+#include <comphelper/getexpandeduri.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/anytostring.hxx>
@@ -2892,13 +2893,8 @@ OUString SfxLibraryContainer::expand_url( const OUString& url )
{
return url;
}
- // cut protocol
- OUString macro( url.copy( sizeof (EXPAND_PROTOCOL ":") -1 ) );
- // decode uric class chars
- macro = Uri::decode( macro, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
- // expand macro string
- OUString ret( mxMacroExpander->expandMacros( macro ) );
- return ret;
+
+ return comphelper::getExpandedUri(mxContext, url);
}
else if( mxStringSubstitution.is() )
{