summaryrefslogtreecommitdiffstats
path: root/chart2/source/controller/main
diff options
context:
space:
mode:
authorBalazs Varga <balazs.varga991@gmail.com>2020-09-03 14:53:19 +0200
committerLászló Németh <nemeth@numbertext.org>2020-09-07 12:45:01 +0200
commitc10d5854b5427ad1bfffc00e77a9306c99c78c63 (patch)
tree9a6420a8665b84e47d73ab309d29f42c57665a58 /chart2/source/controller/main
parentConfine findAnnotations to HAVE_FEATURE_PDFIUM (diff)
downloadcore-c10d5854b5427ad1bfffc00e77a9306c99c78c63.tar.gz
core-c10d5854b5427ad1bfffc00e77a9306c99c78c63.zip
tdf#136430 Fix chart crash trying to move data labels
with arrow keys. Change-Id: I357c320406d9f044b12b1289aa0f88045001c283 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102002 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'chart2/source/controller/main')
-rw-r--r--chart2/source/controller/main/ChartController_Window.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index 9e00bf784550..a7b6ee840b55 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -1765,6 +1765,12 @@ bool ChartController::impl_moveOrResizeObject(
{
bool bResult = false;
bool bNeedResize = ( eType == CENTERED_RESIZE_OBJECT );
+ ObjectType eObjectType = ObjectIdentifier::getObjectType(rCID);
+
+ /*TODO: Move data label objects with arrow-keys,
+ in that case we have to use CustomLabelPosition instead of RelativePosition!*/
+ if( eObjectType == OBJECTTYPE_DATA_LABEL )
+ return bResult;
uno::Reference< frame::XModel > xChartModel( getModel() );
uno::Reference< beans::XPropertySet > xObjProp(
@@ -1824,7 +1830,6 @@ bool ChartController::impl_moveOrResizeObject(
if( bNeedResize )
eActionType = ActionDescriptionProvider::ActionType::Resize;
- ObjectType eObjectType = ObjectIdentifier::getObjectType( rCID );
UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription(
eActionType, ObjectNameProvider::getName( eObjectType )), m_xUndoManager );
{