sc/source/ui/view/tabvwshf.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3432dec53cfa6409dffebfdd67ce663362c71115
Author:     Rafael Lima <rafael.palma.l...@gmail.com>
AuthorDate: Thu Feb 22 21:36:55 2024 +0100
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Thu Feb 29 12:28:04 2024 +0100

    tdf#159847 Fix "Duplicate Sheet" when two files have the same name
    
    Prior to this fix, if two files were opened and had the same file name (but 
in a different directory), Calc might not create the duplicate sheet in the 
correct file.
    
    Change-Id: I7cdbdd2f3dae6752a3b78bbdcb74fbecb5b24b68
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163763
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index f73925b23c6b..dd0a12930870 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -212,7 +212,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
             {
                 // Get info about current document and selected tab
                 SCTAB nTab = rViewData.GetTabNo();
-                OUString aDocName = GetViewData().GetDocShell()->GetTitle();
+                OUString aDocName = 
GetViewData().GetDocShell()->GetTitle(SFX_TITLE_FULLNAME);
                 sal_uInt16 nDoc = 0;
                 bool bCpy = true;
 
@@ -229,7 +229,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
                     {
                         pScSh->GetTitle();
 
-                        if (aDocName == pScSh->GetTitle())
+                        if (aDocName == pScSh->GetTitle(SFX_TITLE_FULLNAME))
                         {
                             nDoc = i;
                             break;

Reply via email to