sw/source/uibase/shells/txtcrsr.cxx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)
New commits: commit bc84b64c59aaa513142f41b261b1f10820c4a953 Author: Michael Stahl <mst...@redhat.com> Date: Mon Dec 15 16:33:05 2014 +0100 fdo#82614: sw: Revert "Simplify code path" This reverts commit 07c00671443f3f0a2e2e6c3a54c391f040e8fd2b. The bug is because the check of the GotoHeaderTxt() is inverted. Actually in the old code it is a bit easier to understand what is intended, even though it is more verbose, so just revert the commit. (cherry picked from commit 86910c87c193345e5e36104e21b8e26790d6846d) diff --git a/sw/source/uibase/shells/txtcrsr.cxx b/sw/source/uibase/shells/txtcrsr.cxx index 151212e..cadbbe1 100644 --- a/sw/source/uibase/shells/txtcrsr.cxx +++ b/sw/source/uibase/shells/txtcrsr.cxx @@ -362,14 +362,26 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq) break; case FN_TO_HEADER: rSh.MoveCrsr(); - if ( ( FRMTYPE_HEADER & rSh.GetFrmType(0,false) ) || rSh.GotoHeaderTxt() ) + if ( FRMTYPE_HEADER & rSh.GetFrmType(0,false) ) rSh.SttPg(); + else + { + bool bMoved = rSh.GotoHeaderTxt(); + if ( !bMoved ) + rSh.SttPg(); + } bSetRetVal = false; break; case FN_TO_FOOTER: rSh.MoveCrsr(); - if ( ( FRMTYPE_FOOTER & rSh.GetFrmType(0,false) ) || rSh.GotoFooterTxt() ) + if ( FRMTYPE_FOOTER & rSh.GetFrmType(0,false) ) rSh.EndPg(); + else + { + bool bMoved = rSh.GotoFooterTxt(); + if ( !bMoved ) + rSh.EndPg(); + } bSetRetVal = false; break; case FN_FOOTNOTE_TO_ANCHOR: _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits