officecfg/registry/schema/org/openoffice/Office/Common.xcs | 9 +++++++++ sfx2/source/doc/docfile.cxx | 2 ++ 2 files changed, 11 insertions(+)
New commits: commit cf616121ed48c8df96104bc35abf3b55b8862043 Author: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de> AuthorDate: Mon Feb 5 14:12:53 2024 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Thu Feb 8 08:29:09 2024 +0100 tdf#158975 Add option to not write temp file next to local file This causes permission issues in some setups. See bug report for details. Change-Id: If97030f95185ab96e21cec968b734fba8a811f9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163003 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index 3b66f6a8394b..adfa422f01b0 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -5218,6 +5218,15 @@ </info> <value>true</value> </prop> + <prop oor:name="TempFileNextToLocalFile" oor:type="xs:boolean" oor:nillable="false"> + <info> + <desc>Determines if temp files are placed next to the local file when a file is saved. + If this is false, the temp file will be placed in the default temp directory. + Placing the temp file next to the local file will increase performance, but it might lead + to permission issues such as described in this bug: https://bugs.documentfoundation.org/show_bug.cgi?id=158975</desc> + </info> + <value>true</value> + </prop> <prop oor:name="UseDocumentOOoLockFile" oor:type="xs:boolean" oor:nillable="false"> <info> <desc>Allows to specify whether the OOo document file locking diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index fe1f5d0b773c..88f712e6989b 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -4006,6 +4006,8 @@ OUString GetLogicBase(const INetURLObject& rURL, std::unique_ptr<SfxMedium_Impl> (void) rURL; (void) pImpl; #else + if (!officecfg::Office::Common::Misc::TempFileNextToLocalFile::get()) + return aLogicBase; if (!pImpl->m_bHasEmbeddedObjects // Embedded objects would mean a special base, ignore that. && rURL.GetProtocol() == INetProtocol::File && !pImpl->m_pInStream)