diff options
author | Matthias Huetsch [mhu] <matthias.huetsch@sun.com> | 2010-06-14 10:57:59 +0200 |
---|---|---|
committer | Matthias Huetsch [mhu] <matthias.huetsch@sun.com> | 2010-06-14 10:57:59 +0200 |
commit | f6a123d12d2abaaa73935f1439dfe622b26f4572 (patch) | |
tree | 6596579a328ce189eee96a2cc0be381a1c0b2c96 /sd/source/ui/view/Outliner.cxx | |
parent | e40e1248092748ac59f8ec76ddaf16c8b2417d6b (diff) | |
parent | f3b2db1efb379596f0269e439a35b5575b616b2c (diff) |
Update from master repository (DEV300_m82).
Diffstat (limited to 'sd/source/ui/view/Outliner.cxx')
-rwxr-xr-x | sd/source/ui/view/Outliner.cxx | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index a7c9786dd160..fd07d966ad47 100755 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -568,7 +568,8 @@ bool Outliner::StartSearchAndReplace (const SvxSearchItem* pSearchItem) void Outliner::Initialize (bool bDirectionIsForward) { - bool bOldDirectionIsForward = mbDirectionIsForward; + const bool bIsAtEnd (maObjectIterator == ::sd::outliner::OutlinerContainer(this).end()); + const bool bOldDirectionIsForward = mbDirectionIsForward; mbDirectionIsForward = bDirectionIsForward; if (maObjectIterator == ::sd::outliner::Iterator()) @@ -603,10 +604,19 @@ void Outliner::Initialize (bool bDirectionIsForward) { // Requested iteration direction has changed. Turn arround the iterator. maObjectIterator.Reverse(); - // The iterator has pointed to the object one ahead/before the current - // one. Now move it to the one before/ahead the current one. - ++maObjectIterator; - ++maObjectIterator; + if (bIsAtEnd) + { + // The iterator has pointed to end(), which after the search + // direction is reversed, becomes begin(). + maObjectIterator = ::sd::outliner::OutlinerContainer(this).begin(); + } + else + { + // The iterator has pointed to the object one ahead/before the current + // one. Now move it to the one before/ahead the current one. + ++maObjectIterator; + ++maObjectIterator; + } mbMatchMayExist = true; } |