sc/qa/unit/tiledrendering/data/shape-textbox.ods |binary sc/qa/unit/tiledrendering/tiledrendering.cxx | 28 +++++++++++++++++++++++ 2 files changed, 28 insertions(+)
New commits: commit 234dca0942197bd548254e0f7172e862f074b51c Author: Gökay Şatır <gokaysa...@gmail.com> AuthorDate: Tue Jun 17 12:38:50 2025 +0300 Commit: Gökay ŞATIR <gokaysa...@gmail.com> CommitDate: Thu Sep 11 15:44:10 2025 +0200 Online Calc: TextBox shape resizing test. Add a unit test for the feature. This unit test doesn't pass without the previous revert. Signed-off-by: Gökay Şatır <gokaysa...@gmail.com> Change-Id: I30abe745f2a28a50bb59e2393c7c60119e3b3533 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186604 Reviewed-by: Balazs Varga <balazs.va...@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Gökay ŞATIR <gokaysa...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190801 Tested-by: Jenkins diff --git a/sc/qa/unit/tiledrendering/data/shape-textbox.ods b/sc/qa/unit/tiledrendering/data/shape-textbox.ods new file mode 100644 index 000000000000..0904f44f8455 Binary files /dev/null and b/sc/qa/unit/tiledrendering/data/shape-textbox.ods differ diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx index 4519963491cd..7694bf22690f 100644 --- a/sc/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx @@ -360,6 +360,34 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testMoveShapeHandle) } } +CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testMoveShapeHandleTextBox) +{ + ScModelObj* pModelObj = createDoc("shape-textbox.ods"); + ScTestViewCallback aView1; + pModelObj->postMouseEvent(LOK_MOUSEEVENT_MOUSEBUTTONDOWN, /*x=*/ 1,/*y=*/ 1,/*count=*/ 1, /*buttons=*/ 1, /*modifier=*/0); + pModelObj->postMouseEvent(LOK_MOUSEEVENT_MOUSEBUTTONUP, /*x=*/ 1, /*y=*/ 1, /*count=*/ 1, /*buttons=*/ 1, /*modifier=*/0); + Scheduler::ProcessEventsToIdle(); + + CPPUNIT_ASSERT(!aView1.m_ShapeSelection.isEmpty()); + { + sal_uInt32 id, x, y; + lcl_extractHandleParameters(aView1.m_ShapeSelection, id, x ,y); + sal_uInt32 oldX = x; + sal_uInt32 oldY = y; + uno::Sequence<beans::PropertyValue> aPropertyValues(comphelper::InitPropertySequence( + { + {"HandleNum", uno::Any(id)}, + {"NewPosX", uno::Any(x+1)}, + {"NewPosY", uno::Any(y+1)} + })); + dispatchCommand(mxComponent, u".uno:MoveShapeHandle"_ustr, aPropertyValues); + CPPUNIT_ASSERT(!aView1.m_ShapeSelection.isEmpty()); + lcl_extractHandleParameters(aView1.m_ShapeSelection, id, x ,y); + CPPUNIT_ASSERT_EQUAL(x-1, oldX); + CPPUNIT_ASSERT_EQUAL(y-1, oldY); + } +} + CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testColRowResize) { ScModelObj* pModelObj = createDoc("sort-range.ods");