diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-06-29 21:24:12 +0200 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2013-06-29 21:52:54 +0000 |
commit | ba0a57702cdef7a0389c06841711d7e3079d471c (patch) | |
tree | 223c0dd50de4b71cf7df9d0073f7cacca1f18c8d /forms | |
parent | 8a7ede404ca4980f169c4ce634805ea5c1b6b56e (diff) |
remove OUString wrap for string literals
For some functions and all kinds of Exceptions.
CannotConvertException
CloseVetoException
DisposedException
EmptyUndoStackException
ErrorCodeIOException
Exception
GridInvalidDataException
GridInvalidModelException
IOException
IllegalAccessException
IllegalArgumentException
IllegalTypeException
IndexOutOfBoundsException
NoMasterException
NoSuchElementException
NoSupportException
PropertyVetoException
RuntimeException
SAXException
ScannerException
StorageWrappedTargetException
UnsupportedFlavorException
VetoException
WrappedTargetException
ZipIOException
throwGenericSQLException
throwIllegallArgumentException
createInstance
createInstanceWithContext
forName
getByName
getPackageManager
getPropertyValue
getUnpackedValueOrDefault
getValueByName
hasPropertyByName
openKey
setName
setPropertyValue
supportsService
bash command:
for i in `cat list`; do git grep "$i\s*(\s*OUString(\s*\"" -- '*.[hc]xx'
| cut -d ':' -f1 | sort -u
| xargs sed -i
-e "s/\(\<$i\s*(\)\s*OUString(\s*\(\"[^\")\\]*\"\)\s*)\s*/\1\2/g"
-e "s/\($i.*\)\"+ /\1\" + /g";
done
Change-Id: Iaf8e641b0abf28c082906014f87a183517630535
Reviewed-on: https://gerrit.libreoffice.org/4624
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/component/ComboBox.cxx | 2 | ||||
-rw-r--r-- | forms/source/component/Edit.cxx | 2 | ||||
-rw-r--r-- | forms/source/component/Filter.cxx | 2 | ||||
-rw-r--r-- | forms/source/component/FormattedField.cxx | 4 | ||||
-rw-r--r-- | forms/source/component/ImageControl.cxx | 2 | ||||
-rw-r--r-- | forms/source/component/ListBox.cxx | 4 | ||||
-rw-r--r-- | forms/source/component/clickableimage.cxx | 2 | ||||
-rw-r--r-- | forms/source/misc/InterfaceContainer.cxx | 6 | ||||
-rw-r--r-- | forms/source/runtime/formoperations.cxx | 2 | ||||
-rw-r--r-- | forms/source/xforms/datatyperepository.cxx | 2 |
10 files changed, 14 insertions, 14 deletions
diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx index ed6eff22bead..6e5bb13b1358 100644 --- a/forms/source/component/ComboBox.cxx +++ b/forms/source/component/ComboBox.cxx @@ -522,7 +522,7 @@ void OComboBoxModel::loadData( bool _bForce ) // otherwise look for the alias Reference<XPropertySet> xFormProp(xForm,UNO_QUERY); Reference< XColumnsSupplier > xSupplyFields; - xFormProp->getPropertyValue(OUString("SingleSelectQueryComposer")) >>= xSupplyFields; + xFormProp->getPropertyValue("SingleSelectQueryComposer") >>= xSupplyFields; // search the field DBG_ASSERT(xSupplyFields.is(), "OComboBoxModel::loadData : invalid query composer !"); diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx index 7ed3cbe9326e..2f183b5f96c6 100644 --- a/forms/source/component/Edit.cxx +++ b/forms/source/component/Edit.cxx @@ -620,7 +620,7 @@ void OEditModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm ) if ( !m_bMaxTextLenModified ) { sal_Int32 nFieldLen = 0; - xField->getPropertyValue(OUString("Precision") ) >>= nFieldLen; + xField->getPropertyValue("Precision") >>= nFieldLen; if (nFieldLen && nFieldLen <= USHRT_MAX) { diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx index e7775267abb9..71f063b08834 100644 --- a/forms/source/component/Filter.cxx +++ b/forms/source/component/Filter.cxx @@ -405,7 +405,7 @@ namespace frm // create a query composer Reference< XColumnsSupplier > xSuppColumns; - xFormProps->getPropertyValue(OUString("SingleSelectQueryComposer")) >>= xSuppColumns; + xFormProps->getPropertyValue("SingleSelectQueryComposer") >>= xSuppColumns; const Reference< XConnection > xConnection( ::dbtools::getConnection( xForm ), UNO_SET_THROW ); const Reference< XNameAccess > xFieldNames( xSuppColumns->getColumns(), UNO_SET_THROW ); diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx index 991219bf7353..773c7a5603db 100644 --- a/forms/source/component/FormattedField.cxx +++ b/forms/source/component/FormattedField.cxx @@ -601,7 +601,7 @@ void OFormattedModel::updateFormatterNullDate() // calc the current NULL date Reference< XNumberFormatsSupplier > xSupplier( calcFormatsSupplier() ); if ( xSupplier.is() ) - xSupplier->getNumberFormatSettings()->getPropertyValue( OUString( "NullDate" ) ) >>= m_aNullDate; + xSupplier->getNumberFormatSettings()->getPropertyValue("NullDate") >>= m_aNullDate; } //------------------------------------------------------------------------------ @@ -774,7 +774,7 @@ void OFormattedModel::onConnectedDbColumn( const Reference< XInterface >& _rxFor Reference<XNumberFormatsSupplier> xSupplier = calcFormatsSupplier(); m_bNumeric = getBOOL( getPropertyValue( PROPERTY_TREATASNUMERIC ) ); m_nKeyType = getNumberFormatType( xSupplier->getNumberFormats(), nFormatKey ); - xSupplier->getNumberFormatSettings()->getPropertyValue( OUString("NullDate") ) >>= m_aNullDate; + xSupplier->getNumberFormatSettings()->getPropertyValue("NullDate") >>= m_aNullDate; OEditBaseModel::onConnectedDbColumn( _rxForm ); } diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx index 138ea2009128..8cfdb4967550 100644 --- a/forms/source/component/ImageControl.cxx +++ b/forms/source/component/ImageControl.cxx @@ -880,7 +880,7 @@ bool OImageControlControl::impl_isEmptyGraphics_nothrow() const { Reference< XPropertySet > xModelProps( const_cast< OImageControlControl* >( this )->getModel(), UNO_QUERY_THROW ); Reference< XGraphic > xGraphic; - OSL_VERIFY( xModelProps->getPropertyValue( OUString( "Graphic" ) ) >>= xGraphic ); + OSL_VERIFY( xModelProps->getPropertyValue("Graphic") >>= xGraphic ); bIsEmpty = !xGraphic.is(); } catch( const Exception& ) diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index 2abbf0925823..67b6f7c69ae9 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -765,7 +765,7 @@ namespace frm { // otherwise look for the alias Reference< XColumnsSupplier > xSupplyFields; - xFormProps->getPropertyValue(OUString("SingleSelectQueryComposer")) >>= xSupplyFields; + xFormProps->getPropertyValue("SingleSelectQueryComposer") >>= xSupplyFields; // search the field DBG_ASSERT(xSupplyFields.is(), "OListBoxModel::loadData : invalid query composer !"); @@ -891,7 +891,7 @@ namespace frm try { Reference< XPropertySet > xBoundField( xColumns->getByIndex( *aBoundColumn ), UNO_QUERY_THROW ); - OSL_VERIFY( xBoundField->getPropertyValue( OUString("Type") ) >>= m_nBoundColumnType ); + OSL_VERIFY( xBoundField->getPropertyValue("Type") >>= m_nBoundColumnType ); } catch( const Exception& ) { diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx index f3b9f899602c..d089eef3b363 100644 --- a/forms/source/component/clickableimage.cxx +++ b/forms/source/component/clickableimage.cxx @@ -680,7 +680,7 @@ namespace frm ImageProducer *pImgProd = GetImageProducer(); // grab the ImageURL OUString sURL; - getPropertyValue( OUString("ImageURL") ) >>= sURL; + getPropertyValue("ImageURL") >>= sURL; if (!m_pMedium) { if ( ::svt::GraphicAccess::isSupportedURL( sURL ) ) diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx index abbb105708f1..53ba7655d1aa 100644 --- a/forms/source/misc/InterfaceContainer.cxx +++ b/forms/source/misc/InterfaceContainer.cxx @@ -123,7 +123,7 @@ void OInterfaceContainer::impl_addVbEvents_nolck_nothrow( const sal_Int32 i_nIn break; Reference< XMultiServiceFactory > xDocFac( xDoc, UNO_QUERY_THROW ); - Reference< XCodeNameQuery > xNameQuery( xDocFac->createInstance( OUString("ooo.vba.VBACodeNameProvider") ), UNO_QUERY ); + Reference< XCodeNameQuery > xNameQuery( xDocFac->createInstance("ooo.vba.VBACodeNameProvider"), UNO_QUERY ); if ( !xNameQuery.is() ) break; @@ -146,7 +146,7 @@ void OInterfaceContainer::impl_addVbEvents_nolck_nothrow( const sal_Int32 i_nIn Reference< XPropertySet > xProps( xElement, UNO_QUERY_THROW ); OUString sServiceName; - xProps->getPropertyValue( OUString("DefaultControl") ) >>= sServiceName; + xProps->getPropertyValue("DefaultControl") >>= sServiceName; Reference< ooo::vba::XVBAToOOEventDescGen > xDescSupplier( m_xContext->getServiceManager()->createInstanceWithContext("ooo.vba.VBAToOOEventDesc", m_xContext), UNO_QUERY_THROW ); Sequence< ScriptEventDescriptor > vbaEvents = xDescSupplier->getEventDescriptions( sServiceName , sCodeName ); @@ -870,7 +870,7 @@ void OInterfaceContainer::implInsert(sal_Int32 _nIndex, const Reference< XProper bool bHandleVbaEvents = false; try { - _rxElement->getPropertyValue(OUString("GenerateVbaEvents") ) >>= bHandleVbaEvents; + _rxElement->getPropertyValue("GenerateVbaEvents") >>= bHandleVbaEvents; } catch( const Exception& ) { diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx index d59bcdd03dc0..f2e2de68f670 100644 --- a/forms/source/runtime/formoperations.cxx +++ b/forms/source/runtime/formoperations.cxx @@ -1251,7 +1251,7 @@ namespace frm Reference< XMultiServiceFactory > xFactory( ::dbtools::getConnection( m_xCursor ), UNO_QUERY ); if ( xFactory.is() ) { - m_xParser.set( xFactory->createInstance( OUString( "com.sun.star.sdb.SingleSelectQueryComposer" ) ), UNO_QUERY ); + m_xParser.set( xFactory->createInstance("com.sun.star.sdb.SingleSelectQueryComposer"), UNO_QUERY ); OSL_ENSURE( m_xParser.is(), "FormOperations::impl_ensureInitializedParser_nothrow: factory did not create a parser for us!" ); } } diff --git a/forms/source/xforms/datatyperepository.cxx b/forms/source/xforms/datatyperepository.cxx index 1d2c029808bb..ac631145bef3 100644 --- a/forms/source/xforms/datatyperepository.cxx +++ b/forms/source/xforms/datatyperepository.cxx @@ -157,7 +157,7 @@ namespace xforms Repository::iterator aTypePos = implLocate( typeName ); if ( aTypePos->second->getIsBasic() ) - throw VetoException( OUString( "This is a built-in type and cannot be removed." ), *this ); + throw VetoException("This is a built-in type and cannot be removed.", *this ); // TODO: localize this error message m_aRepository.erase( aTypePos ); |