summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2010-08-23 15:18:37 +0200
committerFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2010-08-23 15:18:37 +0200
commit45e7a1e3f6b01c1fce6056f80e4642a452a42dfd (patch)
tree597e8dd9cb53acd44089e00f842561d27d640c4d /svtools
parenta37ba38fa326b3541fe20287d98a8d4fc672cb5e (diff)
fs33a: expose the WB_HIDESELECTION but of the tree control at its UNO API
Diffstat (limited to 'svtools')
-rw-r--r--svtools/inc/svtools/svtreebx.hxx1
-rw-r--r--svtools/source/contnr/svtreebx.cxx9
-rw-r--r--svtools/source/uno/treecontrolpeer.cxx18
3 files changed, 28 insertions, 0 deletions
diff --git a/svtools/inc/svtools/svtreebx.hxx b/svtools/inc/svtools/svtreebx.hxx
index a600b91db1c4..787e0956888f 100644
--- a/svtools/inc/svtools/svtreebx.hxx
+++ b/svtools/inc/svtools/svtreebx.hxx
@@ -156,6 +156,7 @@ protected:
virtual void CursorMoved( SvLBoxEntry* pNewCursor );
virtual void PreparePaint( SvLBoxEntry* );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
+ virtual void StateChanged( StateChangedType nStateChange );
void InitSettings(BOOL bFont,BOOL bForeground,BOOL bBackground);
BOOL IsCellFocusEnabled() const;
diff --git a/svtools/source/contnr/svtreebx.cxx b/svtools/source/contnr/svtreebx.cxx
index b11a3f12ddf3..3b1430e0df77 100644
--- a/svtools/source/contnr/svtreebx.cxx
+++ b/svtools/source/contnr/svtreebx.cxx
@@ -2516,6 +2516,15 @@ void SvTreeListBox::DataChanged( const DataChangedEvent& rDCEvt )
Control::DataChanged( rDCEvt );
}
+void SvTreeListBox::StateChanged( StateChangedType i_nStateChange )
+{
+ SvLBox::StateChanged( i_nStateChange );
+ if ( ( i_nStateChange & STATE_CHANGE_STYLE ) != 0 )
+ {
+ SetWindowBits( GetStyle() );
+ }
+}
+
void SvTreeListBox::InitSettings(BOOL bFont,BOOL bForeground,BOOL bBackground)
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx
index 7fb1a007960f..5c1f4925783a 100644
--- a/svtools/source/uno/treecontrolpeer.cxx
+++ b/svtools/source/uno/treecontrolpeer.cxx
@@ -1322,6 +1322,21 @@ void TreeControlPeer::setProperty( const ::rtl::OUString& PropertyName, const An
switch( GetPropertyId( PropertyName ) )
{
+ case BASEPROPERTY_HIDEINACTIVESELECTION:
+ {
+ sal_Bool bEnabled = sal_False;
+ if ( aValue >>= bEnabled )
+ {
+ WinBits nStyle = rTree.GetStyle();
+ if ( bEnabled )
+ nStyle |= WB_HIDESELECTION;
+ else
+ nStyle &= ~WB_HIDESELECTION;
+ rTree.SetStyle( nStyle );
+ }
+ }
+ break;
+
case BASEPROPERTY_TREE_SELECTIONTYPE:
{
SelectionType eSelectionType;
@@ -1412,6 +1427,9 @@ Any TreeControlPeer::getProperty( const ::rtl::OUString& PropertyName ) throw(Ru
UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
switch(nPropId)
{
+ case BASEPROPERTY_HIDEINACTIVESELECTION:
+ return Any( ( rTree.GetStyle() & WB_HIDESELECTION ) != 0 ? sal_True : sal_False );
+
case BASEPROPERTY_TREE_SELECTIONTYPE:
{
SelectionType eSelectionType;