[Libreoffice-commits] core.git: sw/source
Michael Meeks
michael.meeks at collabora.com
Fri Apr 21 13:12:59 UTC 2017
sw/source/core/layout/pagechg.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 6d61720907f3f3392f9987f7c21a91bf049d1be5
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Fri Apr 21 12:02:23 2017 +0100
Avoid un-necessary dynamic_cast slowing plain-text import significantly.
Change-Id: I5f3ff80b36220c80e777946f5f75354c4b6e4ab9
Reviewed-on: https://gerrit.libreoffice.org/36789
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
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();
}
More information about the Libreoffice-commits
mailing list