[Libreoffice-commits] core.git: sc/source
Caolán McNamara
caolanm at redhat.com
Mon Jul 31 07:09:55 UTC 2017
sc/source/core/data/global2.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 00ed4d3a30abf61b5601fa70a7b1371409fceada
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 30 21:37:50 2017 +0100
ofz: survive avoid config
Change-Id: I79cb298ad6f6223953dfd4eef1627abee0f64a18
Reviewed-on: https://gerrit.libreoffice.org/40571
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx
index a0262f30f13e..1a2a841d1560 100644
--- a/sc/source/core/data/global2.cxx
+++ b/sc/source/core/data/global2.cxx
@@ -19,6 +19,7 @@
#include <sfx2/docfile.hxx>
#include <sfx2/objsh.hxx>
+#include <unotools/configmgr.hxx>
#include <unotools/pathoptions.hxx>
#include <unotools/useroptions.hxx>
#include <tools/urlobj.hxx>
@@ -312,8 +313,7 @@ OUString ScGlobal::GetAbsDocName( const OUString& rFileName,
if (!pShell || !pShell->HasName())
{ // maybe relative to document path working directory
INetURLObject aObj;
- SvtPathOptions aPathOpt;
- aObj.SetSmartURL( aPathOpt.GetWorkPath() );
+ aObj.SetSmartURL(!utl::ConfigManager::IsAvoidConfig() ? SvtPathOptions().GetWorkPath() : OUString("file:///tmp"));
aObj.setFinalSlash(); // it IS a path
bool bWasAbs = true;
aAbsName = aObj.smartRel2Abs( rFileName, bWasAbs ).GetMainURL(INetURLObject::DecodeMechanism::NONE);
More information about the Libreoffice-commits
mailing list