diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2020-08-22 21:45:44 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2020-08-29 13:14:04 +0200 |
commit | 2ebc26aeefefe33ee6180862509e4971ff2dfc6f (patch) | |
tree | 9540fbb5cf497e907b738c59a83a338ce643e975 /sd/source/ui/func | |
parent | 88e52e539eaf7981441ec3e042f321c2615919ca (diff) |
sd: Make search bound to a view - to allow independent searching
Before if two windows are open, the search is not independent
because Outline class is not independent for a view (because of
FuSearch which remembers the view from when the it was created
and then an instance is stored in the DocShell).
This creates a SearchContext class stored on a View, which stores
the actual View bound FuSearch instance, fix us the calls.
Also move the VectorGraphicSearchContext back into Outline::Impl,
because it doesn't need to be bound to the view anymore.
Change-Id: I6a5ce71efafa378845eee4ac9574e2e4301138d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101224
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sd/source/ui/func')
-rw-r--r-- | sd/source/ui/func/fusearch.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sd/source/ui/func/fusearch.cxx b/sd/source/ui/func/fusearch.cxx index 08eee2d9a76e..8e07d5b18310 100644 --- a/sd/source/ui/func/fusearch.cxx +++ b/sd/source/ui/func/fusearch.cxx @@ -57,13 +57,18 @@ FuSearch::FuSearch ( { } -rtl::Reference<FuPoor> FuSearch::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq ) +FuSearch* FuSearch::createPtr(ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq) { - rtl::Reference<FuPoor> xFunc( new FuSearch( pViewSh, pWin, pView, pDoc, rReq ) ); + FuSearch* xFunc( new FuSearch( pViewSh, pWin, pView, pDoc, rReq ) ); xFunc->DoExecute(rReq); return xFunc; } +rtl::Reference<FuPoor> FuSearch::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq ) +{ + return rtl::Reference<FuPoor>(createPtr(pViewSh, pWin, pView, pDoc, rReq)); +} + void FuSearch::DoExecute( SfxRequest& ) { mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArraySpell ); |