sc/qa/unit/uicalc/data/tdf131455.ods |binary sc/qa/unit/uicalc/uicalc.cxx | 61 +++++++++++++++++++++++++++ sw/source/uibase/uno/SwXDocumentSettings.hxx | 4 - 3 files changed, 62 insertions(+), 3 deletions(-)
New commits: commit b2bfe6c18aeb2530a8d1e1c4336707b1fcd5715a Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Mon Nov 23 11:57:31 2020 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon Nov 23 15:11:45 2020 +0100 tdf#131455: sc_uicalc: Add unittest Change-Id: I3a4960dc8a39c6ab9061aad08e6d3cb1c5c74bce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106403 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sc/qa/unit/uicalc/data/tdf131455.ods b/sc/qa/unit/uicalc/data/tdf131455.ods new file mode 100644 index 000000000000..f4d8bca66375 Binary files /dev/null and b/sc/qa/unit/uicalc/data/tdf131455.ods differ diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx index b7581fdb0c37..725e1c7c48dc 100644 --- a/sc/qa/unit/uicalc/uicalc.cxx +++ b/sc/qa/unit/uicalc/uicalc.cxx @@ -151,6 +151,67 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf133326) CPPUNIT_ASSERT_EQUAL(static_cast<SCTAB>(2), pDoc->GetTableCount()); } +CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf131455) +{ + ScModelObj* pModelObj = createDoc("tdf131455.ods"); + ScDocument* pDoc = pModelObj->GetDocument(); + CPPUNIT_ASSERT(pDoc); + + checkCurrentCell(0, 4); + dispatchCommand(mxComponent, ".uno:GoRight", {}); + checkCurrentCell(1, 4); + dispatchCommand(mxComponent, ".uno:GoRight", {}); + checkCurrentCell(4, 4); + dispatchCommand(mxComponent, ".uno:GoRight", {}); + checkCurrentCell(5, 4); + dispatchCommand(mxComponent, ".uno:GoRight", {}); + checkCurrentCell(8, 4); + dispatchCommand(mxComponent, ".uno:GoRight", {}); + checkCurrentCell(9, 4); + dispatchCommand(mxComponent, ".uno:GoRight", {}); + checkCurrentCell(12, 4); + + //Cursor can't move forward to the right + for (size_t i = 0; i < 5; ++i) + { + dispatchCommand(mxComponent, ".uno:GoRight", {}); + checkCurrentCell(13, 4); + } + + CPPUNIT_ASSERT_EQUAL(sal_Int16(0), ScDocShell::GetViewData()->GetTabNo()); + + dispatchCommand(mxComponent, ".uno:JumpToNextTable", {}); + + CPPUNIT_ASSERT_EQUAL(sal_Int16(1), ScDocShell::GetViewData()->GetTabNo()); + checkCurrentCell(0, 3); + + // Go to row 9 + for (size_t i = 0; i < 6; ++i) + { + dispatchCommand(mxComponent, ".uno:GoDown", {}); + } + + checkCurrentCell(0, 9); + + dispatchCommand(mxComponent, ".uno:SelectRow", {}); + dispatchCommand(mxComponent, ".uno:DeleteRows", {}); + + dispatchCommand(mxComponent, ".uno:JumpToPrevTable", {}); + + CPPUNIT_ASSERT_EQUAL(sal_Int16(0), ScDocShell::GetViewData()->GetTabNo()); + checkCurrentCell(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", {}); + checkCurrentCell(13, 4); + } +} + CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf126904) { ScModelObj* pModelObj = createDoc("tdf126904.ods"); commit e81845679ea6b30d651f76cc8bddc052a52bd227 Author: Muhammet Kara <muhammet.k...@collabora.com> AuthorDate: Sat Nov 21 12:21:36 2020 +0000 Commit: Muhammet Kara <muhammet.k...@collabora.com> CommitDate: Mon Nov 23 15:11:28 2020 +0100 tdf#124176: Use pragma once instead of include guards Change-Id: I6182d5b123b183603708b6d0d83e4aeac7c85dc9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106304 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.k...@collabora.com> diff --git a/sw/source/uibase/uno/SwXDocumentSettings.hxx b/sw/source/uibase/uno/SwXDocumentSettings.hxx index 10ef572cb272..26a123ba7fe8 100644 --- a/sw/source/uibase/uno/SwXDocumentSettings.hxx +++ b/sw/source/uibase/uno/SwXDocumentSettings.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_SW_SOURCE_UIBASE_UNO_SWXDOCUMENTSETTINGS_HXX -#define INCLUDED_SW_SOURCE_UIBASE_UNO_SWXDOCUMENTSETTINGS_HXX +#pragma once #include <comphelper/MasterPropertySet.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> @@ -75,6 +74,5 @@ public: virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override; virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) override; }; -#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits