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 /dbaccess | |
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 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/KeySet.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ext/macromigration/migrationengine.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/dbloader2.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/xmlExport.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/xmlfilter.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/app/subcomponentmanager.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/brwctrlr.cxx | 34 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/genericcontroller.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/unodatbr.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/control/FieldDescControl.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/ConnectionHelper.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/DExport.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/UITools.cxx | 2 |
13 files changed, 36 insertions, 36 deletions
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index 8fcd11a74b41..7df61d796494 100644 --- a/dbaccess/source/core/api/KeySet.cxx +++ b/dbaccess/source/core/api/KeySet.cxx @@ -208,7 +208,7 @@ void OKeySet::findTableColumnsMatching_throw( const Any& i_aTable, if ( o_pKeyColumnNames->empty() ) { - ::dbtools::throwGenericSQLException( OUString( "Could not find any key column." ), *this ); + ::dbtools::throwGenericSQLException("Could not find any key column.", *this ); } for ( SelectColumnsMetaData::const_iterator keyColumn = o_pKeyColumnNames->begin(); diff --git a/dbaccess/source/ext/macromigration/migrationengine.cxx b/dbaccess/source/ext/macromigration/migrationengine.cxx index 5132258ccea0..c0ec4352fdda 100644 --- a/dbaccess/source/ext/macromigration/migrationengine.cxx +++ b/dbaccess/source/ext/macromigration/migrationengine.cxx @@ -1353,7 +1353,7 @@ namespace dbmm SharedStorage xScriptsRoot( aDocStorage.getScriptsRoot( _eScriptType ) ); if ( !xScriptsRoot.is() ) - throw RuntimeException( OUString( "internal error" ), NULL ); + throw RuntimeException("internal error", NULL ); // loop through the script libraries Sequence< OUString > aStorageElements( xScriptsRoot->getElementNames() ); diff --git a/dbaccess/source/filter/xml/dbloader2.cxx b/dbaccess/source/filter/xml/dbloader2.cxx index dde2f9a63fb4..ccd37872ff50 100644 --- a/dbaccess/source/filter/xml/dbloader2.cxx +++ b/dbaccess/source/filter/xml/dbloader2.cxx @@ -388,8 +388,8 @@ sal_Bool DBContentLoader::impl_executeNewDatabaseWizard( Reference< XModel >& _r Reference<XPropertySet> xProp(xAdminDialog,UNO_QUERY); sal_Bool bSuccess = sal_False; - xProp->getPropertyValue(OUString("OpenDatabase")) >>= bSuccess; - xProp->getPropertyValue(OUString("StartTableWizard")) >>= _bShouldStartTableWizard; + xProp->getPropertyValue("OpenDatabase") >>= bSuccess; + xProp->getPropertyValue("StartTableWizard") >>= _bShouldStartTableWizard; return bSuccess; } diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx index 632ff19760d5..0ca0dfa61770 100644 --- a/dbaccess/source/filter/xml/xmlExport.cxx +++ b/dbaccess/source/filter/xml/xmlExport.cxx @@ -864,7 +864,7 @@ void ODBExport::exportComponent(XPropertySet* _xProp) OUString sValue; _xProp->getPropertyValue(PROPERTY_PERSISTENT_NAME) >>= sValue; sal_Bool bIsForm = sal_True; - _xProp->getPropertyValue(OUString("IsForm")) >>= bIsForm; + _xProp->getPropertyValue("IsForm") >>= bIsForm; if ( bIsForm ) sValue = OUString("forms/") + sValue; else diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx index 96ea9ed860d9..f5d8603cd321 100644 --- a/dbaccess/source/filter/xml/xmlfilter.cxx +++ b/dbaccess/source/filter/xml/xmlfilter.cxx @@ -329,7 +329,7 @@ sal_Int32 ReadThroughComponent( xDocStream = xStorage->openStreamElement( sStreamName, embed::ElementModes::READ ); uno::Reference< beans::XPropertySet > xProps( xDocStream, uno::UNO_QUERY_THROW ); - uno::Any aAny = xProps->getPropertyValue( OUString("Encrypted" ) ); + uno::Any aAny = xProps->getPropertyValue("Encrypted"); aAny >>= bEncrypted; } catch (const packages::WrongPasswordException&) diff --git a/dbaccess/source/ui/app/subcomponentmanager.cxx b/dbaccess/source/ui/app/subcomponentmanager.cxx index 24b20c388877..727da5ad59ab 100644 --- a/dbaccess/source/ui/app/subcomponentmanager.cxx +++ b/dbaccess/source/ui/app/subcomponentmanager.cxx @@ -118,7 +118,7 @@ namespace dbaui Reference< XComponentSupplier > xCompSupp( i_rComponent, UNO_QUERY_THROW ); Reference< XComponent > xComponent( xCompSupp->getComponent(), UNO_QUERY_THROW ); if ( !impl_constructFrom( xComponent ) ) - throw RuntimeException( OUString( "Illegal component type." ), NULL ); + throw RuntimeException("Illegal component type.", NULL ); xComponentCommandProcessor.set( i_rComponent, UNO_QUERY_THROW ); xDocumentDefinitionProperties.set( i_rComponent, UNO_QUERY_THROW ); } diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index 6d0cc35db670..ea4c339b2763 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -1591,7 +1591,7 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const try { Reference< XPropertySet > xRowSetProps( getRowSet(), UNO_QUERY_THROW ); - OSL_VERIFY( xRowSetProps->getPropertyValue( OUString("AllowInserts") ) >>= bAllowInsertions ); + OSL_VERIFY( xRowSetProps->getPropertyValue("AllowInserts") >>= bAllowInsertions ); } catch( const Exception& ) { @@ -1610,7 +1610,7 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const try { Reference< XPropertySet > xRowSetProps( getRowSet(), UNO_QUERY_THROW ); - OSL_VERIFY( xRowSetProps->getPropertyValue( OUString("AllowDeletes") ) >>= bAllowDeletions ); + OSL_VERIFY( xRowSetProps->getPropertyValue("AllowDeletes") >>= bAllowDeletions ); OSL_VERIFY( xRowSetProps->getPropertyValue( PROPERTY_ROWCOUNT ) >>= nRowCount ); OSL_VERIFY( xRowSetProps->getPropertyValue( PROPERTY_ISNEW ) >>= bInsertionRow ); } @@ -1727,9 +1727,9 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const break; // no datasource -> no edit mode sal_Int32 nDataSourcePrivileges = ::comphelper::getINT32(xDataSourceSet->getPropertyValue(PROPERTY_PRIVILEGES)); - sal_Bool bInsertAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::INSERT) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue(OUString("AllowInserts"))); - sal_Bool bUpdateAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::UPDATE) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue(OUString("AllowUpdates"))); - sal_Bool bDeleteAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::DELETE) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue(OUString("AllowDeletes"))); + sal_Bool bInsertAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::INSERT) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue("AllowInserts")); + sal_Bool bUpdateAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::UPDATE) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue("AllowUpdates")); + sal_Bool bDeleteAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::DELETE) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue("AllowDeletes")); if (!bInsertAllowedAndPossible && !bUpdateAllowedAndPossible && !bDeleteAllowedAndPossible) break; // no insert/update/delete -> no edit mode @@ -2000,9 +2000,9 @@ void SbaXDataBrowserController::ExecuteSearch() // prohibit the synchronization of the grid's display with the cursor's position Reference< XPropertySet > xModelSet(getControlModel(), UNO_QUERY); OSL_ENSURE(xModelSet.is(), "SbaXDataBrowserController::ExecuteSearch : no model set ?!"); - xModelSet->setPropertyValue(OUString("DisplayIsSynchron"), ::comphelper::makeBoolAny(sal_Bool(sal_False))); - xModelSet->setPropertyValue(OUString("AlwaysShowCursor"), ::comphelper::makeBoolAny(sal_Bool(sal_True))); - xModelSet->setPropertyValue(OUString("CursorColor"), makeAny(sal_Int32(COL_LIGHTRED))); + xModelSet->setPropertyValue("DisplayIsSynchron", ::comphelper::makeBoolAny(sal_Bool(sal_False))); + xModelSet->setPropertyValue("AlwaysShowCursor", ::comphelper::makeBoolAny(sal_Bool(sal_True))); + xModelSet->setPropertyValue("CursorColor", makeAny(sal_Int32(COL_LIGHTRED))); Reference< ::com::sun::star::util::XNumberFormatsSupplier > xNFS(::dbtools::getNumberFormats(::dbtools::getConnection(m_xRowSet), sal_True, getORB())); @@ -2025,9 +2025,9 @@ void SbaXDataBrowserController::ExecuteSearch() } // restore the grid's normal operating state - xModelSet->setPropertyValue(OUString("DisplayIsSynchron"), ::comphelper::makeBoolAny(sal_Bool(sal_True))); - xModelSet->setPropertyValue(OUString("AlwaysShowCursor"), ::comphelper::makeBoolAny(sal_Bool(sal_False))); - xModelSet->setPropertyValue(OUString("CursorColor"), Any()); + xModelSet->setPropertyValue("DisplayIsSynchron", ::comphelper::makeBoolAny(sal_Bool(sal_True))); + xModelSet->setPropertyValue("AlwaysShowCursor", ::comphelper::makeBoolAny(sal_Bool(sal_False))); + xModelSet->setPropertyValue("CursorColor", Any()); } //------------------------------------------------------------------------------ @@ -2568,9 +2568,9 @@ IMPL_LINK(SbaXDataBrowserController, OnFoundData, FmFoundRecordInformation*, pIn // let the grid snyc it's display with the cursor Reference< XPropertySet > xModelSet(getControlModel(), UNO_QUERY); OSL_ENSURE(xModelSet.is(), "SbaXDataBrowserController::OnFoundData : no model set ?!"); - Any aOld = xModelSet->getPropertyValue(OUString("DisplayIsSynchron")); - xModelSet->setPropertyValue(OUString("DisplayIsSynchron"), ::comphelper::makeBoolAny(sal_Bool(sal_True))); - xModelSet->setPropertyValue(OUString("DisplayIsSynchron"), aOld); + Any aOld = xModelSet->getPropertyValue("DisplayIsSynchron"); + xModelSet->setPropertyValue("DisplayIsSynchron", ::comphelper::makeBoolAny(sal_Bool(sal_True))); + xModelSet->setPropertyValue("DisplayIsSynchron", aOld); // and move to the field Reference< ::com::sun::star::container::XIndexAccess > aColumnControls(getBrowserView()->getGridControl()->getPeer(), UNO_QUERY); @@ -2615,9 +2615,9 @@ IMPL_LINK(SbaXDataBrowserController, OnCanceledNotFound, FmFoundRecordInformatio // let the grid snyc its display with the cursor Reference< XPropertySet > xModelSet(getControlModel(), UNO_QUERY); OSL_ENSURE(xModelSet.is(), "SbaXDataBrowserController::OnCanceledNotFound : no model set ?!"); - Any aOld = xModelSet->getPropertyValue(OUString("DisplayIsSynchron")); - xModelSet->setPropertyValue(OUString("DisplayIsSynchron"), ::comphelper::makeBoolAny(sal_Bool(sal_True))); - xModelSet->setPropertyValue(OUString("DisplayIsSynchron"), aOld); + Any aOld = xModelSet->getPropertyValue("DisplayIsSynchron"); + xModelSet->setPropertyValue("DisplayIsSynchron", ::comphelper::makeBoolAny(sal_Bool(sal_True))); + xModelSet->setPropertyValue("DisplayIsSynchron", aOld); } catch( const Exception& ) { diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx index aeb4b026ad21..d1f507d77d27 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -311,14 +311,14 @@ void SAL_CALL OGenericUnoController::initialize( const Sequence< Any >& aArgumen try { if ( !xFrame.is() ) - throw IllegalArgumentException( OUString( "need a frame" ), *this, 1 ); + throw IllegalArgumentException("need a frame", *this, 1 ); xParent = xFrame->getContainerWindow(); VCLXWindow* pParentComponent = VCLXWindow::GetImplementation(xParent); Window* pParentWin = pParentComponent ? pParentComponent->GetWindow() : NULL; if (!pParentWin) { - throw IllegalArgumentException( OUString( "Parent window is null" ), *this, 1 ); + throw IllegalArgumentException("Parent window is null", *this, 1 ); } m_aInitParameters.assign( aArguments ); @@ -326,7 +326,7 @@ void SAL_CALL OGenericUnoController::initialize( const Sequence< Any >& aArgumen ODataView* pView = getView(); if ( !pView ) - throw RuntimeException( OUString( "unable to create a view" ), *this ); + throw RuntimeException("unable to create a view", *this ); if ( m_bReadOnly || m_bPreview ) pView->EnableInput( sal_False ); @@ -1084,7 +1084,7 @@ Reference< XLayoutManager > OGenericUnoController::getLayoutManager(const Refere { try { - xLayoutManager.set(xPropSet->getPropertyValue( OUString( "LayoutManager" )),UNO_QUERY); + xLayoutManager.set(xPropSet->getPropertyValue("LayoutManager"),UNO_QUERY); } catch ( Exception& ) { diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 278e9f1fd730..0bee0cd4063c 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -616,9 +616,9 @@ void SbaTableQueryBrowser::initializePreviewMode() Reference< XPropertySet > xDataSourceSet(getRowSet(), UNO_QUERY); if ( xDataSourceSet.is() ) { - xDataSourceSet->setPropertyValue(OUString("AllowInserts"),makeAny(sal_False)); - xDataSourceSet->setPropertyValue(OUString("AllowUpdates"),makeAny(sal_False)); - xDataSourceSet->setPropertyValue(OUString("AllowDeletes"),makeAny(sal_False)); + xDataSourceSet->setPropertyValue("AllowInserts",makeAny(sal_False)); + xDataSourceSet->setPropertyValue("AllowUpdates",makeAny(sal_False)); + xDataSourceSet->setPropertyValue("AllowDeletes",makeAny(sal_False)); } } @@ -1563,7 +1563,7 @@ void SbaTableQueryBrowser::attachFrame(const Reference< ::com::sun::star::frame: { Reference< XPropertySet > xFrameProps( m_aCurrentFrame.getFrame(), UNO_QUERY_THROW ); Reference< XLayoutManager > xLayouter( - xFrameProps->getPropertyValue( OUString( "LayoutManager" ) ), + xFrameProps->getPropertyValue("LayoutManager"), UNO_QUERY ); if ( xLayouter.is() ) diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index 009300b4da0c..aee6df61a43b 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -1822,7 +1822,7 @@ String OFieldDescControl::getControlDefault( const OFieldDescription* _pFieldDes Reference<XPropertySet> xFormSet = xNumberFormatter->getNumberFormatsSupplier()->getNumberFormats()->getByKey(nFormatKey); OSL_ENSURE(xFormSet.is(),"XPropertySet is null!"); OUString sFormat; - xFormSet->getPropertyValue(OUString("FormatString")) >>= sFormat; + xFormSet->getPropertyValue("FormatString") >>= sFormat; if ( !bTextFormat ) { diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index 964fb6b5a310..52069d2a0a16 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -594,7 +594,7 @@ DBG_NAME(OConnectionHelper) } else { - Any aContentType = aParent.getPropertyValue( OUString("ContentType") ); + Any aContentType = aParent.getPropertyValue("ContentType"); aContentType >>= sContentType; } diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx index fb0558e79d18..12b1dde86309 100644 --- a/dbaccess/source/ui/misc/DExport.cxx +++ b/dbaccess/source/ui/misc/DExport.cxx @@ -823,7 +823,7 @@ void ODatabaseExport::ensureFormatter() SvNumberFormatsSupplierObj* pSupplierImpl = (SvNumberFormatsSupplierObj*)sal::static_int_cast< sal_IntPtr >(xTunnel->getSomething(SvNumberFormatsSupplierObj::getUnoTunnelId())); m_pFormatter = pSupplierImpl ? pSupplierImpl->GetNumberFormatter() : NULL; Reference<XPropertySet> xNumberFormatSettings = xSupplier->getNumberFormatSettings(); - xNumberFormatSettings->getPropertyValue(OUString("NullDate")) >>= m_aNullDate; + xNumberFormatSettings->getPropertyValue("NullDate") >>= m_aNullDate; } } // ----------------------------------------------------------------------------- diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 2aeae40dace0..e6ec4e70712e 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -1134,7 +1134,7 @@ namespace ::ucbhelper::Content aCnt( INetURLObject( _rURL ).GetMainURL( INetURLObject::NO_DECODE ), Reference< ::com::sun::star::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); - if ( ( aCnt.getPropertyValue( OUString("AnchorName") ) >>= sAnchor ) ) + if ( ( aCnt.getPropertyValue("AnchorName") >>= sAnchor ) ) { if ( !sAnchor.isEmpty() ) |