[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - chart2/source

Balazs Varga (via logerrit) logerrit at kemper.freedesktop.org
Tue Sep 29 17:15:29 UTC 2020


 chart2/source/controller/main/ChartController_Window.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 8c7bb2d43fefe66f0fed3971a84bcd1ee80ee0c2
Author:     Balazs Varga <balazs.varga991 at gmail.com>
AuthorDate: Thu Sep 3 14:53:19 2020 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Sep 29 19:14:56 2020 +0200

    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 at numbertext.org>
    Reviewed-by: László Németh <nemeth at numbertext.org>
    (cherry picked from commit c10d5854b5427ad1bfffc00e77a9306c99c78c63)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103586
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index 2ac9f4b7bbd5..1678168b0e00 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 );
             {


More information about the Libreoffice-commits mailing list