summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-02-23 09:43:24 +0100
committerMiklos Vajna <vmiklos@collabora.com>2021-02-24 08:56:26 +0100
commit7cb59a86d45d06836723c93b063060f27f9669c6 (patch)
treef0cd7ef52234061728f259c40797aed23243d7c3
parent32042808aa43b8a45a95ef656987189ec1807f1d (diff)
Don't build URL only to drop the result immediately
Change-Id: I128ce053c78caa5212dc69ee617fd4985e3bbfd7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111323 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r--sfx2/source/doc/docfile.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index b1f96440fb8a..0908d025852d 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -3637,7 +3637,8 @@ OUString GetLogicBase(const INetURLObject& rURL, std::unique_ptr<SfxMedium_Impl>
(void) pImpl;
#else
- if (rURL.GetProtocol() == INetProtocol::File && !pImpl->m_pInStream)
+ if (!pImpl->m_bHasEmbeddedObjects // Embedded objects would mean a special base, ignore that.
+ && rURL.GetProtocol() == INetProtocol::File && !pImpl->m_pInStream)
{
// Try to create the temp file in the same directory when storing.
INetURLObject aURL(rURL);
@@ -3645,10 +3646,6 @@ OUString GetLogicBase(const INetURLObject& rURL, std::unique_ptr<SfxMedium_Impl>
aLogicBase = aURL.GetMainURL(INetURLObject::DecodeMechanism::WithCharset);
}
- if (pImpl->m_bHasEmbeddedObjects)
- // Embedded objects would mean a special base, ignore that.
- aLogicBase.clear();
-
#endif // !HAVE_FEATURE_MACOSX_SANDBOX
return aLogicBase;