From 8b27d78b4afaa9c47ca0fda144c8060f2f14046b Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Tue, 19 Mar 2013 09:22:44 +0100 Subject: automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings Done with a perl regex: s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms Change-Id: Idf28320817cdcbea6d0f7ec06a9bf51bd2c3b3ec Reviewed-on: https://gerrit.libreoffice.org/2832 Reviewed-by: Thomas Arnhold Tested-by: Thomas Arnhold --- toolkit/source/awt/vclxwindows.cxx | 2 +- toolkit/source/controls/tabpagemodel.cxx | 12 ++++++------ toolkit/source/controls/unocontrolcontainer.cxx | 12 ++++++------ toolkit/source/helper/formpdfexport.cxx | 12 ++++++------ 4 files changed, 19 insertions(+), 19 deletions(-) (limited to 'toolkit') diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index 1163e5d9903c..0eb97e2e345c 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -4615,7 +4615,7 @@ void SAL_CALL VCLXComboBox::itemListChanged( const EventObject& i_rEvent ) throw uno::Reference< beans::XPropertySet > xPropSet( i_rEvent.Source, uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySetInfo > xPSI( xPropSet->getPropertySetInfo(), uno::UNO_QUERY_THROW ); - // bool localize = xPSI->hasPropertyByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ResourceResolver" ) ) ); + // bool localize = xPSI->hasPropertyByName( ::rtl::OUString( "ResourceResolver" ) ); uno::Reference< resource::XStringResourceResolver > xStringResourceResolver; if ( xPSI->hasPropertyByName( ::rtl::OUString( "ResourceResolver" ) ) ) { diff --git a/toolkit/source/controls/tabpagemodel.cxx b/toolkit/source/controls/tabpagemodel.cxx index e07c4edcce74..0f5d3ea3bd8d 100644 --- a/toolkit/source/controls/tabpagemodel.cxx +++ b/toolkit/source/controls/tabpagemodel.cxx @@ -169,7 +169,7 @@ void SAL_CALL UnoControlTabPageModel::initialize (const Sequence& rArgument //===== Service =============================================================== ::rtl::OUString UnoControlTabPageModel_getImplementationName (void) throw(RuntimeException) { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.tab.UnoControlTabPageModel")); + return rtl::OUString("com.sun.star.awt.tab.UnoControlTabPageModel"); } Sequence SAL_CALL UnoControlTabPageModel_getSupportedServiceNames (void) @@ -195,7 +195,7 @@ UnoControlTabPage::~UnoControlTabPage() ::rtl::OUString UnoControlTabPage::GetComponentServiceName() { - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TabPageModel")); + return ::rtl::OUString("TabPageModel"); } void UnoControlTabPage::dispose() throw(RuntimeException) @@ -265,8 +265,8 @@ throw (::com::sun::star::uno::RuntimeException) Sequence< rtl::OUString > aProps( 2 ); Sequence< Any > aValues( 2 ); // Properties in a sequence must be sorted! - aProps[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Height" )); - aProps[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Width" )); + aProps[0] = rtl::OUString( "Height" ); + aProps[1] = rtl::OUString( "Width" ); aValues[0] <<= aAppFontSize.Height(); aValues[1] <<= aAppFontSize.Width(); @@ -292,8 +292,8 @@ throw (::com::sun::star::uno::RuntimeException) mbPosModified = true; Sequence< rtl::OUString > aProps( 2 ); Sequence< Any > aValues( 2 ); - aProps[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PositionX" )); - aProps[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PositionY" )); + aProps[0] = rtl::OUString( "PositionX" ); + aProps[1] = rtl::OUString( "PositionY" ); aValues[0] <<= aTmp.Width(); aValues[1] <<= aTmp.Height(); diff --git a/toolkit/source/controls/unocontrolcontainer.cxx b/toolkit/source/controls/unocontrolcontainer.cxx index d228b2e7e050..5e6c64b056cc 100644 --- a/toolkit/source/controls/unocontrolcontainer.cxx +++ b/toolkit/source/controls/unocontrolcontainer.cxx @@ -289,7 +289,7 @@ UnoControlHolderList::ControlIdentifier UnoControlHolderList::impl_getFreeIdenti if ( existent == maControls.end() ) return candidateId; } - throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "out of identifiers" ) ), NULL ); + throw uno::RuntimeException( ::rtl::OUString( "out of identifiers" ), NULL ); } //------------------------------------------------------------------------ @@ -308,7 +308,7 @@ UnoControlHolderList::ControlIdentifier UnoControlHolderList::impl_getFreeIdenti if ( loop == maControls.end() ) return candidateName; } - throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "out of identifiers" ) ), NULL ); + throw uno::RuntimeException( ::rtl::OUString( "out of identifiers" ), NULL ); } // ---------------------------------------------------- // Function to set the controls' visibility according @@ -494,7 +494,7 @@ void UnoControlContainer::removeContainerListener( const uno::Reference< contain uno::Reference< awt::XControl > xControl; if ( !( _rElement >>= xControl ) || !xControl.is() ) throw lang::IllegalArgumentException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Elements must support the XControl interface." ) ), + ::rtl::OUString( "Elements must support the XControl interface." ), *this, 1 ); @@ -509,7 +509,7 @@ void SAL_CALL UnoControlContainer::removeByIdentifier( ::sal_Int32 _nIdentifier uno::Reference< awt::XControl > xControl; if ( !mpControls->getControlForIdentifier( _nIdentifier, xControl ) ) throw container::NoSuchElementException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "There is no element with the given identifier." ) ), + ::rtl::OUString( "There is no element with the given identifier." ), *this ); @@ -523,14 +523,14 @@ void SAL_CALL UnoControlContainer::replaceByIdentifer( ::sal_Int32 _nIdentifier, uno::Reference< awt::XControl > xExistentControl; if ( !mpControls->getControlForIdentifier( _nIdentifier, xExistentControl ) ) throw container::NoSuchElementException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "There is no element with the given identifier." ) ), + ::rtl::OUString( "There is no element with the given identifier." ), *this ); uno::Reference< awt::XControl > xNewControl; if ( !( _rElement >>= xNewControl ) ) throw lang::IllegalArgumentException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Elements must support the XControl interface." ) ), + ::rtl::OUString( "Elements must support the XControl interface." ), *this, 1 ); diff --git a/toolkit/source/helper/formpdfexport.cxx b/toolkit/source/helper/formpdfexport.cxx index f8579d57e192..70a29ffc9bde 100644 --- a/toolkit/source/helper/formpdfexport.cxx +++ b/toolkit/source/helper/formpdfexport.cxx @@ -458,7 +458,7 @@ namespace toolkitform { ::vcl::PDFWriter::PushButtonWidget* pButtonWidget = static_cast< ::vcl::PDFWriter::PushButtonWidget* >( _rpDescriptor.get() ); FormButtonType eButtonType = FormButtonType_PUSH; - OSL_VERIFY( xModelProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ButtonType" ) ) ) >>= eButtonType ); + OSL_VERIFY( xModelProps->getPropertyValue( ::rtl::OUString( "ButtonType" ) ) >>= eButtonType ); static const ::rtl::OUString FM_PROP_TARGET_URL(RTL_CONSTASCII_USTRINGPARAM("TargetURL")); if ( eButtonType == FormButtonType_SUBMIT ) { @@ -470,12 +470,12 @@ namespace toolkitform if ( xParentProps.is() ) { Reference< XServiceInfo > xParentSI( xParentProps, UNO_QUERY ); - if ( xParentSI.is() && xParentSI->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.HTMLForm" ) ) ) ) + if ( xParentSI.is() && xParentSI->supportsService( ::rtl::OUString( "com.sun.star.form.component.HTMLForm" ) ) ) { OSL_VERIFY( xParentProps->getPropertyValue( FM_PROP_TARGET_URL ) >>= pButtonWidget->URL ); pButtonWidget->Submit = true; FormSubmitMethod eMethod = FormSubmitMethod_POST; - OSL_VERIFY( xParentProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SubmitMethod" ) ) ) >>= eMethod ); + OSL_VERIFY( xParentProps->getPropertyValue( rtl::OUString( "SubmitMethod" ) ) >>= eMethod ); pButtonWidget->SubmitGet = (eMethod == FormSubmitMethod_GET); } } @@ -543,7 +543,7 @@ namespace toolkitform } catch(...) { - pRadioWidget->OnValue = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "On" ) ); + pRadioWidget->OnValue = rtl::OUString( "On" ); } } @@ -558,7 +558,7 @@ namespace toolkitform OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_DROPDOWN ) >>= pListWidget->DropDown ); // ............................ // multi selection - OSL_VERIFY( xModelProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MultiSelection" ) ) ) >>= pListWidget->MultiSelect ); + OSL_VERIFY( xModelProps->getPropertyValue( ::rtl::OUString( "MultiSelection" ) ) >>= pListWidget->MultiSelect ); // ............................ // entries getStringItemVector( xModelProps, pListWidget->Entries ); @@ -568,7 +568,7 @@ namespace toolkitform // get selected items Sequence< sal_Int16 > aSelectIndices; - OSL_VERIFY( xModelProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SelectedItems" ) ) ) >>= aSelectIndices ); + OSL_VERIFY( xModelProps->getPropertyValue( rtl::OUString( "SelectedItems" ) ) >>= aSelectIndices ); if( aSelectIndices.getLength() > 0 ) { pListWidget->SelectedEntries.resize( 0 ); -- cgit