[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - sw/source
Michael Meeks
michael.meeks at collabora.com
Mon Apr 24 17:38:23 UTC 2017
sw/source/core/layout/pagechg.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 7e8141db8e4e17636a32a08e01190e44368f5b77
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>
(cherry picked from commit 6d61720907f3f3392f9987f7c21a91bf049d1be5)
Reviewed-on: https://gerrit.libreoffice.org/36799
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 8405280e5169..ef167d34cf99 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -2248,8 +2248,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