sfx2/source/doc/docfile.cxx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
New commits: commit 83aee9f7a56403a5222a605e4063c25a4c38ecb9 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Tue Jun 6 16:20:45 2023 +0200 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Thu Jun 8 12:07:00 2023 +0200 sfx2: SfxMedium::Transfer_Impl() ignore exceptions when getting props Somehow (bisected to commit bc48f2656c9a7bc1f41541bff66ec2c4496466a4) this throws an exception now when getting "Title" when storing a new file to a WebDAV server (the server naturally replies with 404). There is already a fallback to get the filename, so just ignore exceptions here so the transfer can succeed. Change-Id: Ic609f2a4f5a67670b2d8eeb74680730053a7d3a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152678 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> (cherry picked from commit a1393ab3766c2f010115931a6c4edc01240c5c6e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152654 Reviewed-by: László Németh <nem...@numbertext.org> diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index c17b7827145d..8690da98913e 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -2427,11 +2427,18 @@ void SfxMedium::Transfer_Impl() // LongName wasn't defined anywhere, only used here... get the Title instead // as it's less probably empty OUString aFileName; - Any aAny = aDestContent.getPropertyValue("Title"); - aAny >>= aFileName; - aAny = aDestContent.getPropertyValue( "ObjectId" ); OUString sObjectId; - aAny >>= sObjectId; + try + { + Any aAny = aDestContent.getPropertyValue("Title"); + aAny >>= aFileName; + aAny = aDestContent.getPropertyValue("ObjectId"); + aAny >>= sObjectId; + } + catch (uno::Exception const&) + { + SAL_INFO("sfx.doc", "exception while getting Title or ObjectId"); + } if ( aFileName.isEmpty() ) aFileName = GetURLObject().getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset );