diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2011-10-18 23:05:58 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2011-10-18 23:10:56 +0200 |
commit | bf1f0183d5c6b4c94acdbee27276d5a386a657f4 (patch) | |
tree | 3d4d60a59f935ee11011ebea33ccb6d9fab5063c /svl | |
parent | 0eee1cf957d122ac0d805a9589a5db075a94e4a1 (diff) |
Some fixes for "clang version 3.1 (trunk 142234)" (with --enable-werror, on Linux x86_64).
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/misc/urihelper.cxx | 60 |
1 files changed, 13 insertions, 47 deletions
diff --git a/svl/source/misc/urihelper.cxx b/svl/source/misc/urihelper.cxx index 1bef290f3dfd..937019f26339 100644 --- a/svl/source/misc/urihelper.cxx +++ b/svl/source/misc/urihelper.cxx @@ -74,35 +74,21 @@ using namespace com::sun::star; // //============================================================================ -namespace { - -inline UniString toUniString(ByteString const & rString) -{ - return UniString(rString, RTL_TEXTENCODING_ISO_8859_1); -} - -inline UniString toUniString(UniString const & rString) -{ - return rString; -} - -template< typename Str > -inline UniString SmartRel2Abs_Impl(INetURLObject const & rTheBaseURIRef, - Str const & rTheRelURIRef, - Link const & rMaybeFileHdl, - bool bCheckFileExists, - bool bIgnoreFragment, - INetURLObject::EncodeMechanism - eEncodeMechanism, - INetURLObject::DecodeMechanism - eDecodeMechanism, - rtl_TextEncoding eCharset, - bool bRelativeNonURIs, - INetURLObject::FSysStyle eStyle) +UniString +URIHelper::SmartRel2Abs(INetURLObject const & rTheBaseURIRef, + UniString const & rTheRelURIRef, + Link const & rMaybeFileHdl, + bool bCheckFileExists, + bool bIgnoreFragment, + INetURLObject::EncodeMechanism eEncodeMechanism, + INetURLObject::DecodeMechanism eDecodeMechanism, + rtl_TextEncoding eCharset, + bool bRelativeNonURIs, + INetURLObject::FSysStyle eStyle) { // Backwards compatibility: if (rTheRelURIRef.Len() != 0 && rTheRelURIRef.GetChar(0) == '#') - return toUniString(rTheRelURIRef); + return rTheRelURIRef; INetURLObject aAbsURIRef; if (rTheBaseURIRef.HasError()) @@ -133,7 +119,7 @@ inline UniString SmartRel2Abs_Impl(INetURLObject const & rTheBaseURIRef, bool bMaybeFile = false; if (rMaybeFileHdl.IsSet()) { - UniString aFilePath(toUniString(rTheRelURIRef)); + UniString aFilePath(rTheRelURIRef); bMaybeFile = rMaybeFileHdl.Call(&aFilePath) != 0; } if (!bMaybeFile) @@ -144,26 +130,6 @@ inline UniString SmartRel2Abs_Impl(INetURLObject const & rTheBaseURIRef, return aAbsURIRef.GetMainURL(eDecodeMechanism, eCharset); } -} - -UniString -URIHelper::SmartRel2Abs(INetURLObject const & rTheBaseURIRef, - UniString const & rTheRelURIRef, - Link const & rMaybeFileHdl, - bool bCheckFileExists, - bool bIgnoreFragment, - INetURLObject::EncodeMechanism eEncodeMechanism, - INetURLObject::DecodeMechanism eDecodeMechanism, - rtl_TextEncoding eCharset, - bool bRelativeNonURIs, - INetURLObject::FSysStyle eStyle) -{ - return SmartRel2Abs_Impl(rTheBaseURIRef, rTheRelURIRef, rMaybeFileHdl, - bCheckFileExists, bIgnoreFragment, - eEncodeMechanism, eDecodeMechanism, eCharset, - bRelativeNonURIs, eStyle); -} - //============================================================================ // // SetMaybeFileHdl |