Kaydet (Commit) 74ed61e7 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:indentation in UnoControls..accessibility

Change-Id: Ib58ac1c7171331eac543eba7b5f7bae8fa04ae4d
Reviewed-on: https://gerrit.libreoffice.org/67524
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 3b9dcfee
...@@ -310,7 +310,7 @@ void ProgressBar::impl_paint ( sal_Int32 nX, sal_Int32 nY, const Reference< XGra ...@@ -310,7 +310,7 @@ void ProgressBar::impl_paint ( sal_Int32 nX, sal_Int32 nY, const Reference< XGra
// This paint method is not buffered !! // This paint method is not buffered !!
// Every request paint the completely control. ( but only, if peer exist ) // Every request paint the completely control. ( but only, if peer exist )
if ( rGraphics.is () ) if ( rGraphics.is () )
{ {
MutexGuard aGuard (m_aMutex); MutexGuard aGuard (m_aMutex);
......
...@@ -154,8 +154,8 @@ sal_Int32 SAL_CALL AccessibleBrowseBoxBase::getAccessibleIndexInParent() ...@@ -154,8 +154,8 @@ sal_Int32 SAL_CALL AccessibleBrowseBoxBase::getAccessibleIndexInParent()
} }
} }
} }
} }
return nRet; return nRet;
} }
OUString SAL_CALL AccessibleBrowseBoxBase::getAccessibleDescription() OUString SAL_CALL AccessibleBrowseBoxBase::getAccessibleDescription()
...@@ -178,7 +178,7 @@ AccessibleBrowseBoxBase::getAccessibleRelationSet() ...@@ -178,7 +178,7 @@ AccessibleBrowseBoxBase::getAccessibleRelationSet()
::osl::MutexGuard aGuard( getMutex() ); ::osl::MutexGuard aGuard( getMutex() );
ensureIsAlive(); ensureIsAlive();
// BrowseBox does not have relations. // BrowseBox does not have relations.
return new utl::AccessibleRelationSetHelper; return new utl::AccessibleRelationSetHelper;
} }
Reference< css::accessibility::XAccessibleStateSet > SAL_CALL Reference< css::accessibility::XAccessibleStateSet > SAL_CALL
......
...@@ -120,7 +120,7 @@ Reference< XAccessibleTable > SAL_CALL AccessibleBrowseBoxHeaderBar::getAccessib ...@@ -120,7 +120,7 @@ Reference< XAccessibleTable > SAL_CALL AccessibleBrowseBoxHeaderBar::getAccessib
Reference< XAccessibleTable > SAL_CALL AccessibleBrowseBoxHeaderBar::getAccessibleColumnHeaders() Reference< XAccessibleTable > SAL_CALL AccessibleBrowseBoxHeaderBar::getAccessibleColumnHeaders()
{ {
SolarMethodGuard aGuard(getMutex()); SolarMethodGuard aGuard(getMutex());
ensureIsAlive(); ensureIsAlive();
return nullptr; // no headers in headers return nullptr; // no headers in headers
......
...@@ -74,8 +74,8 @@ namespace accessibility ...@@ -74,8 +74,8 @@ namespace accessibility
{ {
m_nOffset = ( _nOffset == OFFSET_DEFAULT ) ? sal_Int32(vcl::BBINDEX_FIRSTCONTROL) : _nOffset; m_nOffset = ( _nOffset == OFFSET_DEFAULT ) ? sal_Int32(vcl::BBINDEX_FIRSTCONTROL) : _nOffset;
sal_Int32 nIndex = getIndex_Impl( _nRowPos, _nColPos, _rBrowseBox.GetColumnCount() ); sal_Int32 nIndex = getIndex_Impl( _nRowPos, _nColPos, _rBrowseBox.GetColumnCount() );
setAccessibleName( _rBrowseBox.GetAccessibleObjectName( vcl::BBTYPE_TABLECELL, nIndex ) ); setAccessibleName( _rBrowseBox.GetAccessibleObjectName( vcl::BBTYPE_TABLECELL, nIndex ) );
setAccessibleDescription( _rBrowseBox.GetAccessibleObjectDescription( vcl::BBTYPE_TABLECELL, nIndex ) ); setAccessibleDescription( _rBrowseBox.GetAccessibleObjectDescription( vcl::BBTYPE_TABLECELL, nIndex ) );
// Need to register as event listener // Need to register as event listener
Reference< XComponent > xComponent(_rxParent, UNO_QUERY); Reference< XComponent > xComponent(_rxParent, UNO_QUERY);
if( xComponent.is() ) if( xComponent.is() )
......
...@@ -171,7 +171,7 @@ void SAL_CALL AccessibleGridControl::grabFocus() ...@@ -171,7 +171,7 @@ void SAL_CALL AccessibleGridControl::grabFocus()
{ {
SolarMutexGuard aSolarGuard; SolarMutexGuard aSolarGuard;
ensureIsAlive(); ensureIsAlive();
m_aTable.GrabFocus(); m_aTable.GrabFocus();
} }
// XServiceInfo --------------------------------------------------------------- // XServiceInfo ---------------------------------------------------------------
......
...@@ -111,21 +111,21 @@ sal_Int32 SAL_CALL AccessibleGridControlBase::getAccessibleIndexInParent() ...@@ -111,21 +111,21 @@ sal_Int32 SAL_CALL AccessibleGridControlBase::getAccessibleIndexInParent()
xParentContext( m_xParent->getAccessibleContext() ); xParentContext( m_xParent->getAccessibleContext() );
if( xParentContext.is() ) if( xParentContext.is() )
{ {
css::uno::Reference< uno::XInterface > xChild; css::uno::Reference< uno::XInterface > xChild;
sal_Int32 nChildCount = xParentContext->getAccessibleChildCount(); sal_Int32 nChildCount = xParentContext->getAccessibleChildCount();
for( sal_Int32 nChild = 0; nChild < nChildCount; ++nChild ) for( sal_Int32 nChild = 0; nChild < nChildCount; ++nChild )
{ {
xChild.set(xParentContext->getAccessibleChild( nChild ), css::uno::UNO_QUERY); xChild.set(xParentContext->getAccessibleChild( nChild ), css::uno::UNO_QUERY);
if ( xMeMyselfAndI.get() == xChild.get() ) if ( xMeMyselfAndI.get() == xChild.get() )
{ {
nRet = nChild; nRet = nChild;
break; break;
}
} }
} }
} }
} return nRet;
return nRet;
} }
OUString SAL_CALL AccessibleGridControlBase::getAccessibleDescription() OUString SAL_CALL AccessibleGridControlBase::getAccessibleDescription()
...@@ -229,16 +229,16 @@ void SAL_CALL AccessibleGridControlBase::removeAccessibleEventListener( ...@@ -229,16 +229,16 @@ void SAL_CALL AccessibleGridControlBase::removeAccessibleEventListener(
SolarMutexGuard g; SolarMutexGuard g;
sal_Int32 nListenerCount = AccessibleEventNotifier::removeEventListener( getClientId( ), _rxListener ); sal_Int32 nListenerCount = AccessibleEventNotifier::removeEventListener( getClientId( ), _rxListener );
if ( !nListenerCount ) if ( !nListenerCount )
{ {
// no listeners anymore // no listeners anymore
// -> revoke ourself. This may lead to the notifier thread dying (if we were the last client), // -> revoke ourself. This may lead to the notifier thread dying (if we were the last client),
// and at least to us not firing any events anymore, in case somebody calls // and at least to us not firing any events anymore, in case somebody calls
// NotifyAccessibleEvent, again // NotifyAccessibleEvent, again
AccessibleEventNotifier::TClientId nId( getClientId( ) ); AccessibleEventNotifier::TClientId nId( getClientId( ) );
setClientId( 0 ); setClientId( 0 );
AccessibleEventNotifier::revokeClient( nId ); AccessibleEventNotifier::revokeClient( nId );
} }
} }
} }
......
...@@ -316,9 +316,9 @@ namespace accessibility ...@@ -316,9 +316,9 @@ namespace accessibility
if ( IsAlive_Impl() ) if ( IsAlive_Impl() )
{ {
pStateSetHelper->AddState( AccessibleStateType::TRANSIENT ); pStateSetHelper->AddState( AccessibleStateType::TRANSIENT );
pStateSetHelper->AddState( AccessibleStateType::SELECTABLE ); pStateSetHelper->AddState( AccessibleStateType::SELECTABLE );
pStateSetHelper->AddState( AccessibleStateType::ENABLED ); pStateSetHelper->AddState( AccessibleStateType::ENABLED );
pStateSetHelper->AddState( AccessibleStateType::SENSITIVE ); pStateSetHelper->AddState( AccessibleStateType::SENSITIVE );
if ( IsShowing_Impl() ) if ( IsShowing_Impl() )
{ {
......
...@@ -175,7 +175,7 @@ namespace accessibility ...@@ -175,7 +175,7 @@ namespace accessibility
{ {
case VclEventId::WindowEnabled: case VclEventId::WindowEnabled:
{ {
Any aNewValue; Any aNewValue;
aNewValue <<= AccessibleStateType::SENSITIVE; aNewValue <<= AccessibleStateType::SENSITIVE;
NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, Any(), aNewValue ); NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, Any(), aNewValue );
aNewValue <<= AccessibleStateType::ENABLED; aNewValue <<= AccessibleStateType::ENABLED;
...@@ -184,7 +184,7 @@ namespace accessibility ...@@ -184,7 +184,7 @@ namespace accessibility
break; break;
case VclEventId::WindowDisabled: case VclEventId::WindowDisabled:
{ {
Any aOldValue; Any aOldValue;
aOldValue <<= AccessibleStateType::ENABLED; aOldValue <<= AccessibleStateType::ENABLED;
NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, Any() ); NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, Any() );
aOldValue <<= AccessibleStateType::SENSITIVE; aOldValue <<= AccessibleStateType::SENSITIVE;
......
...@@ -2110,9 +2110,9 @@ void Document::handleSelectionChangeNotification() ...@@ -2110,9 +2110,9 @@ void Document::handleSelectionChangeNotification()
::rtl::Reference< Paragraph > xParagraph(getParagraph(aIt)); ::rtl::Reference< Paragraph > xParagraph(getParagraph(aIt));
if (xParagraph.is()) if (xParagraph.is())
{ {
//disable the first event when user types in empty field. //disable the first event when user types in empty field.
::sal_Int32 count = getAccessibleChildCount(); ::sal_Int32 count = getAccessibleChildCount();
bool bEmpty = count > 1; bool bEmpty = count > 1;
//if (aIt != m_aFocused) //if (aIt != m_aFocused)
if (aIt != m_aFocused && bEmpty) if (aIt != m_aFocused && bEmpty)
xParagraph->notifyEvent( xParagraph->notifyEvent(
......
...@@ -200,7 +200,7 @@ void VCLXAccessibleList::UpdateSelection_Impl_Acc(bool bHasDropDownList) ...@@ -200,7 +200,7 @@ void VCLXAccessibleList::UpdateSelection_Impl_Acc(bool bHasDropDownList)
{ {
SolarMutexGuard aSolarGuard; SolarMutexGuard aSolarGuard;
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
Reference< XAccessible > xNewAcc; Reference< XAccessible > xNewAcc;
if ( m_pListBoxHelper ) if ( m_pListBoxHelper )
{ {
sal_Int32 i=0; sal_Int32 i=0;
......
...@@ -461,7 +461,7 @@ sal_Unicode VCLXAccessibleStatusBarItem::getCharacter( sal_Int32 nIndex ) ...@@ -461,7 +461,7 @@ sal_Unicode VCLXAccessibleStatusBarItem::getCharacter( sal_Int32 nIndex )
{ {
OExternalLockGuard aGuard( this ); OExternalLockGuard aGuard( this );
return OCommonAccessibleText::implGetCharacter( GetItemText(), nIndex ); return OCommonAccessibleText::implGetCharacter( GetItemText(), nIndex );
} }
sal_Int32 VCLXAccessibleStatusBarItem::getCaretPosition() sal_Int32 VCLXAccessibleStatusBarItem::getCaretPosition()
......
...@@ -540,7 +540,7 @@ sal_Unicode VCLXAccessibleTabPage::getCharacter( sal_Int32 nIndex ) ...@@ -540,7 +540,7 @@ sal_Unicode VCLXAccessibleTabPage::getCharacter( sal_Int32 nIndex )
{ {
OExternalLockGuard aGuard( this ); OExternalLockGuard aGuard( this );
return OCommonAccessibleText::implGetCharacter( GetPageText(), nIndex ); return OCommonAccessibleText::implGetCharacter( GetPageText(), nIndex );
} }
sal_Int32 VCLXAccessibleTabPage::getCharacterCount() sal_Int32 VCLXAccessibleTabPage::getCharacterCount()
......
...@@ -238,9 +238,9 @@ void VCLXAccessibleToolBox::UpdateFocus_Impl() ...@@ -238,9 +238,9 @@ void VCLXAccessibleToolBox::UpdateFocus_Impl()
nFocusCount++; nFocusCount++;
} }
} }
// both items changed? // both items changed?
if ( nFocusCount > 1 ) if ( nFocusCount > 1 )
break; break;
} }
} }
} }
...@@ -535,7 +535,7 @@ void VCLXAccessibleToolBox::ProcessWindowEvent( const VclWindowEvent& rVclWindow ...@@ -535,7 +535,7 @@ void VCLXAccessibleToolBox::ProcessWindowEvent( const VclWindowEvent& rVclWindow
else if( pToolBox->GetItemPos(pToolBox->GetCurItemId()) != ToolBox::ITEM_NOTFOUND ) else if( pToolBox->GetItemPos(pToolBox->GetCurItemId()) != ToolBox::ITEM_NOTFOUND )
{ {
UpdateChecked_Impl( pToolBox->GetItemPos(pToolBox->GetCurItemId()) ); UpdateChecked_Impl( pToolBox->GetItemPos(pToolBox->GetCurItemId()) );
UpdateIndeterminate_Impl( pToolBox->GetItemPos(pToolBox->GetCurItemId()) ); UpdateIndeterminate_Impl( pToolBox->GetItemPos(pToolBox->GetCurItemId()) );
} }
break; break;
} }
...@@ -552,7 +552,7 @@ void VCLXAccessibleToolBox::ProcessWindowEvent( const VclWindowEvent& rVclWindow ...@@ -552,7 +552,7 @@ void VCLXAccessibleToolBox::ProcessWindowEvent( const VclWindowEvent& rVclWindow
UpdateChecked_Impl( ToolBox::ITEM_NOTFOUND ); UpdateChecked_Impl( ToolBox::ITEM_NOTFOUND );
UpdateIndeterminate_Impl( static_cast<ToolBox::ImplToolItems::size_type>(reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData())) ); UpdateIndeterminate_Impl( static_cast<ToolBox::ImplToolItems::size_type>(reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData())) );
} }
break; break;
} }
case VclEventId::ToolboxHighlight: case VclEventId::ToolboxHighlight:
......
...@@ -154,7 +154,7 @@ void VCLXAccessibleToolBoxItem::SetFocus( bool _bFocus ) ...@@ -154,7 +154,7 @@ void VCLXAccessibleToolBoxItem::SetFocus( bool _bFocus )
else else
aNewValue <<= AccessibleStateType::FOCUSED; aNewValue <<= AccessibleStateType::FOCUSED;
m_bHasFocus = _bFocus; m_bHasFocus = _bFocus;
NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue ); NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue );
} }
} }
...@@ -438,14 +438,14 @@ sal_Unicode VCLXAccessibleToolBoxItem::getCharacter( sal_Int32 nIndex ) ...@@ -438,14 +438,14 @@ sal_Unicode VCLXAccessibleToolBoxItem::getCharacter( sal_Int32 nIndex )
{ {
OExternalLockGuard aGuard( this ); OExternalLockGuard aGuard( this );
return OCommonAccessibleText::implGetCharacter( GetText(), nIndex ); return OCommonAccessibleText::implGetCharacter( GetText(), nIndex );
} }
OUString VCLXAccessibleToolBoxItem::getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) OUString VCLXAccessibleToolBoxItem::getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
{ {
OExternalLockGuard aGuard( this ); OExternalLockGuard aGuard( this );
return OCommonAccessibleText::implGetTextRange( GetText(), nStartIndex, nEndIndex ); return OCommonAccessibleText::implGetTextRange( GetText(), nStartIndex, nEndIndex );
} }
sal_Int32 SAL_CALL VCLXAccessibleToolBoxItem::getCaretPosition() sal_Int32 SAL_CALL VCLXAccessibleToolBoxItem::getCaretPosition()
......
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