28#include <osl/diagnose.h>
34const size_t MAXQUERY = 8;
40 explicit FindByField(
SCCOLROW nField) : mnField(nField) {}
68 eSearchType(
utl::SearchParam::SearchType::
Normal),
80 eSearchType(r.eSearchType), bHasHeader(r.bHasHeader), bByRow(r.bByRow), bInplace(r.bInplace),
81 bCaseSens(r.bCaseSens), bDuplicate(r.bDuplicate), mbRangeLookup(r.mbRangeLookup),
82 m_Entries(r.m_Entries)
129 EntriesType::iterator itr = std::find_if(
143 EntriesType::iterator itr = std::find_if(
161 std::vector<ScQueryEntry*>
aEntries;
163 auto fFind = FindByField(nField);
174 EntriesType::iterator itr = std::find_if(
212 bool bByEmpty =
false;
213 bool bByNonEmpty =
false;
215 if (rCellStr.isEmpty())
221 if (rCellStr[0] ==
'<')
223 if (rCellStr.getLength() > 1 && rCellStr[1] ==
'>')
227 if (rCellStr.getLength() == 2)
230 else if (rCellStr.getLength() > 1 && rCellStr[1] ==
'=')
241 else if (rCellStr[0]==
'>')
243 if (rCellStr.getLength() > 1 && rCellStr[1] ==
'=')
256 if (rCellStr[0] ==
'=')
259 if (rCellStr.getLength() == 1)
289 else if (bByNonEmpty)
293 sal_uInt32 nFormat = 0;
300 nCol1(0),nRow1(0),nCol2(0),nRow2(0),nTab(0)
370 while (nUsed<nEntryCount &&
m_Entries[nUsed].bDoQuery) ++nUsed;
371 while (nOtherUsed<nOtherEntryCount && rOther.
m_Entries[nOtherUsed].bDoQuery)
374 if ( (nUsed == nOtherUsed)
392 for (
SCSIZE i=0;
i<nUsed && bEqual;
i++ )
406 nCol1 = sal::static_int_cast<SCCOL>(
nCol1 + nDifX );
407 nRow1 = sal::static_int_cast<SCROW>(
nRow1 + nDifY );
408 nCol2 = sal::static_int_cast<SCCOL>(
nCol2 + nDifX );
409 nRow2 = sal::static_int_cast<SCROW>(
nRow2 + nDifY );
410 nTab = sal::static_int_cast<SCTAB>(
nTab + nDifZ );
412 for (
size_t i=0;
i<
n;
i++)
419 OSL_FAIL(
"MoveToDest, bInplace == TRUE");
size_t SCSIZE
size_t typedef to be able to find places where code was changed from USHORT to size_t and is used to ...
SharedString intern(const OUString &rStr)
const OUString & getString() const
static const SharedString & getEmptyString()
ScXMLEditAttributeMap::Entry const aEntries[]
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
ScDBQueryParamBase()=delete
virtual ~ScDBQueryParamBase() override
virtual ~ScDBQueryParamInternal() override
virtual bool IsValidFieldIndex() const override
virtual bool IsValidFieldIndex() const override
virtual ~ScDBQueryParamMatrix() override
svl::SharedString maString
Each instance of this struct represents a single filtering criteria.
const Item & GetQueryItem() const
void SetQueryByNonEmpty()
void FillInExcelSyntax(svl::SharedStringPool &rPool, const OUString &aCellStr, SCSIZE nIndex, SvNumberFormatter *pFormatter)
virtual bool IsValidFieldIndex() const
ScQueryEntry * FindEntryByField(SCCOLROW nField, bool bNew)
const_iterator begin() const
EntriesType::const_iterator const_iterator
std::vector< ScQueryEntry * > FindAllEntriesByField(SCCOLROW nField)
ScQueryParamBase & operator=(const ScQueryParamBase &r)
SC_DLLPUBLIC const ScQueryEntry & GetEntry(SCSIZE n) const
utl::SearchParam::SearchType eSearchType
const_iterator end() const
bool mbRangeLookup
for spreadsheet functions like MATCH, LOOKUP, HLOOKUP, VLOOKUP
SC_DLLPUBLIC void RemoveAllEntriesByField(SCCOLROW nField)
virtual ~ScQueryParamBase()
SC_DLLPUBLIC SCSIZE GetEntryCount() const
SC_DLLPUBLIC bool RemoveEntryByField(SCCOLROW nField)
SC_DLLPUBLIC ScQueryEntry & AppendEntry()
virtual ~ScQueryParamTable()
ScQueryParam & operator=(const ScQueryParam &)
virtual ~ScQueryParam() override
bool operator==(const ScQueryParam &rOther) const
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW