INTEGRATION: CWS pbrwuno (1.5.158); FILE MERGED

2006/02/10 11:52:35 fs 1.5.158.10: NullPointerException is unusual at addFooListener methods
2005/12/20 10:54:54 fs 1.5.158.9: #i53095# new control type for editing hyperlinks
2005/10/19 07:48:06 fs 1.5.158.8: #i53095# knitting some loose ends
2005/10/17 12:20:19 fs 1.5.158.7: make StringListField exchange a sequence< string >
2005/10/17 10:28:01 fs 1.5.158.6: #i53095# make numeric field exchange its values as double
2005/10/17 07:17:06 fs 1.5.158.5: replace MeasurementUnit with css.util.MeasureUnit
2005/10/14 12:43:49 fs 1.5.158.4: #i53095# properly care for MAYBEVOID properties and AMBIGUOUS property values
2005/10/05 07:10:54 fs 1.5.158.3: RESYNC: (1.5-1.6); FILE MERGED
2005/09/05 07:41:55 fs 1.5.158.2: #i53095# phase 3, part 1: introduced XPropertyControl and relatives,
describing one control in the ObjectInspector, responsible for one
property
known issues:
- rebuildPropertyUI can cause problems now: If the user clicks into
  the control for property A, which causes property B to be committed,
  which causes the UI for property A to be rebuilt, then this will
  crash currently. Reason: rebuildPropertyUI now synchronously replaces
  the VCL-Window of the rebuilt control, which is exactly the one
  which is still in some MouseButtonDown-handler.
  possible solutions:
  - see if rebuiltPropertyUI can be obsoleted - handlers should be able
    to just obtain the XPropertyControl from the PropertyUI, and
    re-initialize the control. Shouldn't they?`
  - make one of the steps in the chain (mouse-click, handler-call,
    rebuildPropertyUI-callback) asynchronous.
2005/08/09 14:00:07 fs 1.5.158.1: #i53095# phase 1:
- don't use strings to transver values between controls and introspectee, but Anys
- first version of a dedicated property handler for form-component-related properties
  (not yet completed)
known regressions over previous phase:
- handlers for events not yet implemented, thus some assertions
- click handlers for form-component-related properties do not yet work,
  thus the browse buttons mostly do not work
This commit is contained in:
Vladimir Glazounov 2006-03-14 10:33:05 +00:00
parent 698af54e8a
commit 50eb218c74

View file

