diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-11-02 19:39:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-11-02 20:30:29 +0100 |
commit | 4d863fd8e38748607636d0033262baa62a3e9eb2 (patch) | |
tree | de15f5cd695199cfd56f1893bbb31cf06fc044d1 /chart2 | |
parent | 1a4151dcdf45a0fa946b6ddf5e1b5cca37d24619 (diff) |
tdf#54857 elide more dynamic_cast
Change-Id: I42bef355eeef15e3733a5ee57b0569887cfa5e84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142183
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/main/ChartController_Window.cxx | 2 | ||||
-rw-r--r-- | chart2/source/controller/main/DrawCommandDispatch.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index 91295002cf03..018419b0eacf 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -957,7 +957,7 @@ void ChartController::execute_DoubleClick( const Point* pMousePixel ) { // #i12587# support for shapes in chart SdrObject* pObj = DrawViewWrapper::getSdrObject( m_aSelection.getSelectedAdditionalShape() ); - if ( dynamic_cast< const SdrTextObj* >(pObj) != nullptr ) + if ( DynCastSdrTextObj(pObj) != nullptr ) { bEditText = true; } diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx index 9d896b75425e..18dfda1de4a4 100644 --- a/chart2/source/controller/main/DrawCommandDispatch.cxx +++ b/chart2/source/controller/main/DrawCommandDispatch.cxx @@ -473,7 +473,7 @@ rtl::Reference<SdrObject> DrawCommandDispatch::createDefaultObject( const sal_uI case COMMAND_ID_DRAW_TEXT: case COMMAND_ID_DRAW_TEXT_VERTICAL: { - if ( SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>( pObj.get()) ) + if ( SdrTextObj* pTextObj = DynCastSdrTextObj( pObj.get()) ) { pTextObj->SetLogicRect( aRect ); bool bVertical = ( nID == COMMAND_ID_DRAW_TEXT_VERTICAL ); |