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 /cui | |
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 'cui')
-rw-r--r-- | cui/source/customize/cfgutil.cxx | 6 | ||||
-rw-r--r-- | cui/source/customize/selector.cxx | 2 | ||||
-rw-r--r-- | cui/source/dialogs/scriptdlg.cxx | 2 | ||||
-rw-r--r-- | cui/source/options/optgdlg.cxx | 6 | ||||
-rw-r--r-- | cui/source/options/optsave.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/numfmt.cxx | 2 |
6 files changed, 11 insertions, 11 deletions
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index 174a3fd4e296..d5249ddb2e88 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -738,7 +738,7 @@ Image SfxConfigGroupListBox_Impl::GetImage( Any aAny = xModuleManager->getByName(appModule); if( sal_True != ( aAny >>= moduleDescr ) ) { - throw RuntimeException(OUString("SFTreeListBox::Init: failed to get PropertyValue"), Reference< XInterface >()); + throw RuntimeException("SFTreeListBox::Init: failed to get PropertyValue", Reference< XInterface >()); } beans::PropertyValue const * pmoduleDescr = moduleDescr.getConstArray(); @@ -812,7 +812,7 @@ OUString SfxConfigGroupListBox_Impl::MapCommand2UIName(const OUString& sCommand) if (xModuleConf.is()) { ::comphelper::SequenceAsHashMap lProps(xModuleConf->getByName(sCommand)); - sUIName = lProps.getUnpackedValueOrDefault(OUString("Name"), OUString()); + sUIName = lProps.getUnpackedValueOrDefault("Name", OUString()); } } catch(const css::uno::RuntimeException&) @@ -898,7 +898,7 @@ void SfxConfigGroupListBox_Impl::GroupSelected() } Any value = - xPropSet->getPropertyValue( OUString("URI") ); + xPropSet->getPropertyValue("URI"); value >>= uri; String* pScriptURI = new String( uri ); diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx index 1f2105ce28d2..98e8a38e8582 100644 --- a/cui/source/customize/selector.cxx +++ b/cui/source/customize/selector.cxx @@ -544,7 +544,7 @@ Image SvxConfigGroupListBox::GetImage( Any aAny = xModuleManager->getByName(appModule); if( sal_True != ( aAny >>= moduleDescr ) ) { - throw RuntimeException(OUString("SFTreeListBox::Init: failed to get PropertyValue"), Reference< XInterface >()); + throw RuntimeException("SFTreeListBox::Init: failed to get PropertyValue", Reference< XInterface >()); } beans::PropertyValue const * pmoduleDescr = moduleDescr.getConstArray(); diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index 672ff5e3e297..b0a73ef88736 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -737,7 +737,7 @@ IMPL_LINK( SvxScriptOrgDialog, ButtonHdl, Button *, pButton ) mspNode.set( mspUserData->GetNode() , UNO_QUERY ); pParent = m_pScriptsBox->GetParent( pParent ); } - xProp->getPropertyValue( OUString("URI" ) ) >>= tmpString; + xProp->getPropertyValue("URI") >>= tmpString; const String scriptURL( tmpString ); if ( mspNode.is() ) diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 729ed7c8614a..6489201e24fc 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -433,7 +433,7 @@ CanvasSettings::CanvasSettings() : if( xEntryNameAccess.is() ) { Sequence<OUString> preferredImplementations; - if( (xEntryNameAccess->getByName( OUString("PreferredImplementations") ) >>= preferredImplementations) ) + if( (xEntryNameAccess->getByName("PreferredImplementations") >>= preferredImplementations) ) maAvailableImplementations.push_back( std::make_pair(*pCurr,preferredImplementations) ); } @@ -471,7 +471,7 @@ sal_Bool CanvasSettings::IsHardwareAccelerationAvailable() const pCurrImpl->trim() ), UNO_QUERY_THROW ); bool bHasAccel(false); - if( (xPropSet->getPropertyValue(OUString("HardwareAcceleration")) >>= bHasAccel) ) + if( (xPropSet->getPropertyValue("HardwareAcceleration") >>= bHasAccel) ) if( bHasAccel ) { mbHWAccelAvailable = true; @@ -499,7 +499,7 @@ sal_Bool CanvasSettings::IsHardwareAccelerationEnabled() const if( !mxForceFlagNameAccess.is() ) return true; - if( !(mxForceFlagNameAccess->getByName( OUString("ForceSafeServiceImpl") ) >>= bForceLastEntry) ) + if( !(mxForceFlagNameAccess->getByName("ForceSafeServiceImpl") >>= bForceLastEntry) ) return true; return !bForceLastEntry; diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx index 54ae41ab44bc..ada076ea622f 100644 --- a/cui/source/options/optsave.cxx +++ b/cui/source/options/optsave.cxx @@ -436,10 +436,10 @@ void SfxSaveTabPage::Reset( const SfxItemSet& ) while(xList->hasMoreElements()) { SequenceAsHashMap aFilter(xList->nextElement()); - OUString sFilter = aFilter.getUnpackedValueOrDefault(OUString("Name"),OUString()); + OUString sFilter = aFilter.getUnpackedValueOrDefault("Name",OUString()); if (!sFilter.isEmpty()) { - sal_Int32 nFlags = aFilter.getUnpackedValueOrDefault(OUString("Flags"),sal_Int32()); + sal_Int32 nFlags = aFilter.getUnpackedValueOrDefault("Flags",sal_Int32()); lList.push_back(sFilter); lAlienList.push_back(0 != (nFlags & SFX_FILTER_ALIEN)); lODFList.push_back( isODFFormat( sFilter ) ); diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 1a35b045a30a..a952c896474c 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -518,7 +518,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet ) // is this a calc document Reference< XServiceInfo > xSI( pDocSh->GetModel(), UNO_QUERY ); if ( xSI.is() ) - bUseStarFormat = xSI->supportsService( OUString( "com.sun.star.sheet.SpreadsheetDocument" ) ); + bUseStarFormat = xSI->supportsService("com.sun.star.sheet.SpreadsheetDocument"); } pNumFmtShell->SetUseStarFormat( bUseStarFormat ); |