summaryrefslogtreecommitdiff
path: root/toolkit/inc
diff options
context:
space:
mode:
authorNoel Power <noel.power@novell.com>2010-11-02 16:55:17 +0000
committerNoel Power <noel.power@novell.com>2010-11-02 20:05:21 +0000
commit95824f8636a604cb498f6e7d62ff0ed3d6b2d5ba (patch)
tree938dcabe5b753e67311992f4aa0273501b17eac8 /toolkit/inc
parent5a0406aa77feb8779200a7906f55c0176ceaafd6 (diff)
initial import of latest cws container_controls
Diffstat (limited to 'toolkit/inc')
-rw-r--r--toolkit/inc/toolkit/awt/vclxwindows.hxx90
-rw-r--r--toolkit/inc/toolkit/controls/dialogcontrol.hxx255
-rw-r--r--toolkit/inc/toolkit/controls/unocontrolcontainer.hxx18
-rw-r--r--toolkit/inc/toolkit/controls/unocontrols.hxx48
-rw-r--r--toolkit/inc/toolkit/helper/listenermultiplexer.hxx12
-rw-r--r--toolkit/inc/toolkit/helper/macros.hxx51
-rw-r--r--toolkit/inc/toolkit/helper/property.hxx2
-rw-r--r--toolkit/inc/toolkit/helper/servicenames.hxx6
8 files changed, 389 insertions, 93 deletions
diff --git a/toolkit/inc/toolkit/awt/vclxwindows.hxx b/toolkit/inc/toolkit/awt/vclxwindows.hxx
index 66950befa6e2..a487c9080ec0 100644
--- a/toolkit/inc/toolkit/awt/vclxwindows.hxx
+++ b/toolkit/inc/toolkit/awt/vclxwindows.hxx
@@ -82,6 +82,8 @@
#include <com/sun/star/awt/XComboBox.hpp>
#include <com/sun/star/awt/XCheckBox.hpp>
#include <com/sun/star/awt/XItemListListener.hpp>
+#include <com/sun/star/awt/XImageConsumer.hpp>
+#include <com/sun/star/awt/XSimpleTabController.hpp>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/implbase2.hxx>
@@ -92,6 +94,7 @@
#include <vcl/pointr.hxx>
#include <vcl/image.hxx>
+#include <vcl/tabctrl.hxx>
#include <com/sun/star/document/XVbaMethodParameter.hpp> //liuchen 2009-6-22, add the support of input/output parameters to VBA Dialog_QueryClose event
class Button;
@@ -372,6 +375,40 @@ public:
virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); }
};
+// ----------------------------------------------------
+// class VCLXFrame
+// ----------------------------------------------------
+class VCLXFrame : public VCLXContainer
+{
+protected:
+ void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
+
+public:
+ VCLXFrame();
+ ~VCLXFrame();
+
+ // ::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::awt::XView
+ void SAL_CALL draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XDevice,
+ ::com::sun::star::awt::DeviceInfo SAL_CALL getInfo() throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XVclWindowPeer
+ void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) 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 ); }
+};
+
// ----------------------------------------------------
@@ -449,6 +486,59 @@ public:
// ::com::sun::star::awt::XVclWindowPeer
void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException);
+ TabPage* getTabPage() const 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 ); }
+};
+
+class VCLXMultiPage : public ::com::sun::star::awt::XSimpleTabController, public VCLXContainer
+{
+ TabListenerMultiplexer maTabListeners;
+ sal_Int32 mTabId;
+protected:
+ void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
+public:
+ VCLXMultiPage();
+ ~VCLXMultiPage();
+
+ // ::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);
+
+ // ::com::sun::star::awt::XView
+ void SAL_CALL draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XDevice,
+ ::com::sun::star::awt::DeviceInfo SAL_CALL getInfo() throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XVclWindowPeer
+ 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);
+ // XSimpleTabController
+ virtual ::sal_Int32 SAL_CALL insertTab() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeTab( ::sal_Int32 ID ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL setTabProps( ::sal_Int32 ID, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& Properties ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > SAL_CALL getTabProps( ::sal_Int32 ID ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL activateTab( ::sal_Int32 ID ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getActiveTabID() throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL addTabListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeTabListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
+ // C++
+ TabControl* getTabControl() const throw ( ::com::sun::star::uno::RuntimeException);
+ USHORT insertTab( TabPage*, rtl::OUString& sTitle );
+ 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/dialogcontrol.hxx b/toolkit/inc/toolkit/controls/dialogcontrol.hxx
index 04b8c9b9f9c6..db9f9ee41fe7 100644
--- a/toolkit/inc/toolkit/controls/dialogcontrol.hxx
+++ b/toolkit/inc/toolkit/controls/dialogcontrol.hxx
@@ -35,12 +35,16 @@
#include <com/sun/star/awt/XTopWindow.hpp>
#include <com/sun/star/util/XChangesNotifier.hpp>
#include <com/sun/star/util/XChangesListener.hpp>
+#include <com/sun/star/awt/XTabListener.hpp>
+#include <com/sun/star/awt/XSimpleTabController.hpp>
#include <com/sun/star/util/XModifyListener.hpp>
#include <com/sun/star/beans/XPropertyChangeListener.hpp>
#include <com/sun/star/awt/XDialog2.hpp>
#include <com/sun/star/resource/XStringResourceResolver.hpp>
+#include <com/sun/star/graphic/XGraphicObject.hpp>
#include <cppuhelper/implbase6.hxx>
#include <cppuhelper/implbase5.hxx>
+#include <cppuhelper/implbase2.hxx>
#include <toolkit/helper/listenermultiplexer.hxx>
#include <toolkit/controls/unocontrolmodel.hxx>
#include "toolkit/helper/servicenames.hxx"
@@ -68,11 +72,12 @@ class UnoControlDialogModel : public UnoControlDialogModel_IBase
, public UnoControlDialogModel_Base
{
public:
+ enum ChildOperation { Insert = 0, Remove };
// would like to make this typedef private, too, but the Forte 7 compiler does have
// problems with this .....
typedef ::std::pair< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >, ::rtl::OUString >
UnoControlModelHolder;
-private:
+protected:
typedef ::std::list< UnoControlModelHolder > UnoControlModelHolderList;
// for grouping control models (XTabControllerModel::getGroupXXX)
@@ -84,7 +89,7 @@ private:
friend struct FindControlModel;
friend struct CompareControlModel;
-private:
+protected:
ContainerListenerMultiplexer maContainerListeners;
::cppu::OInterfaceContainerHelper maChangeListeners;
UnoControlModelHolderList maModels;
@@ -95,13 +100,14 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphicObject > mxGrfObj;
bool mbAdjustingGraphic;
protected:
- ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ virtual ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
UnoControlModelHolderList::iterator ImplFindElement( const ::rtl::OUString& rName );
+ void updateUserFormChildren( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& xAllChildren, const rtl::OUString& aName, ChildOperation Operation, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& xTarget ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) ;
public:
- UnoControlDialogModel();
+ UnoControlDialogModel( bool bRegProps = true );
UnoControlDialogModel( const UnoControlDialogModel& rModel );
~UnoControlDialogModel();
@@ -124,13 +130,6 @@ public:
::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
- // ::com::sun::star::container::XIndexContainer, XIndexReplace, XIndexAcces
- // void SAL_CALL replaceByIndex( sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) = 0;
- // sal_Int32 SAL_CALL getCount( ) throw(::com::sun::star::uno::RuntimeException) = 0;
- // ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) = 0;
- // void SAL_CALL insertByIndex( sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) = 0;
- // void SAL_CALL removeByIndex( sal_Int32 Index ) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) = 0;
-
// ::com::sun::star::container::XNameContainer, XNameReplace, XNameAccess
void SAL_CALL replaceByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
@@ -180,12 +179,11 @@ public:
protected:
void startControlListening( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& _rxChildModel );
void stopControlListening( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& _rxChildModel );
- // ::cppu::OPropertySetHelper
- void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception);
-
void implNotifyTabModelChange( const ::rtl::OUString& _rAccessor );
void implUpdateGroupStructure();
+ // ::cppu::OPropertySetHelper
+ void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception);
private:
void AddRadioButtonToGroup (
const ::com::sun::star::uno::Reference< XControlModel >& rControlModel,
@@ -196,17 +194,6 @@ private:
::std::map< ::rtl::OUString, ModelGroup >& pNamedGroups );
};
-// ----------------------------------------------------
-// class UnoDialogControl
-// ----------------------------------------------------
-typedef ::cppu::ImplHelper6 < ::com::sun::star::container::XContainerListener
- , ::com::sun::star::awt::XTopWindow
- , ::com::sun::star::awt::XDialog2
- , ::com::sun::star::util::XChangesListener
- , ::com::sun::star::util::XModifyListener
- , ::com::sun::star::awt::XWindowListener
- > UnoDialogControl_IBase;
-
class ResourceListener :public ::com::sun::star::util::XModifyListener,
public ::cppu::OWeakObject,
public ::cppu::BaseMutex
@@ -235,29 +222,78 @@ class ResourceListener :public ::com::sun::star::util::XModifyListener,
bool m_bListening;
};
-class UnoDialogControl :public UnoControlContainer
- ,public UnoDialogControl_IBase
+typedef ::cppu::ImplHelper2< ::com::sun::star::container::XContainerListener,
+ ::com::sun::star::util::XChangesListener >
+ UnoDialogContainerControl_IBase;
+
+class UnoDialogContainerControl : public UnoControlContainer, public UnoDialogContainerControl_IBase
+{
+protected:
+ bool mbSizeModified;
+ bool mbPosModified;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController > mxTabController;
+ void ImplInsertControl( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& rxModel, const ::rtl::OUString& rName );
+ void ImplRemoveControl( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& rxModel );
+ virtual void ImplSetPosSize( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& rxCtrl );
+
+public:
+ UnoDialogContainerControl();
+ ~UnoDialogContainerControl();
+
+ DECLIMPL_SERVICEINFO_DERIVED( UnoDialogContainerControl, UnoControlBase, "com.sun.star.awt.UnoDialogContainerControl" )
+ ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoControlContainer::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 disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL dispose() 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);
+
+ // ::com::sun::star::container::XContainerListener
+ void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) 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);
+ ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
+
+ // XChangesListener
+ virtual void SAL_CALL changesOccurred( const ::com::sun::star::util::ChangesEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::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 setDesignMode( sal_Bool bOn ) throw(::com::sun::star::uno::RuntimeException);
+protected:
+ virtual void ImplModelPropertiesChanged( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyChangeEvent >& rEvents ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void removingControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl );
+ virtual void addingControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl );
+};
+
+
+
+class UnoDialogControl :public UnoDialogContainerControl
+ ,public ::com::sun::star::awt::XTopWindow, public ::com::sun::star::awt::XDialog2, public ::com::sun::star::awt::XWindowListener
{
private:
::com::sun::star::uno::Reference< ::com::sun::star::awt::XMenuBar > mxMenuBar;
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController > mxTabController;
- ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > mxListener;
TopWindowListenerMultiplexer maTopWindowListeners;
bool mbWindowListener;
- bool mbSizeModified;
- bool mbPosModified;
+ ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphicObject > mxGrfObj;
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > mxListener;
protected:
void ImplInsertControl( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& rxModel, const ::rtl::OUString& rName );
- void ImplRemoveControl( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& rxModel );
- void ImplSetPosSize( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& rxCtrl );
void ImplUpdateResourceResolver();
void ImplStartListingForResourceEvents();
public:
- UnoDialogControl();
+ UnoDialogControl();
+ ~UnoDialogControl();
::rtl::OUString GetComponentServiceName();
::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoControlContainer::queryInterface(rType); }
@@ -282,11 +318,6 @@ public:
virtual void SAL_CALL windowShown( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL windowHidden( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException);
- // ::com::sun::star::container::XContainerListener
- void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
- void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
- void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
-
// ::com::sun::star::awt::XDialog2
virtual void SAL_CALL endDialog( ::sal_Int32 Result ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setHelpId( ::sal_Int32 Id ) throw (::com::sun::star::uno::RuntimeException);
@@ -303,10 +334,6 @@ public:
// ::com::sun::star::awt::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 setDesignMode( sal_Bool bOn ) throw(::com::sun::star::uno::RuntimeException);
-
- // XChangesListener
- virtual void SAL_CALL changesOccurred( const ::com::sun::star::util::ChangesEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
// XModifyListener
virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
@@ -317,12 +344,150 @@ public:
protected:
virtual void ImplModelPropertiesChanged( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyChangeEvent >& rEvents ) throw(::com::sun::star::uno::RuntimeException);
virtual void PrepareWindowDescriptor( ::com::sun::star::awt::WindowDescriptor& rDesc );
+protected:
+};
+
+class UnoMultiPageModel : public UnoControlDialogModel
+{
+public:
+ UnoMultiPageModel();
+ ~UnoMultiPageModel();
+ UnoMultiPageModel( const UnoMultiPageModel& rModel );
+
+ UnoControlModel* Clone() const;
+
+ DECLIMPL_SERVICEINFO_DERIVED( UnoMultiPageModel, UnoControlDialogModel, szServiceName_UnoMultiPageModel )
+
+ virtual ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw( ::com::sun::star::uno::RuntimeException);
+ // XNamedContainer
+ void SAL_CALL insertByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ // Override the method of parent Class
+ virtual sal_Bool SAL_CALL getGroupControl( ) throw (::com::sun::star::uno::RuntimeException);
protected:
- virtual void removingControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl );
- virtual void addingControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl );
+ virtual ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+};
+
+class UnoMultiPageControl : public UnoDialogContainerControl
+ ,public ::com::sun::star::awt::XSimpleTabController
+ ,public ::com::sun::star::awt::XTabListener
+{
+ TabListenerMultiplexer maTabListeners;
+ void bindPage( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl );
+public:
+ UnoMultiPageControl();
+ ~UnoMultiPageControl();
+ ::rtl::OUString GetComponentServiceName();
+
+ // ::com::sun::star::lang::XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoMultiPageControl, UnoDialogContainerControl, szServiceName_UnoMultiPageControl )
+ ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoDialogContainerControl::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(); }
+ // ::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);
+ 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);
+ // com::sun::star::awt::XSimpleTabController
+ virtual ::sal_Int32 SAL_CALL insertTab() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeTab( ::sal_Int32 ID ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL setTabProps( ::sal_Int32 ID, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& Properties ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > SAL_CALL getTabProps( ::sal_Int32 ID ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL activateTab( ::sal_Int32 ID ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getActiveTabID() throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL addTabListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeTabListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
+ // XTabListener
+ virtual void SAL_CALL inserted( ::sal_Int32 ID ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removed( ::sal_Int32 ID ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL changed( ::sal_Int32 ID, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& Properties ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL activated( ::sal_Int32 ID ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL deactivated( ::sal_Int32 ID ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& evt ) throw (::com::sun::star::uno::RuntimeException);
+ // XComponent
+ void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
+
+protected:
+ virtual void impl_createControlPeerIfNecessary(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl
+ );
+
+};
+
+
+class UnoPageModel : public UnoControlDialogModel
+{
+public:
+ UnoPageModel();
+ ~UnoPageModel();
+ UnoPageModel( const UnoPageModel& rModel );
+
+ UnoControlModel* Clone() const;
+
+ DECLIMPL_SERVICEINFO_DERIVED( UnoPageModel, UnoControlDialogModel, szServiceName_UnoPageModel )
+
+ virtual ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw( ::com::sun::star::uno::RuntimeException);
+
+ // Override the method of parent Class
+ virtual sal_Bool SAL_CALL getGroupControl( ) throw (::com::sun::star::uno::RuntimeException);
+protected:
+ virtual ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+};
+
+
+class UnoPageControl : public UnoDialogContainerControl
+{
+public:
+ UnoPageControl();
+ ~UnoPageControl();
+ ::rtl::OUString GetComponentServiceName();
+
+
+ // ::com::sun::star::lang::XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoPageControl, UnoDialogContainerControl, szServiceName_UnoPageControl )
+};
+
+class UnoFrameModel : public UnoControlDialogModel
+{
+public:
+ UnoFrameModel();
+ ~UnoFrameModel();
+ UnoFrameModel( const UnoFrameModel& rModel );
+
+ UnoControlModel* Clone() const;
+
+ DECLIMPL_SERVICEINFO_DERIVED( UnoFrameModel, UnoControlDialogModel, szServiceName_UnoFrameModel )
+
+ virtual ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw( ::com::sun::star::uno::RuntimeException);
+
+protected:
+ virtual ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
};
+class UnoFrameControl : public UnoDialogContainerControl
+{
+protected:
+ virtual void ImplSetPosSize( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& rxCtrl );
+public:
+ UnoFrameControl();
+ ~UnoFrameControl();
+ ::rtl::OUString GetComponentServiceName();
+
+// ::com::sun::star::lang::XServiceInfo
+DECLIMPL_SERVICEINFO_DERIVED( UnoFrameControl, UnoDialogContainerControl, szServiceName_UnoPageControl )
+};
#endif // TOOLKIT_DIALOG_CONTROL_HXX
diff --git a/toolkit/inc/toolkit/controls/unocontrolcontainer.hxx b/toolkit/inc/toolkit/controls/unocontrolcontainer.hxx
index a566fef2716e..d2b225d23411 100644
--- a/toolkit/inc/toolkit/controls/unocontrolcontainer.hxx
+++ b/toolkit/inc/toolkit/controls/unocontrolcontainer.hxx
@@ -120,6 +120,15 @@ protected:
virtual void removingControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl );
virtual void addingControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl );
+ /** ensures that the given control has a peer, if necessary and possible
+ @param _rxControl
+ an ->XControl which has just been inserted into the container. Must not be <NULL/>.
+ @precond
+ our mutex is locked
+ */
+ virtual void impl_createControlPeerIfNecessary(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl
+ );
private:
/** adds the control to the container, does necessary notifications, and the like
@param _rxControl
@@ -150,15 +159,6 @@ private:
const ::rtl::OUString* _pNameAccessor
);
- /** ensures that the given control has a peer, if necessary and possible
- @param _rxControl
- an ->XControl which has just been inserted into the container. Must not be <NULL/>.
- @precond
- our mutex is locked
- */
- void impl_createControlPeerIfNecessary(
- const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl
- );
};
diff --git a/toolkit/inc/toolkit/controls/unocontrols.hxx b/toolkit/inc/toolkit/controls/unocontrols.hxx
index 21b634155585..531467f359be 100644
--- a/toolkit/inc/toolkit/controls/unocontrols.hxx
+++ b/toolkit/inc/toolkit/controls/unocontrols.hxx
@@ -72,6 +72,16 @@
#define UNO_NAME_GRAPHOBJ_URLPREFIX "vnd.sun.star.GraphicObject:"
#define UNO_NAME_GRAPHOBJ_URLPKGPREFIX "vnd.sun.star.Package:"
+class ImageHelper
+{
+public:
+ // The routine will always attempt to return a valid XGraphic for the passed _rURL
+ // additionallly xOutGraphicObject will container the associated XGraphicObject ( if url
+ // is valid for that )
+ // and is set appropriately ( e.g. NULL if non GraphicObject scheme ) or valid object
+ // if the rURL points to a valid object
+ static ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > getGraphicAndGraphicObjectFromURL_nothrow( ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphicObject >& xOutGraphicObject, const ::rtl::OUString& _rURL );
+};
// ----------------------------------------------------
// class UnoControlEditModel
@@ -637,44 +647,6 @@ public:
};
-class UnoMultiPageModel : public UnoControlModel
-{
-protected:
- ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
- ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
-
-public:
- UnoMultiPageModel();
- UnoMultiPageModel( const UnoMultiPageModel& rModel ) : UnoControlModel( rModel ) {;}
-
- UnoControlModel* Clone() const { return new UnoMultiPageModel( *this ); }
-
- // ::com::sun::star::io::XPersistObject
- ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
-
- // ::com::sun::star::beans::XMultiPropertySet
- ::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( UnoMultiPageModel, UnoControlModel, szServiceName_UnoMultiPageModel )
-
-};
-// ----------------------------------------------------
-// class UnoGroupBoxControl
-// ----------------------------------------------------
-class UnoMultiPageControl : public UnoControlBase
-{
-public:
- UnoMultiPageControl();
- ::rtl::OUString GetComponentServiceName();
-
- sal_Bool SAL_CALL isTransparent( ) throw(::com::sun::star::uno::RuntimeException);
-
- // ::com::sun::star::lang::XServiceInfo
- DECLIMPL_SERVICEINFO_DERIVED( UnoMultiPageControl, UnoControlBase, szServiceName_UnoMultiPageControl )
-
-};
-
// ----------------------------------------------------
// class UnoFixedTextControl
// ----------------------------------------------------
diff --git a/toolkit/inc/toolkit/helper/listenermultiplexer.hxx b/toolkit/inc/toolkit/helper/listenermultiplexer.hxx
index 38d7300382cd..ac38197bc5f1 100644
--- a/toolkit/inc/toolkit/helper/listenermultiplexer.hxx
+++ b/toolkit/inc/toolkit/helper/listenermultiplexer.hxx
@@ -42,6 +42,7 @@
#include <com/sun/star/awt/XTextListener.hpp>
#include <com/sun/star/awt/XActionListener.hpp>
#include <com/sun/star/awt/XItemListener.hpp>
+#include <com/sun/star/awt/XTabListener.hpp>
#include <com/sun/star/container/XContainerListener.hpp>
#include <com/sun/star/awt/XSpinListener.hpp>
#include <com/sun/star/awt/XAdjustmentListener.hpp>
@@ -184,6 +185,17 @@ DECL_LISTENERMULTIPLEXER_START_DLLPUB( ItemListenerMultiplexer, ::com::sun::star
DECL_LISTENERMULTIPLEXER_END
// ----------------------------------------------------
+// class TabListenerMultiplexer
+// ----------------------------------------------------
+DECL_LISTENERMULTIPLEXER_START_DLLPUB( TabListenerMultiplexer, ::com::sun::star::awt::XTabListener )
+ void SAL_CALL inserted( ::sal_Int32 ID ) throw (::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removed( ::sal_Int32 ID ) throw (::com::sun::star::uno::RuntimeException);
+ void SAL_CALL changed( ::sal_Int32 ID, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& Properties ) throw (::com::sun::star::uno::RuntimeException);
+ void SAL_CALL activated( ::sal_Int32 ID ) throw (::com::sun::star::uno::RuntimeException);
+ void SAL_CALL deactivated( ::sal_Int32 ID ) throw (::com::sun::star::uno::RuntimeException);
+DECL_LISTENERMULTIPLEXER_END
+
+// ----------------------------------------------------
// class ContainerListenerMultiplexer
// ----------------------------------------------------
DECL_LISTENERMULTIPLEXER_START( ContainerListenerMultiplexer, ::com::sun::star::container::XContainerListener )
diff --git a/toolkit/inc/toolkit/helper/macros.hxx b/toolkit/inc/toolkit/helper/macros.hxx
index 9fac9cb14582..243ab8e4563d 100644
--- a/toolkit/inc/toolkit/helper/macros.hxx
+++ b/toolkit/inc/toolkit/helper/macros.hxx
@@ -190,6 +190,57 @@ void ClassName::disposing( const ::com::sun::star::lang::EventObject& ) throw(::
#define DISPLAY_EXCEPTION( ClassName, MethodName, e )
#endif
+#define IMPL_TABLISTENERMULTIPLEXER_LISTENERMETHOD_BODY_2PARAM( ClassName, InterfaceName, MethodName, ParamType1, ParamType2 ) \
+{ \
+ ParamType1 aMulti( evt ); \
+ ParamType2 aMulti2( evt2 ); \
+ ::cppu::OInterfaceIteratorHelper aIt( *this ); \
+ while( aIt.hasMoreElements() ) \
+ { \
+ ::com::sun::star::uno::Reference< InterfaceName > xListener( \
+ static_cast< InterfaceName* >( aIt.next() ) ); \
+ try \
+ { \
+ xListener->MethodName( aMulti, aMulti2 ); \
+ } \
+ catch( ::com::sun::star::lang::DisposedException e ) \
+ { \
+ OSL_ENSURE( e.Context.is(), "caught DisposedException with empty Context field" ); \
+ if ( e.Context == xListener || !e.Context.is() ) \
+ aIt.remove(); \
+ } \
+ catch( ::com::sun::star::uno::RuntimeException e ) \
+ { \
+ DISPLAY_EXCEPTION( ClassName, MethodName, e ) \
+ } \
+ } \
+}
+
+#define IMPL_TABLISTENERMULTIPLEXER_LISTENERMETHOD_BODY_1PARAM( ClassName, InterfaceName, MethodName, ParamType1 ) \
+{ \
+ ParamType1 aMulti( evt ); \
+ ::cppu::OInterfaceIteratorHelper aIt( *this ); \
+ while( aIt.hasMoreElements() ) \
+ { \
+ ::com::sun::star::uno::Reference< InterfaceName > xListener( \
+ static_cast< InterfaceName* >( aIt.next() ) ); \
+ try \
+ { \
+ xListener->MethodName( aMulti ); \
+ } \
+ catch( ::com::sun::star::lang::DisposedException e ) \
+ { \
+ OSL_ENSURE( e.Context.is(), "caught DisposedException with empty Context field" ); \
+ if ( e.Context == xListener || !e.Context.is() ) \
+ aIt.remove(); \
+ } \
+ catch( ::com::sun::star::uno::RuntimeException e ) \
+ { \
+ DISPLAY_EXCEPTION( ClassName, MethodName, e ) \
+ } \
+ } \
+}
+
#define IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD_BODY( ClassName, InterfaceName, MethodName, EventType ) \
{ \
EventType aMulti( evt ); \
diff --git a/toolkit/inc/toolkit/helper/property.hxx b/toolkit/inc/toolkit/helper/property.hxx
index 611384b89d22..9b077cab2709 100644
--- a/toolkit/inc/toolkit/helper/property.hxx
+++ b/toolkit/inc/toolkit/helper/property.hxx
@@ -205,6 +205,8 @@ namespace rtl {
#define BASEPROPERTY_MULTISELECTION_SIMPLEMODE 152
#define BASEPROPERTY_ITEM_SEPARATOR_POS 153
#define BASEPROPERTY_GROUPNAME 154 // ::rtl::OUString
+#define BASEPROPERTY_MULTIPAGEVALUE 155 // sal_Int32
+#define BASEPROPERTY_USERFORMCONTAINEES 156 // css::container::XNameContainer
// Keine gebundenen Properties, werden immer aus der Property BASEPROPERTY_FONTDESCRIPTOR entnommen.
diff --git a/toolkit/inc/toolkit/helper/servicenames.hxx b/toolkit/inc/toolkit/helper/servicenames.hxx
index 9b13eb07c21d..1ec5298cf303 100644
--- a/toolkit/inc/toolkit/helper/servicenames.hxx
+++ b/toolkit/inc/toolkit/helper/servicenames.hxx
@@ -38,9 +38,13 @@ extern const sal_Char __FAR_DATA szServiceName_PopupMenu[], szServiceName2_Popup
extern const sal_Char __FAR_DATA szServiceName_MenuBar[], szServiceName2_MenuBar[];
extern const sal_Char __FAR_DATA szServiceName_Pointer[], szServiceName2_Pointer[];
extern const sal_Char __FAR_DATA szServiceName_UnoControlContainer[], szServiceName2_UnoControlContainer[];
+extern const sal_Char __FAR_DATA szServiceName_UnoControlContainerModel[], szServiceName2_UnoControlContainerModel[];
extern const sal_Char __FAR_DATA szServiceName_UnoMultiPageControl[], szServiceName2_UnoMultiPageControl[];
extern const sal_Char __FAR_DATA szServiceName_UnoMultiPageModel[], szServiceName2_UnoMultiPageModel[];
-extern const sal_Char __FAR_DATA szServiceName_UnoControlContainerModel[], szServiceName2_UnoControlContainerModel[];
+extern const sal_Char __FAR_DATA szServiceName_UnoPageControl[], szServiceName2_UnoPageControl[];
+extern const sal_Char __FAR_DATA szServiceName_UnoPageModel[], szServiceName2_UnoPageModel[];
+extern const sal_Char __FAR_DATA szServiceName_UnoFrameControl[], szServiceName2_UnoFrameControl[];
+extern const sal_Char __FAR_DATA szServiceName_UnoFrameModel[], szServiceName2_UnoFrameModel[];
extern const sal_Char __FAR_DATA szServiceName_TabController[], szServiceName2_TabController[];
extern const sal_Char __FAR_DATA szServiceName_TabControllerModel[], szServiceName2_TabControllerModel[];
extern const sal_Char __FAR_DATA szServiceName_UnoControlDialog[], szServiceName2_UnoControlDialog[];