// variables for buffering the last used WhichPair to allow fast answers // in doesContainWhich mutable sal_uInt16 m_aLastWhichPairOffset = INVALID_WHICHPAIR_OFFSET; mutable sal_uInt16 m_aLastWhichPairFirst = 0; mutable sal_uInt16 m_aLastWhichPairSecond = 0;
/** if true, we allocated and need to delete the pairs, if not, we are pointing
* at a global const literal */ bool m_bOwnRanges = false;
public: #if !defined NDEBUG inlinebool validRanges2() const
{ for (sal_Int32 i = 0; i < size(); ++i)
{ auto p = (*this)[i]; if (!svl::detail::validRange(p.first, p.second)) returnfalse; // ranges must be sorted if (i < size() - 1 && !svl::detail::validGap(p.second, (*this)[i + 1].first)) returnfalse;
} returntrue;
} #endif
// calculate and return if nWhich is member of one of // the local WhichRanges and such contained in the // defined range bool doesContainWhich(sal_uInt16 nWhich) const;
// Adds a range to which ranges, keeping the ranges in valid state (sorted, non-overlapping)
SAL_WARN_UNUSED_RESULT WhichRangesContainer MergeRange(sal_uInt16 nFrom, sal_uInt16 nTo) 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.