1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <tbunosearchcontrollers.hxx>
22 #include <svx/dialogs.hrc>
23 #include <svx/dialmgr.hxx>
25 #include <comphelper/processfactory.hxx>
26 #include <cppuhelper/queryinterface.hxx>
27 #include <cppuhelper/supportsservice.hxx>
28 #include <com/sun/star/beans/XPropertySet.hpp>
29 #include <com/sun/star/frame/XLayoutManager.hpp>
30 #include <com/sun/star/i18n/TransliterationModules.hpp>
31 #include <com/sun/star/i18n/TransliterationModulesExtra.hpp>
32 #include <com/sun/star/text/XTextRange.hpp>
33 #include <com/sun/star/ui/XUIElement.hpp>
34 #include <com/sun/star/util/URL.hpp>
35 #include <com/sun/star/util/URLTransformer.hpp>
37 #include <svl/ctloptions.hxx>
38 #include <svl/srchitem.hxx>
39 #include <toolkit/helper/vclunohelper.hxx>
40 #include <vcl/toolbox.hxx>
41 #include <vcl/svapp.hxx>
42 #include <osl/mutex.hxx>
43 #include <rtl/ref.hxx>
44 #include <rtl/instance.hxx>
45 #include <svx/srchdlg.hxx>
47 #include <vcl/fixed.hxx>
53 static const char SEARCHITEM_COMMAND
[] = "SearchItem.Command";
54 static const char SEARCHITEM_SEARCHSTRING
[] = "SearchItem.SearchString";
55 static const char SEARCHITEM_SEARCHBACKWARD
[] = "SearchItem.Backward";
56 static const char SEARCHITEM_SEARCHFLAGS
[] = "SearchItem.SearchFlags";
57 static const char SEARCHITEM_TRANSLITERATEFLAGS
[] = "SearchItem.TransliterateFlags";
58 static const char SEARCHITEM_ALGORITHMTYPE
[] = "SearchItem.AlgorithmType";
60 static const char COMMAND_EXECUTESEARCH
[] = ".uno:ExecuteSearch";
61 static const char COMMAND_FINDTEXT
[] = ".uno:FindText";
62 static const char COMMAND_DOWNSEARCH
[] = ".uno:DownSearch";
63 static const char COMMAND_UPSEARCH
[] = ".uno:UpSearch";
64 static const char COMMAND_EXITSEARCH
[] = ".uno:ExitSearch";
65 static const char COMMAND_MATCHCASE
[] = ".uno:MatchCase";
66 static const char COMMAND_APPENDSEARCHHISTORY
[] = "AppendSearchHistory";
68 static const sal_Int32 REMEMBER_SIZE
= 10;
70 void impl_executeSearch( const css::uno::Reference
< css::uno::XComponentContext
>& rxContext
,
71 const css::uno::Reference
< css::frame::XFrame
>& xFrame
,
72 const ToolBox
* pToolBox
,
73 const bool aSearchBackwards
= false,
74 const bool aFindAll
= false )
76 css::uno::Reference
< css::util::XURLTransformer
> xURLTransformer( css::util::URLTransformer::create( rxContext
) );
78 aURL
.Complete
= COMMAND_EXECUTESEARCH
;
79 xURLTransformer
->parseStrict(aURL
);
82 bool aMatchCase
= false;
85 sal_uInt16 nItemCount
= pToolBox
->GetItemCount();
86 for ( sal_uInt16 i
=0; i
<nItemCount
; ++i
)
88 OUString sItemCommand
= pToolBox
->GetItemCommand(i
);
89 if ( sItemCommand
== COMMAND_FINDTEXT
)
91 vcl::Window
* pItemWin
= pToolBox
->GetItemWindow(i
);
93 sFindText
= pItemWin
->GetText();
94 } else if ( sItemCommand
== COMMAND_MATCHCASE
)
96 CheckBox
* pItemWin
= static_cast<CheckBox
*>( pToolBox
->GetItemWindow(i
) );
98 aMatchCase
= pItemWin
->IsChecked();
103 css::uno::Sequence
< css::beans::PropertyValue
> lArgs(6);
104 lArgs
[0].Name
= SEARCHITEM_SEARCHSTRING
;
105 lArgs
[0].Value
<<= sFindText
;
106 lArgs
[1].Name
= SEARCHITEM_SEARCHBACKWARD
;
107 lArgs
[1].Value
<<= aSearchBackwards
;
108 lArgs
[2].Name
= SEARCHITEM_SEARCHFLAGS
;
109 lArgs
[2].Value
<<= (sal_Int32
)0;
110 lArgs
[3].Name
= SEARCHITEM_TRANSLITERATEFLAGS
;
111 SvtCTLOptions aCTLOptions
;
112 sal_Int32 nFlags
= 0;
113 nFlags
|= (!aMatchCase
? static_cast<int>(com::sun::star::i18n::TransliterationModules_IGNORE_CASE
) : 0);
114 nFlags
|= (aCTLOptions
.IsCTLFontEnabled() ? com::sun::star::i18n::TransliterationModulesExtra::IGNORE_DIACRITICS_CTL
:0 );
115 nFlags
|= (aCTLOptions
.IsCTLFontEnabled() ? com::sun::star::i18n::TransliterationModulesExtra::IGNORE_KASHIDA_CTL
:0 );
116 lArgs
[3].Value
<<= nFlags
;
117 lArgs
[4].Name
= SEARCHITEM_COMMAND
;
118 lArgs
[4].Value
<<= (sal_Int16
)(aFindAll
?
119 SvxSearchCmd::FIND_ALL
: SvxSearchCmd::FIND
);
120 lArgs
[5].Name
= SEARCHITEM_ALGORITHMTYPE
;
121 lArgs
[5].Value
<<= (sal_Int16
)0; // 0 == SearchAlgorithms_ABSOLUTE
123 css::uno::Reference
< css::frame::XDispatchProvider
> xDispatchProvider(xFrame
, css::uno::UNO_QUERY
);
124 if ( xDispatchProvider
.is() )
126 css::uno::Reference
< css::frame::XDispatch
> xDispatch
= xDispatchProvider
->queryDispatch( aURL
, OUString(), 0 );
127 if ( xDispatch
.is() && !aURL
.Complete
.isEmpty() )
128 xDispatch
->dispatch( aURL
, lArgs
);
132 FindTextFieldControl::FindTextFieldControl( vcl::Window
* pParent
, WinBits nStyle
,
133 css::uno::Reference
< css::frame::XFrame
>& xFrame
,
134 const css::uno::Reference
< css::uno::XComponentContext
>& xContext
) :
135 ComboBox( pParent
, nStyle
),
139 SetPlaceholderText(SVX_RESSTR(RID_SVXSTR_FINDBAR_FIND
));
140 EnableAutocomplete(true, true);
143 void FindTextFieldControl::Remember_Impl(const OUString
& rStr
)
145 sal_uInt16 nCount
= GetEntryCount();
147 for (sal_uInt16 i
=0; i
<nCount
; ++i
)
149 if ( rStr
== GetEntry(i
))
153 if (nCount
== REMEMBER_SIZE
)
154 RemoveEntryAt(REMEMBER_SIZE
-1);
156 InsertEntry(rStr
, 0);
159 void FindTextFieldControl::SetTextToSelected_Impl()
165 css::uno::Reference
<css::frame::XController
> xController(m_xFrame
->getController(), css::uno::UNO_QUERY_THROW
);
166 css::uno::Reference
<css::frame::XModel
> xModel(xController
->getModel(), css::uno::UNO_QUERY_THROW
);
167 css::uno::Reference
<css::container::XIndexAccess
> xIndexAccess(xModel
->getCurrentSelection(), css::uno::UNO_QUERY_THROW
);
168 if (xIndexAccess
->getCount() > 0)
170 css::uno::Reference
<css::text::XTextRange
> xTextRange(xIndexAccess
->getByIndex(0), css::uno::UNO_QUERY_THROW
);
171 aString
= xTextRange
->getString();
178 if ( !aString
.isEmpty() )
180 // If something is selected in the document, prepopulate with this
182 GetModifyHdl().Call(this); // FIXME why SetText doesn't trigger this?
184 else if (GetEntryCount() > 0)
186 // Else, prepopulate with last search word (fdo#84256)
187 SetText(GetEntry(0));
191 bool FindTextFieldControl::PreNotify( NotifyEvent
& rNEvt
)
193 bool nRet
= ComboBox::PreNotify( rNEvt
);
195 switch ( rNEvt
.GetType() )
197 case MouseNotifyEvent::KEYINPUT
:
199 // Clear SearchLabel when altering the search string
200 #if HAVE_FEATURE_DESKTOP
201 SvxSearchDialogWrapper::SetSearchLabel(SL_Empty
);
204 const KeyEvent
* pKeyEvent
= rNEvt
.GetKeyEvent();
205 bool bShift
= pKeyEvent
->GetKeyCode().IsShift();
206 bool bMod1
= pKeyEvent
->GetKeyCode().IsMod1();
207 sal_uInt16 nCode
= pKeyEvent
->GetKeyCode().GetCode();
209 // Close the search bar on Escape
210 if ( KEY_ESCAPE
== nCode
)
213 GrabFocusToDocument();
216 css::uno::Reference
< css::beans::XPropertySet
> xPropSet(m_xFrame
, css::uno::UNO_QUERY
);
219 css::uno::Reference
< css::frame::XLayoutManager
> xLayoutManager
;
220 css::uno::Any aValue
= xPropSet
->getPropertyValue("LayoutManager");
221 aValue
>>= xLayoutManager
;
222 if (xLayoutManager
.is())
224 const OUString
sResourceURL( "private:resource/toolbar/findbar" );
225 xLayoutManager
->hideElement( sResourceURL
);
226 xLayoutManager
->destroyElement( sResourceURL
);
230 // Select text in the search box when Ctrl-F pressed
231 if ( bMod1
&& nCode
== KEY_F
)
232 SetSelection( Selection( SELECTION_MIN
, SELECTION_MAX
) );
234 // Execute the search when Return, Ctrl-G or F3 pressed
235 if ( KEY_RETURN
== nCode
|| (bMod1
&& (KEY_G
== nCode
)) || (KEY_F3
== nCode
) )
237 Remember_Impl(GetText());
239 vcl::Window
* pWindow
= GetParent();
240 ToolBox
* pToolBox
= static_cast<ToolBox
*>(pWindow
);
242 impl_executeSearch( m_xContext
, m_xFrame
, pToolBox
, bShift
);
248 case MouseNotifyEvent::GETFOCUS
:
249 SetSelection( Selection( SELECTION_MIN
, SELECTION_MAX
) );
259 SearchToolbarControllersManager::SearchToolbarControllersManager()
263 SearchToolbarControllersManager::~SearchToolbarControllersManager()
269 class theSearchToolbarControllersManager
270 : public rtl::Static
<SearchToolbarControllersManager
,
271 theSearchToolbarControllersManager
>
276 SearchToolbarControllersManager
& SearchToolbarControllersManager::createControllersManager()
278 return theSearchToolbarControllersManager::get();
281 void SearchToolbarControllersManager::saveSearchHistory(const FindTextFieldControl
* pFindTextFieldControl
)
283 sal_uInt16
nECount( pFindTextFieldControl
->GetEntryCount() );
284 m_aSearchStrings
.resize( nECount
);
285 for( sal_uInt16 i
=0; i
<nECount
; ++i
)
287 m_aSearchStrings
[i
] = pFindTextFieldControl
->GetEntry(i
);
291 void SearchToolbarControllersManager::loadSearchHistory(FindTextFieldControl
* pFindTextFieldControl
)
293 for( sal_uInt16 i
=0; i
<m_aSearchStrings
.size(); ++i
)
295 pFindTextFieldControl
->InsertEntry(m_aSearchStrings
[i
],i
);
299 void SearchToolbarControllersManager::registryController( const css::uno::Reference
< css::frame::XFrame
>& xFrame
, const css::uno::Reference
< css::frame::XStatusListener
>& xStatusListener
, const OUString
& sCommandURL
)
301 SearchToolbarControllersMap::iterator pIt
= aSearchToolbarControllersMap
.find(xFrame
);
302 if (pIt
== aSearchToolbarControllersMap
.end())
304 SearchToolbarControllersVec
lControllers(1);
305 lControllers
[0].Name
= sCommandURL
;
306 lControllers
[0].Value
<<= xStatusListener
;
307 aSearchToolbarControllersMap
.insert(SearchToolbarControllersMap::value_type(xFrame
, lControllers
));
311 sal_Int32 nSize
= pIt
->second
.size();
312 for (sal_Int32 i
=0; i
<nSize
; ++i
)
314 if (pIt
->second
[i
].Name
.equals(sCommandURL
))
318 pIt
->second
.resize(nSize
+1);
319 pIt
->second
[nSize
].Name
= sCommandURL
;
320 pIt
->second
[nSize
].Value
<<= xStatusListener
;
324 void SearchToolbarControllersManager::freeController( const css::uno::Reference
< css::frame::XFrame
>& xFrame
, const css::uno::Reference
< css::frame::XStatusListener
>& /*xStatusListener*/, const OUString
& sCommandURL
)
326 SearchToolbarControllersMap::iterator pIt
= aSearchToolbarControllersMap
.find(xFrame
);
327 if (pIt
!= aSearchToolbarControllersMap
.end())
329 for (SearchToolbarControllersVec::iterator pItCtrl
=pIt
->second
.begin(); pItCtrl
!=pIt
->second
.end(); ++pItCtrl
)
331 if (pItCtrl
->Name
.equals(sCommandURL
))
333 pIt
->second
.erase(pItCtrl
);
338 if (pIt
->second
.empty())
339 aSearchToolbarControllersMap
.erase(pIt
);
343 css::uno::Reference
< css::frame::XStatusListener
> SearchToolbarControllersManager::findController( const css::uno::Reference
< css::frame::XFrame
>& xFrame
, const OUString
& sCommandURL
)
345 css::uno::Reference
< css::frame::XStatusListener
> xStatusListener
;
347 SearchToolbarControllersMap::iterator pIt
= aSearchToolbarControllersMap
.find(xFrame
);
348 if (pIt
!= aSearchToolbarControllersMap
.end())
350 for (SearchToolbarControllersVec::iterator pItCtrl
=pIt
->second
.begin(); pItCtrl
!= pIt
->second
.end(); ++pItCtrl
)
352 if (pItCtrl
->Name
.equals(sCommandURL
))
354 pItCtrl
->Value
>>= xStatusListener
;
360 return xStatusListener
;
363 FindTextToolbarController::FindTextToolbarController( const css::uno::Reference
< css::uno::XComponentContext
>& rxContext
)
364 : svt::ToolboxController(rxContext
, css::uno::Reference
< css::frame::XFrame
>(), OUString(COMMAND_FINDTEXT
))
365 , m_pFindTextFieldControl(NULL
)
371 FindTextToolbarController::~FindTextToolbarController()
376 css::uno::Any SAL_CALL
FindTextToolbarController::queryInterface( const css::uno::Type
& aType
) throw ( css::uno::RuntimeException
, std::exception
)
378 css::uno::Any a
= ToolboxController::queryInterface( aType
);
382 return ::cppu::queryInterface( aType
, static_cast< css::lang::XServiceInfo
* >( this ) );
385 void SAL_CALL
FindTextToolbarController::acquire() throw ()
387 ToolboxController::acquire();
390 void SAL_CALL
FindTextToolbarController::release() throw ()
392 ToolboxController::release();
396 OUString SAL_CALL
FindTextToolbarController::getImplementationName() throw( css::uno::RuntimeException
, std::exception
)
398 return OUString("com.sun.star.svx.FindTextToolboxController");
401 sal_Bool SAL_CALL
FindTextToolbarController::supportsService( const OUString
& ServiceName
) throw( css::uno::RuntimeException
, std::exception
)
403 return cppu::supportsService(this, ServiceName
);
406 css::uno::Sequence
< OUString
> SAL_CALL
FindTextToolbarController::getSupportedServiceNames() throw( css::uno::RuntimeException
, std::exception
)
408 css::uno::Sequence
< OUString
> aSNS( 1 );
409 aSNS
[0] = "com.sun.star.frame.ToolbarController";
414 void SAL_CALL
FindTextToolbarController::dispose() throw ( css::uno::RuntimeException
, std::exception
)
416 SolarMutexGuard aSolarMutexGuard
;
418 SearchToolbarControllersManager::createControllersManager().freeController(m_xFrame
, css::uno::Reference
< css::frame::XStatusListener
>(static_cast< ::cppu::OWeakObject
* >(this), css::uno::UNO_QUERY
), m_aCommandURL
);
420 svt::ToolboxController::dispose();
421 if (m_pFindTextFieldControl
!= nullptr) {
422 SearchToolbarControllersManager::createControllersManager()
423 .saveSearchHistory(m_pFindTextFieldControl
);
424 m_pFindTextFieldControl
.disposeAndClear();
429 void SAL_CALL
FindTextToolbarController::initialize( const css::uno::Sequence
< ::com::sun::star::uno::Any
>& aArguments
) throw ( css::uno::Exception
, css::uno::RuntimeException
, std::exception
)
431 svt::ToolboxController::initialize(aArguments
);
433 vcl::Window
* pWindow
= VCLUnoHelper::GetWindow( getParent() );
434 ToolBox
* pToolBox
= static_cast<ToolBox
*>(pWindow
);
437 sal_uInt16 nItemCount
= pToolBox
->GetItemCount();
438 for ( sal_uInt16 i
=0; i
<nItemCount
; ++i
)
440 OUString sItemCommand
= pToolBox
->GetItemCommand(i
);
441 if ( sItemCommand
== COMMAND_DOWNSEARCH
)
443 pToolBox
->EnableItem(i
, false);
446 else if ( sItemCommand
== COMMAND_UPSEARCH
)
448 pToolBox
->EnableItem(i
, false);
454 SearchToolbarControllersManager::createControllersManager().registryController(m_xFrame
, css::uno::Reference
< css::frame::XStatusListener
>(static_cast< ::cppu::OWeakObject
* >(this), css::uno::UNO_QUERY
), m_aCommandURL
);
457 css::uno::Reference
< css::awt::XWindow
> SAL_CALL
FindTextToolbarController::createItemWindow( const css::uno::Reference
< css::awt::XWindow
>& Parent
) throw ( css::uno::RuntimeException
, std::exception
)
459 css::uno::Reference
< css::awt::XWindow
> xItemWindow
;
461 css::uno::Reference
< css::awt::XWindow
> xParent( Parent
);
462 vcl::Window
* pParent
= VCLUnoHelper::GetWindow( xParent
);
465 ToolBox
* pToolbar
= static_cast<ToolBox
*>(pParent
);
466 m_pFindTextFieldControl
= VclPtr
<FindTextFieldControl
>::Create( pToolbar
, WinBits( WB_DROPDOWN
| WB_VSCROLL
), m_xFrame
, m_xContext
);
468 Size
aSize(250, m_pFindTextFieldControl
->GetTextHeight() + 200);
469 m_pFindTextFieldControl
->SetSizePixel( aSize
);
470 m_pFindTextFieldControl
->SetModifyHdl(LINK(this, FindTextToolbarController
, EditModifyHdl
));
471 SearchToolbarControllersManager::createControllersManager().loadSearchHistory(m_pFindTextFieldControl
);
473 xItemWindow
= VCLUnoHelper::GetInterface( m_pFindTextFieldControl
);
479 void SAL_CALL
FindTextToolbarController::statusChanged( const css::frame::FeatureStateEvent
& rEvent
) throw ( css::uno::RuntimeException
, std::exception
)
481 SolarMutexGuard aSolarMutexGuard
;
485 OUString aFeatureURL
= rEvent
.FeatureURL
.Complete
;
486 if ( aFeatureURL
== "AppendSearchHistory" )
488 m_pFindTextFieldControl
->Remember_Impl(m_pFindTextFieldControl
->GetText());
492 IMPL_LINK_NOARG(FindTextToolbarController
, EditModifyHdl
)
494 // enable or disable item DownSearch/UpSearch of findbar
495 vcl::Window
* pWindow
= VCLUnoHelper::GetWindow( getParent() );
496 ToolBox
* pToolBox
= static_cast<ToolBox
*>(pWindow
);
497 if ( pToolBox
&& m_pFindTextFieldControl
)
499 if (!m_pFindTextFieldControl
->GetText().isEmpty())
501 if ( !pToolBox
->IsItemEnabled(m_nDownSearchId
) )
502 pToolBox
->EnableItem(m_nDownSearchId
, true);
503 if ( !pToolBox
->IsItemEnabled(m_nUpSearchId
) )
504 pToolBox
->EnableItem(m_nUpSearchId
, true);
508 if ( pToolBox
->IsItemEnabled(m_nDownSearchId
) )
509 pToolBox
->EnableItem(m_nDownSearchId
, false);
510 if ( pToolBox
->IsItemEnabled(m_nUpSearchId
) )
511 pToolBox
->EnableItem(m_nUpSearchId
, false);
518 UpDownSearchToolboxController::UpDownSearchToolboxController( const css::uno::Reference
< css::uno::XComponentContext
> & rxContext
, Type eType
)
519 : svt::ToolboxController( rxContext
,
520 css::uno::Reference
< css::frame::XFrame
>(),
521 (eType
== UP
) ? OUString( COMMAND_UPSEARCH
): OUString( COMMAND_DOWNSEARCH
) ),
526 UpDownSearchToolboxController::~UpDownSearchToolboxController()
531 css::uno::Any SAL_CALL
UpDownSearchToolboxController::queryInterface( const css::uno::Type
& aType
) throw ( css::uno::RuntimeException
, std::exception
)
533 css::uno::Any a
= ToolboxController::queryInterface( aType
);
537 return ::cppu::queryInterface( aType
, static_cast< css::lang::XServiceInfo
* >( this ) );
540 void SAL_CALL
UpDownSearchToolboxController::acquire() throw ()
542 ToolboxController::acquire();
545 void SAL_CALL
UpDownSearchToolboxController::release() throw ()
547 ToolboxController::release();
551 OUString SAL_CALL
UpDownSearchToolboxController::getImplementationName() throw( css::uno::RuntimeException
, std::exception
)
553 return meType
== UpDownSearchToolboxController::UP
?
554 OUString( "com.sun.star.svx.UpSearchToolboxController" ) :
555 OUString( "com.sun.star.svx.DownSearchToolboxController" );
558 sal_Bool SAL_CALL
UpDownSearchToolboxController::supportsService( const OUString
& ServiceName
) throw( css::uno::RuntimeException
, std::exception
)
560 return cppu::supportsService(this, ServiceName
);
563 css::uno::Sequence
< OUString
> SAL_CALL
UpDownSearchToolboxController::getSupportedServiceNames() throw( css::uno::RuntimeException
, std::exception
)
565 css::uno::Sequence
< OUString
> aSNS( 1 );
566 aSNS
[0] = "com.sun.star.frame.ToolbarController";
571 void SAL_CALL
UpDownSearchToolboxController::dispose() throw ( css::uno::RuntimeException
, std::exception
)
573 SolarMutexGuard aSolarMutexGuard
;
575 SearchToolbarControllersManager::createControllersManager().freeController(m_xFrame
, css::uno::Reference
< css::frame::XStatusListener
>(static_cast< ::cppu::OWeakObject
* >(this), css::uno::UNO_QUERY
), m_aCommandURL
);
577 svt::ToolboxController::dispose();
581 void SAL_CALL
UpDownSearchToolboxController::initialize( const css::uno::Sequence
< css::uno::Any
>& aArguments
) throw ( css::uno::Exception
, css::uno::RuntimeException
, std::exception
)
583 svt::ToolboxController::initialize( aArguments
);
584 SearchToolbarControllersManager::createControllersManager().registryController(m_xFrame
, css::uno::Reference
< css::frame::XStatusListener
>(static_cast< ::cppu::OWeakObject
* >(this), css::uno::UNO_QUERY
), m_aCommandURL
);
587 // XToolbarController
588 void SAL_CALL
UpDownSearchToolboxController::execute( sal_Int16
/*KeyModifier*/ ) throw ( css::uno::RuntimeException
, std::exception
)
591 throw css::lang::DisposedException();
593 vcl::Window
* pWindow
= VCLUnoHelper::GetWindow( getParent() );
594 ToolBox
* pToolBox
= static_cast<ToolBox
*>(pWindow
);
596 impl_executeSearch(m_xContext
, m_xFrame
, pToolBox
, meType
== UP
);
598 css::frame::FeatureStateEvent aEvent
;
599 aEvent
.FeatureURL
.Complete
= COMMAND_APPENDSEARCHHISTORY
;
600 css::uno::Reference
< css::frame::XStatusListener
> xStatusListener
= SearchToolbarControllersManager::createControllersManager().findController(m_xFrame
, COMMAND_FINDTEXT
);
601 if (xStatusListener
.is())
602 xStatusListener
->statusChanged( aEvent
);
606 void SAL_CALL
UpDownSearchToolboxController::statusChanged( const css::frame::FeatureStateEvent
& /*rEvent*/ ) throw ( css::uno::RuntimeException
, std::exception
)
610 MatchCaseToolboxController::MatchCaseToolboxController( const css::uno::Reference
< css::uno::XComponentContext
>& rxContext
)
611 : svt::ToolboxController( rxContext
,
612 css::uno::Reference
< css::frame::XFrame
>(),
613 OUString(COMMAND_MATCHCASE
) )
614 , m_pMatchCaseControl(NULL
)
618 MatchCaseToolboxController::~MatchCaseToolboxController()
623 css::uno::Any SAL_CALL
MatchCaseToolboxController::queryInterface( const css::uno::Type
& aType
) throw ( css::uno::RuntimeException
, std::exception
)
625 css::uno::Any a
= ToolboxController::queryInterface( aType
);
629 return ::cppu::queryInterface( aType
, static_cast< css::lang::XServiceInfo
* >( this ) );
632 void SAL_CALL
MatchCaseToolboxController::acquire() throw ()
634 ToolboxController::acquire();
637 void SAL_CALL
MatchCaseToolboxController::release() throw ()
639 ToolboxController::release();
643 OUString SAL_CALL
MatchCaseToolboxController::getImplementationName() throw( css::uno::RuntimeException
, std::exception
)
645 return OUString( "com.sun.star.svx.MatchCaseToolboxController" );
648 sal_Bool SAL_CALL
MatchCaseToolboxController::supportsService( const OUString
& ServiceName
) throw( css::uno::RuntimeException
, std::exception
)
650 return cppu::supportsService(this, ServiceName
);
653 css::uno::Sequence
< OUString
> SAL_CALL
MatchCaseToolboxController::getSupportedServiceNames() throw( css::uno::RuntimeException
, std::exception
)
655 css::uno::Sequence
< OUString
> aSNS( 1 );
656 aSNS
[0] = "com.sun.star.frame.ToolbarController";
661 void SAL_CALL
MatchCaseToolboxController::dispose() throw ( css::uno::RuntimeException
, std::exception
)
663 SolarMutexGuard aSolarMutexGuard
;
665 SearchToolbarControllersManager::createControllersManager().freeController(m_xFrame
, css::uno::Reference
< css::frame::XStatusListener
>(static_cast< ::cppu::OWeakObject
* >(this), css::uno::UNO_QUERY
), m_aCommandURL
);
667 svt::ToolboxController::dispose();
669 m_pMatchCaseControl
.disposeAndClear();
673 void SAL_CALL
MatchCaseToolboxController::initialize( const css::uno::Sequence
< ::com::sun::star::uno::Any
>& aArguments
) throw ( css::uno::Exception
, css::uno::RuntimeException
, std::exception
)
675 svt::ToolboxController::initialize(aArguments
);
677 SearchToolbarControllersManager::createControllersManager().registryController(m_xFrame
, css::uno::Reference
< css::frame::XStatusListener
>(static_cast< ::cppu::OWeakObject
* >(this), css::uno::UNO_QUERY
), m_aCommandURL
);
680 css::uno::Reference
< css::awt::XWindow
> SAL_CALL
MatchCaseToolboxController::createItemWindow( const css::uno::Reference
< css::awt::XWindow
>& Parent
) throw ( css::uno::RuntimeException
, std::exception
)
682 css::uno::Reference
< css::awt::XWindow
> xItemWindow
;
684 css::uno::Reference
< css::awt::XWindow
> xParent( Parent
);
685 vcl::Window
* pParent
= VCLUnoHelper::GetWindow( xParent
);
688 ToolBox
* pToolbar
= static_cast<ToolBox
*>(pParent
);
689 m_pMatchCaseControl
= VclPtr
<CheckBox
>::Create( pToolbar
, 0 );
690 m_pMatchCaseControl
->SetText( SVX_RESSTR( RID_SVXSTR_FINDBAR_MATCHCASE
) );
691 Size
aSize( m_pMatchCaseControl
->GetOptimalSize() );
692 m_pMatchCaseControl
->SetSizePixel( aSize
);
694 xItemWindow
= VCLUnoHelper::GetInterface( m_pMatchCaseControl
);
700 void SAL_CALL
MatchCaseToolboxController::statusChanged( const css::frame::FeatureStateEvent
& ) throw ( css::uno::RuntimeException
, std::exception
)
704 FindAllToolboxController::FindAllToolboxController( const css::uno::Reference
< css::uno::XComponentContext
> & rxContext
)
705 : svt::ToolboxController( rxContext
,
706 css::uno::Reference
< css::frame::XFrame
>(),
707 OUString( COMMAND_EXITSEARCH
) )
711 FindAllToolboxController::~FindAllToolboxController()
716 css::uno::Any SAL_CALL
FindAllToolboxController::queryInterface( const css::uno::Type
& aType
) throw ( css::uno::RuntimeException
, std::exception
)
718 css::uno::Any a
= ToolboxController::queryInterface( aType
);
722 return ::cppu::queryInterface( aType
, static_cast< css::lang::XServiceInfo
* >( this ) );
725 void SAL_CALL
FindAllToolboxController::acquire() throw ()
727 ToolboxController::acquire();
730 void SAL_CALL
FindAllToolboxController::release() throw ()
732 ToolboxController::release();
736 OUString SAL_CALL
FindAllToolboxController::getImplementationName() throw( css::uno::RuntimeException
, std::exception
)
738 return OUString( "com.sun.star.svx.FindAllToolboxController" );
742 sal_Bool SAL_CALL
FindAllToolboxController::supportsService( const OUString
& ServiceName
) throw( css::uno::RuntimeException
, std::exception
)
744 return cppu::supportsService(this, ServiceName
);
747 css::uno::Sequence
< OUString
> SAL_CALL
FindAllToolboxController::getSupportedServiceNames() throw( css::uno::RuntimeException
, std::exception
)
749 css::uno::Sequence
< OUString
> aSNS( 1 );
750 aSNS
[0] = "com.sun.star.frame.ToolbarController";
755 void SAL_CALL
FindAllToolboxController::dispose() throw ( css::uno::RuntimeException
, std::exception
)
757 SolarMutexGuard aSolarMutexGuard
;
759 SearchToolbarControllersManager::createControllersManager().freeController(m_xFrame
, css::uno::Reference
< css::frame::XStatusListener
>(static_cast< ::cppu::OWeakObject
* >(this), css::uno::UNO_QUERY
), m_aCommandURL
);
761 svt::ToolboxController::dispose();
765 void SAL_CALL
FindAllToolboxController::initialize( const css::uno::Sequence
< css::uno::Any
>& aArguments
) throw ( css::uno::Exception
, css::uno::RuntimeException
, std::exception
)
767 svt::ToolboxController::initialize( aArguments
);
768 SearchToolbarControllersManager::createControllersManager().registryController(m_xFrame
, css::uno::Reference
< css::frame::XStatusListener
>(static_cast< ::cppu::OWeakObject
* >(this), css::uno::UNO_QUERY
), m_aCommandURL
);
771 // XToolbarController
772 void SAL_CALL
FindAllToolboxController::execute( sal_Int16
/*KeyModifier*/ ) throw ( css::uno::RuntimeException
, std::exception
)
775 throw css::lang::DisposedException();
777 vcl::Window
* pWindow
= VCLUnoHelper::GetWindow( getParent() );
778 ToolBox
* pToolBox
= static_cast<ToolBox
*>(pWindow
);
780 impl_executeSearch(m_xContext
, m_xFrame
, pToolBox
, false, true);
784 void SAL_CALL
FindAllToolboxController::statusChanged( const css::frame::FeatureStateEvent
& /*rEvent*/ ) throw ( css::uno::RuntimeException
, std::exception
)
788 ExitSearchToolboxController::ExitSearchToolboxController( const css::uno::Reference
< css::uno::XComponentContext
> & rxContext
)
789 : svt::ToolboxController( rxContext
,
790 css::uno::Reference
< css::frame::XFrame
>(),
791 OUString( COMMAND_EXITSEARCH
) )
795 ExitSearchToolboxController::~ExitSearchToolboxController()
800 css::uno::Any SAL_CALL
ExitSearchToolboxController::queryInterface( const css::uno::Type
& aType
) throw ( css::uno::RuntimeException
, std::exception
)
802 css::uno::Any a
= ToolboxController::queryInterface( aType
);
806 return ::cppu::queryInterface( aType
, static_cast< css::lang::XServiceInfo
* >( this ) );
809 void SAL_CALL
ExitSearchToolboxController::acquire() throw ()
811 ToolboxController::acquire();
814 void SAL_CALL
ExitSearchToolboxController::release() throw ()
816 ToolboxController::release();
820 OUString SAL_CALL
ExitSearchToolboxController::getImplementationName() throw( css::uno::RuntimeException
, std::exception
)
822 return OUString( "com.sun.star.svx.ExitFindbarToolboxController" );
826 sal_Bool SAL_CALL
ExitSearchToolboxController::supportsService( const OUString
& ServiceName
) throw( css::uno::RuntimeException
, std::exception
)
828 return cppu::supportsService(this, ServiceName
);
831 css::uno::Sequence
< OUString
> SAL_CALL
ExitSearchToolboxController::getSupportedServiceNames() throw( css::uno::RuntimeException
, std::exception
)
833 css::uno::Sequence
< OUString
> aSNS( 1 );
834 aSNS
[0] = "com.sun.star.frame.ToolbarController";
839 void SAL_CALL
ExitSearchToolboxController::dispose() throw ( css::uno::RuntimeException
, std::exception
)
841 SolarMutexGuard aSolarMutexGuard
;
843 SearchToolbarControllersManager::createControllersManager().freeController(m_xFrame
, css::uno::Reference
< css::frame::XStatusListener
>(static_cast< ::cppu::OWeakObject
* >(this), css::uno::UNO_QUERY
), m_aCommandURL
);
845 svt::ToolboxController::dispose();
849 void SAL_CALL
ExitSearchToolboxController::initialize( const css::uno::Sequence
< css::uno::Any
>& aArguments
) throw ( css::uno::Exception
, css::uno::RuntimeException
, std::exception
)
851 svt::ToolboxController::initialize( aArguments
);
852 SearchToolbarControllersManager::createControllersManager().registryController(m_xFrame
, css::uno::Reference
< css::frame::XStatusListener
>(static_cast< ::cppu::OWeakObject
* >(this), css::uno::UNO_QUERY
), m_aCommandURL
);
855 // XToolbarController
856 void SAL_CALL
ExitSearchToolboxController::execute( sal_Int16
/*KeyModifier*/ ) throw ( css::uno::RuntimeException
, std::exception
)
858 vcl::Window
*pFocusWindow
= Application::GetFocusWindow();
860 pFocusWindow
->GrabFocusToDocument();
863 css::uno::Reference
< css::beans::XPropertySet
> xPropSet(m_xFrame
, css::uno::UNO_QUERY
);
866 css::uno::Reference
< css::frame::XLayoutManager
> xLayoutManager
;
867 css::uno::Any aValue
= xPropSet
->getPropertyValue("LayoutManager");
868 aValue
>>= xLayoutManager
;
869 if (xLayoutManager
.is())
871 const OUString
sResourceURL( "private:resource/toolbar/findbar" );
872 xLayoutManager
->hideElement( sResourceURL
);
873 xLayoutManager
->destroyElement( sResourceURL
);
879 void SAL_CALL
ExitSearchToolboxController::statusChanged( const css::frame::FeatureStateEvent
& /*rEvent*/ ) throw ( css::uno::RuntimeException
, std::exception
)
883 SearchLabelToolboxController::SearchLabelToolboxController( const css::uno::Reference
< css::uno::XComponentContext
> & rxContext
)
884 : svt::ToolboxController( rxContext
,
885 css::uno::Reference
< css::frame::XFrame
>(),
886 OUString( ".uno:SearchLabel" ) )
890 SearchLabelToolboxController::~SearchLabelToolboxController()
895 css::uno::Any SAL_CALL
SearchLabelToolboxController::queryInterface( const css::uno::Type
& aType
) throw ( css::uno::RuntimeException
, std::exception
)
897 css::uno::Any a
= ToolboxController::queryInterface( aType
);
901 return ::cppu::queryInterface( aType
, static_cast< css::lang::XServiceInfo
* >( this ) );
904 void SAL_CALL
SearchLabelToolboxController::acquire() throw ()
906 ToolboxController::acquire();
909 void SAL_CALL
SearchLabelToolboxController::release() throw ()
911 ToolboxController::release();
915 OUString SAL_CALL
SearchLabelToolboxController::getImplementationName() throw( css::uno::RuntimeException
, std::exception
)
917 return OUString( "com.sun.star.svx.SearchLabelToolboxController" );
921 sal_Bool SAL_CALL
SearchLabelToolboxController::supportsService( const OUString
& ServiceName
) throw( css::uno::RuntimeException
, std::exception
)
923 return cppu::supportsService(this, ServiceName
);
926 css::uno::Sequence
< OUString
> SAL_CALL
SearchLabelToolboxController::getSupportedServiceNames() throw( css::uno::RuntimeException
, std::exception
)
928 css::uno::Sequence
< OUString
> aSNS( 1 );
929 aSNS
[0] = "com.sun.star.frame.ToolbarController";
934 void SAL_CALL
SearchLabelToolboxController::dispose() throw ( css::uno::RuntimeException
, std::exception
)
936 SolarMutexGuard aSolarMutexGuard
;
938 SearchToolbarControllersManager::createControllersManager().freeController(m_xFrame
, css::uno::Reference
< css::frame::XStatusListener
>(static_cast< ::cppu::OWeakObject
* >(this), css::uno::UNO_QUERY
), m_aCommandURL
);
940 svt::ToolboxController::dispose();
944 void SAL_CALL
SearchLabelToolboxController::initialize( const css::uno::Sequence
< css::uno::Any
>& aArguments
) throw ( css::uno::Exception
, css::uno::RuntimeException
, std::exception
)
946 svt::ToolboxController::initialize( aArguments
);
947 SearchToolbarControllersManager::createControllersManager().registryController(m_xFrame
, css::uno::Reference
< css::frame::XStatusListener
>(static_cast< ::cppu::OWeakObject
* >(this), css::uno::UNO_QUERY
), m_aCommandURL
);
951 void SAL_CALL
SearchLabelToolboxController::statusChanged( const css::frame::FeatureStateEvent
& ) throw ( css::uno::RuntimeException
, std::exception
)
955 css::uno::Reference
< css::awt::XWindow
> SAL_CALL
SearchLabelToolboxController::createItemWindow( const css::uno::Reference
< css::awt::XWindow
>& Parent
) throw ( css::uno::RuntimeException
, std::exception
)
957 VclPtr
<vcl::Window
> pSL
= VclPtr
<FixedText
>::Create(VCLUnoHelper::GetWindow( Parent
));
958 pSL
->SetSizePixel(Size(250, 25));
959 return VCLUnoHelper::GetInterface(pSL
);
962 FindbarDispatcher::FindbarDispatcher()
966 FindbarDispatcher::~FindbarDispatcher()
972 css::uno::Any SAL_CALL
FindbarDispatcher::queryInterface( const css::uno::Type
& aType
) throw( css::uno::RuntimeException
, std::exception
)
974 css::uno::Any
aReturn( ::cppu::queryInterface( aType
,
975 static_cast< css::lang::XServiceInfo
* >(this),
976 static_cast< css::lang::XInitialization
* >(this),
977 static_cast< css::frame::XDispatchProvider
* >(this),
978 static_cast< css::frame::XDispatch
* >(this)) );
980 if ( aReturn
.hasValue() )
983 return OWeakObject::queryInterface( aType
);
986 void SAL_CALL
FindbarDispatcher::acquire() throw()
988 OWeakObject::acquire();
991 void SAL_CALL
FindbarDispatcher::release() throw()
993 OWeakObject::release();
997 OUString SAL_CALL
FindbarDispatcher::getImplementationName() throw( css::uno::RuntimeException
, std::exception
)
999 return OUString("com.sun.star.comp.svx.Impl.FindbarDispatcher");
1002 sal_Bool SAL_CALL
FindbarDispatcher::supportsService( const OUString
& ServiceName
) throw( css::uno::RuntimeException
, std::exception
)
1004 return cppu::supportsService(this, ServiceName
);
1007 css::uno::Sequence
< OUString
> SAL_CALL
FindbarDispatcher::getSupportedServiceNames() throw( css::uno::RuntimeException
, std::exception
)
1009 css::uno::Sequence
< OUString
> aSNS( 2 );
1010 aSNS
[0] = "com.sun.star.comp.svx.FindbarDispatcher";
1011 aSNS
[1] = "com.sun.star.frame.ProtocolHandler";
1016 void SAL_CALL
FindbarDispatcher::initialize( const css::uno::Sequence
< css::uno::Any
>& aArguments
) throw ( css::uno::Exception
, css::uno::RuntimeException
, std::exception
)
1018 if ( aArguments
.getLength() )
1019 aArguments
[0] >>= m_xFrame
;
1022 // XDispatchProvider
1023 css::uno::Reference
< css::frame::XDispatch
> SAL_CALL
FindbarDispatcher::queryDispatch( const css::util::URL
& aURL
, const OUString
& /*sTargetFrameName*/, sal_Int32
/*nSearchFlags*/ ) throw( css::uno::RuntimeException
, std::exception
)
1025 css::uno::Reference
< css::frame::XDispatch
> xDispatch
;
1027 if ( aURL
.Protocol
== "vnd.sun.star.findbar:" )
1033 css::uno::Sequence
< css::uno::Reference
< css::frame::XDispatch
> > SAL_CALL
FindbarDispatcher::queryDispatches( const css::uno::Sequence
< css::frame::DispatchDescriptor
>& seqDescripts
) throw( css::uno::RuntimeException
, std::exception
)
1035 sal_Int32 nCount
= seqDescripts
.getLength();
1036 css::uno::Sequence
< css::uno::Reference
< XDispatch
> > lDispatcher( nCount
);
1038 for( sal_Int32 i
=0; i
<nCount
; ++i
)
1039 lDispatcher
[i
] = queryDispatch( seqDescripts
[i
].FeatureURL
, seqDescripts
[i
].FrameName
, seqDescripts
[i
].SearchFlags
);
1045 void SAL_CALL
FindbarDispatcher::dispatch( const css::util::URL
& aURL
, const css::uno::Sequence
< css::beans::PropertyValue
>& /*lArgs*/ ) throw( css::uno::RuntimeException
, std::exception
)
1047 //vnd.sun.star.findbar:FocusToFindbar - set cursor to the FindTextFieldControl of the findbar
1048 if ( aURL
.Path
== "FocusToFindbar" )
1050 css::uno::Reference
< css::beans::XPropertySet
> xPropSet(m_xFrame
, css::uno::UNO_QUERY
);
1054 css::uno::Reference
< css::frame::XLayoutManager
> xLayoutManager
;
1055 css::uno::Any aValue
= xPropSet
->getPropertyValue("LayoutManager");
1056 aValue
>>= xLayoutManager
;
1057 if (!xLayoutManager
.is())
1060 const OUString
sResourceURL( "private:resource/toolbar/findbar" );
1061 css::uno::Reference
< css::ui::XUIElement
> xUIElement
= xLayoutManager
->getElement(sResourceURL
);
1062 if (!xUIElement
.is())
1064 // show the findbar if necessary
1065 xLayoutManager
->createElement( sResourceURL
);
1066 xLayoutManager
->showElement( sResourceURL
);
1067 xUIElement
= xLayoutManager
->getElement( sResourceURL
);
1068 if ( !xUIElement
.is() )
1072 css::uno::Reference
< css::awt::XWindow
> xWindow(xUIElement
->getRealInterface(), css::uno::UNO_QUERY
);
1073 vcl::Window
* pWindow
= VCLUnoHelper::GetWindow( xWindow
);
1074 ToolBox
* pToolBox
= static_cast<ToolBox
*>(pWindow
);
1077 sal_uInt16 nItemCount
= pToolBox
->GetItemCount();
1078 for ( sal_uInt16 i
=0; i
<nItemCount
; ++i
)
1080 OUString sItemCommand
= pToolBox
->GetItemCommand(i
);
1081 if ( sItemCommand
== COMMAND_FINDTEXT
)
1083 vcl::Window
* pItemWin
= pToolBox
->GetItemWindow( i
);
1086 FindTextFieldControl
* pFindTextFieldControl
= dynamic_cast<FindTextFieldControl
*>(pItemWin
);
1087 if ( pFindTextFieldControl
)
1088 pFindTextFieldControl
->SetTextToSelected_Impl();
1089 SolarMutexGuard aSolarMutexGuard
;
1090 pItemWin
->GrabFocus();
1099 void SAL_CALL
FindbarDispatcher::addStatusListener( const css::uno::Reference
< css::frame::XStatusListener
>& /*xControl*/, const css::util::URL
& /*aURL*/ ) throw ( css::uno::RuntimeException
, std::exception
)
1103 void SAL_CALL
FindbarDispatcher::removeStatusListener( const css::uno::Reference
< css::frame::XStatusListener
>& /*xControl*/, const css::util::URL
& /*aURL*/ ) throw ( css::uno::RuntimeException
, std::exception
)
1109 extern "C" SAL_DLLPUBLIC_EXPORT
css::uno::XInterface
* SAL_CALL
1110 com_sun_star_svx_FindTextToolboxController_get_implementation(
1111 css::uno::XComponentContext
*context
,
1112 css::uno::Sequence
<css::uno::Any
> const &)
1114 return cppu::acquire(new FindTextToolbarController(context
));
1117 extern "C" SAL_DLLPUBLIC_EXPORT
css::uno::XInterface
* SAL_CALL
1118 com_sun_star_svx_ExitFindbarToolboxController_get_implementation(
1119 css::uno::XComponentContext
*context
,
1120 css::uno::Sequence
<css::uno::Any
> const &)
1122 return cppu::acquire(new ExitSearchToolboxController(context
));
1125 extern "C" SAL_DLLPUBLIC_EXPORT
css::uno::XInterface
* SAL_CALL
1126 com_sun_star_svx_UpSearchToolboxController_get_implementation(
1127 css::uno::XComponentContext
*context
,
1128 css::uno::Sequence
<css::uno::Any
> const &)
1130 return cppu::acquire(new UpDownSearchToolboxController(context
, UpDownSearchToolboxController::UP
));
1133 extern "C" SAL_DLLPUBLIC_EXPORT
css::uno::XInterface
* SAL_CALL
1134 com_sun_star_svx_DownSearchToolboxController_get_implementation(
1135 css::uno::XComponentContext
*context
,
1136 css::uno::Sequence
<css::uno::Any
> const &)
1138 return cppu::acquire(new UpDownSearchToolboxController(context
, UpDownSearchToolboxController::DOWN
));
1141 extern "C" SAL_DLLPUBLIC_EXPORT
css::uno::XInterface
* SAL_CALL
1142 com_sun_star_svx_MatchCaseToolboxController_get_implementation(
1143 css::uno::XComponentContext
*context
,
1144 css::uno::Sequence
<css::uno::Any
> const &)
1146 return cppu::acquire(new MatchCaseToolboxController(context
));
1149 extern "C" SAL_DLLPUBLIC_EXPORT
css::uno::XInterface
* SAL_CALL
1150 com_sun_star_svx_FindAllToolboxController_get_implementation(
1151 css::uno::XComponentContext
*context
,
1152 css::uno::Sequence
<css::uno::Any
> const &)
1154 return cppu::acquire(new FindAllToolboxController(context
));
1157 extern "C" SAL_DLLPUBLIC_EXPORT
css::uno::XInterface
* SAL_CALL
1158 com_sun_star_svx_SearchLabelToolboxController_get_implementation(
1159 css::uno::XComponentContext
*context
,
1160 css::uno::Sequence
<css::uno::Any
> const &)
1162 return cppu::acquire(new SearchLabelToolboxController(context
));
1165 extern "C" SAL_DLLPUBLIC_EXPORT
css::uno::XInterface
* SAL_CALL
1166 com_sun_star_comp_svx_Impl_FindbarDispatcher_get_implementation(
1167 SAL_UNUSED_PARAMETER
css::uno::XComponentContext
*,
1168 css::uno::Sequence
<css::uno::Any
> const &)
1170 return cppu::acquire(new FindbarDispatcher
);
1173 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */