diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-09-03 12:20:27 -0500 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-09-14 09:38:47 +0200 |
commit | fe08068cf9ba35105955244b8d9cd9e64e3ebb88 (patch) | |
tree | e32e2bd869f03df3421fd4190d6ef76d24533bda /toolkit | |
parent | 5200140683c461e7439d8f2b5a625391350a2cef (diff) |
gridfixes: #i117398# allow to specify selection colors in table/grid
Conflicts:
toolkit/inc/toolkit/helper/property.hxx
toolkit/source/controls/grid/defaultgriddatamodel.cxx
Change-Id: Ie863aa7cecb4c7bda230ab829e6090689518dab8
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/inc/toolkit/helper/property.hxx | 4 | ||||
-rw-r--r-- | toolkit/source/controls/grid/defaultgriddatamodel.cxx | 6 | ||||
-rw-r--r-- | toolkit/source/controls/grid/gridcontrol.cxx | 8 | ||||
-rw-r--r-- | toolkit/source/helper/property.cxx | 4 |
4 files changed, 20 insertions, 2 deletions
diff --git a/toolkit/inc/toolkit/helper/property.hxx b/toolkit/inc/toolkit/helper/property.hxx index f496026a47df..5f8eedff8720 100644 --- a/toolkit/inc/toolkit/helper/property.hxx +++ b/toolkit/inc/toolkit/helper/property.hxx @@ -215,6 +215,10 @@ namespace rtl { #define BASEPROPERTY_SCROLLHEIGHT 162 #define BASEPROPERTY_SCROLLTOP 163 #define BASEPROPERTY_SCROLLLEFT 164 +#define BASEPROPERTY_ACTIVE_SEL_BACKGROUND_COLOR 165 +#define BASEPROPERTY_INACTIVE_SEL_BACKGROUND_COLOR 166 +#define BASEPROPERTY_ACTIVE_SEL_TEXT_COLOR 167 +#define BASEPROPERTY_INACTIVE_SEL_TEXT_COLOR 168 // These properties are not bound, they are always extracted from the BASEPROPERTY_FONTDESCRIPTOR property diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx index 7c0568219dce..653f0568159c 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx @@ -36,7 +36,8 @@ #include <rtl/ref.hxx> #include <algorithm> -#include <o3tl/compat_functional.hxx> +#include <functional> +#include <boost/bind.hpp> //...................................................................................................................... namespace toolkit @@ -182,7 +183,8 @@ namespace toolkit Sequence< Any > resultData( m_nColumnCount ); RowData& rRowData = impl_getRowDataAccess_throw( i_rowIndex, m_nColumnCount ); - ::std::transform( rRowData.begin(), rRowData.end(), resultData.getArray(), ::o3tl::select1st< CellData >() ); + ::std::transform( rRowData.begin(), rRowData.end(), resultData.getArray(), + boost::bind(&CellData::first,_1)); return resultData; } diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index 57121ce45c02..fdd33ff82c08 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -110,6 +110,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 ); } @@ -239,6 +243,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 14331ab69c10..746e7cca4c31 100644 --- a/toolkit/source/helper/property.cxx +++ b/toolkit/source/helper/property.cxx @@ -297,6 +297,10 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount ) DECL_PROP_2 ( "UseGridLines", USE_GRID_LINES, sal_Bool, BOUND, MAYBEDEFAULT ), DECL_DEP_PROP_3 ( "MultiPageValue", MULTIPAGEVALUE, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ), DECL_PROP_3 ( "AllDialogChildren", USERFORMCONTAINEES, Reference< ::com::sun::star::container::XNameContainer >, BOUND, MAYBEDEFAULT, MAYBEVOID ), + 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 ); |