summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorRadek Doulik <rodo@novell.com>2012-06-26 12:25:03 +0200
committerMichael Meeks <michael.meeks@suse.com>2012-11-08 16:30:58 +0000
commit28000074f7c25f252a900276a671caf52d0f6812 (patch)
treec8e10bc42db0b5bf2ceb36bf84e2f254020c2cb2 /sd
parent7ec1ae356a6b06a31fca68eb30c706b906d75fdd (diff)
remember spell check/find&replace start position only 1st time
- use mnStartPageIndex as indicator, -1 means it wasn't set yet otherwise it is set. reset it to -1 at the end of spell check and find&replace Change-Id: Ic45106b019d3c1a0232fe3d766aab07bbcd24d2c Signed-off-by: Michael Meeks <michael.meeks@suse.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/Outliner.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index e7100e7f1759..43aa50210251 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -381,6 +381,7 @@ void Outliner::EndSpelling (void)
mpWeakViewShell.reset();
mpView = NULL;
mpWindow = NULL;
+ mnStartPageIndex = (sal_uInt16) -1;
}
@@ -531,8 +532,7 @@ bool Outliner::StartSearchAndReplace (const SvxSearchItem* pSearchItem)
// restore start position if nothing was found
if(!mbStringFound)
RestoreStartPosition ();
- else
- mnStartPageIndex = (sal_uInt16)-1;
+ mnStartPageIndex = (sal_uInt16)-1;
}
}
else
@@ -657,6 +657,7 @@ bool Outliner::SearchAndReplaceAll (void)
}
RestoreStartPosition ();
+ mnStartPageIndex = (sal_uInt16)-1;
return true;
}
@@ -870,6 +871,9 @@ void Outliner::RememberStartPosition (void)
return;
}
+ if ( mnStartPageIndex != (sal_uInt16) -1 )
+ return;
+
if (pViewShell->ISA(DrawViewShell))
{
::boost::shared_ptr<DrawViewShell> pDrawViewShell (