diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-06 09:37:55 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-06 09:37:55 +0100 |
commit | 42cf4f9a2700e5d8ba5f551be2355cb827f4c5bf (patch) | |
tree | 774156f03d654c4df3e368fe10c94b5a086a7ddd /sw/source/uibase/app | |
parent | 2f88f0adf0f787ae1e1a2a5ac2156b347984fd4a (diff) |
loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: I55970d363ab53eb78d580192006e52d9240d46fb
Diffstat (limited to 'sw/source/uibase/app')
-rw-r--r-- | sw/source/uibase/app/docsh.cxx | 12 | ||||
-rw-r--r-- | sw/source/uibase/app/docsh2.cxx | 10 | ||||
-rw-r--r-- | sw/source/uibase/app/docshini.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/app/swdll.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/app/swmodule.cxx | 2 |
5 files changed, 17 insertions, 17 deletions
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 9cdaceec28fb..37304d230101 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -276,7 +276,7 @@ bool SwDocShell::ConvertFrom( SfxMedium& rMedium ) SW_MOD()->SetEmbeddedLoadSave( false ); - SetError( nErr, OUString( OSL_LOG_PREFIX ) ); + SetError( nErr, OSL_LOG_PREFIX ); bool bOk = !IsError( nErr ); if (bOk && !m_pDoc->IsInLoadAsynchron()) @@ -367,7 +367,7 @@ bool SwDocShell::Save() } SW_MOD()->SetEmbeddedLoadSave( false ); } - SetError( nErr ? nErr : nVBWarning, OUString( OSL_LOG_PREFIX ) ); + SetError( nErr ? nErr : nVBWarning, OSL_LOG_PREFIX ); SfxViewFrame *const pFrm = (m_pWrtShell) ? m_pWrtShell->GetView().GetViewFrame() : nullptr; @@ -519,7 +519,7 @@ bool SwDocShell::SaveAs( SfxMedium& rMedium ) m_pDoc->cleanupUnoCrsrTbl(); } - SetError( nErr ? nErr : nVBWarning, OUString( OSL_LOG_PREFIX ) ); + SetError( nErr ? nErr : nVBWarning, OSL_LOG_PREFIX ); return !IsError( nErr ); } @@ -573,7 +573,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium ) OSL_ENSURE( !xStg->GetError(), "No storage available for storing VBA macros!" ); if ( !xStg->GetError() ) { - nVBWarning = SaveOrDelMSVBAStorage( (SfxObjectShell&) *this, *xStg, bSave, OUString("Macros") ); + nVBWarning = SaveOrDelMSVBAStorage( (SfxObjectShell&) *this, *xStg, bSave, "Macros" ); xStg->Commit(); m_pDoc->SetContainsMSVBasic( true ); } @@ -603,7 +603,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium ) Sequence<OUString> aModNames = xLib->getElementNames(); if(aModNames.getLength()) { - SetError(WARN_SWG_HTML_NO_MACROS, OUString( OSL_LOG_PREFIX ) ); + SetError(WARN_SWG_HTML_NO_MACROS, OSL_LOG_PREFIX ); break; } } @@ -759,7 +759,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium ) } SW_MOD()->SetEmbeddedLoadSave( false ); - SetError( nErrno ? nErrno : nVBWarning, OUString( OSL_LOG_PREFIX ) ); + SetError( nErrno ? nErrno : nVBWarning, OSL_LOG_PREFIX ); if( !rMedium.IsStorage() ) rMedium.CloseOutStream(); diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 09c4b5fc55f1..dbe1d4f5df34 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -527,7 +527,7 @@ void SwDocShell::Execute(SfxRequest& rReq) bool bWeb = dynamic_cast< SwWebDocShell *>( this ) != nullptr; const SfxFilter *pOwnFlt = SwDocShell::Factory().GetFilterContainer()-> - GetFilter4FilterName(OUString("writer8")); + GetFilter4FilterName("writer8"); // make sure the default file format is also available if(bWeb) @@ -573,7 +573,7 @@ void SwDocShell::Execute(SfxRequest& rReq) bMerge = bool(nFlags & SfxTemplateFlags::MERGE_STYLES); aOpt.SetMerge( !bMerge ); - SetError( LoadStylesFromFile( aFileName, aOpt, false ), OUString( OSL_LOG_PREFIX )); + SetError( LoadStylesFromFile( aFileName, aOpt, false ), OSL_LOG_PREFIX); if ( !GetError() ) rReq.Done(); } @@ -594,7 +594,7 @@ void SwDocShell::Execute(SfxRequest& rReq) // 3 - file saved in non-HTML -> QueryBox to save as HTML const SfxFilter* pHtmlFlt = SwIoSystem::GetFilterOfFormat( - OUString("HTML"), + "HTML", SwWebDocShell::Factory().GetFilterContainer() ); bool bLocalHasName = HasName(); if(bLocalHasName) @@ -925,7 +925,7 @@ void SwDocShell::Execute(SfxRequest& rReq) { // for HTML there is only one filter!! pFlt = SwIoSystem::GetFilterOfFormat( - OUString("HTML"), + "HTML", SwWebDocShell::Factory().GetFilterContainer() ); nStrId = STR_LOAD_HTML_DOC; } @@ -933,7 +933,7 @@ void SwDocShell::Execute(SfxRequest& rReq) { // for Global-documents we now only offer the current one. pFlt = SwGlobalDocShell::Factory().GetFilterContainer()-> - GetFilter4Extension( OUString("odm") ); + GetFilter4Extension( "odm" ); nStrId = STR_LOAD_GLOBAL_DOC; } diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx index c91b99d0bf0e..4fb66e70cc49 100644 --- a/sw/source/uibase/app/docshini.cxx +++ b/sw/source/uibase/app/docshini.cxx @@ -567,7 +567,7 @@ bool SwDocShell::Load( SfxMedium& rMedium ) UpdateFontList(); InitDrawModelAndDocShell(this, m_pDoc ? m_pDoc->getIDocumentDrawModelAccess().GetDrawModel() : 0); - SetError( nErr, OUString( OSL_LOG_PREFIX ) ); + SetError( nErr, OSL_LOG_PREFIX ); bRet = !IsError( nErr ); if (bRet && !m_pDoc->IsInLoadAsynchron() && @@ -616,7 +616,7 @@ bool SwDocShell::LoadFrom( SfxMedium& rMedium ) OSL_FAIL("Code removed!"); } - SetError( nErr, OUString( OSL_LOG_PREFIX ) ); + SetError( nErr, OSL_LOG_PREFIX ); bRet = !IsError( nErr ); } while( false ); diff --git a/sw/source/uibase/app/swdll.cxx b/sw/source/uibase/app/swdll.cxx index cff230ce9313..ae6862d2924d 100644 --- a/sw/source/uibase/app/swdll.cxx +++ b/sw/source/uibase/app/swdll.cxx @@ -102,12 +102,12 @@ SwDLL::SwDLL() SwModule* pModule = new SwModule( pWDocFact, pDocFact, pGlobDocFact ); *ppShlPtr = pModule; - pWDocFact->SetDocumentServiceName(OUString("com.sun.star.text.WebDocument")); + pWDocFact->SetDocumentServiceName("com.sun.star.text.WebDocument"); if (xOpt && xOpt->IsWriter()) { - pGlobDocFact->SetDocumentServiceName(OUString("com.sun.star.text.GlobalDocument")); - pDocFact->SetDocumentServiceName(OUString("com.sun.star.text.TextDocument")); + pGlobDocFact->SetDocumentServiceName("com.sun.star.text.GlobalDocument"); + pDocFact->SetDocumentServiceName("com.sun.star.text.TextDocument"); } // register SvDraw-Fields diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx index 9be3159c792f..d2d99939dd50 100644 --- a/sw/source/uibase/app/swmodule.cxx +++ b/sw/source/uibase/app/swmodule.cxx @@ -169,7 +169,7 @@ SwModule::SwModule( SfxObjectFactory* pWebFact, m_pDragDrop( 0 ), m_pXSelection( 0 ) { - SetName( OUString("StarWriter") ); + SetName( "StarWriter" ); pSwResMgr = GetResMgr(); SvxErrorHandler::ensure(); m_pErrorHandler = new SfxErrorHandler( RID_SW_ERRHDL, |