From 61e28e86ed30fb37df96c7fd0807b5aaeacf5eea Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Wed, 5 Feb 2014 14:15:33 +0100 Subject: [PATCH] add a way to dump chart content to console CTRL + F12 will dump the chart with the XShapeDumper Change-Id: I1f40ddf7f51c2038be7af8fc56f626393f11da90 --- .../controller/main/ChartController_Window.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index 896273b7ff38..439c13cd9993 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -1302,6 +1302,7 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt ) KeyCode aKeyCode( rKEvt.GetKeyCode()); sal_uInt16 nCode = aKeyCode.GetCode(); bool bAlternate = aKeyCode.IsMod2(); + bool bCtrl = aKeyCode.IsMod1(); if( m_apAccelExecute.get() ) bReturn = m_apAccelExecute->execute( aKeyCode ); @@ -1501,6 +1502,17 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt ) } } + // dumping the shape + if( !bReturn && bCtrl && nCode == KEY_F12) + { + uno::Reference< qa::XDumper > xChartModel( getModel(), uno::UNO_QUERY ); + if(xChartModel.is()) + { + OUString aDump = xChartModel->dump(); + SAL_WARN("chart2", aDump); + } + } + // text edit if( ! bReturn && nCode == KEY_F2 )