@ -4,9 +4,9 @@
*
* $RCSfile: standardcontrol.hxx,v $
*
* $Revision: 1.6 $
* $Revision: 1.7 $
*
* last change: $Author: rt $ $Date: 2005-09-08 20:28:33 $
* last change: $Author: vg $ $Date: 2006-03-14 11:33:05 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@ -39,6 +39,25 @@
#ifndef _EXTENSIONS_PROPCTRLR_COMMONCONTROL_HXX_
#include "commoncontrol.hxx"
#endif
#ifndef _EXTENSIONS_PROPCTRLR_PCRCOMMON_HXX_
#include "pcrcommon.hxx"
#endif
/** === begin UNO includes === **/
#ifndef _COM_SUN_STAR_INSPECTION_XNUMERICCONTROL_HPP_
#include <com/sun/star/inspection/XNumericControl.hpp>
#endif
#ifndef _COM_SUN_STAR_INSPECTION_XSTRINGLISTCONTROL_HPP_
#include <com/sun/star/inspection/XStringListControl.hpp>
#endif
#ifndef _COM_SUN_STAR_INSPECTION_XHYPERLINKCONTROL_HPP_
#include <com/sun/star/inspection/XHyperlinkControl.hpp>
#endif
#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
#include <com/sun/star/uno/Sequence.hxx>
#endif
/** === end UNO includes === **/
#ifndef _SV_FIELD_HXX
#include <vcl/field.hxx>
#endif
@ -61,7 +80,7 @@
#include <svtools/fmtfield.hxx>
#endif
#include <memory>
#include <set>
class PushButton;
class MultiLineEdit;
@ -70,234 +89,354 @@ namespace pcr
{
//............................................................................
class StringRepresentation;
//========================================================================
//= ListLikeControlWithModifyHandler
//========================================================================
/** Very small helper class which adds a SetModifyHdl to a ListBox-derived class,
thus giving this class the same API (as far as the CommonBehaviourControl is concerned)
as all other windows.
*/
template< class LISTBOX_WINDOW >
class ListLikeControlWithModifyHandler : public ControlWindow< LISTBOX_WINDOW >
{
protected:
typedef ControlWindow< LISTBOX_WINDOW > ListBoxType;
public:
ListLikeControlWithModifyHandler( Window* _pParent, WinBits _nStyle )
:ListBoxType( _pParent, _nStyle )
{
}
void SetModifyHdl( const Link& _rLink ) { ListBoxType::SetSelectHdl( _rLink ); }
};
//========================================================================
//= OTimeControl
//========================================================================
class OTimeControl : public OCommonBehaviourControl, TimeField
typedef CommonBehaviourControl< ::com::sun::star::inspection::XPropertyControl, ControlWindow< TimeField > > OTimeControl_Base;
class OTimeControl : public OTimeControl_Base
{
protected:
virtual long PreNotify( NotifyEvent& rNEvt );
public:
OTimeControl( Window* pParent, WinBits nWinStyle = WB_TABSTOP);
OTimeControl( Window* pParent, WinBits nWinStyle );
virtual void SetProperty(const ::rtl::OUString &rString,sal_Bool bIsUnknown=sal_False);
virtual ::rtl::OUString GetProperty()const;
// XPropertyControl
virtual ::com::sun::star::uno::Any SAL_CALL getValue() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setValue( const ::com::sun::star::uno::Any& _value ) throw (::com::sun::star::beans::IllegalTypeException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Type SAL_CALL getValueType() throw (::com::sun::star::uno::RuntimeException);
};
//========================================================================
//= ODateControl
//========================================================================
class ODateControl : public OCommonBehaviourControl, CalendarField
typedef CommonBehaviourControl< ::com::sun::star::inspection::XPropertyControl, ControlWindow< CalendarField > > ODateControl_Base;
class ODateControl : public ODateControl_Base
{
protected:
virtual long PreNotify( NotifyEvent& rNEvt );
public:
ODateControl( Window* pParent, WinBits nWinStyle = WB_TABSTOP);
ODateControl( Window* pParent, WinBits nWinStyle );
virtual void SetProperty(const ::rtl::OUString &rString,sal_Bool bIsUnknown=sal_False);
virtual ::rtl::OUString GetProperty()const;
// XPropertyControl
virtual ::com::sun::star::uno::Any SAL_CALL getValue() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setValue( const ::com::sun::star::uno::Any& _value ) throw (::com::sun::star::beans::IllegalTypeException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Type SAL_CALL getValueType() throw (::com::sun::star::uno::RuntimeException);
};
//========================================================================
//= OEditControl
//========================================================================
class OEditControl : public OCommonBehaviourControl, Edit
typedef CommonBehaviourControl< ::com::sun::star::inspection::XPropertyControl, ControlWindow< Edit > > OEditControl_Base;
class OEditControl : public OEditControl_Base
{
protected:
sal_Bool m_bIsPassword : 1;
protected:
virtual long PreNotify( NotifyEvent& rNEvt );
sal_Bool m_bIsPassword : 1;
public:
OEditControl(Window* _pParent, sal_Bool _bPassWord, WinBits nWinStyle = WB_TABSTOP);
OEditControl( Window* _pParent, sal_Bool _bPassWord, WinBits nWinStyle );
virtual void SetProperty(const ::rtl::OUString &rString,sal_Bool bIsUnknown=sal_False);
virtual ::rtl::OUString GetProperty()const;
// XPropertyControl
virtual ::com::sun::star::uno::Any SAL_CALL getValue() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setValue( const ::com::sun::star::uno::Any& _value ) throw (::com::sun::star::beans::IllegalTypeException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Type SAL_CALL getValueType() throw (::com::sun::star::uno::RuntimeException);
protected:
virtual void modified(Window* _pSource);
};
//========================================================================
//= OCurrencyControl
//========================================================================
class OCurrencyControl : public OCommonBehaviourControl, LongCurrencyField
{
protected:
virtual long PreNotify( NotifyEvent& rNEvt );
public:
OCurrencyControl( Window* pParent,sal_uInt16 nDigits,
WinBits nWinStyle = WB_TABSTOP);
virtual void SetProperty(const ::rtl::OUString &rString,sal_Bool bIsUnknown=sal_False);
virtual ::rtl::OUString GetProperty()const;
virtual void modified();
};
//========================================================================
//= ODateTimeControl
//========================================================================
class ODateTimeControl : public OCommonBehaviourControl, FormattedField
typedef CommonBehaviourControl< ::com::sun::star::inspection::XPropertyControl, ControlWindow< FormattedField > > ODateTimeControl_Base;
class ODateTimeControl : public ODateTimeControl_Base
{
public:
ODateTimeControl( Window* pParent,WinBits nWinStyle );
// XPropertyControl
virtual ::com::sun::star::uno::Any SAL_CALL getValue() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setValue( const ::com::sun::star::uno::Any& _value ) throw (::com::sun::star::beans::IllegalTypeException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Type SAL_CALL getValueType() throw (::com::sun::star::uno::RuntimeException);
};
//========================================================================
//= HyperlinkInput
//========================================================================
class HyperlinkInput : public Edit
{
private:
::std::auto_ptr< StringRepresentation > m_pConverter;
Point m_aMouseButtonDownPos;
Link m_aClickHandler;
public:
ODateTimeControl( Window* pParent,sal_uInt16 nDigits, WinBits nWinStyle = WB_TABSTOP );
HyperlinkInput( Window* _pParent, WinBits _nWinStyle );
virtual void SetProperty( const ::rtl::OUString& _rString,sal_Bool _bIsUnknown = sal_False );
virtual ::rtl::OUString GetProperty() const;
/** sets the handler which will (asynchronously, with locked SolarMutex) be called
when the hyperlink has been clicked by the user
*/
void SetClickHdl( const Link& _rHdl ) { m_aClickHandler = _rHdl; }
const Link& GetClickHdl( ) const { return m_aClickHandler; }
protected:
virtual void MouseMove( const MouseEvent& rMEvt );
virtual void MouseButtonDown( const MouseEvent& rMEvt );
virtual void MouseButtonUp( const MouseEvent& rMEvt );
virtual void Tracking( const TrackingEvent& rTEvt );
private:
void impl_checkEndClick( const MouseEvent rMEvt );
bool impl_textHitTest( const Point& _rWindowPos );
};
//========================================================================
//= OHyperlinkControl
//========================================================================
typedef CommonBehaviourControl< ::com::sun::star::inspection::XHyperlinkControl, ControlWindow< HyperlinkInput > > OHyperlinkControl_Base;
class OHyperlinkControl : public OHyperlinkControl_Base
{
private:
::cppu::OInterfaceContainerHelper m_aActionListeners;
public:
OHyperlinkControl( Window* _pParent, WinBits _nWinStyle );
// XPropertyControl
virtual ::com::sun::star::uno::Any SAL_CALL getValue() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setValue( const ::com::sun::star::uno::Any& _value ) throw (::com::sun::star::beans::IllegalTypeException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Type SAL_CALL getValueType() throw (::com::sun::star::uno::RuntimeException);
// XHyperlinkControl
virtual void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& listener ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& listener ) throw (::com::sun::star::uno::RuntimeException);
protected:
// XComponent
virtual void SAL_CALL disposing();
protected:
DECL_LINK( OnHyperlinkClicked, void* );
};
//========================================================================
//= CustomConvertibleNumericField
//========================================================================
class CustomConvertibleNumericField : public ControlWindow< MetricField >
{
typedef ControlWindow< MetricField > BaseClass;
public:
CustomConvertibleNumericField( Window* _pParent, WinBits _nStyle )
:BaseClass( _pParent, _nStyle )
{
}
long GetLastValue() const { return mnLastValue; }
};
//========================================================================
//= ONumericControl
//========================================================================
class ONumericControl : public OCommonBehaviourControl, MetricField
typedef CommonBehaviourControl< ::com::sun::star::inspection::XNumericControl, CustomConvertibleNumericField > ONumericControl_Base;
class ONumericControl : public ONumericControl_Base
{
private:
FieldUnit m_eValueUnit;
protected:
virtual long PreNotify( NotifyEvent& rNEvt );
sal_Int16 m_nFieldToUNOValueFactor;
public:
ONumericControl( Window* pParent, sal_uInt16 nDigits, WinBits nWinStyle = WB_TABSTOP );
ONumericControl( Window* pParent, WinBits nWinStyle );
virtual void SetProperty(const ::rtl::OUString &rString,sal_Bool bIsUnknown=sal_False);
virtual ::rtl::OUString GetProperty()const;
// XPropertyControl
virtual ::com::sun::star::uno::Any SAL_CALL getValue() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setValue( const ::com::sun::star::uno::Any& _value ) throw (::com::sun::star::beans::IllegalTypeException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Type SAL_CALL getValueType() throw (::com::sun::star::uno::RuntimeException);
void SetMin(sal_Int32 _nMin) { MetricField::SetMin(_nMin); }
void SetMax(sal_Int32 _nMax) { MetricField::SetMax(_nMax); }
void SetFieldUnit( FieldUnit _eUnit ) { MetricField::SetUnit( _eUnit ); }
void SetValueUnit( FieldUnit _eUnit ) { m_eValueUnit = _eUnit; }
// XNumericControl
virtual ::sal_Int16 SAL_CALL getDecimalDigits() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setDecimalDigits( ::sal_Int16 _decimaldigits ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::beans::Optional< double > SAL_CALL getMinValue() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setMinValue( const ::com::sun::star::beans::Optional< double >& _minvalue ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::beans::Optional< double > SAL_CALL getMaxValue() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setMaxValue( const ::com::sun::star::beans::Optional< double >& _maxvalue ) throw (::com::sun::star::uno::RuntimeException);
virtual ::sal_Int16 SAL_CALL getDisplayUnit() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setDisplayUnit( ::sal_Int16 _displayunit ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
virtual ::sal_Int16 SAL_CALL getValueUnit() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setValueUnit( ::sal_Int16 _valueunit ) throw (::com::sun::star::uno::RuntimeException);
protected:
MetricField::SetUnit;
MetricField::SetCustomUnitText;
MetricField::GetCurUnitText;
MetricField::SetValue;
protected:
inline long GetLastValue() const { return mnLastValue; }
private:
/** converts an API value (<code>double</code>, as passed into <code>set[Max|Min|]Value) into
a <code>long</code> value which can be passed to our NumericField.
The conversion respects our decimal digits as well as our value factor (<member>m_nFieldToUNOValueFactor</member>).
*/
long impl_apiValueToFieldValue_nothrow( double _nApiValue ) const;
/** converts a control value, as obtained from our Numeric field, into a value which can passed
to outer callers via our UNO API.
*/
double impl_fieldValueToApiValue_nothrow( long _nFieldValue ) const;
};
//========================================================================
//= OColorControl
//========================================================================
class OColorControl : public OCommonBehaviourControl, ColorListBox
typedef CommonBehaviourControl < ::com::sun::star::inspection::XStringListControl
, ListLikeControlWithModifyHandler< ColorListBox >
> OColorControl_Base;
class OColorControl : public OColorControl_Base
{
protected:
virtual long PreNotify( NotifyEvent& rNEvt );
private:
::std::set< ::rtl::OUString > m_aNonColorEntries;
public:
OColorControl( Window* pParent, WinBits nWinStyle = WB_TABSTOP |WB_DROPDOWN|WB_AUTOSIZE);
OColorControl( Window* pParent, WinBits nWinStyle );
// property value handling
virtual void SetProperty(const ::rtl::OUString &rString,sal_Bool bIsUnknown=sal_False);
virtual ::rtl::OUString GetProperty()const;
// XPropertyControl
virtual ::com::sun::star::uno::Any SAL_CALL getValue() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setValue( const ::com::sun::star::uno::Any& _value ) throw (::com::sun::star::beans::IllegalTypeException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Type SAL_CALL getValueType() throw (::com::sun::star::uno::RuntimeException);
// list handling
virtual sal_Bool HasList();
virtual void ClearList();
virtual void InsertCtrEntry( const ::rtl::OUString& rString, sal_uInt16 nPos = LISTBOX_APPEND );
virtual void SetCtrSize(const Size& rSize);
// XStringListControl
virtual void SAL_CALL clearList( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL prependListEntry( const ::rtl::OUString& NewEntry ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL appendListEntry( const ::rtl::OUString& NewEntry ) throw (::com::sun::star::uno::RuntimeException);
protected:
virtual void modified(Window* _pSource);
virtual void modified();
};
//========================================================================
//= OListboxControl
//========================================================================
class OListboxControl : public OCommonBehaviourControl, ListBox
typedef CommonBehaviourControl < ::com::sun::star::inspection::XStringListControl
, ListLikeControlWithModifyHandler< ListBox >
> OListboxControl_Base;
class OListboxControl : public OListboxControl_Base
{
protected:
virtual long PreNotify( NotifyEvent& rNEvt );
public:
OListboxControl( Window* pParent, WinBits nWinStyle = WB_TABSTOP|WB_SORT|WB_DROPDOWN|WB_AUTOSIZE);
OListboxControl( Window* pParent, WinBits nWinStyle );
// property value handling
virtual void SetProperty(const ::rtl::OUString &rString,sal_Bool bIsUnknown=sal_False);
virtual ::rtl::OUString GetProperty()const;
// XPropertyControl
virtual ::com::sun::star::uno::Any SAL_CALL getValue() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setValue( const ::com::sun::star::uno::Any& _value ) throw (::com::sun::star::beans::IllegalTypeException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Type SAL_CALL getValueType() throw (::com::sun::star::uno::RuntimeException);
// list handling
virtual sal_Bool HasList();
virtual void ClearList();
virtual void InsertCtrEntry( const ::rtl::OUString& rString, sal_uInt16 nPos = LISTBOX_APPEND );
virtual void SetCtrSize(const Size& rSize);
// XStringListControl
virtual void SAL_CALL clearList( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL prependListEntry( const ::rtl::OUString& NewEntry ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL appendListEntry( const ::rtl::OUString& NewEntry ) throw (::com::sun::star::uno::RuntimeException);
protected:
virtual void modified(Window* _pSource);
virtual void modified();
};
//========================================================================
//= OComboboxControl
//========================================================================
class OComboboxControl : public OCommonBehaviourControl, ComboBox
typedef CommonBehaviourControl< ::com::sun::star::inspection::XStringListControl, ControlWindow< ComboBox > > OComboboxControl_Base;
class OComboboxControl : public OComboboxControl_Base
{
protected:
virtual long PreNotify( NotifyEvent& rNEvt );
public:
OComboboxControl( Window* pParent, WinBits nWinStyle );
// XPropertyControl
virtual ::com::sun::star::uno::Any SAL_CALL getValue() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setValue( const ::com::sun::star::uno::Any& _value ) throw (::com::sun::star::beans::IllegalTypeException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Type SAL_CALL getValueType() throw (::com::sun::star::uno::RuntimeException);
// XStringListControl
virtual void SAL_CALL clearList( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL prependListEntry( const ::rtl::OUString& NewEntry ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL appendListEntry( const ::rtl::OUString& NewEntry ) throw (::com::sun::star::uno::RuntimeException);
};
//========================================================================
//= DropDownEditControl
//========================================================================
enum MultiLineOperationMode
{
eStringList,
eMultiLineText
};
//========================================================================
//= DropDownEditControl
//========================================================================
class OMultilineFloatingEdit;
typedef ControlWindow< Edit > DropDownEditControl_Base;
/** an Edit field which can be used as ControlWindow, and has a drop-down button
*/
class DropDownEditControl : public DropDownEditControl_Base
{
private:
OMultilineFloatingEdit* m_pFloatingEdit;
MultiLineEdit* m_pImplEdit;
PushButton* m_pDropdownButton;
MultiLineOperationMode m_nOperationMode;
sal_Bool m_bDropdown : 1;
public:
OComboboxControl( Window* pParent,
WinBits nWinStyle = WB_TABSTOP | WB_SORT | WB_DROPDOWN | WB_AUTOSIZE);
DropDownEditControl( Window* _pParent, WinBits _nStyle );
~DropDownEditControl();
// property value handling
virtual void SetProperty(const ::rtl::OUString &rString,sal_Bool bIsUnknown=sal_False);
virtual ::rtl::OUString GetProperty()const;
void setOperationMode( MultiLineOperationMode _eMode ) { m_nOperationMode = _eMode; }
MultiLineOperationMode getOperationMode() const { return m_nOperationMode; }
// list handling
virtual sal_Bool HasList();
virtual void ClearList();
virtual void InsertCtrEntry( const ::rtl::OUString& rString, sal_uInt16 nPos = LISTBOX_APPEND );
void SetTextValue( const ::rtl::OUString& _rText );
::rtl::OUString GetTextValue() const;
virtual void SetCtrSize(const Size& rSize);
void SetStringListValue( const StlSyntaxSequence< ::rtl::OUString >& _rStrings );
StlSyntaxSequence< ::rtl::OUString >
GetStringListValue() const;
// ControlWindow overridables
virtual void setControlHelper( ControlHelper& _rControlHelper );
protected:
// Window overridables
virtual long PreNotify( NotifyEvent& rNEvt );
virtual void Resize();
protected:
long FindPos(long nSinglePos);
private:
DECL_LINK( ReturnHdl, OMultilineFloatingEdit* );
DECL_LINK( DropDownHdl, PushButton* );
sal_Bool ShowDropDown( sal_Bool bShow );
};
//========================================================================
//= OMultilineEditControl
//========================================================================
class OMultilineFloatingEdit;
class OMultilineEditControl : public OCommonBehaviourControl, Edit
typedef CommonBehaviourControl< ::com::sun::star::inspection::XPropertyControl, DropDownEditControl > OMultilineEditControl_Base;
class OMultilineEditControl : public OMultilineEditControl_Base
{
OMultilineFloatingEdit* m_pFloatingEdit;
MultiLineEdit* m_pImplEdit;
PushButton* m_pDropdownButton;
sal_Bool m_bDropdown :1;
sal_Bool m_bEdit :1;
DECL_LINK(ReturnHdl,OMultilineFloatingEdit*);
DECL_LINK(DropDownHdl, PushButton*);
protected:
virtual long PreNotify( NotifyEvent& rNEvt );
void Resize();
long FindPos(long nSinglePos);
public:
OMultilineEditControl( Window* pParent,sal_Bool bEdit,
WinBits nWinStyle = WB_TABSTOP | WB_DROPDOWN);
OMultilineEditControl( Window* pParent, MultiLineOperationMode _eMode, WinBits nWinStyle );
~OMultilineEditControl();
virtual sal_Bool ShowDropDown( sal_Bool bShow );
virtual void SetProperty(const ::rtl::OUString &rString,sal_Bool bIsUnknown=sal_False);
virtual ::rtl::OUString GetProperty()const;
protected:
virtual void modified(Window* _pSource);
// XPropertyControl
virtual ::com::sun::star::uno::Any SAL_CALL getValue() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setValue( const ::com::sun::star::uno::Any& _value ) throw (::com::sun::star::beans::IllegalTypeException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Type SAL_CALL getValueType() throw (::com::sun::star::uno::RuntimeException);
};
//............................................................................