summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2010-10-09 18:56:58 +0200
committerMathias Bauer <mba@openoffice.org>2010-10-09 18:56:58 +0200
commitb41d62671ea124872aaec7be9c4bfd5b1d87904a (patch)
tree02571673fc42797bcab7300bb222b9e2eae33912 /toolkit
parent3645e96db1ef4aa0e781337b9c478ebf60369890 (diff)
parent525de6f8eeac6e357167467da0f9a9448433bb25 (diff)
CWS changehid: resync to m89
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/inc/pch/precompiled_toolkit.hxx3
-rw-r--r--toolkit/inc/toolkit/awt/vclxdevice.hxx4
-rw-r--r--toolkit/inc/toolkit/awt/vclxgraphics.hxx4
-rw-r--r--toolkit/inc/toolkit/awt/vclxwindow.hxx9
-rw-r--r--toolkit/inc/toolkit/awt/vclxwindows.hxx55
-rw-r--r--toolkit/inc/toolkit/controls/roadmapcontrol.hxx31
-rw-r--r--toolkit/inc/toolkit/controls/unocontrol.hxx9
-rw-r--r--toolkit/inc/toolkit/controls/unocontrolbase.hxx2
-rw-r--r--toolkit/inc/toolkit/controls/unocontrolmodel.hxx20
-rw-r--r--toolkit/inc/toolkit/controls/unocontrols.hxx156
-rw-r--r--toolkit/inc/toolkit/helper/listenermultiplexer.hxx2
-rw-r--r--toolkit/inc/toolkit/helper/property.hxx2
-rw-r--r--toolkit/inc/toolkit/helper/servicenames.hxx5
-rw-r--r--toolkit/inc/toolkit/helper/solarrelease.hxx27
-rw-r--r--toolkit/inc/toolkit/helper/throbberimpl.hxx4
-rw-r--r--toolkit/inc/toolkit/helper/unopropertyarrayhelper.hxx1
-rw-r--r--toolkit/prj/d.lst1
-rw-r--r--toolkit/qa/unoapi/knownissues.xcl3
-rw-r--r--toolkit/qa/unoapi/toolkit.sce6
-rw-r--r--toolkit/source/awt/asynccallback.cxx6
-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/vclxgraphics.cxx2
-rw-r--r--toolkit/source/awt/vclxtoolkit.cxx2
-rw-r--r--toolkit/source/awt/vclxwindow.cxx46
-rw-r--r--toolkit/source/awt/vclxwindow1.cxx2
-rw-r--r--toolkit/source/awt/vclxwindows.cxx280
-rw-r--r--toolkit/source/controls/dialogcontrol.cxx11
-rw-r--r--toolkit/source/controls/roadmapcontrol.cxx94
-rw-r--r--toolkit/source/controls/tree/treecontrol.cxx1
-rw-r--r--toolkit/source/controls/unocontrol.cxx16
-rw-r--r--toolkit/source/controls/unocontrols.cxx390
-rw-r--r--toolkit/source/helper/registerservices.cxx87
-rw-r--r--toolkit/source/helper/servicenames.cxx1
-rw-r--r--toolkit/source/helper/unowrapper.cxx15
-rw-r--r--toolkit/source/layout/core/factory.cxx27
-rw-r--r--toolkit/source/layout/core/import.cxx11
-rw-r--r--toolkit/util/makefile.mk8
-rw-r--r--toolkit/util/tk.component298
40 files changed, 2112 insertions, 705 deletions
diff --git a/toolkit/inc/pch/precompiled_toolkit.hxx b/toolkit/inc/pch/precompiled_toolkit.hxx
index 386bd6803ca4..d0baff3b8343 100644
--- a/toolkit/inc/pch/precompiled_toolkit.hxx
+++ b/toolkit/inc/pch/precompiled_toolkit.hxx
@@ -107,8 +107,6 @@
#include "com/sun/star/awt/XFont.hpp"
#include "com/sun/star/awt/XGraphics.hpp"
#include "com/sun/star/awt/XImageButton.hpp"
-#include "com/sun/star/awt/XImageConsumer.hpp"
-#include "com/sun/star/awt/XImageProducer.hpp"
#include "com/sun/star/awt/XInfoPrinter.hpp"
#include "com/sun/star/awt/XItemEventBroadcaster.hpp"
#include "com/sun/star/awt/XItemListener.hpp"
@@ -328,7 +326,6 @@
#include "vcl/font.hxx"
#include "vcl/gradient.hxx"
#include "vcl/image.hxx"
-#include "vcl/imgcons.hxx"
#include "vcl/jobset.hxx"
#include "vcl/mapunit.hxx"
#include "vcl/menu.hxx"
diff --git a/toolkit/inc/toolkit/awt/vclxdevice.hxx b/toolkit/inc/toolkit/awt/vclxdevice.hxx
index 62753a36136d..bb1c35078055 100644
--- a/toolkit/inc/toolkit/awt/vclxdevice.hxx
+++ b/toolkit/inc/toolkit/awt/vclxdevice.hxx
@@ -58,7 +58,7 @@ class TOOLKIT_DLLPUBLIC VCLXDevice : public ::com::sun::star::awt::XDevice,
friend class VCLXGraphics;
private:
- NAMESPACE_VOS(IMutex)& mrMutex; // Reference to SolarMutex
+ vos::IMutex& mrMutex; // Reference to SolarMutex
OutputDevice* mpOutputDevice;
public:
@@ -66,7 +66,7 @@ public:
sal_uInt32 nFlags;
protected:
- NAMESPACE_VOS(IMutex)& GetMutex() { return mrMutex; }
+ vos::IMutex& GetMutex() { return mrMutex; }
void DestroyOutputDevice();
public:
diff --git a/toolkit/inc/toolkit/awt/vclxgraphics.hxx b/toolkit/inc/toolkit/awt/vclxgraphics.hxx
index 5fda9ac947ee..6a076a5339b8 100644
--- a/toolkit/inc/toolkit/awt/vclxgraphics.hxx
+++ b/toolkit/inc/toolkit/awt/vclxgraphics.hxx
@@ -60,7 +60,7 @@ class VCLXGraphics : public ::com::sun::star::awt::XGraphics,
public ::cppu::OWeakObject
{
private:
- NAMESPACE_VOS(IMutex)& mrMutex; // Reference to SolarMutex
+ vos::IMutex& mrMutex; // Reference to SolarMutex
::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice> mxDevice; // nur um bei getDevice() immer das gleiche zurueckzugeben
OutputDevice* mpOutputDevice;
@@ -73,7 +73,7 @@ private:
Region* mpClipRegion;
protected:
- NAMESPACE_VOS(IMutex)& GetMutex() { return mrMutex; }
+ vos::IMutex& GetMutex() { return mrMutex; }
public:
VCLXGraphics();
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/awt/vclxwindows.hxx b/toolkit/inc/toolkit/awt/vclxwindows.hxx
index 0b35fb9b1fba..36ac2fa51337 100644
--- a/toolkit/inc/toolkit/awt/vclxwindows.hxx
+++ b/toolkit/inc/toolkit/awt/vclxwindows.hxx
@@ -82,7 +82,6 @@
#include <com/sun/star/awt/XDateField.hpp>
#include <com/sun/star/awt/XComboBox.hpp>
#include <com/sun/star/awt/XCheckBox.hpp>
-#include <com/sun/star/awt/XImageConsumer.hpp>
#include <com/sun/star/awt/XItemListListener.hpp>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase3.hxx>
@@ -93,7 +92,6 @@
#include <cppuhelper/implbase1.hxx>
#include <vcl/pointr.hxx>
-#include <vcl/imgcons.hxx>
#include <vcl/image.hxx>
class Button;
@@ -111,17 +109,14 @@ class VclSimpleEvent;
class VclMenuEvent;
// ----------------------------------------------------
-// class VCLXImageConsumer
-// deriving from VCLXWindow and XImageConsumer
+// class VCLXGraphicControl
+// deriving from VCLXWindow, drawing the graphic which exists as "Graphic" at the model
// ----------------------------------------------------
-typedef ::cppu::ImplInheritanceHelper1< VCLXWindow, ::com::sun::star::awt::XImageConsumer > VCLXImageConsumer_Base;
-class TOOLKIT_DLLPUBLIC VCLXImageConsumer : public VCLXImageConsumer_Base
+class TOOLKIT_DLLPUBLIC VCLXGraphicControl : public VCLXWindow
{
private:
- /// implements our XImageConsumer functionality
- ImageConsumer maImageConsumer;
/// the image we currently display
Image maImage;
@@ -132,21 +127,11 @@ protected:
// ::com::sun::star::awt::XWindow
void SAL_CALL setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, sal_Int16 Flags ) throw(::com::sun::star::uno::RuntimeException);
- // ::com::sun::star::awt::XImageConsumer
- void SAL_CALL init( sal_Int32 Width, sal_Int32 Height ) throw(::com::sun::star::uno::RuntimeException);
- void SAL_CALL setColorModel( sal_Int16 BitCount, const ::com::sun::star::uno::Sequence< sal_Int32 >& RGBAPal, sal_Int32 RedMask, sal_Int32 GreenMask, sal_Int32 BlueMask, sal_Int32 AlphaMask ) throw(::com::sun::star::uno::RuntimeException);
- void SAL_CALL setPixelsByBytes( sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidth, sal_Int32 nHeight, const ::com::sun::star::uno::Sequence< sal_Int8 >& aProducerData, sal_Int32 nOffset, sal_Int32 nScanSize ) throw(::com::sun::star::uno::RuntimeException);
- void SAL_CALL setPixelsByLongs( sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidth, sal_Int32 nHeight, const ::com::sun::star::uno::Sequence< sal_Int32 >& aProducerData, sal_Int32 nOffset, sal_Int32 nScanSize ) throw(::com::sun::star::uno::RuntimeException);
- void SAL_CALL complete( sal_Int32 Status, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageProducer >& xProducer ) throw(::com::sun::star::uno::RuntimeException);
-
// ::com::sun::star::awt::VclWindowPeer
void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException);
protected:
- void ImplUpdateImage( sal_Bool bGetNewImage );
-
-protected:
/** forward our bitmap to our window
@precond
our mutex is locked
@@ -155,6 +140,7 @@ protected:
@see GetBitmap
*/
virtual void ImplSetNewImage();
+
public:
static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds );
virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); }
@@ -164,7 +150,7 @@ public:
// ----------------------------------------------------
// class VCLXButton
// ----------------------------------------------------
-typedef ::cppu::ImplInheritanceHelper2 < VCLXImageConsumer
+typedef ::cppu::ImplInheritanceHelper2 < VCLXGraphicControl
, ::com::sun::star::awt::XButton
, ::com::sun::star::awt::XToggleButton
> VCLXButton_Base;
@@ -213,7 +199,7 @@ public:
// ----------------------------------------------------
// class VCLXImageControl
// ----------------------------------------------------
-class VCLXImageControl : public VCLXImageConsumer
+class VCLXImageControl : public VCLXGraphicControl
{
public:
VCLXImageControl();
@@ -230,6 +216,7 @@ public:
static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds );
virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); }
+
protected:
virtual void ImplSetNewImage();
};
@@ -239,7 +226,7 @@ protected:
// ----------------------------------------------------
class VCLXCheckBox : public ::com::sun::star::awt::XCheckBox,
public ::com::sun::star::awt::XButton,
- public VCLXImageConsumer
+ public VCLXGraphicControl
{
private:
ActionListenerMultiplexer maActionListeners;
@@ -297,7 +284,7 @@ public:
// ----------------------------------------------------
class VCLXRadioButton : public ::com::sun::star::awt::XRadioButton,
public ::com::sun::star::awt::XButton,
- public VCLXImageConsumer
+ public VCLXGraphicControl
{
private:
ItemListenerMultiplexer maItemListeners;
@@ -760,8 +747,10 @@ public:
// ----------------------------------------------------
// class VCLXComboBox
// ----------------------------------------------------
-class VCLXComboBox : public ::com::sun::star::awt::XComboBox,
- public VCLXEdit
+typedef ::cppu::ImplInheritanceHelper2 < VCLXEdit
+ , ::com::sun::star::awt::XComboBox
+ , ::com::sun::star::awt::XItemListListener > VCLXComboBox_Base;
+class VCLXComboBox : public VCLXComboBox_Base
{
private:
ActionListenerMultiplexer maActionListeners;
@@ -776,15 +765,6 @@ public:
VCLXComboBox();
~VCLXComboBox();
- // ::com::sun::star::uno::XInterface
- ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
- void SAL_CALL acquire() throw() { OWeakObject::acquire(); }
- void SAL_CALL release() throw() { OWeakObject::release(); }
-
- // ::com::sun::star::lang::XTypeProvider
- ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
- ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
-
// ::com::sun::star::lang::XComponent
void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
@@ -815,6 +795,15 @@ public:
void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException);
+ // XItemListListener
+ virtual void SAL_CALL listItemInserted( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL listItemRemoved( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL listItemModified( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL allItemsRemoved( const ::com::sun::star::lang::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL itemListChanged( const ::com::sun::star::lang::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException);
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& i_rEvent ) throw (::com::sun::star::uno::RuntimeException);
+
static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds );
virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); }
};
diff --git a/toolkit/inc/toolkit/controls/roadmapcontrol.hxx b/toolkit/inc/toolkit/controls/roadmapcontrol.hxx
index 46f31947b276..1b86d277fde2 100644
--- a/toolkit/inc/toolkit/controls/roadmapcontrol.hxx
+++ b/toolkit/inc/toolkit/controls/roadmapcontrol.hxx
@@ -40,25 +40,20 @@
#include <com/sun/star/container/XContainerListener.hpp>
#include <com/sun/star/awt/XItemListener.hpp>
#include <com/sun/star/awt/XItemEventBroadcaster.hpp>
-#include <com/sun/star/awt/XImageConsumer.hpp>
-#include <com/sun/star/awt/XImageProducer.hpp>
#include <cppuhelper/implbase2.hxx>
-
-#ifndef _CPPUHELPER_IMPLBASE5_HXX_
+#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/implbase4.hxx>
-#endif
#include <comphelper/uno3.hxx>
-typedef UnoControlModel UnoControlRoadmapModel_Base;
+typedef GraphicControlModel UnoControlRoadmapModel_Base;
-typedef ::cppu::ImplHelper4 < ::com::sun::star::lang::XSingleServiceFactory
+typedef ::cppu::ImplHelper3 < ::com::sun::star::lang::XSingleServiceFactory
, ::com::sun::star::container::XContainer
, ::com::sun::star::container::XIndexContainer
- , ::com::sun::star::awt::XImageProducer
> UnoControlRoadmapModel_IBase;
@@ -100,8 +95,6 @@ namespace toolkit{
typedef ::std::vector< Reference< XInterface > > RoadmapItemHolderList;
- std::list< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > > maImageListeners;
-
ContainerListenerMultiplexer maContainerListeners;
RoadmapItemHolderList maRoadmapItems;
@@ -133,7 +126,7 @@ namespace toolkit{
::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
// ::com::sun::star::lang::XServiceInfo
- DECLIMPL_SERVICEINFO_DERIVED( UnoControlRoadmapModel, UnoControlModel, szServiceName2_UnoControlRoadmapModel )
+ DECLIMPL_SERVICEINFO_DERIVED( UnoControlRoadmapModel, UnoControlRoadmapModel_Base, szServiceName2_UnoControlRoadmapModel )
sal_Int32 SAL_CALL getCount() throw (RuntimeException);
virtual Any SAL_CALL getByIndex( sal_Int32 Index ) throw (IndexOutOfBoundsException, WrappedTargetException, RuntimeException );
@@ -145,16 +138,10 @@ namespace toolkit{
virtual void SAL_CALL addContainerListener( const Reference< XContainerListener >& xListener ) throw (RuntimeException);
virtual void SAL_CALL removeContainerListener( const Reference< XContainerListener >& xListener ) throw (RuntimeException);
- ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoControlModel::queryInterface(rType); }
+ ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoControlRoadmapModel_Base::queryInterface(rType); }
::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
- void SAL_CALL acquire() throw() { UnoControlModel::acquire(); }
- void SAL_CALL release() throw() { UnoControlModel::release(); }
-
-
- // ::com::sun::star::awt::XImageProducer
- void SAL_CALL addConsumer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer >& xConsumer ) throw (::com::sun::star::uno::RuntimeException);
- void SAL_CALL removeConsumer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer >& xConsumer ) throw (::com::sun::star::uno::RuntimeException);
- void SAL_CALL startProduction( ) throw (::com::sun::star::uno::RuntimeException);
+ void SAL_CALL acquire() throw() { UnoControlRoadmapModel_Base::acquire(); }
+ void SAL_CALL release() throw() { UnoControlRoadmapModel_Base::release(); }
// ::com::sun::star::beans::XPropertySet
@@ -190,8 +177,6 @@ namespace toolkit{
sal_Bool SAL_CALL setModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& Model) throw ( ::com::sun::star::uno::RuntimeException );
- void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
-
void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& rEvent )throw(::com::sun::star::uno::RuntimeException);
void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& rEvent )throw(::com::sun::star::uno::RuntimeException);
void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& rEvent )throw(::com::sun::star::uno::RuntimeException);
@@ -204,8 +189,6 @@ namespace toolkit{
virtual void SAL_CALL propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw (::com::sun::star::uno::RuntimeException);
- void ImplSetPeerProperty( const ::rtl::OUString& rPropName, const ::com::sun::star::uno::Any& rVal );
-
// XTypeProvider
DECLARE_XTYPEPROVIDER( )
DECLARE_XINTERFACE()
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/inc/toolkit/controls/unocontrolbase.hxx b/toolkit/inc/toolkit/controls/unocontrolbase.hxx
index 60dcc040e0e7..f12dd23a5c67 100644
--- a/toolkit/inc/toolkit/controls/unocontrolbase.hxx
+++ b/toolkit/inc/toolkit/controls/unocontrolbase.hxx
@@ -36,7 +36,7 @@
// class UnoControlBase
// ----------------------------------------------------
-class UnoControlBase : public UnoControl
+class TOOLKIT_DLLPUBLIC UnoControlBase : public UnoControl
{
protected:
sal_Bool ImplHasProperty( sal_uInt16 nProp );
diff --git a/toolkit/inc/toolkit/controls/unocontrolmodel.hxx b/toolkit/inc/toolkit/controls/unocontrolmodel.hxx
index 71decdfcb2c9..5ac3c33aa1c9 100644
--- a/toolkit/inc/toolkit/controls/unocontrolmodel.hxx
+++ b/toolkit/inc/toolkit/controls/unocontrolmodel.hxx
@@ -54,16 +54,16 @@ class ImplPropertyTable;
// ----------------------------------------------------
class TOOLKIT_DLLPUBLIC UnoControlModel : public ::com::sun::star::awt::XControlModel,
- public ::com::sun::star::beans::XPropertyState,
- public ::com::sun::star::io::XPersistObject,
- public ::com::sun::star::lang::XComponent,
- public ::com::sun::star::lang::XServiceInfo,
- public ::com::sun::star::lang::XTypeProvider,
- public ::com::sun::star::lang::XUnoTunnel,
- public ::com::sun::star::util::XCloneable,
- public MutexAndBroadcastHelper,
- public ::cppu::OPropertySetHelper,
- public ::cppu::OWeakAggObject
+ public ::com::sun::star::beans::XPropertyState,
+ public ::com::sun::star::io::XPersistObject,
+ public ::com::sun::star::lang::XComponent,
+ public ::com::sun::star::lang::XServiceInfo,
+ public ::com::sun::star::lang::XTypeProvider,
+ public ::com::sun::star::lang::XUnoTunnel,
+ public ::com::sun::star::util::XCloneable,
+ public MutexAndBroadcastHelper,
+ public ::cppu::OPropertySetHelper,
+ public ::cppu::OWeakAggObject
{
private:
ImplPropertyTable* mpData;
diff --git a/toolkit/inc/toolkit/controls/unocontrols.hxx b/toolkit/inc/toolkit/controls/unocontrols.hxx
index 88449418c70a..01ff047ee3de 100644
--- a/toolkit/inc/toolkit/controls/unocontrols.hxx
+++ b/toolkit/inc/toolkit/controls/unocontrols.hxx
@@ -35,8 +35,6 @@
#include <com/sun/star/awt/XTextLayoutConstrains.hpp>
#include <com/sun/star/awt/XButton.hpp>
#include <com/sun/star/awt/XToggleButton.hpp>
-#include <com/sun/star/awt/XImageConsumer.hpp>
-#include <com/sun/star/awt/XImageProducer.hpp>
#include <com/sun/star/awt/XRadioButton.hpp>
#include <com/sun/star/awt/XItemListener.hpp>
#include <com/sun/star/awt/XCheckBox.hpp>
@@ -57,7 +55,6 @@
#include <toolkit/controls/unocontrolbase.hxx>
#include <toolkit/helper/macros.hxx>
#include <toolkit/helper/servicenames.hxx>
-#include <vcl/imgcons.hxx>
#include <vcl/bitmapex.hxx>
#include <cppuhelper/implbase5.hxx>
#include <cppuhelper/implbase4.hxx>
@@ -217,31 +214,20 @@ public:
};
// ----------------------------------------------------
-// class ImageProducerControlModel
+// class GraphicControlModel
// ----------------------------------------------------
-class ImageProducerControlModel : public ::com::sun::star::awt::XImageProducer,
- public UnoControlModel
+class GraphicControlModel : public UnoControlModel
{
private:
- std::list< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > > maListeners;
bool mbAdjustingImagePosition;
bool mbAdjustingGraphic;
::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphicObject > mxGrfObj;
::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > getGraphicFromURL_nothrow( const ::rtl::OUString& _rURL );
-protected:
- ImageProducerControlModel() : mbAdjustingImagePosition( false ), mbAdjustingGraphic( false ) { }
- ImageProducerControlModel( const ImageProducerControlModel& _rSource ) : com::sun::star::awt::XImageProducer(), UnoControlModel( _rSource ), mbAdjustingImagePosition( false ), mbAdjustingGraphic( false ) { }
-
- ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
- ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
- void SAL_CALL acquire() throw();
- void SAL_CALL release() throw();
- // ::com::sun::star::awt::XImageProducer
- void SAL_CALL addConsumer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer >& xConsumer ) throw (::com::sun::star::uno::RuntimeException);
- void SAL_CALL removeConsumer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer >& xConsumer ) throw (::com::sun::star::uno::RuntimeException);
- void SAL_CALL startProduction( ) throw (::com::sun::star::uno::RuntimeException);
+protected:
+ GraphicControlModel() : mbAdjustingImagePosition( false ), mbAdjustingGraphic( false ) { }
+ GraphicControlModel( const GraphicControlModel& _rSource ) : UnoControlModel( _rSource ), mbAdjustingImagePosition( false ), mbAdjustingGraphic( false ) { }
// ::cppu::OPropertySetHelper
void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception);
@@ -250,35 +236,13 @@ protected:
::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
private:
- ImageProducerControlModel& operator=( const ImageProducerControlModel& ); // never implemented
-};
-
-// ----------------------------------------------------
-// class ImageConsumerControl
-// ----------------------------------------------------
-class ImageConsumerControl : public UnoControlBase
-{
-protected:
- ImageConsumerControl() { }
-
- void ImplSetPeerProperty( const ::rtl::OUString& rPropName, const ::com::sun::star::uno::Any& rVal );
-
- // XControl
- sal_Bool SAL_CALL setModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& Model) throw ( ::com::sun::star::uno::RuntimeException );
-
- void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
-
- void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
-
-private:
- ImageConsumerControl( const ImageConsumerControl& ); // never implemented
- ImageConsumerControl& operator=( const ImageConsumerControl& ); // never implemented
+ GraphicControlModel& operator=( const GraphicControlModel& ); // never implemented
};
// ----------------------------------------------------
// class UnoControlButtonModel
// ----------------------------------------------------
-class UnoControlButtonModel : public ImageProducerControlModel
+class UnoControlButtonModel : public GraphicControlModel
{
protected:
::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
@@ -286,7 +250,7 @@ protected:
public:
UnoControlButtonModel();
- UnoControlButtonModel( const UnoControlButtonModel& rModel ) : ImageProducerControlModel( rModel ) {;}
+ UnoControlButtonModel( const UnoControlButtonModel& rModel ) : GraphicControlModel( rModel ) {;}
UnoControlModel* Clone() const { return new UnoControlButtonModel( *this ); }
@@ -297,13 +261,13 @@ public:
::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
// ::com::sun::star::lang::XServiceInfo
- DECLIMPL_SERVICEINFO_DERIVED( UnoControlButtonModel, ImageProducerControlModel, szServiceName2_UnoControlButtonModel )
+ DECLIMPL_SERVICEINFO_DERIVED( UnoControlButtonModel, GraphicControlModel, szServiceName2_UnoControlButtonModel )
};
// ----------------------------------------------------
// class UnoButtonControl
// ----------------------------------------------------
-typedef ::cppu::AggImplInheritanceHelper4 < ImageConsumerControl
+typedef ::cppu::AggImplInheritanceHelper4 < UnoControlBase
, ::com::sun::star::awt::XButton
, ::com::sun::star::awt::XToggleButton
, ::com::sun::star::awt::XLayoutConstrains
@@ -347,13 +311,13 @@ public:
::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException);
// ::com::sun::star::lang::XServiceInfo
- DECLIMPL_SERVICEINFO_DERIVED( UnoButtonControl, ImageConsumerControl, szServiceName2_UnoControlButton )
+ DECLIMPL_SERVICEINFO_DERIVED( UnoButtonControl, UnoControlBase, szServiceName2_UnoControlButton )
};
// ----------------------------------------------------
// class UnoControlImageControlModel
// ----------------------------------------------------
-class UnoControlImageControlModel : public ImageProducerControlModel
+class UnoControlImageControlModel : public GraphicControlModel
{
private:
bool mbAdjustingImageScaleMode;
@@ -364,7 +328,7 @@ protected:
public:
UnoControlImageControlModel();
- UnoControlImageControlModel( const UnoControlImageControlModel& rModel ) : ImageProducerControlModel( rModel ), mbAdjustingImageScaleMode( false ) { }
+ UnoControlImageControlModel( const UnoControlImageControlModel& rModel ) : GraphicControlModel( rModel ), mbAdjustingImageScaleMode( false ) { }
UnoControlModel* Clone() const { return new UnoControlImageControlModel( *this ); }
@@ -375,7 +339,7 @@ public:
::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
// ::com::sun::star::lang::XServiceInfo
- DECLIMPL_SERVICEINFO_DERIVED( UnoControlImageControlModel, ImageProducerControlModel, szServiceName2_UnoControlImageControlModel )
+ DECLIMPL_SERVICEINFO_DERIVED( UnoControlImageControlModel, GraphicControlModel, szServiceName2_UnoControlImageControlModel )
// ::cppu::OPropertySetHelper
void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception);
@@ -384,7 +348,7 @@ public:
// ----------------------------------------------------
// class UnoImageControlControl
// ----------------------------------------------------
-typedef ::cppu::AggImplInheritanceHelper1 < ImageConsumerControl
+typedef ::cppu::AggImplInheritanceHelper1 < UnoControlBase
, ::com::sun::star::awt::XLayoutConstrains
> UnoImageControlControl_Base;
class UnoImageControlControl : public UnoImageControlControl_Base
@@ -409,13 +373,13 @@ public:
::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException);
// ::com::sun::star::lang::XServiceInfo
- DECLIMPL_SERVICEINFO_DERIVED( UnoImageControlControl, ImageConsumerControl, szServiceName2_UnoControlImageControl )
+ DECLIMPL_SERVICEINFO_DERIVED( UnoImageControlControl, UnoControlBase, szServiceName2_UnoControlImageControl )
};
// ----------------------------------------------------
// class UnoControlRadioButtonModel
// ----------------------------------------------------
-class UnoControlRadioButtonModel : public ImageProducerControlModel
+class UnoControlRadioButtonModel : public GraphicControlModel
{
protected:
@@ -424,7 +388,7 @@ protected:
public:
UnoControlRadioButtonModel();
- UnoControlRadioButtonModel( const UnoControlRadioButtonModel& rModel ) : ImageProducerControlModel( rModel ) {;}
+ UnoControlRadioButtonModel( const UnoControlRadioButtonModel& rModel ) : GraphicControlModel( rModel ) {;}
UnoControlModel* Clone() const { return new UnoControlRadioButtonModel( *this ); }
@@ -435,14 +399,14 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
// ::com::sun::star::lang::XServiceInfo
- DECLIMPL_SERVICEINFO_DERIVED( UnoControlRadioButtonModel, ImageProducerControlModel, szServiceName2_UnoControlRadioButtonModel )
+ DECLIMPL_SERVICEINFO_DERIVED( UnoControlRadioButtonModel, GraphicControlModel, szServiceName2_UnoControlRadioButtonModel )
};
// ----------------------------------------------------
// class UnoRadioButtonControl
// ----------------------------------------------------
-typedef ::cppu::AggImplInheritanceHelper4 < ImageConsumerControl
+typedef ::cppu::AggImplInheritanceHelper4 < UnoControlBase
, ::com::sun::star::awt::XButton
, ::com::sun::star::awt::XRadioButton
, ::com::sun::star::awt::XItemListener
@@ -462,7 +426,7 @@ public:
void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
- void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { ImageConsumerControl::disposing( Source ); }
+ void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { UnoControlBase::disposing( Source ); }
// ::com::sun::star::awt::XControl
sal_Bool SAL_CALL isTransparent( ) throw(::com::sun::star::uno::RuntimeException);
@@ -488,14 +452,14 @@ public:
::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException);
// ::com::sun::star::lang::XServiceInfo
- DECLIMPL_SERVICEINFO_DERIVED( UnoRadioButtonControl, ImageConsumerControl, szServiceName2_UnoControlRadioButton )
+ DECLIMPL_SERVICEINFO_DERIVED( UnoRadioButtonControl, UnoControlBase, szServiceName2_UnoControlRadioButton )
};
// ----------------------------------------------------
// class UnoControlCheckBoxModel
// ----------------------------------------------------
-class UnoControlCheckBoxModel : public ImageProducerControlModel
+class UnoControlCheckBoxModel : public GraphicControlModel
{
protected:
::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
@@ -503,7 +467,7 @@ protected:
public:
UnoControlCheckBoxModel();
- UnoControlCheckBoxModel( const UnoControlCheckBoxModel& rModel ) : ImageProducerControlModel( rModel ) {;}
+ UnoControlCheckBoxModel( const UnoControlCheckBoxModel& rModel ) : GraphicControlModel( rModel ) {;}
UnoControlModel* Clone() const { return new UnoControlCheckBoxModel( *this ); }
@@ -514,13 +478,13 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
// ::com::sun::star::lang::XServiceInfo
- DECLIMPL_SERVICEINFO_DERIVED( UnoControlCheckBoxModel, ImageProducerControlModel, szServiceName2_UnoControlCheckBoxModel )
+ DECLIMPL_SERVICEINFO_DERIVED( UnoControlCheckBoxModel, GraphicControlModel, szServiceName2_UnoControlCheckBoxModel )
};
// ----------------------------------------------------
// class UnoCheckBoxControl
// ----------------------------------------------------
-typedef ::cppu::AggImplInheritanceHelper4 < ImageConsumerControl
+typedef ::cppu::AggImplInheritanceHelper4 < UnoControlBase
, ::com::sun::star::awt::XButton
, ::com::sun::star::awt::XCheckBox
, ::com::sun::star::awt::XItemListener
@@ -541,7 +505,7 @@ public:
void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
- void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { ImageConsumerControl::disposing( Source ); }
+ void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { UnoControlBase::disposing( Source ); }
// ::com::sun::star::awt::XControl
sal_Bool SAL_CALL isTransparent( ) throw(::com::sun::star::uno::RuntimeException);
@@ -569,7 +533,7 @@ public:
::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException);
// ::com::sun::star::lang::XServiceInfo
- DECLIMPL_SERVICEINFO_DERIVED( UnoCheckBoxControl, ImageConsumerControl, szServiceName2_UnoControlCheckBox )
+ DECLIMPL_SERVICEINFO_DERIVED( UnoCheckBoxControl, UnoControlBase, szServiceName2_UnoControlCheckBox )
};
@@ -761,11 +725,14 @@ struct UnoControlListBoxModel_Data;
typedef ::cppu::AggImplInheritanceHelper1 < UnoControlModel
, ::com::sun::star::awt::XItemList
> UnoControlListBoxModel_Base;
-class UnoControlListBoxModel :public UnoControlListBoxModel_Base
+class TOOLKIT_DLLPUBLIC UnoControlListBoxModel :public UnoControlListBoxModel_Base
{
+protected:
+ UnoControlListBoxModel(bool asComboBox);
public:
UnoControlListBoxModel();
UnoControlListBoxModel( const UnoControlListBoxModel& i_rSource );
+ ~UnoControlListBoxModel();
UnoControlModel* Clone() const { return new UnoControlListBoxModel( *this ); }
@@ -783,7 +750,9 @@ public:
::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
// ::com::sun::star::lang::XServiceInfo
- DECLIMPL_SERVICEINFO_DERIVED( UnoControlListBoxModel, UnoControlModel, szServiceName2_UnoControlListBoxModel )
+ //DECLIMPL_SERVICEINFO_DERIVED( UnoControlListBoxModel, UnoControlModel, szServiceName2_UnoControlListBoxModel )
+ ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
// ::com::sun::star::awt::XItemList
virtual ::sal_Int32 SAL_CALL getItemCount() throw (::com::sun::star::uno::RuntimeException);
@@ -841,7 +810,7 @@ private:
void impl_getStringItemList( ::std::vector< ::rtl::OUString >& o_rStringItems ) const;
void impl_setStringItemList_nolck( const ::std::vector< ::rtl::OUString >& i_rStringItems );
-private:
+protected:
::boost::scoped_ptr< UnoControlListBoxModel_Data > m_pData;
::cppu::OInterfaceContainerHelper m_aItemListListeners;
};
@@ -856,7 +825,7 @@ typedef ::cppu::AggImplInheritanceHelper5 < UnoControlBase
, ::com::sun::star::awt::XTextLayoutConstrains
, ::com::sun::star::awt::XItemListListener
> UnoListBoxControl_Base;
-class UnoListBoxControl : public UnoListBoxControl_Base
+class TOOLKIT_DLLPUBLIC UnoListBoxControl : public UnoListBoxControl_Base
{
public:
UnoListBoxControl();
@@ -913,13 +882,17 @@ public:
virtual void SAL_CALL itemListChanged( const ::com::sun::star::lang::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException);
// ::com::sun::star::lang::XServiceInfo
- DECLIMPL_SERVICEINFO_DERIVED( UnoListBoxControl, UnoControlBase, szServiceName2_UnoControlListBox )
+ // DECLIMPL_SERVICEINFO_DERIVED( UnoListBoxControl, UnoControlBase, szServiceName2_UnoControlListBox )
+ ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
protected:
void ImplUpdateSelectedItemsProperty();
virtual void ImplSetPeerProperty( const ::rtl::OUString& rPropName, const ::com::sun::star::uno::Any& rVal );
virtual void updateFromModel();
+ ActionListenerMultiplexer& getActionListeners();
+ ItemListenerMultiplexer& getItemListeners();
private:
ActionListenerMultiplexer maActionListeners;
ItemListenerMultiplexer maItemListeners;
@@ -928,7 +901,7 @@ private:
// ----------------------------------------------------
// class UnoControlComboBoxModel
// ----------------------------------------------------
-class UnoControlComboBoxModel : public UnoControlModel
+class UnoControlComboBoxModel : public UnoControlListBoxModel
{
protected:
::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
@@ -936,7 +909,7 @@ protected:
public:
UnoControlComboBoxModel();
- UnoControlComboBoxModel( const UnoControlComboBoxModel& rModel ) : UnoControlModel( rModel ) {;}
+ UnoControlComboBoxModel( const UnoControlComboBoxModel& rModel ) : UnoControlListBoxModel( rModel ) {;}
UnoControlModel* Clone() const { return new UnoControlComboBoxModel( *this ); }
@@ -945,17 +918,23 @@ public:
// ::com::sun::star::beans::XMultiPropertySet
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ // OPropertySetHelper
+ void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception);
// ::com::sun::star::lang::XServiceInfo
- DECLIMPL_SERVICEINFO_DERIVED( UnoControlComboBoxModel, UnoControlModel, szServiceName2_UnoControlComboBoxModel )
+ ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
+ // DECLIMPL_SERVICEINFO_DERIVED( UnoControlComboBoxModel, UnoControlModel, szServiceName2_UnoControlComboBoxModel )
};
// ----------------------------------------------------
// class UnoComboBoxControl
// ----------------------------------------------------
-class UnoComboBoxControl : public UnoEditControl,
- public ::com::sun::star::awt::XComboBox
+class UnoComboBoxControl : public UnoEditControl
+ , public ::com::sun::star::awt::XComboBox
+ , public ::com::sun::star::awt::XItemListener
+ , public ::com::sun::star::awt::XItemListListener
{
private:
ActionListenerMultiplexer maActionListeners;
@@ -966,12 +945,15 @@ public:
UnoComboBoxControl();
::rtl::OUString GetComponentServiceName();
+ void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { UnoEditControl::disposing( Source ); }
+ void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
+
::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoEditControl::queryInterface(rType); }
::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
void SAL_CALL acquire() throw() { OWeakAggObject::acquire(); }
void SAL_CALL release() throw() { OWeakAggObject::release(); }
- void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
- void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
+
// ::com::sun::star::lang::XTypeProvider
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
@@ -991,8 +973,28 @@ public:
sal_Int16 SAL_CALL getDropDownLineCount( ) throw(::com::sun::star::uno::RuntimeException);
void SAL_CALL setDropDownLineCount( sal_Int16 nLines ) throw(::com::sun::star::uno::RuntimeException);
+ // XUnoControl
+ virtual sal_Bool SAL_CALL setModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& Model) throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XItemListListener
+ virtual void SAL_CALL listItemInserted( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL listItemRemoved( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL listItemModified( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL allItemsRemoved( const ::com::sun::star::lang::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL itemListChanged( const ::com::sun::star::lang::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XItemListener
+ virtual void SAL_CALL itemStateChanged( const ::com::sun::star::awt::ItemEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
+
// ::com::sun::star::lang::XServiceInfo
- DECLIMPL_SERVICEINFO_DERIVED( UnoComboBoxControl, UnoEditControl, szServiceName2_UnoControlComboBox )
+ ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
+ //DECLIMPL_SERVICEINFO_DERIVED( UnoComboBoxControl, UnoEditControl, szServiceName2_UnoControlComboBox )
+protected:
+ virtual void ImplSetPeerProperty( const ::rtl::OUString& rPropName, const ::com::sun::star::uno::Any& rVal );
+ virtual void updateFromModel();
+ ActionListenerMultiplexer& getActionListeners();
+ ItemListenerMultiplexer& getItemListeners();
};
diff --git a/toolkit/inc/toolkit/helper/listenermultiplexer.hxx b/toolkit/inc/toolkit/helper/listenermultiplexer.hxx
index b9fb82c3d4bb..b4151fe0f35e 100644
--- a/toolkit/inc/toolkit/helper/listenermultiplexer.hxx
+++ b/toolkit/inc/toolkit/helper/listenermultiplexer.hxx
@@ -171,7 +171,7 @@ DECL_LISTENERMULTIPLEXER_END
// ----------------------------------------------------
// class ActionListenerMultiplexer
// ----------------------------------------------------
-DECL_LISTENERMULTIPLEXER_START( ActionListenerMultiplexer, ::com::sun::star::awt::XActionListener )
+DECL_LISTENERMULTIPLEXER_START_DLLPUB( ActionListenerMultiplexer, ::com::sun::star::awt::XActionListener )
void SAL_CALL actionPerformed( const ::com::sun::star::awt::ActionEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
DECL_LISTENERMULTIPLEXER_END
diff --git a/toolkit/inc/toolkit/helper/property.hxx b/toolkit/inc/toolkit/helper/property.hxx
index f8a1a703799c..837d283f4e8c 100644
--- a/toolkit/inc/toolkit/helper/property.hxx
+++ b/toolkit/inc/toolkit/helper/property.hxx
@@ -234,7 +234,7 @@ namespace rtl {
TOOLKIT_DLLPUBLIC sal_uInt16 GetPropertyId( const ::rtl::OUString& rPropertyName );
const ::com::sun::star::uno::Type* GetPropertyType( sal_uInt16 nPropertyId );
-const ::rtl::OUString& GetPropertyName( sal_uInt16 nPropertyId );
+TOOLKIT_DLLPUBLIC const ::rtl::OUString& GetPropertyName( sal_uInt16 nPropertyId );
sal_Int16 GetPropertyAttribs( sal_uInt16 nPropertyId );
sal_uInt16 GetPropertyOrderNr( sal_uInt16 nPropertyId );
sal_Bool DoesDependOnOthers( sal_uInt16 nPropertyId );
diff --git a/toolkit/inc/toolkit/helper/servicenames.hxx b/toolkit/inc/toolkit/helper/servicenames.hxx
index 96d9d5810cc0..2d1df79b733b 100644
--- a/toolkit/inc/toolkit/helper/servicenames.hxx
+++ b/toolkit/inc/toolkit/helper/servicenames.hxx
@@ -104,10 +104,5 @@ extern const sal_Char __FAR_DATA szServiceName_UnoThrobberControl[], szServiceNa
extern const sal_Char __FAR_DATA szServiceName_UnoThrobberControlModel[], szServiceName2_UnoThrobberControlModel[];
extern const sal_Char __FAR_DATA szServiceName_UnoControlFixedHyperlink[], szServiceName_UnoControlFixedHyperlinkModel[];
-// ExtUnoWrapper:
-extern const char __FAR_DATA szServiceName_ImageProducer[], szServiceName2_ImageProducer[];
-
-
-
#endif // _TOOLKIT_HELPER_SERVICENAMES_HXX_
diff --git a/toolkit/inc/toolkit/helper/solarrelease.hxx b/toolkit/inc/toolkit/helper/solarrelease.hxx
index d8938b41c220..e45a1b6ee2c3 100644
--- a/toolkit/inc/toolkit/helper/solarrelease.hxx
+++ b/toolkit/inc/toolkit/helper/solarrelease.hxx
@@ -41,15 +41,36 @@ namespace toolkit
class ReleaseSolarMutex
{
sal_uInt32 mnLockCount;
+ const bool mbRescheduleDuringAcquire;
+
public:
- ReleaseSolarMutex()
+ enum
{
- mnLockCount = Application::ReleaseSolarMutex();
+ RescheduleDuringAcquire = true
+ };
+
+ public:
+ ReleaseSolarMutex( const bool i_rescheduleDuringAcquire = false )
+ :mnLockCount( Application::ReleaseSolarMutex() )
+ ,mbRescheduleDuringAcquire( i_rescheduleDuringAcquire )
+ {
+
}
~ReleaseSolarMutex()
{
- Application::AcquireSolarMutex( mnLockCount );
+ if ( mnLockCount > 0 )
+ {
+ if ( mbRescheduleDuringAcquire )
+ {
+ while ( !Application::GetSolarMutex().tryToAcquire() )
+ {
+ Application::Reschedule();
+ }
+ --mnLockCount;
+ }
+ Application::AcquireSolarMutex( mnLockCount );
+ }
}
};
diff --git a/toolkit/inc/toolkit/helper/throbberimpl.hxx b/toolkit/inc/toolkit/helper/throbberimpl.hxx
index 5ca6ec83d330..b944a74b65d2 100644
--- a/toolkit/inc/toolkit/helper/throbberimpl.hxx
+++ b/toolkit/inc/toolkit/helper/throbberimpl.hxx
@@ -43,7 +43,7 @@ namespace toolkit
class Throbber_Impl
{
private:
- NAMESPACE_VOS(IMutex)& mrMutex; // Reference to SolarMutex
+ vos::IMutex& mrMutex; // Reference to SolarMutex
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > > maImageList;
::com::sun::star::uno::Reference< VCLXWindow > mxParent;
@@ -55,7 +55,7 @@ namespace toolkit
DECL_LINK( TimeOutHdl, Throbber_Impl* );
- NAMESPACE_VOS(IMutex)& GetMutex() { return mrMutex; }
+ vos::IMutex& GetMutex() { return mrMutex; }
public:
Throbber_Impl( ::com::sun::star::uno::Reference< VCLXWindow > xParent,
diff --git a/toolkit/inc/toolkit/helper/unopropertyarrayhelper.hxx b/toolkit/inc/toolkit/helper/unopropertyarrayhelper.hxx
index 5b5cb3021fc9..99d1763db1e6 100644
--- a/toolkit/inc/toolkit/helper/unopropertyarrayhelper.hxx
+++ b/toolkit/inc/toolkit/helper/unopropertyarrayhelper.hxx
@@ -34,6 +34,7 @@
#include <tools/table.hxx>
#include <list>
+#include "toolkit/dllapi.h"
// ----------------------------------------------------
// class UnoPropertyArrayHelper
diff --git a/toolkit/prj/d.lst b/toolkit/prj/d.lst
index 375485c96e4d..01eb5026e401 100644
--- a/toolkit/prj/d.lst
+++ b/toolkit/prj/d.lst
@@ -63,3 +63,4 @@ mkdir: %_DEST%\inc%_EXT%\layout\vcl
..\source\layout\vcl\*.hxx %_DEST%\inc%_EXT%\layout\vcl\*.hxx
..\%__SRC%\bin\*-layout.zip %_DEST%\pck%_EXT%\*.*
+..\%__SRC%\misc\tk.component %_DEST%\xml%_EXT%\tk.component
diff --git a/toolkit/qa/unoapi/knownissues.xcl b/toolkit/qa/unoapi/knownissues.xcl
index 429d7693c833..7f8896a35597 100644
--- a/toolkit/qa/unoapi/knownissues.xcl
+++ b/toolkit/qa/unoapi/knownissues.xcl
@@ -241,9 +241,6 @@ toolkit.AccessibleMenu::com::sun::star::accessibility::XAccessibleValue
toolkit.AccessibleMenuBar::com::sun::star::accessibility::XAccessibleEventBroadcaster
toolkit.AccessibleMenuBar::com::sun::star::accessibility::XAccessibleSelection
-### i111076 ###
-toolkit.Toolkit::com::sun::star::awt::XDataTransferProviderAccess
-
### i111113 ###
toolkit.AccessibleStatusBarItem::com::sun::star::accessibility::XAccessibleComponent
toolkit.AccessibleStatusBarItem::com::sun::star::accessibility::XAccessibleContext
diff --git a/toolkit/qa/unoapi/toolkit.sce b/toolkit/qa/unoapi/toolkit.sce
index 5a148feee573..00af010d23d6 100644
--- a/toolkit/qa/unoapi/toolkit.sce
+++ b/toolkit/qa/unoapi/toolkit.sce
@@ -8,10 +8,10 @@
#i86110 -o toolkit.AccessibleList
#i86110 -o toolkit.AccessibleListBox
#i86110 -o toolkit.AccessibleListItem
-#i111047# -o toolkit.AccessibleMenu
-#i111047# -o toolkit.AccessibleMenuBar
+-o toolkit.AccessibleMenu
+-o toolkit.AccessibleMenuBar
#i86009 -o toolkit.AccessibleMenuItem
-#i111047# -o toolkit.AccessibleMenuSeparator
+-o toolkit.AccessibleMenuSeparator
#i52607 -o toolkit.AccessiblePopupMenu
#i86107,i86110 -o toolkit.AccessibleRadioButton
-o toolkit.AccessibleScrollBar
diff --git a/toolkit/source/awt/asynccallback.cxx b/toolkit/source/awt/asynccallback.cxx
index 593feb582274..9e5334b2d28c 100644
--- a/toolkit/source/awt/asynccallback.cxx
+++ b/toolkit/source/awt/asynccallback.cxx
@@ -191,9 +191,3 @@ void * SAL_CALL comp_AsyncCallback_component_getFactory(
return ::cppu::component_getFactoryHelper(
implName, serviceManager, registryKey, entries);
}
-
-sal_Bool SAL_CALL comp_AsyncCallback_component_writeInfo(
- void * serviceManager, void * registryKey)
-{
- return ::cppu::component_writeInfoHelper(serviceManager, registryKey, entries);
-}
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/vclxgraphics.cxx b/toolkit/source/awt/vclxgraphics.cxx
index bfbdb531e8d2..edaf64799d43 100644
--- a/toolkit/source/awt/vclxgraphics.cxx
+++ b/toolkit/source/awt/vclxgraphics.cxx
@@ -109,7 +109,7 @@ void VCLXGraphics::InitOutputDevice( sal_uInt16 nFlags )
{
if(mpOutputDevice)
{
- NAMESPACE_VOS(OGuard) aVclGuard( Application::GetSolarMutex() );
+ vos::OGuard aVclGuard( Application::GetSolarMutex() );
if ( nFlags & INITOUTDEV_FONT )
{
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index f85e29c21099..1af422bf7f00 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -659,7 +659,7 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
if ( nType )
{
- NAMESPACE_VOS(OGuard) aVclGuard( Application::GetSolarMutex() );
+ vos::OGuard aVclGuard( Application::GetSolarMutex() );
switch ( (WindowType)nType )
{
case WINDOW_CANCELBUTTON:
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 73022aacedf2..808f3578ef97 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,7 +66,8 @@
#include <vcl/button.hxx>
#include <comphelper/asyncnotification.hxx>
#include <toolkit/helper/solarrelease.hxx>
-
+#include "stylesettings.hxx"
+#include <tools/urlobj.hxx>
#include <toolkit/helper/unopropertyarrayhelper.hxx>
#include <boost/bind.hpp>
@@ -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;
@@ -86,6 +92,7 @@ using ::com::sun::star::style::VerticalAlignment_MAKE_FIXED_SIZE;
namespace WritingMode2 = ::com::sun::star::text::WritingMode2;
namespace MouseWheelBehavior = ::com::sun::star::awt::MouseWheelBehavior;
+using ::toolkit::ReleaseSolarMutex;
//====================================================================
//= misc helpers
@@ -164,6 +171,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 +207,8 @@ public:
return maAccFactory;
}
+ Reference< XStyleSettings > getStyleSettings();
+
/** returns the container of registered XWindowListener2 listeners
*/
inline ::cppu::OInterfaceContainerHelper& getWindow2Listeners() { return maWindow2Listeners; }
@@ -222,17 +233,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 +298,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();
}
//--------------------------------------------------------------------
@@ -336,7 +340,7 @@ IMPL_LINK( VCLXWindowImpl, OnProcessCallbacks, void*, EMPTYARG )
}
{
- ::toolkit::ReleaseSolarMutex aReleaseSolar;
+ ReleaseSolarMutex aReleaseSolar( ReleaseSolarMutex::RescheduleDuringAcquire );
for ( CallbackArray::const_iterator loop = aCallbacksCopy.begin();
loop != aCallbacksCopy.end();
++loop
@@ -361,6 +365,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;
+}
+
//====================================================================
//====================================================================
@@ -2634,3 +2649,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/awt/vclxwindow1.cxx b/toolkit/source/awt/vclxwindow1.cxx
index daea557d241a..3572607772dc 100644
--- a/toolkit/source/awt/vclxwindow1.cxx
+++ b/toolkit/source/awt/vclxwindow1.cxx
@@ -93,7 +93,7 @@ void VCLXWindow::SetSystemParent_Impl( const com::sun::star::uno::Any& rHandle )
// create system parent data
SystemParentData aSysParentData;
aSysParentData.nSize = sizeof ( SystemParentData );
-#if defined( WIN ) || defined( WNT ) || defined ( OS2 )
+#if defined( WNT ) || defined ( OS2 )
aSysParentData.hWnd = (HWND) nHandle;
#elif defined( QUARTZ )
aSysParentData.pView = reinterpret_cast<NSView*>(nHandle);
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 225f03e95cd7..06c9167336a8 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -42,6 +42,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/system/XSystemShellExecute.hpp>
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
+#include <com/sun/star/resource/XStringResourceResolver.hpp>
#include <com/sun/star/awt/ImageScaleMode.hpp>
#include <com/sun/star/awt/XItemList.hpp>
#include <comphelper/componentcontext.hxx>
@@ -206,33 +207,22 @@ namespace toolkit
}
// ----------------------------------------------------
-// class VCLXImageConsumer
+// class VCLXGraphicControl
// ----------------------------------------------------
-void VCLXImageConsumer::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
+void VCLXGraphicControl::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
{
VCLXWindow::ImplGetPropertyIds( rIds );
}
-void VCLXImageConsumer::ImplSetNewImage()
+void VCLXGraphicControl::ImplSetNewImage()
{
- OSL_PRECOND( GetWindow(), "VCLXImageConsumer::ImplSetNewImage: window is required to be not-NULL!" );
+ OSL_PRECOND( GetWindow(), "VCLXGraphicControl::ImplSetNewImage: window is required to be not-NULL!" );
Button* pButton = static_cast< Button* >( GetWindow() );
pButton->SetModeBitmap( GetBitmap() );
}
-void VCLXImageConsumer::ImplUpdateImage( sal_Bool bGetNewImage )
-{
- if ( !GetWindow() )
- return;
-
- if ( bGetNewImage && !maImageConsumer.GetData( maImage ) )
- return;
-
- ImplSetNewImage();
-}
-
-void VCLXImageConsumer::setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, short Flags ) throw(::com::sun::star::uno::RuntimeException)
+void VCLXGraphicControl::setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, short Flags ) throw(::com::sun::star::uno::RuntimeException)
{
::vos::OGuard aGuard( GetMutex() );
@@ -241,49 +231,11 @@ void VCLXImageConsumer::setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, s
Size aOldSize = GetWindow()->GetSizePixel();
VCLXWindow::setPosSize( X, Y, Width, Height, Flags );
if ( ( aOldSize.Width() != Width ) || ( aOldSize.Height() != Height ) )
- ImplUpdateImage( sal_False );
+ ImplSetNewImage();
}
}
-void VCLXImageConsumer::init( sal_Int32 Width, sal_Int32 Height ) throw(::com::sun::star::uno::RuntimeException)
-{
- ::vos::OGuard aGuard( GetMutex() );
-
- maImageConsumer.Init( Width, Height );
-}
-
-void VCLXImageConsumer::setColorModel( sal_Int16 BitCount, const ::com::sun::star::uno::Sequence< sal_Int32 >& RGBAPal, sal_Int32 RedMask, sal_Int32 GreenMask, sal_Int32 BlueMask, sal_Int32 AlphaMask ) throw(::com::sun::star::uno::RuntimeException)
-{
- ::vos::OGuard aGuard( GetMutex() );
-
- maImageConsumer.SetColorModel( BitCount, RGBAPal.getLength(), (const sal_uInt32*) RGBAPal.getConstArray(), RedMask, GreenMask, BlueMask, AlphaMask );
-}
-
-void VCLXImageConsumer::setPixelsByBytes( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, const ::com::sun::star::uno::Sequence< sal_Int8 >& ProducerData, sal_Int32 Offset, sal_Int32 Scansize ) throw(::com::sun::star::uno::RuntimeException)
-{
- ::vos::OGuard aGuard( GetMutex() );
-
- maImageConsumer.SetPixelsByBytes( X, Y, Width, Height, (sal_uInt8*)ProducerData.getConstArray(), Offset, Scansize );
- ImplUpdateImage( sal_True );
-}
-
-void VCLXImageConsumer::setPixelsByLongs( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, const ::com::sun::star::uno::Sequence< sal_Int32 >& ProducerData, sal_Int32 Offset, sal_Int32 Scansize ) throw(::com::sun::star::uno::RuntimeException)
-{
- ::vos::OGuard aGuard( GetMutex() );
-
- maImageConsumer.SetPixelsByLongs( X, Y, Width, Height, (const sal_uInt32*) ProducerData.getConstArray(), Offset, Scansize );
- ImplUpdateImage( sal_True );
-}
-
-void VCLXImageConsumer::complete( sal_Int32 Status, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageProducer > & ) throw(::com::sun::star::uno::RuntimeException)
-{
- ::vos::OGuard aGuard( GetMutex() );
-
- maImageConsumer.Completed( Status );
- ImplUpdateImage( sal_True );
-}
-
-void VCLXImageConsumer::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException)
+void VCLXGraphicControl::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException)
{
::vos::OGuard aGuard( GetMutex() );
@@ -336,7 +288,7 @@ void VCLXImageConsumer::setProperty( const ::rtl::OUString& PropertyName, const
}
}
-::com::sun::star::uno::Any VCLXImageConsumer::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException)
+::com::sun::star::uno::Any VCLXGraphicControl::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException)
{
::vos::OGuard aGuard( GetMutex() );
@@ -418,7 +370,7 @@ void VCLXButton::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_CONTEXT_WRITING_MODE,
BASEPROPERTY_REFERENCE_DEVICE,
0);
- VCLXImageConsumer::ImplGetPropertyIds( rIds );
+ VCLXGraphicControl::ImplGetPropertyIds( rIds );
}
VCLXButton::VCLXButton()
@@ -444,7 +396,7 @@ void VCLXButton::dispose() throw(::com::sun::star::uno::RuntimeException)
aObj.Source = (::cppu::OWeakObject*)this;
maActionListeners.disposeAndClear( aObj );
maItemListeners.disposeAndClear( aObj );
- VCLXImageConsumer::dispose();
+ VCLXGraphicControl::dispose();
}
void VCLXButton::addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener > & l )throw(::com::sun::star::uno::RuntimeException)
@@ -573,7 +525,7 @@ void VCLXButton::setProperty( const ::rtl::OUString& PropertyName, const ::com::
break;
default:
{
- VCLXImageConsumer::setProperty( PropertyName, Value );
+ VCLXGraphicControl::setProperty( PropertyName, Value );
}
}
}
@@ -613,7 +565,7 @@ void VCLXButton::setProperty( const ::rtl::OUString& PropertyName, const ::com::
break;
default:
{
- aProp <<= VCLXImageConsumer::getProperty( PropertyName );
+ aProp <<= VCLXGraphicControl::getProperty( PropertyName );
}
}
}
@@ -664,7 +616,7 @@ void VCLXButton::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
break;
default:
- VCLXImageConsumer::ProcessWindowEvent( rVclWindowEvent );
+ VCLXGraphicControl::ProcessWindowEvent( rVclWindowEvent );
break;
}
}
@@ -693,7 +645,7 @@ void VCLXImageControl::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_WRITING_MODE,
BASEPROPERTY_CONTEXT_WRITING_MODE,
0);
- VCLXImageConsumer::ImplGetPropertyIds( rIds );
+ VCLXGraphicControl::ImplGetPropertyIds( rIds );
}
VCLXImageControl::VCLXImageControl()
@@ -770,7 +722,7 @@ void VCLXImageControl::setProperty( const ::rtl::OUString& PropertyName, const :
break;
default:
- VCLXImageConsumer::setProperty( PropertyName, Value );
+ VCLXGraphicControl::setProperty( PropertyName, Value );
break;
}
}
@@ -794,7 +746,7 @@ void VCLXImageControl::setProperty( const ::rtl::OUString& PropertyName, const :
break;
default:
- aProp = VCLXImageConsumer::getProperty( PropertyName );
+ aProp = VCLXGraphicControl::getProperty( PropertyName );
break;
}
return aProp;
@@ -831,7 +783,7 @@ void VCLXCheckBox::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_CONTEXT_WRITING_MODE,
BASEPROPERTY_REFERENCE_DEVICE,
0);
- VCLXImageConsumer::ImplGetPropertyIds( rIds );
+ VCLXGraphicControl::ImplGetPropertyIds( rIds );
}
VCLXCheckBox::VCLXCheckBox() : maActionListeners( *this ), maItemListeners( *this )
@@ -844,14 +796,14 @@ VCLXCheckBox::VCLXCheckBox() : maActionListeners( *this ), maItemListeners( *th
::com::sun::star::uno::Any aRet = ::cppu::queryInterface( rType,
SAL_STATIC_CAST( ::com::sun::star::awt::XButton*, this ),
SAL_STATIC_CAST( ::com::sun::star::awt::XCheckBox*, this ) );
- return (aRet.hasValue() ? aRet : VCLXImageConsumer::queryInterface( rType ));
+ return (aRet.hasValue() ? aRet : VCLXGraphicControl::queryInterface( rType ));
}
// ::com::sun::star::lang::XTypeProvider
IMPL_XTYPEPROVIDER_START( VCLXCheckBox )
getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XButton>* ) NULL ),
getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XCheckBox>* ) NULL ),
- VCLXImageConsumer::getTypes()
+ VCLXGraphicControl::getTypes()
IMPL_XTYPEPROVIDER_END
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > VCLXCheckBox::CreateAccessibleContext()
@@ -866,7 +818,7 @@ void VCLXCheckBox::dispose() throw(::com::sun::star::uno::RuntimeException)
::com::sun::star::lang::EventObject aObj;
aObj.Source = (::cppu::OWeakObject*)this;
maItemListeners.disposeAndClear( aObj );
- VCLXImageConsumer::dispose();
+ VCLXGraphicControl::dispose();
}
void VCLXCheckBox::addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener > & l ) throw(::com::sun::star::uno::RuntimeException)
@@ -1028,7 +980,7 @@ void VCLXCheckBox::setProperty( const ::rtl::OUString& PropertyName, const ::com
break;
default:
{
- VCLXImageConsumer::setProperty( PropertyName, Value );
+ VCLXGraphicControl::setProperty( PropertyName, Value );
}
}
}
@@ -1056,7 +1008,7 @@ void VCLXCheckBox::setProperty( const ::rtl::OUString& PropertyName, const ::com
break;
default:
{
- aProp <<= VCLXImageConsumer::getProperty( PropertyName );
+ aProp <<= VCLXGraphicControl::getProperty( PropertyName );
}
}
}
@@ -1098,7 +1050,7 @@ void VCLXCheckBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
break;
default:
- VCLXImageConsumer::ProcessWindowEvent( rVclWindowEvent );
+ VCLXGraphicControl::ProcessWindowEvent( rVclWindowEvent );
break;
}
}
@@ -1131,7 +1083,7 @@ void VCLXRadioButton::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_CONTEXT_WRITING_MODE,
BASEPROPERTY_REFERENCE_DEVICE,
0);
- VCLXImageConsumer::ImplGetPropertyIds( rIds );
+ VCLXGraphicControl::ImplGetPropertyIds( rIds );
}
@@ -1145,14 +1097,14 @@ VCLXRadioButton::VCLXRadioButton() : maItemListeners( *this ), maActionListeners
::com::sun::star::uno::Any aRet = ::cppu::queryInterface( rType,
SAL_STATIC_CAST( ::com::sun::star::awt::XRadioButton*, this ),
SAL_STATIC_CAST( ::com::sun::star::awt::XButton*, this ) );
- return (aRet.hasValue() ? aRet : VCLXImageConsumer::queryInterface( rType ));
+ return (aRet.hasValue() ? aRet : VCLXGraphicControl::queryInterface( rType ));
}
// ::com::sun::star::lang::XTypeProvider
IMPL_XTYPEPROVIDER_START( VCLXRadioButton )
getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XRadioButton>* ) NULL ),
getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XButton>* ) NULL ),
- VCLXImageConsumer::getTypes()
+ VCLXGraphicControl::getTypes()
IMPL_XTYPEPROVIDER_END
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > VCLXRadioButton::CreateAccessibleContext()
@@ -1167,7 +1119,7 @@ void VCLXRadioButton::dispose() throw(::com::sun::star::uno::RuntimeException)
::com::sun::star::lang::EventObject aObj;
aObj.Source = (::cppu::OWeakObject*)this;
maItemListeners.disposeAndClear( aObj );
- VCLXImageConsumer::dispose();
+ VCLXGraphicControl::dispose();
}
void VCLXRadioButton::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException)
@@ -1206,7 +1158,7 @@ void VCLXRadioButton::setProperty( const ::rtl::OUString& PropertyName, const ::
break;
default:
{
- VCLXImageConsumer::setProperty( PropertyName, Value );
+ VCLXGraphicControl::setProperty( PropertyName, Value );
}
}
}
@@ -1234,7 +1186,7 @@ void VCLXRadioButton::setProperty( const ::rtl::OUString& PropertyName, const ::
break;
default:
{
- aProp <<= VCLXImageConsumer::getProperty( PropertyName );
+ aProp <<= VCLXGraphicControl::getProperty( PropertyName );
}
}
}
@@ -1366,7 +1318,7 @@ void VCLXRadioButton::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent
break;
default:
- VCLXImageConsumer::ProcessWindowEvent( rVclWindowEvent );
+ VCLXGraphicControl::ProcessWindowEvent( rVclWindowEvent );
break;
}
}
@@ -2212,11 +2164,28 @@ void SAL_CALL VCLXListBox::itemListChanged( const EventObject& i_rEvent ) throw
pListBox->Clear();
+ uno::Reference< beans::XPropertySet > xPropSet( i_rEvent.Source, uno::UNO_QUERY_THROW );
+ uno::Reference< beans::XPropertySetInfo > xPSI( xPropSet->getPropertySetInfo(), uno::UNO_QUERY_THROW );
+ uno::Reference< resource::XStringResourceResolver > xStringResourceResolver;
+ if ( xPSI->hasPropertyByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ResourceResolver" ) ) ) )
+ {
+ xStringResourceResolver.set(
+ xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ResourceResolver" ) ) ),
+ uno::UNO_QUERY
+ );
+ }
+
+
Reference< XItemList > xItemList( i_rEvent.Source, uno::UNO_QUERY_THROW );
uno::Sequence< beans::Pair< ::rtl::OUString, ::rtl::OUString > > aItems = xItemList->getAllItems();
for ( sal_Int32 i=0; i<aItems.getLength(); ++i )
{
- pListBox->InsertEntry( aItems[i].First, lcl_getImageFromURL( aItems[i].Second ) );
+ ::rtl::OUString aLocalizationKey( aItems[i].First );
+ if ( xStringResourceResolver.is() && aLocalizationKey.getLength() != 0 && aLocalizationKey[0] == '&' )
+ {
+ aLocalizationKey = xStringResourceResolver->resolveString(aLocalizationKey.copy( 1 ));
+ }
+ pListBox->InsertEntry( aLocalizationKey, lcl_getImageFromURL( aItems[i].Second ) );
}
}
@@ -2394,15 +2363,23 @@ sal_Int16 VCLXDialog::execute() throw(::com::sun::star::uno::RuntimeException)
Dialog* pDlg = (Dialog*) GetWindow();
Window* pParent = pDlg->GetWindow( WINDOW_PARENTOVERLAP );
Window* pOldParent = NULL;
+ Window* pSetParent = NULL;
if ( pParent && !pParent->IsReallyVisible() )
{
pOldParent = pDlg->GetParent();
Window* pFrame = pDlg->GetWindow( WINDOW_FRAME );
if( pFrame != pDlg )
+ {
pDlg->SetParent( pFrame );
+ pSetParent = pFrame;
+ }
}
+
nRet = pDlg->Execute();
- if ( pOldParent )
+
+ // set the parent back only in case no new parent was set from outside
+ // in other words, revert only own changes
+ if ( pOldParent && pDlg->GetParent() == pSetParent )
pDlg->SetParent( pOldParent );
}
return nRet;
@@ -3010,16 +2987,15 @@ short VCLXFixedText::getAlignment() throw(::com::sun::star::uno::RuntimeExceptio
return getMinimumSize();
}
-::com::sun::star::awt::Size VCLXFixedText::calcAdjustedSize( const ::com::sun::star::awt::Size& rNewSize ) throw(::com::sun::star::uno::RuntimeException)
+::com::sun::star::awt::Size VCLXFixedText::calcAdjustedSize( const ::com::sun::star::awt::Size& rMaxSize ) throw(::com::sun::star::uno::RuntimeException)
{
::vos::OGuard aGuard( GetMutex() );
- ::com::sun::star::awt::Size aSz = rNewSize;
- ::com::sun::star::awt::Size aMinSz = getMinimumSize();
- if ( aSz.Height != aMinSz.Height )
- aSz.Height = aMinSz.Height;
-
- return aSz;
+ Size aAdjustedSize( VCLUnoHelper::ConvertToVCLSize( rMaxSize ) );
+ FixedText* pFixedText = (FixedText*)GetWindow();
+ if ( pFixedText )
+ aAdjustedSize = pFixedText->CalcMinimumSize( rMaxSize.Width );
+ return VCLUnoHelper::ConvertToAWTSize( aAdjustedSize );
}
// ----------------------------------------------------
@@ -3928,20 +3904,6 @@ VCLXComboBox::~VCLXComboBox()
#endif
}
-// ::com::sun::star::uno::XInterface
-::com::sun::star::uno::Any VCLXComboBox::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException)
-{
- ::com::sun::star::uno::Any aRet = ::cppu::queryInterface( rType,
- SAL_STATIC_CAST( ::com::sun::star::awt::XComboBox*, this ) );
- return (aRet.hasValue() ? aRet : VCLXEdit::queryInterface( rType ));
-}
-
-// ::com::sun::star::lang::XTypeProvider
-IMPL_XTYPEPROVIDER_START( VCLXComboBox )
- getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XComboBox>* ) NULL ),
- VCLXEdit::getTypes()
-IMPL_XTYPEPROVIDER_END
-
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > VCLXComboBox::CreateAccessibleContext()
{
::vos::OGuard aGuard( GetMutex() );
@@ -4005,8 +3967,12 @@ void VCLXComboBox::addItems( const ::com::sun::star::uno::Sequence< ::rtl::OUStr
for ( sal_uInt16 n = 0; n < aItems.getLength(); n++ )
{
pBox->InsertEntry( aItems.getConstArray()[n], nP );
- if ( (sal_uInt16)nPos < 0xFFFF ) // Nicht wenn 0xFFFF, weil LIST_APPEND
- nP++;
+ if ( nP == 0xFFFF )
+ {
+ OSL_ENSURE( false, "VCLXComboBox::addItems: too many entries!" );
+ // skip remaining entries, list cannot hold them, anyway
+ break;
+ }
}
}
}
@@ -4110,14 +4076,8 @@ void VCLXComboBox::setProperty( const ::rtl::OUString& PropertyName, const ::com
::com::sun::star::uno::Sequence< ::rtl::OUString> aItems;
if ( Value >>= aItems )
{
- sal_Bool bUpdate = pComboBox->IsUpdateMode();
- pComboBox->SetUpdateMode( sal_False );
pComboBox->Clear();
- const ::rtl::OUString* pStrings = aItems.getConstArray();
- sal_Int32 nItems = aItems.getLength();
- for ( sal_Int32 n = 0; n < nItems; n++ )
- pComboBox->InsertEntry( pStrings[n], LISTBOX_APPEND );
- pComboBox->SetUpdateMode( bUpdate );
+ addItems( aItems, 0 );
}
}
break;
@@ -4287,6 +4247,104 @@ void VCLXComboBox::getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) thr
nLines = nL;
}
}
+void SAL_CALL VCLXComboBox::listItemInserted( const ItemListEvent& i_rEvent ) throw (RuntimeException)
+{
+ ::vos::OGuard aGuard( GetMutex() );
+
+ ComboBox* pComboBox = dynamic_cast< ComboBox* >( GetWindow() );
+
+ ENSURE_OR_RETURN_VOID( pComboBox, "VCLXComboBox::listItemInserted: no ComboBox?!" );
+ ENSURE_OR_RETURN_VOID( ( i_rEvent.ItemPosition >= 0 ) && ( i_rEvent.ItemPosition <= sal_Int32( pComboBox->GetEntryCount() ) ),
+ "VCLXComboBox::listItemInserted: illegal (inconsistent) item position!" );
+ pComboBox->InsertEntry(
+ i_rEvent.ItemText.IsPresent ? i_rEvent.ItemText.Value : ::rtl::OUString(),
+ i_rEvent.ItemImageURL.IsPresent ? lcl_getImageFromURL( i_rEvent.ItemImageURL.Value ) : Image(),
+ i_rEvent.ItemPosition );
+}
+
+void SAL_CALL VCLXComboBox::listItemRemoved( const ItemListEvent& i_rEvent ) throw (RuntimeException)
+{
+ ::vos::OGuard aGuard( GetMutex() );
+
+ ComboBox* pComboBox = dynamic_cast< ComboBox* >( GetWindow() );
+
+ ENSURE_OR_RETURN_VOID( pComboBox, "VCLXComboBox::listItemRemoved: no ComboBox?!" );
+ ENSURE_OR_RETURN_VOID( ( i_rEvent.ItemPosition >= 0 ) && ( i_rEvent.ItemPosition < sal_Int32( pComboBox->GetEntryCount() ) ),
+ "VCLXComboBox::listItemRemoved: illegal (inconsistent) item position!" );
+
+ pComboBox->RemoveEntry( i_rEvent.ItemPosition );
+}
+
+void SAL_CALL VCLXComboBox::listItemModified( const ItemListEvent& i_rEvent ) throw (RuntimeException)
+{
+ ::vos::OGuard aGuard( GetMutex() );
+
+ ComboBox* pComboBox = dynamic_cast< ComboBox* >( GetWindow() );
+
+ ENSURE_OR_RETURN_VOID( pComboBox, "VCLXComboBox::listItemModified: no ComboBox?!" );
+ ENSURE_OR_RETURN_VOID( ( i_rEvent.ItemPosition >= 0 ) && ( i_rEvent.ItemPosition < sal_Int32( pComboBox->GetEntryCount() ) ),
+ "VCLXComboBox::listItemModified: illegal (inconsistent) item position!" );
+
+ // VCL's ComboBox does not support changing an entry's text or image, so remove and re-insert
+
+ const ::rtl::OUString sNewText = i_rEvent.ItemText.IsPresent ? i_rEvent.ItemText.Value : ::rtl::OUString( pComboBox->GetEntry( i_rEvent.ItemPosition ) );
+ const Image aNewImage( i_rEvent.ItemImageURL.IsPresent ? lcl_getImageFromURL( i_rEvent.ItemImageURL.Value ) : pComboBox->GetEntryImage( i_rEvent.ItemPosition ) );
+
+ pComboBox->RemoveEntry( i_rEvent.ItemPosition );
+ pComboBox->InsertEntry( sNewText, aNewImage, i_rEvent.ItemPosition );
+}
+
+void SAL_CALL VCLXComboBox::allItemsRemoved( const EventObject& i_rEvent ) throw (RuntimeException)
+{
+ ::vos::OGuard aGuard( GetMutex() );
+
+ ComboBox* pComboBox = dynamic_cast< ComboBox* >( GetWindow() );
+ ENSURE_OR_RETURN_VOID( pComboBox, "VCLXComboBox::listItemModified: no ComboBox?!" );
+
+ pComboBox->Clear();
+
+ (void)i_rEvent;
+}
+
+void SAL_CALL VCLXComboBox::itemListChanged( const EventObject& i_rEvent ) throw (RuntimeException)
+{
+ ::vos::OGuard aGuard( GetMutex() );
+
+ ComboBox* pComboBox = dynamic_cast< ComboBox* >( GetWindow() );
+ ENSURE_OR_RETURN_VOID( pComboBox, "VCLXComboBox::listItemModified: no ComboBox?!" );
+
+ pComboBox->Clear();
+
+ uno::Reference< beans::XPropertySet > xPropSet( i_rEvent.Source, uno::UNO_QUERY_THROW );
+ uno::Reference< beans::XPropertySetInfo > xPSI( xPropSet->getPropertySetInfo(), uno::UNO_QUERY_THROW );
+ // bool localize = xPSI->hasPropertyByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ResourceResolver" ) ) );
+ uno::Reference< resource::XStringResourceResolver > xStringResourceResolver;
+ if ( xPSI->hasPropertyByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ResourceResolver" ) ) ) )
+ {
+ xStringResourceResolver.set(
+ xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ResourceResolver" ) ) ),
+ uno::UNO_QUERY
+ );
+ }
+
+
+ Reference< XItemList > xItemList( i_rEvent.Source, uno::UNO_QUERY_THROW );
+ uno::Sequence< beans::Pair< ::rtl::OUString, ::rtl::OUString > > aItems = xItemList->getAllItems();
+ for ( sal_Int32 i=0; i<aItems.getLength(); ++i )
+ {
+ ::rtl::OUString aLocalizationKey( aItems[i].First );
+ if ( xStringResourceResolver.is() && aLocalizationKey.getLength() != 0 && aLocalizationKey[0] == '&' )
+ {
+ aLocalizationKey = xStringResourceResolver->resolveString(aLocalizationKey.copy( 1 ));
+ }
+ pComboBox->InsertEntry( aLocalizationKey, lcl_getImageFromURL( aItems[i].Second ) );
+ }
+}
+void SAL_CALL VCLXComboBox::disposing( const EventObject& i_rEvent ) throw (RuntimeException)
+{
+ // just disambiguate
+ VCLXEdit::disposing( i_rEvent );
+}
// ----------------------------------------------------
// class VCLXFormattedSpinField
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx
index 0c43ad0d0157..ecb4d7765723 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -2116,9 +2116,14 @@ throw (RuntimeException)
urlObj.removeSegment();
baseLocation = urlObj.GetMainURL( INetURLObject::NO_DECODE );
- ::rtl::OUString testAbsoluteURL;
- if ( ::osl::FileBase::E_None == ::osl::FileBase::getAbsoluteFileURL( baseLocation, url, testAbsoluteURL ) )
- absoluteURL = testAbsoluteURL;
+ const INetURLObject protocolCheck( url );
+ const INetProtocol protocol = protocolCheck.GetProtocol();
+ if ( protocol == INET_PROT_NOT_VALID )
+ {
+ ::rtl::OUString testAbsoluteURL;
+ if ( ::osl::FileBase::E_None == ::osl::FileBase::getAbsoluteFileURL( baseLocation, url, testAbsoluteURL ) )
+ absoluteURL = testAbsoluteURL;
+ }
}
return absoluteURL;
diff --git a/toolkit/source/controls/roadmapcontrol.cxx b/toolkit/source/controls/roadmapcontrol.cxx
index acfbee0c5bb6..96f51b39dc72 100644
--- a/toolkit/source/controls/roadmapcontrol.cxx
+++ b/toolkit/source/controls/roadmapcontrol.cxx
@@ -52,27 +52,6 @@ namespace toolkit
// helper
// ----------------------------------------------------
- static void lcl_knitImageComponents( const Reference< XControlModel >& _rxModel,
- const Reference< XWindowPeer >& _rxPeer,
- bool _bAdd )
- {
- Reference< XImageProducer > xProducer( _rxModel, UNO_QUERY );
- if ( xProducer.is() )
- {
- Reference< XImageConsumer > xConsumer( _rxPeer, UNO_QUERY );
- if ( xConsumer.is() )
- {
- if ( _bAdd )
- {
- xProducer->addConsumer( xConsumer );
- xProducer->startProduction();
- }
- else
- xProducer->removeConsumer( xConsumer );
- }
- }
- }
-
static void lcl_throwIllegalArgumentException( )
{ // throwing is expensive (in terms of code size), thus we hope the compiler does not inline this ....
throw IllegalArgumentException();
@@ -97,6 +76,7 @@ static void lcl_throwIndexOutOfBoundsException( )
ImplRegisterProperty( BASEPROPERTY_HELPTEXT );
ImplRegisterProperty( BASEPROPERTY_HELPURL );
ImplRegisterProperty( BASEPROPERTY_IMAGEURL );
+ ImplRegisterProperty( BASEPROPERTY_GRAPHIC );
ImplRegisterProperty( BASEPROPERTY_PRINTABLE );
ImplRegisterProperty( BASEPROPERTY_COMPLETE );
ImplRegisterProperty( BASEPROPERTY_ACTIVATED );
@@ -135,7 +115,7 @@ static void lcl_throwIndexOutOfBoundsException( )
case BASEPROPERTY_DEFAULTCONTROL:
aReturn <<= ::rtl::OUString( ::rtl::OUString::createFromAscii( szServiceName_UnoControlRoadmap ) );
break;
- default : aReturn = UnoControlModel::ImplGetDefaultValue( nPropId ); break;
+ default : aReturn = UnoControlRoadmapModel_Base::ImplGetDefaultValue( nPropId ); break;
}
return aReturn;
@@ -384,40 +364,6 @@ static void lcl_throwIndexOutOfBoundsException( )
maContainerListeners.removeInterface( xListener );
}
-
- void UnoControlRoadmapModel::addConsumer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer >& xConsumer ) throw (::com::sun::star::uno::RuntimeException)
- {
- maImageListeners.push_back( xConsumer );
- }
-
-
- void UnoControlRoadmapModel::removeConsumer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer >& xConsumer ) throw (::com::sun::star::uno::RuntimeException)
- {
- maImageListeners.remove( xConsumer );
- }
-
-
- void UnoControlRoadmapModel::startProduction( ) throw (::com::sun::star::uno::RuntimeException)
- {
- Sequence<Any> aArgs(1);
- aArgs.getArray()[0] = getPropertyValue( GetPropertyName( BASEPROPERTY_IMAGEURL ) );
- Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
- Reference< XImageProducer > xImageProducer( xMSF->createInstanceWithArguments( ::rtl::OUString::createFromAscii( "com.sun.star.awt.ImageProducer" ), aArgs ), UNO_QUERY );
- if ( xImageProducer.is() )
- {
- std::list< Reference< XImageConsumer > >::iterator aIter( maImageListeners.begin() );
- while ( aIter != maImageListeners.end() )
- {
- xImageProducer->addConsumer( *aIter );
- aIter++;
- }
- xImageProducer->startProduction();
- }
- }
-
-
-
-
// ===================================================================
// = UnoRoadmapControl
// ===================================================================
@@ -434,9 +380,6 @@ sal_Bool SAL_CALL UnoRoadmapControl::setModel(const Reference< XControlModel >&
{
- // remove the peer as image consumer from the model
- lcl_knitImageComponents( getModel(), getPeer(), false );
-
Reference< XContainer > xC( getModel(), UNO_QUERY );
if ( xC.is() )
xC->removeContainerListener( this );
@@ -447,9 +390,6 @@ sal_Bool SAL_CALL UnoRoadmapControl::setModel(const Reference< XControlModel >&
if ( xC.is() )
xC->addContainerListener( this );
- // add the peer as image consumer to the model
- lcl_knitImageComponents( getModel(), getPeer(), true );
-
return bReturn;
}
@@ -462,18 +402,6 @@ sal_Bool SAL_CALL UnoRoadmapControl::setModel(const Reference< XControlModel >&
- void SAL_CALL UnoRoadmapControl::createPeer( const Reference<XToolkit > & rxToolkit, const Reference< XWindowPeer > & rParentPeer ) throw(RuntimeException)
- {
- // remove the peer as image consumer from the model
- lcl_knitImageComponents( getModel(), getPeer(), false );
-
- UnoControl::createPeer( rxToolkit, rParentPeer );
-
- lcl_knitImageComponents( getModel(), getPeer(), true );
-
- }
-
-
void UnoRoadmapControl::dispose() throw(RuntimeException)
{
EventObject aEvt;
@@ -484,24 +412,6 @@ sal_Bool SAL_CALL UnoRoadmapControl::setModel(const Reference< XControlModel >&
-void UnoRoadmapControl::ImplSetPeerProperty( const ::rtl::OUString& rPropName, const Any& rVal )
-{
- sal_uInt16 nType = GetPropertyId( rPropName );
- if ( getPeer().is() && ( nType == BASEPROPERTY_IMAGEURL ) )
- {
- Reference < XImageProducer > xImgProd( getModel(), UNO_QUERY );
- Reference < XImageConsumer > xImgCons( getPeer(), UNO_QUERY );
-
- if ( xImgProd.is() && xImgCons.is() )
- {
- xImgProd->startProduction();
- }
- }
- else
- UnoControlBase::ImplSetPeerProperty( rPropName, rVal );
-}
-
-
void UnoRoadmapControl::elementInserted( const ContainerEvent& rEvent )throw(RuntimeException)
{
Reference< XInterface > xRoadmapItem;
diff --git a/toolkit/source/controls/tree/treecontrol.cxx b/toolkit/source/controls/tree/treecontrol.cxx
index 8606792fdf2f..d56ca82bb845 100644
--- a/toolkit/source/controls/tree/treecontrol.cxx
+++ b/toolkit/source/controls/tree/treecontrol.cxx
@@ -76,6 +76,7 @@ UnoTreeModel::UnoTreeModel()
ImplRegisterProperty( BASEPROPERTY_TREE_SHOWSROOTHANDLES );
ImplRegisterProperty( BASEPROPERTY_TREE_ROWHEIGHT );
ImplRegisterProperty( BASEPROPERTY_TREE_INVOKESSTOPNODEEDITING );
+ ImplRegisterProperty( BASEPROPERTY_HIDEINACTIVESELECTION );
}
UnoTreeModel::UnoTreeModel( const UnoTreeModel& rModel )
diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx
index d91077823495..075080906900 100644
--- a/toolkit/source/controls/unocontrol.cxx
+++ b/toolkit/source/controls/unocontrol.cxx
@@ -653,7 +653,7 @@ void UnoControl::ImplModelPropertiesChanged( const Sequence< PropertyChangeEvent
// #82300# - 2000-12-21 - fs@openoffice.org
if (bNeedNewPeer && xParent.is())
{
- NAMESPACE_VOS(OGuard) aVclGuard( Application::GetSolarMutex() );
+ vos::OGuard aVclGuard( Application::GetSolarMutex() );
// and now this is the final withdrawal:
// With 83561, I have no other idea than locking the SolarMutex here ....
// I really hate the fact that VCL is not theadsafe ....
@@ -1463,7 +1463,7 @@ sal_Bool UnoControl::supportsService( const ::rtl::OUString& rServiceName ) thro
Sequence< ::rtl::OUString > aSNL = getSupportedServiceNames();
const ::rtl::OUString* pArray = aSNL.getConstArray();
- const ::rtl::OUString* pArrayEnd = aSNL.getConstArray();
+ const ::rtl::OUString* pArrayEnd = aSNL.getConstArray() + aSNL.getLength();
for (; pArray != pArrayEnd; ++pArray )
if( *pArray == rServiceName )
break;
@@ -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;
+}
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index cfb71111e3dc..d0961188d06c 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -80,31 +80,17 @@ using ::com::sun::star::graphic::XGraphic;
using ::com::sun::star::uno::Reference;
using namespace ::toolkit;
+#define IMPL_SERVICEINFO_DERIVED( ImplName, BaseClass, ServiceName ) \
+ ::rtl::OUString SAL_CALL ImplName::getImplementationName( ) throw(::com::sun::star::uno::RuntimeException) { return ::rtl::OUString::createFromAscii( "stardiv.Toolkit." #ImplName ); } \
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL ImplName::getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException) \
+ { \
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > aNames = BaseClass::getSupportedServiceNames( ); \
+ aNames.realloc( aNames.getLength() + 1 ); \
+ aNames[ aNames.getLength() - 1 ] = ::rtl::OUString::createFromAscii( ServiceName ); \
+ return aNames; \
+ } \
-// ----------------------------------------------------
-// helper
-// ----------------------------------------------------
-static void lcl_knitImageComponents( const uno::Reference< awt::XControlModel >& _rxModel,
- const uno::Reference< awt::XWindowPeer >& _rxPeer,
- bool _bAdd )
-{
- uno::Reference< awt::XImageProducer > xProducer( _rxModel, uno::UNO_QUERY );
- if ( xProducer.is() )
- {
- uno::Reference< awt::XImageConsumer > xConsumer( _rxPeer, uno::UNO_QUERY );
- if ( xConsumer.is() )
- {
- if ( _bAdd )
- {
- xProducer->addConsumer( xConsumer );
- xProducer->startProduction();
- }
- else
- xProducer->removeConsumer( xConsumer );
- }
- }
-}
// ----------------------------------------------------
// class UnoControlEditModel
@@ -543,37 +529,16 @@ UnoFileControl::UnoFileControl()
}
// ----------------------------------------------------
-// class ImageProducerControlModel
+// class GraphicControlModel
// ----------------------------------------------------
-uno::Any SAL_CALL ImageProducerControlModel::queryInterface( const uno::Type & rType ) throw(uno::RuntimeException)
-{
- return UnoControlModel::queryInterface( rType );
-}
-
-uno::Any SAL_CALL ImageProducerControlModel::queryAggregation( const uno::Type & rType ) throw(uno::RuntimeException)
-{
- uno::Any aRet = ::cppu::queryInterface( rType, SAL_STATIC_CAST( awt::XImageProducer*, this ) );
- return (aRet.hasValue() ? aRet : UnoControlModel::queryAggregation( rType ));
-}
-
-void SAL_CALL ImageProducerControlModel::acquire() throw()
-{
- UnoControlModel::acquire();
-}
-
-void SAL_CALL ImageProducerControlModel::release() throw()
-{
- UnoControlModel::release();
-}
-
-uno::Any ImageProducerControlModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
+uno::Any GraphicControlModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
{
if ( nPropId == BASEPROPERTY_GRAPHIC )
return uno::makeAny( uno::Reference< graphic::XGraphic >() );
return UnoControlModel::ImplGetDefaultValue( nPropId );
}
- uno::Reference< graphic::XGraphic > ImageProducerControlModel::getGraphicFromURL_nothrow( const ::rtl::OUString& _rURL )
+ uno::Reference< graphic::XGraphic > GraphicControlModel::getGraphicFromURL_nothrow( const ::rtl::OUString& _rURL )
{
uno::Reference< graphic::XGraphic > xGraphic;
@@ -611,7 +576,7 @@ uno::Any ImageProducerControlModel::ImplGetDefaultValue( sal_uInt16 nPropId ) co
return xGraphic;
}
-void SAL_CALL ImageProducerControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception)
+void SAL_CALL GraphicControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception)
{
UnoControlModel::setFastPropertyValue_NoBroadcast( nHandle, rValue );
@@ -665,90 +630,11 @@ void SAL_CALL ImageProducerControlModel::setFastPropertyValue_NoBroadcast( sal_I
}
catch( const ::com::sun::star::uno::Exception& )
{
- OSL_ENSURE( sal_False, "ImageProducerControlModel::setFastPropertyValue_NoBroadcast: caught an exception while aligning the ImagePosition/ImageAlign properties!" );
+ OSL_ENSURE( sal_False, "GraphicControlModel::setFastPropertyValue_NoBroadcast: caught an exception while aligning the ImagePosition/ImageAlign properties!" );
mbAdjustingImagePosition = sal_False;
}
}
-void ImageProducerControlModel::addConsumer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer >& xConsumer ) throw (::com::sun::star::uno::RuntimeException)
-{
- maListeners.push_back( xConsumer );
-}
-
-void ImageProducerControlModel::removeConsumer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer >& xConsumer ) throw (::com::sun::star::uno::RuntimeException)
-{
- maListeners.remove( xConsumer );
-}
-
-void ImageProducerControlModel::startProduction( ) throw (::com::sun::star::uno::RuntimeException)
-{
- uno::Sequence<uno::Any> aArgs(1);
- aArgs.getArray()[0] = getPropertyValue( GetPropertyName( BASEPROPERTY_IMAGEURL ) );
- uno::Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
- uno::Reference< awt::XImageProducer > xImageProducer( xMSF->createInstanceWithArguments( ::rtl::OUString::createFromAscii( "com.sun.star.awt.ImageProducer" ), aArgs ), uno::UNO_QUERY );
- if ( xImageProducer.is() )
- {
- std::list< uno::Reference< awt::XImageConsumer > >::iterator aIter( maListeners.begin() );
- while ( aIter != maListeners.end() )
- {
- xImageProducer->addConsumer( *aIter );
- aIter++;
- }
- xImageProducer->startProduction();
- }
-}
-
-// ----------------------------------------------------
-// class ImageConsumerControl
-// ----------------------------------------------------
-
-sal_Bool SAL_CALL ImageConsumerControl::setModel(const uno::Reference< awt::XControlModel >& _rModel) throw ( uno::RuntimeException )
-{
- // remove the peer as image consumer from the model
- lcl_knitImageComponents( getModel(), getPeer(), false );
-
- sal_Bool bReturn = UnoControlBase::setModel( _rModel );
-
- // add the peer as image consumer to the model
- lcl_knitImageComponents( getModel(), getPeer(), true );
-
- return bReturn;
-}
-
-void SAL_CALL ImageConsumerControl::createPeer( const uno::Reference< awt::XToolkit >& rxToolkit, const uno::Reference< awt::XWindowPeer >& rParentPeer ) throw(uno::RuntimeException)
-{
- // remove the peer as image consumer from the model
- lcl_knitImageComponents( getModel(), getPeer(), false );
-
- UnoControlBase::createPeer( rxToolkit, rParentPeer );
-
- // add the peer as image consumer to the model
- lcl_knitImageComponents( getModel(), getPeer(), true );
-}
-
-void SAL_CALL ImageConsumerControl::dispose( ) throw(::com::sun::star::uno::RuntimeException)
-{
- // remove the peer as image consumer from the model
- lcl_knitImageComponents( getModel(), getPeer(), false );
-
- UnoControlBase::dispose();
-}
-
-void ImageConsumerControl::ImplSetPeerProperty( const ::rtl::OUString& rPropName, const uno::Any& rVal )
-{
- sal_uInt16 nType = GetPropertyId( rPropName );
- if ( nType == BASEPROPERTY_IMAGEURL )
- {
- uno::Reference < awt::XImageProducer > xImgProd( getModel(), uno::UNO_QUERY );
- uno::Reference < awt::XImageConsumer > xImgCons( getPeer(), uno::UNO_QUERY );
-
- if ( xImgProd.is() && xImgCons.is() )
- xImgProd->startProduction();
- }
- else
- UnoControlBase::ImplSetPeerProperty( rPropName, rVal );
-}
-
// ----------------------------------------------------
// class UnoControlButtonModel
// ----------------------------------------------------
@@ -784,7 +670,7 @@ uno::Any UnoControlButtonModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
return uno::makeAny( (sal_Bool)sal_True );
}
- return ImageProducerControlModel::ImplGetDefaultValue( nPropId );
+ return GraphicControlModel::ImplGetDefaultValue( nPropId );
}
::cppu::IPropertyArrayHelper& UnoControlButtonModel::getInfoHelper()
@@ -847,12 +733,12 @@ void UnoButtonControl::dispose() throw(uno::RuntimeException)
aEvt.Source = (::cppu::OWeakObject*)this;
maActionListeners.disposeAndClear( aEvt );
maItemListeners.disposeAndClear( aEvt );
- ImageConsumerControl::dispose();
+ UnoControlBase::dispose();
}
void UnoButtonControl::createPeer( const uno::Reference< awt::XToolkit > & rxToolkit, const uno::Reference< awt::XWindowPeer > & rParentPeer ) throw(uno::RuntimeException)
{
- ImageConsumerControl::createPeer( rxToolkit, rParentPeer );
+ UnoControlBase::createPeer( rxToolkit, rParentPeer );
uno::Reference < awt::XButton > xButton( getPeer(), uno::UNO_QUERY );
xButton->setActionCommand( maActionCommand );
@@ -896,7 +782,7 @@ void UnoButtonControl::removeItemListener(const uno::Reference< awt::XItemListen
void SAL_CALL UnoButtonControl::disposing( const lang::EventObject& Source ) throw (uno::RuntimeException)
{
- ImageConsumerControl::disposing( Source );
+ UnoControlBase::disposing( Source );
}
void SAL_CALL UnoButtonControl::itemStateChanged( const awt::ItemEvent& rEvent ) throw (uno::RuntimeException)
@@ -966,7 +852,7 @@ uno::Any UnoControlImageControlModel::ImplGetDefaultValue( sal_uInt16 nPropId )
if ( nPropId == BASEPROPERTY_IMAGE_SCALE_MODE )
return makeAny( awt::ImageScaleMode::Anisotropic );
- return ImageProducerControlModel::ImplGetDefaultValue( nPropId );
+ return GraphicControlModel::ImplGetDefaultValue( nPropId );
}
::cppu::IPropertyArrayHelper& UnoControlImageControlModel::getInfoHelper()
@@ -989,7 +875,7 @@ uno::Reference< beans::XPropertySetInfo > UnoControlImageControlModel::getProper
void SAL_CALL UnoControlImageControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const ::com::sun::star::uno::Any& _rValue ) throw (::com::sun::star::uno::Exception)
{
- ImageProducerControlModel::setFastPropertyValue_NoBroadcast( _nHandle, _rValue );
+ GraphicControlModel::setFastPropertyValue_NoBroadcast( _nHandle, _rValue );
// ScaleImage is an older (and less powerful) version of ScaleMode, but keep both in sync as far as possible
try
@@ -1093,7 +979,7 @@ uno::Any UnoControlRadioButtonModel::ImplGetDefaultValue( sal_uInt16 nPropId ) c
return uno::makeAny( (sal_Int16)awt::VisualEffect::LOOK3D );
}
- return ImageProducerControlModel::ImplGetDefaultValue( nPropId );
+ return GraphicControlModel::ImplGetDefaultValue( nPropId );
}
::cppu::IPropertyArrayHelper& UnoControlRadioButtonModel::getInfoHelper()
@@ -1136,7 +1022,7 @@ void UnoRadioButtonControl::dispose() throw(uno::RuntimeException)
lang::EventObject aEvt;
aEvt.Source = (::cppu::OWeakObject*)this;
maItemListeners.disposeAndClear( aEvt );
- ImageConsumerControl::dispose();
+ UnoControlBase::dispose();
}
@@ -1147,7 +1033,7 @@ sal_Bool UnoRadioButtonControl::isTransparent() throw(uno::RuntimeException)
void UnoRadioButtonControl::createPeer( const uno::Reference< awt::XToolkit > & rxToolkit, const uno::Reference< awt::XWindowPeer > & rParentPeer ) throw(uno::RuntimeException)
{
- ImageConsumerControl::createPeer( rxToolkit, rParentPeer );
+ UnoControlBase::createPeer( rxToolkit, rParentPeer );
uno::Reference < awt::XRadioButton > xRadioButton( getPeer(), uno::UNO_QUERY );
xRadioButton->addItemListener( this );
@@ -1300,7 +1186,7 @@ uno::Any UnoControlCheckBoxModel::ImplGetDefaultValue( sal_uInt16 nPropId ) cons
return uno::makeAny( (sal_Int16)awt::VisualEffect::LOOK3D );
}
- return ImageProducerControlModel::ImplGetDefaultValue( nPropId );
+ return GraphicControlModel::ImplGetDefaultValue( nPropId );
}
::cppu::IPropertyArrayHelper& UnoControlCheckBoxModel::getInfoHelper()
@@ -1343,7 +1229,7 @@ void UnoCheckBoxControl::dispose() throw(uno::RuntimeException)
lang::EventObject aEvt;
aEvt.Source = (::cppu::OWeakObject*)this;
maItemListeners.disposeAndClear( aEvt );
- ImageConsumerControl::dispose();
+ UnoControlBase::dispose();
}
sal_Bool UnoCheckBoxControl::isTransparent() throw(uno::RuntimeException)
@@ -1353,7 +1239,7 @@ sal_Bool UnoCheckBoxControl::isTransparent() throw(uno::RuntimeException)
void UnoCheckBoxControl::createPeer( const uno::Reference< awt::XToolkit > & rxToolkit, const uno::Reference< awt::XWindowPeer > & rParentPeer ) throw(uno::RuntimeException)
{
- ImageConsumerControl::createPeer( rxToolkit, rParentPeer );
+ UnoControlBase::createPeer( rxToolkit, rParentPeer );
uno::Reference < awt::XCheckBox > xCheckBox( getPeer(), uno::UNO_QUERY );
xCheckBox->addItemListener( this );
@@ -1952,6 +1838,13 @@ UnoControlListBoxModel::UnoControlListBoxModel()
{
UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXListBox );
}
+// ---------------------------------------------------------------------------------------------------------------------
+UnoControlListBoxModel::UnoControlListBoxModel(bool)
+ :UnoControlListBoxModel_Base()
+ ,m_pData( new UnoControlListBoxModel_Data( *this ) )
+ ,m_aItemListListeners( GetMutex() )
+{
+}
// ---------------------------------------------------------------------------------------------------------------------
UnoControlListBoxModel::UnoControlListBoxModel( const UnoControlListBoxModel& i_rSource )
@@ -1960,13 +1853,15 @@ UnoControlListBoxModel::UnoControlListBoxModel( const UnoControlListBoxModel& i_
,m_aItemListListeners( GetMutex() )
{
}
-
+UnoControlListBoxModel::~UnoControlListBoxModel()
+{
+}
+IMPL_SERVICEINFO_DERIVED( UnoControlListBoxModel, UnoControlModel, szServiceName2_UnoControlListBoxModel )
// ---------------------------------------------------------------------------------------------------------------------
::rtl::OUString UnoControlListBoxModel::getServiceName() throw(::com::sun::star::uno::RuntimeException)
{
return ::rtl::OUString::createFromAscii( szServiceName_UnoControlListBoxModel );
}
-
// ---------------------------------------------------------------------------------------------------------------------
uno::Any UnoControlListBoxModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
{
@@ -2394,6 +2289,7 @@ UnoListBoxControl::UnoListBoxControl()
{
return ::rtl::OUString::createFromAscii( "listbox" );
}
+IMPL_SERVICEINFO_DERIVED( UnoListBoxControl, UnoControlBase, szServiceName2_UnoControlListBox )
void UnoListBoxControl::dispose() throw(uno::RuntimeException)
{
@@ -2800,32 +2696,30 @@ void SAL_CALL UnoListBoxControl::itemListChanged( const lang::EventObject& i_rEv
if ( xPeerListener.is() )
xPeerListener->itemListChanged( i_rEvent );
}
-
+ActionListenerMultiplexer& UnoListBoxControl::getActionListeners()
+{
+ return maActionListeners;
+}
+ItemListenerMultiplexer& UnoListBoxControl::getItemListeners()
+{
+ return maItemListeners;
+}
// ----------------------------------------------------
// class UnoControlComboBoxModel
// ----------------------------------------------------
-UnoControlComboBoxModel::UnoControlComboBoxModel()
+UnoControlComboBoxModel::UnoControlComboBoxModel() : UnoControlListBoxModel(true)
{
UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXComboBox );
}
-::rtl::OUString UnoControlComboBoxModel::getServiceName() throw(::com::sun::star::uno::RuntimeException)
-{
- return ::rtl::OUString::createFromAscii( szServiceName_UnoControlComboBoxModel );
-}
+IMPL_SERVICEINFO_DERIVED( UnoControlComboBoxModel, UnoControlModel, szServiceName2_UnoControlComboBoxModel )
-uno::Any UnoControlComboBoxModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
+uno::Reference< beans::XPropertySetInfo > UnoControlComboBoxModel::getPropertySetInfo( ) throw(uno::RuntimeException)
{
- if ( nPropId == BASEPROPERTY_DEFAULTCONTROL )
- {
- uno::Any aAny;
- aAny <<= ::rtl::OUString::createFromAscii( szServiceName_UnoControlComboBox );
- return aAny;
- }
- return UnoControlModel::ImplGetDefaultValue( nPropId );
+ static uno::Reference< beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
+ return xInfo;
}
-
-
+// ---------------------------------------------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& UnoControlComboBoxModel::getInfoHelper()
{
static UnoPropertyArrayHelper* pHelper = NULL;
@@ -2837,14 +2731,53 @@ uno::Any UnoControlComboBoxModel::ImplGetDefaultValue( sal_uInt16 nPropId ) cons
return *pHelper;
}
-// beans::XMultiPropertySet
-uno::Reference< beans::XPropertySetInfo > UnoControlComboBoxModel::getPropertySetInfo( ) throw(uno::RuntimeException)
+
+::rtl::OUString UnoControlComboBoxModel::getServiceName() throw(::com::sun::star::uno::RuntimeException)
{
- static uno::Reference< beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
- return xInfo;
+ return ::rtl::OUString::createFromAscii( szServiceName_UnoControlComboBoxModel );
}
+void SAL_CALL UnoControlComboBoxModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const uno::Any& rValue ) throw (uno::Exception)
+{
+ UnoControlModel::setFastPropertyValue_NoBroadcast( nHandle, rValue );
+ if ( nHandle == BASEPROPERTY_STRINGITEMLIST && !m_pData->m_bSettingLegacyProperty)
+ {
+ // synchronize the legacy StringItemList property with our list items
+ Sequence< ::rtl::OUString > aStringItemList;
+ Any aPropValue;
+ getFastPropertyValue( aPropValue, BASEPROPERTY_STRINGITEMLIST );
+ OSL_VERIFY( aPropValue >>= aStringItemList );
+
+ ::std::vector< ListItem > aItems( aStringItemList.getLength() );
+ ::std::transform(
+ aStringItemList.getConstArray(),
+ aStringItemList.getConstArray() + aStringItemList.getLength(),
+ aItems.begin(),
+ CreateListItem()
+ );
+ m_pData->setAllItems( aItems );
+
+ // since an XItemListListener does not have a "all items modified" or some such method,
+ // we simulate this by notifying removal of all items, followed by insertion of all new
+ // items
+ lang::EventObject aEvent;
+ aEvent.Source = *this;
+ m_aItemListListeners.notifyEach( &XItemListListener::itemListChanged, aEvent );
+ // TODO: OPropertySetHelper calls into this method with the mutex locked ...
+ // which is wrong for the above notifications ...
+ }
+}
+uno::Any UnoControlComboBoxModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
+{
+ if ( nPropId == BASEPROPERTY_DEFAULTCONTROL )
+ {
+ uno::Any aAny;
+ aAny <<= ::rtl::OUString::createFromAscii( szServiceName_UnoControlComboBox );
+ return aAny;
+ }
+ return UnoControlModel::ImplGetDefaultValue( nPropId );
+}
// ----------------------------------------------------
// class UnoComboBoxControl
@@ -2856,35 +2789,65 @@ UnoComboBoxControl::UnoComboBoxControl()
maComponentInfos.nWidth = 100;
maComponentInfos.nHeight = 12;
}
+IMPL_SERVICEINFO_DERIVED( UnoComboBoxControl, UnoEditControl, szServiceName2_UnoControlComboBox )
::rtl::OUString UnoComboBoxControl::GetComponentServiceName()
{
return ::rtl::OUString::createFromAscii( "combobox" );
}
-// uno::XInterface
+void UnoComboBoxControl::dispose() throw(uno::RuntimeException)
+{
+ lang::EventObject aEvt;
+ aEvt.Source = (::cppu::OWeakObject*)this;
+ maActionListeners.disposeAndClear( aEvt );
+ maItemListeners.disposeAndClear( aEvt );
+ UnoControl::dispose();
+}
uno::Any UnoComboBoxControl::queryAggregation( const uno::Type & rType ) throw(uno::RuntimeException)
{
uno::Any aRet = ::cppu::queryInterface( rType,
SAL_STATIC_CAST( awt::XComboBox*, this ) );
+ if ( !aRet.hasValue() )
+ {
+ aRet = ::cppu::queryInterface( rType,
+ SAL_STATIC_CAST( awt::XItemListener*, this ) );
+ if ( !aRet.hasValue() )
+ {
+ aRet = ::cppu::queryInterface( rType,
+ SAL_STATIC_CAST( awt::XItemListListener*, this ) );
+ }
+ }
return (aRet.hasValue() ? aRet : UnoEditControl::queryAggregation( rType ));
}
-
// lang::XTypeProvider
IMPL_XTYPEPROVIDER_START( UnoComboBoxControl )
getCppuType( ( uno::Reference< awt::XComboBox>* ) NULL ),
+ getCppuType( ( uno::Reference< awt::XItemListener>* ) NULL ),
+ getCppuType( ( uno::Reference< awt::XItemListListener>* ) NULL ),
UnoEditControl::getTypes()
IMPL_XTYPEPROVIDER_END
-void UnoComboBoxControl::dispose() throw(uno::RuntimeException)
+void UnoComboBoxControl::updateFromModel()
{
- lang::EventObject aEvt;
- aEvt.Source = (::cppu::OWeakObject*)this;
- maActionListeners.disposeAndClear( aEvt );
- maItemListeners.disposeAndClear( aEvt );
- UnoControl::dispose();
+ UnoEditControl::updateFromModel();
+
+ Reference< XItemListListener > xItemListListener( getPeer(), UNO_QUERY );
+ ENSURE_OR_RETURN_VOID( xItemListListener.is(), "UnoComboBoxControl::updateFromModel: a peer which is no ItemListListener?!" );
+
+ EventObject aEvent( getModel() );
+ xItemListListener->itemListChanged( aEvent );
}
+void UnoComboBoxControl::ImplSetPeerProperty( const ::rtl::OUString& rPropName, const uno::Any& rVal )
+{
+ if ( rPropName == GetPropertyName( BASEPROPERTY_STRINGITEMLIST ) )
+ // do not forward this to our peer. We are a XItemListListener at our model, and changes in the string item
+ // list (which is a legacy property) will, later, arrive as changes in the ItemList. Those latter changes
+ // will be forwarded to the peer, which will update itself accordingly.
+ return;
+ UnoEditControl::ImplSetPeerProperty( rPropName, rVal );
+}
void UnoComboBoxControl::createPeer( const uno::Reference< awt::XToolkit > & rxToolkit, const uno::Reference< awt::XWindowPeer > & rParentPeer ) throw(uno::RuntimeException)
{
UnoEditControl::createPeer( rxToolkit, rParentPeer );
@@ -2935,6 +2898,93 @@ void UnoComboBoxControl::removeItemListener(const uno::Reference < awt::XItemLis
}
maItemListeners.removeInterface( l );
}
+void UnoComboBoxControl::itemStateChanged( const awt::ItemEvent& rEvent ) throw(uno::RuntimeException)
+{
+ if ( maItemListeners.getLength() )
+ {
+ try
+ {
+ maItemListeners.itemStateChanged( rEvent );
+ }
+ catch( const Exception& e )
+ {
+#if OSL_DEBUG_LEVEL == 0
+ (void) e; // suppress warning
+#else
+ ::rtl::OString sMessage( "UnoComboBoxControl::itemStateChanged: caught an exception:\n" );
+ sMessage += ::rtl::OString( e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_ASCII_US );
+ OSL_ENSURE( sal_False, sMessage.getStr() );
+#endif
+ }
+ }
+}
+sal_Bool SAL_CALL UnoComboBoxControl::setModel( const uno::Reference< awt::XControlModel >& i_rModel ) throw ( uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( GetMutex() );
+
+ const Reference< XItemList > xOldItems( getModel(), UNO_QUERY );
+ OSL_ENSURE( xOldItems.is() || !getModel().is(), "UnoComboBoxControl::setModel: illegal old model!" );
+ const Reference< XItemList > xNewItems( i_rModel, UNO_QUERY );
+ OSL_ENSURE( xNewItems.is() || !i_rModel.is(), "UnoComboBoxControl::setModel: illegal new model!" );
+
+ if ( !UnoEditControl::setModel( i_rModel ) )
+ return sal_False;
+
+ if ( xOldItems.is() )
+ xOldItems->removeItemListListener( this );
+ if ( xNewItems.is() )
+ xNewItems->addItemListListener( this );
+
+ return sal_True;
+}
+
+void SAL_CALL UnoComboBoxControl::listItemInserted( const awt::ItemListEvent& i_rEvent ) throw (uno::RuntimeException)
+{
+ const Reference< XItemListListener > xPeerListener( getPeer(), UNO_QUERY );
+ OSL_ENSURE( xPeerListener.is() || !getPeer().is(), "UnoComboBoxControl::listItemInserted: invalid peer!" );
+ if ( xPeerListener.is() )
+ xPeerListener->listItemInserted( i_rEvent );
+}
+
+void SAL_CALL UnoComboBoxControl::listItemRemoved( const awt::ItemListEvent& i_rEvent ) throw (uno::RuntimeException)
+{
+ const Reference< XItemListListener > xPeerListener( getPeer(), UNO_QUERY );
+ OSL_ENSURE( xPeerListener.is() || !getPeer().is(), "UnoComboBoxControl::listItemRemoved: invalid peer!" );
+ if ( xPeerListener.is() )
+ xPeerListener->listItemRemoved( i_rEvent );
+}
+
+void SAL_CALL UnoComboBoxControl::listItemModified( const awt::ItemListEvent& i_rEvent ) throw (uno::RuntimeException)
+{
+ const Reference< XItemListListener > xPeerListener( getPeer(), UNO_QUERY );
+ OSL_ENSURE( xPeerListener.is() || !getPeer().is(), "UnoComboBoxControl::listItemModified: invalid peer!" );
+ if ( xPeerListener.is() )
+ xPeerListener->listItemModified( i_rEvent );
+}
+
+void SAL_CALL UnoComboBoxControl::allItemsRemoved( const lang::EventObject& i_rEvent ) throw (uno::RuntimeException)
+{
+ const Reference< XItemListListener > xPeerListener( getPeer(), UNO_QUERY );
+ OSL_ENSURE( xPeerListener.is() || !getPeer().is(), "UnoComboBoxControl::allItemsRemoved: invalid peer!" );
+ if ( xPeerListener.is() )
+ xPeerListener->allItemsRemoved( i_rEvent );
+}
+
+void SAL_CALL UnoComboBoxControl::itemListChanged( const lang::EventObject& i_rEvent ) throw (uno::RuntimeException)
+{
+ const Reference< XItemListListener > xPeerListener( getPeer(), UNO_QUERY );
+ OSL_ENSURE( xPeerListener.is() || !getPeer().is(), "UnoComboBoxControl::itemListChanged: invalid peer!" );
+ if ( xPeerListener.is() )
+ xPeerListener->itemListChanged( i_rEvent );
+}
+ActionListenerMultiplexer& UnoComboBoxControl::getActionListeners()
+{
+ return maActionListeners;
+}
+ItemListenerMultiplexer& UnoComboBoxControl::getItemListeners()
+{
+ return maItemListeners;
+}
void UnoComboBoxControl::addItem( const ::rtl::OUString& aItem, sal_Int16 nPos ) throw(uno::RuntimeException)
{
diff --git a/toolkit/source/helper/registerservices.cxx b/toolkit/source/helper/registerservices.cxx
index aedf4024f2b9..477032538af8 100644
--- a/toolkit/source/helper/registerservices.cxx
+++ b/toolkit/source/helper/registerservices.cxx
@@ -205,10 +205,8 @@ extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL
extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL DefaultGridColumnModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL GridColumn_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
-extern sal_Bool SAL_CALL comp_AsyncCallback_component_writeInfo( void * serviceManager, void * registryKey );
extern void * SAL_CALL comp_AsyncCallback_component_getFactory( const char * implName, void * serviceManager, void * registryKey );
-extern sal_Bool SAL_CALL comp_Layout_component_writeInfo( void * serviceManager, void * registryKey );
extern void * SAL_CALL comp_Layout_component_getFactory( const char * implName, void * serviceManager, void * registryKey );
extern "C"
@@ -219,91 +217,6 @@ TOOLKIT_DLLPUBLIC void SAL_CALL component_getImplementationEnvironment( const sa
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-TOOLKIT_DLLPUBLIC sal_Bool SAL_CALL component_writeInfo( void* _pServiceManager, void* _pRegistryKey )
-{
- if (_pRegistryKey)
- {
- ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > xRegistryKey =
- static_cast< ::com::sun::star::registry::XRegistryKey* >( _pRegistryKey );
-
- registerServices( xRegistryKey, "VCLXToolkit", szServiceName_Toolkit, szServiceName2_Toolkit );
- registerServices( xRegistryKey, "VCLXPopupMenu", szServiceName_PopupMenu, szServiceName2_PopupMenu );
- registerServices( xRegistryKey, "VCLXMenuBar", szServiceName_MenuBar, szServiceName2_MenuBar );
- registerServices( xRegistryKey, "VCLXPointer", szServiceName_Pointer, szServiceName2_Pointer );
- registerServices( xRegistryKey, "UnoControlContainer", szServiceName_UnoControlContainer, szServiceName2_UnoControlContainer );
- registerServices( xRegistryKey, "UnoControlContainerModel", szServiceName_UnoControlContainerModel, szServiceName2_UnoControlContainerModel );
- registerServices( xRegistryKey, "StdTabController", szServiceName_TabController, szServiceName2_TabController );
- registerServices( xRegistryKey, "StdTabControllerModel", szServiceName_TabControllerModel, szServiceName2_TabControllerModel );
- registerServices( xRegistryKey, "UnoDialogControl", szServiceName_UnoControlDialog, szServiceName2_UnoControlDialog );
- registerServices( xRegistryKey, "UnoControlDialogModel", szServiceName_UnoControlDialogModel, szServiceName2_UnoControlDialogModel );
- registerServices( xRegistryKey, "UnoEditControl", szServiceName_UnoControlEdit, szServiceName2_UnoControlEdit );
- registerServices( xRegistryKey, "UnoControlEditModel", szServiceName_UnoControlEditModel, szServiceName2_UnoControlEditModel );
- registerServices( xRegistryKey, "UnoDateFieldControl", szServiceName_UnoControlDateField, szServiceName2_UnoControlDateField );
- registerServices( xRegistryKey, "UnoControlDateFieldModel", szServiceName_UnoControlDateFieldModel, szServiceName2_UnoControlDateFieldModel );
- registerServices( xRegistryKey, "UnoTimeFieldControl", szServiceName_UnoControlTimeField, szServiceName2_UnoControlTimeField );
- registerServices( xRegistryKey, "UnoControlTimeFieldModel", szServiceName_UnoControlTimeFieldModel, szServiceName2_UnoControlTimeFieldModel );
- registerServices( xRegistryKey, "UnoNumericFieldControl", szServiceName_UnoControlNumericField, szServiceName2_UnoControlNumericField );
- registerServices( xRegistryKey, "UnoControlNumericFieldModel", szServiceName_UnoControlNumericFieldModel, szServiceName2_UnoControlNumericFieldModel );
- registerServices( xRegistryKey, "UnoCurrencyFieldControl", szServiceName_UnoControlCurrencyField, szServiceName2_UnoControlCurrencyField );
- registerServices( xRegistryKey, "UnoControlCurrencyFieldModel", szServiceName_UnoControlCurrencyFieldModel, szServiceName2_UnoControlCurrencyFieldModel );
- registerServices( xRegistryKey, "UnoPatternFieldControl", szServiceName_UnoControlPatternField, szServiceName2_UnoControlPatternField );
- registerServices( xRegistryKey, "UnoControlPatternFieldModel", szServiceName_UnoControlPatternFieldModel, szServiceName2_UnoControlPatternFieldModel );
- registerServices( xRegistryKey, "UnoFormattedFieldControl", szServiceName_UnoControlFormattedField, szServiceName2_UnoControlFormattedField );
- registerServices( xRegistryKey, "UnoControlFormattedFieldModel", szServiceName_UnoControlFormattedFieldModel, szServiceName2_UnoControlFormattedFieldModel );
- registerServices( xRegistryKey, "UnoFileControl", szServiceName_UnoControlFileControl, szServiceName2_UnoControlFileControl );
- registerServices( xRegistryKey, "UnoControlFileControlModel", szServiceName_UnoControlFileControlModel, szServiceName2_UnoControlFileControlModel );
- registerServices( xRegistryKey, "UnoButtonControl", szServiceName_UnoControlButton, szServiceName2_UnoControlButton );
- registerServices( xRegistryKey, "UnoControlButtonModel", szServiceName_UnoControlButtonModel, szServiceName2_UnoControlButtonModel );
- registerServices( xRegistryKey, "UnoImageControlControl", szServiceName_UnoControlImageButton, szServiceName2_UnoControlImageButton );
- registerServices( xRegistryKey, "UnoControlImageControlModel", szServiceName_UnoControlImageButtonModel, szServiceName2_UnoControlImageButtonModel );
- registerServices( xRegistryKey, "UnoImageControlControl", szServiceName_UnoControlImageControl, szServiceName2_UnoControlImageControl );
- registerServices( xRegistryKey, "UnoControlImageControlModel", szServiceName_UnoControlImageControlModel, szServiceName2_UnoControlImageControlModel );
- registerServices( xRegistryKey, "UnoRadioButtonControl", szServiceName_UnoControlRadioButton, szServiceName2_UnoControlRadioButton );
- registerServices( xRegistryKey, "UnoControlRadioButtonModel", szServiceName_UnoControlRadioButtonModel, szServiceName2_UnoControlRadioButtonModel );
- registerServices( xRegistryKey, "UnoCheckBoxControl", szServiceName_UnoControlCheckBox, szServiceName2_UnoControlCheckBox );
- registerServices( xRegistryKey, "UnoControlCheckBoxModel", szServiceName_UnoControlCheckBoxModel, szServiceName2_UnoControlCheckBoxModel );
- registerServices( xRegistryKey, "UnoListBoxControl", szServiceName_UnoControlListBox, szServiceName2_UnoControlListBox );
- registerServices( xRegistryKey, "UnoControlListBoxModel", szServiceName_UnoControlListBoxModel, szServiceName2_UnoControlListBoxModel );
- registerServices( xRegistryKey, "UnoComboBoxControl", szServiceName_UnoControlComboBox, szServiceName2_UnoControlComboBox );
- registerServices( xRegistryKey, "UnoControlComboBoxModel", szServiceName_UnoControlComboBoxModel, szServiceName2_UnoControlComboBoxModel );
- registerServices( xRegistryKey, "UnoFixedTextControl", szServiceName_UnoControlFixedText, szServiceName2_UnoControlFixedText );
- registerServices( xRegistryKey, "UnoControlFixedTextModel", szServiceName_UnoControlFixedTextModel, szServiceName2_UnoControlFixedTextModel );
- registerServices( xRegistryKey, "UnoGroupBoxControl", szServiceName_UnoControlGroupBox, szServiceName2_UnoControlGroupBox );
- registerServices( xRegistryKey, "UnoControlGroupBoxModel", szServiceName_UnoControlGroupBoxModel, szServiceName2_UnoControlGroupBoxModel );
- registerServices( xRegistryKey, "UnoProgressBarControl", szServiceName_UnoControlProgressBar, szServiceName2_UnoControlProgressBar );
- registerServices( xRegistryKey, "UnoControlProgressBarModel", szServiceName_UnoControlProgressBarModel, szServiceName2_UnoControlProgressBarModel );
- registerServices( xRegistryKey, "UnoScrollBarControl", szServiceName_UnoControlScrollBar, szServiceName2_UnoControlScrollBar );
- registerServices( xRegistryKey, "UnoControlScrollBarModel", szServiceName_UnoControlScrollBarModel, szServiceName2_UnoControlScrollBarModel );
- registerServices( xRegistryKey, "UnoSpinButtonModel", szServiceName_UnoSpinButtonModel );
- registerServices( xRegistryKey, "UnoSpinButtonControl", szServiceName_UnoSpinButtonControl );
- registerServices( xRegistryKey, "UnoFixedLineControl", szServiceName_UnoControlFixedLine, szServiceName2_UnoControlFixedLine );
- registerServices( xRegistryKey, "UnoControlFixedLineModel", szServiceName_UnoControlFixedLineModel, szServiceName2_UnoControlFixedLineModel );
- registerServices( xRegistryKey, "VCLXPrinterServer", szServiceName_PrinterServer, szServiceName2_PrinterServer );
- registerServices( xRegistryKey, "UnoRoadmapControl", szServiceName_UnoControlRoadmap, szServiceName2_UnoControlRoadmap );
- registerServices( xRegistryKey, "UnoControlRoadmapModel", szServiceName_UnoControlRoadmapModel, szServiceName2_UnoControlRoadmapModel );
- registerServices( xRegistryKey, "TreeControl", szServiceName_TreeControl );
- registerServices( xRegistryKey, "TreeControlModel", szServiceName_TreeControlModel );
- registerServices( xRegistryKey, "MutableTreeDataModel", szServiceName_MutableTreeDataModel );
- registerServices( xRegistryKey, "UnoSimpleAnimationControlModel", szServiceName_UnoSimpleAnimationControlModel, szServiceName2_UnoSimpleAnimationControlModel );
- registerServices( xRegistryKey, "UnoSimpleAnimationControl", szServiceName_UnoSimpleAnimationControl, szServiceName2_UnoSimpleAnimationControl );
- registerServices( xRegistryKey, "UnoThrobberControlModel", szServiceName_UnoThrobberControlModel, szServiceName2_UnoThrobberControlModel );
- registerServices( xRegistryKey, "UnoThrobberControl", szServiceName_UnoThrobberControl, szServiceName2_UnoThrobberControl );
- registerServices( xRegistryKey, "UnoFixedHyperlinkControl", szServiceName_UnoControlFixedHyperlink );
- registerServices( xRegistryKey, "UnoControlFixedHyperlinkModel", szServiceName_UnoControlFixedHyperlinkModel );
- registerServices( xRegistryKey, "GridControl", szServiceName_GridControl );
- registerServices( xRegistryKey, "GridControlModel", szServiceName_GridControlModel );
- registerServices( xRegistryKey, "DefaultGridDataModel", szServiceName_DefaultGridDataModel );
- registerServices( xRegistryKey, "DefaultGridColumnModel", szServiceName_DefaultGridColumnModel );
- registerServices( xRegistryKey, "GridColumn", szServiceName_GridColumn );
-
- comp_AsyncCallback_component_writeInfo( _pServiceManager, _pRegistryKey );
- comp_Layout_component_writeInfo( _pServiceManager, _pRegistryKey );
-
- return sal_True;
- }
- return sal_False;
-}
-
TOOLKIT_DLLPUBLIC void* SAL_CALL component_getFactory( const sal_Char* sImplementationName, void* _pServiceManager, void* _pRegistryKey )
{
void* pRet = NULL;
diff --git a/toolkit/source/helper/servicenames.cxx b/toolkit/source/helper/servicenames.cxx
index 6a376391f46d..f57f52f13e57 100644
--- a/toolkit/source/helper/servicenames.cxx
+++ b/toolkit/source/helper/servicenames.cxx
@@ -77,7 +77,6 @@ const sal_Char __FAR_DATA szServiceName_UnoControlPatternFieldModel[] = "stardiv
const sal_Char __FAR_DATA szServiceName_UnoControlFormattedField[] = "stardiv.vcl.control.FormattedField", szServiceName2_UnoControlFormattedField[] = "com.sun.star.awt.UnoControlFormattedField";
const sal_Char __FAR_DATA szServiceName_UnoControlFormattedFieldModel[] = "stardiv.vcl.controlmodel.FormattedField", szServiceName2_UnoControlFormattedFieldModel[] = "com.sun.star.awt.UnoControlFormattedFieldModel";
const sal_Char __FAR_DATA szServiceName_MVCIntrospection[] = "stardiv.vcl.MVCIntrospection", szServiceName2_MVCIntrospection[] = "com.sun.star.awt.MVCIntrospection";
-const sal_Char __FAR_DATA szServiceName_ImageProducer[] = "stardiv.vcl.ImageProducer", szServiceName2_ImageProducer[] = "com.sun.star.awt.ImageProducer";
const sal_Char __FAR_DATA szServiceName_PrinterServer[] = "stardiv.vcl.PrinterServer", szServiceName2_PrinterServer[] = "com.sun.star.awt.PrinterServer";
const sal_Char __FAR_DATA szServiceName_UnoControlProgressBar[] = "stardiv.vcl.control.ProgressBar", szServiceName2_UnoControlProgressBar[] = "com.sun.star.awt.UnoControlProgressBar";
const sal_Char __FAR_DATA szServiceName_UnoControlProgressBarModel[] = "stardiv.vcl.controlmodel.ProgressBar", szServiceName2_UnoControlProgressBarModel[] = "com.sun.star.awt.UnoControlProgressBarModel";
diff --git a/toolkit/source/helper/unowrapper.cxx b/toolkit/source/helper/unowrapper.cxx
index d7cec7c17354..c36ae29d4531 100644
--- a/toolkit/source/helper/unowrapper.cxx
+++ b/toolkit/source/helper/unowrapper.cxx
@@ -318,12 +318,17 @@ void UnoWrapper::WindowDestroyed( Window* pWindow )
Window* pTopWindowChild = pWindow->GetWindow( WINDOW_FIRSTTOPWINDOWCHILD );
while ( pTopWindowChild )
{
- OSL_ENSURE( pTopWindowChild->GetParent() == pWindow, "UnoWrapper::WindowDestroyed: inconsistency in the SystemWindow relationship!" );
+ OSL_ENSURE( pTopWindowChild->GetParent() == pWindow,
+ "UnoWrapper::WindowDestroyed: inconsistency in the SystemWindow relationship!" );
- uno::Reference< lang::XComponent > xComp( pTopWindowChild->GetComponentInterface( FALSE ), uno::UNO_QUERY );
- pTopWindowChild = pTopWindowChild->GetWindow( WINDOW_NEXTTOPWINDOWSIBLING );
- if ( xComp.is() )
- xComp->dispose();
+ Window* pNextTopChild = pTopWindowChild->GetWindow( WINDOW_NEXTTOPWINDOWSIBLING );
+
+ //the window still could be on the stack, so we have to
+ // use lazy delete ( it will automatically
+ // disconnect from the currently destroyed parent window )
+ pTopWindowChild->doLazyDelete();
+
+ pTopWindowChild = pNextTopChild;
}
}
}
diff --git a/toolkit/source/layout/core/factory.cxx b/toolkit/source/layout/core/factory.cxx
index db9616a8cc77..1390d9405f71 100644
--- a/toolkit/source/layout/core/factory.cxx
+++ b/toolkit/source/layout/core/factory.cxx
@@ -57,33 +57,6 @@ void * SAL_CALL comp_Layout_component_getFactory( const char * pImplName, void *
return pRet;
}
-sal_Bool SAL_CALL comp_Layout_component_writeInfo( void * /*serviceManager*/, void * pRegistryKey )
- {
- if ( pRegistryKey )
- {
- try
- {
- uno::Reference< registry::XRegistryKey > xKey( reinterpret_cast< registry::XRegistryKey* >( pRegistryKey ) );
- uno::Reference< registry::XRegistryKey > xNewKey;
-
- xNewKey = xKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) +
- LayoutFactory::impl_staticGetImplementationName() +
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) );
-
- const uno::Sequence< ::rtl::OUString > aServices = LayoutFactory::impl_staticGetSupportedServiceNames();
- for ( sal_Int32 i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- return sal_True;
- }
- catch (registry::InvalidRegistryException &)
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
- }
- }
- return sal_False;
- }
-
// Component registration
::rtl::OUString SAL_CALL LayoutFactory::impl_staticGetImplementationName()
{
diff --git a/toolkit/source/layout/core/import.cxx b/toolkit/source/layout/core/import.cxx
index 50bfd8656008..84e46f5b68f1 100644
--- a/toolkit/source/layout/core/import.cxx
+++ b/toolkit/source/layout/core/import.cxx
@@ -109,17 +109,6 @@ SAL_THROW (())
DBG_ERROR( "Fatal error: top node isn't a dialog" );
}
-#if 0
- // Hack moved to proplist.cxx
- OUString aGraphic;
- if ( findAndRemove( "graphic", aProps, aGraphic ) )
- //if ( layout::FixedImage *i = dynamic_cast<layout::FixedImage *> ( mpWidget->getPeer().get() ) )
- // FIXME: huh? XImageProducer::complete( XImageConsumer )
- //i->setImage( Image( loadGraphic( OUSTRING_CSTR( aGraphic ) ) ) );
- mpWidget->setProperty( OUString::createFromAscii( "graphic" ),
- loadGraphic( OUSTRING_CSTR( aGraphic ) ) );
-#endif
-
OUString aOrdering;
if ( findAndRemove( "ordering", aProps, aOrdering ) )
if ( DialogButtonHBox *b = dynamic_cast<DialogButtonHBox *> ( mpWidget->getPeer().get() ) )
diff --git a/toolkit/util/makefile.mk b/toolkit/util/makefile.mk
index 48d534a8a9b3..2e9adce4f6bd 100644
--- a/toolkit/util/makefile.mk
+++ b/toolkit/util/makefile.mk
@@ -83,3 +83,11 @@ RESLIB1SRSFILES=$(RES1FILELIST)
# --- Footer -------------------------------------------------------------
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/tk.component
+
+$(MISC)/tk.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ tk.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt tk.component
diff --git a/toolkit/util/tk.component b/toolkit/util/tk.component
new file mode 100644
index 000000000000..e782283c39eb
--- /dev/null
+++ b/toolkit/util/tk.component
@@ -0,0 +1,298 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* 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.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.awt.comp.AsyncCallback">
+ <service name="com.sun.star.awt.AsyncCallback"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.awt.Layout">
+ <service name="com.sun.star.awt.Layout"/>
+ <service name="com.sun.star.comp.awt.Layout"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.DefaultGridColumnModel">
+ <service name="com.sun.star.awt.grid.DefaultGridColumnModel"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.DefaultGridDataModel">
+ <service name="com.sun.star.awt.grid.DefaultGridDataModel"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.GridColumn">
+ <service name="com.sun.star.awt.grid.GridColumn"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.GridControl">
+ <service name="com.sun.star.awt.grid.UnoControlGrid"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.GridControlModel">
+ <service name="com.sun.star.awt.grid.UnoControlGridModel"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.MutableTreeDataModel">
+ <service name="com.sun.star.awt.tree.MutableTreeDataModel"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.StdTabController">
+ <service name="com.sun.star.awt.TabController"/>
+ <service name="stardiv.vcl.control.TabController"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.StdTabControllerModel">
+ <service name="com.sun.star.awt.TabControllerModel"/>
+ <service name="stardiv.vcl.controlmodel.TabController"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.TreeControl">
+ <service name="com.sun.star.awt.tree.TreeControl"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.TreeControlModel">
+ <service name="com.sun.star.awt.tree.TreeControlModel"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoButtonControl">
+ <service name="com.sun.star.awt.UnoControlButton"/>
+ <service name="stardiv.vcl.control.Button"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoCheckBoxControl">
+ <service name="com.sun.star.awt.UnoControlCheckBox"/>
+ <service name="stardiv.vcl.control.CheckBox"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoComboBoxControl">
+ <service name="com.sun.star.awt.UnoControlComboBox"/>
+ <service name="stardiv.vcl.control.ComboBox"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoControlButtonModel">
+ <service name="com.sun.star.awt.UnoControlButtonModel"/>
+ <service name="stardiv.vcl.controlmodel.Button"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoControlCheckBoxModel">
+ <service name="com.sun.star.awt.UnoControlCheckBoxModel"/>
+ <service name="stardiv.vcl.controlmodel.CheckBox"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoControlComboBoxModel">
+ <service name="com.sun.star.awt.UnoControlComboBoxModel"/>
+ <service name="stardiv.vcl.controlmodel.ComboBox"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoControlContainer">
+ <service name="com.sun.star.awt.UnoControlContainer"/>
+ <service name="stardiv.vcl.control.ControlContainer"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoControlContainerModel">
+ <service name="com.sun.star.awt.UnoControlContainerModel"/>
+ <service name="stardiv.vcl.controlmodel.ControlContainer"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoControlCurrencyFieldModel">
+ <service name="com.sun.star.awt.UnoControlCurrencyFieldModel"/>
+ <service name="stardiv.vcl.controlmodel.CurrencyField"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoControlDateFieldModel">
+ <service name="com.sun.star.awt.UnoControlDateFieldModel"/>
+ <service name="stardiv.vcl.controlmodel.DateField"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoControlDialogModel">
+ <service name="com.sun.star.awt.UnoControlDialogModel"/>
+ <service name="stardiv.vcl.controlmodel.Dialog"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoControlEditModel">
+ <service name="com.sun.star.awt.UnoControlEditModel"/>
+ <service name="stardiv.vcl.controlmodel.Edit"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoControlFileControlModel">
+ <service name="com.sun.star.awt.UnoControlFileControlModel"/>
+ <service name="stardiv.vcl.controlmodel.FileControl"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoControlFixedHyperlinkModel">
+ <service name="com.sun.star.awt.UnoControlFixedHyperlinkModel"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoControlFixedLineModel">
+ <service name="com.sun.star.awt.UnoControlFixedLineModel"/>
+ <service name="stardiv.vcl.controlmodel.FixedLine"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoControlFixedTextModel">
+ <service name="com.sun.star.awt.UnoControlFixedTextModel"/>
+ <service name="stardiv.vcl.controlmodel.FixedText"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoControlFormattedFieldModel">
+ <service name="com.sun.star.awt.UnoControlFormattedFieldModel"/>
+ <service name="stardiv.vcl.controlmodel.FormattedField"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoControlGroupBoxModel">
+ <service name="com.sun.star.awt.UnoControlGroupBoxModel"/>
+ <service name="stardiv.vcl.controlmodel.GroupBox"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoControlImageControlModel">
+ <service name="com.sun.star.awt.UnoControlImageButtonModel"/>
+ <service name="com.sun.star.awt.UnoControlImageControlModel"/>
+ <service name="stardiv.vcl.controlmodel.ImageButton"/>
+ <service name="stardiv.vcl.controlmodel.ImageControl"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoControlListBoxModel">
+ <service name="com.sun.star.awt.UnoControlListBoxModel"/>
+ <service name="stardiv.vcl.controlmodel.ListBox"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoControlNumericFieldModel">
+ <service name="com.sun.star.awt.UnoControlNumericFieldModel"/>
+ <service name="stardiv.vcl.controlmodel.NumericField"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoControlPatternFieldModel">
+ <service name="com.sun.star.awt.UnoControlPatternFieldModel"/>
+ <service name="stardiv.vcl.controlmodel.PatternField"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoControlProgressBarModel">
+ <service name="com.sun.star.awt.UnoControlProgressBarModel"/>
+ <service name="stardiv.vcl.controlmodel.ProgressBar"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoControlRadioButtonModel">
+ <service name="com.sun.star.awt.UnoControlRadioButtonModel"/>
+ <service name="stardiv.vcl.controlmodel.RadioButton"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoControlRoadmapModel">
+ <service name="com.sun.star.awt.UnoControlRoadmapModel"/>
+ <service name="stardiv.vcl.controlmodel.Roadmap"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoControlScrollBarModel">
+ <service name="com.sun.star.awt.UnoControlScrollBarModel"/>
+ <service name="stardiv.vcl.controlmodel.ScrollBar"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoControlTimeFieldModel">
+ <service name="com.sun.star.awt.UnoControlTimeFieldModel"/>
+ <service name="stardiv.vcl.controlmodel.TimeField"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoCurrencyFieldControl">
+ <service name="com.sun.star.awt.UnoControlCurrencyField"/>
+ <service name="stardiv.vcl.control.CurrencyField"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoDateFieldControl">
+ <service name="com.sun.star.awt.UnoControlDateField"/>
+ <service name="stardiv.vcl.control.DateField"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoDialogControl">
+ <service name="com.sun.star.awt.UnoControlDialog"/>
+ <service name="stardiv.vcl.control.Dialog"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoEditControl">
+ <service name="com.sun.star.awt.UnoControlEdit"/>
+ <service name="stardiv.vcl.control.Edit"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoFileControl">
+ <service name="com.sun.star.awt.UnoControlFileControl"/>
+ <service name="stardiv.vcl.control.FileControl"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoFixedHyperlinkControl">
+ <service name="com.sun.star.awt.UnoControlFixedHyperlink"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoFixedLineControl">
+ <service name="com.sun.star.awt.UnoControlFixedLine"/>
+ <service name="stardiv.vcl.control.FixedLine"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoFixedTextControl">
+ <service name="com.sun.star.awt.UnoControlFixedText"/>
+ <service name="stardiv.vcl.control.FixedText"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoFormattedFieldControl">
+ <service name="com.sun.star.awt.UnoControlFormattedField"/>
+ <service name="stardiv.vcl.control.FormattedField"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoGroupBoxControl">
+ <service name="com.sun.star.awt.UnoControlGroupBox"/>
+ <service name="stardiv.vcl.control.GroupBox"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoImageControlControl">
+ <service name="com.sun.star.awt.UnoControlImageButton"/>
+ <service name="com.sun.star.awt.UnoControlImageControl"/>
+ <service name="stardiv.vcl.control.ImageButton"/>
+ <service name="stardiv.vcl.control.ImageControl"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoListBoxControl">
+ <service name="com.sun.star.awt.UnoControlListBox"/>
+ <service name="stardiv.vcl.control.ListBox"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoNumericFieldControl">
+ <service name="com.sun.star.awt.UnoControlNumericField"/>
+ <service name="stardiv.vcl.control.NumericField"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoPatternFieldControl">
+ <service name="com.sun.star.awt.UnoControlPatternField"/>
+ <service name="stardiv.vcl.control.PatternField"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoProgressBarControl">
+ <service name="com.sun.star.awt.UnoControlProgressBar"/>
+ <service name="stardiv.vcl.control.ProgressBar"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoRadioButtonControl">
+ <service name="com.sun.star.awt.UnoControlRadioButton"/>
+ <service name="stardiv.vcl.control.RadioButton"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoRoadmapControl">
+ <service name="com.sun.star.awt.UnoControlRoadmap"/>
+ <service name="stardiv.vcl.control.Roadmap"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoScrollBarControl">
+ <service name="com.sun.star.awt.UnoControlScrollBar"/>
+ <service name="stardiv.vcl.control.ScrollBar"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoSimpleAnimationControl">
+ <service name="com.sun.star.awt.UnoControlSimpleAnimation"/>
+ <service name="com.sun.star.awt.UnoSimpleAnimationControl"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoSimpleAnimationControlModel">
+ <service name="com.sun.star.awt.UnoControlSimpleAnimationModel"/>
+ <service name="com.sun.star.awt.UnoSimpleAnimationControlModel"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoSpinButtonControl">
+ <service name="com.sun.star.awt.UnoControlSpinButton"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoSpinButtonModel">
+ <service name="com.sun.star.awt.UnoControlSpinButtonModel"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoThrobberControl">
+ <service name="com.sun.star.awt.UnoControlThrobber"/>
+ <service name="com.sun.star.awt.UnoThrobberControl"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoThrobberControlModel">
+ <service name="com.sun.star.awt.UnoControlThrobberModel"/>
+ <service name="com.sun.star.awt.UnoThrobberControlModel"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoTimeFieldControl">
+ <service name="com.sun.star.awt.UnoControlTimeField"/>
+ <service name="stardiv.vcl.control.TimeField"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.VCLXMenuBar">
+ <service name="com.sun.star.awt.MenuBar"/>
+ <service name="stardiv.vcl.MenuBar"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.VCLXPointer">
+ <service name="com.sun.star.awt.Pointer"/>
+ <service name="stardiv.vcl.Pointer"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.VCLXPopupMenu">
+ <service name="com.sun.star.awt.PopupMenu"/>
+ <service name="stardiv.vcl.PopupMenu"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.VCLXPrinterServer">
+ <service name="com.sun.star.awt.PrinterServer"/>
+ <service name="stardiv.vcl.PrinterServer"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.VCLXToolkit">
+ <service name="com.sun.star.awt.Toolkit"/>
+ <service name="stardiv.vcl.VclToolkit"/>
+ </implementation>
+</component>