diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-10 12:37:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-11 09:26:28 +0200 |
commit | 2962ceec4b96758bec7e7a0390d5ec60e3ce708f (patch) | |
tree | 54b1f57a5ee59babeef28b2f624024cecef8f4c3 /sfx2 | |
parent | b5303563b785115075b5f9b7b4abccd8f9d916e2 (diff) |
remove some unnecessary temporary OUStrings
found with:
git grep -nP 'OUString\(\s*\w+\s*\)' | grep -v new | grep -v return
Change-Id: I923109b4339210aed2639e423fbc4d5f19233f02
Reviewed-on: https://gerrit.libreoffice.org/37463
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/fileobj.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/bastyp/helper.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/basedlgs.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/srchdlg.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/tabdlg.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/printhelper.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/view/frmload.cxx | 4 |
10 files changed, 15 insertions, 15 deletions
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx index 8cf53b51ea94..75d8038db66a 100644 --- a/sfx2/source/appl/fileobj.cxx +++ b/sfx2/source/appl/fileobj.cxx @@ -87,7 +87,7 @@ bool SvFileObject::GetData( css::uno::Any & rData, // The media in the application must be opened to lookup the // relative file links!! This is done through the link manager // of the Storage. - rData <<= OUString( sFileNm ); + rData <<= sFileNm; } break; @@ -191,7 +191,7 @@ bool SvFileObject::GetData( css::uno::Any & rData, break; case FILETYPE_OBJECT: // TODO/LATER: possibility to insert a new object - rData <<= OUString( sFileNm ); + rData <<= sFileNm; break; } return true/*0 != aTypeList.Count()*/; @@ -350,7 +350,7 @@ OUString impl_getFilter( const OUString& _rURL ) if ( xTypeDetection.is() ) { utl::MediaDescriptor aDescr; - aDescr[ utl::MediaDescriptor::PROP_URL() ] <<= OUString( _rURL ); + aDescr[ utl::MediaDescriptor::PROP_URL() ] <<= _rURL; css::uno::Sequence< css::beans::PropertyValue > aDescrList = aDescr.getAsConstPropertyValueList(); OUString sType = xTypeDetection->queryTypeByDescriptor( aDescrList, true ); diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx index e42be6dd3ac0..62126dd0d6f8 100644 --- a/sfx2/source/bastyp/helper.cxx +++ b/sfx2/source/bastyp/helper.cxx @@ -101,7 +101,7 @@ std::vector<OUString> SfxContentHelper::GetResultSet( const OUString& rURL ) aRow += aType; aRow += "\t"; aRow += xContentAccess->queryContentIdentifierString(); - aList.push_back( OUString( aRow ) ); + aList.push_back( aRow ); } } catch( const ucb::CommandAbortedException& ) diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index 7e6c4692553d..106f87b22982 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -636,7 +636,7 @@ IMPL_LINK_NOARG(SfxSingleTabDialog, OKHdl_Impl, Button*, void) } SvtViewOptions aPageOpt(EViewType::TabPage, sConfigId); - aPageOpt.SetUserItem( USERITEM_NAME, makeAny( OUString( sData ) ) ); + aPageOpt.SetUserItem( USERITEM_NAME, makeAny( sData ) ); EndDialog( RET_OK ); } else diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index d74c57e53f23..ccacc752731c 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -528,7 +528,7 @@ bool SfxDocumentInfoItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const } if ( bIsString ) - rVal <<= OUString( aValue ); + rVal <<= aValue; else if ( bIsInt ) rVal <<= nValue; else diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 16633aefb500..6ea2e62a316a 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -2011,7 +2011,7 @@ void FileDialogHelper_Impl::saveConfig() } if ( bWriteConfig ) - aDlgOpt.SetUserItem( USERITEM_NAME, makeAny( OUString( aUserData ) ) ); + aDlgOpt.SetUserItem( USERITEM_NAME, makeAny( aUserData ) ); } SfxApplication *pSfxApp = SfxGetpApp(); diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx index 757df710d019..df326ed7cc69 100644 --- a/sfx2/source/dialog/srchdlg.cxx +++ b/sfx2/source/dialog/srchdlg.cxx @@ -125,7 +125,7 @@ void SearchDialog::SaveConfig() sUserData += ";"; sUserData += OUString::number( m_pBackwardsBox->IsChecked() ? 1 : 0 ); - Any aUserItem = makeAny( OUString( sUserData ) ); + Any aUserItem = makeAny( sUserData ); aViewOpt.SetUserItem( "UserItem", aUserItem ); } diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index 04bb0d07d19d..e4910a28e06c 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -359,7 +359,7 @@ void SfxTabDialog::dispose() } SvtViewOptions aPageOpt(EViewType::TabPage, sConfigId); - aPageOpt.SetUserItem( USERITEM_NAME, makeAny( OUString( aPageData ) ) ); + aPageOpt.SetUserItem( USERITEM_NAME, makeAny( aPageData ) ); } pDataObject->pTabPage.disposeAndClear(); @@ -663,7 +663,7 @@ void SfxTabDialog::RemoveTabPage( sal_uInt16 nId ) } SvtViewOptions aPageOpt(EViewType::TabPage, sConfigId); - aPageOpt.SetUserItem( USERITEM_NAME, makeAny( OUString( aPageData ) ) ); + aPageOpt.SetUserItem( USERITEM_NAME, makeAny( aPageData ) ); } pDataObject->pTabPage.disposeAndClear(); diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index d102167352c8..979429bb9829 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -2377,7 +2377,7 @@ void SfxMedium::GetMedium_Impl() { if ( bFromTempFile ) { - aMedium[utl::MediaDescriptor::PROP_URL()] <<= OUString( aFileName ); + aMedium[utl::MediaDescriptor::PROP_URL()] <<= aFileName; aMedium.erase( utl::MediaDescriptor::PROP_READONLY() ); aMedium.addInputStream(); } diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx index f0d2bac19464..5e14dc699f69 100644 --- a/sfx2/source/doc/printhelper.cxx +++ b/sfx2/source/doc/printhelper.cxx @@ -551,7 +551,7 @@ class ImplUCBPrintWatcher : public ::osl::Thread aTarget.transferContent( aSource, ::ucbhelper::InsertOperation::Copy, - OUString(sFileName), + sFileName, css::ucb::NameClash::OVERWRITE); } } @@ -652,7 +652,7 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >& // and append the local filename aCheckedArgs.realloc( aCheckedArgs.getLength()+1 ); aCheckedArgs[nProps].Name = "LocalFileName"; - aCheckedArgs[nProps++].Value <<= OUString( sTemp ); + aCheckedArgs[nProps++].Value <<= sTemp; } else // It's a valid URL. but now we must know, if it is a local one or not. diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx index 7e5a4be0e59e..b68b8ab61189 100644 --- a/sfx2/source/view/frmload.cxx +++ b/sfx2/source/view/frmload.cxx @@ -438,8 +438,8 @@ bool SfxFrameLoader_Impl::impl_determineTemplateDocument( ::comphelper::NamedVal if ( pTemplateFilter ) { // load the template document, but, well, "as template" - io_rDescriptor.put( "FilterName", OUString( pTemplateFilter->GetName() ) ); - io_rDescriptor.put( "FileName", OUString( sTemplateURL ) ); + io_rDescriptor.put( "FilterName", pTemplateFilter->GetName() ); + io_rDescriptor.put( "FileName", sTemplateURL ); io_rDescriptor.put( "AsTemplate", true ); // #i21583# |