summaryrefslogtreecommitdiff
path: root/toolkit
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
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')
-rw-r--r--toolkit/inc/toolkit/awt/vclxwindow.hxx9
-rw-r--r--toolkit/inc/toolkit/controls/unocontrol.hxx9
-rw-r--r--toolkit/source/awt/makefile.mk1
-rw-r--r--toolkit/source/awt/stylesettings.cxx987
-rw-r--r--toolkit/source/awt/stylesettings.hxx188
-rw-r--r--toolkit/source/awt/vclxwindow.cxx41
-rw-r--r--toolkit/source/controls/unocontrol.cxx12
7 files changed, 1232 insertions, 15 deletions
diff --git a/toolkit/inc/toolkit/awt/vclxwindow.hxx b/toolkit/inc/toolkit/awt/vclxwindow.hxx
index 6ad3c3ab6076..565691b97f09 100644
--- a/toolkit/inc/toolkit/awt/vclxwindow.hxx
+++ b/toolkit/inc/toolkit/awt/vclxwindow.hxx
@@ -41,9 +41,10 @@
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <com/sun/star/accessibility/XAccessibleContext.hpp>
#include <com/sun/star/awt/XDockableWindow.hpp>
+#include <com/sun/star/awt/XStyleSettingsSupplier.hpp>
#include <cppuhelper/weak.hxx>
-#include <cppuhelper/implbase8.hxx>
+#include <cppuhelper/implbase9.hxx>
#include <osl/mutex.hxx>
#include <tools/gen.hxx> // Size
@@ -71,7 +72,7 @@ namespace toolkit
class UnoPropertyArrayHelper;
class VCLXWindowImpl;
-typedef ::cppu::ImplInheritanceHelper8 < VCLXDevice
+typedef ::cppu::ImplInheritanceHelper9 < VCLXDevice
, ::com::sun::star::awt::XWindow2
, ::com::sun::star::awt::XVclWindowPeer
, ::com::sun::star::awt::XLayoutConstrains
@@ -80,6 +81,7 @@ typedef ::cppu::ImplInheritanceHelper8 < VCLXDevice
, ::com::sun::star::accessibility::XAccessible
, ::com::sun::star::lang::XEventListener
, ::com::sun::star::beans::XPropertySetInfo
+ , ::com::sun::star::awt::XStyleSettingsSupplier
> VCLXWindow_Base;
class TOOLKIT_DLLPUBLIC VCLXWindow : public VCLXWindow_Base
@@ -232,6 +234,9 @@ public:
::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > SAL_CALL getProperties( ) throw (::com::sun::star::uno::RuntimeException);
::com::sun::star::beans::Property SAL_CALL getPropertyByName( const ::rtl::OUString& aName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
::sal_Bool SAL_CALL hasPropertyByName( const ::rtl::OUString& Name ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XStyleSettingsSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XStyleSettings > SAL_CALL getStyleSettings() throw (::com::sun::star::uno::RuntimeException);
};
#endif // _TOOLKIT_AWT_VCLXWINDOW_HXX_
diff --git a/toolkit/inc/toolkit/controls/unocontrol.hxx b/toolkit/inc/toolkit/controls/unocontrol.hxx
index 0515abe27128..6bcfa519ed3d 100644
--- a/toolkit/inc/toolkit/controls/unocontrol.hxx
+++ b/toolkit/inc/toolkit/controls/unocontrol.hxx
@@ -39,6 +39,7 @@
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/awt/XUnitConversion.hpp>
+#include <com/sun/star/awt/XStyleSettingsSupplier.hpp>
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <cppuhelper/weakagg.hxx>
#include <osl/mutex.hxx>
@@ -47,7 +48,7 @@
#include <cppuhelper/propshlp.hxx>
#include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/weakref.hxx>
-#include <cppuhelper/implbase8.hxx>
+#include <cppuhelper/implbase9.hxx>
#include <com/sun/star/util/XModeChangeBroadcaster.hpp>
#include <com/sun/star/awt/XVclWindowPeer.hpp>
@@ -74,7 +75,7 @@ struct UnoControl_Data;
// ----------------------------------------------------
// class UnoControl
// ----------------------------------------------------
-typedef ::cppu::WeakAggImplHelper8 < ::com::sun::star::awt::XControl
+typedef ::cppu::WeakAggImplHelper9 < ::com::sun::star::awt::XControl
, ::com::sun::star::awt::XWindow2
, ::com::sun::star::awt::XView
, ::com::sun::star::beans::XPropertiesChangeListener
@@ -82,6 +83,7 @@ typedef ::cppu::WeakAggImplHelper8 < ::com::sun::star::awt::XControl
, ::com::sun::star::accessibility::XAccessible
, ::com::sun::star::util::XModeChangeBroadcaster
, ::com::sun::star::awt::XUnitConversion
+ , ::com::sun::star::awt::XStyleSettingsSupplier
> UnoControl_Base;
class TOOLKIT_DLLPUBLIC UnoControl : public UnoControl_Base
@@ -228,6 +230,9 @@ public:
virtual ::com::sun::star::awt::Size SAL_CALL convertSizeToLogic( const ::com::sun::star::awt::Size& aSize, ::sal_Int16 TargetUnit ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::awt::Size SAL_CALL convertSizeToPixel( const ::com::sun::star::awt::Size& aSize, ::sal_Int16 SourceUnit ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ // XStyleSettingsSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XStyleSettings > SAL_CALL getStyleSettings() throw (::com::sun::star::uno::RuntimeException);
+
private:
// ::com::sun::star::beans::XPropertiesChangeListener
void SAL_CALL propertiesChange( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyChangeEvent >& evt ) throw(::com::sun::star::uno::RuntimeException);
diff --git a/toolkit/source/awt/makefile.mk b/toolkit/source/awt/makefile.mk
index a53e9e22ba2d..88b40a597410 100644
--- a/toolkit/source/awt/makefile.mk
+++ b/toolkit/source/awt/makefile.mk
@@ -44,6 +44,7 @@ CFLAGSCXX+=$(OBJCXXFLAGS)
.ENDIF # "$(GUIBASE)"=="aqua"
SLOFILES= \
+ $(SLO)$/stylesettings.obj \
$(SLO)$/vclxaccessiblecomponent.obj \
$(SLO)$/vclxbitmap.obj \
$(SLO)$/vclxcontainer.obj \
diff --git a/toolkit/source/awt/stylesettings.cxx b/toolkit/source/awt/stylesettings.cxx
new file mode 100644
index 000000000000..fc3ec241101c
--- /dev/null
+++ b/toolkit/source/awt/stylesettings.cxx
@@ -0,0 +1,987 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_toolkit.hxx"
+
+#include "stylesettings.hxx"
+#include <toolkit/awt/vclxwindow.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
+
+/** === begin UNO includes === **/
+#include <com/sun/star/lang/DisposedException.hpp>
+/** === end UNO includes === **/
+
+#include <cppuhelper/interfacecontainer.hxx>
+#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
+#include <vcl/window.hxx>
+#include <vcl/settings.hxx>
+
+//......................................................................................................................
+namespace toolkit
+{
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::lang::DisposedException;
+ using ::com::sun::star::lang::EventObject;
+ using ::com::sun::star::awt::FontDescriptor;
+ using ::com::sun::star::awt::XStyleChangeListener;
+ using ::com::sun::star::awt::FontDescriptor;
+ /** === end UNO using === **/
+
+ //==================================================================================================================
+ //= WindowStyleSettings_Data
+ //==================================================================================================================
+ struct WindowStyleSettings_Data
+ {
+ ::vos::IMutex& rMutex;
+ VCLXWindow* pOwningWindow;
+ ::cppu::OInterfaceContainerHelper aStyleChangeListeners;
+
+ WindowStyleSettings_Data( ::vos::IMutex& i_rWindowMutex, ::osl::Mutex& i_rListenerMutex, VCLXWindow& i_rOwningWindow )
+ :rMutex( i_rWindowMutex )
+ ,pOwningWindow( &i_rOwningWindow )
+ ,aStyleChangeListeners( i_rListenerMutex )
+ {
+ }
+
+ DECL_LINK( OnWindowEvent, const VclWindowEvent* );
+ };
+
+ //------------------------------------------------------------------------------------------------------------------
+ IMPL_LINK( WindowStyleSettings_Data, OnWindowEvent, const VclWindowEvent*, i_pEvent )
+ {
+ if ( !i_pEvent || ( i_pEvent->GetId() != VCLEVENT_WINDOW_DATACHANGED ) )
+ return 0L;
+ const DataChangedEvent* pDataChangedEvent = static_cast< const DataChangedEvent* >( i_pEvent->GetData() );
+ if ( !pDataChangedEvent || ( pDataChangedEvent->GetType() != DATACHANGED_SETTINGS ) )
+ return 0L;
+ if ( ( pDataChangedEvent->GetFlags() & SETTINGS_STYLE ) == 0 )
+ return 0L;
+
+ EventObject aEvent( *pOwningWindow );
+ aStyleChangeListeners.notifyEach( &XStyleChangeListener::styleSettingsChanged, aEvent );
+ return 1L;
+ }
+
+ //==================================================================================================================
+ //= StyleMethodGuard
+ //==================================================================================================================
+ class StyleMethodGuard
+ {
+ public:
+ StyleMethodGuard( WindowStyleSettings_Data& i_rData )
+ :m_aGuard( i_rData.rMutex )
+ {
+ if ( i_rData.pOwningWindow == NULL )
+ throw DisposedException();
+ }
+
+ ~StyleMethodGuard()
+ {
+ }
+
+ private:
+ ::vos::OGuard m_aGuard;
+ };
+
+ //==================================================================================================================
+ //= WindowStyleSettings
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ WindowStyleSettings::WindowStyleSettings( ::vos::IMutex& i_rWindowMutex, ::osl::Mutex& i_rListenerMutex, VCLXWindow& i_rOwningWindow )
+ :m_pData( new WindowStyleSettings_Data( i_rWindowMutex, i_rListenerMutex, i_rOwningWindow ) )
+ {
+ Window* pWindow = i_rOwningWindow.GetWindow();
+ if ( !pWindow )
+ throw new RuntimeException();
+ pWindow->AddEventListener( LINK( m_pData.get(), WindowStyleSettings_Data, OnWindowEvent ) );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ WindowStyleSettings::~WindowStyleSettings()
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void WindowStyleSettings::dispose()
+ {
+ StyleMethodGuard aGuard( *m_pData );
+
+ Window* pWindow = m_pData->pOwningWindow->GetWindow();
+ OSL_ENSURE( pWindow, "WindowStyleSettings::dispose: window has been reset before we could revoke the listener!" );
+ if ( pWindow )
+ pWindow->RemoveEventListener( LINK( m_pData.get(), WindowStyleSettings_Data, OnWindowEvent ) );
+
+ EventObject aEvent( *this );
+ m_pData->aStyleChangeListeners.disposeAndClear( aEvent );
+
+ m_pData->pOwningWindow = NULL;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ namespace
+ {
+ sal_Int32 lcl_getStyleColor( WindowStyleSettings_Data& i_rData, Color const & (StyleSettings::*i_pGetter)() const )
+ {
+ const Window* pWindow = i_rData.pOwningWindow->GetWindow();
+ const AllSettings aAllSettings = pWindow->GetSettings();
+ const StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
+ return (aStyleSettings.*i_pGetter)().GetColor();
+ }
+
+ void lcl_setStyleColor( WindowStyleSettings_Data& i_rData, void (StyleSettings::*i_pSetter)( Color const & ), const sal_Int32 i_nColor )
+ {
+ Window* pWindow = i_rData.pOwningWindow->GetWindow();
+ AllSettings aAllSettings = pWindow->GetSettings();
+ StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
+ (aStyleSettings.*i_pSetter)( Color( i_nColor ) );
+ aAllSettings.SetStyleSettings( aStyleSettings );
+ pWindow->SetSettings( aAllSettings );
+ }
+
+ FontDescriptor lcl_getStyleFont( WindowStyleSettings_Data& i_rData, Font const & (StyleSettings::*i_pGetter)() const )
+ {
+ const Window* pWindow = i_rData.pOwningWindow->GetWindow();
+ const AllSettings aAllSettings = pWindow->GetSettings();
+ const StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
+ return VCLUnoHelper::CreateFontDescriptor( (aStyleSettings.*i_pGetter)() );
+ }
+
+ void lcl_setStyleFont( WindowStyleSettings_Data& i_rData, void (StyleSettings::*i_pSetter)( Font const &),
+ Font const & (StyleSettings::*i_pGetter)() const, const FontDescriptor& i_rFont )
+ {
+ Window* pWindow = i_rData.pOwningWindow->GetWindow();
+ AllSettings aAllSettings = pWindow->GetSettings();
+ StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
+ const Font aNewFont = VCLUnoHelper::CreateFont( i_rFont, (aStyleSettings.*i_pGetter)() );
+ (aStyleSettings.*i_pSetter)( aNewFont );
+ aAllSettings.SetStyleSettings( aStyleSettings );
+ pWindow->SetSettings( aAllSettings );
+ }
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getActiveBorderColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetActiveBorderColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setActiveBorderColor( ::sal_Int32 _activebordercolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetActiveBorderColor, _activebordercolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getActiveColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetActiveColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setActiveColor( ::sal_Int32 _activecolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetActiveColor, _activecolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getActiveTabColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetActiveTabColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setActiveTabColor( ::sal_Int32 _activetabcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetActiveTabColor, _activetabcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getActiveTextColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetActiveTextColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setActiveTextColor( ::sal_Int32 _activetextcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetActiveTextColor, _activetextcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getButtonRolloverTextColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetButtonRolloverTextColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setButtonRolloverTextColor( ::sal_Int32 _buttonrollovertextcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetButtonRolloverTextColor, _buttonrollovertextcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getButtonTextColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetButtonTextColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setButtonTextColor( ::sal_Int32 _buttontextcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetButtonTextColor, _buttontextcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getCheckedColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetCheckedColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setCheckedColor( ::sal_Int32 _checkedcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetCheckedColor, _checkedcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getDarkShadowColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetDarkShadowColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setDarkShadowColor( ::sal_Int32 _darkshadowcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetDarkShadowColor, _darkshadowcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getDeactiveBorderColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetDeactiveBorderColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setDeactiveBorderColor( ::sal_Int32 _deactivebordercolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetDeactiveBorderColor, _deactivebordercolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getDeactiveColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetDeactiveColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setDeactiveColor( ::sal_Int32 _deactivecolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetDeactiveColor, _deactivecolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getDeactiveTextColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetDeactiveTextColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setDeactiveTextColor( ::sal_Int32 _deactivetextcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetDeactiveTextColor, _deactivetextcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getDialogColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetDialogColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setDialogColor( ::sal_Int32 _dialogcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetDialogColor, _dialogcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getDialogTextColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetDialogTextColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setDialogTextColor( ::sal_Int32 _dialogtextcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetDialogTextColor, _dialogtextcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getDisableColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetDisableColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setDisableColor( ::sal_Int32 _disablecolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetDisableColor, _disablecolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getFaceColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetFaceColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setFaceColor( ::sal_Int32 _facecolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetFaceColor, _facecolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getFaceGradientColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ const Window* pWindow = m_pData->pOwningWindow->GetWindow();
+ const AllSettings aAllSettings = pWindow->GetSettings();
+ const StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
+ return aStyleSettings.GetFaceGradientColor().GetColor();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getFieldColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetFieldColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setFieldColor( ::sal_Int32 _fieldcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetFieldColor, _fieldcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getFieldRolloverTextColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetFieldRolloverTextColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setFieldRolloverTextColor( ::sal_Int32 _fieldrollovertextcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetFieldRolloverTextColor, _fieldrollovertextcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getFieldTextColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetFieldTextColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setFieldTextColor( ::sal_Int32 _fieldtextcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetFieldTextColor, _fieldtextcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getGroupTextColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetGroupTextColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setGroupTextColor( ::sal_Int32 _grouptextcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetGroupTextColor, _grouptextcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getHelpColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetHelpColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setHelpColor( ::sal_Int32 _helpcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetHelpColor, _helpcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getHelpTextColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetHelpTextColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setHelpTextColor( ::sal_Int32 _helptextcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetHelpTextColor, _helptextcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getHighlightColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetHighlightColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setHighlightColor( ::sal_Int32 _highlightcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetHighlightColor, _highlightcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getHighlightTextColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetHighlightTextColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setHighlightTextColor( ::sal_Int32 _highlighttextcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetHighlightTextColor, _highlighttextcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getInactiveTabColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetInactiveTabColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setInactiveTabColor( ::sal_Int32 _inactivetabcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetInactiveTabColor, _inactivetabcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getInfoTextColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetInfoTextColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setInfoTextColor( ::sal_Int32 _infotextcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetInfoTextColor, _infotextcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getLabelTextColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetLabelTextColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setLabelTextColor( ::sal_Int32 _labeltextcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetLabelTextColor, _labeltextcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getLightColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetLightColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setLightColor( ::sal_Int32 _lightcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetLightColor, _lightcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getMenuBarColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetMenuBarColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setMenuBarColor( ::sal_Int32 _menubarcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetMenuBarColor, _menubarcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getMenuBarTextColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetMenuBarTextColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setMenuBarTextColor( ::sal_Int32 _menubartextcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetMenuBarTextColor, _menubartextcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getMenuBorderColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetMenuBorderColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setMenuBorderColor( ::sal_Int32 _menubordercolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetMenuBorderColor, _menubordercolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getMenuColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetMenuColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setMenuColor( ::sal_Int32 _menucolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetMenuColor, _menucolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getMenuHighlightColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetMenuHighlightColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setMenuHighlightColor( ::sal_Int32 _menuhighlightcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetMenuHighlightColor, _menuhighlightcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getMenuHighlightTextColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetMenuHighlightTextColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setMenuHighlightTextColor( ::sal_Int32 _menuhighlighttextcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetMenuHighlightTextColor, _menuhighlighttextcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getMenuTextColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetMenuTextColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setMenuTextColor( ::sal_Int32 _menutextcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetMenuTextColor, _menutextcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getMonoColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetMonoColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setMonoColor( ::sal_Int32 _monocolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetMonoColor, _monocolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getRadioCheckTextColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetRadioCheckTextColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setRadioCheckTextColor( ::sal_Int32 _radiochecktextcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetRadioCheckTextColor, _radiochecktextcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getSeparatorColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ const Window* pWindow = m_pData->pOwningWindow->GetWindow();
+ const AllSettings aAllSettings = pWindow->GetSettings();
+ const StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
+ return aStyleSettings.GetSeparatorColor().GetColor();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getShadowColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetShadowColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setShadowColor( ::sal_Int32 _shadowcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetShadowColor, _shadowcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getWindowColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetWindowColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setWindowColor( ::sal_Int32 _windowcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetWindowColor, _windowcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getWindowTextColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetWindowTextColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setWindowTextColor( ::sal_Int32 _windowtextcolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetWindowTextColor, _windowtextcolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL WindowStyleSettings::getWorkspaceColor() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleColor( *m_pData, &StyleSettings::GetWorkspaceColor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setWorkspaceColor( ::sal_Int32 _workspacecolor ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetWorkspaceColor, _workspacecolor );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Bool SAL_CALL WindowStyleSettings::getHighContrastMode() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ const Window* pWindow = m_pData->pOwningWindow->GetWindow();
+ const AllSettings aAllSettings = pWindow->GetSettings();
+ const StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
+ return aStyleSettings.GetHighContrastMode();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setHighContrastMode( ::sal_Bool _highcontrastmode ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ Window* pWindow = m_pData->pOwningWindow->GetWindow();
+ AllSettings aAllSettings = pWindow->GetSettings();
+ StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
+ aStyleSettings.SetHighContrastMode( _highcontrastmode );
+ aAllSettings.SetStyleSettings( aStyleSettings );
+ pWindow->SetSettings( aAllSettings );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ FontDescriptor SAL_CALL WindowStyleSettings::getApplicationFont() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleFont( *m_pData, &StyleSettings::GetAppFont );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setApplicationFont( const FontDescriptor& _applicationfont ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleFont( *m_pData, &StyleSettings::SetAppFont, &StyleSettings::GetAppFont, _applicationfont );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ FontDescriptor SAL_CALL WindowStyleSettings::getHelpFont() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleFont( *m_pData, &StyleSettings::GetHelpFont );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setHelpFont( const FontDescriptor& _helpfont ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleFont( *m_pData, &StyleSettings::SetHelpFont, &StyleSettings::GetHelpFont, _helpfont );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ FontDescriptor SAL_CALL WindowStyleSettings::getTitleFont() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleFont( *m_pData, &StyleSettings::GetTitleFont );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setTitleFont( const FontDescriptor& _titlefont ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleFont( *m_pData, &StyleSettings::SetTitleFont, &StyleSettings::GetTitleFont, _titlefont );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ FontDescriptor SAL_CALL WindowStyleSettings::getFloatTitleFont() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleFont( *m_pData, &StyleSettings::GetFloatTitleFont );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setFloatTitleFont( const FontDescriptor& _floattitlefont ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleFont( *m_pData, &StyleSettings::SetFloatTitleFont, &StyleSettings::GetFloatTitleFont, _floattitlefont );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ FontDescriptor SAL_CALL WindowStyleSettings::getMenuFont() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleFont( *m_pData, &StyleSettings::GetMenuFont );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setMenuFont( const FontDescriptor& _menufont ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleFont( *m_pData, &StyleSettings::SetMenuFont, &StyleSettings::GetMenuFont, _menufont );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ FontDescriptor SAL_CALL WindowStyleSettings::getToolFont() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleFont( *m_pData, &StyleSettings::GetToolFont );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setToolFont( const FontDescriptor& _toolfont ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleFont( *m_pData, &StyleSettings::SetToolFont, &StyleSettings::GetToolFont, _toolfont );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ FontDescriptor SAL_CALL WindowStyleSettings::getGroupFont() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleFont( *m_pData, &StyleSettings::GetGroupFont );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setGroupFont( const FontDescriptor& _groupfont ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleFont( *m_pData, &StyleSettings::SetGroupFont, &StyleSettings::GetGroupFont, _groupfont );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ FontDescriptor SAL_CALL WindowStyleSettings::getLabelFont() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleFont( *m_pData, &StyleSettings::GetLabelFont );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setLabelFont( const FontDescriptor& _labelfont ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleFont( *m_pData, &StyleSettings::SetLabelFont, &StyleSettings::GetLabelFont, _labelfont );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ FontDescriptor SAL_CALL WindowStyleSettings::getInfoFont() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleFont( *m_pData, &StyleSettings::GetInfoFont );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setInfoFont( const FontDescriptor& _infofont ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleFont( *m_pData, &StyleSettings::SetInfoFont, &StyleSettings::GetInfoFont, _infofont );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ FontDescriptor SAL_CALL WindowStyleSettings::getRadioCheckFont() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleFont( *m_pData, &StyleSettings::GetRadioCheckFont );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setRadioCheckFont( const FontDescriptor& _radiocheckfont ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleFont( *m_pData, &StyleSettings::SetRadioCheckFont, &StyleSettings::GetRadioCheckFont, _radiocheckfont );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ FontDescriptor SAL_CALL WindowStyleSettings::getPushButtonFont() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleFont( *m_pData, &StyleSettings::GetPushButtonFont );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setPushButtonFont( const FontDescriptor& _pushbuttonfont ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleFont( *m_pData, &StyleSettings::SetPushButtonFont, &StyleSettings::GetPushButtonFont, _pushbuttonfont );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ FontDescriptor SAL_CALL WindowStyleSettings::getFieldFont() throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ return lcl_getStyleFont( *m_pData, &StyleSettings::GetFieldFont );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::setFieldFont( const FontDescriptor& _fieldfont ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ lcl_setStyleFont( *m_pData, &StyleSettings::SetFieldFont, &StyleSettings::GetFieldFont, _fieldfont );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::addStyleChangeListener( const Reference< XStyleChangeListener >& i_rListener ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ if ( i_rListener.is() )
+ m_pData->aStyleChangeListeners.addInterface( i_rListener );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL WindowStyleSettings::removeStyleChangeListener( const Reference< XStyleChangeListener >& i_rListener ) throw (RuntimeException)
+ {
+ StyleMethodGuard aGuard( *m_pData );
+ if ( i_rListener.is() )
+ m_pData->aStyleChangeListeners.removeInterface( i_rListener );
+ }
+
+//......................................................................................................................
+} // namespace toolkit
+//......................................................................................................................
diff --git a/toolkit/source/awt/stylesettings.hxx b/toolkit/source/awt/stylesettings.hxx
new file mode 100644
index 000000000000..466e50bad1f1
--- /dev/null
+++ b/toolkit/source/awt/stylesettings.hxx
@@ -0,0 +1,188 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef TOOLKIT_STYLESETTINGS_HXX
+#define TOOLKIT_STYLESETTINGS_HXX
+
+/** === begin UNO includes === **/
+#include <com/sun/star/awt/XStyleSettings.hpp>
+/** === end UNO includes === **/
+
+#include <cppuhelper/implbase1.hxx>
+
+#include <boost/scoped_ptr.hpp>
+
+namespace vos
+{
+ class IMutex;
+}
+namespace osl
+{
+ class Mutex;
+}
+
+class VCLXWindow;
+
+//......................................................................................................................
+namespace toolkit
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //= WindowStyleSettings
+ //==================================================================================================================
+ struct WindowStyleSettings_Data;
+ typedef ::cppu::WeakImplHelper1 < ::com::sun::star::awt::XStyleSettings
+ > WindowStyleSettings_Base;
+ class WindowStyleSettings : public WindowStyleSettings_Base
+ {
+ public:
+ WindowStyleSettings( ::vos::IMutex& i_rWindowMutex, ::osl::Mutex& i_rListenerMutex, VCLXWindow& i_rOwningWindow );
+ ~WindowStyleSettings();
+
+ void dispose();
+
+ // XStyleSettings
+ virtual ::sal_Int32 SAL_CALL getActiveBorderColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setActiveBorderColor( ::sal_Int32 _activebordercolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getActiveColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setActiveColor( ::sal_Int32 _activecolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getActiveTabColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setActiveTabColor( ::sal_Int32 _activetabcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getActiveTextColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setActiveTextColor( ::sal_Int32 _activetextcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getButtonRolloverTextColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setButtonRolloverTextColor( ::sal_Int32 _buttonrollovertextcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getButtonTextColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setButtonTextColor( ::sal_Int32 _buttontextcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getCheckedColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setCheckedColor( ::sal_Int32 _checkedcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getDarkShadowColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setDarkShadowColor( ::sal_Int32 _darkshadowcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getDeactiveBorderColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setDeactiveBorderColor( ::sal_Int32 _deactivebordercolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getDeactiveColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setDeactiveColor( ::sal_Int32 _deactivecolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getDeactiveTextColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setDeactiveTextColor( ::sal_Int32 _deactivetextcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getDialogColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setDialogColor( ::sal_Int32 _dialogcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getDialogTextColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setDialogTextColor( ::sal_Int32 _dialogtextcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getDisableColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setDisableColor( ::sal_Int32 _disablecolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getFaceColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setFaceColor( ::sal_Int32 _facecolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getFaceGradientColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getFieldColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setFieldColor( ::sal_Int32 _fieldcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getFieldRolloverTextColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setFieldRolloverTextColor( ::sal_Int32 _fieldrollovertextcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getFieldTextColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setFieldTextColor( ::sal_Int32 _fieldtextcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getGroupTextColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setGroupTextColor( ::sal_Int32 _grouptextcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getHelpColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setHelpColor( ::sal_Int32 _helpcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getHelpTextColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setHelpTextColor( ::sal_Int32 _helptextcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getHighlightColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setHighlightColor( ::sal_Int32 _highlightcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getHighlightTextColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setHighlightTextColor( ::sal_Int32 _highlighttextcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getInactiveTabColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setInactiveTabColor( ::sal_Int32 _inactivetabcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getInfoTextColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setInfoTextColor( ::sal_Int32 _infotextcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getLabelTextColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setLabelTextColor( ::sal_Int32 _labeltextcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getLightColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setLightColor( ::sal_Int32 _lightcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getMenuBarColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setMenuBarColor( ::sal_Int32 _menubarcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getMenuBarTextColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setMenuBarTextColor( ::sal_Int32 _menubartextcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getMenuBorderColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setMenuBorderColor( ::sal_Int32 _menubordercolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getMenuColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setMenuColor( ::sal_Int32 _menucolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getMenuHighlightColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setMenuHighlightColor( ::sal_Int32 _menuhighlightcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getMenuHighlightTextColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setMenuHighlightTextColor( ::sal_Int32 _menuhighlighttextcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getMenuTextColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setMenuTextColor( ::sal_Int32 _menutextcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getMonoColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setMonoColor( ::sal_Int32 _monocolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getRadioCheckTextColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setRadioCheckTextColor( ::sal_Int32 _radiochecktextcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getSeparatorColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getShadowColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setShadowColor( ::sal_Int32 _shadowcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getWindowColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setWindowColor( ::sal_Int32 _windowcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getWindowTextColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setWindowTextColor( ::sal_Int32 _windowtextcolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getWorkspaceColor() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setWorkspaceColor( ::sal_Int32 _workspacecolor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getHighContrastMode() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setHighContrastMode( ::sal_Bool _highcontrastmode ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::FontDescriptor SAL_CALL getApplicationFont() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setApplicationFont( const ::com::sun::star::awt::FontDescriptor& _applicationfont ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::FontDescriptor SAL_CALL getHelpFont() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setHelpFont( const ::com::sun::star::awt::FontDescriptor& _helpfont ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::FontDescriptor SAL_CALL getTitleFont() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setTitleFont( const ::com::sun::star::awt::FontDescriptor& _titlefont ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::FontDescriptor SAL_CALL getFloatTitleFont() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setFloatTitleFont( const ::com::sun::star::awt::FontDescriptor& _floattitlefont ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::FontDescriptor SAL_CALL getMenuFont() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setMenuFont( const ::com::sun::star::awt::FontDescriptor& _menufont ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::FontDescriptor SAL_CALL getToolFont() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setToolFont( const ::com::sun::star::awt::FontDescriptor& _toolfont ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::FontDescriptor SAL_CALL getGroupFont() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setGroupFont( const ::com::sun::star::awt::FontDescriptor& _groupfont ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::FontDescriptor SAL_CALL getLabelFont() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setLabelFont( const ::com::sun::star::awt::FontDescriptor& _labelfont ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::FontDescriptor SAL_CALL getInfoFont() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setInfoFont( const ::com::sun::star::awt::FontDescriptor& _infofont ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::FontDescriptor SAL_CALL getRadioCheckFont() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setRadioCheckFont( const ::com::sun::star::awt::FontDescriptor& _radiocheckfont ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::FontDescriptor SAL_CALL getPushButtonFont() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPushButtonFont( const ::com::sun::star::awt::FontDescriptor& _pushbuttonfont ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::FontDescriptor SAL_CALL getFieldFont() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setFieldFont( const ::com::sun::star::awt::FontDescriptor& _fieldfont ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addStyleChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XStyleChangeListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeStyleChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XStyleChangeListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
+
+ private:
+ ::boost::scoped_ptr< WindowStyleSettings_Data > m_pData;
+ };
+
+//......................................................................................................................
+} // namespace toolkit
+//......................................................................................................................
+
+#endif // TOOLKIT_STYLESETTINGS_HXX
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index dd4d56586b03..efc2c40c6baa 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -27,6 +27,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_toolkit.hxx"
+
#include <com/sun/star/awt/WindowEvent.hpp>
#include <com/sun/star/awt/KeyEvent.hpp>
#include <com/sun/star/awt/KeyModifier.hpp>
@@ -41,6 +42,7 @@
#include <com/sun/star/awt/EndPopupModeEvent.hpp>
#include <com/sun/star/awt/XWindowListener2.hpp>
#include <com/sun/star/style/VerticalAlignment.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/text/WritingMode2.hpp>
#include <toolkit/awt/vclxwindow.hxx>
#include <toolkit/awt/vclxpointer.hxx>
@@ -64,6 +66,7 @@
#include <vcl/button.hxx>
#include <comphelper/asyncnotification.hxx>
#include <toolkit/helper/solarrelease.hxx>
+#include "stylesettings.hxx"
#include <toolkit/helper/unopropertyarrayhelper.hxx>
@@ -73,10 +76,13 @@ using namespace ::com::sun::star;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::UNO_QUERY;
+using ::com::sun::star::uno::RuntimeException;
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::awt::XStyleSettings;
+using ::com::sun::star::lang::DisposedException;
using ::com::sun::star::style::VerticalAlignment;
using ::com::sun::star::style::VerticalAlignment_TOP;
using ::com::sun::star::style::VerticalAlignment_MIDDLE;
@@ -164,6 +170,8 @@ public:
mxAccessibleContext;
::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics >
mxViewGraphics;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XStyleSettings >
+ mxWindowStyleSettings;
public:
bool& getDrawingOntoParent_ref() { return mbDrawingOntoParent; }
@@ -198,6 +206,8 @@ public:
return maAccFactory;
}
+ Reference< XStyleSettings > getStyleSettings();
+
/** returns the container of registered XWindowListener2 listeners
*/
inline ::cppu::OInterfaceContainerHelper& getWindow2Listeners() { return maWindow2Listeners; }
@@ -222,17 +232,6 @@ private:
DECL_LINK( OnProcessCallbacks, void* );
private:
-private:
- /** determines whether the instance is already disposed
- @precond
- m_aMutex must be acquired
- */
- inline bool impl_isDisposed()
- {
- return mbDisposed;
- }
-
-private:
VCLXWindowImpl(); // never implemented
VCLXWindowImpl( const VCLXWindowImpl& ); // never implemented
VCLXWindowImpl& operator=( const VCLXWindowImpl& ); // never implemented
@@ -298,6 +297,10 @@ void VCLXWindowImpl::disposing()
maContainerListeners.disposeAndClear( aEvent );
maTopWindowListeners.disposeAndClear( aEvent );
+ ::toolkit::WindowStyleSettings* pStyleSettings = static_cast< ::toolkit::WindowStyleSettings* >( mxWindowStyleSettings.get() );
+ if ( pStyleSettings != NULL )
+ pStyleSettings->dispose();
+ mxWindowStyleSettings.clear();
}
//--------------------------------------------------------------------
@@ -361,6 +364,17 @@ void SAL_CALL VCLXWindowImpl::release()
mrAntiImpl.release();
}
+//--------------------------------------------------------------------
+Reference< XStyleSettings > VCLXWindowImpl::getStyleSettings()
+{
+ ::vos::OGuard aGuard( mrMutex );
+ if ( mbDisposed )
+ throw DisposedException( ::rtl::OUString(), mrAntiImpl );
+ if ( !mxWindowStyleSettings.is() )
+ mxWindowStyleSettings = new ::toolkit::WindowStyleSettings( mrMutex, maListenerContainerMutex, mrAntiImpl );
+ return mxWindowStyleSettings;
+}
+
//====================================================================
//====================================================================
@@ -2651,3 +2665,8 @@ VCLXWindow::hasPropertyByName( const ::rtl::OUString& rName ) throw (::com::sun:
{
return GetPropHelper()->hasPropertyByName( rName );
}
+
+Reference< XStyleSettings > SAL_CALL VCLXWindow::getStyleSettings() throw (RuntimeException)
+{
+ return mpImpl->getStyleSettings();
+}
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;
+}