diff options
author | Tor Lillqvist <tml@collabora.com> | 2017-12-18 17:49:59 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2017-12-19 20:43:19 +0100 |
commit | fdbd3ac1880b3943e2cff48ecfb95dd088210d09 (patch) | |
tree | 43e14ea2f14e63ea11eae120f54abd232bdd8ae4 /sw/source/core/objectpositioning | |
parent | c7f528bbc8ad70fb869736ea810534e8210284b5 (diff) |
Get rid of a dynamic_cast
Add a virtual member function instead. This improves performance a
bit. The time to load a specific pathological customer document
dropped from 1min 53s to 1min 47s on my machine. Not hugely, but
clearly.
Change-Id: I1e59d601e9d0e14b6a756c6e0ad29ce2a1fce66d
Reviewed-on: https://gerrit.libreoffice.org/46791
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'sw/source/core/objectpositioning')
-rw-r--r-- | sw/source/core/objectpositioning/anchoredobjectposition.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx b/sw/source/core/objectpositioning/anchoredobjectposition.cxx index b1296b5eec13..bd11bac3523d 100644 --- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx @@ -511,7 +511,7 @@ SwTwips SwAnchoredObjectPosition::ImplAdjustVertRelPos( const SwTwips nTopOfAnch && nAdjustedRelPosY < nProposedRelPosY ) { const SwFrameFormat* pFormat = &(GetFrameFormat()); - if ( SwTextBoxHelper::isTextBox(&GetObject()) ) + if ( GetObject().IsTextBox() ) { // shrink textboxes to extend beyond the page bottom SwFrameFormat* pFrameFormat = ::FindFrameFormat(&GetObject()); |