diff options
author | Frank Schönheit <fs@openoffice.org> | 2009-09-25 09:49:45 +0000 |
---|---|---|
committer | Frank Schönheit <fs@openoffice.org> | 2009-09-25 09:49:45 +0000 |
commit | 1b51c3004bec95184cf605a74c06cb4414f8270f (patch) | |
tree | f9a67ee8903a9d81af23cbaae928a63873360acd /toolkit/source/awt/vclxwindow.cxx | |
parent | 0775a523ff1be393217112badd6c742f2c5dc3a7 (diff) |
getProperty( RefDevice ) implemented now
Diffstat (limited to 'toolkit/source/awt/vclxwindow.cxx')
-rw-r--r-- | toolkit/source/awt/vclxwindow.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index 501ed7f009f1..40413091aaf2 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -1643,7 +1643,6 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com:: { case BASEPROPERTY_REFERENCE_DEVICE: { - // TODO: at the moment, the refdevice is hackily implemented for Button and derived classes only Control* pControl = dynamic_cast< Control* >( pWindow ); OSL_ENSURE( pControl, "VCLXWindow::setProperty( RefDevice ): need a Control for this!" ); if ( !pControl ) @@ -2174,12 +2173,14 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com:: { case BASEPROPERTY_REFERENCE_DEVICE: { - // TODO: at the moment, the refdevice is hackily implemented for Button and derived classes only - Button* pButton = dynamic_cast< Button* >( GetWindow() ); - if ( !pButton ) + Control* pControl = dynamic_cast< Control* >( GetWindow() ); + OSL_ENSURE( pControl, "VCLXWindow::setProperty( RefDevice ): need a Control for this!" ); + if ( !pControl ) break; - // TODO: hmm ... it seems there is no way to query an OutputDevice for its XDevice ...? + VCLXDevice* pDevice = new VCLXDevice; + pDevice->SetOutputDevice( pControl->GetReferenceDevice() ); + aProp <<= Reference< XDevice >( pDevice ); } break; |