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:37:50 +0100
commit86910c87c193345e5e36104e21b8e26790d6846d (patch)
tree609f8f1bc1b03435ce3b53d78aab356f40d55ab8 /sw
parent90a94db73c6c9c1ec0a10e248fd8c1eff955b375 (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.
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 871eb5acc900..d33e34adaaf3 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: