20#ifndef INCLUDED_SVX_FMSRCIMP_HXX
21#define INCLUDED_SVX_FMSRCIMP_HXX
26#include <com/sun/star/beans/XPropertyChangeListener.hpp>
94 virtual void SAL_CALL disposing(
const css::lang::EventObject& Source)
override;
97 virtual void SAL_CALL propertyChange(
const css::beans::PropertyChangeEvent& evt)
override;
102 void NotifyCurrentCount();
129 css::uno::Reference< css::awt::XTextComponent >
m_xText;
131 SimpleTextWrapper(
const css::uno::Reference< css::awt::XTextComponent >& _xText);
132 virtual OUString getCurrentText()
const override;
137 css::uno::Reference< css::awt::XListBox >
m_xBox;
139 ListBoxWrapper(
const css::uno::Reference< css::awt::XListBox >& _xBox);
140 virtual OUString getCurrentText()
const override;
145 css::uno::Reference< css::awt::XCheckBox >
m_xBox;
147 CheckBoxWrapper(
const css::uno::Reference< css::awt::XCheckBox >& _xBox);
148 virtual OUString getCurrentText()
const override;
156 friend class FmSearchThread;
179 std::vector<std::unique_ptr<svxform::ControlTextWrapper>>
222 void SetCaseSensitive(
bool bSet);
223 bool GetCaseSensitive()
const;
225 void SetFormatterUsing(
bool bSet);
240 void SetIgnoreWidthCJK(
bool bSet);
241 bool GetIgnoreWidthCJK()
const;
274 const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
275 const css::uno::Reference< css::sdbc::XResultSet >& xCursor,
276 std::u16string_view strVisibleFields,
286 void SearchNext(
const OUString& strExpression);
288 void SearchNextSpecial(
bool _bSearchForNull);
290 void StartOver(
const OUString& strExpression);
292 void StartOverSpecial(
bool _bSearchForNull);
294 void InvalidatePreviousLoc();
300 void RebuildUsedFields(sal_Int32 nFieldIndex,
bool bForce =
false);
301 OUString FormatField(sal_Int32 nWhich);
309 void SwitchToContext(
const css::uno::Reference< css::sdbc::XResultSet >& xCursor, std::u16string_view strVisibleFields,
const InterfaceArray& arrFields,
310 sal_Int32 nFieldIndex);
313 void Init(std::u16string_view strVisibleFields);
315 void SearchNextImpl();
319 void ImplStartNextSearch();
326 SVX_DLLPRIVATE SearchResult SearchSpecial(
bool _bSearchForNull, sal_Int32& nFieldPos, FieldCollection::iterator& iterFieldLoop,
327 const FieldCollection::iterator& iterBegin,
const FieldCollection::iterator& iterEnd);
328 SVX_DLLPRIVATE SearchResult SearchWildcard(std::u16string_view strExpression, sal_Int32& nFieldPos, FieldCollection::iterator& iterFieldLoop,
329 const FieldCollection::iterator& iterBegin,
const FieldCollection::iterator& iterEnd);
330 SVX_DLLPRIVATE SearchResult SearchRegularApprox(
const OUString& strExpression, sal_Int32& nFieldPos, FieldCollection::iterator& iterFieldLoop,
331 const FieldCollection::iterator& iterBegin,
const FieldCollection::iterator& iterEnd);
333 SVX_DLLPRIVATE void PropagateProgress(
bool _bDontPropagateOverflow);
339 SVX_DLLPRIVATE bool MoveField(sal_Int32& nPos, FieldCollection::iterator& iter,
const FieldCollection::iterator& iterBegin,
const FieldCollection::iterator& iterEnd);
341 SVX_DLLPRIVATE void BuildAndInsertFieldInfo(
const css::uno::Reference< css::container::XIndexAccess >& xAllFields, sal_Int32 nField);
343 void OnSearchTerminated();
class FmRecordCountListener - utility class for FmSearchEngine, listens at a certain cursor and provi...
css::uno::Reference< css::beans::XPropertySet > m_xListening
Link< sal_Int32, void > m_lnkWhoWantsToKnow
std::vector< std::unique_ptr< svxform::ControlTextWrapper > > m_aControlTexts
Link< const FmSearchProgress *, void > m_aProgressHandler
FieldCollection m_arrUsedFields
OUString m_strSearchExpression
sal_uInt16 GetLevLonger() const
SearchFor m_eSearchForType
void SetDirection(bool bForward)
bool GetLevRelaxed() const
std::deque< sal_Int32 > m_arrFieldMapping
sal_Int32 m_nCurrentFieldIndex
css::uno::Any m_aPreviousLocBookmark
sal_uInt16 GetPosition() const
void SetProgressHandler(Link< const FmSearchProgress *, void > aHdl)
the link will be called on every record and after the completion of the search, the parameter is a po...
bool GetDirection() const
void SetTransliterationFlags(TransliterationFlags _nFlags)
FieldCollection::iterator m_iterPreviousLocField
void SetWildcard(bool bSet)
void SetLevShorter(sal_uInt16 nHowMuch)
void SetRegular(bool bSet)
CollatorWrapper m_aStringCompare
CursorWrapper m_xClonedIterator
bool GetFormatterUsing() const
bool m_bSearchingCurrently
TransliterationFlags GetTransliterationFlags() const
CharClass m_aCharacterClassficator
bool GetTransliteration() const
void SetLevRelaxed(bool bSet)
void SetLevenshtein(bool bSet)
DECL_DLLPRIVATE_LINK(OnNewRecordCount, sal_Int32, void)
bool GetLevenshtein() const
CursorWrapper m_xOriginalIterator
sal_uInt16 GetLevOther() const
void SetLevLonger(sal_uInt16 nHowMuch)
void SetLevOther(sal_uInt16 nHowMuch)
std::atomic< bool > m_bCancelAsynchRequest
TransliterationFlags m_nTransliterationFlags
void SetTransliteration(bool bSet)
CursorWrapper m_xSearchCursor
std::vector< FieldInfo > FieldCollection
void SetPosition(sal_uInt16 nValue)
sal_uInt16 GetLevShorter() const
ControlTextWrapper(const css::uno::Reference< css::uno::XInterface > &_xControl)
virtual ~ControlTextWrapper()
css::uno::Reference< css::uno::XInterface > m_xControl
virtual OUString getCurrentText() const =0
const css::uno::Reference< css::uno::XInterface > & getControl() const
css::uno::Reference< css::awt::XTextComponent > m_xText
std::vector< css::uno::Reference< css::uno::XInterface > > InterfaceArray
css::uno::Reference< css::sdb::XColumn > xContents
struct FmSearchProgress - the owner of SearchEngine receives this structure for status updates (at th...
sal_uInt32 nCurrentRecord