sc/source/ui/unoobj/textuno.cxx | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-)
New commits: commit 06f86d544c8017c2e736bc77db27dd623853770b Author: Noel Grandin <[email protected]> Date: Mon May 28 10:19:25 2018 +0200 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 <[email protected]> Reviewed-by: Noel Grandin <[email protected]> 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<const ScUpdateRefHint*>(&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 } } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
