summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorFrank Schönheit <fs@openoffice.org>2009-09-25 09:49:45 +0000
committerFrank Schönheit <fs@openoffice.org>2009-09-25 09:49:45 +0000
commit1b51c3004bec95184cf605a74c06cb4414f8270f (patch)
treef9a67ee8903a9d81af23cbaae928a63873360acd /toolkit
parent0775a523ff1be393217112badd6c742f2c5dc3a7 (diff)
getProperty( RefDevice ) implemented now
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/awt/vclxwindow.cxx11
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;