tdf#171084: Invalid filename used for external references
bug-document: forum-mso-en4-109719.xls Change-Id: I52bac59b9930f65f43dd9b354309d6ce57fcddd6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200692 Reviewed-by: Michael Stahl <michael.stahl@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> (cherry picked from commit a8a694f065d26039457fda5a1e5de1aae1daaf7a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202127 Tested-by: Jenkins Reviewed-by: Karthik Godha <karthik.godha@collabora.com>
This commit is contained in:
@@ -319,6 +319,10 @@ OUString ScGlobal::GetAbsDocName( const OUString& rFileName,
|
||||
aAbsName = aObj.GetMainURL(INetURLObject::DecodeMechanism::NONE);
|
||||
}
|
||||
}
|
||||
|
||||
if (aAbsName.endsWith("/"))
|
||||
aAbsName = aAbsName.copy(0, aAbsName.getLength() - 1);
|
||||
|
||||
return aAbsName;
|
||||
}
|
||||
|
||||
|
||||
@@ -483,6 +483,9 @@ OUString XclExpHyperlink::BuildFileName(
|
||||
INetURLObject aURLObject( rUrl );
|
||||
OUString aDosName(bEncoded ? aURLObject.GetMainURL(INetURLObject::DecodeMechanism::ToIUri)
|
||||
: aURLObject.getFSysPath(FSysStyle::Dos));
|
||||
if (aDosName.endsWith("/"))
|
||||
aDosName = aDosName.copy(0, aDosName.getLength() - 1);
|
||||
|
||||
rnLevel = 0;
|
||||
rbRel = rRoot.IsRelUrl();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user