diff options
-rw-r--r-- | sc/qa/unit/uicalc/data/tdf126904.ods | bin | 23144 -> 0 bytes | |||
-rw-r--r-- | sc/qa/unit/uicalc/data/tdf131455-fixed.ods | bin | 0 -> 34900 bytes | |||
-rw-r--r-- | sc/qa/unit/uicalc/data/tdf131455.ods | bin | 33222 -> 0 bytes | |||
-rw-r--r-- | sc/qa/unit/uicalc/uicalc.cxx | 35 | ||||
-rw-r--r-- | sc/source/ui/view/tabview2.cxx | 2 |
5 files changed, 4 insertions, 33 deletions
diff --git a/sc/qa/unit/uicalc/data/tdf126904.ods b/sc/qa/unit/uicalc/data/tdf126904.ods Binary files differdeleted file mode 100644 index 0f2cf05132c4..000000000000 --- a/sc/qa/unit/uicalc/data/tdf126904.ods +++ /dev/null diff --git a/sc/qa/unit/uicalc/data/tdf131455-fixed.ods b/sc/qa/unit/uicalc/data/tdf131455-fixed.ods Binary files differnew file mode 100644 index 000000000000..08e02804bf1b --- /dev/null +++ b/sc/qa/unit/uicalc/data/tdf131455-fixed.ods diff --git a/sc/qa/unit/uicalc/data/tdf131455.ods b/sc/qa/unit/uicalc/data/tdf131455.ods Binary files differdeleted file mode 100644 index f4d8bca66375..000000000000 --- a/sc/qa/unit/uicalc/data/tdf131455.ods +++ /dev/null diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx index 7a92f711cb13..bcecaf99d67e 100644 --- a/sc/qa/unit/uicalc/uicalc.cxx +++ b/sc/qa/unit/uicalc/uicalc.cxx @@ -1112,7 +1112,9 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf119793) CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf131455) { - ScModelObj* pModelObj = createDoc("tdf131455.ods"); + // Note that tdf#131455 and tdf#126904 were actually incorrect, + // but keep the test with a fixed version of the document. + ScModelObj* pModelObj = createDoc("tdf131455-fixed.ods"); ScDocument* pDoc = pModelObj->GetDocument(); CPPUNIT_ASSERT(pDoc); @@ -1160,37 +1162,6 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf131455) CPPUNIT_ASSERT_EQUAL(sal_Int16(0), ScDocShell::GetViewData()->GetTabNo()); lcl_AssertCurrentCursorPosition(13, 4); - // Cursor can't move forward to the right - // Without the fix in place, this test would have failed with - // - Expected: 13 - // - Actual : 64 - for (size_t i = 0; i < 5; ++i) - { - dispatchCommand(mxComponent, ".uno:GoRight", {}); - lcl_AssertCurrentCursorPosition(13, 4); - } -} - -CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf126904) -{ - ScModelObj* pModelObj = createDoc("tdf126904.ods"); - ScDocument* pDoc = pModelObj->GetDocument(); - CPPUNIT_ASSERT(pDoc); - - lcl_AssertCurrentCursorPosition(0, 4); - dispatchCommand(mxComponent, ".uno:GoRight", {}); - lcl_AssertCurrentCursorPosition(1, 4); - dispatchCommand(mxComponent, ".uno:GoRight", {}); - lcl_AssertCurrentCursorPosition(4, 4); - dispatchCommand(mxComponent, ".uno:GoRight", {}); - lcl_AssertCurrentCursorPosition(5, 4); - dispatchCommand(mxComponent, ".uno:GoRight", {}); - lcl_AssertCurrentCursorPosition(8, 4); - dispatchCommand(mxComponent, ".uno:GoRight", {}); - lcl_AssertCurrentCursorPosition(9, 4); - dispatchCommand(mxComponent, ".uno:GoRight", {}); - lcl_AssertCurrentCursorPosition(12, 4); - //Cursor can't move forward to the right for (size_t i = 0; i < 5; ++i) { diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx index 0327ba410243..111b27477247 100644 --- a/sc/source/ui/view/tabview2.cxx +++ b/sc/source/ui/view/tabview2.cxx @@ -739,7 +739,7 @@ void ScTabView::SkipCursorHorizontal(SCCOL& rCurX, SCROW& rCurY, SCCOL nOldX, SC bool bSkipCell = false; bool bHFlip = false; - auto nMaxCol = rDoc.ClampToAllocatedColumns(nTab, rDoc.MaxCol()); + auto nMaxCol = rDoc.MaxCol(); do { bSkipCell = rDoc.ColHidden(rCurX, nTab) || rDoc.IsHorOverlapped(rCurX, rCurY, nTab); |