diff options
author | Balazs Varga <balazs.varga.extern@allotropia.de> | 2024-05-08 17:22:24 +0200 |
---|---|---|
committer | Balazs Varga <balazs.varga.extern@allotropia.de> | 2024-05-09 09:54:53 +0200 |
commit | 654150ffd05f43813332eedb969ab07fffa51b21 (patch) | |
tree | e2e6772a2fc920d801ff97f5a26fc8b80ba0029c /chart2 | |
parent | 8bae684c93bd23bbe98707ba9cf75d1a39427131 (diff) |
tdf#58038 - chart: make available format characters toolbar for
text boxes or shapes *inside* charts (as created with the Drawing toolbar).
follow-up commit: 4f994cec388377cc5c2bddb804bd92eb4cd7dc8d
(tdf#39052 - Chart: make characters formatable in editable chart textshapes)
Change-Id: Iccc5ee350ea0a37d8bda9652e09d3d61339f1d71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167366
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/main/ChartController_Tools.cxx | 6 | ||||
-rw-r--r-- | chart2/source/controller/main/ControllerCommandDispatch.cxx | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx index 67ea64a11fb9..ded134db24c6 100644 --- a/chart2/source/controller/main/ChartController_Tools.cxx +++ b/chart2/source/controller/main/ChartController_Tools.cxx @@ -582,9 +582,9 @@ bool ChartController::isShapeContext() const bool ChartController::IsTextEdit() const { - // only Title objects are editable textshapes - return m_aSelection.isTitleObjectSelected() && - m_pDrawViewWrapper && m_pDrawViewWrapper->IsTextEdit(); + // only Title objects and additional shapes are editable textshapes in chart + return m_pDrawViewWrapper && m_pDrawViewWrapper->IsTextEdit() && + (m_aSelection.isTitleObjectSelected() || m_aSelection.isAdditionalShapeSelected()); } void ChartController::impl_ClearSelection() diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx index 787968b3f13b..ee9d7d480de3 100644 --- a/chart2/source/controller/main/ControllerCommandDispatch.cxx +++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx @@ -599,7 +599,8 @@ void ControllerCommandDispatch::updateCommandAvailability() // format objects bool bFormatObjectAvailable = bIsWritable && bControllerStateIsValid && m_apControllerState->bIsFormateableObjectSelected; m_aCommandAvailability[ u".uno:FormatSelection"_ustr ] = bFormatObjectAvailable && !bIsTextEdit; - m_aCommandAvailability[ u".uno:FontDialog"_ustr ] = bFormatObjectAvailable && bIsTextEdit; + m_aCommandAvailability[ u".uno:FontDialog"_ustr ] = (bShapeContext ? isShapeControllerCommandAvailable(u".uno:FontDialog"_ustr) : + bFormatObjectAvailable) && bIsTextEdit; m_aCommandAvailability[ u".uno:FormatAxis"_ustr ] = bFormatObjectAvailable; m_aCommandAvailability[ u".uno:FormatTitle"_ustr ] = bFormatObjectAvailable && !bIsTextEdit; m_aCommandAvailability[ u".uno:FormatDataSeries"_ustr ] = bFormatObjectAvailable; |