summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-05-28 10:19:25 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-05-30 08:39:42 +0200
commitc520c7de690b0de826467758bfd9313b287e1956 (patch)
tree2ca68ed71f3c3397c7fbe92963b906817df336a8
parent7753fe2d3a6ffd421af4fb4ce4dcebbf0377a765 (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> (cherry picked from commit 06f86d544c8017c2e736bc77db27dd623853770b) Reviewed-on: https://gerrit.libreoffice.org/54916
-rw-r--r--sc/source/ui/unoobj/textuno.cxx25
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
}
}