summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-05-20 12:38:21 +0200
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-05-20 12:38:21 +0200
commitffe5faef611a17abf300a049f5158dd6662c46de (patch)
treef17653619a457b5fac3a37fcee9a6f2778906e35 /toolkit
parentf9425a94186c33c2571bdc32b689c3706251f416 (diff)
unoawt: MultiSelectionSimpleMode property for list boxes, allowing 'browser-like' multi selection (where a single click onto an entry only toggles this entry)
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/inc/toolkit/helper/property.hxx3
-rw-r--r--toolkit/source/awt/vclxwindows.cxx9
-rw-r--r--toolkit/source/controls/unocontrolmodel.cxx1
-rw-r--r--toolkit/source/helper/property.cxx1
4 files changed, 13 insertions, 1 deletions
diff --git a/toolkit/inc/toolkit/helper/property.hxx b/toolkit/inc/toolkit/helper/property.hxx
index d5f484145316..ed86c3fe4ded 100644
--- a/toolkit/inc/toolkit/helper/property.hxx
+++ b/toolkit/inc/toolkit/helper/property.hxx
@@ -199,7 +199,8 @@ namespace rtl {
#define BASEPROPERTY_GRID_EVEN_ROW_BACKGROUND 148
#define BASEPROPERTY_GRID_HEADER_BACKGROUND 149
#define BASEPROPERTY_GRID_LINE_COLOR 150
-#define BASEPROPERTY_GRID_ROW_BACKGROUND 151
+#define BASEPROPERTY_GRID_ROW_BACKGROUND 151
+#define BASEPROPERTY_MULTISELECTION_SIMPLEMODE 152
// Keine gebundenen Properties, werden immer aus der Property BASEPROPERTY_FONTDESCRIPTOR entnommen.
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 00124b58ae93..5649ed4248dd 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -1546,6 +1546,7 @@ void VCLXListBox::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_HELPURL,
BASEPROPERTY_LINECOUNT,
BASEPROPERTY_MULTISELECTION,
+ BASEPROPERTY_MULTISELECTION_SIMPLEMODE,
BASEPROPERTY_PRINTABLE,
BASEPROPERTY_SELECTEDITEMS,
BASEPROPERTY_STRINGITEMLIST,
@@ -1929,6 +1930,9 @@ void VCLXListBox::setProperty( const ::rtl::OUString& PropertyName, const ::com:
pListBox->EnableMultiSelection( b );
}
break;
+ case BASEPROPERTY_MULTISELECTION_SIMPLEMODE:
+ ::toolkit::adjustBooleanWindowStyle( Value, pListBox, WB_SIMPLEMODE, sal_False );
+ break;
case BASEPROPERTY_LINECOUNT:
{
sal_Int16 n = sal_Int16();
@@ -1993,6 +1997,11 @@ void VCLXListBox::setProperty( const ::rtl::OUString& PropertyName, const ::com:
aProp <<= (sal_Bool) pListBox->IsMultiSelectionEnabled();
}
break;
+ case BASEPROPERTY_MULTISELECTION_SIMPLEMODE:
+ {
+ aProp <<= (sal_Bool)( ( pListBox->GetStyle() & WB_SIMPLEMODE ) == 0 );
+ }
+ break;
case BASEPROPERTY_LINECOUNT:
{
aProp <<= (sal_Int16) pListBox->GetDropDownLineCount();
diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx
index d34f5d9d9006..c5e1f70b15b8 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -338,6 +338,7 @@ sal_Bool UnoControlModel::ImplHasProperty( sal_uInt16 nPropId ) const
case BASEPROPERTY_HARDLINEBREAKS:
case BASEPROPERTY_NOLABEL: aDefault <<= (sal_Bool) sal_False; break;
+ case BASEPROPERTY_MULTISELECTION_SIMPLEMODE:
case BASEPROPERTY_HIDEINACTIVESELECTION:
case BASEPROPERTY_ENFORCE_FORMAT:
case BASEPROPERTY_AUTOCOMPLETE:
diff --git a/toolkit/source/helper/property.cxx b/toolkit/source/helper/property.cxx
index 6711e4503511..b878112eed69 100644
--- a/toolkit/source/helper/property.cxx
+++ b/toolkit/source/helper/property.cxx
@@ -203,6 +203,7 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount )
DECL_PROP_1 ( "MouseTransparent", MOUSETRANSPARENT, bool, BOUND ),
DECL_PROP_2 ( "MultiLine", MULTILINE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "MultiSelection", MULTISELECTION, bool, BOUND, MAYBEDEFAULT ),
+ DECL_PROP_2 ( "MultiSelectionSimpleMode", MULTISELECTION_SIMPLEMODE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "NativeWidgetLook", NATIVE_WIDGET_LOOK, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "NoLabel", NOLABEL, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Orientation", ORIENTATION, sal_Int32, BOUND, MAYBEDEFAULT ),