From 18ce0560aa8d47e00e28bc655eaf868de1dceb51 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 4 Nov 2015 08:34:59 +0200 Subject: loplugin:stringconstant Change-Id: Id5a07591a1d3a7264a0a979f25e8c2c859ec0492 Reviewed-on: https://gerrit.libreoffice.org/19767 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- dbaccess/source/core/api/RowSet.cxx | 2 +- dbaccess/source/ext/macromigration/macromigrationdialog.cxx | 2 +- dbaccess/source/ext/macromigration/migrationengine.cxx | 4 ++-- dbaccess/source/filter/xml/dbloader2.cxx | 2 +- dbaccess/source/ui/app/AppController.cxx | 2 +- dbaccess/source/ui/app/AppDetailView.cxx | 2 +- dbaccess/source/ui/browser/brwctrlr.cxx | 2 +- dbaccess/source/ui/browser/dbloader.cxx | 2 +- dbaccess/source/ui/browser/genericcontroller.cxx | 8 ++++---- dbaccess/source/ui/browser/unodatbr.cxx | 12 ++++++------ dbaccess/source/ui/control/toolboxcontroller.cxx | 2 +- dbaccess/source/ui/dlg/dbwizsetup.cxx | 2 +- dbaccess/source/ui/misc/databaseobjectview.cxx | 2 +- dbaccess/source/ui/misc/linkeddocuments.cxx | 2 +- 14 files changed, 23 insertions(+), 23 deletions(-) (limited to 'dbaccess') diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index 70a419a64c03..a1688117ed6d 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -2314,7 +2314,7 @@ bool ORowSet::impl_initComposer_throw( OUString& _out_rCommandToExecute ) // don't simply overwrite an existent filter, this would lead to problems if this existent // filter contains parameters (since a keyset may add parameters itself) m_xComposer->setElementaryQuery( m_xComposer->getQuery( ) ); - m_xComposer->setFilter( OUString("0 = 1" ) ); + m_xComposer->setFilter( "0 = 1" ); } m_xComposer->setOrder( m_aOrder ); diff --git a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx index 09842bdf5f98..8f5ca6483610 100644 --- a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx +++ b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx @@ -509,7 +509,7 @@ namespace dbmm aDocumentArgs.put( "ViewName", aView.second ); Reference< XInterface > xReloaded( xLoader->loadComponentFromURL( sDocumentURL, - OUString( "_self" ), + "_self", 0, aDocumentArgs.getPropertyValues() ) ); diff --git a/dbaccess/source/ext/macromigration/migrationengine.cxx b/dbaccess/source/ext/macromigration/migrationengine.cxx index e733f1e1bc74..cc474d7b6b9d 100644 --- a/dbaccess/source/ext/macromigration/migrationengine.cxx +++ b/dbaccess/source/ext/macromigration/migrationengine.cxx @@ -1551,7 +1551,7 @@ namespace dbmm Reference< XUriReferenceFactory > xUriRefFac = UriReferenceFactory::create( m_aContext ); Reference< XVndSunStarScriptUrlReference > xUri( xUriRefFac->parse( _inout_rScriptCode ), UNO_QUERY_THROW ); - OUString sScriptLanguage = xUri->getParameter( OUString( "language" ) ); + OUString sScriptLanguage = xUri->getParameter( "language" ); ScriptType eScriptType = eBasic; if ( !lcl_getScriptTypeFromLanguage( sScriptLanguage, eScriptType ) ) { @@ -1564,7 +1564,7 @@ namespace dbmm return false; } - OUString sLocation = xUri->getParameter( OUString( "location" ) ); + OUString sLocation = xUri->getParameter( "location" ); if ( sLocation != "document" ) { // only document libraries must be migrated, of course diff --git a/dbaccess/source/filter/xml/dbloader2.cxx b/dbaccess/source/filter/xml/dbloader2.cxx index 9613eded5f7d..19333ade9d96 100644 --- a/dbaccess/source/filter/xml/dbloader2.cxx +++ b/dbaccess/source/filter/xml/dbloader2.cxx @@ -576,7 +576,7 @@ IMPL_LINK_NOARG_TYPED( DBContentLoader, OnStartTableWizard, void*, void ) SolarMutexGuard aGuard; Reference< XJobExecutor > xTableWizard( m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.wizards.table.CallTableWizard", aWizArgs, m_aContext), UNO_QUERY); if ( xTableWizard.is() ) - xTableWizard->trigger(OUString("start")); + xTableWizard->trigger("start"); } catch(const Exception&) { diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index 511f9ffa8e0c..c992a5572792 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -500,7 +500,7 @@ sal_Bool SAL_CALL OApplicationController::suspend(sal_Bool bSuspend) throw( Runt if ( xBroadcaster.is() ) { xBroadcaster->notifyDocumentEvent( - OUString("OnPrepareViewClosing"), + "OnPrepareViewClosing", this, Any() ); diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx index 7fe7874a8a47..4305a105700b 100644 --- a/dbaccess/source/ui/app/AppDetailView.cxx +++ b/dbaccess/source/ui/app/AppDetailView.cxx @@ -477,7 +477,7 @@ void OTasksWindow::fillTaskEntryList( const TaskEntryList& _rList ) Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier = theModuleUIConfigurationManagerSupplier::get( getDetailView()->getBorderWin().getView()->getORB() ); Reference< XUIConfigurationManager > xUIConfigMgr = xModuleCfgMgrSupplier->getUIConfigurationManager( - OUString( "com.sun.star.sdb.OfficeDatabaseDocument" ) + "com.sun.star.sdb.OfficeDatabaseDocument" ); Reference< XImageManager > xImageMgr( xUIConfigMgr->getImageManager(), UNO_QUERY ); diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index a26c9ac4db5d..546c17bcb707 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -752,7 +752,7 @@ bool SbaXDataBrowserController::Construct(vcl::Window* pParent) Reference< css::container::XNameContainer > xNameCont(m_xRowSet, UNO_QUERY); { OUString sText(ModuleRes(STR_DATASOURCE_GRIDCONTROL_NAME)); - xNameCont->insertByName(OUString(sText), makeAny(m_xGridModel)); + xNameCont->insertByName(sText, makeAny(m_xGridModel)); } // create the view diff --git a/dbaccess/source/ui/browser/dbloader.cxx b/dbaccess/source/ui/browser/dbloader.cxx index 3b2d2a2a139b..626ecb1f7be2 100644 --- a/dbaccess/source/ui/browser/dbloader.cxx +++ b/dbaccess/source/ui/browser/dbloader.cxx @@ -199,7 +199,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU try { Reference< XModule > xModule( xController, UNO_QUERY_THROW ); - xModule->setIdentifier( OUString( "com.sun.star.sdb.TableDataView" ) ); + xModule->setIdentifier( "com.sun.star.sdb.TableDataView" ); } catch( const Exception& ) { diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx index 0201eaf7cf55..99b6f2f232ca 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -123,7 +123,7 @@ void UserDefinedFeatures::execute( const URL& _rFeatureURL, const Sequence< Prop Reference< XDispatchProvider > xDispatchProvider( xController->getFrame(), UNO_QUERY_THROW ); Reference< XDispatch > xDispatch( xDispatchProvider->queryDispatch( _rFeatureURL, - OUString( "_self" ), + "_self", FrameSearchFlag::AUTO ) ); @@ -1010,8 +1010,8 @@ void OGenericUnoController::loadMenu(const Reference< XFrame >& _xFrame) if ( xLayoutManager.is() ) { xLayoutManager->lock(); - xLayoutManager->createElement( OUString( "private:resource/menubar/menubar" )); - xLayoutManager->createElement( OUString( "private:resource/toolbar/toolbar" )); + xLayoutManager->createElement( "private:resource/menubar/menubar" ); + xLayoutManager->createElement( "private:resource/toolbar/toolbar" ); xLayoutManager->unlock(); xLayoutManager->doLayout(); } @@ -1243,7 +1243,7 @@ void OGenericUnoController::openHelpAgent( const URL& _rURL ) Reference< XDispatchProvider > xDispProv( m_aCurrentFrame.getFrame(), UNO_QUERY ); Reference< XDispatch > xHelpDispatch; if ( xDispProv.is() ) - xHelpDispatch = xDispProv->queryDispatch(aURL, OUString( "_helpagent" ), FrameSearchFlag::PARENT | FrameSearchFlag::SELF); + xHelpDispatch = xDispProv->queryDispatch(aURL, "_helpagent", FrameSearchFlag::PARENT | FrameSearchFlag::SELF); OSL_ENSURE(xHelpDispatch.is(), "SbaTableQueryBrowser::openHelpAgent: could not get a dispatcher!"); if (xHelpDispatch.is()) { diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 60d7342e74c8..d0c36b004f01 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -1304,7 +1304,7 @@ void SbaTableQueryBrowser::connectExternalDispatches() ) { feature->second.xDispatcher = xProvider->queryDispatch( - feature->second.aURL, OUString("_parent"), FrameSearchFlag::PARENT + feature->second.aURL, "_parent", FrameSearchFlag::PARENT ); if ( feature->second.xDispatcher.get() == static_cast< XDispatch* >( this ) ) @@ -1511,7 +1511,7 @@ void SbaTableQueryBrowser::attachFrame(const Reference< css::frame::XFrame > & _ Reference< XFrame > xCurrentFrame( getFrame() ); if ( xCurrentFrame.is() ) { - m_xCurrentFrameParent = xCurrentFrame->findFrame(OUString("_parent"),FrameSearchFlag::PARENT); + m_xCurrentFrameParent = xCurrentFrame->findFrame("_parent",FrameSearchFlag::PARENT); if ( m_xCurrentFrameParent.is() ) m_xCurrentFrameParent->addFrameActionListener(static_cast(this)); @@ -1526,7 +1526,7 @@ void SbaTableQueryBrowser::attachFrame(const Reference< css::frame::XFrame > & _ if ( xLayouter.is() ) { Reference< XUIElement > xUI( - xLayouter->getElement( OUString( "private:resource/toolbar/toolbar" ) ), + xLayouter->getElement( "private:resource/toolbar/toolbar" ), UNO_SET_THROW ); m_xMainToolbar.set(xUI->getRealInterface(), css::uno::UNO_QUERY); OSL_ENSURE( m_xMainToolbar.is(), "SbaTableQueryBrowser::attachFrame: where's my toolbox?" ); @@ -2670,7 +2670,7 @@ bool SbaTableQueryBrowser::implSelect( SvTreeListEntry* _pEntry ) sReplace = sReplace.replaceFirst(sFilter, ""); xAnalyzer->setQuery(sReplace); Reference xComposer(xAnalyzer,UNO_QUERY); - xComposer->setFilter(OUString("0=1")); + xComposer->setFilter("0=1"); aName = xAnalyzer->getQuery(); nCommandType = CommandType::COMMAND; } @@ -3456,7 +3456,7 @@ void SbaTableQueryBrowser::implAdministrate( SvTreeListEntry* _pApplyTo ) xFrameLoader->loadComponentFromURL( xDocumentModel->getURL(), - OUString("_default"), + "_default", nFrameSearchFlag, aLoadArgPV ); @@ -3629,7 +3629,7 @@ void SbaTableQueryBrowser::loadMenu(const Reference< XFrame >& _xFrame) if ( xLayoutManager.is() ) { xLayoutManager->lock(); - xLayoutManager->createElement( OUString( "private:resource/toolbar/toolbar" )); + xLayoutManager->createElement( "private:resource/toolbar/toolbar" ); xLayoutManager->unlock(); xLayoutManager->doLayout(); } diff --git a/dbaccess/source/ui/control/toolboxcontroller.cxx b/dbaccess/source/ui/control/toolboxcontroller.cxx index 002f17667ec3..b2b0dd93bf8b 100644 --- a/dbaccess/source/ui/control/toolboxcontroller.cxx +++ b/dbaccess/source/ui/control/toolboxcontroller.cxx @@ -187,7 +187,7 @@ namespace dbaui try { Reference xModuleCfgMgrSupplier = theModuleUIConfigurationManagerSupplier::get( getContext() ); - Reference xUIConfigMgr = xModuleCfgMgrSupplier->getUIConfigurationManager( OUString("com.sun.star.sdb.OfficeDatabaseDocument") ); + Reference xUIConfigMgr = xModuleCfgMgrSupplier->getUIConfigurationManager( "com.sun.star.sdb.OfficeDatabaseDocument" ); Reference xImageMgr(xUIConfigMgr->getImageManager(),UNO_QUERY); Sequence< OUString> aSeq(1); diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index b33bc0dc3a75..ba5e6d65f7fd 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -944,7 +944,7 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument() aLoadArgs >>= aLoadArgPV; m_xFrameLoader->loadComponentFromURL( m_sURL, - OUString( "_default" ), + "_default", FrameSearchFlag::ALL, aLoadArgPV ); diff --git a/dbaccess/source/ui/misc/databaseobjectview.cxx b/dbaccess/source/ui/misc/databaseobjectview.cxx index ceaf0a71ba97..e6b9e0f79366 100644 --- a/dbaccess/source/ui/misc/databaseobjectview.cxx +++ b/dbaccess/source/ui/misc/databaseobjectview.cxx @@ -141,7 +141,7 @@ namespace dbaui Reference< XComponentLoader > xFrameLoader( m_xFrameLoader, UNO_QUERY_THROW ); xReturn = xFrameLoader->loadComponentFromURL( m_sComponentURL, - OUString("_self"), + "_self", 0, i_rDispatchArgs.getPropertyValues() ); diff --git a/dbaccess/source/ui/misc/linkeddocuments.cxx b/dbaccess/source/ui/misc/linkeddocuments.cxx index 74e0e2a3ad5a..388f4d58a273 100644 --- a/dbaccess/source/ui/misc/linkeddocuments.cxx +++ b/dbaccess/source/ui/misc/linkeddocuments.cxx @@ -200,7 +200,7 @@ namespace dbaui ), UNO_QUERY_THROW ); } - xWizard->trigger( OUString( "start" ) ); + xWizard->trigger( "start" ); ::comphelper::disposeComponent( xWizard ); } catch(const Exception&) -- cgit