diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2017-04-21 12:02:23 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2017-04-21 15:12:31 +0200 |
commit | 6d61720907f3f3392f9987f7c21a91bf049d1be5 (patch) | |
tree | 322aa53b527533bc4d55b17afc09f685773407a6 | |
parent | 0cdf41419af854acccee0f819d4add7e8cafb7dc (diff) |
Avoid un-necessary dynamic_cast slowing plain-text import significantly.
Change-Id: I5f3ff80b36220c80e777946f5f75354c4b6e4ab9
Reviewed-on: https://gerrit.libreoffice.org/36789
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r-- | sw/source/core/layout/pagechg.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 2481592f2a40..9f61fab99771 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -2249,8 +2249,8 @@ bool SwRootFrame::IsLeftToRightViewLayout() const // Layout direction determined by layout direction of the first page. // #i88036# // Only ask a non-empty page frame for its layout direction - const SwPageFrame& rPage = - dynamic_cast<const SwPageFrame&>(*Lower()).GetFormatPage(); + assert(dynamic_cast<const SwPageFrame *>(Lower()) != nullptr); + const SwPageFrame& rPage = static_cast<const SwPageFrame&>(*Lower()).GetFormatPage(); return !rPage.IsRightToLeft() && !rPage.IsVertical(); } |