summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lange [tl] <tl@openoffice.org>2010-05-20 11:04:13 +0200
committerThomas Lange [tl] <tl@openoffice.org>2010-05-20 11:04:13 +0200
commit6641398317d5f6681b2cf1715e834a1393038fe1 (patch)
treef0b1381f8f2efd41053deadac54d4148744677ba
parentec12d2bb2aeee7ec44119263bae3b04aad02b98c (diff)
cws tl79: #i111422# pre-notify for 'Toggle' of check box
-rw-r--r--tools/inc/tools/wintypes.hxx1
-rw-r--r--vcl/source/control/button.cxx7
2 files changed, 6 insertions, 2 deletions
diff --git a/tools/inc/tools/wintypes.hxx b/tools/inc/tools/wintypes.hxx
index 8f13af8fd842..7d6296b76e8c 100644
--- a/tools/inc/tools/wintypes.hxx
+++ b/tools/inc/tools/wintypes.hxx
@@ -215,6 +215,7 @@ typedef sal_Int64 WinBits;
// Window-Bits for CheckBox
#define WB_CBLINESTYLE ((WinBits)SAL_CONST_INT64(0x2000000000))
+#define WB_EARLYTOGGLE ((WinBits)SAL_CONST_INT64(0x4000000000))
// Window-Bits for Edit
#define WB_PASSWORD ((WinBits)0x01000000)
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 1f45b5902381..5b15330ed927 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -3675,11 +3675,14 @@ void CheckBox::ImplCheck()
else
eNewState = STATE_NOCHECK;
meState = eNewState;
- ImplInvalidateOrDrawCheckBoxState();
ImplDelData aDelData;
ImplAddDel( &aDelData );
- Toggle();
+ if( (GetStyle() & WB_EARLYTOGGLE) )
+ Toggle();
+ ImplInvalidateOrDrawCheckBoxState();
+ if( ! (GetStyle() & WB_EARLYTOGGLE) )
+ Toggle();
if ( aDelData.IsDelete() )
return;
ImplRemoveDel( &aDelData );