diff options
author | obo <obo@openoffice.org> | 2010-06-09 15:49:40 +0200 |
---|---|---|
committer | obo <obo@openoffice.org> | 2010-06-09 15:49:40 +0200 |
commit | be83c369478adff5dc00f055953e41f71fdd7ca0 (patch) | |
tree | 3c2c3b101d7260b227693261804948fc4f433338 /sd | |
parent | 47b5ec4b0b48b7108715cb1e780ad3dca284cfa9 (diff) | |
parent | 03dba8e53007fc760780a8dffd057ec73158d3be (diff) |
CWS-TOOLING: integrate CWS findbar01
Diffstat (limited to 'sd')
-rwxr-xr-x | sd/source/ui/unoidl/DrawController.cxx | 12 | ||||
-rwxr-xr-x | sd/source/ui/view/Outliner.cxx | 20 | ||||
-rw-r--r-- | sd/uiconfig/sdraw/toolbar/findbar.xml | 8 | ||||
-rw-r--r-- | sd/uiconfig/simpress/toolbar/findbar.xml | 8 |
4 files changed, 43 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; } diff --git a/sd/uiconfig/sdraw/toolbar/findbar.xml b/sd/uiconfig/sdraw/toolbar/findbar.xml new file mode 100644 index 000000000000..9ef9d8a1a78f --- /dev/null +++ b/sd/uiconfig/sdraw/toolbar/findbar.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd"> +<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar"> + <toolbar:toolbaritem xlink:href=".uno:FindText" toolbar:helpid="helpid:100105" /> + <toolbar:toolbaritem xlink:href=".uno:DownSearch" toolbar:helpid="helpid:100105" /> + <toolbar:toolbaritem xlink:href=".uno:UpSearch" toolbar:helpid="helpid:100105" /> + <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:text="Find & Replace" toolbar:visible="false" toolbar:helpid="helpid:100105"/> +</toolbar:toolbar> diff --git a/sd/uiconfig/simpress/toolbar/findbar.xml b/sd/uiconfig/simpress/toolbar/findbar.xml new file mode 100644 index 000000000000..9ef9d8a1a78f --- /dev/null +++ b/sd/uiconfig/simpress/toolbar/findbar.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd"> +<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar"> + <toolbar:toolbaritem xlink:href=".uno:FindText" toolbar:helpid="helpid:100105" /> + <toolbar:toolbaritem xlink:href=".uno:DownSearch" toolbar:helpid="helpid:100105" /> + <toolbar:toolbaritem xlink:href=".uno:UpSearch" toolbar:helpid="helpid:100105" /> + <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:text="Find & Replace" toolbar:visible="false" toolbar:helpid="helpid:100105"/> +</toolbar:toolbar> |