summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-12-03 20:29:58 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-12-03 20:30:18 +0100
commit179810cdf254177197a3108e970d9555468cd265 (patch)
tree2250c1dc9ed3c637a682e6a30c6cafac945fd133 /unotools
parent9de4fe985349401fda68e8384860b14ef6b071d2 (diff)
Further clean-up
Change-Id: I20049b482c831e4ac2221fddfe80deb9847e72c3
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/config/lingucfg.cxx40
1 files changed, 12 insertions, 28 deletions
diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx
index cd504ec4b4d2..9194c838a79e 100644
--- a/unotools/source/config/lingucfg.cxx
+++ b/unotools/source/config/lingucfg.cxx
@@ -27,7 +27,6 @@
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/container/XNameReplace.hpp>
-#include <rtl/uri.hxx>
#include <rtl/instance.hxx>
#include <osl/mutex.hxx>
#include <i18nlangtag/mslangid.hxx>
@@ -43,8 +42,6 @@
using namespace com::sun::star;
-using ::rtl::Uri;
-
#define FILE_PROTOCOL "file:///"
namespace
@@ -927,33 +924,20 @@ static bool lcl_GetFileUrlFromOrigin(
OUString /*out*/ &rFileUrl,
const OUString &rOrigin )
{
- bool bSuccess = false;
- if (!rOrigin.isEmpty())
+ OUString aURL(
+ comphelper::getExpandedUri(
+ comphelper::getProcessComponentContext(), rOrigin));
+ if (aURL.startsWith( FILE_PROTOCOL ))
{
- OUString aURL( rOrigin );
- if ( aURL.startsWith( "vnd.sun.star.expand:" ) )
- {
- aURL = comphelper::getExpandedUri(
- comphelper::getProcessComponentContext(), aURL);
- bool bIsFileUrl = aURL.startsWith( FILE_PROTOCOL );
- if (bIsFileUrl)
- {
- rFileUrl = aURL;
- bSuccess = true;
- }
- else
- {
- SAL_WARN(
- "unotools.config", "not a file URL, <" << aURL << ">" );
- }
- }
- else
- {
- SAL_WARN(
- "unotools.config", "failed to get file URL, <" << aURL << ">" );
- }
+ rFileUrl = aURL;
+ return true;
+ }
+ else
+ {
+ SAL_WARN(
+ "unotools.config", "not a file URL, <" << aURL << ">" );
+ return false;
}
- return bSuccess;
}
bool SvtLinguConfig::GetDictionaryEntry(