LibreOffice Module unotools (master) 1
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
utl::SearchParam Class Reference

#include <textsearch.hxx>

Public Types

enum class  SearchType {
  Normal ,
  Regexp ,
  Wildcard ,
  Unknown = -1
}
 

Public Member Functions

 SearchParam (const OUString &rText, SearchType eSrchType, bool bCaseSensitive=true, sal_uInt32 cWildEscChar='\\', bool bWildMatchSel=false)
 
 SearchParam (const SearchParam &)
 
 ~SearchParam ()
 
const OUString & GetSrchStr () const
 
SearchType GetSrchType () const
 
bool IsCaseSensitive () const
 
bool IsWildMatchSel () const
 
sal_Int32 GetWildEscChar () const
 

Static Public Member Functions

static SearchType ConvertToSearchType (bool bWildcard, bool &rbRegExp)
 Convert configuration and document boolean settings to SearchType. More...
 
static void ConvertToBool (const SearchType eSearchType, bool &rbWildcard, bool &rbRegExp)
 Convert SearchType to configuration and document boolean settings. More...
 

Private Attributes

OUString sSrchStr
 
SearchType m_eSrchType
 
sal_uInt32 m_cWildEscChar
 
bool m_bCaseSense: 1
 
bool m_bWildMatchSel: 1
 

Detailed Description

Definition at line 45 of file textsearch.hxx.

Member Enumeration Documentation

◆ SearchType

enum class utl::SearchParam::SearchType
strong
Enumerator
Normal 
Regexp 
Wildcard 
Unknown 

Definition at line 48 of file textsearch.hxx.

Constructor & Destructor Documentation

◆ SearchParam() [1/2]

utl::SearchParam::SearchParam ( const OUString &  rText,
SearchType  eSrchType,
bool  bCaseSensitive = true,
sal_uInt32  cWildEscChar = '\\',
bool  bWildMatchSel = false 
)

Definition at line 45 of file textsearch.cxx.

References eType, m_bCaseSense, m_bWildMatchSel, m_cWildEscChar, m_eSrchType, and sSrchStr.

◆ SearchParam() [2/2]

utl::SearchParam::SearchParam ( const SearchParam rParam)

Definition at line 60 of file textsearch.cxx.

References m_bCaseSense, m_bWildMatchSel, m_cWildEscChar, m_eSrchType, and sSrchStr.

◆ ~SearchParam()

utl::SearchParam::~SearchParam ( )

Definition at line 71 of file textsearch.cxx.

Member Function Documentation

◆ ConvertToBool()

static void utl::SearchParam::ConvertToBool ( const SearchType  eSearchType,
bool &  rbWildcard,
bool &  rbRegExp 
)
inlinestatic

Convert SearchType to configuration and document boolean settings.

Definition at line 69 of file textsearch.hxx.

◆ ConvertToSearchType()

static SearchType utl::SearchParam::ConvertToSearchType ( bool  bWildcard,
bool &  rbRegExp 
)
inlinestatic

Convert configuration and document boolean settings to SearchType.

If bWildcard is true it takes precedence over rbRegExp.

Parameters
rbRegExpIf true and bWildcard is also true, rbRegExp is set to false to adapt the caller's settings.

Definition at line 56 of file textsearch.hxx.

◆ GetSrchStr()

const OUString & utl::SearchParam::GetSrchStr ( ) const
inline

Definition at line 109 of file textsearch.hxx.

Referenced by utl::TextSearch::Init().

◆ GetSrchType()

SearchType utl::SearchParam::GetSrchType ( ) const
inline

Definition at line 110 of file textsearch.hxx.

Referenced by utl::TextSearch::Init().

◆ GetWildEscChar()

sal_Int32 utl::SearchParam::GetWildEscChar ( ) const
inline

Definition at line 116 of file textsearch.hxx.

Referenced by utl::TextSearch::Init().

◆ IsCaseSensitive()

bool utl::SearchParam::IsCaseSensitive ( ) const
inline

Definition at line 112 of file textsearch.hxx.

Referenced by utl::TextSearch::Init().

◆ IsWildMatchSel()

bool utl::SearchParam::IsWildMatchSel ( ) const
inline

Definition at line 113 of file textsearch.hxx.

Referenced by utl::TextSearch::Init().

Member Data Documentation

◆ m_bCaseSense

bool utl::SearchParam::m_bCaseSense
private

Definition at line 95 of file textsearch.hxx.

Referenced by SearchParam().

◆ m_bWildMatchSel

bool utl::SearchParam::m_bWildMatchSel
private

Definition at line 96 of file textsearch.hxx.

Referenced by SearchParam().

◆ m_cWildEscChar

sal_uInt32 utl::SearchParam::m_cWildEscChar
private

Definition at line 93 of file textsearch.hxx.

Referenced by SearchParam().

◆ m_eSrchType

SearchType utl::SearchParam::m_eSrchType
private

Definition at line 91 of file textsearch.hxx.

Referenced by SearchParam().

◆ sSrchStr

OUString utl::SearchParam::sSrchStr
private

Definition at line 89 of file textsearch.hxx.

Referenced by SearchParam().


The documentation for this class was generated from the following files: