27 #include <osl/diagnose.h>
33 const size_t MAXQUERY = 8;
39 explicit FindByField(
SCCOLROW nField) : mnField(nField) {}
67 eSearchType(
utl::SearchParam::SearchType::
Normal),
79 eSearchType(r.eSearchType), bHasHeader(r.bHasHeader), bByRow(r.bByRow), bInplace(r.bInplace),
80 bCaseSens(r.bCaseSens), bDuplicate(r.bDuplicate), mbRangeLookup(r.mbRangeLookup),
81 m_Entries(r.m_Entries)
128 EntriesType::iterator itr = std::find_if(
142 EntriesType::iterator itr = std::find_if(
160 std::vector<ScQueryEntry*>
aEntries;
162 auto fFind = FindByField(nField);
166 aEntries.push_back(&rxEntry);
173 EntriesType::iterator itr = std::find_if(
211 bool bByEmpty =
false;
212 bool bByNonEmpty =
false;
214 if (rCellStr.isEmpty())
220 if (rCellStr[0] ==
'<')
222 if (rCellStr.getLength() > 1 && rCellStr[1] ==
'>')
226 if (rCellStr.getLength() == 2)
229 else if (rCellStr.getLength() > 1 && rCellStr[1] ==
'=')
240 else if (rCellStr[0]==
'>')
242 if (rCellStr.getLength() > 1 && rCellStr[1] ==
'=')
255 if (rCellStr[0] ==
'=')
258 if (rCellStr.getLength() == 1)
288 else if (bByNonEmpty)
292 sal_uInt32 nFormat = 0;
299 nCol1(0),nRow1(0),nCol2(0),nRow2(0),nTab(0)
369 while (nUsed<nEntryCount &&
m_Entries[nUsed].bDoQuery) ++nUsed;
370 while (nOtherUsed<nOtherEntryCount && rOther.
m_Entries[nOtherUsed].bDoQuery)
373 if ( (nUsed == nOtherUsed)
391 for (
SCSIZE i=0;
i<nUsed && bEqual;
i++ )
405 nCol1 = sal::static_int_cast<
SCCOL>( nCol1 + nDifX );
406 nRow1 = sal::static_int_cast<
SCROW>( nRow1 + nDifY );
407 nCol2 = sal::static_int_cast<
SCCOL>( nCol2 + nDifX );
408 nRow2 = sal::static_int_cast<
SCROW>( nRow2 + nDifY );
409 nTab = sal::static_int_cast<
SCTAB>( nTab + nDifZ );
411 for (
size_t i=0;
i<n;
i++)
418 OSL_FAIL(
"MoveToDest, bInplace == TRUE");
456 return 0 <=
mnField && mnField <= static_cast<SCCOL>(nC);
OUString getString() const
SharedString intern(const OUString &rStr)
ScQueryEntry * FindEntryByField(SCCOLROW nField, bool bNew)
const Item & GetQueryItem() const
virtual ~ScDBQueryParamInternal() override
virtual ~ScDBQueryParamMatrix() override
SC_DLLPUBLIC bool RemoveEntryByField(SCCOLROW nField)
static const SharedString & getEmptyString()
const_iterator end() const
virtual ~ScQueryParamBase()
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 ...
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
bool operator==(const ScQueryParam &rOther) const
SC_DLLPUBLIC SCSIZE GetEntryCount() const
SC_DLLPUBLIC const ScQueryEntry & GetEntry(SCSIZE n) const
void FillInExcelSyntax(svl::SharedStringPool &rPool, const OUString &aCellStr, SCSIZE nIndex, SvNumberFormatter *pFormatter)
EntriesType::const_iterator const_iterator
SC_DLLPUBLIC void RemoveAllEntriesByField(SCCOLROW nField)
const_iterator begin() const
virtual ~ScQueryParam() override
virtual bool IsValidFieldIndex() const override
bool mbRangeLookup
for spreadsheet functions like MATCH, LOOKUP, HLOOKUP, VLOOKUP
virtual ~ScDBQueryParamBase() override
svl::SharedString maString
ScQueryParamBase & operator=(const ScQueryParamBase &r)
ScDBQueryParamBase()=delete
SC_DLLPUBLIC ScQueryEntry & AppendEntry()
virtual bool IsValidFieldIndex() const
ScXMLEditAttributeMap::Entry const aEntries[]
ScQueryParam & operator=(const ScQueryParam &)
Each instance of this struct represents a single filtering criteria.
void SetQueryByNonEmpty()
utl::SearchParam::SearchType eSearchType
bool m_bDetectedRangeSegmentation false
virtual bool IsValidFieldIndex() const override
std::vector< ScQueryEntry * > FindAllEntriesByField(SCCOLROW nField)
virtual ~ScQueryParamTable()