summaryrefslogtreecommitdiff
path: root/cui
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 /cui
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 'cui')
-rw-r--r--cui/source/options/treeopt.cxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 92ed59b1d052..dc0c16915a7e 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -67,6 +67,7 @@
#include <com/sun/star/linguistic2/LinguProperties.hpp>
#include <com/sun/star/util/theMacroExpander.hpp>
#include <com/sun/star/setup/UpdateCheck.hpp>
+#include <comphelper/getexpandeduri.hxx>
#include <comphelper/processfactory.hxx>
#include <editeng/langitem.hxx>
#include <editeng/optitems.hxx>
@@ -854,13 +855,8 @@ void OfaTreeOptionsDialog::ActivateLastSelection()
&& !sPageURL.isEmpty()
&& sPageURL.startsWith( sExpand ) )
{
- // cut protocol
- OUString sTemp( sPageURL.copy( sExpand.getLength() ) );
- // decode uri class chars
- sTemp = ::rtl::Uri::decode(
- sTemp, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
- // expand string
- sPageURL = xMacroExpander->expandMacros( sTemp );
+ sPageURL = comphelper::getExpandedUri(
+ comphelper::getProcessComponentContext(), sPageURL);
}
if ( ( !bIsFromExtensionManager