20#ifndef INCLUDED_UNOTOOLS_DIGITGROUPINGITERATOR_HXX
21#define INCLUDED_UNOTOOLS_DIGITGROUPINGITERATOR_HXX
23#include <com/sun/star/uno/Sequence.hxx>
84 SAL_WARN_IF(
n < 0,
"unotools.i18n",
"DigitGroupingIterator::getGrouping: negative grouping");
168 sal_Int32 nIntegerDigits,
169 const css::uno::Sequence< sal_Int32 > & rGroupings )
171 if (nIntegerDigits <= 0)
172 return css::uno::Sequence< sal_Bool >();
174 css::uno::Sequence< sal_Bool >
aSeq( nIntegerDigits);
176 for (sal_Int32 j = 0; --nIntegerDigits >= 0; ++j)
178 if (j == aIterator.
getPos())
180 pArr[nIntegerDigits] =
true;
184 pArr[nIntegerDigits] =
false;
Iterator to be used with a digit grouping as obtained through LocaleDataWrapper::getDigitGrouping().
void reset()
Reset iterator to start again from the right beginning.
sal_Int32 getGrouping() const
const css::uno::Sequence< sal_Int32 > maGroupings
DigitGroupingIterator & advance()
Advance iterator to next grouping.
sal_Int32 get() const
Obtain current grouping.
DigitGroupingIterator(const css::uno::Sequence< sal_Int32 > &rGroupings)
DigitGroupingIterator(const DigitGroupingIterator &)=delete
sal_Int32 getPos() const
The next position (in integer digits) from the right where to insert a group separator.
static css::uno::Sequence< sal_Bool > createForwardSequence(sal_Int32 nIntegerDigits, const css::uno::Sequence< sal_Int32 > &rGroupings)
Create a sequence of bool values containing positions where to add a separator when iterating forward...
DigitGroupingIterator & operator=(const DigitGroupingIterator &)=delete
Sequence< sal_Int8 > aSeq
#define SAL_WARN_IF(condition, area, stream)