LibreOffice Module cui (master) 1
|
Dialog for searching in Forms/Tables. More...
#include <cuifmsearch.hxx>
Public Member Functions | |
FmSearchDialog (weld::Window *pParent, const OUString &strInitialText, const std::vector< OUString > &_rContexts, sal_Int16 nInitialContext, const Link< FmSearchContext &, sal_uInt32 > &lnkContextSupplier) | |
This can search in different sets of fields. More... | |
virtual short | run () override |
virtual | ~FmSearchDialog () override |
void | SetFoundHandler (const Link< FmFoundRecordInformation &, void > &lnk) |
The found-handler gets in the 'found'-case a pointer on a FmFoundRecordInformation-structure (which is only valid in the handler; so if one needs to memorize the data, don't copy the pointer but the structure). More... | |
void | SetCanceledNotFoundHdl (const Link< FmFoundRecordInformation &, void > &lnk) |
If the search has been cancelled or has been finished without success, the current data set is always displayed in the search dialog. More... | |
void | SetActiveField (const OUString &strField) |
Public Member Functions inherited from weld::GenericDialogController | |
GenericDialogController (weld::Widget *pParent, const OUString &rUIFile, const OUString &rDialogId, bool bMobile=false) | |
virtual Dialog * | getDialog () override |
virtual | ~GenericDialogController () COVERITY_NOEXCEPT_FALSE override |
Public Member Functions inherited from weld::DialogController | |
virtual Dialog * | getDialog ()=0 |
const Dialog * | getConstDialog () const |
virtual short | run () |
void | set_title (const OUString &rTitle) |
OUString | get_title () const |
void | set_help_id (const OUString &rHelpId) |
OUString | get_help_id () const |
void | response (int nResponse) |
virtual | ~DialogController () COVERITY_NOEXCEPT_FALSE |
Private Member Functions | |
void | Init (std::u16string_view strVisibleFields, const OUString &strInitialText) |
void | OnFound (const css::uno::Any &aCursorPos, sal_Int16 nFieldPos) |
void | EnableSearchUI (bool bEnable) |
void | EnableSearchForDependees (bool bEnable) |
void | InitContext (sal_Int16 nContext) |
void | LoadParams () |
void | SaveParams () const |
DECL_LINK (OnToggledSearchRadio, weld::Toggleable &, void) | |
DECL_LINK (OnToggledFieldRadios, weld::Toggleable &, void) | |
DECL_LINK (OnClickedSearchAgain, weld::Button &, void) | |
DECL_LINK (OnClickedSpecialSettings, weld::Button &, void) | |
DECL_LINK (OnSearchTextModified, weld::ComboBox &, void) | |
DECL_LINK (OnPositionSelected, weld::ComboBox &, void) | |
DECL_LINK (OnFieldSelected, weld::ComboBox &, void) | |
DECL_LINK (OnFocusGrabbed, weld::Widget &, void) | |
DECL_LINK (OnCheckBoxToggled, weld::Toggleable &, void) | |
DECL_LINK (OnContextSelection, weld::ComboBox &, void) | |
DECL_LINK (OnSearchProgress, const FmSearchProgress *, void) | |
void | initCommon (const css::uno::Reference< css::sdbc::XResultSet > &_rxCursor) |
Friends | |
class | FmSearchEngine |
Additional Inherited Members | |
Static Public Member Functions inherited from weld::DialogController | |
static bool | runAsync (const std::shared_ptr< DialogController > &rController, const std::function< void(sal_Int32)> &) |
Protected Attributes inherited from weld::GenericDialogController | |
std::unique_ptr< weld::Builder > | m_xBuilder |
std::shared_ptr< weld::Dialog > | m_xDialog |
Dialog for searching in Forms/Tables.
Definition at line 39 of file cuifmsearch.hxx.
FmSearchDialog::FmSearchDialog | ( | weld::Window * | pParent, |
const OUString & | strInitialText, | ||
const std::vector< OUString > & | _rContexts, | ||
sal_Int16 | nInitialContext, | ||
const Link< FmSearchContext &, sal_uInt32 > & | lnkContextSupplier | ||
) |
This can search in different sets of fields.
There is a number of contexts; their names are in strContexts (separated by ';'), the user can choose one of them. When the user chooses a context, lnkContextSupplier is called, it gets a pointer on a FmSearchContext-structure, that has to be filled. The following counts for the search : a) in case of formatted search the iterator itself is used (like in the first constructor) b) in case of formatted search NOT the FormatKey at the fields of the iterator is used, but the respective TextComponent is asked (that's why the original iterator is used; by its move the controls behind the TextComponent-interface are updated hopefully) c) in case of not-formatted search a clone of the iterator is used (because the TextComponent-interfaces don't need to be asked) (of course needed : the string number i in strUsedFields of a context must correspond with the interface number i in the arrFields of the context)
Definition at line 71 of file cuifmsearch.cxx.
References FmSearchContext::arrFields, Link< typename Arg, typename Ret >::Call(), Cancel, DBG_ASSERT, FmSearchEngine, GetStandardText(), comphelper::string::getTokenCount(), Init(), initCommon(), Link< typename Arg, typename Ret >::IsSet(), LINK, m_arrContextFields, m_lnkContextSupplier, m_pbSearchAgain, m_pcmbSearchText, m_pftForm, m_plbForm, m_pSearchEngine, m_sSearch, FmSearchContext::nContext, FmSearchContext::sFieldDisplayNames, FmSearchContext::strUsedFields, and FmSearchContext::xCursor.
|
overridevirtual |
Definition at line 155 of file cuifmsearch.cxx.
References m_pConfig, m_pSearchEngine, and SaveParams().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Definition at line 537 of file cuifmsearch.cxx.
References SvtCJKOptions::IsJapaneseFindEnabled(), m_pbSearchAgain, m_pcbApprox, m_pcbCase, m_pcbRegular, m_pcbUseFormat, m_pcbWildCard, m_pcmbSearchText, m_pftPosition, m_pHalfFullFormsCJK, m_plbPosition, m_ppbApproxSettings, m_prbSearchForText, m_pSoundsLikeCJK, and m_pSoundsLikeCJKSettings.
Referenced by EnableSearchUI().
|
private |
Definition at line 511 of file cuifmsearch.cxx.
References EnableSearchForDependees(), m_pbClose, m_pbSearchAgain, m_pcbBackwards, m_pcbStartOver, m_plbField, m_plbForm, m_prbAllFields, m_prbSearchForNotNull, m_prbSearchForNull, m_prbSearchForText, m_prbSingleField, m_sCancel, and m_sSearch.
Referenced by Init().
|
private |
Definition at line 163 of file cuifmsearch.cxx.
References CuiResId(), EnableSearchUI(), o3tl::getToken(), LINK, LoadParams(), m_pbSearchAgain, m_pcbApprox, m_pcbBackwards, m_pcbCase, m_pcbRegular, m_pcbStartOver, m_pcbUseFormat, m_pcbWildCard, m_pcmbSearchText, m_pConfig, m_pHalfFullFormsCJK, m_plbField, m_plbPosition, m_ppbApproxSettings, m_prbAllFields, m_prbSearchForNotNull, m_prbSearchForNull, m_prbSearchForText, m_prbSingleField, m_pSoundsLikeCJK, m_pSoundsLikeCJKSettings, MATCHING_ANYWHERE, and nPos.
Referenced by FmSearchDialog().
|
private |
Definition at line 44 of file cuifmsearch.cxx.
References DBG_ASSERT, SvtCJKOptions::IsCJKFontEnabled(), SvtCJKOptions::IsJapaneseFindEnabled(), LINK, m_pbClose, m_pftRecord, m_pHalfFullFormsCJK, m_pSearchEngine, m_pSoundsLikeCJK, and m_pSoundsLikeCJKSettings.
Referenced by FmSearchDialog().
|
private |
Definition at line 459 of file cuifmsearch.cxx.
References FmSearchContext::arrFields, Link< typename Arg, typename Ret >::Call(), DBG_ASSERT, comphelper::string::getTokenCount(), m_arrContextFields, m_lnkContextSupplier, m_pftRecord, m_plbField, m_prbAllFields, m_prbSingleField, m_pSearchEngine, FmSearchContext::nContext, nPos, FmSearchContext::sFieldDisplayNames, FmSearchContext::strUsedFields, and FmSearchContext::xCursor.
|
private |
Definition at line 633 of file cuifmsearch.cxx.
References m_pcbApprox, m_pcbBackwards, m_pcbCase, m_pcbRegular, m_pcbUseFormat, m_pcbWildCard, m_pcmbSearchText, m_pConfig, m_pHalfFullFormsCJK, m_plbField, m_plbPosition, m_prbAllFields, m_prbSearchForNotNull, m_prbSearchForNull, m_prbSearchForText, m_prbSingleField, m_pSearchEngine, m_pSoundsLikeCJK, and weld::Toggleable::set_active().
Referenced by Init().
|
private |
Definition at line 560 of file cuifmsearch.cxx.
References FmFoundRecordInformation::aPosition, Link< typename Arg, typename Ret >::Call(), m_lnkFoundHandler, m_pcmbSearchText, m_plbField, m_plbForm, m_prbAllFields, FmFoundRecordInformation::nContext, and FmFoundRecordInformation::nFieldPos.
|
overridevirtual |
Reimplemented from weld::DialogController.
Definition at line 236 of file cuifmsearch.cxx.
References m_pSearchEngine, and weld::DialogController::run().
|
private |
Definition at line 724 of file cuifmsearch.cxx.
References i, m_pcmbSearchText, m_pConfig, m_plbField, m_prbAllFields, m_prbSearchForNotNull, m_prbSearchForNull, m_pSearchEngine, and nCount.
Referenced by ~FmSearchDialog().
|
inline |
Definition at line 171 of file cuifmsearch.hxx.
References m_plbField.
|
inline |
If the search has been cancelled or has been finished without success, the current data set is always displayed in the search dialog.
This handler exists to make this synchronous with the possible display of the caller (it does not necessarily need to be set). The pointer that is passed to the handler points to a FmFoundRecordInformation-structure, for which aPosition and possibly (in a search with contexts) nContext are valid.
Definition at line 128 of file cuifmsearch.hxx.
References m_lnkCanceledNotFoundHdl.
|
inline |
The found-handler gets in the 'found'-case a pointer on a FmFoundRecordInformation-structure (which is only valid in the handler; so if one needs to memorize the data, don't copy the pointer but the structure).
This handler MUST be set. Furthermore, it should be considered, that during the handler the search-dialog is still modal.
Definition at line 117 of file cuifmsearch.hxx.
References m_lnkFoundHandler.
|
friend |
Definition at line 41 of file cuifmsearch.hxx.
Referenced by FmSearchDialog().
|
private |
memorize the currently selected field for every context
Definition at line 53 of file cuifmsearch.hxx.
Referenced by FmSearchDialog(), and InitContext().
|
private |
Handler for Positioning the Cursors.
Definition at line 48 of file cuifmsearch.hxx.
Referenced by SetCanceledNotFoundHdl().
|
private |
for search in contexts
Definition at line 50 of file cuifmsearch.hxx.
Referenced by FmSearchDialog(), and InitContext().
|
private |
Handler for "found".
Definition at line 46 of file cuifmsearch.hxx.
Referenced by OnFound(), and SetFoundHandler().
|
private |
Definition at line 86 of file cuifmsearch.hxx.
Referenced by EnableSearchUI(), and initCommon().
|
private |
Definition at line 85 of file cuifmsearch.hxx.
Referenced by EnableSearchForDependees(), EnableSearchUI(), FmSearchDialog(), and Init().
|
private |
Definition at line 78 of file cuifmsearch.hxx.
Referenced by EnableSearchForDependees(), Init(), and LoadParams().
|
private |
Definition at line 74 of file cuifmsearch.hxx.
Referenced by EnableSearchUI(), Init(), and LoadParams().
|
private |
Definition at line 73 of file cuifmsearch.hxx.
Referenced by EnableSearchForDependees(), Init(), and LoadParams().
|
private |
Definition at line 77 of file cuifmsearch.hxx.
Referenced by EnableSearchForDependees(), Init(), and LoadParams().
|
private |
Definition at line 75 of file cuifmsearch.hxx.
Referenced by EnableSearchUI(), and Init().
|
private |
Definition at line 72 of file cuifmsearch.hxx.
Referenced by EnableSearchForDependees(), Init(), and LoadParams().
|
private |
Definition at line 76 of file cuifmsearch.hxx.
Referenced by EnableSearchForDependees(), Init(), and LoadParams().
|
private |
Definition at line 64 of file cuifmsearch.hxx.
Referenced by EnableSearchForDependees(), FmSearchDialog(), Init(), LoadParams(), OnFound(), and SaveParams().
|
private |
Definition at line 58 of file cuifmsearch.hxx.
Referenced by Init(), LoadParams(), SaveParams(), and ~FmSearchDialog().
|
private |
Definition at line 65 of file cuifmsearch.hxx.
Referenced by FmSearchDialog().
|
private |
Definition at line 84 of file cuifmsearch.hxx.
|
private |
Definition at line 70 of file cuifmsearch.hxx.
Referenced by EnableSearchForDependees().
|
private |
Definition at line 83 of file cuifmsearch.hxx.
Referenced by initCommon(), and InitContext().
|
private |
Definition at line 80 of file cuifmsearch.hxx.
Referenced by EnableSearchForDependees(), Init(), initCommon(), and LoadParams().
|
private |
Definition at line 69 of file cuifmsearch.hxx.
Referenced by EnableSearchUI(), Init(), InitContext(), LoadParams(), OnFound(), SaveParams(), and SetActiveField().
|
private |
Definition at line 66 of file cuifmsearch.hxx.
Referenced by EnableSearchUI(), FmSearchDialog(), and OnFound().
|
private |
Definition at line 71 of file cuifmsearch.hxx.
Referenced by EnableSearchForDependees(), Init(), and LoadParams().
|
private |
Definition at line 79 of file cuifmsearch.hxx.
Referenced by EnableSearchForDependees(), and Init().
|
private |
Definition at line 67 of file cuifmsearch.hxx.
Referenced by EnableSearchUI(), Init(), InitContext(), LoadParams(), OnFound(), and SaveParams().
|
private |
Definition at line 63 of file cuifmsearch.hxx.
Referenced by EnableSearchUI(), Init(), LoadParams(), and SaveParams().
|
private |
Definition at line 62 of file cuifmsearch.hxx.
Referenced by EnableSearchUI(), Init(), LoadParams(), and SaveParams().
|
private |
Definition at line 61 of file cuifmsearch.hxx.
Referenced by EnableSearchForDependees(), EnableSearchUI(), Init(), and LoadParams().
|
private |
Definition at line 68 of file cuifmsearch.hxx.
Referenced by EnableSearchUI(), Init(), InitContext(), and LoadParams().
|
private |
Definition at line 55 of file cuifmsearch.hxx.
Referenced by FmSearchDialog(), initCommon(), InitContext(), LoadParams(), run(), SaveParams(), and ~FmSearchDialog().
|
private |
Definition at line 81 of file cuifmsearch.hxx.
Referenced by EnableSearchForDependees(), Init(), initCommon(), and LoadParams().
|
private |
Definition at line 82 of file cuifmsearch.hxx.
Referenced by EnableSearchForDependees(), Init(), and initCommon().
|
private |
Definition at line 44 of file cuifmsearch.hxx.
Referenced by EnableSearchUI().
|
private |
Definition at line 43 of file cuifmsearch.hxx.
Referenced by EnableSearchUI(), and FmSearchDialog().