summaryrefslogtreecommitdiff
path: root/toolkit/inc/toolkit/controls
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/inc/toolkit/controls')
-rw-r--r--toolkit/inc/toolkit/controls/accessiblecontrolcontext.hxx138
-rw-r--r--toolkit/inc/toolkit/controls/animatedimages.hxx144
-rw-r--r--toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx267
-rw-r--r--toolkit/inc/toolkit/controls/dialogcontrol.hxx271
-rw-r--r--toolkit/inc/toolkit/controls/eventcontainer.hxx140
-rw-r--r--toolkit/inc/toolkit/controls/formattedcontrol.hxx133
-rw-r--r--toolkit/inc/toolkit/controls/geometrycontrolmodel.hxx265
-rw-r--r--toolkit/inc/toolkit/controls/geometrycontrolmodel_impl.hxx98
-rw-r--r--toolkit/inc/toolkit/controls/roadmapcontrol.hxx209
-rw-r--r--toolkit/inc/toolkit/controls/roadmapentry.hxx93
-rw-r--r--toolkit/inc/toolkit/controls/spinningprogress.hxx70
-rw-r--r--toolkit/inc/toolkit/controls/stdtabcontroller.hxx96
-rw-r--r--toolkit/inc/toolkit/controls/stdtabcontrollermodel.hxx147
-rw-r--r--toolkit/inc/toolkit/controls/tabpagecontainer.hxx147
-rw-r--r--toolkit/inc/toolkit/controls/tabpagemodel.hxx146
-rw-r--r--toolkit/inc/toolkit/controls/tkscrollbar.hxx127
-rw-r--r--toolkit/inc/toolkit/controls/tksimpleanimation.hxx104
-rw-r--r--toolkit/inc/toolkit/controls/tkspinbutton.hxx130
-rw-r--r--toolkit/inc/toolkit/controls/tkthrobber.hxx112
-rw-r--r--toolkit/inc/toolkit/controls/unocontrol.hxx250
-rw-r--r--toolkit/inc/toolkit/controls/unocontrolbase.hxx79
-rw-r--r--toolkit/inc/toolkit/controls/unocontrolcontainer.hxx169
-rw-r--r--toolkit/inc/toolkit/controls/unocontrolcontainermodel.hxx68
-rw-r--r--toolkit/inc/toolkit/controls/unocontrolmodel.hxx185
-rw-r--r--toolkit/inc/toolkit/controls/unocontrols.hxx1520
25 files changed, 5108 insertions, 0 deletions
diff --git a/toolkit/inc/toolkit/controls/accessiblecontrolcontext.hxx b/toolkit/inc/toolkit/controls/accessiblecontrolcontext.hxx
new file mode 100644
index 000000000000..8ececaeda794
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/accessiblecontrolcontext.hxx
@@ -0,0 +1,138 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_ACCESSIBLE_CONTROL_CONTEXT_HXX
+#define TOOLKIT_ACCESSIBLE_CONTROL_CONTEXT_HXX
+
+#include <comphelper/accessiblecomponenthelper.hxx>
+#include <comphelper/accimplaccess.hxx>
+#include <comphelper/uno3.hxx>
+#include <com/sun/star/lang/XEventListener.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/awt/XWindow.hpp>
+
+class Window;
+//........................................................................
+namespace toolkit
+{
+//........................................................................
+
+ //====================================================================
+ //= OAccessibleControlContext
+ //====================================================================
+
+ typedef ::comphelper::OAccessibleComponentHelper OAccessibleControlContext_Base;
+ typedef ::cppu::ImplHelper1 < ::com::sun::star::lang::XEventListener
+ > OAccessibleControlContext_IBase;
+
+ /** class implementing the AccessibleContext for an UNO control - to be used in design mode of the control.
+ <p><b>life time control<b/><br/>
+ This control should be held weak by the creator (an UNO control), it itself holds a hard reference to the
+ control model, and a weak reference to the control. The reference to the model is freed when the model
+ is beeing disposed.</p>
+ */
+ class OAccessibleControlContext
+ :public ::comphelper::OAccessibleImplementationAccess
+ ,public OAccessibleControlContext_Base
+ ,public OAccessibleControlContext_IBase
+ {
+ private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
+ m_xControlModel; // the model of the control which's context we implement
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
+ m_xModelPropsInfo; // the cached property set info of the model
+
+ protected:
+ /// ctor. @see Init
+ OAccessibleControlContext();
+ ~OAccessibleControlContext();
+
+ /** late ctor
+ */
+ void Init(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxCreator
+ ) SAL_THROW( ( ::com::sun::star::uno::Exception ) );
+
+ // OCommonAccessibleComponent overridables
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds( ) throw (::com::sun::star::uno::RuntimeException);
+
+ public:
+ /** creates an accessible context for an uno control
+ @param _rxCreator
+ the uno control's XAccessible interface. This must be an XControl, from which an XControlModel
+ can be retrieved.
+ */
+ static OAccessibleControlContext* create(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxCreator
+ ) SAL_THROW( ( ) );
+
+ protected:
+ // XInterface
+ DECLARE_XINTERFACE( )
+ DECLARE_XTYPEPROVIDER( )
+
+ // XAccessibleContext
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleDescription( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleComponent
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL grabFocus( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleKeyBinding( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getForeground( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XEventListener
+ using comphelper::OAccessibleContextHelper::disposing;
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
+
+ private:
+ // retrieves the value of a string property from the model, if the property is present
+ ::rtl::OUString getModelStringProperty( const sal_Char* _pPropertyName ) SAL_THROW( ( ) );
+
+ // starts listening at the control model (currently for disposal only)
+ void startModelListening( ) SAL_THROW( ( ::com::sun::star::uno::Exception ) );
+ // stops listening at the control model
+ void stopModelListening( ) SAL_THROW( ( ::com::sun::star::uno::Exception ) );
+
+ Window* implGetWindow( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >* _pxUNOWindow = NULL ) const;
+ };
+
+//........................................................................
+} // namespace toolkit
+//........................................................................
+
+#endif // TOOLKIT_ACCESSIBLE_CONTROL_CONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/toolkit/controls/animatedimages.hxx b/toolkit/inc/toolkit/controls/animatedimages.hxx
new file mode 100644
index 000000000000..c19ed5e5451c
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/animatedimages.hxx
@@ -0,0 +1,144 @@
+/*************************************************************************
+ * 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_ANIMATEDIMAGES_HXX
+#define TOOLKIT_ANIMATEDIMAGES_HXX
+
+#include "toolkit/controls/unocontrolbase.hxx"
+#include "toolkit/controls/unocontrolmodel.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/awt/XAnimation.hpp>
+#include <com/sun/star/awt/XAnimatedImages.hpp>
+#include <com/sun/star/container/XContainerListener.hpp>
+/** === end UNO includes === **/
+
+#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/implbase2.hxx>
+
+#include <boost/scoped_ptr.hpp>
+
+//......................................................................................................................
+namespace toolkit
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //=
+ //==================================================================================================================
+ typedef ::cppu::AggImplInheritanceHelper2 < UnoControlBase
+ , ::com::sun::star::awt::XAnimation
+ , ::com::sun::star::container::XContainerListener
+ > AnimatedImagesControl_Base;
+
+ class AnimatedImagesControl : public AnimatedImagesControl_Base
+ {
+ public:
+ AnimatedImagesControl( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > const & i_factory );
+ ::rtl::OUString GetComponentServiceName();
+
+ // XAnimation
+ virtual void SAL_CALL startAnimation( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL stopAnimation( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL isAnimationRunning( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ ::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);
+
+ // XControl
+ sal_Bool SAL_CALL setModel( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& i_rModel ) throw ( ::com::sun::star::uno::RuntimeException );
+ void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& i_toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& i_parentPeer ) throw(::com::sun::star::uno::RuntimeException);
+
+
+ // XContainerListener
+ virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& i_event ) throw (::com::sun::star::uno::RuntimeException);
+ };
+
+ //==================================================================================================================
+ //= AnimatedImagesControlModel
+ //==================================================================================================================
+ struct AnimatedImagesControlModel_Data;
+ typedef ::cppu::AggImplInheritanceHelper1 < UnoControlModel
+ , ::com::sun::star::awt::XAnimatedImages
+ > AnimatedImagesControlModel_Base;
+ class AnimatedImagesControlModel : public AnimatedImagesControlModel_Base
+ {
+ public:
+ AnimatedImagesControlModel( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > const & i_factory );
+ AnimatedImagesControlModel( const AnimatedImagesControlModel& i_copySource );
+
+ virtual UnoControlModel* Clone() const;
+
+ // XPropertySet
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XPersistObject
+ ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ ::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);
+
+ // XAnimatedImages
+ virtual ::sal_Int32 SAL_CALL getStepTime() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setStepTime( ::sal_Int32 _steptime ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getAutoRepeat() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setAutoRepeat( ::sal_Bool _autorepeat ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int16 SAL_CALL getScaleMode() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setScaleMode( ::sal_Int16 _scalemode ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getImageSetCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getImageSet( ::sal_Int32 i_index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL insertImageSet( ::sal_Int32 i_index, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& i_imageURLs ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL replaceImageSet( ::sal_Int32 i_index, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& i_imageURLs ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeImageSet( ::sal_Int32 i_index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ // XAnimatedImages::XContainer
+ virtual void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& i_listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& i_listener ) throw (::com::sun::star::uno::RuntimeException);
+
+ protected:
+ ~AnimatedImagesControlModel();
+
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+ void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception);
+
+ private:
+ ::boost::scoped_ptr< AnimatedImagesControlModel_Data >
+ m_pData;
+ };
+
+//......................................................................................................................
+} // namespace toolkit
+//......................................................................................................................
+
+#endif // TOOLKIT_ANIMATEDIMAGES_HXX
diff --git a/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx b/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx
new file mode 100644
index 000000000000..9e006f4afd1b
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx
@@ -0,0 +1,267 @@
+/*************************************************************************
+ *
+ * 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_CONTROL_MODEL_CONTAINERBASE_HXX
+#define TOOLKIT_CONTROL_MODEL_CONTAINERBASE_HXX
+
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/container/XContainer.hpp>
+#include <com/sun/star/awt/XTabControllerModel.hpp>
+#include <com/sun/star/util/XChangesNotifier.hpp>
+#include <com/sun/star/util/XChangesListener.hpp>
+#include <com/sun/star/util/XModifyListener.hpp>
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#include <com/sun/star/resource/XStringResourceResolver.hpp>
+#include <cppuhelper/implbase8.hxx>
+#include <cppuhelper/implbase2.hxx>
+#include <toolkit/helper/listenermultiplexer.hxx>
+#include <toolkit/controls/unocontrolmodel.hxx>
+#include <toolkit/controls/unocontrolcontainer.hxx>
+#include <cppuhelper/propshlp.hxx>
+#include <cppuhelper/basemutex.hxx>
+#include <com/sun/star/graphic/XGraphic.hpp>
+#include <com/sun/star/awt/tab/XTabPageModel.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
+// ----------------------------------------------------
+// class ControlModelContainerBase
+// ----------------------------------------------------
+typedef UnoControlModel ControlModel_Base;
+typedef ::cppu::AggImplInheritanceHelper8 < ControlModel_Base
+ , ::com::sun::star::lang::XMultiServiceFactory
+ , ::com::sun::star::container::XContainer
+ , ::com::sun::star::container::XNameContainer
+ , ::com::sun::star::awt::XTabControllerModel
+ , ::com::sun::star::util::XChangesNotifier
+ , ::com::sun::star::beans::XPropertyChangeListener
+ , ::com::sun::star::awt::tab::XTabPageModel
+ , ::com::sun::star::lang::XInitialization
+ > ControlModelContainer_IBase;
+
+class ControlModelContainerBase : public ControlModelContainer_IBase
+{
+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:
+ typedef ::std::list< UnoControlModelHolder > UnoControlModelHolderList;
+
+public:
+ // for grouping control models (XTabControllerModel::getGroupXXX)
+ typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >
+ ModelGroup;
+ typedef ::std::vector< ModelGroup > AllGroups;
+
+ friend struct CloneControlModel;
+ friend struct FindControlModel;
+ friend struct CompareControlModel;
+
+protected:
+ ContainerListenerMultiplexer maContainerListeners;
+ ::cppu::OInterfaceContainerHelper maChangeListeners;
+ UnoControlModelHolderList maModels;
+
+ AllGroups maGroups;
+ sal_Bool mbGroupsUpToDate;
+
+ bool m_bEnabled;
+ ::rtl::OUString m_sTitle;
+ ::rtl::OUString m_sImageURL;
+ ::rtl::OUString m_sTooltip;
+ sal_Int16 m_nTabPageId;
+
+ void Clone_Impl(ControlModelContainerBase& _rClone) const;
+protected:
+ ::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:
+ ControlModelContainerBase( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ControlModelContainerBase( const ControlModelContainerBase& rModel );
+ ~ControlModelContainerBase();
+
+ UnoControlModel* Clone() const;
+
+ // ::com::sun::star::container::XContainer
+ void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::container::XElementAcces
+ ::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::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);
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw(::com::sun::star::uno::RuntimeException);
+ 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);
+ void SAL_CALL removeByName( const ::rtl::OUString& Name ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::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::XMultiServiceFactory
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstance( const ::rtl::OUString& aServiceSpecifier ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArguments( const ::rtl::OUString& ServiceSpecifier, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XComponent
+ void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XTabControllerModel
+ virtual sal_Bool SAL_CALL getGroupControl( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setGroupControl( sal_Bool GroupControl ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setControlModels( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Controls ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > > SAL_CALL getControlModels( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setGroup( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Group, const ::rtl::OUString& GroupName ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getGroupCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL getGroup( sal_Int32 nGroup, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Group, ::rtl::OUString& Name ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL getGroupByName( const ::rtl::OUString& Name, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Group ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XChangesNotifier
+ virtual void SAL_CALL addChangesListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XChangesListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeChangesListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XChangesListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XPropertyChangeListener
+ virtual void SAL_CALL propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XEventListener
+ using cppu::OPropertySetHelper::disposing;
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& evt ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED(ControlModelContainerBase, ControlModel_Base, "toolkit.ControlModelContainerBase" )
+
+ // XInitialization
+ virtual void SAL_CALL initialize (const com::sun::star::uno::Sequence<com::sun::star::uno::Any>& rArguments)
+ throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::tab::XTabPageModel
+ virtual ::sal_Int16 SAL_CALL getTabPageID() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getEnabled() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setEnabled( ::sal_Bool _enabled ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getTitle() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setTitle( const ::rtl::OUString& _title ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getImageURL() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setImageURL( const ::rtl::OUString& _imageurl ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getTooltip() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setTooltip( const ::rtl::OUString& _tooltip ) throw (::com::sun::star::uno::RuntimeException);
+
+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 );
+
+ void implNotifyTabModelChange( const ::rtl::OUString& _rAccessor );
+
+ void implUpdateGroupStructure();
+};
+
+class ResourceListener :public ::com::sun::star::util::XModifyListener,
+ public ::cppu::OWeakObject,
+ public ::cppu::BaseMutex
+{
+ public:
+ ResourceListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& xListener );
+ virtual ~ResourceListener();
+
+ void startListening( const ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceResolver >& rResource );
+ void stopListening();
+
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire() throw ();
+ virtual void SAL_CALL release() throw ();
+
+ // XModifyListener
+ virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
+
+ private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceResolver > m_xResource;
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xListener;
+ bool m_bListening;
+};
+
+typedef ::cppu::AggImplInheritanceHelper2 < UnoControlContainer
+ , ::com::sun::star::container::XContainerListener
+ , ::com::sun::star::util::XChangesListener
+ > ContainerControl_IBase;
+
+class ControlContainerBase : public ContainerControl_IBase
+{
+protected:
+ bool mbSizeModified;
+ bool mbPosModified;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController > mxTabController;
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > mxListener;
+
+ 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 );
+ void ImplUpdateResourceResolver();
+ void ImplStartListingForResourceEvents();
+ ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > Impl_getGraphicFromURL_nothrow( const ::rtl::OUString& _rURL );
+
+ ControlContainerBase();
+
+public:
+ ControlContainerBase( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ~ControlContainerBase();
+
+ DECLIMPL_SERVICEINFO_DERIVED( ControlContainerBase, UnoControlBase, "toolkit.ControlContainerBase" )
+
+ 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);
+
+ // 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 );
+};
+#endif
diff --git a/toolkit/inc/toolkit/controls/dialogcontrol.hxx b/toolkit/inc/toolkit/controls/dialogcontrol.hxx
new file mode 100644
index 000000000000..339ea11bdd8b
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/dialogcontrol.hxx
@@ -0,0 +1,271 @@
+/*************************************************************************
+ *
+ * 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_DIALOG_CONTROL_HXX
+#define TOOLKIT_DIALOG_CONTROL_HXX
+
+#include <toolkit/controls/controlmodelcontainerbase.hxx>
+#include <com/sun/star/awt/XTopWindow.hpp>
+#include <com/sun/star/awt/XDialog2.hpp>
+#include <com/sun/star/awt/XSimpleTabController.hpp>
+#include <com/sun/star/resource/XStringResourceResolver.hpp>
+#include "toolkit/helper/servicenames.hxx"
+#include "toolkit/helper/macros.hxx"
+#include <toolkit/controls/unocontrolcontainer.hxx>
+#include <cppuhelper/basemutex.hxx>
+#include <cppuhelper/implbase3.hxx>
+#include <list>
+
+// ----------------------------------------------------
+// class UnoControlDialogModel
+// ----------------------------------------------------
+
+class UnoControlDialogModel : public ControlModelContainerBase
+{
+protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+public:
+ UnoControlDialogModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoControlDialogModel( const UnoControlDialogModel& rModel );
+ ~UnoControlDialogModel();
+
+ UnoControlModel* Clone() const;
+ // ::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::io::XPersistObject
+ ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoControlDialogModel, ControlModelContainerBase, szServiceName2_UnoControlDialogModel )
+
+};
+
+typedef ::cppu::AggImplInheritanceHelper3 < ControlContainerBase
+ , ::com::sun::star::awt::XTopWindow
+ , ::com::sun::star::awt::XDialog2
+ , ::com::sun::star::awt::XWindowListener
+ > UnoDialogControl_Base;
+class UnoDialogControl : public UnoDialogControl_Base
+{
+private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMenuBar > mxMenuBar;
+ TopWindowListenerMultiplexer maTopWindowListeners;
+ bool mbWindowListener;
+
+public:
+
+ UnoDialogControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ~UnoDialogControl();
+ ::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);
+ void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XTopWindow
+ void SAL_CALL addTopWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTopWindowListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeTopWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTopWindowListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ void SAL_CALL toFront( ) throw (::com::sun::star::uno::RuntimeException);
+ void SAL_CALL toBack( ) throw (::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setMenuBar( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMenuBar >& xMenu ) throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XWindowListener
+ virtual void SAL_CALL windowResized( const ::com::sun::star::awt::WindowEvent& e ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL windowMoved( const ::com::sun::star::awt::WindowEvent& e ) throw (::com::sun::star::uno::RuntimeException);
+ 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::awt::XDialog2
+ virtual void SAL_CALL endDialog( ::sal_Int32 Result ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setHelpId( const rtl::OUString& Id ) throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XDialog
+ void SAL_CALL setTitle( const ::rtl::OUString& Title ) throw(::com::sun::star::uno::RuntimeException);
+ ::rtl::OUString SAL_CALL getTitle() throw(::com::sun::star::uno::RuntimeException);
+ sal_Int16 SAL_CALL execute() throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL endExecute() 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);
+
+ // XModifyListener
+ virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XServiceInfo
+ DECLIMPL_SERVICEINFO( UnoDialogControl, szServiceName2_UnoControlDialog )
+
+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 );
+ virtual void ImplModelPropertiesChanged( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyChangeEvent >& rEvents ) throw(::com::sun::star::uno::RuntimeException);
+protected:
+};
+
+class UnoMultiPageModel : public ControlModelContainerBase
+{
+public:
+ UnoMultiPageModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ~UnoMultiPageModel();
+ UnoMultiPageModel( const UnoMultiPageModel& rModel );
+
+ UnoControlModel* Clone() const;
+
+ DECLIMPL_SERVICEINFO_DERIVED( UnoMultiPageModel, ControlModelContainerBase, 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 ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+};
+
+class UnoMultiPageControl : public ControlContainerBase
+ ,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( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ~UnoMultiPageControl();
+ ::rtl::OUString GetComponentServiceName();
+
+ // ::com::sun::star::lang::XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoMultiPageControl, ControlContainerBase, szServiceName_UnoMultiPageControl )
+ ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return ControlContainerBase::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 ControlModelContainerBase
+{
+public:
+ UnoPageModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ~UnoPageModel();
+ UnoPageModel( const UnoPageModel& rModel );
+
+ UnoControlModel* Clone() const;
+
+ DECLIMPL_SERVICEINFO_DERIVED( UnoPageModel, ControlModelContainerBase, 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 ControlContainerBase
+{
+public:
+ UnoPageControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ~UnoPageControl();
+ ::rtl::OUString GetComponentServiceName();
+
+
+ // ::com::sun::star::lang::XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoPageControl, ControlContainerBase, szServiceName_UnoPageControl )
+};
+
+class UnoFrameModel : public ControlModelContainerBase
+{
+public:
+ UnoFrameModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ~UnoFrameModel();
+ UnoFrameModel( const UnoFrameModel& rModel );
+
+ UnoControlModel* Clone() const;
+
+ DECLIMPL_SERVICEINFO_DERIVED( UnoFrameModel, ControlModelContainerBase, 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 ControlContainerBase
+{
+protected:
+ virtual void ImplSetPosSize( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& rxCtrl );
+public:
+ UnoFrameControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ~UnoFrameControl();
+ ::rtl::OUString GetComponentServiceName();
+
+// ::com::sun::star::lang::XServiceInfo
+DECLIMPL_SERVICEINFO_DERIVED( UnoFrameControl, ControlContainerBase, szServiceName_UnoPageControl )
+};
+
+#endif // TOOLKIT_DIALOG_CONTROL_HXX
diff --git a/toolkit/inc/toolkit/controls/eventcontainer.hxx b/toolkit/inc/toolkit/controls/eventcontainer.hxx
new file mode 100644
index 000000000000..ceabfb2a6fc6
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/eventcontainer.hxx
@@ -0,0 +1,140 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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 <osl/diagnose.h>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/container/XContainer.hpp>
+
+#include <toolkit/helper/listenermultiplexer.hxx>
+
+#include <boost/unordered_map.hpp>
+#include <cppuhelper/implbase2.hxx>
+typedef ::cppu::WeakImplHelper2< ::com::sun::star::container::XNameContainer,
+ ::com::sun::star::container::XContainer > NameContainerHelper;
+
+
+namespace toolkit
+{
+
+// Hashtable to optimize
+struct hashName_Impl
+{
+ size_t operator()(const ::rtl::OUString Str) const
+ {
+ return (size_t)Str.hashCode();
+ }
+};
+
+struct eqName_Impl
+{
+ sal_Bool operator()(const ::rtl::OUString Str1, const ::rtl::OUString Str2) const
+ {
+ return ( Str1 == Str2 );
+ }
+};
+
+typedef boost::unordered_map
+<
+ ::rtl::OUString,
+ sal_Int32,
+ hashName_Impl,
+ eqName_Impl
+>
+NameContainerNameMap;
+
+
+class NameContainer_Impl : public NameContainerHelper
+{
+ NameContainerNameMap mHashMap;
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > mNames;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > mValues;
+ sal_Int32 mnElementCount;
+ ::com::sun::star::uno::Type mType;
+
+ ContainerListenerMultiplexer maContainerListeners;
+
+public:
+ NameContainer_Impl( ::com::sun::star::uno::Type const & aType )
+ : mnElementCount( 0 ),
+ mType( aType ),
+ maContainerListeners( *this )
+ {
+ }
+
+ // Methods XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( )
+ throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( )
+ throw(::com::sun::star::uno::RuntimeException);
+
+ // Methods XNameAccess
+ virtual ::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);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( )
+ throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
+ throw(::com::sun::star::uno::RuntimeException);
+
+ // Methods XNameReplace
+ virtual 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);
+
+ // Methods XNameContainer
+ virtual 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);
+ virtual void SAL_CALL removeByName( const ::rtl::OUString& Name )
+ throw(::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // Methods XContainer
+ void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener )
+ throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener )
+ throw(::com::sun::star::uno::RuntimeException);
+};
+
+class ScriptEventContainer : public NameContainer_Impl
+{
+public:
+ ScriptEventContainer( void );
+};
+
+
+} // namespace toolkit_namecontainer
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/toolkit/controls/formattedcontrol.hxx b/toolkit/inc/toolkit/controls/formattedcontrol.hxx
new file mode 100644
index 000000000000..525e67dc6027
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/formattedcontrol.hxx
@@ -0,0 +1,133 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_FORMATTED_CONTROL_HXX
+#define TOOLKIT_FORMATTED_CONTROL_HXX
+
+#include <toolkit/controls/unocontrols.hxx>
+#include <toolkit/controls/unocontrolmodel.hxx>
+#include <toolkit/helper/servicenames.hxx>
+
+#include <com/sun/star/util/XNumberFormatter.hpp>
+
+//........................................................................
+namespace toolkit
+{
+//........................................................................
+
+ // ===================================================================
+ // = UnoControlFormattedFieldModel
+ // ===================================================================
+ class UnoControlFormattedFieldModel : public UnoControlModel
+ {
+ protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+ ::com::sun::star::uno::Any m_aCachedFormat;
+ bool m_bRevokedAsClient;
+ bool m_bSettingValueAndText;
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >
+ m_xCachedFormatter;
+
+ protected:
+ sal_Bool SAL_CALL convertFastPropertyValue(
+ ::com::sun::star::uno::Any& rConvertedValue,
+ ::com::sun::star::uno::Any& rOldValue,
+ sal_Int32 nPropId,
+ const ::com::sun::star::uno::Any& rValue
+ ) throw (::com::sun::star::lang::IllegalArgumentException);
+
+ void SAL_CALL setFastPropertyValue_NoBroadcast(
+ sal_Int32 nHandle,
+ const ::com::sun::star::uno::Any& rValue
+ ) throw (::com::sun::star::uno::Exception);
+
+ public:
+ UnoControlFormattedFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoControlFormattedFieldModel( const UnoControlFormattedFieldModel& rModel )
+ :UnoControlModel( rModel )
+ {
+ }
+
+ UnoControlModel* Clone() const { return new UnoControlFormattedFieldModel( *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( UnoControlFormattedFieldModel, UnoControlModel, szServiceName2_UnoControlFormattedFieldModel )
+
+ protected:
+ ~UnoControlFormattedFieldModel();
+
+ // XComponent
+ void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XPropertySet
+ void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& PropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Values ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ // UnoControlModel
+ virtual void ImplNormalizePropertySequence(
+ const sal_Int32 _nCount, /// the number of entries in the arrays
+ sal_Int32* _pHandles, /// the handles of the properties to set
+ ::com::sun::star::uno::Any* _pValues, /// the values of the properties to set
+ sal_Int32* _pValidHandles /// pointer to the valid handles, allowed to be adjusted
+ ) const SAL_THROW(());
+ private:
+ void impl_updateTextFromValue_nothrow();
+ void impl_updateCachedFormatter_nothrow();
+ void impl_updateCachedFormatKey_nothrow();
+ };
+
+ // ===================================================================
+ // = UnoFormattedFieldControl
+ // ===================================================================
+ class UnoFormattedFieldControl : public UnoSpinFieldControl
+ {
+ public:
+ UnoFormattedFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ::rtl::OUString GetComponentServiceName();
+
+ // ::com::sun::star::awt::XTextListener
+ void SAL_CALL textChanged( const ::com::sun::star::awt::TextEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoFormattedFieldControl, UnoEditControl, szServiceName2_UnoControlFormattedField )
+ };
+
+//........................................................................
+} // namespace toolkit
+//........................................................................
+
+#endif // TOOLKIT_FORMATTED_CONTROL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/toolkit/controls/geometrycontrolmodel.hxx b/toolkit/inc/toolkit/controls/geometrycontrolmodel.hxx
new file mode 100644
index 000000000000..3bb3e0f3be49
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/geometrycontrolmodel.hxx
@@ -0,0 +1,265 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_HELPERS_GEOMETRYCONTROLMODEL_HXX_
+#define _TOOLKIT_HELPERS_GEOMETRYCONTROLMODEL_HXX_
+
+#include <comphelper/broadcasthelper.hxx>
+#include <comphelper/uno3.hxx>
+#include <comphelper/propagg.hxx>
+#include <comphelper/proparrhlp.hxx>
+#include <comphelper/propertycontainer.hxx>
+#include <cppuhelper/weakagg.hxx>
+#include <cppuhelper/compbase2.hxx>
+#include <com/sun/star/util/XCloneable.hpp>
+#include <com/sun/star/script/XScriptEventsSupplier.hpp>
+#include <com/sun/star/resource/XStringResourceResolver.hpp>
+#include <cppuhelper/typeprovider.hxx>
+#include <comphelper/IdPropArrayHelper.hxx>
+#include <comphelper/stl_types.hxx>
+
+FORWARD_DECLARE_INTERFACE( lang, XMultiServiceFactory )
+FORWARD_DECLARE_INTERFACE( script, XNameContainer )
+
+//........................................................................
+// namespace toolkit
+// {
+//........................................................................
+
+ //====================================================================
+ //= OGeometryControlModel_Base
+ //====================================================================
+ typedef ::cppu::WeakAggComponentImplHelper2 < ::com::sun::star::util::XCloneable
+ , ::com::sun::star::script::XScriptEventsSupplier
+ > OGCM_Base;
+ class OGeometryControlModel_Base
+ :public ::comphelper::OMutexAndBroadcastHelper
+ ,public ::comphelper::OPropertySetAggregationHelper
+ ,public ::comphelper::OPropertyContainer
+ ,public OGCM_Base
+ {
+ protected:
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation >
+ m_xAggregate;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >
+ mxEventContainer;
+
+ // <properties>
+ sal_Int32 m_nPosX;
+ sal_Int32 m_nPosY;
+ sal_Int32 m_nWidth;
+ sal_Int32 m_nHeight;
+ ::rtl::OUString m_aName;
+ sal_Int16 m_nTabIndex;
+ sal_Int32 m_nStep;
+ ::rtl::OUString m_aTag;
+ ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceResolver > m_xStrResolver;
+ // </properties>
+
+ sal_Bool m_bCloneable;
+
+ protected:
+ virtual ::com::sun::star::uno::Any ImplGetDefaultValueByHandle(sal_Int32 nHandle) const;
+ virtual ::com::sun::star::uno::Any ImplGetPropertyValueByHandle(sal_Int32 nHandle) const;
+ virtual void ImplSetPropertyValueByHandle(sal_Int32 nHandle, const :: com::sun::star::uno::Any& aValue);
+
+ protected:
+ /**
+ @param _pAggregateInstance
+ the object to be aggregated. The refcount of the instance given MUST be 0!
+ */
+ OGeometryControlModel_Base(::com::sun::star::uno::XAggregation* _pAggregateInstance);
+
+ /**
+ @param _rxAggregateInstance
+ is the object to be aggregated. Must be aquired excatly once (by the reference object given).<br/>
+ Will be reset to NULL upon leaving
+ */
+ OGeometryControlModel_Base(::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable >& _rxAggregateInstance);
+
+ /** releases the aggregation
+ <p>Can be used if in a derived class, an exception has to be thrown after this base class here already
+ did the aggregation</p>
+ */
+ void releaseAggregation();
+
+ protected:
+ ~OGeometryControlModel_Base();
+
+ // XAggregation
+ ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _aType ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire( ) throw();
+ virtual void SAL_CALL release( ) throw();
+
+ // XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // OPropertySetHelper overridables
+ virtual sal_Bool SAL_CALL convertFastPropertyValue(
+ ::com::sun::star::uno::Any& _rConvertedValue, ::com::sun::star::uno::Any& _rOldValue,
+ sal_Int32 _nHandle, const ::com::sun::star::uno::Any& _rValue )
+ throw (::com::sun::star::lang::IllegalArgumentException);
+
+ virtual void SAL_CALL setFastPropertyValue_NoBroadcast(
+ sal_Int32 _nHandle, const ::com::sun::star::uno::Any& _rValue)
+ throw (::com::sun::star::uno::Exception);
+
+ using comphelper::OPropertySetAggregationHelper::getFastPropertyValue;
+ virtual void SAL_CALL getFastPropertyValue(
+ ::com::sun::star::uno::Any& _rValue, sal_Int32 _nHandle) const;
+
+ // OPropertyStateHelper overridables
+ virtual ::com::sun::star::beans::PropertyState getPropertyStateByHandle(sal_Int32 nHandle);
+ virtual void setPropertyToDefaultByHandle(sal_Int32 nHandle);
+ virtual ::com::sun::star::uno::Any getPropertyDefaultByHandle(sal_Int32 nHandle) const;
+
+ // XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException);
+
+ // OPropertySetAggregationHelper overridables
+ using OPropertySetAggregationHelper::getInfoHelper;
+
+ // XCloneable
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XScriptEventsSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >
+ SAL_CALL getEvents( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XCloneable implementation - to be overwritten
+ virtual OGeometryControlModel_Base* createClone_Impl(
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable >& _rxAggregateInstance) = 0;
+
+ // XComponent
+ using comphelper::OPropertySetAggregationHelper::disposing;
+ virtual void SAL_CALL disposing();
+
+ private:
+ void registerProperties();
+ };
+
+ //====================================================================
+ //= OTemplateInstanceDisambiguation
+ //====================================================================
+ template <class CONTROLMODEL>
+ class OTemplateInstanceDisambiguation
+ {
+ };
+
+ //====================================================================
+ //= OGeometryControlModel
+ //====================================================================
+ /* example for usage:
+ Reference< XAggregation > xIFace = new ::toolkit::OGeometryControlModel< UnoControlButtonModel > ();
+ */
+ template <class CONTROLMODEL>
+ class OGeometryControlModel
+ :public OGeometryControlModel_Base
+ ,public ::comphelper::OAggregationArrayUsageHelper< OTemplateInstanceDisambiguation< CONTROLMODEL > >
+ {
+ public:
+ OGeometryControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+
+ private:
+ OGeometryControlModel(::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable >& _rxAggregateInstance);
+
+ protected:
+ // OAggregationArrayUsageHelper overridables
+ virtual void fillProperties(
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& _rProps,
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& _rAggregateProps
+ ) const;
+
+ // OPropertySetAggregationHelper overridables
+ virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+ // OGeometryControlModel_Base
+ virtual OGeometryControlModel_Base* createClone_Impl(
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable >& _rxAggregateInstance);
+
+ // XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (::com::sun::star::uno::RuntimeException);
+ };
+
+ //====================================================================
+ //= OCommonGeometryControlModel
+ //====================================================================
+ /** allows to extend an arbitrary <type scope="com.sun.star.awt">UnoControlModel</type> with geometry
+ information.
+ */
+ class OCommonGeometryControlModel
+ :public OGeometryControlModel_Base
+ ,public ::comphelper::OIdPropertyArrayUsageHelper< OCommonGeometryControlModel >
+ {
+ private:
+ ::rtl::OUString m_sServiceSpecifier; // the service specifier of our aggregate
+ sal_Int32 m_nPropertyMapId; // our unique property info id, used to look up in s_aAggregateProperties
+
+ public:
+ /** instantiate the model
+
+ @param _rxAgg
+ the instance to aggregate. Must support the <type scope="com.sun.star.awt">UnoControlModel</type>
+ (this is not checked here)
+ */
+ OCommonGeometryControlModel(
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable >& _rxAgg,
+ const ::rtl::OUString& _rxServiceSpecifier
+ );
+
+ // OIdPropertyArrayUsageHelper overridables
+ virtual ::cppu::IPropertyArrayHelper* createArrayHelper(sal_Int32 nId) const;
+
+ // OPropertySetAggregationHelper overridables
+ virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+ // OGeometryControlModel_Base
+ virtual OGeometryControlModel_Base* createClone_Impl(
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable >& _rxAggregateInstance);
+
+ // XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (::com::sun::star::uno::RuntimeException);
+
+ private:
+ virtual void SAL_CALL setFastPropertyValue_NoBroadcast(
+ sal_Int32 _nHandle, const ::com::sun::star::uno::Any& _rValue)
+ throw (::com::sun::star::uno::Exception);
+ };
+
+#include "toolkit/controls/geometrycontrolmodel_impl.hxx"
+
+//........................................................................
+// } // namespace toolkit
+//........................................................................
+
+#endif // _TOOLKIT_HELPERS_GEOMETRYCONTROLMODEL_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/toolkit/controls/geometrycontrolmodel_impl.hxx b/toolkit/inc/toolkit/controls/geometrycontrolmodel_impl.hxx
new file mode 100644
index 000000000000..7eb5d0966282
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/geometrycontrolmodel_impl.hxx
@@ -0,0 +1,98 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+// no include protection. This is included from within geometrycontrolmodel.hxx only
+
+//====================================================================
+//= OGeometryControlModel
+//====================================================================
+//--------------------------------------------------------------------
+template <class CONTROLMODEL>
+OGeometryControlModel<CONTROLMODEL>::OGeometryControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory )
+ :OGeometryControlModel_Base(new CONTROLMODEL( i_factory ) )
+{
+}
+
+//template <class CONTROLMODEL>
+//OGeometryControlModel<CONTROLMODEL>::OGeometryControlModel(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & i_xCompContext)
+// :OGeometryControlModel_Base(new CONTROLMODEL(i_xCompContext))
+//{
+//}
+//
+//--------------------------------------------------------------------
+template <class CONTROLMODEL>
+OGeometryControlModel<CONTROLMODEL>::OGeometryControlModel(::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable >& _rxAggregateInstance)
+ :OGeometryControlModel_Base(_rxAggregateInstance)
+{
+}
+
+//--------------------------------------------------------------------
+template <class CONTROLMODEL>
+::cppu::IPropertyArrayHelper& SAL_CALL OGeometryControlModel<CONTROLMODEL>::getInfoHelper()
+{
+ return *this->getArrayHelper();
+}
+
+//--------------------------------------------------------------------
+template <class CONTROLMODEL>
+void OGeometryControlModel<CONTROLMODEL>::fillProperties(::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& _rProps, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& _rAggregateProps) const
+{
+ // our own properties
+ OPropertyContainer::describeProperties(_rProps);
+ // the aggregate properties
+ if (m_xAggregateSet.is())
+ _rAggregateProps = m_xAggregateSet->getPropertySetInfo()->getProperties();
+}
+
+//--------------------------------------------------------------------
+template <class CONTROLMODEL>
+::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL OGeometryControlModel<CONTROLMODEL>::getImplementationId( ) throw (::com::sun::star::uno::RuntimeException)
+{
+ static ::cppu::OImplementationId * pId = NULL;
+ if ( !pId )
+ {
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+ if ( !pId )
+ {
+ static ::cppu::OImplementationId s_aId;
+ pId = &s_aId;
+ }
+ }
+ return pId->getImplementationId();
+}
+
+//--------------------------------------------------------------------
+template <class CONTROLMODEL>
+OGeometryControlModel_Base* OGeometryControlModel<CONTROLMODEL>::createClone_Impl(
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable >& _rxAggregateInstance)
+{
+ return new OGeometryControlModel<CONTROLMODEL>(_rxAggregateInstance);
+}
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/toolkit/controls/roadmapcontrol.hxx b/toolkit/inc/toolkit/controls/roadmapcontrol.hxx
new file mode 100644
index 000000000000..d570216fbccd
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/roadmapcontrol.hxx
@@ -0,0 +1,209 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_ROADMAP_CONTROL_HXX
+#define TOOLKIT_ROADMAP_CONTROL_HXX
+
+
+#include <toolkit/controls/unocontrols.hxx>
+#include <toolkit/controls/unocontrolmodel.hxx>
+#include <toolkit/helper/servicenames.hxx>
+#include <toolkit/controls/roadmapentry.hxx>
+#include <com/sun/star/container/XContainer.hpp>
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#include <com/sun/star/container/XIndexContainer.hpp>
+#include <com/sun/star/container/XContainerListener.hpp>
+#include <com/sun/star/awt/XItemListener.hpp>
+#include <com/sun/star/awt/XItemEventBroadcaster.hpp>
+#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/implbase3.hxx>
+#include <cppuhelper/implbase4.hxx>
+
+
+#include <comphelper/uno3.hxx>
+
+//........................................................................
+namespace toolkit
+{
+//........................................................................
+
+ typedef GraphicControlModel UnoControlRoadmapModel_Base;
+
+
+ typedef ::cppu::ImplHelper3 < ::com::sun::star::lang::XSingleServiceFactory
+ , ::com::sun::star::container::XContainer
+ , ::com::sun::star::container::XIndexContainer
+ > UnoControlRoadmapModel_IBase;
+
+
+
+ typedef UnoControlBase UnoControlRoadmap_Base;
+ typedef ::cppu::ImplHelper4 < ::com::sun::star::awt::XItemEventBroadcaster
+ , ::com::sun::star::container::XContainerListener
+ , ::com::sun::star::awt::XItemListener
+ , ::com::sun::star::beans::XPropertyChangeListener
+ > UnoControlRoadmap_IBase;
+
+
+
+
+ typedef ::cppu::ImplHelper2< ::com::sun::star::container::XContainerListener,
+ ::com::sun::star::awt::XItemEventBroadcaster> SVTXRoadmap_Base;
+
+
+ using namespace ::com::sun::star::uno;
+ using namespace ::com::sun::star::awt;
+ using namespace ::com::sun::star::lang;
+ using namespace ::com::sun::star::beans;
+ using namespace ::com::sun::star::container;
+
+
+ // ===================================================================
+ // = UnoControlRoadmapModel
+ // ===================================================================
+ class UnoControlRoadmapModel : public UnoControlRoadmapModel_Base,
+ public UnoControlRoadmapModel_IBase
+
+ {
+ private:
+// PropertyChangeListenerMultiplexer maPropertyListeners;
+
+ typedef ::std::vector< Reference< XInterface > > RoadmapItemHolderList;
+
+ ContainerListenerMultiplexer maContainerListeners;
+ RoadmapItemHolderList maRoadmapItems;
+
+ void MakeRMItemValidation( sal_Int32 Index, Reference< XInterface > xRoadmapItem );
+ ContainerEvent GetContainerEvent(sal_Int32 Index, Reference< XInterface > );
+ void SetRMItemDefaultProperties( const sal_Int32 _Index, Reference< XInterface > );
+ sal_Int16 GetCurrentItemID( Reference< XPropertySet > xPropertySet );
+ sal_Int32 GetUniqueID();
+
+
+ protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+ public:
+ UnoControlRoadmapModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoControlRoadmapModel( const UnoControlRoadmapModel& rModel ) :
+ UnoControlRoadmapModel_Base( rModel ),
+ UnoControlRoadmapModel_IBase( rModel ),
+ maContainerListeners( *this ) {}
+ UnoControlModel* Clone() const { return new UnoControlRoadmapModel( *this ); }
+
+
+ // XTypeProvider
+ DECLARE_XTYPEPROVIDER( )
+
+
+ // ::com::sun::star::io::XPersistObject
+ ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XServiceInfo
+ 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 );
+
+ virtual void SAL_CALL insertByIndex( sal_Int32 Index, const Any & _Element) throw (IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException );
+ virtual void SAL_CALL removeByIndex( sal_Int32 Index ) throw (IndexOutOfBoundsException, WrappedTargetException, RuntimeException );
+ virtual void SAL_CALL replaceByIndex( sal_Int32 Index, const Any & _Element) throw (IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException );
+
+ 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 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() { UnoControlRoadmapModel_Base::acquire(); }
+ void SAL_CALL release() throw() { UnoControlRoadmapModel_Base::release(); }
+
+
+ // ::com::sun::star::beans::XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw (::com::sun::star::uno::RuntimeException);
+
+
+ virtual Reference< XInterface > SAL_CALL createInstance( ) throw (Exception, RuntimeException);
+ virtual Reference< XInterface > SAL_CALL createInstanceWithArguments( const Sequence< Any >& aArguments ) throw (Exception, RuntimeException);
+
+ virtual Type SAL_CALL getElementType() throw (RuntimeException);
+
+ virtual sal_Bool SAL_CALL hasElements() throw (RuntimeException);
+
+ };
+
+
+ // ===================================================================
+ // = UnoRoadmapControl
+ // ===================================================================
+ class UnoRoadmapControl : public UnoControlRoadmap_Base,
+ public UnoControlRoadmap_IBase
+ {
+ private:
+ ItemListenerMultiplexer maItemListeners;
+ public:
+ UnoRoadmapControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ::rtl::OUString GetComponentServiceName();
+
+ void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { UnoControlBase::disposing( Source ); }
+
+ void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
+
+
+ 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 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);
+
+ virtual void SAL_CALL addItemListener( const Reference< XItemListener >& l ) throw (RuntimeException);
+ virtual void SAL_CALL removeItemListener( const Reference< XItemListener >& l ) throw (RuntimeException);
+
+
+ virtual void SAL_CALL itemStateChanged( const ItemEvent& rEvent ) throw (RuntimeException);
+
+ virtual void SAL_CALL propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XTypeProvider
+ DECLARE_XTYPEPROVIDER( )
+ DECLARE_XINTERFACE()
+
+ // ::com::sun::star::lang::XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoRoadmapControl, UnoControlBase, szServiceName2_UnoControlRoadmap )
+ };
+
+//........................................................................
+} // toolkit
+//........................................................................
+
+
+
+#endif // _TOOLKIT_ROADMAP_CONTROL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/toolkit/controls/roadmapentry.hxx b/toolkit/inc/toolkit/controls/roadmapentry.hxx
new file mode 100644
index 000000000000..71ab5752012e
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/roadmapentry.hxx
@@ -0,0 +1,93 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_ROADMAPENTRY_HXX_
+#define _TOOLKIT_ROADMAPENTRY_HXX_
+
+#include <cppuhelper/implbase1.hxx>
+#include <comphelper/uno3.hxx>
+#include <comphelper/broadcasthelper.hxx>
+#include <comphelper/propertycontainer.hxx>
+#include <comphelper/proparrhlp.hxx>
+#include <comphelper/proparrhlp.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+
+
+#define RM_PROPERTY_ID_LABEL 1
+#define RM_PROPERTY_ID_ID 2
+#define RM_PROPERTY_ID_ENABLED 4
+#define RM_PROPERTY_ID_INTERACTIVE 5
+
+typedef ::cppu::WeakImplHelper1 < ::com::sun::star::lang::XServiceInfo
+ > ORoadmapEntry_Base;
+
+class ORoadmapEntry :public ORoadmapEntry_Base
+ ,public ::comphelper::OMutexAndBroadcastHelper
+ ,public ::comphelper::OPropertyContainer
+ ,public ::comphelper::OPropertyArrayUsageHelper< ORoadmapEntry >
+{
+
+public:
+ ORoadmapEntry();
+
+protected:
+ DECLARE_XINTERFACE() // merge XInterface implementations
+ DECLARE_XTYPEPROVIDER() // merge XTypeProvider implementations
+
+ /// @see ::com::sun::star::beans::XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
+ SAL_CALL getPropertySetInfo()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // OPropertySetHelper
+ virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+ // OPropertyArrayUsageHelper
+ virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const;
+
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
+
+
+ // other stuff
+ // ...
+ // (e.g. DECLARE_SERVICE_INFO();)
+
+protected:
+ // <properties>
+ ::rtl::OUString m_sLabel;
+ sal_Int32 m_nID;
+ sal_Bool m_bEnabled;
+ sal_Bool m_bInteractive;
+
+ // </properties>
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/toolkit/controls/spinningprogress.hxx b/toolkit/inc/toolkit/controls/spinningprogress.hxx
new file mode 100644
index 000000000000..e0a676b2aa86
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/spinningprogress.hxx
@@ -0,0 +1,70 @@
+/*************************************************************************
+ * 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_SPINNINGPROGRESS_HXX
+#define TOOLKIT_SPINNINGPROGRESS_HXX
+
+#include "toolkit/controls/animatedimages.hxx"
+
+/** === begin UNO includes === **/
+/** === end UNO includes === **/
+
+//......................................................................................................................
+namespace toolkit
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //= SpinningProgressControlModel
+ //==================================================================================================================
+ typedef AnimatedImagesControlModel SpinningProgressControlModel_Base;
+ class SpinningProgressControlModel : public SpinningProgressControlModel_Base
+ {
+ public:
+ SpinningProgressControlModel( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > const & i_factory );
+ SpinningProgressControlModel( const SpinningProgressControlModel& i_copySource );
+
+ virtual UnoControlModel* Clone() const;
+
+ // XPropertySet
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XPersistObject
+ ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ ::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:
+ ~SpinningProgressControlModel();
+ };
+
+//......................................................................................................................
+} // namespace toolkit
+//......................................................................................................................
+
+#endif // TOOLKIT_SPINNINGPROGRESS_HXX
diff --git a/toolkit/inc/toolkit/controls/stdtabcontroller.hxx b/toolkit/inc/toolkit/controls/stdtabcontroller.hxx
new file mode 100644
index 000000000000..847f8a057b36
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/stdtabcontroller.hxx
@@ -0,0 +1,96 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_CONTROLS_STDTABCONTROLLER_HXX_
+#define _TOOLKIT_CONTROLS_STDTABCONTROLLER_HXX_
+
+
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/awt/XTabController.hpp>
+#include <com/sun/star/awt/XControl.hpp>
+#include <com/sun/star/awt/XControlContainer.hpp>
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#include <cppuhelper/weakagg.hxx>
+#include <osl/mutex.hxx>
+#include <toolkit/helper/macros.hxx>
+#include <toolkit/helper/servicenames.hxx>
+
+
+class StdTabController : public ::com::sun::star::awt::XTabController,
+ public ::com::sun::star::lang::XServiceInfo,
+ public ::com::sun::star::lang::XTypeProvider,
+ public ::cppu::OWeakAggObject
+{
+private:
+ ::osl::Mutex maMutex;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel > mxModel;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > mxControlContainer;
+
+protected:
+ ::osl::Mutex& GetMutex() { return maMutex; }
+ sal_Bool ImplCreateComponentSequence( ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > >& rControls, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& rModels, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > >& rComponents, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any>* pTabStops, sal_Bool bPeerComponent ) const;
+ // wenn rModels kuerzer als rControls ist, werden nur die rModels entsprechenden Elemente geliefert und die korrespondierenden Elemente aus rControls entfernt
+ void ImplActivateControl( sal_Bool bFirst ) const;
+
+public:
+ StdTabController();
+ ~StdTabController();
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > FindControl( ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > >& rCtrls, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > & rxCtrlModel );
+
+ // ::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) { return OWeakAggObject::queryInterface(rType); }
+ void SAL_CALL acquire() throw() { OWeakAggObject::acquire(); }
+ void SAL_CALL release() throw() { OWeakAggObject::release(); }
+
+ ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) 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);
+
+ // XTabController
+ void SAL_CALL setModel( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel >& Model ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel > SAL_CALL getModel( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setContainer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& Container ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > SAL_CALL getContainer( ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > > SAL_CALL getControls( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL autoTabOrder( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL activateTabOrder( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL activateFirst( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL activateLast( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ DECLIMPL_SERVICEINFO( StdTabController, szServiceName2_TabController )
+};
+
+
+
+#endif // _TOOLKIT_AWT_STDTABCONTROLLER_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/toolkit/controls/stdtabcontrollermodel.hxx b/toolkit/inc/toolkit/controls/stdtabcontrollermodel.hxx
new file mode 100644
index 000000000000..322faee119bb
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/stdtabcontrollermodel.hxx
@@ -0,0 +1,147 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_CONTROLS_STDTABCONTROLLERMODEL_HXX_
+#define _TOOLKIT_CONTROLS_STDTABCONTROLLERMODEL_HXX_
+
+
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/io/XPersistObject.hpp>
+#include <com/sun/star/awt/XTabControllerModel.hpp>
+#include <com/sun/star/awt/XWindow.hpp>
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <cppuhelper/weakagg.hxx>
+#include <toolkit/helper/macros.hxx>
+#include <toolkit/helper/servicenames.hxx>
+#include <osl/mutex.hxx>
+
+#include <tools/gen.hxx>
+#include <vector>
+
+struct UnoControlModelEntry;
+typedef ::std::vector< UnoControlModelEntry* > UnoControlModelEntryListBase;
+
+class UnoControlModelEntryList
+{
+private:
+ UnoControlModelEntryListBase maList;
+ ::rtl::OUString maGroupName;
+
+public:
+ UnoControlModelEntryList();
+ ~UnoControlModelEntryList();
+
+ const ::rtl::OUString& GetName() const { return maGroupName; }
+ void SetName( const ::rtl::OUString& rName ) { maGroupName = rName; }
+
+ void Reset();
+ void DestroyEntry( size_t nEntry );
+ size_t size() const;
+ UnoControlModelEntry* operator[]( size_t i ) const;
+ void push_back( UnoControlModelEntry* item );
+ void insert( size_t i, UnoControlModelEntry* item );
+};
+
+struct UnoControlModelEntry
+{
+ sal_Bool bGroup;
+ union
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >* pxControl;
+ UnoControlModelEntryList* pGroup;
+ };
+};
+
+struct ComponentEntry
+{
+ ::com::sun::star::awt::XWindow* pComponent;
+ Point aPos;
+};
+
+typedef ::std::vector< ComponentEntry* > ComponentEntryList;
+
+#define CONTROLPOS_NOTFOUND 0xFFFFFFFF
+
+class StdTabControllerModel : public ::com::sun::star::awt::XTabControllerModel,
+ public ::com::sun::star::lang::XServiceInfo,
+ public ::com::sun::star::io::XPersistObject,
+ public ::com::sun::star::lang::XTypeProvider,
+ public ::cppu::OWeakAggObject
+{
+private:
+ ::osl::Mutex maMutex;
+ UnoControlModelEntryList maControls;
+ sal_Bool mbGroupControl;
+
+protected:
+ ::osl::Mutex& GetMutex() { return maMutex; }
+ sal_uInt32 ImplGetControlCount( const UnoControlModelEntryList& rList ) const;
+ void ImplGetControlModels( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > ** pRefs, const UnoControlModelEntryList& rList ) const;
+ void ImplSetControlModels( UnoControlModelEntryList& rList, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Controls ) const;
+ sal_uInt32 ImplGetControlPos( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > xCtrl, const UnoControlModelEntryList& rList ) const;
+
+public:
+ StdTabControllerModel();
+ ~StdTabControllerModel();
+
+ // ::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) { return OWeakAggObject::queryInterface(rType); }
+ void SAL_CALL acquire() throw() { OWeakAggObject::acquire(); }
+ void SAL_CALL release() throw() { OWeakAggObject::release(); }
+
+ ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) 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);
+
+ // ::com::sun::star::awt::XTabControllerModel
+ sal_Bool SAL_CALL getGroupControl( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setGroupControl( sal_Bool GroupControl ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setControlModels( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Controls ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > > SAL_CALL getControlModels( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setGroup( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Group, const ::rtl::OUString& GroupName ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Int32 SAL_CALL getGroupCount( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL getGroup( sal_Int32 nGroup, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Group, ::rtl::OUString& Name ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL getGroupByName( const ::rtl::OUString& Name, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Group ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::io::XPersistObject
+ ::rtl::OUString SAL_CALL getServiceName( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL write( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream >& OutStream ) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
+ void SAL_CALL read( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectInputStream >& InStream ) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ DECLIMPL_SERVICEINFO( StdTabControllerModel, szServiceName2_TabControllerModel )
+};
+
+
+
+#endif // _TOOLKIT_HELPER_STDTABCONTROLLERMODEL_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/toolkit/controls/tabpagecontainer.hxx b/toolkit/inc/toolkit/controls/tabpagecontainer.hxx
new file mode 100644
index 000000000000..c7a2e3b8ef90
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/tabpagecontainer.hxx
@@ -0,0 +1,147 @@
+/*************************************************************************
+ *
+ * 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_TABPAGE_CONTAINER_HXX
+#define TOOLKIT_TABPAGE_CONTAINER_HXX
+
+#include <com/sun/star/awt/tab/XTabPageContainer.hpp>
+#include <com/sun/star/awt/tab/XTabPageContainerModel.hpp>
+#include <com/sun/star/awt/tab/XTabPageContainerListener.hpp>
+#include <com/sun/star/awt/tab/XTabPage.hpp>
+#include <com/sun/star/awt/tab/XTabPageModel.hpp>
+#include <toolkit/controls/unocontrolbase.hxx>
+#include <toolkit/controls/unocontrolmodel.hxx>
+#include <toolkit/helper/servicenames.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <comphelper/sequence.hxx>
+#include <toolkit/controls/controlmodelcontainerbase.hxx>
+#include <toolkit/controls/unocontrolmodel.hxx>
+#include <toolkit/helper/listenermultiplexer.hxx>
+
+using namespace ::com::sun::star::uno;
+//using namespace ::com::sun::star::awt;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::container;
+
+// ------------------------------------------------------------------
+// class ::com::sun::star::awt::tab::UnoControlTabPageContainerModel
+// ------------------------------------------------------------------
+typedef ::cppu::AggImplInheritanceHelper1 < UnoControlModel
+ , ::com::sun::star::awt::tab::XTabPageContainerModel
+ > UnoControlTabPageContainerModel_Base;
+class UnoControlTabPageContainerModel : public UnoControlTabPageContainerModel_Base
+{
+private:
+ std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPageModel > > m_aTabPageVector;
+ ContainerListenerMultiplexer maContainerListeners;
+protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+ // ::com::sun::star::beans::XMultiPropertySet
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+
+public:
+ UnoControlTabPageContainerModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoControlTabPageContainerModel( const UnoControlTabPageContainerModel& rModel ) : UnoControlTabPageContainerModel_Base( rModel ),maContainerListeners( *this ) {;}
+
+ UnoControlModel* Clone() const { return new UnoControlTabPageContainerModel( *this ); }
+
+ // ::com::sun::star::io::XPersistObject
+ ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoControlTabPageContainerModel, UnoControlModel, szServiceName_UnoControlTabPageContainerModel )
+ // XIndexContainer
+ virtual 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);
+ virtual void SAL_CALL removeByIndex( sal_Int32 Index )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ // XIndexReplace
+ virtual 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);
+
+ // XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount() throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::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);
+
+ // XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw (::com::sun::star::uno::RuntimeException);
+ //{
+ //return ::getCppuType((com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >*)0);
+ //}
+
+ virtual sal_Bool SAL_CALL hasElements() throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::container::XContainer
+ void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+};
+// ===================================================================
+// = UnoControlTabPageContainer
+// ===================================================================
+typedef ::cppu::AggImplInheritanceHelper1 < ControlContainerBase
+ , ::com::sun::star::awt::tab::XTabPageContainer
+ > UnoControlTabPageContainer_Base;
+class UnoControlTabPageContainer : public UnoControlTabPageContainer_Base
+{
+public:
+ UnoControlTabPageContainer( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ::rtl::OUString GetComponentServiceName();
+
+ // ::com::sun::star::lang::XComponent
+ void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XControl
+ 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::tab::XTabPageContainer
+ virtual ::sal_Int16 SAL_CALL getActiveTabPageID() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setActiveTabPageID( ::sal_Int16 _activetabpageid ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getTabPageCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL isTabPageActive( ::sal_Int16 tabPageIndex ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL getTabPage( ::sal_Int16 tabPageIndex ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL getTabPageByID( ::sal_Int16 tabPageID ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addTabPageListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeTabPageListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL addControl( const ::rtl::OUString& Name, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& Control ) throw (::com::sun::star::uno::RuntimeException);
+ // ::com::sun::star::lang::XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoControlTabPageContainer, UnoControlBase, szServiceName_UnoControlTabPageContainer )
+
+// using UnoControl::getPeer;
+protected:
+ virtual void updateFromModel();
+private:
+ TabPageListenerMultiplexer m_aTabPageListeners;
+ sal_Int16 m_nActiveTabPageId;
+};
+
+#endif // _TOOLKIT_TABPAGE_CONTAINER_HXX
diff --git a/toolkit/inc/toolkit/controls/tabpagemodel.hxx b/toolkit/inc/toolkit/controls/tabpagemodel.hxx
new file mode 100644
index 000000000000..08938669fa58
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/tabpagemodel.hxx
@@ -0,0 +1,146 @@
+/*************************************************************************
+ *
+ * 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_TABPAGE_MODEL_HXX
+#define TOOLKIT_TABPAGE_MODEL_HXX
+
+#include <toolkit/controls/controlmodelcontainerbase.hxx>
+#include <com/sun/star/awt/tab/XTabPageModel.hpp>
+#include <com/sun/star/awt/tab/XTabPage.hpp>
+#include <com/sun/star/resource/XStringResourceResolver.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include "toolkit/helper/servicenames.hxx"
+#include "toolkit/helper/macros.hxx"
+#include <toolkit/controls/unocontrolcontainer.hxx>
+#include <cppuhelper/basemutex.hxx>
+#include <list>
+#include <cppuhelper/implbase2.hxx>
+
+// ----------------------------------------------------
+// class TabPageModel
+// ----------------------------------------------------
+//typedef ::cppu::ImplHelper2< ::com::sun::star::awt::tab::XTabPageModel,
+// ::com::sun::star::lang::XInitialization
+// > TabPageAccess_BASE;
+//
+//class TabPageModel : public TabPageAccess_BASE
+//{
+//
+//private:
+// bool m_bEnabled;
+// ::rtl::OUString m_sTitle;
+// ::rtl::OUString m_sImageURL;
+// ::rtl::OUString m_sTooltip;
+// sal_Int16 m_nTabPageId;
+//
+//public:
+// TabPageModel();
+// explicit TabPageModel( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xCompContext);
+// ~TabPageModel();
+//
+// // XInitialization
+// virtual void SAL_CALL initialize (const com::sun::star::uno::Sequence<com::sun::star::uno::Any>& rArguments)
+// throw (com::sun::star::uno::Exception, 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);
+// 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);
+//
+// // ::com::sun::star::awt::tab::XTabPageModel
+// virtual ::sal_Int16 SAL_CALL getTabPageID() throw (::com::sun::star::uno::RuntimeException);
+// virtual ::sal_Bool SAL_CALL getEnabled() throw (::com::sun::star::uno::RuntimeException);
+// virtual void SAL_CALL setEnabled( ::sal_Bool _enabled ) throw (::com::sun::star::uno::RuntimeException);
+// virtual ::rtl::OUString SAL_CALL getTitle() throw (::com::sun::star::uno::RuntimeException);
+// virtual void SAL_CALL setTitle( const ::rtl::OUString& _title ) throw (::com::sun::star::uno::RuntimeException);
+// virtual ::rtl::OUString SAL_CALL getImageURL() throw (::com::sun::star::uno::RuntimeException);
+// virtual void SAL_CALL setImageURL( const ::rtl::OUString& _imageurl ) throw (::com::sun::star::uno::RuntimeException);
+// virtual ::rtl::OUString SAL_CALL getTooltip() throw (::com::sun::star::uno::RuntimeException);
+// virtual void SAL_CALL setTooltip( const ::rtl::OUString& _tooltip ) throw (::com::sun::star::uno::RuntimeException);
+//};
+// ----------------------------------------------------
+// class UnoControlTabPageModel
+// ----------------------------------------------------
+
+class UnoControlTabPageModel : public ControlModelContainerBase
+ //public TabPageModel
+{
+protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+public:
+ UnoControlTabPageModel( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > const & i_factory);
+
+ // ::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);
+ // XInitialization
+ virtual void SAL_CALL initialize (const com::sun::star::uno::Sequence<com::sun::star::uno::Any>& rArguments)
+ throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoControlTabPageModel, ControlModelContainerBase, szServiceName_UnoControlTabPageModel )
+
+};
+
+// ----------------------------------------------------
+// class UnoTabPageControl
+// ----------------------------------------------------
+typedef ::cppu::AggImplInheritanceHelper2 < ControlContainerBase
+ , ::com::sun::star::awt::tab::XTabPage
+ , ::com::sun::star::awt::XWindowListener
+ > UnoControlTabPage_Base;
+class UnoControlTabPage : public UnoControlTabPage_Base
+{
+private:
+ bool m_bWindowListener;
+public:
+
+ UnoControlTabPage( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ~UnoControlTabPage();
+ ::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);
+ void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XWindowListener
+ virtual void SAL_CALL windowResized( const ::com::sun::star::awt::WindowEvent& e ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL windowMoved( const ::com::sun::star::awt::WindowEvent& e ) throw (::com::sun::star::uno::RuntimeException);
+ 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::lang::XServiceInfo
+ DECLIMPL_SERVICEINFO( UnoControlTabPage, szServiceName_UnoControlTabPage)
+};
+
+#endif // TOOLKIT_TABPAGE_MODEL_HXX
diff --git a/toolkit/inc/toolkit/controls/tkscrollbar.hxx b/toolkit/inc/toolkit/controls/tkscrollbar.hxx
new file mode 100644
index 000000000000..d51dceef32c2
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/tkscrollbar.hxx
@@ -0,0 +1,127 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_TOOLKIT_CONTROLS_TKSCROLLBAR_HXX
+#define TOOLKIT_TOOLKIT_CONTROLS_TKSCROLLBAR_HXX
+
+#include <toolkit/controls/unocontrolmodel.hxx>
+#include <toolkit/helper/servicenames.hxx>
+#include <toolkit/controls/unocontrolbase.hxx>
+#include <toolkit/helper/macros.hxx>
+#include <com/sun/star/awt/XScrollBar.hpp>
+#include <com/sun/star/awt/XAdjustmentListener.hpp>
+#include <com/sun/star/awt/AdjustmentType.hpp>
+
+//........................................................................
+namespace toolkit
+{
+//........................................................................
+
+ //====================================================================
+ //= UnoControlScrollBarModel
+ //====================================================================
+ class UnoControlScrollBarModel : public UnoControlModel
+ {
+ protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+ public:
+ UnoControlScrollBarModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoControlScrollBarModel( const UnoControlScrollBarModel& rModel ) : UnoControlModel( rModel ) {;}
+
+ UnoControlModel* Clone() const { return new UnoControlScrollBarModel( *this ); }
+
+ // ::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::io::XPersistObject
+ ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoControlScrollBarModel, UnoControlModel, szServiceName2_UnoControlScrollBarModel )
+ };
+
+ //====================================================================
+ //= UnoControlScrollBarModel
+ //====================================================================
+ class UnoScrollBarControl : public UnoControlBase,
+ public ::com::sun::star::awt::XAdjustmentListener,
+ public ::com::sun::star::awt::XScrollBar
+ {
+ private:
+ AdjustmentListenerMultiplexer maAdjustmentListeners;
+
+ public:
+ UnoScrollBarControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ::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 UnoControlBase::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 disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { UnoControlBase::disposing( Source ); }
+ 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);
+ ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XAdjustmentListener
+ void SAL_CALL adjustmentValueChanged( const ::com::sun::star::awt::AdjustmentEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XScrollBar
+ void SAL_CALL addAdjustmentListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XAdjustmentListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeAdjustmentListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XAdjustmentListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setValue( sal_Int32 n ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setValues( sal_Int32 nValue, sal_Int32 nVisible, sal_Int32 nMax ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Int32 SAL_CALL getValue( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setMaximum( sal_Int32 n ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Int32 SAL_CALL getMaximum( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setLineIncrement( sal_Int32 n ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Int32 SAL_CALL getLineIncrement( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setBlockIncrement( sal_Int32 n ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Int32 SAL_CALL getBlockIncrement( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setVisibleSize( sal_Int32 n ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Int32 SAL_CALL getVisibleSize( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setOrientation( sal_Int32 n ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Int32 SAL_CALL getOrientation( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoScrollBarControl, UnoControlBase, szServiceName2_UnoControlScrollBar )
+ };
+
+
+
+//........................................................................
+} // namespacetoolkit
+//........................................................................
+
+#endif // TOOLKIT_TOOLKIT_CONTROLS_TKSCROLLBAR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/toolkit/controls/tksimpleanimation.hxx b/toolkit/inc/toolkit/controls/tksimpleanimation.hxx
new file mode 100644
index 000000000000..944d9cfcb1fe
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/tksimpleanimation.hxx
@@ -0,0 +1,104 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_CONTROLS_TKSIMPLEANIMATION_HXX
+#define TOOLKIT_CONTROLS_TKSIMPLEANIMATION_HXX
+
+#include <toolkit/controls/unocontrolmodel.hxx>
+#include <toolkit/helper/servicenames.hxx>
+#include <toolkit/controls/unocontrolbase.hxx>
+#include <toolkit/helper/macros.hxx>
+#include <com/sun/star/graphic/XGraphic.hpp>
+#include <com/sun/star/awt/XSimpleAnimation.hpp>
+#include <comphelper/uno3.hxx>
+#include <cppuhelper/implbase1.hxx>
+
+//........................................................................
+namespace toolkit
+{
+//........................................................................
+
+ //====================================================================
+ //= UnoSimpleAnimationControlModel
+ //====================================================================
+ class UnoSimpleAnimationControlModel : public UnoControlModel
+ {
+ protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+ public:
+ UnoSimpleAnimationControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoSimpleAnimationControlModel( const UnoSimpleAnimationControlModel& rModel ) : UnoControlModel( rModel ) {;}
+
+ UnoControlModel* Clone() const { return new UnoSimpleAnimationControlModel( *this ); }
+
+ // XMultiPropertySet
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XPersistObject
+ ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ ::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);
+ };
+
+ //====================================================================
+ //= UnoSimpleAnimationControl
+ //====================================================================
+
+ typedef ::cppu::AggImplInheritanceHelper1 < UnoControlBase
+ , ::com::sun::star::awt::XSimpleAnimation
+ > UnoSimpleAnimationControl_Base;
+
+ class UnoSimpleAnimationControl : public UnoSimpleAnimationControl_Base
+ {
+ private:
+
+ public:
+ UnoSimpleAnimationControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ::rtl::OUString GetComponentServiceName();
+
+ // XSimpleAnimation
+ virtual void SAL_CALL start() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL stop() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setImageList( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > >& ImageList )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ ::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);
+ };
+
+//........................................................................
+} // namespacetoolkit
+//........................................................................
+
+#endif // TOOLKIT_CONTROLS_TKSIMPLEANIMATION_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/toolkit/controls/tkspinbutton.hxx b/toolkit/inc/toolkit/controls/tkspinbutton.hxx
new file mode 100644
index 000000000000..6be8c21e0d0d
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/tkspinbutton.hxx
@@ -0,0 +1,130 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_CONTROLS_TKSPINBUTTON_HXX
+#define TOOLKIT_CONTROLS_TKSPINBUTTON_HXX
+
+#include <toolkit/controls/unocontrolmodel.hxx>
+#include <toolkit/helper/servicenames.hxx>
+#include <toolkit/controls/unocontrolbase.hxx>
+#include <toolkit/helper/macros.hxx>
+#include <com/sun/star/awt/XSpinValue.hpp>
+#include <com/sun/star/awt/XAdjustmentListener.hpp>
+#include <comphelper/uno3.hxx>
+#include <cppuhelper/implbase2.hxx>
+
+//........................................................................
+namespace toolkit
+{
+//........................................................................
+
+ //====================================================================
+ //= UnoSpinButtonModel
+ //====================================================================
+ class UnoSpinButtonModel : public UnoControlModel
+ {
+ protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+ public:
+ UnoSpinButtonModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoSpinButtonModel( const UnoSpinButtonModel& rModel ) : UnoControlModel( rModel ) {;}
+
+ UnoControlModel* Clone() const { return new UnoSpinButtonModel( *this ); }
+
+ // XMultiPropertySet
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XPersistObject
+ ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ ::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);
+ };
+
+ //====================================================================
+ //= UnoSpinButtonControl
+ //====================================================================
+
+ typedef ::cppu::ImplHelper2 < ::com::sun::star::awt::XAdjustmentListener
+ , ::com::sun::star::awt::XSpinValue
+ > UnoSpinButtonControl_Base;
+
+ class UnoSpinButtonControl :public UnoControlBase
+ ,public UnoSpinButtonControl_Base
+ {
+ private:
+ AdjustmentListenerMultiplexer maAdjustmentListeners;
+
+ public:
+ UnoSpinButtonControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ::rtl::OUString GetComponentServiceName();
+
+ DECLARE_UNO3_AGG_DEFAULTS( UnoSpinButtonControl, UnoControlBase );
+ ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) 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 disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { UnoControlBase::disposing( Source ); }
+ void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XTypeProvider
+ DECLARE_XTYPEPROVIDER()
+
+ // XAdjustmentListener
+ void SAL_CALL adjustmentValueChanged( const ::com::sun::star::awt::AdjustmentEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XSpinValue
+ virtual void SAL_CALL addAdjustmentListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XAdjustmentListener >& listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeAdjustmentListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XAdjustmentListener >& listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setValue( sal_Int32 value ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setValues( sal_Int32 minValue, sal_Int32 maxValue, sal_Int32 currentValue ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getValue( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setMinimum( sal_Int32 minValue ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setMaximum( sal_Int32 maxValue ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getMinimum( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getMaximum( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setSpinIncrement( sal_Int32 spinIncrement ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSpinIncrement( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setOrientation( sal_Int32 orientation ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getOrientation( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ ::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);
+ };
+
+
+
+//........................................................................
+} // namespacetoolkit
+//........................................................................
+
+#endif // TOOLKIT_CONTROLS_TKSPINBUTTON_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/toolkit/controls/tkthrobber.hxx b/toolkit/inc/toolkit/controls/tkthrobber.hxx
new file mode 100644
index 000000000000..0add98c51b85
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/tkthrobber.hxx
@@ -0,0 +1,112 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_CONTROLS_TKTHROBBER_HXX
+#define TOOLKIT_CONTROLS_TKTHROBBER_HXX
+
+#include <toolkit/controls/unocontrolmodel.hxx>
+#include <toolkit/helper/servicenames.hxx>
+#include <toolkit/controls/unocontrolbase.hxx>
+#include <toolkit/helper/macros.hxx>
+#include <com/sun/star/graphic/XGraphic.hpp>
+#include <com/sun/star/awt/XThrobber.hpp>
+#include <comphelper/uno3.hxx>
+#include <cppuhelper/implbase1.hxx>
+
+//........................................................................
+namespace toolkit
+{
+//........................................................................
+
+ //====================================================================
+ //= UnoThrobberControlModel
+ //====================================================================
+ class UnoThrobberControlModel : public UnoControlModel
+ {
+ protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+ public:
+ UnoThrobberControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoThrobberControlModel( const UnoThrobberControlModel& rModel ) : UnoControlModel( rModel ) {;}
+
+ UnoControlModel* Clone() const { return new UnoThrobberControlModel( *this ); }
+
+ // XMultiPropertySet
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XPersistObject
+ ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ ::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);
+ };
+
+ //====================================================================
+ //= UnoThrobberControl
+ //====================================================================
+
+ typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XThrobber
+ > UnoThrobberControl_Base;
+
+ class UnoThrobberControl :public UnoControlBase
+ ,public UnoThrobberControl_Base
+ {
+ private:
+
+ public:
+ UnoThrobberControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ::rtl::OUString GetComponentServiceName();
+
+ DECLARE_UNO3_AGG_DEFAULTS( UnoThrobberControl, UnoControlBase );
+ ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) 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 disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { UnoControlBase::disposing( Source ); }
+ void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XTypeProvider
+ DECLARE_XTYPEPROVIDER()
+
+ // XThrobber
+ virtual void SAL_CALL start() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL stop() throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ ::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);
+ };
+
+//........................................................................
+} // namespacetoolkit
+//........................................................................
+
+#endif // TOOLKIT_CONTROLS_TKTHROBBER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/toolkit/controls/unocontrol.hxx b/toolkit/inc/toolkit/controls/unocontrol.hxx
new file mode 100644
index 000000000000..d7d141148771
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/unocontrol.hxx
@@ -0,0 +1,250 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_CONTROLS_UNOCONTROL_HXX_
+#define _TOOLKIT_CONTROLS_UNOCONTROL_HXX_
+
+#include <toolkit/dllapi.h>
+#include <com/sun/star/awt/XControl.hpp>
+#include <com/sun/star/awt/XWindow2.hpp>
+#include <com/sun/star/awt/XView.hpp>
+#include <com/sun/star/beans/XPropertiesChangeListener.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#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>
+#include <toolkit/helper/mutexandbroadcasthelper.hxx>
+#include <toolkit/helper/listenermultiplexer.hxx>
+#include <cppuhelper/propshlp.hxx>
+#include <cppuhelper/interfacecontainer.hxx>
+#include <cppuhelper/weakref.hxx>
+#include <cppuhelper/implbase9.hxx>
+#include <comphelper/componentcontext.hxx>
+#include <com/sun/star/util/XModeChangeBroadcaster.hpp>
+#include <com/sun/star/awt/XVclWindowPeer.hpp>
+
+
+struct UnoControlComponentInfos
+{
+ sal_Bool bVisible;
+ sal_Bool bEnable;
+ long nX, nY, nWidth, nHeight;
+ sal_uInt16 nFlags;
+ float nZoomX, nZoomY;
+
+ UnoControlComponentInfos()
+ {
+ bVisible = sal_True;
+ bEnable = sal_True;
+ nX = nY = nWidth = nHeight = 0;
+ nFlags = 0; // POSSIZE_POSSIZE;
+ nZoomX = nZoomY = 1.0f;
+ }
+};
+
+struct UnoControl_Data;
+// ----------------------------------------------------
+// class UnoControl
+// ----------------------------------------------------
+typedef ::cppu::WeakAggImplHelper9 < ::com::sun::star::awt::XControl
+ , ::com::sun::star::awt::XWindow2
+ , ::com::sun::star::awt::XView
+ , ::com::sun::star::beans::XPropertiesChangeListener
+ , ::com::sun::star::lang::XServiceInfo
+ , ::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
+{
+private:
+ ::osl::Mutex maMutex;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > mxPeer;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XVclWindowPeer > mxVclWindowPeer; // just to avoid the query_interface thing
+
+protected:
+ const ::comphelper::ComponentContext maContext;
+ EventListenerMultiplexer maDisposeListeners;
+ WindowListenerMultiplexer maWindowListeners;
+ FocusListenerMultiplexer maFocusListeners;
+ KeyListenerMultiplexer maKeyListeners;
+ MouseListenerMultiplexer maMouseListeners;
+ MouseMotionListenerMultiplexer maMouseMotionListeners;
+ PaintListenerMultiplexer maPaintListeners;
+ ::cppu::OInterfaceContainerHelper maModeChangeListeners;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxContext;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > mxModel;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics > mxGraphics;
+
+ ::com::sun::star::uno::WeakReferenceHelper
+ maAccessibleContext; /// our most recent XAccessibleContext instance
+
+ sal_Bool mbDisposePeer;
+ sal_Bool mbRefeshingPeer;
+ sal_Bool mbCreatingPeer;
+ sal_Bool mbCreatingCompatiblePeer;
+ sal_Bool mbDesignMode;
+
+ UnoControlComponentInfos maComponentInfos;
+ UnoControl_Data* mpData;
+
+ ::osl::Mutex& GetMutex() { return maMutex; }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > getParentPeer() const;
+ virtual void updateFromModel();
+ void peerCreated();
+ bool ImplCheckLocalize( ::rtl::OUString& _rPossiblyLocalizable );
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > ImplGetCompatiblePeer( sal_Bool bAcceptExistingPeer );
+ virtual void ImplSetPeerProperty( const ::rtl::OUString& rPropName, const ::com::sun::star::uno::Any& rVal );
+ virtual void PrepareWindowDescriptor( ::com::sun::star::awt::WindowDescriptor& rDesc );
+ virtual void ImplModelPropertiesChanged( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyChangeEvent >& rEvents );
+
+ void ImplLockPropertyChangeNotification( const ::rtl::OUString& rPropertyName, bool bLock );
+ void ImplLockPropertyChangeNotifications( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rPropertyNames, bool bLock );
+
+ void disposeAccessibleContext();
+
+ inline void setPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& _xPeer)
+ {
+ mxPeer = _xPeer;
+ mxVclWindowPeer = ::com::sun::star::uno::Reference< ::com::sun::star::awt::XVclWindowPeer >(mxPeer,::com::sun::star::uno::UNO_QUERY); // just to avoid the query_interface thing
+ }
+
+ virtual sal_Bool requiresNewPeer( const ::rtl::OUString& _rPropertyName ) const;
+
+protected:
+ UnoControl();
+
+public:
+ UnoControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ~UnoControl();
+
+ UnoControlComponentInfos& GetComponentInfos() { return maComponentInfos; }
+
+
+ virtual ::rtl::OUString GetComponentServiceName();
+
+ // ::com::sun::star::lang::XTypeProvider
+ ::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);
+ void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XEventListener
+ void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XWindow2
+ virtual void SAL_CALL setOutputSize( const ::com::sun::star::awt::Size& aSize ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Size SAL_CALL getOutputSize( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL isVisible( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL isActive( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL isEnabled( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL hasFocus( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // ::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::Rectangle SAL_CALL getPosSize( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setVisible( sal_Bool Visible ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setEnable( sal_Bool Enable ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setFocus( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL addWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL addFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL addKeyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeKeyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL addMouseListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeMouseListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL addMouseMotionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeMouseMotionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL addPaintListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removePaintListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XView
+ sal_Bool SAL_CALL setGraphics( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics >& aDevice ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics > SAL_CALL getGraphics( ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::awt::Size SAL_CALL getSize( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setZoom( float fZoomX, float fZoomY ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XControl
+ void SAL_CALL setContext( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Context ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getContext( ) 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::uno::Reference< ::com::sun::star::awt::XWindowPeer > SAL_CALL getPeer( ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Bool SAL_CALL setModel( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& Model ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > SAL_CALL getModel( ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XView > SAL_CALL getView( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setDesignMode( sal_Bool bOn ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Bool SAL_CALL isDesignMode( ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Bool SAL_CALL isTransparent( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XServiceInfo
+ ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XAccessible
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XModeChangeBroadcaster
+ virtual void SAL_CALL addModeChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModeChangeListener >& _rxListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeModeChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModeChangeListener >& _rxListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addModeChangeApproveListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModeChangeApproveListener >& _rxListener ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeModeChangeApproveListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModeChangeApproveListener >& _rxListener ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
+
+ // XUnitConversion
+ virtual ::com::sun::star::awt::Point SAL_CALL convertPointToLogic( const ::com::sun::star::awt::Point& Point, ::sal_Int16 TargetUnit ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Point SAL_CALL convertPointToPixel( const ::com::sun::star::awt::Point& aPoint, ::sal_Int16 SourceUnit ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ 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);
+};
+
+
+
+
+#endif // _TOOLKIT_CONTROLS_UNOCONTROL_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/toolkit/controls/unocontrolbase.hxx b/toolkit/inc/toolkit/controls/unocontrolbase.hxx
new file mode 100644
index 000000000000..aa2036935344
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/unocontrolbase.hxx
@@ -0,0 +1,79 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_AWT_UNOCONTROLBASE_HXX_
+#define _TOOLKIT_AWT_UNOCONTROLBASE_HXX_
+
+#include <com/sun/star/awt/Size.hpp>
+
+#include <toolkit/controls/unocontrol.hxx>
+
+// ----------------------------------------------------
+// class UnoControlBase
+// ----------------------------------------------------
+
+class TOOLKIT_DLLPUBLIC UnoControlBase : public UnoControl
+{
+protected:
+ UnoControlBase();
+
+protected:
+ UnoControlBase( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory )
+ :UnoControl( i_factory )
+ {
+ }
+
+ sal_Bool ImplHasProperty( sal_uInt16 nProp );
+ sal_Bool ImplHasProperty( const ::rtl::OUString& aPropertyName );
+ void ImplSetPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue, sal_Bool bUpdateThis );
+ void ImplSetPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues, sal_Bool bUpdateThis );
+ ::com::sun::star::uno::Any ImplGetPropertyValue( const ::rtl::OUString& aPropertyName );
+
+ sal_Bool ImplGetPropertyValue_BOOL( sal_uInt16 nProp );
+ sal_Int16 ImplGetPropertyValue_INT16( sal_uInt16 nProp );
+ sal_uInt16 ImplGetPropertyValue_UINT16( sal_uInt16 nProp );
+ sal_Int32 ImplGetPropertyValue_INT32( sal_uInt16 nProp );
+ sal_uInt32 ImplGetPropertyValue_UINT32( sal_uInt16 nProp );
+ double ImplGetPropertyValue_DOUBLE( sal_uInt16 nProp );
+ ::rtl::OUString ImplGetPropertyValue_UString( sal_uInt16 nProp );
+
+ // XLayoutConstrains (nur wenn das Control es unterstuetzt!)
+ ::com::sun::star::awt::Size Impl_getMinimumSize();
+ ::com::sun::star::awt::Size Impl_getPreferredSize();
+ ::com::sun::star::awt::Size Impl_calcAdjustedSize( const ::com::sun::star::awt::Size& rNewSize );
+
+ // XTextLayoutConstrains (nur wenn das Control es unterstuetzt!)
+ ::com::sun::star::awt::Size Impl_getMinimumSize( sal_Int16 nCols, sal_Int16 nLines );
+ void Impl_getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines );
+};
+
+
+
+#endif // _TOOLKIT_AWT_UNOCONTROLBASE_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/toolkit/controls/unocontrolcontainer.hxx b/toolkit/inc/toolkit/controls/unocontrolcontainer.hxx
new file mode 100644
index 000000000000..e29fab5b8350
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/unocontrolcontainer.hxx
@@ -0,0 +1,169 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_CONTROLS_UNOCONTROLCONTAINER_HXX_
+#define _TOOLKIT_CONTROLS_UNOCONTROLCONTAINER_HXX_
+
+
+#include <com/sun/star/awt/XControlContainer.hpp>
+#include <com/sun/star/awt/XUnoControlContainer.hpp>
+#include <com/sun/star/container/XContainer.hpp>
+#include <com/sun/star/container/XIdentifierContainer.hpp>
+
+#include <toolkit/controls/unocontrol.hxx>
+#include <toolkit/controls/unocontrolbase.hxx>
+#include <toolkit/helper/macros.hxx>
+#include <toolkit/helper/servicenames.hxx>
+
+#include <cppuhelper/implbase4.hxx>
+
+class UnoControlHolderList;
+
+// ----------------------------------------------------
+// class UnoControlContainer
+// ----------------------------------------------------
+typedef ::cppu::AggImplInheritanceHelper4 < UnoControlBase
+ , ::com::sun::star::awt::XUnoControlContainer
+ , ::com::sun::star::awt::XControlContainer
+ , ::com::sun::star::container::XContainer
+ , ::com::sun::star::container::XIdentifierContainer
+ > UnoControlContainer_Base;
+
+class UnoControlContainer : public UnoControlContainer_Base
+{
+private:
+ UnoControlHolderList* mpControls;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController > > maTabControllers;
+ ContainerListenerMultiplexer maCListeners;
+
+protected:
+ void ImplActivateTabControllers();
+
+public:
+ UnoControlContainer( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoControlContainer( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& xPeer );
+ ~UnoControlContainer();
+
+
+ // ::com::sun::star::lang::XComponent
+ void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XEventListener
+ void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::container::XContainer
+ void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::container::XIdentifierContainer
+ virtual ::sal_Int32 SAL_CALL insert( const ::com::sun::star::uno::Any& aElement ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::container::XIdentifierReplace
+ virtual void SAL_CALL removeByIdentifier( ::sal_Int32 Identifier ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL replaceByIdentifer( ::sal_Int32 Identifier, 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::container::XIdentifierAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIdentifier( ::sal_Int32 Identifierr ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::sal_Int32 > SAL_CALL getIdentifiers( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::container::XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL hasElements( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XControlContainer
+ void SAL_CALL setStatusText( const ::rtl::OUString& StatusText ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > > SAL_CALL getControls( ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > SAL_CALL getControl( const ::rtl::OUString& aName ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL addControl( const ::rtl::OUString& Name, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& Control ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& Control ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XUnoControlContainer
+ void SAL_CALL setTabControllers( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController > >& TabControllers ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController > > SAL_CALL getTabControllers( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL addTabController( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController >& TabController ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeTabController( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController >& TabController ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XControl
+ 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::XWindow
+ void SAL_CALL setVisible( sal_Bool Visible ) throw(::com::sun::star::uno::RuntimeException);
+
+ DECLIMPL_SERVICEINFO_DERIVED( UnoControlContainer, UnoControlBase, szServiceName2_UnoControlContainer )
+
+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
+ the control to add. Must not be <NULL/>
+ @param _pName
+ Pointer to a name for the control. Might be <NULL/>, in this case an auotmatic name is generated
+ @return
+ the ID of the newly added control
+ */
+ sal_Int32 impl_addControl(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl,
+ const ::rtl::OUString* _pName = NULL
+ );
+
+ /** removes the given control from the container, including necessary notifications and the like
+ @param _nId
+ the ID of the control to remove
+ @param _rxControl
+ the control itself. Must be the one which is stored under the given ID. This parameter could also be
+ obtained inside the method, but callers usually have obtained it, anyway.
+ @param _pNameAccessor
+ the name which the control was registered for. Might be <NULL/>, in this case
+ container event broadcasts use the ID as accessor.
+ */
+ void impl_removeControl(
+ sal_Int32 _nId,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl,
+ const ::rtl::OUString* _pNameAccessor
+ );
+
+};
+
+
+
+#endif // _TOOLKIT_CONTROLS_UNOCONTROLCONTAINER_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/toolkit/controls/unocontrolcontainermodel.hxx b/toolkit/inc/toolkit/controls/unocontrolcontainermodel.hxx
new file mode 100644
index 000000000000..8d4d97836989
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/unocontrolcontainermodel.hxx
@@ -0,0 +1,68 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_CONTROLS_UNOCONTROLCONTAINERMODEL_HXX_
+#define _TOOLKIT_CONTROLS_UNOCONTROLCONTAINERMODEL_HXX_
+
+
+#include <toolkit/controls/unocontrolmodel.hxx>
+#include <toolkit/helper/macros.hxx>
+#include <toolkit/helper/servicenames.hxx>
+
+
+// ----------------------------------------------------
+// class ::com::sun::star::awt::UnoControlContainerModel
+// ----------------------------------------------------
+class UnoControlContainerModel : public UnoControlModel
+{
+protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > getPropertySetInfo() const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+public:
+ UnoControlContainerModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoControlContainerModel( const UnoControlContainerModel& rModel ) : UnoControlModel( rModel ) {;}
+
+ UnoControlModel* Clone() const { return new UnoControlContainerModel( *this ); }
+
+ // ::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::io::XPersistObject
+ ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoControlContainerModel, UnoControlModel, szServiceName2_UnoControlContainerModel )
+};
+
+
+
+#endif // _TOOLKIT_CONTROLS_UNOCONTROLCONTAINERMODEL_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/toolkit/controls/unocontrolmodel.hxx b/toolkit/inc/toolkit/controls/unocontrolmodel.hxx
new file mode 100644
index 000000000000..7aba0ec710ee
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/unocontrolmodel.hxx
@@ -0,0 +1,185 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_AWT_UNOCONTROLMODEL_HXX_
+#define _TOOLKIT_AWT_UNOCONTROLMODEL_HXX_
+
+#include <com/sun/star/awt/XControlModel.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/io/XPersistObject.hpp>
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/util/XCloneable.hpp>
+#include <cppuhelper/weakagg.hxx>
+#include <osl/mutex.hxx>
+
+#include <toolkit/helper/mutexandbroadcasthelper.hxx>
+#include <toolkit/helper/listenermultiplexer.hxx>
+
+#include <cppuhelper/propshlp.hxx>
+#include <cppuhelper/interfacecontainer.hxx>
+#include <cppuhelper/implbase7.hxx>
+#include <comphelper/componentcontext.hxx>
+#include <comphelper/uno3.hxx>
+
+#include <list>
+
+class ImplPropertyTable;
+
+// ----------------------------------------------------
+// class UnoControlModel
+// ----------------------------------------------------
+
+typedef ::cppu::WeakAggImplHelper7 < ::com::sun::star::awt::XControlModel
+ , ::com::sun::star::beans::XPropertyState
+ , ::com::sun::star::io::XPersistObject
+ , ::com::sun::star::lang::XComponent
+ , ::com::sun::star::lang::XServiceInfo
+ , ::com::sun::star::lang::XUnoTunnel
+ , ::com::sun::star::util::XCloneable
+ > UnoControlModel_Base;
+
+class TOOLKIT_DLLPUBLIC UnoControlModel :public UnoControlModel_Base
+ ,public MutexAndBroadcastHelper
+ ,public ::cppu::OPropertySetHelper
+{
+private:
+ ImplPropertyTable* mpData;
+ EventListenerMultiplexer maDisposeListeners;
+
+protected:
+ const ::comphelper::ComponentContext maContext;
+
+protected:
+ void ImplRegisterProperty( sal_uInt16 nPropType );
+ void ImplRegisterProperties( const std::list< sal_uInt16 > &rIds );
+ void ImplRegisterProperty( sal_uInt16 nPropId, const ::com::sun::star::uno::Any& rDefault );
+ ::com::sun::star::uno::Sequence<sal_Int32> ImplGetPropertyIds() const;
+ virtual ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ sal_Bool ImplHasProperty( sal_uInt16 nPropId ) const;
+
+ /** called before setting multiple properties, allows to care for property dependencies
+
+ <p>When multiple property values are set (e.g. XPropertySet::setPropertyValues), it may happen that some
+ of them are dependent. For this, derivees which know such dependencies can affect the order in which
+ the properties are internally really set.</p>
+ */
+ virtual void ImplNormalizePropertySequence(
+ const sal_Int32 _nCount, /// the number of entries in the arrays
+ sal_Int32* _pHandles, /// the handles of the properties to set
+ ::com::sun::star::uno::Any* _pValues, /// the values of the properties to set
+ sal_Int32* _pValidHandles /// pointer to the valid handles, allowed to be adjusted
+ ) const SAL_THROW(());
+
+ /// ensures that two property values in a sequence have a certain order
+ void ImplEnsureHandleOrder(
+ const sal_Int32 _nCount, /// number of entries in the array
+ sal_Int32* _pHandles, /// pointer to the handles
+ ::com::sun::star::uno::Any* _pValues, /// pointer to the values
+ sal_Int32 _nFirstHandle, /// first handle, which should precede _nSecondHandle in the sequence
+ sal_Int32 _nSecondHandle /// second handle, which should supersede _nFirstHandle in the sequence
+ ) const;
+
+protected:
+ UnoControlModel();
+public:
+ UnoControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoControlModel( const UnoControlModel& rModel );
+ ~UnoControlModel();
+
+ virtual UnoControlModel* Clone() const = 0;
+
+ // ::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) { return OWeakAggObject::queryInterface(rType); }
+ void SAL_CALL acquire() throw();
+ void SAL_CALL release() throw();
+
+ // ::com::sun::star::uno::XAggregation
+ ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XUnoTunnel
+ static const ::com::sun::star::uno::Sequence< sal_Int8 >& GetUnoTunnelId() throw();
+ static UnoControlModel* GetImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxIFace ) throw();
+ sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::util::XCloneable
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone() throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XTypeProvider
+ DECLARE_XTYPEPROVIDER()
+
+ // ::com::sun::star::lang::XComponent
+ void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::beans::XPropertyState
+ ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::io::XPersistObject
+ ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL write( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream >& OutStream ) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
+ void SAL_CALL read( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectInputStream >& InStream ) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XServiceInfo
+ ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
+
+ // ::cppu::OPropertySetHelper
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() = 0;
+ sal_Bool SAL_CALL convertFastPropertyValue( ::com::sun::star::uno::Any & rConvertedValue, ::com::sun::star::uno::Any & rOldValue, sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::lang::IllegalArgumentException);
+ void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception);
+ using cppu::OPropertySetHelper::getFastPropertyValue;
+ void SAL_CALL getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const;
+
+ // setValue-Methoden ueberladen, um die Einzelproperties des FontDescriptors abzufangen
+ // ::com::sun::star::beans::XPropertySet
+ void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ // ::com::sun::star::beans::XFastPropertySet
+ void SAL_CALL setFastPropertyValue( sal_Int32 nHandle, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::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);
+ void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& PropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Values ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+};
+
+#define UNO_CONTROL_MODEL_REGISTER_PROPERTIES(a) \
+ do { \
+ std::list< sal_uInt16 > aIds; \
+ a::ImplGetPropertyIds( aIds ); \
+ ImplRegisterProperties( aIds ); \
+ } while (0)
+
+#endif // _TOOLKIT_AWT_UNOCONTROLMODEL_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/toolkit/controls/unocontrols.hxx b/toolkit/inc/toolkit/controls/unocontrols.hxx
new file mode 100644
index 000000000000..201858da0a12
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/unocontrols.hxx
@@ -0,0 +1,1520 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_HELPER_UNOCONTROLS_HXX_
+#define _TOOLKIT_HELPER_UNOCONTROLS_HXX_
+
+#include <toolkit/dllapi.h>
+#include <com/sun/star/awt/XTextComponent.hpp>
+#include <com/sun/star/awt/XTextListener.hpp>
+#include <com/sun/star/awt/XLayoutConstrains.hpp>
+#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/XRadioButton.hpp>
+#include <com/sun/star/awt/XItemListener.hpp>
+#include <com/sun/star/awt/XCheckBox.hpp>
+#include <com/sun/star/awt/XFixedHyperlink.hpp>
+#include <com/sun/star/awt/XFixedText.hpp>
+#include <com/sun/star/awt/XListBox.hpp>
+#include <com/sun/star/awt/XComboBox.hpp>
+#include <com/sun/star/awt/XDateField.hpp>
+#include <com/sun/star/awt/XSpinField.hpp>
+#include <com/sun/star/awt/XTimeField.hpp>
+#include <com/sun/star/awt/XNumericField.hpp>
+#include <com/sun/star/awt/XCurrencyField.hpp>
+#include <com/sun/star/awt/XPatternField.hpp>
+#include <com/sun/star/awt/XProgressBar.hpp>
+#include <com/sun/star/awt/XItemList.hpp>
+#include <com/sun/star/graphic/XGraphicObject.hpp>
+#include <toolkit/controls/unocontrolmodel.hxx>
+#include <toolkit/controls/unocontrolbase.hxx>
+#include <toolkit/helper/macros.hxx>
+#include <toolkit/helper/servicenames.hxx>
+#include <vcl/bitmapex.hxx>
+#include <cppuhelper/implbase5.hxx>
+#include <cppuhelper/implbase4.hxx>
+#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <comphelper/uno3.hxx>
+
+#include <list>
+#include <vector>
+
+#include <boost/scoped_ptr.hpp>
+#include <boost/optional.hpp>
+
+#define UNO_NAME_GRAPHOBJ_URLPREFIX "vnd.sun.star.GraphicObject:"
+#define UNO_NAME_GRAPHOBJ_URLPKGPREFIX "vnd.sun.star.Package:"
+
+// ----------------------------------------------------
+// class UnoControlEditModel
+// ----------------------------------------------------
+class UnoControlEditModel : public UnoControlModel
+{
+protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+public:
+ UnoControlEditModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoControlEditModel( const UnoControlEditModel& rModel ) : UnoControlModel( rModel ) {;}
+
+ UnoControlModel* Clone() const { return new UnoControlEditModel( *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);
+
+
+ // XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoControlEditModel, UnoControlModel, szServiceName2_UnoControlEditModel )
+};
+
+// ----------------------------------------------------
+// class UnoEditControl
+// ----------------------------------------------------
+typedef ::cppu::ImplHelper4 < ::com::sun::star::awt::XTextComponent
+ , ::com::sun::star::awt::XTextListener
+ , ::com::sun::star::awt::XLayoutConstrains
+ , ::com::sun::star::awt::XTextLayoutConstrains
+ > UnoEditControl_Base;
+class TOOLKIT_DLLPUBLIC UnoEditControl :public UnoControlBase
+ ,public UnoEditControl_Base
+{
+private:
+ TextListenerMultiplexer maTextListeners;
+
+ // Not all fields derived from UnoEditCOntrol have the property "Text"
+ // They only support XTextComponent, so keep the text
+ // here, maybe there is no Peer when calling setText()...
+ ::rtl::OUString maText;
+ sal_uInt16 mnMaxTextLen;
+
+ sal_Bool mbSetTextInPeer;
+ sal_Bool mbSetMaxTextLenInPeer;
+ sal_Bool mbHasTextProperty;
+
+public:
+
+ UnoEditControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ::rtl::OUString GetComponentServiceName();
+ TextListenerMultiplexer& GetTextListeners() { return maTextListeners; }
+
+ void ImplSetPeerProperty( const ::rtl::OUString& rPropName, const ::com::sun::star::uno::Any& rVal );
+
+ 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) { UnoControlBase::disposing( Source ); }
+ void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // disambiguate XInterface
+ DECLARE_XINTERFACE()
+
+ // XAggregation
+ ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XTypeProvider
+ DECLARE_XTYPEPROVIDER()
+
+ // XTextListener
+ void SAL_CALL textChanged( const ::com::sun::star::awt::TextEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XTextComponent
+ void SAL_CALL addTextListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeTextListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setText( const ::rtl::OUString& aText ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL insertText( const ::com::sun::star::awt::Selection& Sel, const ::rtl::OUString& Text ) throw(::com::sun::star::uno::RuntimeException);
+ ::rtl::OUString SAL_CALL getText( ) throw(::com::sun::star::uno::RuntimeException);
+ ::rtl::OUString SAL_CALL getSelectedText( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setSelection( const ::com::sun::star::awt::Selection& aSelection ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::awt::Selection SAL_CALL getSelection( ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Bool SAL_CALL isEditable( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setEditable( sal_Bool bEditable ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setMaxTextLen( sal_Int16 nLen ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Int16 SAL_CALL getMaxTextLen( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XLayoutConstrains
+ ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XTextLayoutConstrains
+ ::com::sun::star::awt::Size SAL_CALL getMinimumSize( sal_Int16 nCols, sal_Int16 nLines ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoEditControl, UnoControlBase, szServiceName2_UnoControlEdit )
+
+ sal_Bool SAL_CALL setModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& Model) throw ( ::com::sun::star::uno::RuntimeException );
+};
+
+// ----------------------------------------------------
+// class UnoControlFileControlModel
+// ----------------------------------------------------
+class UnoControlFileControlModel : public UnoControlModel
+{
+protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+public:
+ UnoControlFileControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoControlFileControlModel( const UnoControlFileControlModel& rModel ) : UnoControlModel( rModel ) {;}
+
+ UnoControlModel* Clone() const { return new UnoControlFileControlModel( *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( UnoControlFileControlModel, UnoControlModel, szServiceName2_UnoControlFileControlModel )
+};
+
+// ----------------------------------------------------
+// class UnoFileControl
+// ----------------------------------------------------
+class UnoFileControl : public UnoEditControl
+{
+public:
+ UnoFileControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ::rtl::OUString GetComponentServiceName();
+
+ // ::com::sun::star::lang::XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoFileControl, UnoEditControl, szServiceName2_UnoControlFileControl )
+};
+
+// ----------------------------------------------------
+// class GraphicControlModel
+// ----------------------------------------------------
+class GraphicControlModel : public UnoControlModel
+{
+private:
+ 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:
+ GraphicControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory )
+ :UnoControlModel( i_factory )
+ ,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);
+
+ // UnoControlModel
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+
+private:
+ GraphicControlModel& operator=( const GraphicControlModel& ); // never implemented
+};
+
+// ----------------------------------------------------
+// class UnoControlButtonModel
+// ----------------------------------------------------
+class UnoControlButtonModel : public GraphicControlModel
+{
+protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+public:
+ UnoControlButtonModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoControlButtonModel( const UnoControlButtonModel& rModel ) : GraphicControlModel( rModel ) {;}
+
+ UnoControlModel* Clone() const { return new UnoControlButtonModel( *this ); }
+
+ // ::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::io::XPersistObject
+ ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoControlButtonModel, GraphicControlModel, szServiceName2_UnoControlButtonModel )
+};
+
+// ----------------------------------------------------
+// class UnoButtonControl
+// ----------------------------------------------------
+typedef ::cppu::AggImplInheritanceHelper4 < UnoControlBase
+ , ::com::sun::star::awt::XButton
+ , ::com::sun::star::awt::XToggleButton
+ , ::com::sun::star::awt::XLayoutConstrains
+ , ::com::sun::star::awt::XItemListener
+ > UnoButtonControl_Base;
+class UnoButtonControl : public UnoButtonControl_Base
+{
+private:
+ ActionListenerMultiplexer maActionListeners;
+ ItemListenerMultiplexer maItemListeners;
+ ::rtl::OUString maActionCommand;
+
+public:
+
+ UnoButtonControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ::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 dispose( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XButton
+ void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setLabel( const ::rtl::OUString& Label ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setActionCommand( const ::rtl::OUString& Command ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XToggleButton
+ // ::com::sun::star::awt::XItemEventBroadcaster
+ void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) 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::awt::XLayoutConstrains
+ ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ) throw(::com::sun::star::uno::RuntimeException);
+ ::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, UnoControlBase, szServiceName2_UnoControlButton )
+};
+
+// ----------------------------------------------------
+// class UnoControlImageControlModel
+// ----------------------------------------------------
+class UnoControlImageControlModel : public GraphicControlModel
+{
+private:
+ bool mbAdjustingImageScaleMode;
+
+protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+public:
+ UnoControlImageControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoControlImageControlModel( const UnoControlImageControlModel& rModel ) : GraphicControlModel( rModel ), mbAdjustingImageScaleMode( false ) { }
+
+ UnoControlModel* Clone() const { return new UnoControlImageControlModel( *this ); }
+
+ // ::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::io::XPersistObject
+ ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XServiceInfo
+ 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);
+};
+
+// ----------------------------------------------------
+// class UnoImageControlControl
+// ----------------------------------------------------
+typedef ::cppu::AggImplInheritanceHelper1 < UnoControlBase
+ , ::com::sun::star::awt::XLayoutConstrains
+ > UnoImageControlControl_Base;
+class UnoImageControlControl : public UnoImageControlControl_Base
+{
+private:
+ ActionListenerMultiplexer maActionListeners;
+ ::rtl::OUString maActionCommand;
+
+public:
+
+ UnoImageControlControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ::rtl::OUString GetComponentServiceName();
+
+ void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XControl
+ sal_Bool SAL_CALL isTransparent( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XLayoutConstrains
+ ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ) throw(::com::sun::star::uno::RuntimeException);
+ ::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, UnoControlBase, szServiceName2_UnoControlImageControl )
+};
+
+// ----------------------------------------------------
+// class UnoControlRadioButtonModel
+// ----------------------------------------------------
+class UnoControlRadioButtonModel : public GraphicControlModel
+
+{
+protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+public:
+ UnoControlRadioButtonModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoControlRadioButtonModel( const UnoControlRadioButtonModel& rModel ) : GraphicControlModel( rModel ) {;}
+
+ UnoControlModel* Clone() const { return new UnoControlRadioButtonModel( *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( UnoControlRadioButtonModel, GraphicControlModel, szServiceName2_UnoControlRadioButtonModel )
+
+};
+
+// ----------------------------------------------------
+// class UnoRadioButtonControl
+// ----------------------------------------------------
+typedef ::cppu::AggImplInheritanceHelper4 < UnoControlBase
+ , ::com::sun::star::awt::XButton
+ , ::com::sun::star::awt::XRadioButton
+ , ::com::sun::star::awt::XItemListener
+ , ::com::sun::star::awt::XLayoutConstrains
+ > UnoRadioButtonControl_Base;
+class UnoRadioButtonControl : public UnoRadioButtonControl_Base
+{
+private:
+ ItemListenerMultiplexer maItemListeners;
+ ActionListenerMultiplexer maActionListeners;
+ ::rtl::OUString maActionCommand;
+
+public:
+
+ UnoRadioButtonControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ::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 dispose( ) throw(::com::sun::star::uno::RuntimeException);
+ 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);
+
+ // ::com::sun::star::awt::XButton
+ void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setActionCommand( const ::rtl::OUString& Command ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XRadioButton
+ void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Bool SAL_CALL getState( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setState( sal_Bool b ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setLabel( const ::rtl::OUString& Label ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XItemListener
+ void SAL_CALL itemStateChanged( const ::com::sun::star::awt::ItemEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XLayoutConstrains
+ ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ) throw(::com::sun::star::uno::RuntimeException);
+ ::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, UnoControlBase, szServiceName2_UnoControlRadioButton )
+
+};
+
+// ----------------------------------------------------
+// class UnoControlCheckBoxModel
+// ----------------------------------------------------
+class UnoControlCheckBoxModel : public GraphicControlModel
+{
+protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+public:
+ UnoControlCheckBoxModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoControlCheckBoxModel( const UnoControlCheckBoxModel& rModel ) : GraphicControlModel( rModel ) {;}
+
+ UnoControlModel* Clone() const { return new UnoControlCheckBoxModel( *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( UnoControlCheckBoxModel, GraphicControlModel, szServiceName2_UnoControlCheckBoxModel )
+};
+
+// ----------------------------------------------------
+// class UnoCheckBoxControl
+// ----------------------------------------------------
+typedef ::cppu::AggImplInheritanceHelper4 < UnoControlBase
+ , ::com::sun::star::awt::XButton
+ , ::com::sun::star::awt::XCheckBox
+ , ::com::sun::star::awt::XItemListener
+ , ::com::sun::star::awt::XLayoutConstrains
+ > UnoCheckBoxControl_Base;
+class UnoCheckBoxControl : public UnoCheckBoxControl_Base
+{
+private:
+ ItemListenerMultiplexer maItemListeners;
+ ActionListenerMultiplexer maActionListeners;
+ ::rtl::OUString maActionCommand;
+
+public:
+
+ UnoCheckBoxControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ~UnoCheckBoxControl(){;}
+ ::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 dispose( ) throw(::com::sun::star::uno::RuntimeException);
+ 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);
+
+ // ::com::sun::star::awt::XButton
+ void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setActionCommand( const ::rtl::OUString& Command ) throw(::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw (::com::sun::star::uno::RuntimeException);
+
+
+ sal_Int16 SAL_CALL getState( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setState( sal_Int16 n ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setLabel( const ::rtl::OUString& Label ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL enableTriState( sal_Bool b ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XItemListener
+ void SAL_CALL itemStateChanged( const ::com::sun::star::awt::ItemEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XLayoutConstrains
+ ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ) throw(::com::sun::star::uno::RuntimeException);
+ ::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, UnoControlBase, szServiceName2_UnoControlCheckBox )
+
+};
+
+// ----------------------------------------------------
+// class UnoControlFixedTextModel
+// ----------------------------------------------------
+class UnoControlFixedHyperlinkModel : public UnoControlModel
+{
+protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+public:
+ UnoControlFixedHyperlinkModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoControlFixedHyperlinkModel( const UnoControlFixedHyperlinkModel& rModel ) : UnoControlModel( rModel ) {;}
+
+ UnoControlModel* Clone() const { return new UnoControlFixedHyperlinkModel( *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( UnoControlFixedHyperlinkModel, UnoControlModel, szServiceName_UnoControlFixedHyperlinkModel )
+};
+
+// ----------------------------------------------------
+// class UnoFixedHyperlinkControl
+// ----------------------------------------------------
+class UnoFixedHyperlinkControl : public UnoControlBase,
+ public ::com::sun::star::awt::XFixedHyperlink,
+ public ::com::sun::star::awt::XLayoutConstrains
+{
+private:
+ ActionListenerMultiplexer maActionListeners;
+
+public:
+ UnoFixedHyperlinkControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+
+ ::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 UnoControlBase::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);
+ ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XControl
+ sal_Bool SAL_CALL isTransparent( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XFixedHyperlink
+ void SAL_CALL setText( const ::rtl::OUString& Text ) throw(::com::sun::star::uno::RuntimeException);
+ ::rtl::OUString SAL_CALL getText( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setURL( const ::rtl::OUString& URL ) throw(::com::sun::star::uno::RuntimeException);
+ ::rtl::OUString SAL_CALL getURL( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setAlignment( sal_Int16 nAlign ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Int16 SAL_CALL getAlignment( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XLayoutConstrains
+ ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ) throw(::com::sun::star::uno::RuntimeException);
+ ::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( UnoFixedHyperlinkControl, UnoControlBase, szServiceName_UnoControlFixedHyperlink )
+};
+
+// ----------------------------------------------------
+// class UnoControlFixedTextModel
+// ----------------------------------------------------
+class UnoControlFixedTextModel : public UnoControlModel
+{
+protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+public:
+ UnoControlFixedTextModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoControlFixedTextModel( const UnoControlFixedTextModel& rModel ) : UnoControlModel( rModel ) {;}
+
+ UnoControlModel* Clone() const { return new UnoControlFixedTextModel( *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( UnoControlFixedTextModel, UnoControlModel, szServiceName2_UnoControlFixedTextModel )
+
+};
+
+// ----------------------------------------------------
+// class UnoFixedTextControl
+// ----------------------------------------------------
+class UnoFixedTextControl : public UnoControlBase,
+ public ::com::sun::star::awt::XFixedText,
+ public ::com::sun::star::awt::XLayoutConstrains
+{
+public:
+ UnoFixedTextControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ::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 UnoControlBase::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);
+
+ // ::com::sun::star::awt::XControl
+ sal_Bool SAL_CALL isTransparent( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XFixedText
+ void SAL_CALL setText( const ::rtl::OUString& Text ) throw(::com::sun::star::uno::RuntimeException);
+ ::rtl::OUString SAL_CALL getText( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setAlignment( sal_Int16 nAlign ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Int16 SAL_CALL getAlignment( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XLayoutConstrains
+ ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ) throw(::com::sun::star::uno::RuntimeException);
+ ::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( UnoFixedTextControl, UnoControlBase, szServiceName2_UnoControlFixedText )
+
+};
+
+// ----------------------------------------------------
+// class UnoControlGroupBoxModel
+// ----------------------------------------------------
+class UnoControlGroupBoxModel : public UnoControlModel
+{
+protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+public:
+ UnoControlGroupBoxModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoControlGroupBoxModel( const UnoControlGroupBoxModel& rModel ) : UnoControlModel( rModel ) {;}
+
+ UnoControlModel* Clone() const { return new UnoControlGroupBoxModel( *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( UnoControlGroupBoxModel, UnoControlModel, szServiceName2_UnoControlGroupBoxModel )
+
+};
+
+// ----------------------------------------------------
+// class UnoGroupBoxControl
+// ----------------------------------------------------
+class UnoGroupBoxControl : public UnoControlBase
+{
+public:
+ UnoGroupBoxControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ::rtl::OUString GetComponentServiceName();
+
+ sal_Bool SAL_CALL isTransparent( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoGroupBoxControl, UnoControlBase, szServiceName2_UnoControlGroupBox )
+
+};
+
+// ----------------------------------------------------
+// class UnoControlListBoxModel
+// ----------------------------------------------------
+struct UnoControlListBoxModel_Data;
+typedef ::cppu::AggImplInheritanceHelper1 < UnoControlModel
+ , ::com::sun::star::awt::XItemList
+ > UnoControlListBoxModel_Base;
+class TOOLKIT_DLLPUBLIC UnoControlListBoxModel : public UnoControlListBoxModel_Base
+{
+protected:
+ enum ConstructorMode
+ {
+ ConstructDefault,
+ ConstructWithoutProperties
+ };
+
+public:
+ UnoControlListBoxModel(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory,
+ ConstructorMode const i_mode = ConstructDefault
+ );
+ UnoControlListBoxModel( const UnoControlListBoxModel& i_rSource );
+ ~UnoControlListBoxModel();
+
+ UnoControlModel* Clone() const { return new UnoControlListBoxModel( *this ); }
+
+ virtual void ImplNormalizePropertySequence(
+ const sal_Int32 _nCount, /// the number of entries in the arrays
+ sal_Int32* _pHandles, /// the handles of the properties to set
+ ::com::sun::star::uno::Any* _pValues, /// the values of the properties to set
+ sal_Int32* _pValidHandles /// pointer to the valid handles, allowed to be adjusted
+ ) const SAL_THROW(());
+
+ // ::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::io::XPersistObject
+ ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XServiceInfo
+ //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);
+ virtual void SAL_CALL insertItem( ::sal_Int32 Position, const ::rtl::OUString& ItemText, const ::rtl::OUString& ItemImageURL ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL insertItemText( ::sal_Int32 Position, const ::rtl::OUString& ItemText ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL insertItemImage( ::sal_Int32 Position, const ::rtl::OUString& ItemImageURL ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeItem( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeAllItems( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setItemText( ::sal_Int32 Position, const ::rtl::OUString& ItemText ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setItemImage( ::sal_Int32 Position, const ::rtl::OUString& ItemImageURL ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setItemTextAndImage( ::sal_Int32 Position, const ::rtl::OUString& ItemText, const ::rtl::OUString& ItemImageURL ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setItemData( ::sal_Int32 Position, const ::com::sun::star::uno::Any& DataValue ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getItemText( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getItemImage( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::beans::Pair< ::rtl::OUString, ::rtl::OUString > SAL_CALL getItemTextAndImage( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getItemData( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Pair< ::rtl::OUString, ::rtl::OUString > > SAL_CALL getAllItems( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addItemListListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeItemListListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListListener >& Listener ) 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);
+
+protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+private:
+ void impl_notifyItemListEvent_nolck(
+ const sal_Int32 i_nItemPosition,
+ const ::boost::optional< ::rtl::OUString >& i_rItemText,
+ const ::boost::optional< ::rtl::OUString >& i_rItemImageURL,
+ void ( SAL_CALL ::com::sun::star::awt::XItemListListener::*NotificationMethod )( const ::com::sun::star::awt::ItemListEvent& )
+ );
+
+ void impl_handleInsert(
+ const sal_Int32 i_nItemPosition,
+ const ::boost::optional< ::rtl::OUString >& i_rItemText,
+ const ::boost::optional< ::rtl::OUString >& i_rItemImageURL,
+ ::osl::ClearableMutexGuard& i_rClearBeforeNotify
+ );
+
+ void impl_handleRemove(
+ const sal_Int32 i_nItemPosition,
+ ::osl::ClearableMutexGuard& i_rClearBeforeNotify
+ );
+
+ void impl_handleModify(
+ const sal_Int32 i_nItemPosition,
+ const ::boost::optional< ::rtl::OUString >& i_rItemText,
+ const ::boost::optional< ::rtl::OUString >& i_rItemImageURL,
+ ::osl::ClearableMutexGuard& i_rClearBeforeNotify
+ );
+
+ void impl_getStringItemList( ::std::vector< ::rtl::OUString >& o_rStringItems ) const;
+ void impl_setStringItemList_nolck( const ::std::vector< ::rtl::OUString >& i_rStringItems );
+
+protected:
+ ::boost::scoped_ptr< UnoControlListBoxModel_Data > m_pData;
+ ::cppu::OInterfaceContainerHelper m_aItemListListeners;
+};
+
+// ----------------------------------------------------
+// class UnoListBoxControl
+// ----------------------------------------------------
+typedef ::cppu::AggImplInheritanceHelper5 < UnoControlBase
+ , ::com::sun::star::awt::XListBox
+ , ::com::sun::star::awt::XItemListener
+ , ::com::sun::star::awt::XLayoutConstrains
+ , ::com::sun::star::awt::XTextLayoutConstrains
+ , ::com::sun::star::awt::XItemListListener
+ > UnoListBoxControl_Base;
+class TOOLKIT_DLLPUBLIC UnoListBoxControl : public UnoListBoxControl_Base
+{
+public:
+ UnoListBoxControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ::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 dispose( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { UnoControlBase::disposing( Source ); }
+
+ // ::com::sun::star::awt::XListBox
+ void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL addItem( const ::rtl::OUString& aItem, sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL addItems( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aItems, sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeItems( sal_Int16 nPos, sal_Int16 nCount ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Int16 SAL_CALL getItemCount( ) throw(::com::sun::star::uno::RuntimeException);
+ ::rtl::OUString SAL_CALL getItem( sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getItems( ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Int16 SAL_CALL getSelectedItemPos( ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< sal_Int16 > SAL_CALL getSelectedItemsPos( ) throw(::com::sun::star::uno::RuntimeException);
+ ::rtl::OUString SAL_CALL getSelectedItem( ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSelectedItems( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL selectItemPos( sal_Int16 nPos, sal_Bool bSelect ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL selectItemsPos( const ::com::sun::star::uno::Sequence< sal_Int16 >& aPositions, sal_Bool bSelect ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL selectItem( const ::rtl::OUString& aItem, sal_Bool bSelect ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Bool SAL_CALL isMutipleMode( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setMultipleMode( sal_Bool bMulti ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Int16 SAL_CALL getDropDownLineCount( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setDropDownLineCount( sal_Int16 nLines ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL makeVisible( sal_Int16 nEntry ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XItemListener
+ void SAL_CALL itemStateChanged( const ::com::sun::star::awt::ItemEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XLayoutConstrains
+ ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XTextLayoutConstrains
+ ::com::sun::star::awt::Size SAL_CALL getMinimumSize( sal_Int16 nCols, sal_Int16 nLines ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XUnoControl
+ 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);
+
+ // ::com::sun::star::lang::XServiceInfo
+ // 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;
+};
+
+// ----------------------------------------------------
+// class UnoControlComboBoxModel
+// ----------------------------------------------------
+class UnoControlComboBoxModel : public UnoControlListBoxModel
+{
+protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+public:
+ UnoControlComboBoxModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoControlComboBoxModel( const UnoControlComboBoxModel& rModel ) : UnoControlListBoxModel( rModel ) {;}
+
+ UnoControlModel* Clone() const { return new UnoControlComboBoxModel( *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);
+ // 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
+ ::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
+ , public ::com::sun::star::awt::XItemListener
+ , public ::com::sun::star::awt::XItemListListener
+{
+private:
+ ActionListenerMultiplexer maActionListeners;
+ ItemListenerMultiplexer maItemListeners;
+
+public:
+
+ UnoComboBoxControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ::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(); }
+
+
+ // ::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::XComboBox
+ void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL addItem( const ::rtl::OUString& aItem, sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL addItems( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aItems, sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeItems( sal_Int16 nPos, sal_Int16 nCount ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Int16 SAL_CALL getItemCount( ) throw(::com::sun::star::uno::RuntimeException);
+ ::rtl::OUString SAL_CALL getItem( sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getItems( ) throw(::com::sun::star::uno::RuntimeException);
+ 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
+ ::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();
+
+};
+
+// ----------------------------------------------------
+// class UnoSpinFieldControl
+// ----------------------------------------------------
+class UnoSpinFieldControl : public UnoEditControl,
+ public ::com::sun::star::awt::XSpinField
+{
+private:
+ SpinListenerMultiplexer maSpinListeners;
+ sal_Bool mbRepeat;
+
+public:
+ UnoSpinFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+
+ ::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(); }
+
+ // ::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::XSpinField
+ void SAL_CALL addSpinListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XSpinListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeSpinListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XSpinListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL up() throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL down() throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL first() throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL last() throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL enableRepeat( sal_Bool bRepeat ) throw(::com::sun::star::uno::RuntimeException);
+
+
+ // ::com::sun::star::lang::XServiceInfo
+ // No service info, only base class for other fields.
+};
+
+
+// ----------------------------------------------------
+// class UnoControlDateFieldModel
+// ----------------------------------------------------
+class UnoControlDateFieldModel : public UnoControlModel
+{
+protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+public:
+ UnoControlDateFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoControlDateFieldModel( const UnoControlDateFieldModel& rModel ) : UnoControlModel( rModel ) {;}
+
+ UnoControlModel* Clone() const { return new UnoControlDateFieldModel( *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( UnoControlDateFieldModel, UnoControlModel, szServiceName2_UnoControlDateFieldModel )
+
+};
+
+// ----------------------------------------------------
+// class UnoDateFieldControl
+// ----------------------------------------------------
+class UnoDateFieldControl : public UnoSpinFieldControl,
+ public ::com::sun::star::awt::XDateField
+{
+private:
+ sal_Int32 mnFirst;
+ sal_Int32 mnLast;
+ sal_Bool mbLongFormat;
+public:
+ UnoDateFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ::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 UnoSpinFieldControl::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::XTextListener
+ void SAL_CALL textChanged( const ::com::sun::star::awt::TextEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XDateField
+ void SAL_CALL setDate( sal_Int32 Date ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Int32 SAL_CALL getDate( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setMin( sal_Int32 Date ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Int32 SAL_CALL getMin( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setMax( sal_Int32 Date ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Int32 SAL_CALL getMax( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setFirst( sal_Int32 Date ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Int32 SAL_CALL getFirst( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setLast( sal_Int32 Date ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Int32 SAL_CALL getLast( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setLongFormat( sal_Bool bLong ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Bool SAL_CALL isLongFormat( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setEmpty( ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Bool SAL_CALL isEmpty( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setStrictFormat( sal_Bool bStrict ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Bool SAL_CALL isStrictFormat( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoDateFieldControl, UnoSpinFieldControl, szServiceName2_UnoControlDateField )
+};
+
+// ----------------------------------------------------
+// class UnoControlTimeFieldModel
+// ----------------------------------------------------
+class UnoControlTimeFieldModel : public UnoControlModel
+{
+protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+public:
+ UnoControlTimeFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoControlTimeFieldModel( const UnoControlTimeFieldModel& rModel ) : UnoControlModel( rModel ) {;}
+
+ UnoControlModel* Clone() const { return new UnoControlTimeFieldModel( *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( UnoControlTimeFieldModel, UnoControlModel, szServiceName2_UnoControlTimeFieldModel )
+
+};
+
+// ----------------------------------------------------
+// class UnoTimeFieldControl
+// ----------------------------------------------------
+class UnoTimeFieldControl : public UnoSpinFieldControl,
+ public ::com::sun::star::awt::XTimeField
+{
+private:
+ sal_Int32 mnFirst;
+ sal_Int32 mnLast;
+
+public:
+ UnoTimeFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ::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 UnoSpinFieldControl::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::XTextListener
+ void SAL_CALL textChanged( const ::com::sun::star::awt::TextEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XTimeField
+ void SAL_CALL setTime( sal_Int32 Time ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Int32 SAL_CALL getTime( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setMin( sal_Int32 Time ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Int32 SAL_CALL getMin( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setMax( sal_Int32 Time ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Int32 SAL_CALL getMax( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setFirst( sal_Int32 Time ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Int32 SAL_CALL getFirst( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setLast( sal_Int32 Time ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Int32 SAL_CALL getLast( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setEmpty( ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Bool SAL_CALL isEmpty( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setStrictFormat( sal_Bool bStrict ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Bool SAL_CALL isStrictFormat( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoTimeFieldControl, UnoSpinFieldControl, szServiceName2_UnoControlTimeField )
+
+};
+
+// ----------------------------------------------------
+// class UnoControlNumericFieldModel
+// ----------------------------------------------------
+class UnoControlNumericFieldModel : public UnoControlModel
+{
+protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+public:
+ UnoControlNumericFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoControlNumericFieldModel( const UnoControlNumericFieldModel& rModel ) : UnoControlModel( rModel ) {;}
+
+ UnoControlModel* Clone() const { return new UnoControlNumericFieldModel( *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( UnoControlNumericFieldModel, UnoControlModel, szServiceName2_UnoControlNumericFieldModel )
+
+};
+
+// ----------------------------------------------------
+// class UnoNumericFieldControl
+// ----------------------------------------------------
+class UnoNumericFieldControl : public UnoSpinFieldControl,
+ public ::com::sun::star::awt::XNumericField
+{
+private:
+ double mnFirst;
+ double mnLast;
+
+public:
+ UnoNumericFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ::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 UnoSpinFieldControl::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);
+
+ // ::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::XTextListener
+ void SAL_CALL textChanged( const ::com::sun::star::awt::TextEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XNumericField
+ void SAL_CALL setValue( double Value ) throw(::com::sun::star::uno::RuntimeException);
+ double SAL_CALL getValue( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setMin( double Value ) throw(::com::sun::star::uno::RuntimeException);
+ double SAL_CALL getMin( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setMax( double Value ) throw(::com::sun::star::uno::RuntimeException);
+ double SAL_CALL getMax( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setFirst( double Value ) throw(::com::sun::star::uno::RuntimeException);
+ double SAL_CALL getFirst( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setLast( double Value ) throw(::com::sun::star::uno::RuntimeException);
+ double SAL_CALL getLast( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setSpinSize( double Value ) throw(::com::sun::star::uno::RuntimeException);
+ double SAL_CALL getSpinSize( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setDecimalDigits( sal_Int16 nDigits ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Int16 SAL_CALL getDecimalDigits( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setStrictFormat( sal_Bool bStrict ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Bool SAL_CALL isStrictFormat( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoNumericFieldControl, UnoSpinFieldControl, szServiceName2_UnoControlNumericField )
+
+};
+
+// ----------------------------------------------------
+// class UnoControlCurrencyFieldModel
+// ----------------------------------------------------
+class UnoControlCurrencyFieldModel : public UnoControlModel
+{
+protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+public:
+ UnoControlCurrencyFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoControlCurrencyFieldModel( const UnoControlCurrencyFieldModel& rModel ) : UnoControlModel( rModel ) {;}
+
+ UnoControlModel* Clone() const { return new UnoControlCurrencyFieldModel( *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( UnoControlCurrencyFieldModel, UnoControlModel, szServiceName2_UnoControlCurrencyFieldModel )
+
+};
+
+// ----------------------------------------------------
+// class UnoCurrencyFieldControl
+// ----------------------------------------------------
+class UnoCurrencyFieldControl : public UnoSpinFieldControl,
+ public ::com::sun::star::awt::XCurrencyField
+{
+private:
+ double mnFirst;
+ double mnLast;
+
+public:
+ UnoCurrencyFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ::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 UnoSpinFieldControl::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);
+
+ // ::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::XTextListener
+ void SAL_CALL textChanged( const ::com::sun::star::awt::TextEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XCurrencyField
+ void SAL_CALL setValue( double Value ) throw(::com::sun::star::uno::RuntimeException);
+ double SAL_CALL getValue( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setMin( double Value ) throw(::com::sun::star::uno::RuntimeException);
+ double SAL_CALL getMin( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setMax( double Value ) throw(::com::sun::star::uno::RuntimeException);
+ double SAL_CALL getMax( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setFirst( double Value ) throw(::com::sun::star::uno::RuntimeException);
+ double SAL_CALL getFirst( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setLast( double Value ) throw(::com::sun::star::uno::RuntimeException);
+ double SAL_CALL getLast( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setSpinSize( double Value ) throw(::com::sun::star::uno::RuntimeException);
+ double SAL_CALL getSpinSize( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setDecimalDigits( sal_Int16 nDigits ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Int16 SAL_CALL getDecimalDigits( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setStrictFormat( sal_Bool bStrict ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Bool SAL_CALL isStrictFormat( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoCurrencyFieldControl, UnoSpinFieldControl, szServiceName2_UnoControlCurrencyField )
+};
+
+// ----------------------------------------------------
+// class UnoControlPatternFieldModel
+// ----------------------------------------------------
+class UnoControlPatternFieldModel : public UnoControlModel
+{
+protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+public:
+ UnoControlPatternFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoControlPatternFieldModel( const UnoControlPatternFieldModel& rModel ) : UnoControlModel( rModel ) {;}
+
+ UnoControlModel* Clone() const { return new UnoControlPatternFieldModel( *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( UnoControlPatternFieldModel, UnoControlModel, szServiceName2_UnoControlPatternFieldModel )
+
+};
+
+// ----------------------------------------------------
+// class UnoPatternFieldControl
+// ----------------------------------------------------
+class UnoPatternFieldControl : public UnoSpinFieldControl,
+ public ::com::sun::star::awt::XPatternField
+{
+protected:
+ void ImplSetPeerProperty( const ::rtl::OUString& rPropName, const ::com::sun::star::uno::Any& rVal );
+
+public:
+ UnoPatternFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ::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 UnoSpinFieldControl::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);
+
+ // ::com::sun::star::awt::XPatternField
+ void SAL_CALL setMasks( const ::rtl::OUString& EditMask, const ::rtl::OUString& LiteralMask ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL getMasks( ::rtl::OUString& EditMask, ::rtl::OUString& LiteralMask ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setString( const ::rtl::OUString& Str ) throw(::com::sun::star::uno::RuntimeException);
+ ::rtl::OUString SAL_CALL getString( ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setStrictFormat( sal_Bool bStrict ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Bool SAL_CALL isStrictFormat( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoPatternFieldControl, UnoSpinFieldControl, szServiceName2_UnoControlPatternField )
+
+};
+
+// ----------------------------------------------------
+// class UnoControlProgressBarModel
+// ----------------------------------------------------
+class UnoControlProgressBarModel : public UnoControlModel
+{
+protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+public:
+ UnoControlProgressBarModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoControlProgressBarModel( const UnoControlProgressBarModel& rModel ) : UnoControlModel( rModel ) {;}
+
+ UnoControlModel* Clone() const { return new UnoControlProgressBarModel( *this ); }
+
+ // ::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::io::XPersistObject
+ ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoControlProgressBarModel, UnoControlModel, szServiceName2_UnoControlProgressBarModel )
+};
+
+// ----------------------------------------------------
+// class UnoProgressBarControl
+// ----------------------------------------------------
+class UnoProgressBarControl : public UnoControlBase,
+ public ::com::sun::star::awt::XProgressBar
+{
+public:
+ UnoProgressBarControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ::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 UnoControlBase::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);
+
+ // ::com::sun::star::awt::XProgressBar
+ void SAL_CALL setForegroundColor( sal_Int32 nColor ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setBackgroundColor( sal_Int32 nColor ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setValue( sal_Int32 nValue ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setRange( sal_Int32 nMin, sal_Int32 nMax ) throw(::com::sun::star::uno::RuntimeException );
+ sal_Int32 SAL_CALL getValue() throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoProgressBarControl, UnoControlBase, szServiceName2_UnoControlProgressBar )
+};
+
+
+// ----------------------------------------------------
+// class UnoControlFixedLineModel
+// ----------------------------------------------------
+class UnoControlFixedLineModel : public UnoControlModel
+{
+protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+public:
+ UnoControlFixedLineModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoControlFixedLineModel( const UnoControlFixedLineModel& rModel ) : UnoControlModel( rModel ) {;}
+
+ UnoControlModel* Clone() const { return new UnoControlFixedLineModel( *this ); }
+
+ // ::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::io::XPersistObject
+ ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoControlFixedLineModel, UnoControlModel, szServiceName2_UnoControlFixedLineModel )
+
+};
+
+// ----------------------------------------------------
+// class UnoFixedLineControl
+// ----------------------------------------------------
+class UnoFixedLineControl : public UnoControlBase
+{
+public:
+ UnoFixedLineControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ::rtl::OUString GetComponentServiceName();
+
+ sal_Bool SAL_CALL isTransparent( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoFixedLineControl, UnoControlBase, szServiceName2_UnoControlFixedLine )
+
+};
+
+
+
+#endif // _TOOLKIT_HELPER_UNOCONTROLS_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */