summaryrefslogtreecommitdiff
path: root/toolkit/source/controls/unocontrol.cxx
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-06-25 15:09:38 +0200
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-06-25 15:09:38 +0200
commit04421ec5afe024feb9caf0d9a10c532ffe777fe2 (patch)
tree6cd14a20e96e7b10bc2a6c3ea843fba8f1c55b7f /toolkit/source/controls/unocontrol.cxx
parentbc9a2076300859ea109ec02329bfde4ea2920ecc (diff)
unoawt2: #i112684# let UNO Controls implement the (newly introduced) XStyleSettingsSupplier, giving access to their style, in particular, to the HC flag
Diffstat (limited to 'toolkit/source/controls/unocontrol.cxx')
-rw-r--r--toolkit/source/controls/unocontrol.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx
index 9254819f0b42..eb45dd521d9a 100644
--- a/toolkit/source/controls/unocontrol.cxx
+++ b/toolkit/source/controls/unocontrol.cxx
@@ -1587,3 +1587,15 @@ awt::Size SAL_CALL UnoControl::convertSizeToPixel( const awt::Size& i_Size, ::sa
return awt::Size( );
}
+//----------------------------------------------------------------------------------------------------------------------
+uno::Reference< awt::XStyleSettings > SAL_CALL UnoControl::getStyleSettings() throw (RuntimeException)
+{
+ Reference< awt::XStyleSettingsSupplier > xPeerSupplier;
+ {
+ ::osl::MutexGuard aGuard( GetMutex() );
+ xPeerSupplier = xPeerSupplier.query( getPeer() );
+ }
+ if ( xPeerSupplier.is() )
+ return xPeerSupplier->getStyleSettings();
+ return NULL;
+}