Kaydet (Commit) ca644612 authored tarafından Radek Doulik's avatar Radek Doulik

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
üst 0e82afdc
...@@ -381,6 +381,7 @@ void Outliner::EndSpelling (void) ...@@ -381,6 +381,7 @@ void Outliner::EndSpelling (void)
mpWeakViewShell.reset(); mpWeakViewShell.reset();
mpView = NULL; mpView = NULL;
mpWindow = NULL; mpWindow = NULL;
mnStartPageIndex = (sal_uInt16) -1;
} }
...@@ -531,7 +532,6 @@ bool Outliner::StartSearchAndReplace (const SvxSearchItem* pSearchItem) ...@@ -531,7 +532,6 @@ bool Outliner::StartSearchAndReplace (const SvxSearchItem* pSearchItem)
// restore start position if nothing was found // restore start position if nothing was found
if(!mbStringFound) if(!mbStringFound)
RestoreStartPosition (); RestoreStartPosition ();
else
mnStartPageIndex = (sal_uInt16)-1; mnStartPageIndex = (sal_uInt16)-1;
} }
} }
...@@ -657,6 +657,7 @@ bool Outliner::SearchAndReplaceAll (void) ...@@ -657,6 +657,7 @@ bool Outliner::SearchAndReplaceAll (void)
} }
RestoreStartPosition (); RestoreStartPosition ();
mnStartPageIndex = (sal_uInt16)-1;
return true; return true;
} }
...@@ -870,6 +871,9 @@ void Outliner::RememberStartPosition (void) ...@@ -870,6 +871,9 @@ void Outliner::RememberStartPosition (void)
return; return;
} }
if ( mnStartPageIndex != (sal_uInt16) -1 )
return;
if (pViewShell->ISA(DrawViewShell)) if (pViewShell->ISA(DrawViewShell))
{ {
::boost::shared_ptr<DrawViewShell> pDrawViewShell ( ::boost::shared_ptr<DrawViewShell> pDrawViewShell (
......
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