From 06f86d544c8017c2e736bc77db27dd623853770b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 28 May 2018 10:19:25 +0200 Subject: tdf#100756 slowdown in manipulating spreadsheet via UNO regression from commit 5bce32904091ffe28884fd5c0f4801ee82bad101 SfxHint: convert home-grown RTTI to normal C++ RTTI the cost does seem in this case to be mostly the dynamic_cast, but since we don't need it anymore, just remove it Change-Id: Icbf51b89c036b86cfb3e4c2a827228ccf25bb3a6 Reviewed-on: https://gerrit.libreoffice.org/54899 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sc/source/ui/unoobj/textuno.cxx | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'sc/source/ui/unoobj') diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx index d868dffd3a84..49fc91b2037a 100644 --- a/sc/source/ui/unoobj/textuno.cxx +++ b/sc/source/ui/unoobj/textuno.cxx @@ -987,27 +987,18 @@ void ScCellTextData::UpdateData() void ScCellTextData::Notify( SfxBroadcaster&, const SfxHint& rHint ) { - if ( dynamic_cast(&rHint) ) + const SfxHintId nId = rHint.GetId(); + if ( nId == SfxHintId::Dying ) { -// const ScUpdateRefHint& rRef = (const ScUpdateRefHint&)rHint; + pDocShell = nullptr; // invalid now - //! Ref-Update + DELETEZ( pForwarder ); + pEditEngine.reset(); // EditEngine uses document's pool } - else + else if ( nId == SfxHintId::DataChanged ) { - const SfxHintId nId = rHint.GetId(); - if ( nId == SfxHintId::Dying ) - { - pDocShell = nullptr; // invalid now - - DELETEZ( pForwarder ); - pEditEngine.reset(); // EditEngine uses document's pool - } - else if ( nId == SfxHintId::DataChanged ) - { - if (!bInUpdate) // not for own UpdateData calls - bDataValid = false; // text has to be read from the cell again - } + if (!bInUpdate) // not for own UpdateData calls + bDataValid = false; // text has to be read from the cell again } } -- cgit