Kaydet (Commit) 86910c87 authored tarafından Michael Stahl's avatar Michael Stahl

fdo#82614: sw: Revert "Simplify code path"

This reverts commit 07c00671.

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.
üst 90a94db7
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment