diff options
Diffstat (limited to 'toolkit/inc/toolkit/controls/unocontrols.hxx')
-rw-r--r-- | toolkit/inc/toolkit/controls/unocontrols.hxx | 100 |
1 files changed, 57 insertions, 43 deletions
diff --git a/toolkit/inc/toolkit/controls/unocontrols.hxx b/toolkit/inc/toolkit/controls/unocontrols.hxx index 531467f359be..7c928ded5485 100644 --- a/toolkit/inc/toolkit/controls/unocontrols.hxx +++ b/toolkit/inc/toolkit/controls/unocontrols.hxx @@ -93,7 +93,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlEditModel(); + 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 ); } @@ -127,7 +127,7 @@ private: // They only support XTextComponent, so keep the text // here, maybe there is no Peer when calling setText()... ::rtl::OUString maText; - USHORT mnMaxTextLen; + sal_uInt16 mnMaxTextLen; sal_Bool mbSetTextInPeer; sal_Bool mbSetMaxTextLenInPeer; @@ -135,7 +135,7 @@ private: public: - UnoEditControl(); + UnoEditControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); TextListenerMultiplexer& GetTextListeners() { return maTextListeners; } @@ -196,7 +196,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlFileControlModel(); + 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 ); } @@ -217,7 +217,7 @@ public: class UnoFileControl : public UnoEditControl { public: - UnoFileControl(); + UnoFileControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); // ::com::sun::star::lang::XServiceInfo @@ -236,7 +236,12 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphicObject > mxGrfObj; protected: - GraphicControlModel() : mbAdjustingImagePosition( false ), mbAdjustingGraphic( false ) { } + 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 @@ -252,14 +257,14 @@ private: // ---------------------------------------------------- // class UnoControlButtonModel // ---------------------------------------------------- -class UnoControlButtonModel : public GraphicControlModel +class UnoControlButtonModel : public GraphicControlModel { protected: ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const; ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlButtonModel(); + 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 ); } @@ -292,7 +297,7 @@ private: public: - UnoButtonControl(); + 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); @@ -337,7 +342,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlImageControlModel(); + 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 ); } @@ -369,7 +374,7 @@ private: public: - UnoImageControlControl(); + 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); @@ -397,7 +402,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlRadioButtonModel(); + 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 ); } @@ -431,7 +436,7 @@ private: public: - UnoRadioButtonControl(); + 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); @@ -476,7 +481,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlCheckBoxModel(); + 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 ); } @@ -509,7 +514,7 @@ private: public: - UnoCheckBoxControl(); + UnoCheckBoxControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ~UnoCheckBoxControl(){;} ::rtl::OUString GetComponentServiceName(); @@ -557,7 +562,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlFixedHyperlinkModel(); + 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 ); } @@ -583,7 +588,7 @@ private: ActionListenerMultiplexer maActionListeners; public: - UnoFixedHyperlinkControl(); + UnoFixedHyperlinkControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); @@ -631,7 +636,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlFixedTextModel(); + 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 ); } @@ -655,7 +660,7 @@ class UnoFixedTextControl : public UnoControlBase, public ::com::sun::star::awt::XLayoutConstrains { public: - UnoFixedTextControl(); + 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); } @@ -696,7 +701,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlGroupBoxModel(); + 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 ); } @@ -718,7 +723,7 @@ public: class UnoGroupBoxControl : public UnoControlBase { public: - UnoGroupBoxControl(); + 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); @@ -735,12 +740,20 @@ struct UnoControlListBoxModel_Data; typedef ::cppu::AggImplInheritanceHelper1 < UnoControlModel , ::com::sun::star::awt::XItemList > UnoControlListBoxModel_Base; -class TOOLKIT_DLLPUBLIC UnoControlListBoxModel :public UnoControlListBoxModel_Base +class TOOLKIT_DLLPUBLIC UnoControlListBoxModel : public UnoControlListBoxModel_Base { protected: - UnoControlListBoxModel(bool asComboBox); + enum ConstructorMode + { + ConstructDefault, + ConstructWithoutProperties + }; + public: - UnoControlListBoxModel(); + 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(); @@ -838,7 +851,7 @@ typedef ::cppu::AggImplInheritanceHelper5 < UnoControlBase class TOOLKIT_DLLPUBLIC UnoListBoxControl : public UnoListBoxControl_Base { public: - UnoListBoxControl(); + 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); @@ -918,7 +931,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlComboBoxModel(); + 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 ); } @@ -952,7 +965,7 @@ private: public: - UnoComboBoxControl(); + 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); @@ -1016,10 +1029,10 @@ class UnoSpinFieldControl : public UnoEditControl, { private: SpinListenerMultiplexer maSpinListeners; - BOOL mbRepeat; + sal_Bool mbRepeat; public: - UnoSpinFieldControl(); + 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); @@ -1057,7 +1070,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlDateFieldModel(); + 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 ); } @@ -1084,7 +1097,7 @@ private: sal_Int32 mnLast; sal_Bool mbLongFormat; public: - UnoDateFieldControl(); + 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); } @@ -1133,7 +1146,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlTimeFieldModel(); + 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 ); } @@ -1160,7 +1173,7 @@ private: sal_Int32 mnLast; public: - UnoTimeFieldControl(); + 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); } @@ -1208,7 +1221,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlNumericFieldModel(); + 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 ); } @@ -1235,7 +1248,7 @@ private: double mnLast; public: - UnoNumericFieldControl(); + 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); } @@ -1285,7 +1298,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlCurrencyFieldModel(); + 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 ); } @@ -1312,7 +1325,7 @@ private: double mnLast; public: - UnoCurrencyFieldControl(); + 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); } @@ -1361,7 +1374,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlPatternFieldModel(); + 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 ); } @@ -1387,7 +1400,7 @@ protected: void ImplSetPeerProperty( const ::rtl::OUString& rPropName, const ::com::sun::star::uno::Any& rVal ); public: - UnoPatternFieldControl(); + 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); } @@ -1422,7 +1435,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlProgressBarModel(); + 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 ); } @@ -1444,7 +1457,7 @@ class UnoProgressBarControl : public UnoControlBase, public ::com::sun::star::awt::XProgressBar { public: - UnoProgressBarControl(); + 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); } @@ -1478,7 +1491,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlFixedLineModel(); + 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 ); } @@ -1500,7 +1513,7 @@ public: class UnoFixedLineControl : public UnoControlBase { public: - UnoFixedLineControl(); + 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); @@ -1511,6 +1524,7 @@ public: }; + #endif // _TOOLKIT_HELPER_UNOCONTROLS_HXX_ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |