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 <rb.henschel@t-online.de>
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -397,6 +397,34 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest11, testTdf162120AutoRTL)
|
||||
getProperty<short>(getRun(getParagraph(1), 1), u"WritingMode"_ustr));
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user