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