getProperty( RefDevice ) implemented now

This commit is contained in:
Frank Schönheit
2009-09-25 09:49:45 +00:00
parent 0775a523ff
commit 1b51c3004b

View File

@@ -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;