[Libreoffice-commits] .: tools/inc tools/source
Caolán McNamara
caolan at kemper.freedesktop.org
Fri Jan 14 07:39:58 PST 2011
tools/inc/tools/urlobj.hxx | 3 ++-
tools/source/fsys/urlobj.cxx | 8 +++++++-
2 files changed, 9 insertions(+), 2 deletions(-)
New commits:
commit 1b30fce4fe02f91d7d2b73f603a428e8a0adfc54
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jan 14 10:02:12 2011 +0000
Related: rhbz#668057 recognize sftp urls
diff --git a/tools/inc/tools/urlobj.hxx b/tools/inc/tools/urlobj.hxx
index f446f25..7187ab3 100644
--- a/tools/inc/tools/urlobj.hxx
+++ b/tools/inc/tools/urlobj.hxx
@@ -140,7 +140,8 @@ enum INetProtocol
INET_PROT_VND_SUN_STAR_TDOC = 29,
INET_PROT_GENERIC = 30,
INET_PROT_SMB = 31,
- INET_PROT_END = 32
+ INET_PROT_SFTP = 32,
+ INET_PROT_END = 33
};
//============================================================================
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index ec6d7a2..90d6933 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -425,8 +425,11 @@ static INetURLObject::SchemeInfo const aSchemeInfoMap[INET_PROT_END]
false, false, false, true, false },
{ "", "", 0, false, false, false, false, true, true, true, false },
{ "smb", "smb://", 139, true, true, false, true, true, true, true,
+ true },
+ { "sftp", "sftp://", 22, true, true, false, true, true, true, true,
true } };
+
// static
inline INetURLObject::SchemeInfo const &
INetURLObject::getSchemeInfo(INetProtocol eTheScheme)
@@ -2208,7 +2211,9 @@ INetURLObject::getPrefix(sal_Unicode const *& rBegin,
{ "vnd.sun.star.tdoc:", 0, INET_PROT_VND_SUN_STAR_TDOC,
PrefixInfo::OFFICIAL },
{ "vnd.sun.star.webdav:", 0, INET_PROT_VND_SUN_STAR_WEBDAV,
- PrefixInfo::OFFICIAL } };
+ PrefixInfo::OFFICIAL },
+ { "sftp:", 0, INET_PROT_SFTP, PrefixInfo::OFFICIAL } };
+
PrefixInfo const * pFirst = aMap + 1;
PrefixInfo const * pLast = aMap + sizeof aMap / sizeof (PrefixInfo) - 1;
PrefixInfo const * pMatch = 0;
@@ -3426,6 +3431,7 @@ bool INetURLObject::parsePath(INetProtocol eScheme,
break;
case INET_PROT_GENERIC:
+ case INET_PROT_SFTP:
while (pPos < pEnd && *pPos != nFragmentDelimiter)
{
EscapeType eEscapeType;
More information about the Libreoffice-commits
mailing list