Resolves: rhbz#961460 can't save WebDAV (davs) files

f41
Stephan Bergmann 12 years ago
parent 3e80061b52
commit d67e552164

@ -0,0 +1,61 @@
From b033d33c9ff7f5bf1ef1a39a7f6f3e3512b9b938 Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Thu, 23 May 2013 17:17:09 +0200
Subject: [PATCH] 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)
---
sfx2/source/doc/docfile.cxx | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 3ce8ab7..d08f3fc 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -1936,6 +1936,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
@@ -1951,13 +1952,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
@@ -1970,7 +1969,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)
{
--
1.8.1.4

@ -43,7 +43,7 @@ Summary: Free Software Productivity Suite
Name: libreoffice
Epoch: 1
Version: %{libo_version}.3
Release: 2%{?libo_prerelease}%{?dist}
Release: 3%{?libo_prerelease}%{?dist}
License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic and MPLv2.0
Group: Applications/Productivity
URL: http://www.documentfoundation.org/develop
@ -253,6 +253,7 @@ Patch23: 0001-Resolves-fdo-47209-and-rhbz-927223-syntax-highlighte.patch
Patch24: 0001-rhbz-867808-Do-not-throw-RuntimeException-by-pointer.patch
Patch25: 0001-rhbz-954991-Avoid-static-data-causing-trouble-at-exi.patch
Patch26: 0001-Related-rhbz-761009-lp-766153-lp-892904-HandleFontOp.patch
Patch27: 0001-rhbz-961460-Don-t-needlessly-pass-URLs-through-INetU.patch
%define instdir %{_libdir}
%define baseinstdir %{instdir}/libreoffice
@ -1011,6 +1012,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc
%patch24 -p1 -b .rhbz-867808-Do-not-throw-RuntimeException-by-pointer.patch
%patch25 -p1 -b .rhbz-954991-Avoid-static-data-causing-trouble-at-exi.patch
%patch26 -p1 -b .rhbz-761009-lp-766153-lp-892904-HandleFontOp.patch
%patch27 -p1 -b .rhbz-961460-Don-t-needlessly-pass-URLs-through-INetU.patch
# TODO: check this
# these are horribly incomplete--empty translations and copied english
@ -2084,6 +2086,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%endif
%changelog
* Fri May 24 2013 Stephan Bergmann <sbergman@redhat.com> - 1:4.0.3.3-3
- Resolves: rhbz#961460 can't save WebDAV (davs) files
* Thu May 16 2013 Caolán McNamara <caolanm@redhat.com> - 1:4.0.3.3-2
- Resolves: rhbz#963276 font options cache crash

Loading…
Cancel
Save