summaryrefslogtreecommitdiff
path: root/sd/source/ui
diff options
context:
space:
mode:
authorobo <obo@openoffice.org>2010-06-09 15:49:40 +0200
committerobo <obo@openoffice.org>2010-06-09 15:49:40 +0200
commitbe83c369478adff5dc00f055953e41f71fdd7ca0 (patch)
tree3c2c3b101d7260b227693261804948fc4f433338 /sd/source/ui
parent47b5ec4b0b48b7108715cb1e780ad3dca284cfa9 (diff)
parent03dba8e53007fc760780a8dffd057ec73158d3be (diff)
CWS-TOOLING: integrate CWS findbar01
Diffstat (limited to 'sd/source/ui')
-rwxr-xr-xsd/source/ui/unoidl/DrawController.cxx12
-rwxr-xr-xsd/source/ui/view/Outliner.cxx20
2 files changed, 27 insertions, 5 deletions
diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx
index 230feabe956a..b0eac4990c50 100755
--- a/sd/source/ui/unoidl/DrawController.cxx
+++ b/sd/source/ui/unoidl/DrawController.cxx
@@ -29,6 +29,7 @@
#include "precompiled_sd.hxx"
#include "DrawController.hxx"
+#include "DrawDocShell.hxx"
#include "DrawSubController.hxx"
#include "sdpage.hxx"
@@ -54,6 +55,7 @@
#include <svx/fmshell.hxx>
#include <vos/mutex.hxx>
#include <vcl/svapp.hxx>
+#include <boost/shared_ptr.hpp>
using namespace ::std;
using ::rtl::OUString;
@@ -164,6 +166,16 @@ void SAL_CALL DrawController::dispose (void)
{
mbDisposing = true;
+ boost::shared_ptr<ViewShell> pViewShell = mpBase->GetMainViewShell();
+ if ( pViewShell )
+ {
+ pViewShell->DeactivateCurrentFunction();
+ DrawDocShell* pDocShell = pViewShell->GetDocSh();
+ if ( pDocShell != NULL )
+ pDocShell->SetDocShellFunction(0);
+ }
+ pViewShell.reset();
+
// When the controller has not been detached from its view
// shell, i.e. mpViewShell is not NULL, then tell PaneManager
// and ViewShellManager to clear the shell stack.
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;
}