summaryrefslogtreecommitdiff
path: root/toolkit/source/awt/vclxwindow.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/source/awt/vclxwindow.cxx')
-rw-r--r--toolkit/source/awt/vclxwindow.cxx27
1 files changed, 27 insertions, 0 deletions
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 9ca21c5fb36b..3d2069ab8385 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -64,6 +64,7 @@
#include <vcl/dockwin.hxx>
#include <vcl/pdfextoutdevdata.hxx>
#include <vcl/tabpage.hxx>
+#include <vcl/button.hxx>
#include <comphelper/asyncnotification.hxx>
#include <toolkit/helper/solarrelease.hxx>
@@ -76,6 +77,7 @@ using ::com::sun::star::uno::UNO_QUERY;
using ::com::sun::star::lang::EventObject;
using ::com::sun::star::awt::XWindowListener2;
using ::com::sun::star::awt::XDockableWindowListener;
+using ::com::sun::star::awt::XDevice;
using ::com::sun::star::style::VerticalAlignment;
using ::com::sun::star::style::VerticalAlignment_TOP;
using ::com::sun::star::style::VerticalAlignment_MIDDLE;
@@ -1585,6 +1587,18 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
sal_uInt16 nPropType = GetPropertyId( PropertyName );
switch ( nPropType )
{
+ case BASEPROPERTY_REFERENCE_DEVICE:
+ {
+ Control* pControl = dynamic_cast< Control* >( pWindow );
+ OSL_ENSURE( pControl, "VCLXWindow::setProperty( RefDevice ): need a Control for this!" );
+ if ( !pControl )
+ break;
+ Reference< XDevice > xDevice( Value, UNO_QUERY );
+ OutputDevice* pDevice = VCLUnoHelper::GetOutputDevice( xDevice );
+ pControl->SetReferenceDevice( pDevice );
+ }
+ break;
+
case BASEPROPERTY_CONTEXT_WRITING_MODE:
{
OSL_VERIFY( Value >>= mpImpl->mnContextWritingMode );
@@ -2103,6 +2117,19 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
sal_uInt16 nPropType = GetPropertyId( PropertyName );
switch ( nPropType )
{
+ case BASEPROPERTY_REFERENCE_DEVICE:
+ {
+ Control* pControl = dynamic_cast< Control* >( GetWindow() );
+ OSL_ENSURE( pControl, "VCLXWindow::setProperty( RefDevice ): need a Control for this!" );
+ if ( !pControl )
+ break;
+
+ VCLXDevice* pDevice = new VCLXDevice;
+ pDevice->SetOutputDevice( pControl->GetReferenceDevice() );
+ aProp <<= Reference< XDevice >( pDevice );
+ }
+ break;
+
case BASEPROPERTY_CONTEXT_WRITING_MODE:
aProp <<= mpImpl->mnContextWritingMode;
break;