diff options
author | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-09-07 00:13:30 -0300 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-09-08 20:50:41 +0000 |
commit | 0da7c6021f7c1da1bf242e72fca31b18c8182d3e (patch) | |
tree | ed69e0a0e144af1a0fa2d43edb7999b3e526923b | |
parent | More OUString cleanup in vbahelper (diff) | |
download | core-0da7c6021f7c1da1bf242e72fca31b18c8182d3e.tar.gz core-0da7c6021f7c1da1bf242e72fca31b18c8182d3e.zip |
OUString cleanup in vbahelper/msforms
Change-Id: I834c5f1f26f941a5db84b677f34ffa686e0c2544
Reviewed-on: https://gerrit.libreoffice.org/578
Reviewed-by: Olivier Hallot <olivier.hallot@alta.org.br>
Tested-by: Olivier Hallot <olivier.hallot@alta.org.br>
40 files changed, 429 insertions, 465 deletions
diff --git a/vbahelper/source/msforms/vbabutton.cxx b/vbahelper/source/msforms/vbabutton.cxx index eb028e7db8ed..de1271072456 100644 --- a/vbahelper/source/msforms/vbabutton.cxx +++ b/vbahelper/source/msforms/vbabutton.cxx @@ -24,22 +24,22 @@ using namespace com::sun::star; using namespace ooo::vba; -const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") ); +const static OUString LABEL( "Label" ); ScVbaButton::ScVbaButton( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper ) { } // Attributes -rtl::OUString SAL_CALL +OUString SAL_CALL ScVbaButton::getCaption() throw (css::uno::RuntimeException) { - rtl::OUString Label; + OUString Label; m_xProps->getPropertyValue( LABEL ) >>= Label; return Label; } void SAL_CALL -ScVbaButton::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException) +ScVbaButton::setCaption( const OUString& _caption ) throw (::com::sun::star::uno::RuntimeException) { m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) ); } @@ -110,20 +110,20 @@ uno::Reference< msforms::XNewFont > SAL_CALL ScVbaButton::getFont() throw (uno:: return new VbaNewFont( this, mxContext, m_xProps ); } -rtl::OUString +OUString ScVbaButton::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaButton")); + return OUString("ScVbaButton"); } -uno::Sequence< rtl::OUString > +uno::Sequence< OUString > ScVbaButton::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.Button" ) ); + aServiceNames[ 0 ] = "ooo.vba.msforms.Button"; } return aServiceNames; } diff --git a/vbahelper/source/msforms/vbabutton.hxx b/vbahelper/source/msforms/vbabutton.hxx index d30c19855ad7..adb02b9b683e 100644 --- a/vbahelper/source/msforms/vbabutton.hxx +++ b/vbahelper/source/msforms/vbabutton.hxx @@ -31,8 +31,8 @@ class ScVbaButton : public ButtonImpl_BASE public: ScVbaButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper ); // Attributes - virtual rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException); - virtual void SAL_CALL setCaption( const rtl::OUString& _caption ) throw (css::uno::RuntimeException); + virtual OUString SAL_CALL getCaption() throw (css::uno::RuntimeException); + virtual void SAL_CALL setCaption( const OUString& _caption ) throw (css::uno::RuntimeException); virtual sal_Bool SAL_CALL getAutoSize() throw (css::uno::RuntimeException); virtual void SAL_CALL setAutoSize( sal_Bool bAutoSize ) throw (css::uno::RuntimeException); virtual sal_Bool SAL_CALL getCancel() throw (css::uno::RuntimeException); @@ -47,8 +47,8 @@ public: virtual void SAL_CALL setLocked( sal_Bool bAutoSize ) throw (css::uno::RuntimeException); virtual css::uno::Reference< ov::msforms::XNewFont > SAL_CALL getFont() throw (css::uno::RuntimeException); //XHelperInterface - virtual rtl::OUString getServiceImplName(); - virtual css::uno::Sequence<rtl::OUString> getServiceNames(); + virtual OUString getServiceImplName(); + virtual css::uno::Sequence<OUString> getServiceNames(); }; #endif //SC_VBA_BUTTON_HXX diff --git a/vbahelper/source/msforms/vbacheckbox.cxx b/vbahelper/source/msforms/vbacheckbox.cxx index edf5a030ff0e..de32e34abe5d 100644 --- a/vbahelper/source/msforms/vbacheckbox.cxx +++ b/vbahelper/source/msforms/vbacheckbox.cxx @@ -25,23 +25,23 @@ using namespace com::sun::star; using namespace ooo::vba; -const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") ); -const static rtl::OUString STATE( RTL_CONSTASCII_USTRINGPARAM("State") ); +const static OUString LABEL( "Label" ); +const static OUString STATE( "State" ); ScVbaCheckbox::ScVbaCheckbox( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper ) : CheckBoxImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper ) { } // Attributes -rtl::OUString SAL_CALL +OUString SAL_CALL ScVbaCheckbox::getCaption() throw (css::uno::RuntimeException) { - rtl::OUString Label; + OUString Label; m_xProps->getPropertyValue( LABEL ) >>= Label; return Label; } void SAL_CALL -ScVbaCheckbox::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException) +ScVbaCheckbox::setCaption( const OUString& _caption ) throw (::com::sun::star::uno::RuntimeException) { m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) ); } @@ -86,20 +86,20 @@ uno::Reference< msforms::XNewFont > SAL_CALL ScVbaCheckbox::getFont() throw (uno return new VbaNewFont( this, mxContext, m_xProps ); } -rtl::OUString +OUString ScVbaCheckbox::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaCheckbox")); + return OUString("ScVbaCheckbox"); } -uno::Sequence< rtl::OUString > +uno::Sequence< OUString > ScVbaCheckbox::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.CheckBox" ) ); + aServiceNames[ 0 ] = "ooo.vba.msforms.CheckBox"; } return aServiceNames; } diff --git a/vbahelper/source/msforms/vbacheckbox.hxx b/vbahelper/source/msforms/vbacheckbox.hxx index 36bcdc492556..c0b2be51600d 100644 --- a/vbahelper/source/msforms/vbacheckbox.hxx +++ b/vbahelper/source/msforms/vbacheckbox.hxx @@ -31,8 +31,8 @@ class ScVbaCheckbox : public CheckBoxImpl_BASE public: ScVbaCheckbox( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper ); // Attributes - virtual rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException); - virtual void SAL_CALL setCaption( const rtl::OUString& _caption ) throw (css::uno::RuntimeException); + virtual OUString SAL_CALL getCaption() throw (css::uno::RuntimeException); + virtual void SAL_CALL setCaption( const OUString& _caption ) throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException); virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException); virtual css::uno::Reference< ov::msforms::XNewFont > SAL_CALL getFont() throw (css::uno::RuntimeException); @@ -43,10 +43,10 @@ public: virtual sal_Bool SAL_CALL getLocked() throw (css::uno::RuntimeException); virtual void SAL_CALL setLocked( sal_Bool bAutoSize ) throw (css::uno::RuntimeException); // XDefaultProperty - rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString("Value"); } + OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return OUString("Value"); } //XHelperInterface - virtual rtl::OUString getServiceImplName(); - virtual css::uno::Sequence<rtl::OUString> getServiceNames(); + virtual OUString getServiceImplName(); + virtual css::uno::Sequence<OUString> getServiceNames(); }; #endif //SC_VBA_CHECKBOX_HXX diff --git a/vbahelper/source/msforms/vbacombobox.cxx b/vbahelper/source/msforms/vbacombobox.cxx index 240260deeb03..a0dc30b79ebe 100644 --- a/vbahelper/source/msforms/vbacombobox.cxx +++ b/vbahelper/source/msforms/vbacombobox.cxx @@ -37,9 +37,9 @@ using namespace ooo::vba; //SelectedItems list of integer indexes //StringItemList list of items -const static rtl::OUString TEXT( RTL_CONSTASCII_USTRINGPARAM("Text") ); -const static rtl::OUString ITEMS( RTL_CONSTASCII_USTRINGPARAM("StringItemList") ); -const static rtl::OUString CONTROLSOURCEPROP( RTL_CONSTASCII_USTRINGPARAM("DataFieldProperty") ); +const static OUString TEXT( "Text" ); +const static OUString ITEMS( "StringItemList" ); +const static OUString CONTROLSOURCEPROP( "DataFieldProperty" ); ScVbaComboBox::ScVbaComboBox( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ComboBoxImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper ) { @@ -53,7 +53,7 @@ ScVbaComboBox::ScVbaComboBox( const uno::Reference< XHelperInterface >& xParent, { } if( sSourceName.isEmpty() ) - sSourceName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Text" ) ); + sSourceName = "Text"; } // Attributes @@ -75,11 +75,11 @@ ScVbaComboBox::setListIndex( const uno::Any& _value ) throw (uno::RuntimeExcepti { sal_Int32 nOldIndex = -1; getListIndex() >>= nOldIndex; - uno::Sequence< rtl::OUString > sItems; + uno::Sequence< OUString > sItems; m_xProps->getPropertyValue( ITEMS ) >>= sItems; if( ( nIndex >= 0 ) && ( sItems.getLength() > nIndex ) ) { - rtl::OUString sText = sItems[ nIndex ]; + OUString sText = sItems[ nIndex ]; m_xProps->setPropertyValue( TEXT, uno::makeAny( sText ) ); // fire the _Change event @@ -92,13 +92,13 @@ ScVbaComboBox::setListIndex( const uno::Any& _value ) throw (uno::RuntimeExcepti uno::Any SAL_CALL ScVbaComboBox::getListIndex() throw (uno::RuntimeException) { - uno::Sequence< rtl::OUString > sItems; + uno::Sequence< OUString > sItems; m_xProps->getPropertyValue( ITEMS ) >>= sItems; // should really return the item that has focus regardless of // it been selected if ( sItems.getLength() > 0 ) { - rtl::OUString sText = getText(); + OUString sText = getText(); sal_Int32 nLen = sItems.getLength(); for ( sal_Int32 index = 0; !sText.isEmpty() && index < nLen; ++index ) { @@ -119,11 +119,11 @@ ScVbaComboBox::getListIndex() throw (uno::RuntimeException) void SAL_CALL ScVbaComboBox::setValue( const uno::Any& _value ) throw (uno::RuntimeException) { - rtl::OUString sOldValue, sNewValue; + OUString sOldValue, sNewValue; // booleans are converted to uppercase strings - sOldValue = extractStringFromAny( getValue(), ::rtl::OUString(), true ); + sOldValue = extractStringFromAny( getValue(), OUString(), true ); // booleans are converted to uppercase strings - sNewValue = extractStringFromAny( _value, ::rtl::OUString(), true ); + sNewValue = extractStringFromAny( _value, OUString(), true ); m_xProps->setPropertyValue( sSourceName, uno::Any( sNewValue ) ); @@ -146,16 +146,16 @@ ScVbaComboBox::setValue( const uno::Any& _value ) throw (uno::RuntimeException) // see Value -::rtl::OUString SAL_CALL +OUString SAL_CALL ScVbaComboBox::getText() throw (uno::RuntimeException) { - rtl::OUString result; + OUString result; getValue() >>= result; return result; } void SAL_CALL -ScVbaComboBox::setText( const ::rtl::OUString& _text ) throw (uno::RuntimeException) +ScVbaComboBox::setText( const OUString& _text ) throw (uno::RuntimeException) { setValue( uno::makeAny( _text ) ); // seems the same } @@ -180,7 +180,7 @@ ScVbaComboBox::Clear( ) throw (uno::RuntimeException) } void SAL_CALL -ScVbaComboBox::setRowSource( const rtl::OUString& _rowsource ) throw (css::uno::RuntimeException) +ScVbaComboBox::setRowSource( const OUString& _rowsource ) throw (css::uno::RuntimeException) { ScVbaControl::setRowSource( _rowsource ); mpListHelper->setRowSource( _rowsource ); @@ -262,10 +262,10 @@ uno::Reference< msforms::XNewFont > SAL_CALL ScVbaComboBox::getFont() throw (uno return new VbaNewFont( this, mxContext, m_xProps ); } -rtl::OUString +OUString ScVbaComboBox::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaComboBox")); + return OUString("ScVbaComboBox"); } sal_Int32 SAL_CALL ScVbaComboBox::getBackColor() throw (uno::RuntimeException) @@ -298,14 +298,14 @@ void SAL_CALL ScVbaComboBox::setLocked( sal_Bool bLocked ) throw (uno::RuntimeEx ScVbaControl::setLocked( bLocked ); } -uno::Sequence< rtl::OUString > +uno::Sequence< OUString > ScVbaComboBox::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.ComboBox" ) ); + aServiceNames[ 0 ] = "ooo.vba.msforms.ComboBox"; } return aServiceNames; } diff --git a/vbahelper/source/msforms/vbacombobox.hxx b/vbahelper/source/msforms/vbacombobox.hxx index 689f89580fe1..f71f9c169953 100644 --- a/vbahelper/source/msforms/vbacombobox.hxx +++ b/vbahelper/source/msforms/vbacombobox.hxx @@ -35,8 +35,8 @@ typedef cppu::ImplInheritanceHelper2<ScVbaControl, ov::msforms::XComboBox, css:: class ScVbaComboBox : public ComboBoxImpl_BASE { std::auto_ptr< ListControlHelper > mpListHelper; - rtl::OUString sSourceName; - rtl::OUString msDftPropName; + OUString sSourceName; + OUString msDftPropName; public: ScVbaComboBox( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper ); @@ -47,8 +47,8 @@ public: virtual void SAL_CALL setListIndex( const css::uno::Any& _value ) throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException); virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException); - virtual void SAL_CALL setText( const ::rtl::OUString& _text ) throw (css::uno::RuntimeException); + virtual OUString SAL_CALL getText() throw (css::uno::RuntimeException); + virtual void SAL_CALL setText( const OUString& _text ) throw (css::uno::RuntimeException); virtual sal_Int32 SAL_CALL getStyle() throw (css::uno::RuntimeException); virtual void SAL_CALL setStyle( sal_Int32 nStyle ) throw (css::uno::RuntimeException); virtual sal_Int32 SAL_CALL getDropButtonStyle() throw (css::uno::RuntimeException); @@ -76,13 +76,13 @@ public: virtual void SAL_CALL Clear( ) throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL List( const css::uno::Any& pvargIndex, const css::uno::Any& pvarColumn ) throw (css::uno::RuntimeException); // XControl - virtual void SAL_CALL setRowSource( const rtl::OUString& _rowsource ) throw (css::uno::RuntimeException); + virtual void SAL_CALL setRowSource( const OUString& _rowsource ) throw (css::uno::RuntimeException); // XDefaultProperty - ::rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString("Value"); } + OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return OUString("Value"); } //XHelperInterface - virtual rtl::OUString getServiceImplName(); - virtual css::uno::Sequence<rtl::OUString> getServiceNames(); + virtual OUString getServiceImplName(); + virtual css::uno::Sequence<OUString> getServiceNames(); }; #endif // diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx index 1bd6258bbfe9..c144d40d8c23 100644 --- a/vbahelper/source/msforms/vbacontrol.cxx +++ b/vbahelper/source/msforms/vbacontrol.cxx @@ -84,8 +84,7 @@ ScVbaControl::getWindowPeer() throw (uno::RuntimeException) } catch(const uno::Exception&) { - throw uno::RuntimeException( rtl::OUString("The Control does not exsit"), - uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( "The Control does not exsit" , uno::Reference< uno::XInterface >() ); } return xWinPeer; } @@ -135,8 +134,8 @@ ScVbaControl::ScVbaControl( const uno::Reference< XHelperInterface >& xParent, c if ( xControlShape.is() ) // form control { m_xProps.set( xControlShape->getControl(), uno::UNO_QUERY_THROW ); - rtl::OUString sDefaultControl; - m_xProps->getPropertyValue( rtl::OUString( "DefaultControl" ) ) >>= sDefaultControl; + OUString sDefaultControl; + m_xProps->getPropertyValue( "DefaultControl" ) >>= sDefaultControl; uno::Reference< lang::XMultiComponentFactory > xMFac( mxContext->getServiceManager(), uno::UNO_QUERY_THROW ); m_xEmptyFormControl.set( xMFac->createInstanceWithContext( sDefaultControl, mxContext ), uno::UNO_QUERY_THROW ); } @@ -173,8 +172,7 @@ void ScVbaControl::removeResouce() throw( uno::RuntimeException ) //In design model has different behavior sal_Bool SAL_CALL ScVbaControl::getEnabled() throw (uno::RuntimeException) { - uno::Any aValue = m_xProps->getPropertyValue - (rtl::OUString( "Enabled" ) ); + uno::Any aValue = m_xProps->getPropertyValue ( "Enabled" ); sal_Bool bRet = false; aValue >>= bRet; return bRet; @@ -183,24 +181,21 @@ sal_Bool SAL_CALL ScVbaControl::getEnabled() throw (uno::RuntimeException) void SAL_CALL ScVbaControl::setEnabled( sal_Bool bVisible ) throw (uno::RuntimeException) { uno::Any aValue( bVisible ); - m_xProps->setPropertyValue - (rtl::OUString( "Enabled" ), aValue); + m_xProps->setPropertyValue( "Enabled" , aValue); } sal_Bool SAL_CALL ScVbaControl::getVisible() throw (uno::RuntimeException) { sal_Bool bVisible( sal_True ); - m_xProps->getPropertyValue - (rtl::OUString( "EnableVisible" )) >>= bVisible; + m_xProps->getPropertyValue( "EnableVisible" ) >>= bVisible; return bVisible; } void SAL_CALL ScVbaControl::setVisible( sal_Bool bVisible ) throw (uno::RuntimeException) { uno::Any aValue( bVisible ); - m_xProps->setPropertyValue - (rtl::OUString( "EnableVisible" ), aValue); + m_xProps->setPropertyValue( "EnableVisible" , aValue); } double SAL_CALL ScVbaControl::getHeight() throw (uno::RuntimeException) { @@ -273,25 +268,25 @@ void SAL_CALL ScVbaControl::Move( double Left, double Top, const uno::Any& Width setHeight( nHeight ); } -rtl::OUString SAL_CALL +OUString SAL_CALL ScVbaControl::getControlSource() throw (uno::RuntimeException) { // #FIXME I *hate* having these upstream differences // but this is necessary until I manage to upstream other // dependant parts - rtl::OUString sControlSource; + OUString sControlSource; uno::Reference< form::binding::XBindableValue > xBindable( m_xProps, uno::UNO_QUERY ); if ( xBindable.is() ) { try { uno::Reference< lang::XMultiServiceFactory > xFac( m_xModel, uno::UNO_QUERY_THROW ); - uno::Reference< beans::XPropertySet > xConvertor( xFac->createInstance( rtl::OUString( "com.sun.star.table.CellAddressConversion" )), uno::UNO_QUERY ); + uno::Reference< beans::XPropertySet > xConvertor( xFac->createInstance( "com.sun.star.table.CellAddressConversion" ), uno::UNO_QUERY ); uno::Reference< beans::XPropertySet > xProps( xBindable->getValueBinding(), uno::UNO_QUERY_THROW ); table::CellAddress aAddress; - xProps->getPropertyValue( rtl::OUString( "BoundCell" ) ) >>= aAddress; - xConvertor->setPropertyValue( rtl::OUString( "Address" ), uno::makeAny( aAddress ) ); - xConvertor->getPropertyValue( rtl::OUString( "XL_A1_Representation" ) ) >>= sControlSource; + xProps->getPropertyValue( "BoundCell" ) >>= aAddress; + xConvertor->setPropertyValue( "Address" , uno::makeAny( aAddress ) ); + xConvertor->getPropertyValue( "XL_A1_Representation" ) >>= sControlSource; } catch(const uno::Exception&) { @@ -301,29 +296,29 @@ ScVbaControl::getControlSource() throw (uno::RuntimeException) } void SAL_CALL -ScVbaControl::setControlSource( const rtl::OUString& _controlsource ) throw (uno::RuntimeException) +ScVbaControl::setControlSource( const OUString& _controlsource ) throw (uno::RuntimeException) { - rtl::OUString sEmpty; + OUString sEmpty; svt::BindableControlHelper::ApplyListSourceAndBindableData( m_xModel, m_xProps, _controlsource, sEmpty ); } -rtl::OUString SAL_CALL +OUString SAL_CALL ScVbaControl::getRowSource() throw (uno::RuntimeException) { - rtl::OUString sRowSource; + OUString sRowSource; uno::Reference< form::binding::XListEntrySink > xListSink( m_xProps, uno::UNO_QUERY ); if ( xListSink.is() ) { try { uno::Reference< lang::XMultiServiceFactory > xFac( m_xModel, uno::UNO_QUERY_THROW ); - uno::Reference< beans::XPropertySet > xConvertor( xFac->createInstance( rtl::OUString( "com.sun.star.table.CellRangeAddressConversion" )), uno::UNO_QUERY ); + uno::Reference< beans::XPropertySet > xConvertor( xFac->createInstance( "com.sun.star.table.CellRangeAddressConversion" ), uno::UNO_QUERY ); uno::Reference< beans::XPropertySet > xProps( xListSink->getListEntrySource(), uno::UNO_QUERY_THROW ); table::CellRangeAddress aAddress; - xProps->getPropertyValue( rtl::OUString( "CellRange" ) ) >>= aAddress; - xConvertor->setPropertyValue( rtl::OUString( "Address"), uno::makeAny( aAddress ) ); - xConvertor->getPropertyValue( rtl::OUString( "XL_A1_Representation" ) ) >>= sRowSource; + xProps->getPropertyValue( "CellRange" ) >>= aAddress; + xConvertor->setPropertyValue( "Address" , uno::makeAny( aAddress ) ); + xConvertor->getPropertyValue( "XL_A1_Representation" ) >>= sRowSource; } catch(const uno::Exception&) { @@ -333,52 +328,48 @@ ScVbaControl::getRowSource() throw (uno::RuntimeException) } void SAL_CALL -ScVbaControl::setRowSource( const rtl::OUString& _rowsource ) throw (uno::RuntimeException) +ScVbaControl::setRowSource( const OUString& _rowsource ) throw (uno::RuntimeException) { - rtl::OUString sEmpty; + OUString sEmpty; svt::BindableControlHelper::ApplyListSourceAndBindableData( m_xModel, m_xProps, sEmpty, _rowsource ); } -rtl::OUString SAL_CALL +OUString SAL_CALL ScVbaControl::getName() throw (uno::RuntimeException) { - rtl::OUString sName; - m_xProps->getPropertyValue - (rtl::OUString( "Name" ) ) >>= sName; + OUString sName; + m_xProps->getPropertyValue( "Name" ) >>= sName; return sName; } void SAL_CALL -ScVbaControl::setName( const rtl::OUString& _name ) throw (uno::RuntimeException) +ScVbaControl::setName( const OUString& _name ) throw (uno::RuntimeException) { - m_xProps->setPropertyValue - (rtl::OUString( "Name" ), uno::makeAny( _name ) ); + m_xProps->setPropertyValue( "Name" , uno::makeAny( _name ) ); } -rtl::OUString SAL_CALL +OUString SAL_CALL ScVbaControl::getControlTipText() throw (css::uno::RuntimeException) { - rtl::OUString sName; - m_xProps->getPropertyValue - (rtl::OUString( "HelpText" ) ) >>= sName; + OUString sName; + m_xProps->getPropertyValue( "HelpText" ) >>= sName; return sName; } void SAL_CALL -ScVbaControl::setControlTipText( const rtl::OUString& rsToolTip ) throw (css::uno::RuntimeException) +ScVbaControl::setControlTipText( const OUString& rsToolTip ) throw (css::uno::RuntimeException) { - m_xProps->setPropertyValue - (rtl::OUString( "HelpText" ), uno::makeAny( rsToolTip ) ); + m_xProps->setPropertyValue( "HelpText" , uno::makeAny( rsToolTip ) ); } -::rtl::OUString SAL_CALL ScVbaControl::getTag() +OUString SAL_CALL ScVbaControl::getTag() throw (css::uno::RuntimeException) { return m_aControlTag; } -void SAL_CALL ScVbaControl::setTag( const ::rtl::OUString& aTag ) +void SAL_CALL ScVbaControl::setTag( const OUString& aTag ) throw (css::uno::RuntimeException) { m_aControlTag = aTag; @@ -387,13 +378,13 @@ void SAL_CALL ScVbaControl::setTag( const ::rtl::OUString& aTag ) ::sal_Int32 SAL_CALL ScVbaControl::getForeColor() throw (::com::sun::star::uno::RuntimeException) { sal_Int32 nForeColor = -1; - m_xProps->getPropertyValue( rtl::OUString( "TextColor" ) ) >>= nForeColor; + m_xProps->getPropertyValue( "TextColor" ) >>= nForeColor; return OORGBToXLRGB( nForeColor ); } void SAL_CALL ScVbaControl::setForeColor( ::sal_Int32 _forecolor ) throw (::com::sun::star::uno::RuntimeException) { - m_xProps->setPropertyValue( rtl::OUString( "TextColor" ), uno::makeAny( XLRGBToOORGB( _forecolor ) ) ); + m_xProps->setPropertyValue( "TextColor" , uno::makeAny( XLRGBToOORGB( _forecolor ) ) ); } struct PointerStyles @@ -478,10 +469,10 @@ ScVbaControl::setMousePointer( ::sal_Int32 _mousepointer ) throw (::com::sun::st void ScVbaControl::fireEvent( script::ScriptEvent& evt ) { uno::Reference<lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_QUERY_THROW ); - uno::Reference< script::XScriptListener > xScriptListener( xServiceManager->createInstanceWithContext( rtl::OUString( "ooo.vba.EventListener" ), mxContext ), uno::UNO_QUERY_THROW ); + uno::Reference< script::XScriptListener > xScriptListener( xServiceManager->createInstanceWithContext( "ooo.vba.EventListener" , mxContext ), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xProps( xScriptListener, uno::UNO_QUERY_THROW ); - xProps->setPropertyValue( ::rtl::OUString( "Model" ), uno::makeAny( m_xModel ) ); + xProps->setPropertyValue( "Model" , uno::makeAny( m_xModel ) ); // handling for sheet control uno::Reference< msforms::XControl > xThisControl( this ); @@ -499,7 +490,7 @@ void ScVbaControl::fireEvent( script::ScriptEvent& evt ) aEvt.Source = m_xEmptyFormControl; // Set up proper scriptcode uno::Reference< lang::XMultiServiceFactory > xDocFac( m_xModel, uno::UNO_QUERY_THROW ); - uno::Reference< document::XCodeNameQuery > xNameQuery( xDocFac->createInstance( rtl::OUString("ooo.vba.VBACodeNameProvider") ), uno::UNO_QUERY_THROW ); + uno::Reference< document::XCodeNameQuery > xNameQuery( xDocFac->createInstance( "ooo.vba.VBACodeNameProvider" ), uno::UNO_QUERY_THROW ); uno::Reference< uno::XInterface > xIf( xControlShape->getControl(), uno::UNO_QUERY_THROW ); evt.ScriptCode = xNameQuery->getCodeNameForObject( xIf ); evt.Arguments[ 0 ] = uno::makeAny( aEvt ); @@ -528,18 +519,18 @@ void ScVbaControl::fireEvent( script::ScriptEvent& evt ) void ScVbaControl::fireChangeEvent() { script::ScriptEvent evt; - evt.ScriptType = rtl::OUString( "VBAInterop" ); + evt.ScriptType = "VBAInterop"; evt.ListenerType = form::XChangeListener::static_type(0); - evt.MethodName = rtl::OUString( "changed" ); + evt.MethodName = "changed"; fireEvent( evt ); } void ScVbaControl::fireClickEvent() { script::ScriptEvent evt; - evt.ScriptType = rtl::OUString( "VBAInterop" ); + evt.ScriptType = "VBAInterop"; evt.ListenerType = awt::XActionListener::static_type(0); - evt.MethodName = rtl::OUString( "actionPerformed" ); + evt.MethodName = "actionPerformed"; fireEvent( evt ); } @@ -561,7 +552,7 @@ void SAL_CALL ScVbaControl::setTabIndex( sal_Int32 /*nTabIndex*/ ) throw (uno::R { uno::Reference< beans::XPropertySet > xProps( xControlShape->getControl(), uno::UNO_QUERY_THROW ); sal_Int32 nClassId = -1; - const static rtl::OUString sClassId( "ClassId" ); + const static OUString sClassId( "ClassId" ); xProps->getPropertyValue( sClassId ) >>= nClassId; uno::Reference< XHelperInterface > xVbaParent; // #FIXME - should be worksheet I guess uno::Reference< drawing::XShape > xShape( xControlShape, uno::UNO_QUERY_THROW ); @@ -589,7 +580,7 @@ void SAL_CALL ScVbaControl::setTabIndex( sal_Int32 /*nTabIndex*/ ) throw (uno::R case form::FormComponentType::SCROLLBAR: return new ScVbaScrollBar( xVbaParent, xContext, xControlShape, xModel, xGeoHelper.release() ); } - throw uno::RuntimeException( rtl::OUString("Unsupported control."), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( "Unsupported control." , uno::Reference< uno::XInterface >() ); } /*static*/ uno::Reference< msforms::XControl > ScVbaControlFactory::createUserformControl( @@ -605,69 +596,69 @@ void SAL_CALL ScVbaControl::setTabIndex( sal_Int32 /*nTabIndex*/ ) throw (uno::R uno::Reference< XHelperInterface > xVbaParent; // #FIXME - should be worksheet I guess ::std::auto_ptr< UserFormGeometryHelper > xGeoHelper( new UserFormGeometryHelper( xContext, xControl, fOffsetX, fOffsetY ) ); - if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoControlCheckBoxModel" ) ) ) + if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlCheckBoxModel" ) ) xVBAControl.set( new ScVbaCheckbox( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) ); - else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoControlRadioButtonModel" ) ) ) + else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlRadioButtonModel" ) ) xVBAControl.set( new ScVbaRadioButton( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) ); - else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoControlEditModel" ) ) ) + else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlEditModel" ) ) xVBAControl.set( new ScVbaTextBox( xVbaParent, xContext, xControl, xModel, xGeoHelper.release(), true ) ); - else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoControlButtonModel" ) ) ) + else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlButtonModel" ) ) { sal_Bool bToggle = sal_False; - xProps->getPropertyValue( rtl::OUString( "Toggle" ) ) >>= bToggle; + xProps->getPropertyValue( "Toggle" ) >>= bToggle; if ( bToggle ) xVBAControl.set( new ScVbaToggleButton( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) ); else xVBAControl.set( new ScVbaButton( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) ); } - else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoControlComboBoxModel" ) ) ) + else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlComboBoxModel" ) ) xVBAControl.set( new ScVbaComboBox( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) ); - else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoControlListBoxModel" ) ) ) + else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlListBoxModel" ) ) xVBAControl.set( new ScVbaListBox( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) ); - else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoControlFixedTextModel" ) ) ) + else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlFixedTextModel" ) ) xVBAControl.set( new ScVbaLabel( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) ); - else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoControlImageControlModel" ) ) ) + else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlImageControlModel" ) ) xVBAControl.set( new ScVbaImage( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) ); - else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoControlProgressBarModel" ) ) ) + else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlProgressBarModel" ) ) xVBAControl.set( new ScVbaProgressBar( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) ); - else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoControlGroupBoxModel" ) ) ) + else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlGroupBoxModel" ) ) xVBAControl.set( new ScVbaFrame( xVbaParent, xContext, xControl, xModel, xGeoHelper.release(), xDialog ) ); - else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoControlScrollBarModel" ) ) ) + else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlScrollBarModel" ) ) xVBAControl.set( new ScVbaScrollBar( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) ); - else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoMultiPageModel" ) ) ) + else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoMultiPageModel" ) ) xVBAControl.set( new ScVbaMultiPage( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) ); - else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoControlSpinButtonModel" ) ) ) + else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlSpinButtonModel" ) ) xVBAControl.set( new ScVbaSpinButton( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) ); - else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.custom.awt.UnoControlSystemAXContainerModel" ) ) ) + else if ( xServiceInfo->supportsService( "com.sun.star.custom.awt.UnoControlSystemAXContainerModel" ) ) xVBAControl.set( new VbaSystemAXControl( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) ); // #FIXME implement a page control - else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoPageModel" ) ) ) + else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoPageModel" ) ) xVBAControl.set( new ScVbaControl( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) ); - else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoFrameModel" ) ) ) + else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoFrameModel" ) ) xVBAControl.set( new ScVbaFrame( xVbaParent, xContext, xControl, xModel, xGeoHelper.release(), xDialog ) ); - else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoControlSpinButtonModel" ) ) ) + else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlSpinButtonModel" ) ) xVBAControl.set( new ScVbaSpinButton( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) ); - else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.custom.awt.UnoControlSystemAXContainerModel" ) ) ) + else if ( xServiceInfo->supportsService( "com.sun.star.custom.awt.UnoControlSystemAXContainerModel" ) ) xVBAControl.set( new VbaSystemAXControl( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) ); if( xVBAControl.is() ) return xVBAControl; - throw uno::RuntimeException( rtl::OUString("Unsupported control."), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( "Unsupported control." , uno::Reference< uno::XInterface >() ); } -rtl::OUString +OUString ScVbaControl::getServiceImplName() { - return rtl::OUString("ScVbaControl"); + return OUString("ScVbaControl"); } -uno::Sequence< rtl::OUString > +uno::Sequence< OUString > ScVbaControl::getServiceNames() { - static uno::Sequence< rtl::OUString > aServiceNames; + static uno::Sequence< OUString > aServiceNames; if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( "ooo.vba.excel.Control" ); + aServiceNames[ 0 ] = "ooo.vba.excel.Control"; } return aServiceNames; } @@ -677,7 +668,7 @@ sal_Int32 nSysCols[] = { 0xC8D0D4, 0x0, 0x6A240A, 0x808080, 0xE4E4E4, 0xFFFFFF, sal_Int32 ScVbaControl::getBackColor() throw (uno::RuntimeException) { sal_Int32 nBackColor = 0; - m_xProps->getPropertyValue( rtl::OUString( "BackgroundColor" ) ) >>= nBackColor; + m_xProps->getPropertyValue( "BackgroundColor" ) >>= nBackColor; return nBackColor; } @@ -687,7 +678,7 @@ void ScVbaControl::setBackColor( sal_Int32 nBackColor ) throw (uno::RuntimeExcep { nBackColor = nSysCols[ nBackColor - 0x80000000 ]; } - m_xProps->setPropertyValue( rtl::OUString( "BackgroundColor" ), uno::makeAny( XLRGBToOORGB( nBackColor ) ) ); + m_xProps->setPropertyValue( "BackgroundColor" , uno::makeAny( XLRGBToOORGB( nBackColor ) ) ); } sal_Bool ScVbaControl::getAutoSize() throw (uno::RuntimeException) @@ -703,13 +694,13 @@ void ScVbaControl::setAutoSize( sal_Bool /*bAutoSize*/ ) throw (uno::RuntimeExce sal_Bool ScVbaControl::getLocked() throw (uno::RuntimeException) { sal_Bool bRes( sal_False ); - m_xProps->getPropertyValue( rtl::OUString( "ReadOnly" ) ) >>= bRes; + m_xProps->getPropertyValue( "ReadOnly" ) >>= bRes; return bRes; } void ScVbaControl::setLocked( sal_Bool bLocked ) throw (uno::RuntimeException) { - m_xProps->setPropertyValue( rtl::OUString( "ReadOnly" ), uno::makeAny( bLocked ) ); + m_xProps->setPropertyValue( "ReadOnly" , uno::makeAny( bLocked ) ); } typedef cppu::WeakImplHelper1< XControlProvider > ControlProvider_BASE; diff --git a/vbahelper/source/msforms/vbacontrol.hxx b/vbahelper/source/msforms/vbacontrol.hxx index 1486436ba90e..bf6b8a308fcf 100644 --- a/vbahelper/source/msforms/vbacontrol.hxx +++ b/vbahelper/source/msforms/vbacontrol.hxx @@ -45,10 +45,10 @@ private: protected: // awt control has nothing similar to Tag property of Mso controls, // whether it is necessary is another question - ::rtl::OUString m_aControlTag; + OUString m_aControlTag; bool bIsDialog; - rtl::OUString m_sLibraryAndCodeName; + OUString m_sLibraryAndCodeName; std::auto_ptr< ov::AbstractGeometryAttributes > mpGeometryHelper; css::uno::Reference< css::beans::XPropertySet > m_xProps; css::uno::Reference< css::uno::XInterface > m_xControl; @@ -66,8 +66,8 @@ public: // the heap void setGeometryHelper( ov::AbstractGeometryAttributes* pHelper ); // sets the name of the associated library ( used for UserForm controls ) - void setLibraryAndCodeName( const rtl::OUString& sLibCodeName ) { m_sLibraryAndCodeName = sLibCodeName; } - rtl::OUString getLibraryAndCodeName() const { return m_sLibraryAndCodeName; } + void setLibraryAndCodeName( const OUString& sLibCodeName ) { m_sLibraryAndCodeName = sLibCodeName; } + OUString getLibraryAndCodeName() const { return m_sLibraryAndCodeName; } // XControl virtual sal_Bool SAL_CALL getEnabled() throw (css::uno::RuntimeException); @@ -86,16 +86,16 @@ public: virtual void SAL_CALL Move( double Left, double Top, const ::com::sun::star::uno::Any& Width, const ::com::sun::star::uno::Any& Height ) throw (::com::sun::star::uno::RuntimeException); virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getObject() throw (css::uno::RuntimeException); - virtual rtl::OUString SAL_CALL getControlSource() throw (css::uno::RuntimeException); - virtual void SAL_CALL setControlSource( const rtl::OUString& _controlsource ) throw (css::uno::RuntimeException); - virtual rtl::OUString SAL_CALL getRowSource() throw (css::uno::RuntimeException); - virtual void SAL_CALL setRowSource( const rtl::OUString& _rowsource ) throw (css::uno::RuntimeException); - virtual rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException); - virtual void SAL_CALL setName( const rtl::OUString& _name ) throw (css::uno::RuntimeException); - virtual rtl::OUString SAL_CALL getControlTipText() throw (css::uno::RuntimeException); - virtual void SAL_CALL setControlTipText( const rtl::OUString& ) throw (css::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getTag() throw (css::uno::RuntimeException); - virtual void SAL_CALL setTag( const ::rtl::OUString& aTag ) throw (css::uno::RuntimeException); + virtual OUString SAL_CALL getControlSource() throw (css::uno::RuntimeException); + virtual void SAL_CALL setControlSource( const OUString& _controlsource ) throw (css::uno::RuntimeException); + virtual OUString SAL_CALL getRowSource() throw (css::uno::RuntimeException); + virtual void SAL_CALL setRowSource( const OUString& _rowsource ) throw (css::uno::RuntimeException); + virtual OUString SAL_CALL getName() throw (css::uno::RuntimeException); + virtual void SAL_CALL setName( const OUString& _name ) throw (css::uno::RuntimeException); + virtual OUString SAL_CALL getControlTipText() throw (css::uno::RuntimeException); + virtual void SAL_CALL setControlTipText( const OUString& ) throw (css::uno::RuntimeException); + virtual OUString SAL_CALL getTag() throw (css::uno::RuntimeException); + virtual void SAL_CALL setTag( const OUString& aTag ) throw (css::uno::RuntimeException); virtual sal_Int32 SAL_CALL getTabIndex() throw (css::uno::RuntimeException); virtual void SAL_CALL setTabIndex( sal_Int32 nTabIndex ) throw (css::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getMousePointer() throw (::com::sun::star::uno::RuntimeException); @@ -105,8 +105,8 @@ public: virtual ::sal_Int32 SAL_CALL getForeColor() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setForeColor( ::sal_Int32 _forecolor ) throw (::com::sun::star::uno::RuntimeException); //XHelperInterface - virtual rtl::OUString getServiceImplName(); - virtual css::uno::Sequence<rtl::OUString> getServiceNames(); + virtual OUString getServiceImplName(); + virtual css::uno::Sequence<OUString> getServiceNames(); //General helper methods for properties ( may or maynot be relevant for all //controls sal_Int32 getBackColor() throw (css::uno::RuntimeException); diff --git a/vbahelper/source/msforms/vbacontrols.cxx b/vbahelper/source/msforms/vbacontrols.cxx index 1e9621095020..02a568a7fcac 100644 --- a/vbahelper/source/msforms/vbacontrols.cxx +++ b/vbahelper/source/msforms/vbacontrols.cxx @@ -39,14 +39,14 @@ using namespace ooo::vba; typedef ::cppu::WeakImplHelper2< container::XNameAccess, container::XIndexAccess > ArrayWrapImpl; -typedef boost::unordered_map< rtl::OUString, sal_Int32, ::rtl::OUStringHash, - ::std::equal_to< ::rtl::OUString > > ControlIndexMap; +typedef boost::unordered_map< OUString, sal_Int32, OUStringHash, + ::std::equal_to< OUString > > ControlIndexMap; typedef std::vector< uno::Reference< awt::XControl > > ControlVec; class ControlArrayWrapper : public ArrayWrapImpl { uno::Reference< awt::XControlContainer > mxDialog; - uno::Sequence< ::rtl::OUString > msNames; + uno::Sequence< OUString > msNames; ControlVec mControls; ControlIndexMap mIndices; @@ -99,14 +99,14 @@ public: } } - static rtl::OUString getControlName( const uno::Reference< awt::XControl >& xCtrl ) + static OUString getControlName( const uno::Reference< awt::XControl >& xCtrl ) { if ( !xCtrl.is() ) throw uno::RuntimeException(); uno::Reference< beans::XPropertySet > xProp( xCtrl->getModel(), uno::UNO_QUERY_THROW ); - rtl::OUString sName; - xProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Name" ) ) ) >>= sName; + OUString sName; + xProp->getPropertyValue( "Name" ) >>= sName; return sName; } @@ -123,19 +123,19 @@ public: } // XNameAcess - virtual uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) + virtual uno::Any SAL_CALL getByName( const OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { if ( !hasByName( aName ) ) throw container::NoSuchElementException(); return getByIndex( mIndices[ aName ] ); } - virtual uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw (uno::RuntimeException) + virtual uno::Sequence< OUString > SAL_CALL getElementNames( ) throw (uno::RuntimeException) { return msNames; } - virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (css::uno::RuntimeException) + virtual ::sal_Bool SAL_CALL hasByName( const OUString& aName ) throw (css::uno::RuntimeException) { ControlIndexMap::iterator it = mIndices.find( aName ); return it != mIndices.end(); @@ -262,7 +262,7 @@ uno::Any SAL_CALL ScVbaControls::Add( const uno::Any& Object, const uno::Any& St throw (uno::RuntimeException) { uno::Any aResult; - ::rtl::OUString aComServiceName; + OUString aComServiceName; try { @@ -277,19 +277,19 @@ uno::Any SAL_CALL ScVbaControls::Add( const uno::Any& Object, const uno::Any& St Object >>= aComServiceName; // TODO: Support Before and After? - ::rtl::OUString aNewName; + OUString aNewName; StringKey >>= aNewName; if ( aNewName.isEmpty() ) { aNewName = aComServiceName; if ( aNewName.isEmpty() ) - aNewName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Control" ) ); + aNewName = "Control"; sal_Int32 nInd = 0; while( xDialogContainer->hasByName( aNewName ) && (nInd < SAL_MAX_INT32) ) { aNewName = aComServiceName; - aNewName += ::rtl::OUString::valueOf( nInd++ ); + aNewName += OUString::valueOf( nInd++ ); } } @@ -302,80 +302,80 @@ uno::Any SAL_CALL ScVbaControls::Add( const uno::Any& Object, const uno::Any& St bool bNativeAX = false; if( aComServiceName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.CommandButton.1" ) ) ) { - xNewModel.set( xModelFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlButtonModel" ) ) ), uno::UNO_QUERY_THROW ); + xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlButtonModel" ), uno::UNO_QUERY_THROW ); fDefWidth = 72.0; fDefHeight = 24.0; bFontSupport = true; } else if( aComServiceName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.Label.1" ) ) ) { - xNewModel.set( xModelFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlFixedTextModel" ) ) ), uno::UNO_QUERY_THROW ); + xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlFixedTextModel" ), uno::UNO_QUERY_THROW ); fDefWidth = 72.0; fDefHeight = 18.0; bFontSupport = true; } else if( aComServiceName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.Image.1" ) ) ) { - xNewModel.set( xModelFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlImageControlModel" ) ) ), uno::UNO_QUERY_THROW ); + xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlImageControlModel" ), uno::UNO_QUERY_THROW ); fDefWidth = 72.0; fDefHeight = 72.0; } else if( aComServiceName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.CheckBox.1" ) ) ) { - xNewModel.set( xModelFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlCheckBoxModel" ) ) ), uno::UNO_QUERY_THROW ); + xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlCheckBoxModel" ), uno::UNO_QUERY_THROW ); fDefWidth = 108.0; fDefHeight = 18.0; bFontSupport = true; } else if( aComServiceName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.OptionButton.1" ) ) ) { - xNewModel.set( xModelFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlRadioButtonModel" ) ) ), uno::UNO_QUERY_THROW ); + xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlRadioButtonModel" ), uno::UNO_QUERY_THROW ); fDefWidth = 108.0; fDefHeight = 18.0; bFontSupport = true; } else if( aComServiceName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.TextBox.1" ) ) ) { - xNewModel.set( xModelFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlEditModel" ) ) ), uno::UNO_QUERY_THROW ); + xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlEditModel" ), uno::UNO_QUERY_THROW ); fDefWidth = 72.0; fDefHeight = 18.0; bFontSupport = true; } else if( aComServiceName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.ListBox.1" ) ) ) { - xNewModel.set( xModelFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlListBoxModel" ) ) ), uno::UNO_QUERY_THROW ); + xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlListBoxModel" ), uno::UNO_QUERY_THROW ); fDefWidth = 72.0; fDefHeight = 18.0; bFontSupport = true; } else if( aComServiceName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.ComboBox.1" ) ) ) { - xNewModel.set( xModelFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlComboBoxModel" ) ) ), uno::UNO_QUERY_THROW ); + xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlComboBoxModel" ), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xProps( xNewModel, uno::UNO_QUERY_THROW ); - xProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Dropdown" ) ), uno::Any( true ) ); + xProps->setPropertyValue( "Dropdown" , uno::Any( true ) ); fDefWidth = 72.0; fDefHeight = 18.0; bFontSupport = true; } else if( aComServiceName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.ToggleButton.1" ) ) ) { - xNewModel.set( xModelFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlButtonModel" ) ) ), uno::UNO_QUERY_THROW ); + xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlButtonModel" ), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xProps( xNewModel, uno::UNO_QUERY_THROW ); - xProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Toggle" ) ), uno::Any( true ) ); + xProps->setPropertyValue( "Toggle" , uno::Any( true ) ); fDefWidth = 72.0; fDefHeight = 18.0; bFontSupport = true; } else if( aComServiceName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.Frame.1" ) ) ) { - xNewModel.set( xModelFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlGroupBoxModel" ) ) ), uno::UNO_QUERY_THROW ); + xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlGroupBoxModel" ), uno::UNO_QUERY_THROW ); fDefWidth = 216.0; fDefHeight = 144.0; bFontSupport = true; } else if( aComServiceName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.SpinButton.1" ) ) ) { - xNewModel.set( xModelFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlSpinButtonModel" ) ) ), uno::UNO_QUERY_THROW ); + xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlSpinButtonModel" ), uno::UNO_QUERY_THROW ); fDefWidth = 12.75; fDefHeight = 25.5; } else if( aComServiceName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.ScrollBar.1" ) ) ) { - xNewModel.set( xModelFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlScrollBarModel" ) ) ), uno::UNO_QUERY_THROW ); + xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlScrollBarModel" ), uno::UNO_QUERY_THROW ); fDefWidth = 12.75; fDefHeight = 63.8; } else { - xNewModel.set( xModelFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.custom.awt.UnoControlSystemAXContainerModel" ) ) ), uno::UNO_QUERY_THROW ); + xNewModel.set( xModelFactory->createInstance( "com.sun.star.custom.awt.UnoControlSystemAXContainerModel" ), uno::UNO_QUERY_THROW ); fDefWidth = 72.0; fDefHeight = 18.0; bNativeAX = true; } @@ -384,12 +384,12 @@ uno::Any SAL_CALL ScVbaControls::Add( const uno::Any& Object, const uno::Any& St if( bFontSupport ) { uno::Reference< beans::XPropertySet > xModelProps( xNewModel, uno::UNO_QUERY_THROW ); - xModelProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontName" ) ), uno::Any( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Tahoma" ) ) ) ); - xModelProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontHeight" ) ), uno::Any( float( 8.0 ) ) ); - xModelProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontWeight" ) ), uno::Any( awt::FontWeight::NORMAL ) ); - xModelProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontSlant" ) ), uno::Any( awt::FontSlant_NONE ) ); - xModelProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontUnderline" ) ), uno::Any( awt::FontUnderline::NONE ) ); - xModelProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontStrikeout" ) ), uno::Any( awt::FontStrikeout::NONE ) ); + xModelProps->setPropertyValue( "FontName" , uno::Any( OUString("Tahoma" ) ) ); + xModelProps->setPropertyValue( "FontHeight" , uno::Any( float( 8.0 ) ) ); + xModelProps->setPropertyValue( "FontWeight" , uno::Any( awt::FontWeight::NORMAL ) ); + xModelProps->setPropertyValue( "FontSlant" , uno::Any( awt::FontSlant_NONE ) ); + xModelProps->setPropertyValue( "FontUnderline" , uno::Any( awt::FontUnderline::NONE ) ); + xModelProps->setPropertyValue( "FontStrikeout" , uno::Any( awt::FontStrikeout::NONE ) ); } xDialogContainer->insertByName( aNewName, uno::makeAny( xNewModel ) ); @@ -404,7 +404,7 @@ uno::Any SAL_CALL ScVbaControls::Add( const uno::Any& Object, const uno::Any& St aArgs[0] <<= aComServiceName; uno::Sequence< sal_Int16 > aOutIDDummy; uno::Sequence< uno::Any > aOutDummy; - xControlInvoke->invoke( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SOAddAXControl" ) ), aArgs, aOutIDDummy, aOutDummy ); + xControlInvoke->invoke( "SOAddAXControl" , aArgs, aOutIDDummy, aOutDummy ); } catch (const uno::Exception&) { @@ -433,7 +433,7 @@ uno::Any SAL_CALL ScVbaControls::Add( const uno::Any& Object, const uno::Any& St } catch (const uno::Exception& e) { - throw lang::WrappedTargetException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can not create AXControl!" ) ), + throw lang::WrappedTargetException( "Can not create AXControl!", uno::Reference< uno::XInterface >(), uno::makeAny( e ) ); } @@ -444,7 +444,7 @@ uno::Any SAL_CALL ScVbaControls::Add( const uno::Any& Object, const uno::Any& St void SAL_CALL ScVbaControls::Remove( const uno::Any& StringKeyOrIndex ) throw (uno::RuntimeException) { - ::rtl::OUString aControlName; + OUString aControlName; sal_Int32 nIndex = -1; try diff --git a/vbahelper/source/msforms/vbaframe.cxx b/vbahelper/source/msforms/vbaframe.cxx index ee39e9953b09..27ef523bce54 100644 --- a/vbahelper/source/msforms/vbaframe.cxx +++ b/vbahelper/source/msforms/vbaframe.cxx @@ -27,7 +27,7 @@ using namespace com::sun::star; using namespace ooo::vba; -const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") ); +const static OUString LABEL( "Label" ); ScVbaFrame::ScVbaFrame( const uno::Reference< XHelperInterface >& xParent, @@ -43,14 +43,14 @@ ScVbaFrame::ScVbaFrame( // XFrame attributes -rtl::OUString SAL_CALL ScVbaFrame::getCaption() throw (css::uno::RuntimeException) +OUString SAL_CALL ScVbaFrame::getCaption() throw (css::uno::RuntimeException) { - rtl::OUString Label; + OUString Label; m_xProps->getPropertyValue( LABEL ) >>= Label; return Label; } -void SAL_CALL ScVbaFrame::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException) +void SAL_CALL ScVbaFrame::setCaption( const OUString& _caption ) throw (::com::sun::star::uno::RuntimeException) { m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) ); } diff --git a/vbahelper/source/msforms/vbaframe.hxx b/vbahelper/source/msforms/vbaframe.hxx index fe4c9e6f7963..02a27b8afa6d 100644 --- a/vbahelper/source/msforms/vbaframe.hxx +++ b/vbahelper/source/msforms/vbaframe.hxx @@ -38,8 +38,8 @@ public: const css::uno::Reference< css::awt::XControl >& xDialog ); // XFrame attributes - virtual rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException); - virtual void SAL_CALL setCaption( const rtl::OUString& _caption ) throw (css::uno::RuntimeException); + virtual OUString SAL_CALL getCaption() throw (css::uno::RuntimeException); + virtual void SAL_CALL setCaption( const OUString& _caption ) throw (css::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getForeColor() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setForeColor( ::sal_Int32 _forecolor ) throw (::com::sun::star::uno::RuntimeException); @@ -51,8 +51,8 @@ public: // XFrame methods css::uno::Any SAL_CALL Controls( const css::uno::Any& rIndex ) throw (css::uno::RuntimeException); //XHelperInterface - virtual rtl::OUString getServiceImplName(); - virtual css::uno::Sequence<rtl::OUString> getServiceNames(); + virtual OUString getServiceImplName(); + virtual css::uno::Sequence<OUString> getServiceNames(); private: css::uno::Reference< css::awt::XControl > mxDialog; diff --git a/vbahelper/source/msforms/vbaimage.cxx b/vbahelper/source/msforms/vbaimage.cxx index 80709b06d21a..3093cbeace30 100644 --- a/vbahelper/source/msforms/vbaimage.cxx +++ b/vbahelper/source/msforms/vbaimage.cxx @@ -27,20 +27,20 @@ ScVbaImage::ScVbaImage( const uno::Reference< XHelperInterface >& xParent, const { } -rtl::OUString +OUString ScVbaImage::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaImage")); + return OUString("ScVbaImage"); } -uno::Sequence< rtl::OUString > +uno::Sequence< OUString > ScVbaImage::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.Image" ) ); + aServiceNames[ 0 ] = "ooo.vba.msforms.Image"; } return aServiceNames; } diff --git a/vbahelper/source/msforms/vbaimage.hxx b/vbahelper/source/msforms/vbaimage.hxx index 74ba18992188..61fa8dc72e77 100644 --- a/vbahelper/source/msforms/vbaimage.hxx +++ b/vbahelper/source/msforms/vbaimage.hxx @@ -33,8 +33,8 @@ public: virtual sal_Int32 SAL_CALL getBackColor() throw (css::uno::RuntimeException); virtual void SAL_CALL setBackColor( sal_Int32 nBackColor ) throw (css::uno::RuntimeException); //XHelperInterface - virtual rtl::OUString getServiceImplName(); - virtual css::uno::Sequence<rtl::OUString> getServiceNames(); + virtual OUString getServiceImplName(); + virtual css::uno::Sequence<OUString> getServiceNames(); }; #endif //SC_VBA_IMAGE_HXX diff --git a/vbahelper/source/msforms/vbalabel.cxx b/vbahelper/source/msforms/vbalabel.cxx index 4c9a723cce4a..6a1d78f496f1 100644 --- a/vbahelper/source/msforms/vbalabel.cxx +++ b/vbahelper/source/msforms/vbalabel.cxx @@ -24,22 +24,22 @@ using namespace com::sun::star; using namespace ooo::vba; -const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") ); +const static OUString LABEL( "Label" ); ScVbaLabel::ScVbaLabel( const css::uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper ) : LabelImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper ) { } // Attributes -rtl::OUString SAL_CALL +OUString SAL_CALL ScVbaLabel::getCaption() throw (css::uno::RuntimeException) { - rtl::OUString Label; + OUString Label; m_xProps->getPropertyValue( LABEL ) >>= Label; return Label; } void SAL_CALL -ScVbaLabel::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException) +ScVbaLabel::setCaption( const OUString& _caption ) throw (::com::sun::star::uno::RuntimeException) { m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) ); } @@ -52,20 +52,20 @@ ScVbaLabel::getValue() throw (css::uno::RuntimeException) void SAL_CALL ScVbaLabel::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException) { - rtl::OUString sCaption; + OUString sCaption; _value >>= sCaption; setCaption( sCaption ); } -rtl::OUString SAL_CALL +OUString SAL_CALL ScVbaLabel::getAccelerator() throw (css::uno::RuntimeException) { // #STUB - return rtl::OUString(); + return OUString(); } void SAL_CALL -ScVbaLabel::setAccelerator( const rtl::OUString& /*_accelerator*/ ) throw (::com::sun::star::uno::RuntimeException) +ScVbaLabel::setAccelerator( const OUString& /*_accelerator*/ ) throw (::com::sun::star::uno::RuntimeException) { // #STUB } @@ -75,9 +75,9 @@ uno::Reference< msforms::XNewFont > SAL_CALL ScVbaLabel::getFont() throw (uno::R return new VbaNewFont( this, mxContext, m_xProps ); } -rtl::OUString ScVbaLabel::getServiceImplName() +OUString ScVbaLabel::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaLabel")); + return OUString( "ScVbaLabel" ); } sal_Int32 SAL_CALL ScVbaLabel::getBackColor() throw (uno::RuntimeException) @@ -100,14 +100,14 @@ void SAL_CALL ScVbaLabel::setAutoSize( sal_Bool bAutoSize ) throw (uno::RuntimeE ScVbaControl::setAutoSize( bAutoSize ); } -uno::Sequence< rtl::OUString > +uno::Sequence< OUString > ScVbaLabel::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.Label" ) ); + aServiceNames[ 0 ] = "ooo.vba.msforms.Label"; } return aServiceNames; } diff --git a/vbahelper/source/msforms/vbalabel.hxx b/vbahelper/source/msforms/vbalabel.hxx index 0dedfe526492..40e1c620a059 100644 --- a/vbahelper/source/msforms/vbalabel.hxx +++ b/vbahelper/source/msforms/vbalabel.hxx @@ -34,20 +34,20 @@ public: // Attributes virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException); virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException); - virtual rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException); - virtual void SAL_CALL setCaption( const rtl::OUString& _caption ) throw (css::uno::RuntimeException); - virtual rtl::OUString SAL_CALL getAccelerator() throw (css::uno::RuntimeException); - virtual void SAL_CALL setAccelerator( const rtl::OUString& _accelerator ) throw (css::uno::RuntimeException); + virtual OUString SAL_CALL getCaption() throw (css::uno::RuntimeException); + virtual void SAL_CALL setCaption( const OUString& _caption ) throw (css::uno::RuntimeException); + virtual OUString SAL_CALL getAccelerator() throw (css::uno::RuntimeException); + virtual void SAL_CALL setAccelerator( const OUString& _accelerator ) throw (css::uno::RuntimeException); virtual css::uno::Reference< ov::msforms::XNewFont > SAL_CALL getFont() throw (css::uno::RuntimeException); virtual sal_Int32 SAL_CALL getBackColor() throw (css::uno::RuntimeException); virtual void SAL_CALL setBackColor( sal_Int32 nBackColor ) throw (css::uno::RuntimeException); virtual sal_Bool SAL_CALL getAutoSize() throw (css::uno::RuntimeException); virtual void SAL_CALL setAutoSize( sal_Bool bAutoSize ) throw (css::uno::RuntimeException); //XHelperInterface - virtual rtl::OUString getServiceImplName(); - virtual css::uno::Sequence<rtl::OUString> getServiceNames(); + virtual OUString getServiceImplName(); + virtual css::uno::Sequence<OUString> getServiceNames(); // XDefaultProperty - rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString("Value"); } + OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return OUString("Value"); } }; #endif //SC_VBA_LABEL_HXX diff --git a/vbahelper/source/msforms/vbalistbox.cxx b/vbahelper/source/msforms/vbalistbox.cxx index eade578edd6e..4e704a94f5cc 100644 --- a/vbahelper/source/msforms/vbalistbox.cxx +++ b/vbahelper/source/msforms/vbalistbox.cxx @@ -26,9 +26,9 @@ using namespace com::sun::star; using namespace ooo::vba; -const static rtl::OUString TEXT( "Text" ); -const static rtl::OUString SELECTEDITEMS( "SelectedItems" ); -const static rtl::OUString ITEMS( "StringItemList" ); +const static OUString TEXT( "Text" ); +const static OUString SELECTEDITEMS( "SelectedItems" ); +const static OUString ITEMS( "StringItemList" ); ScVbaListBox::ScVbaListBox( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ListBoxImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper ) @@ -60,12 +60,11 @@ uno::Any SAL_CALL ScVbaListBox::getValue() throw (uno::RuntimeException) { uno::Sequence< sal_Int16 > sSelection; - uno::Sequence< rtl::OUString > sItems; + uno::Sequence< OUString > sItems; m_xProps->getPropertyValue( SELECTEDITEMS ) >>= sSelection; m_xProps->getPropertyValue( ITEMS ) >>= sItems; if( getMultiSelect() ) - throw uno::RuntimeException( rtl::OUString( - "Attribute use invalid." ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( "Attribute use invalid." , uno::Reference< uno::XInterface >() ); uno::Any aRet; if ( sSelection.getLength() ) aRet = uno::makeAny( sItems[ sSelection[ 0 ] ] ); @@ -77,11 +76,10 @@ ScVbaListBox::setValue( const uno::Any& _value ) throw (uno::RuntimeException) { if( getMultiSelect() ) { - throw uno::RuntimeException( rtl::OUString( - "Attribute use invalid." ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( "Attribute use invalid." , uno::Reference< uno::XInterface >() ); } - rtl::OUString sValue = getAnyAsString( _value ); - uno::Sequence< rtl::OUString > sList; + OUString sValue = getAnyAsString( _value ); + uno::Sequence< OUString > sList; m_xProps->getPropertyValue( ITEMS ) >>= sList; uno::Sequence< sal_Int16 > nList; sal_Int16 nLength = static_cast<sal_Int16>( sList.getLength() ); @@ -96,8 +94,7 @@ ScVbaListBox::setValue( const uno::Any& _value ) throw (uno::RuntimeException) } } if( nValue == -1 ) - throw uno::RuntimeException( rtl::OUString( - "Attribute use invalid." ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( "Attribute use invalid." , uno::Reference< uno::XInterface >() ); uno::Sequence< sal_Int16 > nSelectedIndices(1); uno::Sequence< sal_Int16 > nOldSelectedIndices; @@ -109,16 +106,16 @@ ScVbaListBox::setValue( const uno::Any& _value ) throw (uno::RuntimeException) //m_xProps->setPropertyValue( TEXT, uno::makeAny( sValue ) ); } -::rtl::OUString SAL_CALL +OUString SAL_CALL ScVbaListBox::getText() throw (uno::RuntimeException) { - rtl::OUString result; + OUString result; getValue() >>= result; return result; } void SAL_CALL -ScVbaListBox::setText( const ::rtl::OUString& _text ) throw (uno::RuntimeException) +ScVbaListBox::setText( const OUString& _text ) throw (uno::RuntimeException) { setValue( uno::makeAny( _text ) ); // seems the same } @@ -127,7 +124,7 @@ sal_Int32 SAL_CALL ScVbaListBox::getMultiSelect() throw (css::uno::RuntimeException) { sal_Bool bMultiSelect = sal_False; - m_xProps->getPropertyValue( rtl::OUString( "MultiSelection" ) ) >>= bMultiSelect; + m_xProps->getPropertyValue( "MultiSelection" ) >>= bMultiSelect; return bMultiSelect ? 1 : 0 ; } @@ -135,22 +132,21 @@ void SAL_CALL ScVbaListBox::setMultiSelect( sal_Int32 _multiselect ) throw (css::uno::RuntimeException) { sal_Bool bMultiSelect = _multiselect == 1 ? 1 : 0; - m_xProps->setPropertyValue( rtl::OUString( "MultiSelection" ), uno::makeAny( bMultiSelect ) ); + m_xProps->setPropertyValue( "MultiSelection" , uno::makeAny( bMultiSelect ) ); } css::uno::Any SAL_CALL ScVbaListBox::Selected( sal_Int32 index ) throw (css::uno::RuntimeException) { - uno::Sequence< rtl::OUString > sList; + uno::Sequence< OUString > sList; m_xProps->getPropertyValue( ITEMS ) >>= sList; sal_Int16 nLength = static_cast< sal_Int16 >( sList.getLength() ); // no choice but to do a horror cast as internally // the indices are but sal_Int16 sal_Int16 nIndex = static_cast< sal_Int16 >( index ); if( nIndex < 0 || nIndex >= nLength ) - throw uno::RuntimeException( rtl::OUString( - "Error Number." ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( "Error Number." , uno::Reference< uno::XInterface >() ); m_nIndex = nIndex; return uno::makeAny( uno::Reference< XPropValue > ( new ScVbaPropValue( this ) ) ); } @@ -183,8 +179,7 @@ ScVbaListBox::setValueEvent( const uno::Any& value ) { sal_Bool bValue = sal_False; if( !(value >>= bValue) ) - throw uno::RuntimeException( rtl::OUString( - "Invalid type\n. need boolean." ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( "Invalid type\n. need boolean." , uno::Reference< uno::XInterface >() ); uno::Sequence< sal_Int16 > nList; m_xProps->getPropertyValue( SELECTEDITEMS ) >>= nList; sal_Int16 nLength = static_cast<sal_Int16>( nList.getLength() ); @@ -235,7 +230,7 @@ css::uno::Any ScVbaListBox::getValueEvent() { uno::Sequence< sal_Int16 > nList; - m_xProps->getPropertyValue( rtl::OUString( "SelectedItems" ) ) >>= nList; + m_xProps->getPropertyValue( "SelectedItems" ) >>= nList; sal_Int32 nLength = nList.getLength(); sal_Int32 nIndex = m_nIndex; @@ -249,7 +244,7 @@ ScVbaListBox::getValueEvent() } void SAL_CALL -ScVbaListBox::setRowSource( const rtl::OUString& _rowsource ) throw (uno::RuntimeException) +ScVbaListBox::setRowSource( const OUString& _rowsource ) throw (uno::RuntimeException) { ScVbaControl::setRowSource( _rowsource ); mpListHelper->setRowSource( _rowsource ); @@ -272,20 +267,20 @@ uno::Reference< msforms::XNewFont > SAL_CALL ScVbaListBox::getFont() throw (uno: return new VbaNewFont( this, mxContext, m_xProps ); } -rtl::OUString +OUString ScVbaListBox::getServiceImplName() { - return rtl::OUString("ScVbaListBox"); + return OUString("ScVbaListBox"); } -uno::Sequence< rtl::OUString > +uno::Sequence< OUString > ScVbaListBox::getServiceNames() { - static uno::Sequence< rtl::OUString > aServiceNames; + static uno::Sequence< OUString > aServiceNames; if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( "ooo.vba.msforms.ScVbaListBox" ); + aServiceNames[ 0 ] = "ooo.vba.msforms.ScVbaListBox"; } return aServiceNames; } diff --git a/vbahelper/source/msforms/vbalistbox.hxx b/vbahelper/source/msforms/vbalistbox.hxx index 8e0934ac3a15..c337e929e377 100644 --- a/vbahelper/source/msforms/vbalistbox.hxx +++ b/vbahelper/source/msforms/vbalistbox.hxx @@ -36,8 +36,8 @@ class ScVbaListBox : public ListBoxImpl_BASE SAL_WNODEPRECATED_DECLARATIONS_PUSH std::auto_ptr< ListControlHelper > mpListHelper; SAL_WNODEPRECATED_DECLARATIONS_POP - rtl::OUString sSourceName; - rtl::OUString msDftPropName; + OUString sSourceName; + OUString msDftPropName; sal_Int16 m_nIndex; @@ -50,8 +50,8 @@ public: virtual ::sal_Int32 SAL_CALL getListCount() throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException); virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException); - virtual rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException); - virtual void SAL_CALL setText( const ::rtl::OUString& _text ) throw (css::uno::RuntimeException); + virtual OUString SAL_CALL getText() throw (css::uno::RuntimeException); + virtual void SAL_CALL setText( const OUString& _text ) throw (css::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getMultiSelect() throw (css::uno::RuntimeException); virtual void SAL_CALL setMultiSelect( ::sal_Int32 _multiselect ) throw (css::uno::RuntimeException); virtual css::uno::Reference< ov::msforms::XNewFont > SAL_CALL getFont() throw (css::uno::RuntimeException); @@ -63,14 +63,14 @@ public: virtual void SAL_CALL Clear( ) throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL List( const css::uno::Any& pvargIndex, const css::uno::Any& pvarColumn ) throw (css::uno::RuntimeException); // XControl - virtual void SAL_CALL setRowSource( const rtl::OUString& _rowsource ) throw (css::uno::RuntimeException); + virtual void SAL_CALL setRowSource( const OUString& _rowsource ) throw (css::uno::RuntimeException); // XDefaultProperty - rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString("Value"); } + OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return OUString("Value"); } //XHelperInterface - virtual rtl::OUString getServiceImplName(); - virtual css::uno::Sequence<rtl::OUString> getServiceNames(); + virtual OUString getServiceImplName(); + virtual css::uno::Sequence<OUString> getServiceNames(); //PropListener virtual void setValueEvent( const css::uno::Any& value ); diff --git a/vbahelper/source/msforms/vbalistcontrolhelper.cxx b/vbahelper/source/msforms/vbalistcontrolhelper.cxx index 70396a37dbf1..70e0b661d3d2 100644 --- a/vbahelper/source/msforms/vbalistcontrolhelper.cxx +++ b/vbahelper/source/msforms/vbalistcontrolhelper.cxx @@ -24,7 +24,7 @@ using namespace com::sun::star; using namespace ooo::vba; -const static rtl::OUString ITEMS( "StringItemList" ); +const static OUString ITEMS( "StringItemList" ); class ListPropListener : public PropListener { @@ -47,15 +47,14 @@ ListPropListener::ListPropListener( const uno::Reference< beans::XPropertySet >& void ListPropListener::setValueEvent( const uno::Any& value ) { if( m_pvargIndex.hasValue() || m_pvarColumn.hasValue() ) - throw uno::RuntimeException( rtl::OUString( - "Bad argument" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( "Bad argument" , uno::Reference< uno::XInterface >() ); m_xProps->setPropertyValue( ITEMS, value ); } uno::Any ListPropListener::getValueEvent() { - uno::Sequence< rtl::OUString > sList; + uno::Sequence< OUString > sList; m_xProps->getPropertyValue( ITEMS ) >>= sList; sal_Int16 nLength = static_cast< sal_Int16 >( sList.getLength() ); uno::Any aRet; @@ -64,16 +63,14 @@ uno::Any ListPropListener::getValueEvent() sal_Int16 nIndex = -1; m_pvargIndex >>= nIndex; if( nIndex < 0 || nIndex >= nLength ) - throw uno::RuntimeException( rtl::OUString( - "Bad row Index" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( "Bad row Index" , uno::Reference< uno::XInterface >() ); aRet <<= sList[ nIndex ]; } else if ( m_pvarColumn.hasValue() ) // pvarColumn on its own would be bad - throw uno::RuntimeException( rtl::OUString( - "Bad column Index" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( "Bad column Index" , uno::Reference< uno::XInterface >() ); else // List() ( e.g. no args ) { - uno::Sequence< uno::Sequence< rtl::OUString > > sReturnArray( nLength ); + uno::Sequence< uno::Sequence< OUString > > sReturnArray( nLength ); for ( sal_Int32 i = 0; i < nLength; ++i ) { sReturnArray[ i ].realloc( 10 ); @@ -89,7 +86,7 @@ ListControlHelper::AddItem( const uno::Any& pvargItem, const uno::Any& pvargInde { if ( pvargItem.hasValue() ) { - uno::Sequence< rtl::OUString > sList; + uno::Sequence< OUString > sList; m_xProps->getPropertyValue( ITEMS ) >>= sList; sal_Int32 nIndex = sList.getLength(); @@ -97,7 +94,7 @@ ListControlHelper::AddItem( const uno::Any& pvargItem, const uno::Any& pvargInde if ( pvargIndex.hasValue() ) pvargIndex >>= nIndex; - rtl::OUString sString = getAnyAsString( pvargItem ); + OUString sString = getAnyAsString( pvargItem ); // if no index specified or item is to be appended to end of // list just realloc the array and set the last item @@ -110,13 +107,13 @@ ListControlHelper::AddItem( const uno::Any& pvargItem, const uno::Any& pvargInde else { // just copy those elements above the one to be inserted - std::vector< rtl::OUString > sVec; + std::vector< OUString > sVec; // reserve just the amount we need to copy sVec.reserve( sList.getLength() - nIndex ); // point at first element to copy - rtl::OUString* pString = sList.getArray() + nIndex; - const rtl::OUString* pEndString = sList.getArray() + sList.getLength(); + OUString* pString = sList.getArray() + nIndex; + const OUString* pEndString = sList.getArray() + sList.getLength(); // insert the new element sVec.push_back( sString ); // copy elements @@ -128,7 +125,7 @@ ListControlHelper::AddItem( const uno::Any& pvargItem, const uno::Any& pvargInde // point at first element to be overwritten pString = sList.getArray() + nIndex; pEndString = sList.getArray() + sList.getLength(); - std::vector< rtl::OUString >::iterator it = sVec.begin(); + std::vector< OUString >::iterator it = sVec.begin(); for ( ; pString != pEndString; ++pString, ++it) *pString = *it; // @@ -146,10 +143,10 @@ ListControlHelper::removeItem( const uno::Any& index ) throw (uno::RuntimeExcept // for int index if ( index >>= nIndex ) { - uno::Sequence< rtl::OUString > sList; + uno::Sequence< OUString > sList; m_xProps->getPropertyValue( ITEMS ) >>= sList; if( nIndex < 0 || nIndex > ( sList.getLength() - 1 ) ) - throw uno::RuntimeException( rtl::OUString("Invalid index"), uno::Reference< uno::XInterface > () ); + throw uno::RuntimeException( "Invalid index" , uno::Reference< uno::XInterface > () ); if( sList.hasElements() ) { if( sList.getLength() == 1 ) @@ -173,11 +170,11 @@ ListControlHelper::Clear( ) throw (uno::RuntimeException) { // urk, setValue doesn't seem to work !! //setValue( uno::makeAny( sal_Int16() ) ); - m_xProps->setPropertyValue( ITEMS, uno::makeAny( uno::Sequence< rtl::OUString >() ) ); + m_xProps->setPropertyValue( ITEMS, uno::makeAny( uno::Sequence< OUString >() ) ); } void SAL_CALL -ListControlHelper::setRowSource( const rtl::OUString& _rowsource ) throw (uno::RuntimeException) +ListControlHelper::setRowSource( const OUString& _rowsource ) throw (uno::RuntimeException) { if ( _rowsource.isEmpty() ) Clear(); @@ -186,7 +183,7 @@ ListControlHelper::setRowSource( const rtl::OUString& _rowsource ) throw (uno::R sal_Int32 SAL_CALL ListControlHelper::getListCount() throw (uno::RuntimeException) { - uno::Sequence< rtl::OUString > sList; + uno::Sequence< OUString > sList; m_xProps->getPropertyValue( ITEMS ) >>= sList; return sList.getLength(); } diff --git a/vbahelper/source/msforms/vbalistcontrolhelper.hxx b/vbahelper/source/msforms/vbalistcontrolhelper.hxx index 5da31aba084f..93554587e0af 100644 --- a/vbahelper/source/msforms/vbalistcontrolhelper.hxx +++ b/vbahelper/source/msforms/vbalistcontrolhelper.hxx @@ -31,7 +31,7 @@ public: virtual ~ListControlHelper() {} virtual void SAL_CALL AddItem( const css::uno::Any& pvargItem, const css::uno::Any& pvargIndex ) throw (css::uno::RuntimeException); virtual void SAL_CALL removeItem( const css::uno::Any& index ) throw (css::uno::RuntimeException); - virtual void SAL_CALL setRowSource( const rtl::OUString& _rowsource ) throw (css::uno::RuntimeException); + virtual void SAL_CALL setRowSource( const OUString& _rowsource ) throw (css::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getListCount() throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL List( const css::uno::Any& pvargIndex, const css::uno::Any& pvarColumn ) throw (css::uno::RuntimeException); virtual void SAL_CALL Clear( ) throw (css::uno::RuntimeException); diff --git a/vbahelper/source/msforms/vbamultipage.cxx b/vbahelper/source/msforms/vbamultipage.cxx index 518943a89d6c..7cfbe97019e5 100644 --- a/vbahelper/source/msforms/vbamultipage.cxx +++ b/vbahelper/source/msforms/vbamultipage.cxx @@ -25,7 +25,7 @@ using namespace com::sun::star; using namespace ooo::vba; -const rtl::OUString SVALUE( RTL_CONSTASCII_USTRINGPARAM("MultiPageValue") ); +const OUString SVALUE( "MultiPageValue" ); typedef cppu::WeakImplHelper1< container::XIndexAccess > PagesImpl_Base; class PagesImpl : public PagesImpl_Base @@ -89,10 +89,10 @@ ScVbaMultiPage::setValue( const sal_Int32 _value ) throw (::com::sun::star::uno: fireChangeEvent(); } -rtl::OUString +OUString ScVbaMultiPage::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaMultiPage")); + return OUString( "ScVbaMultiPage" ); } uno::Any SAL_CALL @@ -106,14 +106,14 @@ ScVbaMultiPage::Pages( const uno::Any& index ) throw (uno::RuntimeException) return xColl->Item( uno::makeAny( index ), uno::Any() ); } -uno::Sequence< rtl::OUString > +uno::Sequence< OUString > ScVbaMultiPage::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.MultiPage" ) ); + aServiceNames[ 0 ] = "ooo.vba.msforms.MultiPage"; } return aServiceNames; } diff --git a/vbahelper/source/msforms/vbamultipage.hxx b/vbahelper/source/msforms/vbamultipage.hxx index 5982d10cfc1a..1612faa1f25c 100644 --- a/vbahelper/source/msforms/vbamultipage.hxx +++ b/vbahelper/source/msforms/vbamultipage.hxx @@ -44,10 +44,10 @@ public: virtual css::uno::Any SAL_CALL Pages( const css::uno::Any& index ) throw (css::uno::RuntimeException); //XHelperInterface - virtual rtl::OUString getServiceImplName(); - virtual css::uno::Sequence<rtl::OUString> getServiceNames(); + virtual OUString getServiceImplName(); + virtual css::uno::Sequence<OUString> getServiceNames(); // XDefaultProperty - rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString("Value"); } + OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return OUString("Value"); } }; #endif //SC_VBA_LABEL_HXX diff --git a/vbahelper/source/msforms/vbanewfont.cxx b/vbahelper/source/msforms/vbanewfont.cxx index 67819eaf1a9d..1880529ff71b 100644 --- a/vbahelper/source/msforms/vbanewfont.cxx +++ b/vbahelper/source/msforms/vbanewfont.cxx @@ -39,35 +39,31 @@ VbaNewFont::VbaNewFont( // XNewFont attributes -::rtl::OUString SAL_CALL VbaNewFont::getName() throw (uno::RuntimeException) +OUString SAL_CALL VbaNewFont::getName() throw (uno::RuntimeException) { - uno::Any aAny = mxProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontName" ) ) ); - return aAny.get< ::rtl::OUString >(); + uno::Any aAny = mxProps->getPropertyValue( "FontName" ); + return aAny.get< OUString >(); } -void SAL_CALL VbaNewFont::setName( const ::rtl::OUString& rName ) throw (uno::RuntimeException) +void SAL_CALL VbaNewFont::setName( const OUString& rName ) throw (uno::RuntimeException) { - mxProps->setPropertyValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontName" ) ), - uno::Any( rName ) ); + mxProps->setPropertyValue( "FontName" , uno::Any( rName ) ); } double SAL_CALL VbaNewFont::getSize() throw (uno::RuntimeException) { - uno::Any aAny = mxProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontHeight" ) ) ); + uno::Any aAny = mxProps->getPropertyValue( "FontHeight" ); return aAny.get< float >(); } void SAL_CALL VbaNewFont::setSize( double fSize ) throw (uno::RuntimeException) { - mxProps->setPropertyValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontHeight" ) ), - uno::Any( static_cast< float >( fSize ) ) ); + mxProps->setPropertyValue( "FontHeight" , uno::Any( static_cast< float >( fSize ) ) ); } sal_Int16 SAL_CALL VbaNewFont::getCharset() throw (uno::RuntimeException) { - uno::Any aAny = mxProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontCharset" ) ) ); + uno::Any aAny = mxProps->getPropertyValue( "FontCharset" ); return rtl_getBestWindowsCharsetFromTextEncoding( static_cast< rtl_TextEncoding >( aAny.get< sal_Int16 >() ) ); } @@ -78,9 +74,7 @@ void SAL_CALL VbaNewFont::setCharset( sal_Int16 nCharset ) throw (uno::RuntimeEx eFontEnc = rtl_getTextEncodingFromWindowsCharset( static_cast< sal_uInt8 >( nCharset ) ); if( eFontEnc == RTL_TEXTENCODING_DONTKNOW ) throw uno::RuntimeException(); - mxProps->setPropertyValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontCharset" ) ), - uno::Any( static_cast< sal_Int16 >( eFontEnc ) ) ); + mxProps->setPropertyValue( "FontCharset" , uno::Any( static_cast< sal_Int16 >( eFontEnc ) ) ); } sal_Int16 SAL_CALL VbaNewFont::getWeight() throw (uno::RuntimeException) @@ -95,54 +89,46 @@ void SAL_CALL VbaNewFont::setWeight( sal_Int16 nWeight ) throw (uno::RuntimeExce sal_Bool SAL_CALL VbaNewFont::getBold() throw (uno::RuntimeException) { - uno::Any aAny = mxProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontWeight" ) ) ); + uno::Any aAny = mxProps->getPropertyValue( "FontWeight" ); return aAny.get< float >() > awt::FontWeight::NORMAL; } void SAL_CALL VbaNewFont::setBold( sal_Bool bBold ) throw (uno::RuntimeException) { - mxProps->setPropertyValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontWeight" ) ), - uno::Any( bBold ? awt::FontWeight::BOLD : awt::FontWeight::NORMAL ) ); + mxProps->setPropertyValue( "FontWeight" , uno::Any( bBold ? awt::FontWeight::BOLD : awt::FontWeight::NORMAL ) ); } sal_Bool SAL_CALL VbaNewFont::getItalic() throw (uno::RuntimeException) { - uno::Any aAny = mxProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontSlant" ) ) ); + uno::Any aAny = mxProps->getPropertyValue( "FontSlant" ); return aAny.get< awt::FontSlant >() != awt::FontSlant_NONE; } void SAL_CALL VbaNewFont::setItalic( sal_Bool bItalic ) throw (uno::RuntimeException) { - mxProps->setPropertyValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontSlant" ) ), - uno::Any( bItalic ? awt::FontSlant_ITALIC : awt::FontSlant_NONE ) ); + mxProps->setPropertyValue( "FontSlant" , uno::Any( bItalic ? awt::FontSlant_ITALIC : awt::FontSlant_NONE ) ); } sal_Bool SAL_CALL VbaNewFont::getUnderline() throw (uno::RuntimeException) { - uno::Any aAny = mxProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontUnderline" ) ) ); + uno::Any aAny = mxProps->getPropertyValue("FontUnderline" ); return aAny.get< sal_Int16 >() != awt::FontUnderline::NONE; } void SAL_CALL VbaNewFont::setUnderline( sal_Bool bUnderline ) throw (uno::RuntimeException) { - mxProps->setPropertyValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontUnderline" ) ), - uno::Any( bUnderline ? awt::FontUnderline::SINGLE : awt::FontUnderline::NONE ) ); + mxProps->setPropertyValue("FontUnderline" , uno::Any( bUnderline ? awt::FontUnderline::SINGLE : awt::FontUnderline::NONE ) ); } sal_Bool SAL_CALL VbaNewFont::getStrikethrough() throw (uno::RuntimeException) { - uno::Any aAny = mxProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontStrikeout" ) ) ); + uno::Any aAny = mxProps->getPropertyValue( "FontStrikeout" ); return aAny.get< sal_Int16 >() != awt::FontStrikeout::NONE; } void SAL_CALL VbaNewFont::setStrikethrough( sal_Bool bStrikethrough ) throw (uno::RuntimeException) { - mxProps->setPropertyValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontStrikeout" ) ), - uno::Any( bStrikethrough ? awt::FontStrikeout::SINGLE : awt::FontStrikeout::NONE ) ); + mxProps->setPropertyValue( "FontStrikeout" ,uno::Any( bStrikethrough ? awt::FontStrikeout::SINGLE : awt::FontStrikeout::NONE ) ); } // XHelperInterface diff --git a/vbahelper/source/msforms/vbanewfont.hxx b/vbahelper/source/msforms/vbanewfont.hxx index 0ac236ec015a..17944bc02547 100644 --- a/vbahelper/source/msforms/vbanewfont.hxx +++ b/vbahelper/source/msforms/vbanewfont.hxx @@ -36,8 +36,8 @@ public: const css::uno::Reference< css::beans::XPropertySet >& rxModelProps ) throw (css::uno::RuntimeException); // XNewFont attributes - virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException); - virtual void SAL_CALL setName( const ::rtl::OUString& rName ) throw (css::uno::RuntimeException); + virtual OUString SAL_CALL getName() throw (css::uno::RuntimeException); + virtual void SAL_CALL setName( const OUString& rName ) throw (css::uno::RuntimeException); virtual double SAL_CALL getSize() throw (css::uno::RuntimeException); virtual void SAL_CALL setSize( double fSize ) throw (css::uno::RuntimeException); virtual sal_Int16 SAL_CALL getCharset() throw (css::uno::RuntimeException); diff --git a/vbahelper/source/msforms/vbapages.cxx b/vbahelper/source/msforms/vbapages.cxx index ba1ef2b9c703..3b279835503d 100644 --- a/vbahelper/source/msforms/vbapages.cxx +++ b/vbahelper/source/msforms/vbapages.cxx @@ -38,10 +38,10 @@ ScVbaPages::createCollectionObject( const css::uno::Any& aSource ) return aSource; } -rtl::OUString +OUString ScVbaPages::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaPages")); + return OUString( "ScVbaPages" ); } uno::Reference< container::XEnumeration > SAL_CALL @@ -51,14 +51,14 @@ ScVbaPages::createEnumeration() throw (uno::RuntimeException) return uno::Reference< container::XEnumeration >(); } -uno::Sequence< rtl::OUString > +uno::Sequence< OUString > ScVbaPages::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.msform.Pages" ) ); + aServiceNames[ 0 ] = "ooo.vba.msform.Pages"; } return aServiceNames; } diff --git a/vbahelper/source/msforms/vbapages.hxx b/vbahelper/source/msforms/vbapages.hxx index 31a7c2de41c7..b99d476f66e7 100644 --- a/vbahelper/source/msforms/vbapages.hxx +++ b/vbahelper/source/msforms/vbapages.hxx @@ -33,8 +33,8 @@ ov::msforms::XPages > ScVbaPages_BASE; class ScVbaPages : public ScVbaPages_BASE { protected: - virtual rtl::OUString getServiceImplName(); - virtual css::uno::Sequence<rtl::OUString> getServiceNames(); + virtual OUString getServiceImplName(); + virtual css::uno::Sequence<OUString> getServiceNames(); public: ScVbaPages( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xPages ) throw ( css::lang::IllegalArgumentException ); virtual ~ScVbaPages() {} diff --git a/vbahelper/source/msforms/vbaprogressbar.cxx b/vbahelper/source/msforms/vbaprogressbar.cxx index 9fada13b5f26..3cea4efe5f9f 100644 --- a/vbahelper/source/msforms/vbaprogressbar.cxx +++ b/vbahelper/source/msforms/vbaprogressbar.cxx @@ -23,7 +23,7 @@ using namespace com::sun::star; using namespace ooo::vba; // uno servicename com.sun.star.awt.UnoControlProgressBarMode -const rtl::OUString SVALUE( RTL_CONSTASCII_USTRINGPARAM("ProgressValue") ); +const OUString SVALUE( "ProgressValue" ); ScVbaProgressBar::ScVbaProgressBar( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ProgressBarImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper ) { @@ -42,20 +42,20 @@ ScVbaProgressBar::setValue( const uno::Any& _value ) throw (::com::sun::star::un m_xProps->setPropertyValue( SVALUE, _value ); } -rtl::OUString +OUString ScVbaProgressBar::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaProgressBar")); + return OUString( "ScVbaProgressBar" ); } -uno::Sequence< rtl::OUString > +uno::Sequence< OUString > ScVbaProgressBar::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.Label" ) ); + aServiceNames[ 0 ] = "ooo.vba.msforms.Label"; } return aServiceNames; } diff --git a/vbahelper/source/msforms/vbaprogressbar.hxx b/vbahelper/source/msforms/vbaprogressbar.hxx index 76cae706d270..599684b71b6f 100644 --- a/vbahelper/source/msforms/vbaprogressbar.hxx +++ b/vbahelper/source/msforms/vbaprogressbar.hxx @@ -35,10 +35,10 @@ public: virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException); virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException); //XHelperInterface - virtual rtl::OUString getServiceImplName(); - virtual css::uno::Sequence<rtl::OUString> getServiceNames(); + virtual OUString getServiceImplName(); + virtual css::uno::Sequence<OUString> getServiceNames(); // XDefaultProperty - rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString("Value"); } + OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return OUString("Value"); } }; #endif //SC_VBA_LABEL_HXX diff --git a/vbahelper/source/msforms/vbaradiobutton.cxx b/vbahelper/source/msforms/vbaradiobutton.cxx index ded689155dbf..10dabf8c8abe 100644 --- a/vbahelper/source/msforms/vbaradiobutton.cxx +++ b/vbahelper/source/msforms/vbaradiobutton.cxx @@ -24,23 +24,23 @@ using namespace com::sun::star; using namespace ooo::vba; -const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") ); -const static rtl::OUString STATE( RTL_CONSTASCII_USTRINGPARAM("State") ); +const static OUString LABEL( "Label" ); +const static OUString STATE( "State" ); ScVbaRadioButton::ScVbaRadioButton( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : RadioButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper ) { } // Attributes -rtl::OUString SAL_CALL +OUString SAL_CALL ScVbaRadioButton::getCaption() throw (css::uno::RuntimeException) { - rtl::OUString Label; + OUString Label; m_xProps->getPropertyValue( LABEL ) >>= Label; return Label; } void SAL_CALL -ScVbaRadioButton::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException) +ScVbaRadioButton::setCaption( const OUString& _caption ) throw (::com::sun::star::uno::RuntimeException) { m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) ); } @@ -94,20 +94,20 @@ uno::Reference< msforms::XNewFont > SAL_CALL ScVbaRadioButton::getFont() throw ( return new VbaNewFont( this, mxContext, m_xProps ); } -rtl::OUString +OUString ScVbaRadioButton::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaRadioButton")); + return OUString( "ScVbaRadioButton" ); } -uno::Sequence< rtl::OUString > +uno::Sequence< OUString > ScVbaRadioButton::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.RadioButton" ) ); + aServiceNames[ 0 ] = "ooo.vba.msforms.RadioButton"; } return aServiceNames; } diff --git a/vbahelper/source/msforms/vbaradiobutton.hxx b/vbahelper/source/msforms/vbaradiobutton.hxx index f61c4e5d69b5..f485935c3e63 100644 --- a/vbahelper/source/msforms/vbaradiobutton.hxx +++ b/vbahelper/source/msforms/vbaradiobutton.hxx @@ -30,16 +30,16 @@ class ScVbaRadioButton : public RadioButtonImpl_BASE public: ScVbaRadioButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper ); // Attributes - virtual rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException); - virtual void SAL_CALL setCaption( const rtl::OUString& _caption ) throw (css::uno::RuntimeException); + virtual OUString SAL_CALL getCaption() throw (css::uno::RuntimeException); + virtual void SAL_CALL setCaption( const OUString& _caption ) throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException); virtual void SAL_CALL setValue(const com::sun::star::uno::Any&) throw (css::uno::RuntimeException); virtual css::uno::Reference< ov::msforms::XNewFont > SAL_CALL getFont() throw (css::uno::RuntimeException); //XHelperInterface - virtual rtl::OUString getServiceImplName(); - virtual css::uno::Sequence<rtl::OUString> getServiceNames(); + virtual OUString getServiceImplName(); + virtual css::uno::Sequence<OUString> getServiceNames(); // XDefaultProperty - rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString("Value"); } + OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return OUString("Value"); } }; #endif //SC_VBA_RADIOBUTTON_HXX diff --git a/vbahelper/source/msforms/vbascrollbar.cxx b/vbahelper/source/msforms/vbascrollbar.cxx index bcd51ecc1669..94def0f3e7f3 100644 --- a/vbahelper/source/msforms/vbascrollbar.cxx +++ b/vbahelper/source/msforms/vbascrollbar.cxx @@ -23,11 +23,11 @@ using namespace com::sun::star; using namespace ooo::vba; -const static rtl::OUString LARGECHANGE( RTL_CONSTASCII_USTRINGPARAM("BlockIncrement") ); -const static rtl::OUString SMALLCHANGE( RTL_CONSTASCII_USTRINGPARAM("LineIncrement") ); -const static rtl::OUString SCROLLVALUE( RTL_CONSTASCII_USTRINGPARAM("ScrollValue") ); -const static rtl::OUString SCROLLMAX( RTL_CONSTASCII_USTRINGPARAM("ScrollValueMax") ); -const static rtl::OUString SCROLLMIN( RTL_CONSTASCII_USTRINGPARAM("ScrollValueMin") ); +const static OUString LARGECHANGE( "BlockIncrement"); +const static OUString SMALLCHANGE( "LineIncrement"); +const static OUString SCROLLVALUE( "ScrollValue"); +const static OUString SCROLLMAX( "ScrollValueMax"); +const static OUString SCROLLMIN( "ScrollValueMin"); ScVbaScrollBar::ScVbaScrollBar( const css::uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ScrollBarImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper ) { @@ -102,20 +102,20 @@ ScVbaScrollBar::setSmallChange( ::sal_Int32 _smallchange ) throw (uno::RuntimeEx m_xProps->setPropertyValue( SMALLCHANGE, uno::makeAny( _smallchange ) ); } -rtl::OUString +OUString ScVbaScrollBar::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaScrollBar")); + return OUString("ScVbaScrollBar" ); } -uno::Sequence< rtl::OUString > +uno::Sequence< OUString > ScVbaScrollBar::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.Frame" ) ); + aServiceNames[ 0 ] = "ooo.vba.msforms.Frame"; } return aServiceNames; } diff --git a/vbahelper/source/msforms/vbascrollbar.hxx b/vbahelper/source/msforms/vbascrollbar.hxx index 9d703c822856..cca7d771d03f 100644 --- a/vbahelper/source/msforms/vbascrollbar.hxx +++ b/vbahelper/source/msforms/vbascrollbar.hxx @@ -44,8 +44,8 @@ public: //XHelperInterface - virtual rtl::OUString getServiceImplName(); - virtual css::uno::Sequence<rtl::OUString> getServiceNames(); + virtual OUString getServiceImplName(); + virtual css::uno::Sequence<OUString> getServiceNames(); }; #endif //SC_VBA_LABEL_HXX diff --git a/vbahelper/source/msforms/vbaspinbutton.cxx b/vbahelper/source/msforms/vbaspinbutton.cxx index 6a8cd81f8cc2..9ee85daca545 100644 --- a/vbahelper/source/msforms/vbaspinbutton.cxx +++ b/vbahelper/source/msforms/vbaspinbutton.cxx @@ -23,9 +23,9 @@ using namespace com::sun::star; using namespace ooo::vba; -const static rtl::OUString SPINVALUE( RTL_CONSTASCII_USTRINGPARAM("SpinValue") ); -const static rtl::OUString SPINMAX( RTL_CONSTASCII_USTRINGPARAM("SpinValueMax") ); -const static rtl::OUString SPINMIN( RTL_CONSTASCII_USTRINGPARAM("SpinValueMin") ); +const static OUString SPINVALUE( "SpinValue" ); +const static OUString SPINMAX( "SpinValueMax" ); +const static OUString SPINMIN( "SpinValueMin" ); ScVbaSpinButton::ScVbaSpinButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : SpinButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper ) { @@ -72,20 +72,20 @@ ScVbaSpinButton::setMin( sal_Int32 nVal ) throw (uno::RuntimeException) m_xProps->setPropertyValue( SPINMIN, uno::makeAny( nVal ) ); } -rtl::OUString +OUString ScVbaSpinButton::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaSpinButton")); + return OUString( "ScVbaSpinButton" ); } -uno::Sequence< rtl::OUString > +uno::Sequence< OUString > ScVbaSpinButton::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.Frame" ) ); + aServiceNames[ 0 ] = "ooo.vba.msforms.Frame"; } return aServiceNames; } diff --git a/vbahelper/source/msforms/vbaspinbutton.hxx b/vbahelper/source/msforms/vbaspinbutton.hxx index f3b07f35da81..ecb7f2e9709e 100644 --- a/vbahelper/source/msforms/vbaspinbutton.hxx +++ b/vbahelper/source/msforms/vbaspinbutton.hxx @@ -39,8 +39,8 @@ public: virtual void SAL_CALL setMin( ::sal_Int32 _min ) throw (css::uno::RuntimeException); //XHelperInterface - virtual rtl::OUString getServiceImplName(); - virtual css::uno::Sequence<rtl::OUString> getServiceNames(); + virtual OUString getServiceImplName(); + virtual css::uno::Sequence<OUString> getServiceNames(); }; #endif //SC_VBA_SPINBUTTON_HXX diff --git a/vbahelper/source/msforms/vbasystemaxcontrol.cxx b/vbahelper/source/msforms/vbasystemaxcontrol.cxx index 37ddb23f120e..84ac5ebcbb73 100644 --- a/vbahelper/source/msforms/vbasystemaxcontrol.cxx +++ b/vbahelper/source/msforms/vbasystemaxcontrol.cxx @@ -36,56 +36,56 @@ uno::Reference< beans::XIntrospectionAccess > SAL_CALL VbaSystemAXControl::getIn } //---------------------------------------------------------- -uno::Any SAL_CALL VbaSystemAXControl::invoke( const ::rtl::OUString& aFunctionName, const uno::Sequence< uno::Any >& aParams, uno::Sequence< ::sal_Int16 >& aOutParamIndex, uno::Sequence< uno::Any >& aOutParam ) +uno::Any SAL_CALL VbaSystemAXControl::invoke( const OUString& aFunctionName, const uno::Sequence< uno::Any >& aParams, uno::Sequence< ::sal_Int16 >& aOutParamIndex, uno::Sequence< uno::Any >& aOutParam ) throw ( lang::IllegalArgumentException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException ) { return m_xControlInvocation->invoke( aFunctionName, aParams, aOutParamIndex, aOutParam ); } //---------------------------------------------------------- -void SAL_CALL VbaSystemAXControl::setValue( const ::rtl::OUString& aPropertyName, const uno::Any& aValue ) +void SAL_CALL VbaSystemAXControl::setValue( const OUString& aPropertyName, const uno::Any& aValue ) throw ( beans::UnknownPropertyException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException ) { m_xControlInvocation->setValue( aPropertyName, aValue ); } //---------------------------------------------------------- -uno::Any SAL_CALL VbaSystemAXControl::getValue( const ::rtl::OUString& aPropertyName ) +uno::Any SAL_CALL VbaSystemAXControl::getValue( const OUString& aPropertyName ) throw ( beans::UnknownPropertyException, uno::RuntimeException ) { return m_xControlInvocation->getValue( aPropertyName ); } //---------------------------------------------------------- -::sal_Bool SAL_CALL VbaSystemAXControl::hasMethod( const ::rtl::OUString& aName ) +::sal_Bool SAL_CALL VbaSystemAXControl::hasMethod( const OUString& aName ) throw ( uno::RuntimeException ) { return m_xControlInvocation->hasMethod( aName ); } //---------------------------------------------------------- -::sal_Bool SAL_CALL VbaSystemAXControl::hasProperty( const ::rtl::OUString& aName ) +::sal_Bool SAL_CALL VbaSystemAXControl::hasProperty( const OUString& aName ) throw ( uno::RuntimeException ) { return m_xControlInvocation->hasProperty( aName ); } //---------------------------------------------------------- -rtl::OUString +OUString VbaSystemAXControl::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VbaSystemAXControl")); + return OUString( "VbaSystemAXControl" ); } //---------------------------------------------------------- -uno::Sequence< rtl::OUString > +uno::Sequence< OUString > VbaSystemAXControl::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.Frame" ) ); + aServiceNames[ 0 ] = "ooo.vba.msforms.Frame"; } return aServiceNames; } diff --git a/vbahelper/source/msforms/vbasystemaxcontrol.hxx b/vbahelper/source/msforms/vbasystemaxcontrol.hxx index 44d654c59820..561aae3dbda8 100644 --- a/vbahelper/source/msforms/vbasystemaxcontrol.hxx +++ b/vbahelper/source/msforms/vbasystemaxcontrol.hxx @@ -36,15 +36,15 @@ public: // XInvocation virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XIntrospectionAccess > SAL_CALL getIntrospection( ) throw ( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Any SAL_CALL invoke( const ::rtl::OUString& aFunctionName, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aParams, ::com::sun::star::uno::Sequence< ::sal_Int16 >& aOutParamIndex, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aOutParam ) throw ( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::script::CannotConvertException, ::com::sun::star::reflection::InvocationTargetException, ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL setValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw ( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::script::CannotConvertException, ::com::sun::star::reflection::InvocationTargetException, ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Any SAL_CALL getValue( const ::rtl::OUString& aPropertyName ) throw ( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException ); - virtual ::sal_Bool SAL_CALL hasMethod( const ::rtl::OUString& aName ) throw ( ::com::sun::star::uno::RuntimeException ); - virtual ::sal_Bool SAL_CALL hasProperty( const ::rtl::OUString& aName ) throw ( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Any SAL_CALL invoke( const OUString& aFunctionName, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aParams, ::com::sun::star::uno::Sequence< ::sal_Int16 >& aOutParamIndex, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aOutParam ) throw ( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::script::CannotConvertException, ::com::sun::star::reflection::InvocationTargetException, ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setValue( const OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw ( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::script::CannotConvertException, ::com::sun::star::reflection::InvocationTargetException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Any SAL_CALL getValue( const OUString& aPropertyName ) throw ( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException ); + virtual ::sal_Bool SAL_CALL hasMethod( const OUString& aName ) throw ( ::com::sun::star::uno::RuntimeException ); + virtual ::sal_Bool SAL_CALL hasProperty( const OUString& aName ) throw ( ::com::sun::star::uno::RuntimeException ); //XHelperInterface - virtual rtl::OUString getServiceImplName(); - virtual css::uno::Sequence<rtl::OUString> getServiceNames(); + virtual OUString getServiceImplName(); + virtual css::uno::Sequence<OUString> getServiceNames(); }; #endif 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; } diff --git a/vbahelper/source/msforms/vbatogglebutton.cxx b/vbahelper/source/msforms/vbatogglebutton.cxx index f80aa40dd50c..f0d9eefd5966 100644 --- a/vbahelper/source/msforms/vbatogglebutton.cxx +++ b/vbahelper/source/msforms/vbatogglebutton.cxx @@ -24,9 +24,9 @@ using namespace com::sun::star; using namespace ooo::vba; -const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") ); -const static rtl::OUString TOGGLE( RTL_CONSTASCII_USTRINGPARAM("Toggle") ); -const static rtl::OUString STATE( RTL_CONSTASCII_USTRINGPARAM("State") ); +const static OUString LABEL( "Label" ); +const static OUString TOGGLE( "Toggle" ); +const static OUString STATE( "State" ); ScVbaToggleButton::ScVbaToggleButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper ) : ToggleButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper ) { OSL_TRACE("ScVbaToggleButton(ctor)"); @@ -39,16 +39,16 @@ ScVbaToggleButton::~ScVbaToggleButton() } // Attributes -rtl::OUString SAL_CALL +OUString SAL_CALL ScVbaToggleButton::getCaption() throw (css::uno::RuntimeException) { - rtl::OUString Label; + OUString Label; m_xProps->getPropertyValue( LABEL ) >>= Label; return Label; } void SAL_CALL -ScVbaToggleButton::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException) +ScVbaToggleButton::setCaption( const OUString& _caption ) throw (::com::sun::star::uno::RuntimeException) { m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) ); } @@ -156,20 +156,20 @@ void SAL_CALL ScVbaToggleButton::setLocked( sal_Bool bLocked ) throw (uno::Runti ScVbaControl::setLocked( bLocked ); } -rtl::OUString +OUString ScVbaToggleButton::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaToggleButton")); + return OUString( "ScVbaToggleButton" ); } -uno::Sequence< rtl::OUString > +uno::Sequence< OUString > ScVbaToggleButton::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.ToggleButton" ) ); + aServiceNames[ 0 ] = "ooo.vba.msforms.ToggleButton"; } return aServiceNames; } diff --git a/vbahelper/source/msforms/vbatogglebutton.hxx b/vbahelper/source/msforms/vbatogglebutton.hxx index 39c3f45b7755..f136cdf5913a 100644 --- a/vbahelper/source/msforms/vbatogglebutton.hxx +++ b/vbahelper/source/msforms/vbatogglebutton.hxx @@ -28,15 +28,15 @@ typedef cppu::ImplInheritanceHelper2< ScVbaControl, ov::msforms::XToggleButton, class ScVbaToggleButton : public ToggleButtonImpl_BASE { - rtl::OUString msDftPropName; + OUString msDftPropName; public: ScVbaToggleButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper ); ~ScVbaToggleButton(); // Attributes virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException); virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException); - virtual rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException); - virtual void SAL_CALL setCaption( const rtl::OUString& _caption ) throw (css::uno::RuntimeException); + virtual OUString SAL_CALL getCaption() throw (css::uno::RuntimeException); + virtual void SAL_CALL setCaption( const OUString& _caption ) throw (css::uno::RuntimeException); virtual sal_Bool SAL_CALL getAutoSize() throw (css::uno::RuntimeException); virtual void SAL_CALL setAutoSize( sal_Bool bAutoSize ) throw (css::uno::RuntimeException); virtual sal_Bool SAL_CALL getCancel() throw (css::uno::RuntimeException); @@ -51,10 +51,10 @@ public: virtual void SAL_CALL setLocked( sal_Bool bAutoSize ) throw (css::uno::RuntimeException); virtual css::uno::Reference< ov::msforms::XNewFont > SAL_CALL getFont() throw (css::uno::RuntimeException); //XHelperInterface - virtual rtl::OUString getServiceImplName(); - virtual css::uno::Sequence<rtl::OUString> getServiceNames(); + virtual OUString getServiceImplName(); + virtual css::uno::Sequence<OUString> getServiceNames(); // XDefaultProperty - rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString("Value"); } + OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return OUString("Value"); } }; #endif //SC_VBA_TOGGLEBUTTON_HXX diff --git a/vbahelper/source/msforms/vbauserform.cxx b/vbahelper/source/msforms/vbauserform.cxx index b8775ea5fdb0..a55f55d79556 100644 --- a/vbahelper/source/msforms/vbauserform.cxx +++ b/vbahelper/source/msforms/vbauserform.cxx @@ -100,15 +100,15 @@ ScVbaUserForm::Show( ) throw (uno::RuntimeException) } } -rtl::OUString SAL_CALL +OUString SAL_CALL ScVbaUserForm::getCaption() throw (uno::RuntimeException) { - rtl::OUString sCaption; + OUString sCaption; m_xProps->getPropertyValue( "Title" ) >>= sCaption; return sCaption; } void -ScVbaUserForm::setCaption( const ::rtl::OUString& _caption ) throw (uno::RuntimeException) +ScVbaUserForm::setCaption( const OUString& _caption ) throw (uno::RuntimeException) { m_xProps->setPropertyValue( "Title", uno::makeAny( _caption ) ); } @@ -170,16 +170,16 @@ ScVbaUserForm::UnloadObject( ) throw (uno::RuntimeException) m_xDialog->endExecute(); } -rtl::OUString +OUString ScVbaUserForm::getServiceImplName() { - return rtl::OUString("ScVbaUserForm"); + return OUString("ScVbaUserForm"); } -uno::Sequence< rtl::OUString > +uno::Sequence< OUString > ScVbaUserForm::getServiceNames() { - static uno::Sequence< rtl::OUString > aServiceNames; + static uno::Sequence< OUString > aServiceNames; if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); @@ -195,13 +195,13 @@ ScVbaUserForm::getIntrospection( ) throw (uno::RuntimeException) } uno::Any SAL_CALL -ScVbaUserForm::invoke( const ::rtl::OUString& /*aFunctionName*/, const uno::Sequence< uno::Any >& /*aParams*/, uno::Sequence< ::sal_Int16 >& /*aOutParamIndex*/, uno::Sequence< uno::Any >& /*aOutParam*/ ) throw (lang::IllegalArgumentException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException) +ScVbaUserForm::invoke( const OUString& /*aFunctionName*/, const uno::Sequence< uno::Any >& /*aParams*/, uno::Sequence< ::sal_Int16 >& /*aOutParamIndex*/, uno::Sequence< uno::Any >& /*aOutParam*/ ) throw (lang::IllegalArgumentException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException) { throw uno::RuntimeException(); // unsupported operation } void SAL_CALL -ScVbaUserForm::setValue( const ::rtl::OUString& aPropertyName, const uno::Any& aValue ) throw (beans::UnknownPropertyException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException) +ScVbaUserForm::setValue( const OUString& aPropertyName, const uno::Any& aValue ) throw (beans::UnknownPropertyException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException) { uno::Any aObject = getValue( aPropertyName ); @@ -213,7 +213,7 @@ ScVbaUserForm::setValue( const ::rtl::OUString& aPropertyName, const uno::Any& a // e.g. Userform1.aControl = something // 'aControl' has to support XDefaultProperty to make sense here uno::Reference< script::XDefaultProperty > xDfltProp( aObject, uno::UNO_QUERY_THROW ); - rtl::OUString aDfltPropName = xDfltProp->getDefaultPropertyName(); + OUString aDfltPropName = xDfltProp->getDefaultPropertyName(); uno::Reference< beans::XIntrospectionAccess > xUnoAccess( getIntrospectionAccess( aObject ) ); uno::Reference< beans::XPropertySet > xPropSet( xUnoAccess->queryAdapter( ::getCppuType( (const uno::Reference< beans::XPropertySet > *)0 ) ), uno::UNO_QUERY_THROW ); xPropSet->setPropertyValue( aDfltPropName, aValue ); @@ -221,7 +221,7 @@ ScVbaUserForm::setValue( const ::rtl::OUString& aPropertyName, const uno::Any& a } uno::Reference< awt::XControl > -ScVbaUserForm::nestedSearch( const rtl::OUString& aPropertyName, uno::Reference< awt::XControlContainer >& xContainer ) +ScVbaUserForm::nestedSearch( const OUString& aPropertyName, uno::Reference< awt::XControlContainer >& xContainer ) { uno::Reference< awt::XControl > xControl = xContainer->getControl( aPropertyName ); if ( !xControl.is() ) @@ -245,7 +245,7 @@ ScVbaUserForm::nestedSearch( const rtl::OUString& aPropertyName, uno::Reference< } uno::Any SAL_CALL -ScVbaUserForm::getValue( const ::rtl::OUString& aPropertyName ) throw (beans::UnknownPropertyException, uno::RuntimeException) +ScVbaUserForm::getValue( const OUString& aPropertyName ) throw (beans::UnknownPropertyException, uno::RuntimeException) { uno::Any aResult; @@ -261,7 +261,7 @@ ScVbaUserForm::getValue( const ::rtl::OUString& aPropertyName ) throw (beans::Un uno::Reference< msforms::XControl > xVBAControl = ScVbaControlFactory::createUserformControl( mxContext, xControl, xDialogControl, m_xModel, mpGeometryHelper->getOffsetX(), mpGeometryHelper->getOffsetY() ); ScVbaControl* pControl = dynamic_cast< ScVbaControl* >( xVBAControl.get() ); if ( !m_sLibName.isEmpty() ) - pControl->setLibraryAndCodeName( m_sLibName.concat( rtl::OUString( "." ) ).concat( getName() ) ); + pControl->setLibraryAndCodeName( m_sLibName.concat( "." ).concat( getName() ) ); aResult = uno::makeAny( xVBAControl ); } } @@ -270,7 +270,7 @@ ScVbaUserForm::getValue( const ::rtl::OUString& aPropertyName ) throw (beans::Un } ::sal_Bool SAL_CALL -ScVbaUserForm::hasMethod( const ::rtl::OUString& /*aName*/ ) throw (uno::RuntimeException) +ScVbaUserForm::hasMethod( const OUString& /*aName*/ ) throw (uno::RuntimeException) { return sal_False; } @@ -287,19 +287,19 @@ ScVbaUserForm::Controls( const uno::Any& index ) throw (uno::RuntimeException) } ::sal_Bool SAL_CALL -ScVbaUserForm::hasProperty( const ::rtl::OUString& aName ) throw (uno::RuntimeException) +ScVbaUserForm::hasProperty( const OUString& aName ) throw (uno::RuntimeException) { uno::Reference< awt::XControl > xControl( m_xDialog, uno::UNO_QUERY ); - OSL_TRACE("ScVbaUserForm::hasProperty(%s) %d", rtl::OUStringToOString( aName, RTL_TEXTENCODING_UTF8 ).getStr(), xControl.is() ); + OSL_TRACE("ScVbaUserForm::hasProperty(%s) %d", OUStringToOString( aName, RTL_TEXTENCODING_UTF8 ).getStr(), xControl.is() ); if ( xControl.is() ) { uno::Reference< beans::XPropertySet > xDlgProps( xControl->getModel(), uno::UNO_QUERY ); if ( xDlgProps.is() ) { - uno::Reference< container::XNameContainer > xAllChildren( xDlgProps->getPropertyValue( rtl::OUString("AllDialogChildren") ), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameContainer > xAllChildren( xDlgProps->getPropertyValue( "AllDialogChildren" ), uno::UNO_QUERY_THROW ); sal_Bool bRes = xAllChildren->hasByName( aName ); - OSL_TRACE("ScVbaUserForm::hasProperty(%s) %d ---> %d", rtl::OUStringToOString( aName, RTL_TEXTENCODING_UTF8 ).getStr(), xAllChildren.is(), bRes ); + OSL_TRACE("ScVbaUserForm::hasProperty(%s) %d ---> %d", OUStringToOString( aName, RTL_TEXTENCODING_UTF8 ).getStr(), xAllChildren.is(), bRes ); return bRes; } } diff --git a/vbahelper/source/msforms/vbauserform.hxx b/vbahelper/source/msforms/vbauserform.hxx index 5fc0567f1b49..7ed74ea7fd52 100644 --- a/vbahelper/source/msforms/vbauserform.hxx +++ b/vbahelper/source/msforms/vbauserform.hxx @@ -36,21 +36,21 @@ class ScVbaUserForm : public ScVbaUserForm_BASE private: css::uno::Reference< css::awt::XDialog > m_xDialog; bool mbDispose; - rtl::OUString m_sLibName; + OUString m_sLibName; protected: public: ScVbaUserForm( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext ) throw ( css::lang::IllegalArgumentException ); virtual ~ScVbaUserForm(); - static css::uno::Reference< css::awt::XControl > nestedSearch( const rtl::OUString& aPropertyName, css::uno::Reference< css::awt::XControlContainer >& xContainer ); + static css::uno::Reference< css::awt::XControl > nestedSearch( const OUString& aPropertyName, css::uno::Reference< css::awt::XControlContainer >& xContainer ); virtual sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException); virtual void SAL_CALL setVisible( sal_Bool _visible ) throw (css::uno::RuntimeException); // XUserForm virtual void SAL_CALL RePaint( ) throw (css::uno::RuntimeException); virtual void SAL_CALL Show( ) throw (css::uno::RuntimeException); - virtual void SAL_CALL setValue( const ::rtl::OUString& aPropertyName, const css::uno::Any& aValue ) throw (css::beans::UnknownPropertyException, css::script::CannotConvertException, css::reflection::InvocationTargetException, css::uno::RuntimeException); - virtual css::uno::Any SAL_CALL getValue( const ::rtl::OUString& aPropertyName ) throw (css::beans::UnknownPropertyException, css::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getCaption() throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setCaption( const ::rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setValue( const OUString& aPropertyName, const css::uno::Any& aValue ) throw (css::beans::UnknownPropertyException, css::script::CannotConvertException, css::reflection::InvocationTargetException, css::uno::RuntimeException); + virtual css::uno::Any SAL_CALL getValue( const OUString& aPropertyName ) throw (css::beans::UnknownPropertyException, css::uno::RuntimeException); + virtual OUString SAL_CALL getCaption() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setCaption( const OUString& _caption ) throw (::com::sun::star::uno::RuntimeException); virtual double SAL_CALL getInnerWidth() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setInnerWidth( double fInnerWidth ) throw (::com::sun::star::uno::RuntimeException); virtual double SAL_CALL getInnerHeight() throw (::com::sun::star::uno::RuntimeException); @@ -60,12 +60,12 @@ public: virtual css::uno::Any SAL_CALL Controls( const css::uno::Any& index ) throw (css::uno::RuntimeException); // XIntrospection virtual css::uno::Reference< css::beans::XIntrospectionAccess > SAL_CALL getIntrospection( ) throw (css::uno::RuntimeException); - virtual css::uno::Any SAL_CALL invoke( const ::rtl::OUString& aFunctionName, const css::uno::Sequence< css::uno::Any >& aParams, css::uno::Sequence< ::sal_Int16 >& aOutParamIndex, css::uno::Sequence< css::uno::Any >& aOutParam ) throw (css::lang::IllegalArgumentException, css::script::CannotConvertException, css::reflection::InvocationTargetException, css::uno::RuntimeException); - virtual ::sal_Bool SAL_CALL hasMethod( const ::rtl::OUString& aName ) throw (css::uno::RuntimeException); - virtual ::sal_Bool SAL_CALL hasProperty( const ::rtl::OUString& aName ) throw (css::uno::RuntimeException); + virtual css::uno::Any SAL_CALL invoke( const OUString& aFunctionName, const css::uno::Sequence< css::uno::Any >& aParams, css::uno::Sequence< ::sal_Int16 >& aOutParamIndex, css::uno::Sequence< css::uno::Any >& aOutParam ) throw (css::lang::IllegalArgumentException, css::script::CannotConvertException, css::reflection::InvocationTargetException, css::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL hasMethod( const OUString& aName ) throw (css::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL hasProperty( const OUString& aName ) throw (css::uno::RuntimeException); //XHelperInterface - virtual rtl::OUString getServiceImplName(); - virtual css::uno::Sequence<rtl::OUString> getServiceNames(); + virtual OUString getServiceImplName(); + virtual css::uno::Sequence<OUString> getServiceNames(); }; #endif |