/** Returns true, if the validation cell will show a selection list. @descrUsethisinsteadofGetListType()whichreturnstherawproperty
regardless of the validation type. */ bool HasSelectionList() const; /** Tries to fill the passed collection with list validation entries. @descrFillsthelistonly,ifthisisalistvalidationandIsShowList()isenabled. @paramrStrings(out-param)Thestringlisttofillwithlistvalidationentries.
@return true = rStrings has been filled with at least one entry. */
SC_DLLPUBLIC bool FillSelectionList(std::vector<ScTypedStrData>& rStrings, const ScAddress& rPos) const;
// with string: during input, with cell: for detective / RC_FORCED bool IsDataValid( const OUString& rTest, const ScPatternAttr& rPattern, const ScAddress& rPos ) const;
// Custom validations (SC_VALID_CUSTOM) should be validated using this specific method. // Take care that internally this method commits to the to be validated cell the new input, // in order to be able to interpret the validating boolean formula on the new input. // After the formula has been evaluated the original cell content is restored. // At present is only used in ScInputHandler::EnterHandler: handling this case in the // regular IsDataValid method would have been unsafe since it can be invoked // by ScFormulaCell::InterpretTail.
struct CustomValidationPrivateAccess
{ // so IsDataValidCustom can be invoked only by ScInputHandler methods friendclass ScInputHandler; private:
CustomValidationPrivateAccess() {}
};
bool IsEmpty() const;
sal_uInt32 GetKey() const { return nKey; } void SetKey(sal_uInt32 nNew) { nKey = nNew; } // only if not inserted!
SC_DLLPUBLIC bool EqualEntries( const ScValidationData& r ) const; // for undo
// sort (using std::set) by index booloperator < ( const ScValidationData& r ) const { return nKey < r.nKey; }
private: /** Tries to fill the passed collection with list validation entries. @descrFillsthelistonlyifitisnon-NULL, @parampStrings(out-param)OptionallyNULL,stringlisttofillwithlistvalidationentries. @parampCellcanbeNULLifitisnotnecessarytowhichelementinthelistisselected. @paramrPosthebaseaddressforrelativereferences. @paramrTokArrFormulatokenarray. @paramrMatch(out-param)theindexofthefirstitemthatmatched,-1ifnothingmatched.
@return true = Cell range found, rRange is valid, or an error entry stuffed into the list if pCell==NULL. */ bool GetSelectionFromFormula(
std::vector<ScTypedStrData>* pStrings, const ScRefCellValue& rCell, const ScAddress& rPos, const ScTokenArray& rTokArr, int& rMatch) const;
/** Tests, if pCell is equal to what the passed token array represents. */ bool IsEqualToTokenArray( const ScRefCellValue& rCell, const ScAddress& rPos, const ScTokenArray& rTokArr ) const;
/** Tests, if contents of pCell occur in cell range referenced by own formula, or in a string list. */ bool IsListValid( const ScRefCellValue& rCell, const ScAddress& rPos ) const;
/** Tests, if string or numeric data has valid text length. @parampDataNumeric nullptrifstringdatatobetested,elsefornumericdataa properlyinitializedScValidationDataIsNumericstruct,see implementation.
*/ bool IsDataValidTextLen( std::u16string_view rTest, const ScAddress& rPos,
ScValidationDataIsNumeric* pDataNumeric ) const;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.