summaryrefslogtreecommitdiff
path: root/svtools/source/uno/unoiface.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-07-05 15:17:19 +0000
committerOliver Bolte <obo@openoffice.org>2004-07-05 15:17:19 +0000
commitb5b1686bb4128e57117d9c633d654f9f1f0a37d1 (patch)
tree4bbb642a4665967c61d65b4097359fbce8642e08 /svtools/source/uno/unoiface.cxx
parent9af4f6be4c5423e55ce4f8e86c16d11f42361167 (diff)
INTEGRATION: CWS frmcontrols04 (1.9.508); FILE MERGED
2004/06/23 10:10:08 fs 1.9.508.3: #i24686# properly implement HideInactiveSelection for the MultiLineEdit 2004/06/16 05:49:26 fs 1.9.508.2: RESYNC: (1.9-1.12); FILE MERGED 2004/04/29 06:11:01 fs 1.9.508.1: #i24686# support HideInactiveSelection property at the file control
Diffstat (limited to 'svtools/source/uno/unoiface.cxx')
-rw-r--r--svtools/source/uno/unoiface.cxx48
1 files changed, 45 insertions, 3 deletions
diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx
index 42432ded487f..a9bb6fdf981a 100644
--- a/svtools/source/uno/unoiface.cxx
+++ b/svtools/source/uno/unoiface.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unoiface.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: hjs $ $Date: 2004-06-28 17:07:08 $
+ * last change: $Author: obo $ $Date: 2004-07-05 16:17:19 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -118,6 +118,19 @@
#include <prgsbar.hxx>
#endif
+namespace
+{
+ static void lcl_setWinBits( Window* _pWindow, WinBits _nBits, sal_Bool _bSet )
+ {
+ WinBits nStyle = _pWindow->GetStyle();
+ if ( _bSet )
+ nStyle |= _nBits;
+ else
+ nStyle &= ~_nBits;
+ _pWindow->SetStyle( nStyle );
+ }
+}
+
// ----------------------------------------------------
// help function for the toolkit...
// ----------------------------------------------------
@@ -490,11 +503,14 @@ void VCLXMultiLineEdit::setProperty( const ::rtl::OUString& PropertyName, const
pMultiLineEdit->SetMaxTextLen( n );
}
break;
- case BASEPROPERTY_FOCUSSELECTIONHIDE:
+ case BASEPROPERTY_HIDEINACTIVESELECTION:
{
sal_Bool b;
if ( Value >>= b )
+ {
pMultiLineEdit->EnableFocusSelectionHide( b );
+ lcl_setWinBits( pMultiLineEdit, WB_NOHIDESELECTION, !b );
+ }
}
break;
default:
@@ -672,6 +688,32 @@ IMPL_XTYPEPROVIDER_START( VCLXFileControl )
VCLXWindow::getTypes()
IMPL_XTYPEPROVIDER_END
+void SAL_CALL VCLXFileControl::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException)
+{
+ ::vos::OGuard aGuard( GetMutex() );
+
+ FileControl* pControl = (FileControl*)GetWindow();
+ if ( pControl )
+ {
+ sal_uInt16 nPropType = GetPropertyId( PropertyName );
+ switch ( nPropType )
+ {
+ case BASEPROPERTY_HIDEINACTIVESELECTION:
+ {
+ sal_Bool bValue( sal_False );
+ OSL_VERIFY( Value >>= bValue );
+
+ lcl_setWinBits( pControl, WB_NOHIDESELECTION, !bValue );
+ lcl_setWinBits( &pControl->GetEdit(), WB_NOHIDESELECTION, !bValue );
+ }
+ break;
+
+ default:
+ VCLXWindow::setProperty( PropertyName, Value );
+ break;
+ }
+ }
+}
void VCLXFileControl::SetWindow( Window* pWindow )
{