summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-12-15 16:33:05 +0100
committerMichael Stahl <mstahl@redhat.com>2014-12-15 16:41:20 +0100
commitbc84b64c59aaa513142f41b261b1f10820c4a953 (patch)
tree20b847c8c6768d822fb76818d5f320eabcb55735 /sw
parent84ce458a841f9b09b87ff045403b546c88c79168 (diff)
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)
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/shells/txtcrsr.cxx16
1 files changed, 14 insertions, 2 deletions
diff --git a/sw/source/uibase/shells/txtcrsr.cxx b/sw/source/uibase/shells/txtcrsr.cxx
index 151212e4198d..cadbbe1e351f 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: