sc/source/ui/docshell/docsh5.cxx    |    3 ---
 test/source/sheet/xspreadsheets.cxx |    2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)

New commits:
commit e6d4af2a03f22de1493e00e497e081240bf8a5c4
Author:     Alin Andrei Abahnencei <[email protected]>
AuthorDate: Thu Dec 12 16:03:22 2024 +0200
Commit:     Mike Kaganski <[email protected]>
CommitDate: Wed Dec 18 07:08:24 2024 +0100

    tdf#163319 Do not decrement destination position when moving a tab
    
    to the right
    
    Signed-off-by: Alin Andrei Abahnencei <[email protected]>
    Change-Id: Id8da1a1b199927bb2f1b71b814737b8287ea2a34
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178362
    Reviewed-by: Mike Kaganski <[email protected]>
    Tested-by: Jenkins

diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index 52fdbfada36a..aa1269aa70b0 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -994,9 +994,6 @@ bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, 
bool bCopy, bool bRec
         if ( m_pDocument->GetChangeTrack() )
             return false;
 
-        if ( nSrcTab<nDestTab && nDestTab!=SC_TAB_APPEND )
-            nDestTab--;
-
         if ( nSrcTab == nDestTab )
         {
             //! allow only for api calls?
diff --git a/test/source/sheet/xspreadsheets.cxx 
b/test/source/sheet/xspreadsheets.cxx
index e2b2640d682d..8f622ba26d80 100644
--- a/test/source/sheet/xspreadsheets.cxx
+++ b/test/source/sheet/xspreadsheets.cxx
@@ -56,7 +56,7 @@ void XSpreadsheets::testMoveByName()
 
     // get sheet from the new position
     uno::Reference< container::XIndexAccess > oIndexAccess(xSpreadsheets, 
UNO_QUERY_THROW);
-    uno::Any aAny = oIndexAccess->getByIndex(1);
+    uno::Any aAny = oIndexAccess->getByIndex(2);
     uno::Reference< container::XNamed > xNamed;
     CPPUNIT_ASSERT(aAny >>= xNamed);
 

Reply via email to