diff options
Diffstat (limited to 'vbahelper/source/msforms/vbatextbox.cxx')
-rw-r--r-- | vbahelper/source/msforms/vbatextbox.cxx | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/vbahelper/source/msforms/vbatextbox.cxx b/vbahelper/source/msforms/vbatextbox.cxx index 45edf35aff7c..d820e26ee99f 100644 --- a/vbahelper/source/msforms/vbatextbox.cxx +++ b/vbahelper/source/msforms/vbatextbox.cxx @@ -41,26 +41,25 @@ void SAL_CALL ScVbaTextBox::setValue( const uno::Any& _value ) throw (css::uno::RuntimeException) { // booleans are converted to uppercase strings - rtl::OUString sVal = extractStringFromAny( _value, true ); + OUString sVal = extractStringFromAny( _value, true ); setText( sVal ); } //getString() will cause some imfo lose. -rtl::OUString SAL_CALL +OUString SAL_CALL ScVbaTextBox::getText() throw (css::uno::RuntimeException) { uno::Any aValue; - aValue = m_xProps->getPropertyValue - (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Text" ) ) ); - rtl::OUString sString; + aValue = m_xProps->getPropertyValue( "Text" ); + OUString sString; aValue >>= sString; return sString; } void SAL_CALL -ScVbaTextBox::setText( const rtl::OUString& _text ) throw (css::uno::RuntimeException) +ScVbaTextBox::setText( const OUString& _text ) throw (css::uno::RuntimeException) { - rtl::OUString sOldText = getText(); + OUString sOldText = getText(); if ( !mbDialog ) { @@ -68,7 +67,7 @@ ScVbaTextBox::setText( const rtl::OUString& _text ) throw (css::uno::RuntimeExce xTextRange->setString( _text ); } else - m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Text") ), uno::makeAny( _text ) ); + m_xProps->setPropertyValue( "Text" , uno::makeAny( _text ) ); if ( _text != sOldText ) { @@ -80,8 +79,7 @@ sal_Int32 SAL_CALL ScVbaTextBox::getMaxLength() throw (css::uno::RuntimeException) { uno::Any aValue; - aValue = m_xProps->getPropertyValue - (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MaxTextLen" ) ) ); + aValue = m_xProps->getPropertyValue( "MaxTextLen" ); sal_Int32 nMaxLength = 0; aValue >>= nMaxLength; return nMaxLength; @@ -92,16 +90,14 @@ ScVbaTextBox::setMaxLength( sal_Int32 _maxlength ) throw (css::uno::RuntimeExcep { sal_Int16 _maxlength16 = static_cast<sal_Int16> (_maxlength); uno::Any aValue( _maxlength16 ); - m_xProps->setPropertyValue - (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MaxTextLen" ) ), aValue); + m_xProps->setPropertyValue( "MaxTextLen" , aValue); } sal_Bool SAL_CALL ScVbaTextBox::getMultiline() throw (css::uno::RuntimeException) { uno::Any aValue; - aValue = m_xProps->getPropertyValue - (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MultiLine" ) ) ); + aValue = m_xProps->getPropertyValue( "MultiLine" ); sal_Bool bRet = false; aValue >>= bRet; return bRet; @@ -111,8 +107,7 @@ void SAL_CALL ScVbaTextBox::setMultiline( sal_Bool _multiline ) throw (css::uno::RuntimeException) { uno::Any aValue( _multiline ); - m_xProps->setPropertyValue - (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MultiLine" ) ), aValue); + m_xProps->setPropertyValue( "MultiLine" , aValue); } sal_Int32 SAL_CALL ScVbaTextBox::getSpecialEffect() throw (uno::RuntimeException) @@ -175,20 +170,20 @@ void SAL_CALL ScVbaTextBox::setLocked( sal_Bool bLocked ) throw (uno::RuntimeExc ScVbaControl::setLocked( bLocked ); } -rtl::OUString +OUString ScVbaTextBox::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaTextBox")); + return OUString( "ScVbaTextBox" ); } -uno::Sequence< rtl::OUString > +uno::Sequence< OUString > ScVbaTextBox::getServiceNames() { - static uno::Sequence< rtl::OUString > aServiceNames; + static uno::Sequence< OUString > aServiceNames; if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.TextBox" ) ); + aServiceNames[ 0 ] = "ooo.vba.msforms.TextBox"; } return aServiceNames; } |