summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-04-08 15:17:04 +0200
committerMichael Stahl <mstahl@redhat.com>2015-04-08 17:51:37 +0200
commitff6448194adb34dd86a6623362656037ed68b9e0 (patch)
treee4b1c59c650e1734c81d152fa304a6faba33eada
parent4b3a535ae311546066471cf9c2584fc4bfd65cc6 (diff)
svl: prefix members of SfxItemIter
Change-Id: I0d2bcf306a789f1eaa0760c69ced427c0ec70ef8
-rw-r--r--include/svl/itemiter.hxx35
-rw-r--r--svl/source/items/itemiter.cxx30
2 files changed, 36 insertions, 29 deletions
diff --git a/include/svl/itemiter.hxx b/include/svl/itemiter.hxx
index 626ff4354bfe..691a734501f2 100644
--- a/include/svl/itemiter.hxx
+++ b/include/svl/itemiter.hxx
@@ -28,31 +28,38 @@ class SfxItemPool;
class SVL_DLLPUBLIC SfxItemIter
{
- // Item-Feld - Start & Ende
- const SfxItemSet& _rSet;
- sal_uInt16 _nStt, _nEnd, _nAkt;
+ const SfxItemSet& m_rSet;
+ sal_uInt16 m_nStart;
+ sal_uInt16 m_nEnd;
+ sal_uInt16 m_nCurrent;
public:
SfxItemIter( const SfxItemSet& rSet );
~SfxItemIter();
- // falls es diese gibt, returne sie, sonst 0
+ /// get item, or null if no items
const SfxPoolItem* FirstItem()
- { _nAkt = _nStt;
- return _rSet.m_nCount ? *(_rSet.m_pItems+_nAkt) : nullptr; }
+ {
+ m_nCurrent = m_nStart;
+ return m_rSet.m_nCount ? *(m_rSet.m_pItems + m_nCurrent) : nullptr;
+ }
const SfxPoolItem* LastItem()
- { _nAkt = _nEnd;
- return _rSet.m_nCount ? *(_rSet.m_pItems+_nAkt) : nullptr; }
+ {
+ m_nCurrent = m_nEnd;
+ return m_rSet.m_nCount ? *(m_rSet.m_pItems + m_nCurrent) : nullptr;
+ }
const SfxPoolItem* GetCurItem()
- { return _rSet.m_nCount ? *(_rSet.m_pItems+_nAkt) : nullptr; }
+ {
+ return m_rSet.m_nCount ? *(m_rSet.m_pItems + m_nCurrent) : nullptr;
+ }
const SfxPoolItem* NextItem();
- bool IsAtStart() const { return _nAkt == _nStt; }
- bool IsAtEnd() const { return _nAkt == _nEnd; }
+ bool IsAtStart() const { return m_nCurrent == m_nStart; }
+ bool IsAtEnd() const { return m_nCurrent == m_nEnd; }
- sal_uInt16 GetCurPos() const { return _nAkt; }
- sal_uInt16 GetFirstPos() const { return _nStt; }
- sal_uInt16 GetLastPos() const { return _nEnd; }
+ sal_uInt16 GetCurPos() const { return m_nCurrent; }
+ sal_uInt16 GetFirstPos() const { return m_nStart; }
+ sal_uInt16 GetLastPos() const { return m_nEnd; }
};
#endif
diff --git a/svl/source/items/itemiter.cxx b/svl/source/items/itemiter.cxx
index e34af1343431..7b026e618b29 100644
--- a/svl/source/items/itemiter.cxx
+++ b/svl/source/items/itemiter.cxx
@@ -23,28 +23,28 @@
#include <svl/itemset.hxx>
SfxItemIter::SfxItemIter( const SfxItemSet& rItemSet )
- : _rSet( rItemSet )
+ : m_rSet( rItemSet )
{
- if (!_rSet.m_nCount)
+ if (!m_rSet.m_nCount)
{
- _nStt = 1;
- _nEnd = 0;
+ m_nStart = 1;
+ m_nEnd = 0;
}
else
{
- SfxItemArray ppFnd = _rSet.m_pItems;
+ SfxItemArray ppFnd = m_rSet.m_pItems;
// Find the first Item that is set
- for ( _nStt = 0; !*(ppFnd + _nStt ); ++_nStt )
+ for (m_nStart = 0; !*(ppFnd + m_nStart ); ++m_nStart)
; // empty loop
- if ( 1 < _rSet.Count() )
- for( _nEnd = _rSet.TotalCount(); !*( ppFnd + --_nEnd); )
+ if (1 < m_rSet.Count())
+ for (m_nEnd = m_rSet.TotalCount(); !*(ppFnd + --m_nEnd); )
; // empty loop
else
- _nEnd = _nStt;
+ m_nEnd = m_nStart;
}
- _nAkt = _nStt;
+ m_nCurrent = m_nStart;
}
SfxItemIter::~SfxItemIter()
@@ -53,14 +53,14 @@ SfxItemIter::~SfxItemIter()
const SfxPoolItem* SfxItemIter::NextItem()
{
- SfxItemArray ppFnd = _rSet.m_pItems;
+ SfxItemArray ppFnd = m_rSet.m_pItems;
- if( _nAkt < _nEnd )
+ if (m_nCurrent < m_nEnd)
{
do {
- _nAkt++;
- } while( _nAkt < _nEnd && !*(ppFnd + _nAkt ) );
- return *(ppFnd+_nAkt);
+ m_nCurrent++;
+ } while (m_nCurrent < m_nEnd && !*(ppFnd + m_nCurrent ));
+ return *(ppFnd+m_nCurrent);
}
return 0;
}