sw: prefix members of SwAccessibleChildSList_const_iterator
Change-Id: I1420a8c655dac568f6227dbea21506a0c5806a42 Reviewed-on: https://gerrit.libreoffice.org/33685 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
This commit is contained in:
committed by
Caolán McNamara
parent
4d009bb402
commit
fc53cce644
@@ -30,20 +30,20 @@ using namespace ::sw::access;
|
|||||||
SwAccessibleChildSList_const_iterator::SwAccessibleChildSList_const_iterator(
|
SwAccessibleChildSList_const_iterator::SwAccessibleChildSList_const_iterator(
|
||||||
const SwAccessibleChildSList& rLst,
|
const SwAccessibleChildSList& rLst,
|
||||||
SwAccessibleMap& rAccMap )
|
SwAccessibleMap& rAccMap )
|
||||||
: rList( rLst ),
|
: m_rList( rLst ),
|
||||||
aCurr( rList.GetFrame().GetLower() ),
|
m_aCurr( m_rList.GetFrame().GetLower() ),
|
||||||
nNextObj( 0 )
|
m_nNextObj( 0 )
|
||||||
{
|
{
|
||||||
if( !aCurr.GetSwFrame() )
|
if( !m_aCurr.GetSwFrame() )
|
||||||
{
|
{
|
||||||
const SwFrame& rFrame = rList.GetFrame();
|
const SwFrame& rFrame = m_rList.GetFrame();
|
||||||
if( rFrame.IsPageFrame() )
|
if( rFrame.IsPageFrame() )
|
||||||
{
|
{
|
||||||
const SwPageFrame& rPgFrame = static_cast< const SwPageFrame& >( rFrame );
|
const SwPageFrame& rPgFrame = static_cast< const SwPageFrame& >( rFrame );
|
||||||
const SwSortedObjs *pObjs = rPgFrame.GetSortedObjs();
|
const SwSortedObjs *pObjs = rPgFrame.GetSortedObjs();
|
||||||
if( pObjs && pObjs->size() )
|
if( pObjs && pObjs->size() )
|
||||||
{
|
{
|
||||||
aCurr = (*pObjs)[nNextObj++]->GetDrawObj();
|
m_aCurr = (*pObjs)[m_nNextObj++]->GetDrawObj();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( rFrame.IsTextFrame() )
|
else if( rFrame.IsTextFrame() )
|
||||||
@@ -51,34 +51,34 @@ SwAccessibleChildSList_const_iterator::SwAccessibleChildSList_const_iterator(
|
|||||||
const SwSortedObjs *pObjs = rFrame.GetDrawObjs();
|
const SwSortedObjs *pObjs = rFrame.GetDrawObjs();
|
||||||
if ( pObjs && pObjs->size() )
|
if ( pObjs && pObjs->size() )
|
||||||
{
|
{
|
||||||
aCurr = (*pObjs)[nNextObj++]->GetDrawObj();
|
m_aCurr = (*pObjs)[m_nNextObj++]->GetDrawObj();
|
||||||
while( aCurr.IsValid() && !aCurr.IsBoundAsChar() )
|
while( m_aCurr.IsValid() && !m_aCurr.IsBoundAsChar() )
|
||||||
{
|
{
|
||||||
aCurr = (nNextObj < pObjs->size())
|
m_aCurr = (m_nNextObj < pObjs->size())
|
||||||
? (*pObjs)[nNextObj++]->GetDrawObj()
|
? (*pObjs)[m_nNextObj++]->GetDrawObj()
|
||||||
: static_cast< const SdrObject *>( nullptr );
|
: static_cast< const SdrObject *>( nullptr );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( !aCurr.IsValid() )
|
if ( !m_aCurr.IsValid() )
|
||||||
{
|
{
|
||||||
::rtl::Reference < SwAccessibleContext > xAccImpl =
|
::rtl::Reference < SwAccessibleContext > xAccImpl =
|
||||||
rAccMap.GetContextImpl( &rFrame, false );
|
rAccMap.GetContextImpl( &rFrame, false );
|
||||||
if( xAccImpl.is() )
|
if( xAccImpl.is() )
|
||||||
{
|
{
|
||||||
SwAccessibleContext* pAccImpl = xAccImpl.get();
|
SwAccessibleContext* pAccImpl = xAccImpl.get();
|
||||||
aCurr = SwAccessibleChild( pAccImpl->GetAdditionalAccessibleChild( 0 ) );
|
m_aCurr = SwAccessibleChild( pAccImpl->GetAdditionalAccessibleChild( 0 ) );
|
||||||
++nNextObj;
|
++m_nNextObj;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( rList.IsVisibleChildrenOnly() )
|
if( m_rList.IsVisibleChildrenOnly() )
|
||||||
{
|
{
|
||||||
// Find the first visible
|
// Find the first visible
|
||||||
while( aCurr.IsValid() &&
|
while( m_aCurr.IsValid() &&
|
||||||
!aCurr.AlwaysIncludeAsChild() &&
|
!m_aCurr.AlwaysIncludeAsChild() &&
|
||||||
!aCurr.GetBox( rAccMap ).IsOver( rList.GetVisArea() ) )
|
!m_aCurr.GetBox( rAccMap ).IsOver( m_rList.GetVisArea() ) )
|
||||||
{
|
{
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
@@ -88,14 +88,14 @@ SwAccessibleChildSList_const_iterator::SwAccessibleChildSList_const_iterator(
|
|||||||
SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::next()
|
SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::next()
|
||||||
{
|
{
|
||||||
bool bNextTaken( true );
|
bool bNextTaken( true );
|
||||||
if( aCurr.GetDrawObject() || aCurr.GetWindow() )
|
if( m_aCurr.GetDrawObject() || m_aCurr.GetWindow() )
|
||||||
{
|
{
|
||||||
bNextTaken = false;
|
bNextTaken = false;
|
||||||
}
|
}
|
||||||
else if( aCurr.GetSwFrame() )
|
else if( m_aCurr.GetSwFrame() )
|
||||||
{
|
{
|
||||||
aCurr = aCurr.GetSwFrame()->GetNext();
|
m_aCurr = m_aCurr.GetSwFrame()->GetNext();
|
||||||
if( !aCurr.GetSwFrame() )
|
if( !m_aCurr.GetSwFrame() )
|
||||||
{
|
{
|
||||||
bNextTaken = false;
|
bNextTaken = false;
|
||||||
}
|
}
|
||||||
@@ -103,37 +103,37 @@ SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::ne
|
|||||||
|
|
||||||
if( !bNextTaken )
|
if( !bNextTaken )
|
||||||
{
|
{
|
||||||
const SwFrame& rFrame = rList.GetFrame();
|
const SwFrame& rFrame = m_rList.GetFrame();
|
||||||
if( rFrame.IsPageFrame() )
|
if( rFrame.IsPageFrame() )
|
||||||
{
|
{
|
||||||
const SwPageFrame& rPgFrame = static_cast< const SwPageFrame& >( rFrame );
|
const SwPageFrame& rPgFrame = static_cast< const SwPageFrame& >( rFrame );
|
||||||
const SwSortedObjs *pObjs = rPgFrame.GetSortedObjs();
|
const SwSortedObjs *pObjs = rPgFrame.GetSortedObjs();
|
||||||
aCurr = ( pObjs && nNextObj < pObjs->size() )
|
m_aCurr = ( pObjs && m_nNextObj < pObjs->size() )
|
||||||
? (*pObjs)[nNextObj++]->GetDrawObj()
|
? (*pObjs)[m_nNextObj++]->GetDrawObj()
|
||||||
: static_cast< const SdrObject *>( nullptr );
|
: static_cast< const SdrObject *>( nullptr );
|
||||||
}
|
}
|
||||||
else if( rFrame.IsTextFrame() )
|
else if( rFrame.IsTextFrame() )
|
||||||
{
|
{
|
||||||
const SwSortedObjs* pObjs = rFrame.GetDrawObjs();
|
const SwSortedObjs* pObjs = rFrame.GetDrawObjs();
|
||||||
const size_t nObjsCount = pObjs ? pObjs->size() : 0;
|
const size_t nObjsCount = pObjs ? pObjs->size() : 0;
|
||||||
aCurr = ( pObjs && nNextObj < nObjsCount )
|
m_aCurr = ( pObjs && m_nNextObj < nObjsCount )
|
||||||
? (*pObjs)[nNextObj++]->GetDrawObj()
|
? (*pObjs)[m_nNextObj++]->GetDrawObj()
|
||||||
: static_cast< const SdrObject *>( nullptr );
|
: static_cast< const SdrObject *>( nullptr );
|
||||||
while( aCurr.IsValid() && !aCurr.IsBoundAsChar() )
|
while( m_aCurr.IsValid() && !m_aCurr.IsBoundAsChar() )
|
||||||
{
|
{
|
||||||
aCurr = ( nNextObj < nObjsCount )
|
m_aCurr = ( m_nNextObj < nObjsCount )
|
||||||
? (*pObjs)[nNextObj++]->GetDrawObj()
|
? (*pObjs)[m_nNextObj++]->GetDrawObj()
|
||||||
: static_cast< const SdrObject *>( nullptr );
|
: static_cast< const SdrObject *>( nullptr );
|
||||||
}
|
}
|
||||||
if ( !aCurr.IsValid() )
|
if ( !m_aCurr.IsValid() )
|
||||||
{
|
{
|
||||||
::rtl::Reference < SwAccessibleContext > xAccImpl =
|
::rtl::Reference < SwAccessibleContext > xAccImpl =
|
||||||
rList.GetAccMap().GetContextImpl( &rFrame, false );
|
m_rList.GetAccMap().GetContextImpl( &rFrame, false );
|
||||||
if( xAccImpl.is() )
|
if( xAccImpl.is() )
|
||||||
{
|
{
|
||||||
SwAccessibleContext* pAccImpl = xAccImpl.get();
|
SwAccessibleContext* pAccImpl = xAccImpl.get();
|
||||||
aCurr = SwAccessibleChild( pAccImpl->GetAdditionalAccessibleChild( nNextObj - nObjsCount ) );
|
m_aCurr = SwAccessibleChild( pAccImpl->GetAdditionalAccessibleChild( m_nNextObj - nObjsCount ) );
|
||||||
++nNextObj;
|
++m_nNextObj;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -145,9 +145,9 @@ SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::ne
|
|||||||
SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::next_visible()
|
SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::next_visible()
|
||||||
{
|
{
|
||||||
next();
|
next();
|
||||||
while( aCurr.IsValid() &&
|
while( m_aCurr.IsValid() &&
|
||||||
!aCurr.AlwaysIncludeAsChild() &&
|
!m_aCurr.AlwaysIncludeAsChild() &&
|
||||||
!aCurr.GetBox( rList.GetAccMap() ).IsOver( rList.GetVisArea() ) )
|
!m_aCurr.GetBox( m_rList.GetAccMap() ).IsOver( m_rList.GetVisArea() ) )
|
||||||
{
|
{
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
@@ -157,7 +157,7 @@ SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::ne
|
|||||||
|
|
||||||
SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::operator++()
|
SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::operator++()
|
||||||
{
|
{
|
||||||
return rList.IsVisibleChildrenOnly() ? next_visible() : next();
|
return m_rList.IsVisibleChildrenOnly() ? next_visible() : next();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@@ -31,13 +31,13 @@ class SwAccessibleChildSList_const_iterator
|
|||||||
private:
|
private:
|
||||||
friend class SwAccessibleChildSList;
|
friend class SwAccessibleChildSList;
|
||||||
|
|
||||||
const SwAccessibleChildSList& rList; // The frame we are iterating over
|
const SwAccessibleChildSList& m_rList; // The frame we are iterating over
|
||||||
sw::access::SwAccessibleChild aCurr; // The current object
|
sw::access::SwAccessibleChild m_aCurr; // The current object
|
||||||
size_t nNextObj; // The index of the current sdr object
|
size_t m_nNextObj; // The index of the current sdr object
|
||||||
|
|
||||||
inline SwAccessibleChildSList_const_iterator( const SwAccessibleChildSList& rLst )
|
inline SwAccessibleChildSList_const_iterator( const SwAccessibleChildSList& rLst )
|
||||||
: rList( rLst )
|
: m_rList( rLst )
|
||||||
, nNextObj( 0 )
|
, m_nNextObj( 0 )
|
||||||
{}
|
{}
|
||||||
|
|
||||||
SwAccessibleChildSList_const_iterator( const SwAccessibleChildSList& rLst,
|
SwAccessibleChildSList_const_iterator( const SwAccessibleChildSList& rLst,
|
||||||
@@ -48,14 +48,14 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
inline SwAccessibleChildSList_const_iterator( const SwAccessibleChildSList_const_iterator& rIter )
|
inline SwAccessibleChildSList_const_iterator( const SwAccessibleChildSList_const_iterator& rIter )
|
||||||
: rList( rIter.rList )
|
: m_rList( rIter.m_rList )
|
||||||
, aCurr( rIter.aCurr )
|
, m_aCurr( rIter.m_aCurr )
|
||||||
, nNextObj( rIter.nNextObj )
|
, m_nNextObj( rIter.m_nNextObj )
|
||||||
{}
|
{}
|
||||||
|
|
||||||
inline bool operator==( const SwAccessibleChildSList_const_iterator& r ) const
|
inline bool operator==( const SwAccessibleChildSList_const_iterator& r ) const
|
||||||
{
|
{
|
||||||
return aCurr == r.aCurr;
|
return m_aCurr == r.m_aCurr;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool operator!=(
|
inline bool operator!=(
|
||||||
@@ -68,7 +68,7 @@ public:
|
|||||||
|
|
||||||
inline const sw::access::SwAccessibleChild& operator*() const
|
inline const sw::access::SwAccessibleChild& operator*() const
|
||||||
{
|
{
|
||||||
return aCurr;
|
return m_aCurr;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user