diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-28 10:19:25 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-28 13:28:03 +0200 |
commit | 06f86d544c8017c2e736bc77db27dd623853770b (patch) | |
tree | 5064cfcc974b28644b9a8af1f9c7535aca21fab6 /sc | |
parent | f122faeede515093cf9dc450c9b62fdaae603bef (diff) |
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 <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/unoobj/textuno.cxx | 25 |
1 files changed, 8 insertions, 17 deletions
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 } } |