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

New commits:
commit f428d2e4884cea6fbae550f0f0aa8748dc6a2d7e
Author:     Balazs Varga <[email protected]>
AuthorDate: Thu Dec 11 09:16:16 2025 +0100
Commit:     Balazs Varga <[email protected]>
CommitDate: Thu Dec 11 18:07:16 2025 +0100

    Table Style: fix dangling reference leading to undefined behavior
    
    after commit: 5ec4c2397d6099ade3347478f5e2e291eee59198
    
    Change-Id: Id619a22b1a1d66f5653c9d9c5ce3a2d7edab6dbe
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195427
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Balazs Varga <[email protected]>

diff --git a/sc/source/ui/docshell/dbdocfun.cxx 
b/sc/source/ui/docshell/dbdocfun.cxx
index 4cf8ef65b155..49fc1f2d1808 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -286,7 +286,7 @@ bool ScDBDocFunc::RenameDBRange( const OUString& rOld, 
const OUString& rNew )
         ScDocShellModificator aModificator( rDocShell );
 
         std::unique_ptr<ScDBData> pNewData(new ScDBData(rNew, **iterOld));
-
+        OUString aUndoName = rOld;
         std::unique_ptr<ScDBCollection> pUndoColl( new ScDBCollection( 
*pDocColl ) );
 
         rDoc.PreprocessDBDataUpdate();
@@ -304,7 +304,7 @@ bool ScDBDocFunc::RenameDBRange( const OUString& rOld, 
const OUString& rNew )
             if (bUndo)
             {
                 rDocShell.GetUndoManager()->AddUndoAction(
-                                std::make_unique<ScUndoDBData>( &rDocShell, 
rOld, std::move(pUndoColl),
+                                std::make_unique<ScUndoDBData>( &rDocShell, 
aUndoName, std::move(pUndoColl),
                                     rNew, std::make_unique<ScDBCollection>( 
*pDocColl ) ) );
             }
             else

Reply via email to