sw/qa/extras/uiwriter/data/tdf131124_Extruded_Shape_Selection.odt |binary sw/qa/extras/uiwriter/data/tdf131124_Fontwork_Selection.odt |binary sw/qa/extras/uiwriter/uiwriter11.cxx | 28 ++++++++++ sw/source/uibase/uno/unotxvw.cxx | 2 4 files changed, 30 insertions(+)
New commits: commit 1fb6b5ceb2c51d9af1720d6420e7019722adb26a Author: Regina Henschel <[email protected]> AuthorDate: Sat Jan 3 16:19:51 2026 +0100 Commit: Xisco Fauli <[email protected]> CommitDate: Sat Jan 10 15:01:47 2026 +0100 tdf#131124 Handle ExtrudedCustomShape and FontWork ShellMode::ExtrudedCustomShape and ShellMode::FontWork were missing in the switch. Thus mxShapes and mxShape in the Export dialog were empty and maSize was zero. Change-Id: If4c2137ce85a0aef0613d9d79979cc9a58b5c115 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196456 Tested-by: Jenkins Reviewed-by: Regina Henschel <[email protected]> (cherry picked from commit a8babea4ce7f07f969e58594ab5a5afc2d190e69) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196881 Reviewed-by: Xisco Fauli <[email protected]> Signed-off-by: Xisco Fauli <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196944 diff --git a/sw/qa/extras/uiwriter/data/tdf131124_Extruded_Shape_Selection.odt b/sw/qa/extras/uiwriter/data/tdf131124_Extruded_Shape_Selection.odt new file mode 100644 index 000000000000..5d2d0ef7bd1a Binary files /dev/null and b/sw/qa/extras/uiwriter/data/tdf131124_Extruded_Shape_Selection.odt differ diff --git a/sw/qa/extras/uiwriter/data/tdf131124_Fontwork_Selection.odt b/sw/qa/extras/uiwriter/data/tdf131124_Fontwork_Selection.odt new file mode 100644 index 000000000000..8b3090d1ae65 Binary files /dev/null and b/sw/qa/extras/uiwriter/data/tdf131124_Fontwork_Selection.odt differ diff --git a/sw/qa/extras/uiwriter/uiwriter11.cxx b/sw/qa/extras/uiwriter/uiwriter11.cxx index 13aab01fd1c8..a870b771ca94 100644 --- a/sw/qa/extras/uiwriter/uiwriter11.cxx +++ b/sw/qa/extras/uiwriter/uiwriter11.cxx @@ -356,6 +356,34 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest11, testTdf108791) } } +CPPUNIT_TEST_FIXTURE(SwUiWriterTest11, testFontworkSelection) +{ + // Load a document with a Fontwork shape and select the shape + createSwDoc("tdf131124_Fontwork_Selection.odt"); + dispatchCommand(mxComponent, u".uno:JumpToNextFrame"_ustr, {}); + + // Make sure the CurrentSelection of the document is not empty. + uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xSelections(xModel->getCurrentSelection(), + uno::UNO_QUERY); + // Without fix, this test would have failed here + CPPUNIT_ASSERT(xSelections.is()); +} + +CPPUNIT_TEST_FIXTURE(SwUiWriterTest11, testExtrudedShapeSelection) +{ + // Load a document with an extruded custom shape and select the shape + createSwDoc("tdf131124_Extruded_Shape_Selection.odt"); + dispatchCommand(mxComponent, u".uno:JumpToNextFrame"_ustr, {}); + + // Make sure the CurrentSelection of the document is not empty. + uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xSelections(xModel->getCurrentSelection(), + uno::UNO_QUERY); + // Without fix, this test would have failed here + CPPUNIT_ASSERT(xSelections.is()); +} + } // end of anonymous namespace CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx index 006b97372453..61ffad7a3b63 100644 --- a/sw/source/uibase/uno/unotxvw.cxx +++ b/sw/source/uibase/uno/unotxvw.cxx @@ -321,6 +321,8 @@ uno::Any SwXTextView::getSelection() case ShellMode::DrawForm : case ShellMode::DrawText : case ShellMode::Bezier : + case ShellMode::ExtrudedCustomShape: + case ShellMode::FontWork: { uno::Reference< drawing::XShapes > xShCol = drawing::ShapeCollection::create( comphelper::getProcessComponentContext());
