diff options
author | Daniel Rentz [dr] <daniel.rentz@oracle.com> | 2011-03-25 11:30:09 +0100 |
---|---|---|
committer | Daniel Rentz [dr] <daniel.rentz@oracle.com> | 2011-03-25 11:30:09 +0100 |
commit | f0c70c87f04156342f0ef9d1fc98638fc42109c6 (patch) | |
tree | 0804379086cc3fb688f699e9faba813e3d58cd57 | |
parent | b464ea76c5259d6d010ffb9c6b6453fb5f5d8f33 (diff) |
calcvba: #164410# add MSForms.(Combo|Text)Box.TextLength symbols
-rw-r--r-- | oovbaapi/ooo/vba/msforms/XComboBox.idl | 1 | ||||
-rw-r--r-- | oovbaapi/ooo/vba/msforms/XTextBox.idl | 1 | ||||
-rw-r--r-- | vbahelper/source/msforms/vbacombobox.cxx | 5 | ||||
-rw-r--r-- | vbahelper/source/msforms/vbacombobox.hxx | 1 | ||||
-rw-r--r-- | vbahelper/source/msforms/vbatextbox.cxx | 5 | ||||
-rw-r--r-- | vbahelper/source/msforms/vbatextbox.hxx | 1 |
6 files changed, 14 insertions, 0 deletions
diff --git a/oovbaapi/ooo/vba/msforms/XComboBox.idl b/oovbaapi/ooo/vba/msforms/XComboBox.idl index 6b7d9e5c74..cf11d09543 100644 --- a/oovbaapi/ooo/vba/msforms/XComboBox.idl +++ b/oovbaapi/ooo/vba/msforms/XComboBox.idl @@ -48,6 +48,7 @@ interface XComboBox [attribute] long EnterFieldBehavior; [attribute] long ListStyle; [attribute] long TextAlign; + [attribute, readonly] long TextLength; [attribute, readonly] XNewFont Font; void AddItem( [in] any pvargItem, [in] any pvargIndex ); diff --git a/oovbaapi/ooo/vba/msforms/XTextBox.idl b/oovbaapi/ooo/vba/msforms/XTextBox.idl index f4746958e1..2690efc217 100644 --- a/oovbaapi/ooo/vba/msforms/XTextBox.idl +++ b/oovbaapi/ooo/vba/msforms/XTextBox.idl @@ -44,6 +44,7 @@ interface XTextBox [attribute] boolean Multiline; [attribute] long SpecialEffect; [attribute] long BorderStyle; + [attribute, readonly] long TextLength; [attribute, readonly] XNewFont Font; }; diff --git a/vbahelper/source/msforms/vbacombobox.cxx b/vbahelper/source/msforms/vbacombobox.cxx index 1fa2285031..bb90bb63de 100644 --- a/vbahelper/source/msforms/vbacombobox.cxx +++ b/vbahelper/source/msforms/vbacombobox.cxx @@ -230,6 +230,11 @@ void SAL_CALL ScVbaComboBox::setTextAlign( sal_Int32 /*nTextAlign*/ ) throw (uno { } +sal_Int32 SAL_CALL ScVbaComboBox::getTextLength() throw (uno::RuntimeException) +{ + return getText().getLength(); +} + uno::Reference< msforms::XNewFont > SAL_CALL ScVbaComboBox::getFont() throw (uno::RuntimeException) { return new VbaNewFont( this, mxContext, m_xProps ); diff --git a/vbahelper/source/msforms/vbacombobox.hxx b/vbahelper/source/msforms/vbacombobox.hxx index 1e7352306b..e36e7c2c56 100644 --- a/vbahelper/source/msforms/vbacombobox.hxx +++ b/vbahelper/source/msforms/vbacombobox.hxx @@ -70,6 +70,7 @@ public: virtual void SAL_CALL setListStyle( sal_Int32 nListStyle ) throw (css::uno::RuntimeException); virtual sal_Int32 SAL_CALL getTextAlign() throw (css::uno::RuntimeException); virtual void SAL_CALL setTextAlign( sal_Int32 nTextAlign ) throw (css::uno::RuntimeException); + virtual sal_Int32 SAL_CALL getTextLength() throw (css::uno::RuntimeException); virtual css::uno::Reference< ov::msforms::XNewFont > SAL_CALL getFont() throw (css::uno::RuntimeException); // Methods diff --git a/vbahelper/source/msforms/vbatextbox.cxx b/vbahelper/source/msforms/vbatextbox.cxx index 57ffbc3539..b3b6d8cf62 100644 --- a/vbahelper/source/msforms/vbatextbox.cxx +++ b/vbahelper/source/msforms/vbatextbox.cxx @@ -133,6 +133,11 @@ void SAL_CALL ScVbaTextBox::setBorderStyle( sal_Int32 /*nBorderStyle*/ ) throw ( { } +sal_Int32 SAL_CALL ScVbaTextBox::getTextLength() throw (uno::RuntimeException) +{ + return getText().getLength(); +} + uno::Reference< msforms::XNewFont > SAL_CALL ScVbaTextBox::getFont() throw (uno::RuntimeException) { return new VbaNewFont( this, mxContext, m_xProps ); diff --git a/vbahelper/source/msforms/vbatextbox.hxx b/vbahelper/source/msforms/vbatextbox.hxx index 9ab4d809d7..6e02e8a074 100644 --- a/vbahelper/source/msforms/vbatextbox.hxx +++ b/vbahelper/source/msforms/vbatextbox.hxx @@ -51,6 +51,7 @@ public: virtual void SAL_CALL setSpecialEffect( sal_Int32 nSpecialEffect ) throw (css::uno::RuntimeException); virtual sal_Int32 SAL_CALL getBorderStyle() throw (css::uno::RuntimeException); virtual void SAL_CALL setBorderStyle( sal_Int32 nBorderStyle ) throw (css::uno::RuntimeException); + virtual sal_Int32 SAL_CALL getTextLength() throw (css::uno::RuntimeException); virtual css::uno::Reference< ov::msforms::XNewFont > SAL_CALL getFont() throw (css::uno::RuntimeException); // XDefaultProperty rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); } |