diff options
author | Kurt Zenker <kz@openoffice.org> | 2007-10-09 14:04:38 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2007-10-09 14:04:38 +0000 |
commit | 5ccead93b5db176e94d4b21bc4d906d08ba5319c (patch) | |
tree | 7fc2ab210fbbba99ae29d4c10283f96a49a595c8 /svtools | |
parent | INTEGRATION: CWS aquavcl03 (1.14.72); FILE MERGED (diff) | |
download | core-5ccead93b5db176e94d4b21bc4d906d08ba5319c.tar.gz core-5ccead93b5db176e94d4b21bc4d906d08ba5319c.zip |
INTEGRATION: CWS aquavcl03 (1.52.72); FILE MERGED
2007/08/23 12:29:58 isma87 1.52.72.1: #i80969#: add call to native functions to draw natively (if possible) nodes and nets for listviews
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/contnr/svtreebx.cxx | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/svtools/source/contnr/svtreebx.cxx b/svtools/source/contnr/svtreebx.cxx index d0a950067983..31b132d22f6b 100644 --- a/svtools/source/contnr/svtreebx.cxx +++ b/svtools/source/contnr/svtreebx.cxx @@ -4,9 +4,9 @@ * * $RCSfile: svtreebx.cxx,v $ * - * $Revision: 1.52 $ + * $Revision: 1.53 $ * - * last change: $Author: hr $ $Date: 2007-06-27 21:21:40 $ + * last change: $Author: kz $ $Date: 2007-10-09 15:04:38 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -1824,7 +1824,37 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags, USHORT nStyle = 0; if ( !IsEnabled() ) nStyle |= IMAGE_DRAW_DISABLE; - DrawImage( aPos, *pImg ,nStyle); + + //native + BOOL bNativeOK = FALSE; + if ( IsNativeControlSupported( CTRL_LISTNODE, PART_ENTIRE_CONTROL) ) + { + ImplControlValue aControlValue; + Region aCtrlRegion( Rectangle(aPos, pImg->GetSizePixel() ) ); + ControlState nState = 0; + + if ( IsEnabled() ) nState |= CTRL_STATE_ENABLED; + + if ( IsExpanded(pEntry) ) + aControlValue.setTristateVal( BUTTONVALUE_ON );//expanded node + else + { + if( (!pEntry->HasChilds()) && pEntry->HasChildsOnDemand() && + (!(pEntry->GetFlags() & SV_ENTRYFLAG_HAD_CHILDREN)) && + pImp->GetDontKnowNodeBmp().GetSizePixel().Width() ) + aControlValue.setTristateVal( BUTTONVALUE_DONTKNOW );//dont know + else + aControlValue.setTristateVal( BUTTONVALUE_OFF );//collapsed node + } + + bNativeOK = DrawNativeControl( CTRL_LISTNODE, PART_ENTIRE_CONTROL, + aCtrlRegion, nState, aControlValue, rtl::OUString() ); + } + + if( !bNativeOK) { + //non native + DrawImage( aPos, *pImg ,nStyle); + } } } } |