From 242fa8cd290df213faea0acd0e511afc45cbd84a Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Mon, 27 Jul 2009 15:26:29 +0000 Subject: CWS-TOOLING: integrate CWS kso32fixes 2009-07-10 15:25:24 +0200 kso r273899 : #i53184# - fix probs with UNC server names containing underscores. 2009-07-10 14:31:59 +0200 kso r273893 : CWS-TOOLING: rebase CWS kso32fixes to trunk@273858 (milestone: DEV300:m52) 2009-07-09 13:46:16 +0200 kso r273861 : #i53184# - withdrew patch. 2009-07-08 13:39:00 +0200 kso r273829 : #i63159# - added license header 2009-07-08 11:44:08 +0200 kso r273824 : i53184 - cannot open files from shell if UNC server has a _ (underscore) 2009-07-08 11:21:12 +0200 kso r273822 : #i93271# - mingw build error 2009-07-08 11:13:48 +0200 kso r273821 : #i91247 - Adhere to one more xdg spec 2009-07-08 11:02:53 +0200 kso r273820 : #i89017# - osl_trace now emits trailing line feed to the debugger 2009-07-08 10:55:04 +0200 kso r273819 : #i88663# - not waiting on successful forks but subsequent process failure 2009-07-07 17:05:27 +0200 kso r273810 : #i88382# - It's nice to leave the modal mode in gtk+ too ;-) 2009-07-07 16:53:34 +0200 kso r273808 : i88331# - Typo in include guard 2009-07-07 16:48:17 +0200 kso r273807 : i82831# - crashrep: warnings when size_t != int 2009-07-07 16:39:49 +0200 kso r273806 : i63159# - Patch to use d_type field in dirent structure if possible 2009-06-24 12:52:27 +0200 kso r273333 : #i100274# - solved win2k missing symbol problem (again). 2009-05-20 13:58:48 +0200 kso r272124 : CWS-TOOLING: rebase CWS kso32fixes to trunk@271830 (milestone: DEV300:m48) 2009-04-17 14:50:54 +0200 kso r270950 : CWS-TOOLING: rebase CWS kso32fixes to trunk@270723 (milestone: DEV300:m46) 2009-03-26 09:27:28 +0100 kso r270054 : #i100274# NTLM code cleanup. 2009-03-20 14:13:38 +0100 kso r269807 : #i100274# - Fixed potential buffer overflow in NTLM code. 2009-03-19 14:53:03 +0100 kso r269748 : #i100274. Added NTLM support for Non-Windows platforms. 2009-03-17 15:52:44 +0100 kso r269613 : CWS-TOOLING: rebase CWS kso32fixes to trunk@269297 (milestone: DEV300:m43) --- tools/source/fsys/urlobj.cxx | 9 ++++++++- tools/workben/urltest.cxx | 19 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index e3484aee4e2d..2aff0d734bf6 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -1523,8 +1523,15 @@ bool INetURLObject::convertRelToAbs(rtl::OUString const & rTheRelURIRef, else if (pEnd - q >= 2 && q[0] == '\\' && q[1] == '\\') { q += 2; - if (scanDomain(q, pEnd) > 0 && (q == pEnd || *q == '\\')) + sal_Int32 n = rtl_ustr_indexOfChar_WithLength( + q, pEnd - q, '\\'); + sal_Unicode const * qe = n == -1 ? pEnd : q + n; + if (parseHostOrNetBiosName( + q, qe, bOctets, ENCODE_ALL, RTL_TEXTENCODING_DONTKNOW, + true, NULL)) + { bFSys = true; // 1st + } } if (bFSys) { diff --git a/tools/workben/urltest.cxx b/tools/workben/urltest.cxx index 542297eb4bd6..a232f8ebdd93 100644 --- a/tools/workben/urltest.cxx +++ b/tools/workben/urltest.cxx @@ -799,6 +799,25 @@ main() bSuccess = false; } } + { + bool bWasAbsolute; + if (!rtl::OUString(INetURLObject(rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "file:///"))). + smartRel2Abs( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "\\\\unc_host\\path")), + bWasAbsolute). + GetMainURL(INetURLObject::NO_DECODE)). + equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM("file://unc_host/path")) + || !bWasAbsolute) + { + printf("BAD smartRel2Abs(\"\\\\unc_host\\path\")\n"); + bSuccess = false; + } + } } if (true) -- cgit