From 4f994cec388377cc5c2bddb804bd92eb4cd7dc8d Mon Sep 17 00:00:00 2001 From: Balazs Varga Date: Thu, 28 Mar 2024 17:55:30 +0100 Subject: tdf#39052 - Chart: make characters formatable in editable chart textshapes Editable textshapes include main chart title, sub chart title, axis titles. In chart2 the chart2::XFormattedString and chart2::XFormattedString2 store the formatted characters from textshapes, so we need to set all the character properties from the EditTextObject and need to add them to to the XFormattedString array with all the related texts which are formatted individually. For formatting of the characters the .uno:FontDialog command can be used, which can be called from the chart menubar, toolbar and with right click on the text when we are in edit mode in the textshape. (Note: in the next patch the OOXML export will be fixed.) Change-Id: I5750a5fe694b384dc6b28e2ef03ac1f2b03957db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165501 Tested-by: Jenkins Tested-by: Gabor Kelemen Reviewed-by: Balazs Varga --- chart2/source/controller/main/ChartController.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'chart2/source/controller/main/ChartController.cxx') diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index 661cf327b39f..2bd0bf549e89 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -1233,7 +1233,9 @@ void SAL_CALL ChartController::dispatch( this->executeDispatch_PositionAndSize(); } } - else if( lcl_isFormatObjectCommand(aCommand) ) + else if ( aCommand == "FontDialog" ) + this->impl_ShapeControllerDispatch(rURL, rArgs); + else if (lcl_isFormatObjectCommand(aCommand)) this->executeDispatch_FormatObject(rURL.Path); //more format else if( aCommand == "DiagramType" ) @@ -1604,7 +1606,7 @@ const o3tl::sorted_vector< OUString >& ChartController::impl_getAvailableCommand "InsertMenuDataTable", "InsertDataTable", "DeleteDataTable", //format objects - "FormatSelection", "TransformDialog", + "FormatSelection", "FontDialog", "TransformDialog", "DiagramType", "View3D", "Forward", "Backward", "MainTitle", "SubTitle", -- cgit