[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - 2 commits - sfx2/source ucb/source
Stephan Bergmann
sbergman at redhat.com
Thu May 23 08:54:47 PDT 2013
sfx2/source/doc/docfile.cxx | 15 +++++++--------
ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx | 2 +-
2 files changed, 8 insertions(+), 9 deletions(-)
New commits:
commit ab56ffe40c6ed9b0818791790f8756ee0bb312c2
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu May 23 17:42:51 2013 +0200
Related rhbz#961460: Fix regression around OUString::compareTo usage
...originally introduced with 8da928423add3fdb94baee2a3f3fa053390f828e "Remove
RTL_CONSTASCII_(U)STRINGPARAM in ucb(ucp)," leading to "IsFolder" not being
properly set in the WebDAV UCP, leading to failure when saving documents.
Change-Id: Id2cc98582c9feffaa501a68069cd606fb420fd29
(cherry picked from commit aac817bca6951a42bfe6c8fbfd86163190f96997)
diff --git a/ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx b/ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx
index 0ec097c..c5945f2 100644
--- a/ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx
@@ -135,7 +135,7 @@ extern "C" int NPFR_propfind_iter( void* userdata,
if ( !aValue.isEmpty() )
{
aValue = stripDavNamespace( aValue ).toAsciiLowerCase();
- if ( aValue == "<collection" )
+ if ( aValue.startsWith("<collection") )
{
thePropertyValue.Value
<<= OUString("collection");
commit 70679160ac50a867182633e2ec8efc7a45bf0ae1
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu May 23 17:17:09 2013 +0200
rhbz#961460: Don't needlessly pass URLs through INetURLObject
The WebDAV UCP uses https/davs URLs that may contain a userinfo (cf. RFC 3986)
part, and INetURLObject does not support that (in accordance with RFCs 2818 and
2616) and thus creates an empty INET_PROT_NOT_VALID INetURLObject for such a
URL, leading to failure when trying to save a document to such a URL.
(Regression introduced with 966d20e35d5a2be2fce6c204af5c156c3ead7063 "CMIS ucp:
write documents back to CMIS server.")
Change-Id: Ifd396852b211cab1d29575da7fccb32306479f93
(cherry picked from commit 3f5c45b70864af95a6362acf4684fb57eb85e348)
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 8d22eb4..746ba20 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -1949,6 +1949,7 @@ void SfxMedium::Transfer_Impl()
::ucbhelper::Content aDestContent;
::ucbhelper::Content::create( aDestURL, xComEnv, comphelper::getProcessComponentContext(), aDestContent );
+ // For checkin, we need the object URL, not the parent folder:
if ( !IsInCheckIn( ) )
{
// Get the parent URL from the XChild if possible: why would the URL necessarily have
@@ -1964,13 +1965,11 @@ void SfxMedium::Transfer_Impl()
}
}
- if ( !sParentUrl.isEmpty() )
- aDest = INetURLObject( sParentUrl );
- }
- else
- {
- // For checkin, we need the object URL, not the parent folder
- aDest = INetURLObject( aDestURL );
+ if ( sParentUrl.isEmpty() )
+ aDestURL = aDest.GetMainURL( INetURLObject::NO_DECODE );
+ // adjust to above aDest.removeSegment()
+ else
+ aDestURL = sParentUrl;
}
// LongName wasn't defined anywhere, only used here... get the Title instead
@@ -1983,7 +1982,7 @@ void SfxMedium::Transfer_Impl()
try
{
- aTransferContent = ::ucbhelper::Content( aDest.GetMainURL( INetURLObject::NO_DECODE ), xComEnv, comphelper::getProcessComponentContext() );
+ aTransferContent = ::ucbhelper::Content( aDestURL, xComEnv, comphelper::getProcessComponentContext() );
}
catch (const ::com::sun::star::ucb::ContentCreationException& ex)
{
More information about the Libreoffice-commits
mailing list