Kaydet (Commit) b6b96f16 authored tarafından Miklos Vajna's avatar Miklos Vajna

sw: prefix members of SwAccessibleNoTextHyperlink, SwAccessiblePage and ...

... SwAccAllTableSelHander_Impl

Change-Id: I8cc53ff4be6dcc5e9903d9d61c631898db0b5466
Reviewed-on: https://gerrit.libreoffice.org/47567Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst bd00b979
...@@ -38,7 +38,7 @@ using namespace css::uno; ...@@ -38,7 +38,7 @@ using namespace css::uno;
using namespace css::accessibility; using namespace css::accessibility;
SwAccessibleNoTextHyperlink::SwAccessibleNoTextHyperlink( SwAccessibleNoTextFrame *p, const SwFrame *aFrame ) : SwAccessibleNoTextHyperlink::SwAccessibleNoTextHyperlink( SwAccessibleNoTextFrame *p, const SwFrame *aFrame ) :
xFrame( p ), mxFrame( p ),
mpFrame( aFrame ) mpFrame( aFrame )
{ {
} }
...@@ -77,7 +77,7 @@ sal_Bool SAL_CALL SwAccessibleNoTextHyperlink::doAccessibleAction( sal_Int32 nIn ...@@ -77,7 +77,7 @@ sal_Bool SAL_CALL SwAccessibleNoTextHyperlink::doAccessibleAction( sal_Int32 nIn
IMapObject* pMapObj = pMap->GetIMapObject(nIndex); IMapObject* pMapObj = pMap->GetIMapObject(nIndex);
if (!pMapObj->GetURL().isEmpty()) if (!pMapObj->GetURL().isEmpty())
{ {
SwViewShell *pVSh = xFrame->GetShell(); SwViewShell *pVSh = mxFrame->GetShell();
if( pVSh ) if( pVSh )
{ {
LoadURL( *pVSh, pMapObj->GetURL(), LoadUrlFlags::NONE, LoadURL( *pVSh, pMapObj->GetURL(), LoadUrlFlags::NONE,
...@@ -88,7 +88,7 @@ sal_Bool SAL_CALL SwAccessibleNoTextHyperlink::doAccessibleAction( sal_Int32 nIn ...@@ -88,7 +88,7 @@ sal_Bool SAL_CALL SwAccessibleNoTextHyperlink::doAccessibleAction( sal_Int32 nIn
} }
else if (!aURL.GetURL().isEmpty()) else if (!aURL.GetURL().isEmpty())
{ {
SwViewShell *pVSh = xFrame->GetShell(); SwViewShell *pVSh = mxFrame->GetShell();
if( pVSh ) if( pVSh )
{ {
LoadURL( *pVSh, aURL.GetURL(), LoadUrlFlags::NONE, LoadURL( *pVSh, aURL.GetURL(), LoadUrlFlags::NONE,
...@@ -176,7 +176,7 @@ Any SAL_CALL SwAccessibleNoTextHyperlink::getAccessibleActionAnchor( ...@@ -176,7 +176,7 @@ Any SAL_CALL SwAccessibleNoTextHyperlink::getAccessibleActionAnchor(
Any aRet; Any aRet;
//SwFrame* pAnchor = static_cast<SwFlyFrame*>(mpFrame)->GetAnchor(); //SwFrame* pAnchor = static_cast<SwFlyFrame*>(mpFrame)->GetAnchor();
Reference< XAccessible > xAnchor = xFrame->GetAccessibleMap()->GetContext(mpFrame); Reference< XAccessible > xAnchor = mxFrame->GetAccessibleMap()->GetContext(mpFrame);
//SwAccessibleNoTextFrame* pFrame = xFrame.get(); //SwAccessibleNoTextFrame* pFrame = xFrame.get();
//Reference< XAccessible > xAnchor = (XAccessible*)pFrame; //Reference< XAccessible > xAnchor = (XAccessible*)pFrame;
aRet <<= xAnchor; aRet <<= xAnchor;
......
...@@ -34,7 +34,7 @@ class SwAccessibleNoTextHyperlink : ...@@ -34,7 +34,7 @@ class SwAccessibleNoTextHyperlink :
{ {
friend class SwAccessibleNoTextFrame; friend class SwAccessibleNoTextFrame;
::rtl::Reference< SwAccessibleNoTextFrame > xFrame; ::rtl::Reference< SwAccessibleNoTextFrame > mxFrame;
const SwFrame *mpFrame; const SwFrame *mpFrame;
SwFrameFormat *GetFormat() SwFrameFormat *GetFormat()
......
...@@ -53,7 +53,7 @@ void SwAccessiblePage::GetStates( ...@@ -53,7 +53,7 @@ void SwAccessiblePage::GetStates(
// FOCUSED // FOCUSED
if( IsSelected() ) if( IsSelected() )
{ {
OSL_ENSURE( bIsSelected, "bSelected out of sync" ); OSL_ENSURE( m_bIsSelected, "bSelected out of sync" );
::rtl::Reference < SwAccessibleContext > xThis( this ); ::rtl::Reference < SwAccessibleContext > xThis( this );
GetMap()->SetCursorContext( xThis ); GetMap()->SetCursorContext( xThis );
...@@ -70,8 +70,8 @@ void SwAccessiblePage::InvalidateCursorPos_() ...@@ -70,8 +70,8 @@ void SwAccessiblePage::InvalidateCursorPos_()
{ {
osl::MutexGuard aGuard( m_Mutex ); osl::MutexGuard aGuard( m_Mutex );
bOldSelected = bIsSelected; bOldSelected = m_bIsSelected;
bIsSelected = bNewSelected; m_bIsSelected = bNewSelected;
} }
if( bNewSelected ) if( bNewSelected )
...@@ -99,7 +99,7 @@ void SwAccessiblePage::InvalidateFocus_() ...@@ -99,7 +99,7 @@ void SwAccessiblePage::InvalidateFocus_()
{ {
osl::MutexGuard aGuard( m_Mutex ); osl::MutexGuard aGuard( m_Mutex );
bSelected = bIsSelected; bSelected = m_bIsSelected;
} }
OSL_ENSURE( bSelected, "focus object should be selected" ); OSL_ENSURE( bSelected, "focus object should be selected" );
...@@ -111,7 +111,7 @@ void SwAccessiblePage::InvalidateFocus_() ...@@ -111,7 +111,7 @@ void SwAccessiblePage::InvalidateFocus_()
SwAccessiblePage::SwAccessiblePage(std::shared_ptr<SwAccessibleMap> const& pInitMap, SwAccessiblePage::SwAccessiblePage(std::shared_ptr<SwAccessibleMap> const& pInitMap,
const SwFrame* pFrame ) const SwFrame* pFrame )
: SwAccessibleContext( pInitMap, AccessibleRole::PANEL, pFrame ) : SwAccessibleContext( pInitMap, AccessibleRole::PANEL, pFrame )
, bIsSelected( false ) , m_bIsSelected( false )
{ {
assert(pFrame != nullptr); assert(pFrame != nullptr);
assert(pInitMap != nullptr); assert(pInitMap != nullptr);
...@@ -129,7 +129,7 @@ SwAccessiblePage::~SwAccessiblePage() ...@@ -129,7 +129,7 @@ SwAccessiblePage::~SwAccessiblePage()
bool SwAccessiblePage::HasCursor() bool SwAccessiblePage::HasCursor()
{ {
osl::MutexGuard aGuard( m_Mutex ); osl::MutexGuard aGuard( m_Mutex );
return bIsSelected; return m_bIsSelected;
} }
OUString SwAccessiblePage::getImplementationName( ) OUString SwAccessiblePage::getImplementationName( )
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
*/ */
class SwAccessiblePage : public SwAccessibleContext class SwAccessiblePage : public SwAccessibleContext
{ {
bool bIsSelected; // protected by base class mutex bool m_bIsSelected; // protected by base class mutex
bool IsSelected(); bool IsSelected();
......
...@@ -505,13 +505,13 @@ void SwAccSingleTableSelHander_Impl::Unselect( sal_Int32, sal_Int32 ) ...@@ -505,13 +505,13 @@ void SwAccSingleTableSelHander_Impl::Unselect( sal_Int32, sal_Int32 )
class SwAccAllTableSelHander_Impl : public SwAccTableSelHander_Impl class SwAccAllTableSelHander_Impl : public SwAccTableSelHander_Impl
{ {
std::vector< bool > aSelected; std::vector< bool > m_aSelected;
sal_Int32 nCount; sal_Int32 m_nCount;
public: public:
explicit SwAccAllTableSelHander_Impl(sal_Int32 nSize) explicit SwAccAllTableSelHander_Impl(sal_Int32 nSize)
: aSelected(nSize, true) : m_aSelected(nSize, true)
, nCount(nSize) , m_nCount(nSize)
{ {
} }
...@@ -527,21 +527,21 @@ SwAccAllTableSelHander_Impl::~SwAccAllTableSelHander_Impl() ...@@ -527,21 +527,21 @@ SwAccAllTableSelHander_Impl::~SwAccAllTableSelHander_Impl()
uno::Sequence < sal_Int32 > SwAccAllTableSelHander_Impl::GetSelSequence() uno::Sequence < sal_Int32 > SwAccAllTableSelHander_Impl::GetSelSequence()
{ {
OSL_ENSURE( nCount >= 0, "underflow" ); OSL_ENSURE( m_nCount >= 0, "underflow" );
uno::Sequence < sal_Int32 > aRet( nCount ); uno::Sequence < sal_Int32 > aRet( m_nCount );
sal_Int32 *pRet = aRet.getArray(); sal_Int32 *pRet = aRet.getArray();
sal_Int32 nPos = 0; sal_Int32 nPos = 0;
size_t nSize = aSelected.size(); size_t nSize = m_aSelected.size();
for( size_t i=0; i < nSize && nPos < nCount; i++ ) for( size_t i=0; i < nSize && nPos < m_nCount; i++ )
{ {
if( aSelected[i] ) if( m_aSelected[i] )
{ {
*pRet++ = i; *pRet++ = i;
nPos++; nPos++;
} }
} }
OSL_ENSURE( nPos == nCount, "count is wrong" ); OSL_ENSURE( nPos == m_nCount, "count is wrong" );
return aRet; return aRet;
} }
...@@ -549,16 +549,16 @@ uno::Sequence < sal_Int32 > SwAccAllTableSelHander_Impl::GetSelSequence() ...@@ -549,16 +549,16 @@ uno::Sequence < sal_Int32 > SwAccAllTableSelHander_Impl::GetSelSequence()
void SwAccAllTableSelHander_Impl::Unselect( sal_Int32 nRowOrCol, void SwAccAllTableSelHander_Impl::Unselect( sal_Int32 nRowOrCol,
sal_Int32 nExt ) sal_Int32 nExt )
{ {
OSL_ENSURE( static_cast< size_t >( nRowOrCol ) < aSelected.size(), OSL_ENSURE( static_cast< size_t >( nRowOrCol ) < m_aSelected.size(),
"index to large" ); "index to large" );
OSL_ENSURE( static_cast< size_t >( nRowOrCol+nExt ) <= aSelected.size(), OSL_ENSURE( static_cast< size_t >( nRowOrCol+nExt ) <= m_aSelected.size(),
"extent to large" ); "extent to large" );
while( nExt ) while( nExt )
{ {
if( aSelected[static_cast< size_t >( nRowOrCol )] ) if( m_aSelected[static_cast< size_t >( nRowOrCol )] )
{ {
aSelected[static_cast< size_t >( nRowOrCol )] = false; m_aSelected[static_cast< size_t >( nRowOrCol )] = false;
nCount--; m_nCount--;
} }
nExt--; nExt--;
nRowOrCol++; nRowOrCol++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment