summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2011-03-22 13:27:12 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2011-03-22 13:27:12 +0100
commite2de537d59150b7fc13618d5f3821fe2213f974e (patch)
treec48aafedeabc9af08abf3845305bf1612299232a /toolkit
parentd004c1413059aee774dbf0ee9cbab606feb8ef42 (diff)
gridfixes: #i117398# allow to specify selection-related colors in table/grid control models (VCL/UNO)
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/inc/toolkit/helper/property.hxx4
-rw-r--r--toolkit/source/controls/grid/gridcontrol.cxx8
-rw-r--r--toolkit/source/helper/property.cxx4
3 files changed, 16 insertions, 0 deletions
diff --git a/toolkit/inc/toolkit/helper/property.hxx b/toolkit/inc/toolkit/helper/property.hxx
index c2d6380dcb65..03cd972940a7 100644
--- a/toolkit/inc/toolkit/helper/property.hxx
+++ b/toolkit/inc/toolkit/helper/property.hxx
@@ -206,6 +206,10 @@ namespace rtl {
#define BASEPROPERTY_ROW_HEADER_WIDTH 155
#define BASEPROPERTY_COLUMN_HEADER_HEIGHT 156
#define BASEPROPERTY_USE_GRID_LINES 157
+#define BASEPROPERTY_ACTIVE_SEL_BACKGROUND_COLOR 158
+#define BASEPROPERTY_INACTIVE_SEL_BACKGROUND_COLOR 159
+#define BASEPROPERTY_ACTIVE_SEL_TEXT_COLOR 160
+#define BASEPROPERTY_INACTIVE_SEL_TEXT_COLOR 161
// Keine gebundenen Properties, werden immer aus der Property BASEPROPERTY_FONTDESCRIPTOR entnommen.
diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx
index 5bbf8e20aa87..3fb784aa7063 100644
--- a/toolkit/source/controls/grid/gridcontrol.cxx
+++ b/toolkit/source/controls/grid/gridcontrol.cxx
@@ -111,6 +111,10 @@ UnoGridModel::UnoGridModel( const ::com::sun::star::uno::Reference< ::com::sun::
ImplRegisterProperty( BASEPROPERTY_GRID_HEADER_BACKGROUND );
ImplRegisterProperty( BASEPROPERTY_GRID_HEADER_TEXT_COLOR );
ImplRegisterProperty( BASEPROPERTY_GRID_ROW_BACKGROUND_COLORS );
+ ImplRegisterProperty( BASEPROPERTY_ACTIVE_SEL_BACKGROUND_COLOR );
+ ImplRegisterProperty( BASEPROPERTY_INACTIVE_SEL_BACKGROUND_COLOR );
+ ImplRegisterProperty( BASEPROPERTY_ACTIVE_SEL_TEXT_COLOR );
+ ImplRegisterProperty( BASEPROPERTY_INACTIVE_SEL_TEXT_COLOR );
ImplRegisterProperty( BASEPROPERTY_VERTICALALIGN );
}
@@ -240,6 +244,10 @@ Any UnoGridModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
case BASEPROPERTY_GRID_HEADER_TEXT_COLOR:
case BASEPROPERTY_GRID_LINE_COLOR:
case BASEPROPERTY_GRID_ROW_BACKGROUND_COLORS:
+ case BASEPROPERTY_ACTIVE_SEL_BACKGROUND_COLOR:
+ case BASEPROPERTY_INACTIVE_SEL_BACKGROUND_COLOR:
+ case BASEPROPERTY_ACTIVE_SEL_TEXT_COLOR:
+ case BASEPROPERTY_INACTIVE_SEL_TEXT_COLOR:
return Any();
default:
return UnoControlModel::ImplGetDefaultValue( nPropId );
diff --git a/toolkit/source/helper/property.cxx b/toolkit/source/helper/property.cxx
index a418b4a00b7b..80ddf6d04fce 100644
--- a/toolkit/source/helper/property.cxx
+++ b/toolkit/source/helper/property.cxx
@@ -292,6 +292,10 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount )
DECL_PROP_3 ( "GridLineColor", GRID_LINE_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_3 ( "RowBackgroundColors", GRID_ROW_BACKGROUND_COLORS, Sequence< sal_Int32 >, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "UseGridLines", USE_GRID_LINES, sal_Bool, BOUND, MAYBEDEFAULT ),
+ DECL_PROP_3 ( "ActiveSelectionBackgroundColor", ACTIVE_SEL_BACKGROUND_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
+ DECL_PROP_3 ( "InactiveSelectionBackgroundColor", INACTIVE_SEL_BACKGROUND_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
+ DECL_PROP_3 ( "ActiveSelectionTextColor", ACTIVE_SEL_TEXT_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
+ DECL_PROP_3 ( "InactiveSelectionTextColor", INACTIVE_SEL_TEXT_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
};
pPropertyInfos = aImplPropertyInfos;
nElements = sizeof( aImplPropertyInfos ) / sizeof( ImplPropertyInfo );