summaryrefslogtreecommitdiff
path: root/automation
diff options
context:
space:
mode:
authorThorsten Bosbach <tbo@OpenOffice.org>2010-06-09 13:37:47 +0200
committerThorsten Bosbach <tbo@OpenOffice.org>2010-06-09 13:37:47 +0200
commita6317cb5881eb9140fa915597bf773714f917369 (patch)
tree71f3422f7c31bc65fe879a1c32b679c2a930f54a /automation
parent7c83cc3481c8dd6637319ed5ee9f346be2c0ddec (diff)
#i111784 CWS gridcontrol_03: Tablecontrol.select does not trigger selection event
Diffstat (limited to 'automation')
-rw-r--r--automation/source/server/statemnt.cxx31
1 files changed, 20 insertions, 11 deletions
diff --git a/automation/source/server/statemnt.cxx b/automation/source/server/statemnt.cxx
index 4e3f5d3cc..40bdedbac 100644
--- a/automation/source/server/statemnt.cxx
+++ b/automation/source/server/statemnt.cxx
@@ -5341,12 +5341,12 @@ BOOL StatementControl::Execute()
ReportError( aUId, GEN_RES_STR1( S_HELPID_ON_TOOLBOX_NOT_FOUND, MethodString( nMethodId ) ) );\
else\
{\
- if ( !pTB->IsItemEnabled( pTB->GetItemId(nItemPos) ) && nMethodId != _M_IsEnabled )\
+ if ( !pTB->IsItemEnabled( pTB->GetItemId(nItemPos) ) && nMethodId != _M_IsEnabled && nMethodId != M_GetState )\
{\
ReportError( aUId, GEN_RES_STR1( S_BUTTON_DISABLED_ON_TOOLBOX, MethodString( nMethodId ) ) );\
bItemFound = FALSE;\
}\
- else if ( !pTB->IsItemVisible( pTB->GetItemId(nItemPos) ) )\
+ else if ( !pTB->IsItemVisible( pTB->GetItemId(nItemPos) ) && nMethodId != M_GetState )\
{\
ReportError( aUId, GEN_RES_STR1( S_BUTTON_HIDDEN_ON_TOOLBOX, MethodString( nMethodId ) ) );\
bItemFound = FALSE;\
@@ -5738,19 +5738,28 @@ BOOL StatementControl::Execute()
pRet->GenReturn ( RET_Value, aUId, comm_ULONG( pItem->GetButtonFlags() & ~SV_STATE_MASK ));
break;
case M_Check :
- pItem->SetStateChecked();
- pTree->CheckButtonHdl();
- pTree->InvalidateEntry( pThisEntry );
+ if ( !pItem->IsStateChecked() )
+ {
+ pItem->SetStateChecked();
+ pTree->CheckButtonHdl();
+ pTree->InvalidateEntry( pThisEntry );
+ }
break;
case M_UnCheck :
- pItem->SetStateUnchecked();
- pTree->CheckButtonHdl();
- pTree->InvalidateEntry( pThisEntry );
+ if ( pItem->IsStateChecked() || pItem->IsStateTristate() )
+ {
+ pItem->SetStateUnchecked();
+ pTree->CheckButtonHdl();
+ pTree->InvalidateEntry( pThisEntry );
+ }
break;
case M_TriState :
- pItem->SetStateTristate();
- pTree->CheckButtonHdl();
- pTree->InvalidateEntry( pThisEntry );
+ if ( !pItem->IsStateTristate() )
+ {
+ pItem->SetStateTristate();
+ pTree->CheckButtonHdl();
+ pTree->InvalidateEntry( pThisEntry );
+ }
break;
default:
ReportError( aUId, GEN_RES_STR1( S_INTERNAL_ERROR, MethodString( nMethodId ) ) );