sc/source/ui/docshell/docsh.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
New commits: commit 43030487c45f49bccdfad987c60d9483b938ebac Author: Eike Rathke <er...@redhat.com> Date: Mon May 23 14:11:21 2016 +0200 Resolves: tdf#86282 do not use file name as sheet name for linked documents ... and external references. Change-Id: I6e23eeff39086091f13914a3f964aec1016a7de4 diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index de05c84..6559d9f 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -1199,8 +1199,15 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) aDocument.StartAllListeners(); sc::SetFormulaDirtyContext aCxt; aDocument.SetAllFormulasDirty(aCxt); - INetURLObject aURLObjForDefaultNameSheetName(rMedium.GetName()); - aDocument.RenameTab(0,aURLObjForDefaultNameSheetName.GetBase()); + if (GetCreateMode() != SfxObjectCreateMode::INTERNAL) + { + // ScDocShell was not created with + // SfxModelFlags::EXTERNAL_LINK for which we do not + // want Sheet1 renamed in order to get predictable + // sheet names for external references. + INetURLObject aURLObjForDefaultNameSheetName(rMedium.GetName()); + aDocument.RenameTab(0,aURLObjForDefaultNameSheetName.GetBase()); + } bOverflowRow = aImpEx.IsOverflowRow(); bOverflowCol = aImpEx.IsOverflowCol(); bOverflowCell = aImpEx.IsOverflowCell(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits