Kaydet (Commit) af16e73d authored tarafından Jim Raykowski's avatar Jim Raykowski Kaydeden (comit) Caolán McNamara

tdf#121326 Don't tab stop at toolboxes with no visible or enabled items

Change-Id: I4d20bafbda9e6b675654d0359421cf9e57712d15
Reviewed-on: https://gerrit.libreoffice.org/63457
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst e08002d1
...@@ -187,6 +187,21 @@ static vcl::Window* ImplGetNextWindow( vcl::Window* pParent, sal_uInt16 n, sal_u ...@@ -187,6 +187,21 @@ static vcl::Window* ImplGetNextWindow( vcl::Window* pParent, sal_uInt16 n, sal_u
namespace vcl { namespace vcl {
static bool lcl_ToolBoxTabStop( Window* pWindow )
{
ToolBox* pToolBoxWindow = static_cast<ToolBox*>( pWindow );
sal_uInt16 nId;
for ( ToolBox::ImplToolItems::size_type nPos = 0; nPos < pToolBoxWindow->GetItemCount(); nPos++ )
{
nId = pToolBoxWindow->GetItemId( nPos );
if ( pToolBoxWindow->IsItemVisible( nId ) && pToolBoxWindow->IsItemEnabled( nId ) )
return true;
}
return false;
}
vcl::Window* Window::ImplGetDlgWindow( sal_uInt16 nIndex, GetDlgWindowType nType, vcl::Window* Window::ImplGetDlgWindow( sal_uInt16 nIndex, GetDlgWindowType nType,
sal_uInt16 nFormStart, sal_uInt16 nFormEnd, sal_uInt16 nFormStart, sal_uInt16 nFormEnd,
sal_uInt16* pIndex ) sal_uInt16* pIndex )
...@@ -212,7 +227,15 @@ vcl::Window* Window::ImplGetDlgWindow( sal_uInt16 nIndex, GetDlgWindowType nType ...@@ -212,7 +227,15 @@ vcl::Window* Window::ImplGetDlgWindow( sal_uInt16 nIndex, GetDlgWindowType nType
if ( !pWindow ) if ( !pWindow )
break; break;
if ( (i == nTemp) && (pWindow->GetStyle() & WB_TABSTOP) ) if ( (i == nTemp) && (pWindow->GetStyle() & WB_TABSTOP) )
break; {
if ( WindowType::TOOLBOX == pWindow->GetType() )
{
if ( lcl_ToolBoxTabStop( pWindow ) )
break;
}
else
break;
}
} }
while ( i != nIndex ); while ( i != nIndex );
} }
...@@ -245,7 +268,15 @@ vcl::Window* Window::ImplGetDlgWindow( sal_uInt16 nIndex, GetDlgWindowType nType ...@@ -245,7 +268,15 @@ vcl::Window* Window::ImplGetDlgWindow( sal_uInt16 nIndex, GetDlgWindowType nType
do do
{ {
if ( pWindow->GetStyle() & WB_TABSTOP ) if ( pWindow->GetStyle() & WB_TABSTOP )
break; {
if ( WindowType::TOOLBOX == pWindow->GetType() )
{
if ( lcl_ToolBoxTabStop( pWindow ) )
break;
}
else
break;
}
if( i == nOldIndex ) // only disabled controls ? if( i == nOldIndex ) // only disabled controls ?
{ {
i = nStartIndex2; i = nStartIndex2;
......
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