diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-30 16:38:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-31 08:56:20 +0000 |
commit | 1c3e84d8192218befebcddae2ed9842d081dc6c7 (patch) | |
tree | f4fc5cddd181d6d49bf55f74e6d3d107b8ae8d18 /sd | |
parent | e1e6cdbb1e9ff37f0bb740a70045c66953bec50c (diff) |
teach lolugin:stringconstant about calling constructors
so we can remove unnecessary calls to the OUString(literal) constructor
when calling constructors like this:
Foo(OUString("xxx"), 1)
Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36
Reviewed-on: https://gerrit.libreoffice.org/33698
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/sdmodeltestbase.hxx | 6 | ||||
-rw-r--r-- | sd/source/filter/eppt/pptx-epptbase.cxx | 2 | ||||
-rw-r--r-- | sd/source/filter/ppt/pptin.cxx | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/sd/qa/unit/sdmodeltestbase.hxx b/sd/qa/unit/sdmodeltestbase.hxx index bfbb64232454..68a3f220173c 100644 --- a/sd/qa/unit/sdmodeltestbase.hxx +++ b/sd/qa/unit/sdmodeltestbase.hxx @@ -130,7 +130,7 @@ protected: OUString::createFromAscii( pFmt->pTypeName ), 0, OUString(), OUString::createFromAscii( pFmt->pUserData ), - OUString("private:factory/simpress*") ); + "private:factory/simpress*" ); pFilter->SetVersion(SOFFICE_FILEFORMAT_CURRENT); std::shared_ptr<const SfxFilter> pFilt(pFilter); @@ -167,7 +167,7 @@ protected: OUString::createFromAscii(pFormat->pTypeName), 0, OUString(), OUString::createFromAscii(pFormat->pUserData), - OUString("private:factory/simpress*") )); + "private:factory/simpress*" )); const_cast<SfxFilter*>(pExportFilter.get())->SetVersion(SOFFICE_FILEFORMAT_CURRENT); aStoreMedium.SetFilter(pExportFilter); pShell->ConvertTo(aStoreMedium); @@ -186,7 +186,7 @@ protected: OUString::createFromAscii(pFormat->pTypeName), 0, OUString(), OUString::createFromAscii(pFormat->pUserData), - OUString("private:factory/simpress*") )); + "private:factory/simpress*" )); const_cast<SfxFilter*>(pExportFilter.get())->SetVersion(SOFFICE_FILEFORMAT_CURRENT); aStoreMedium.SetFilter(pExportFilter); pShell->DoSaveAs(aStoreMedium); diff --git a/sd/source/filter/eppt/pptx-epptbase.cxx b/sd/source/filter/eppt/pptx-epptbase.cxx index bd4b23235550..4a14713b9e60 100644 --- a/sd/source/filter/eppt/pptx-epptbase.cxx +++ b/sd/source/filter/eppt/pptx-epptbase.cxx @@ -170,7 +170,7 @@ void PPTWriterBase::exportPPT( const std::vector< css::beans::PropertyValue >& r if ( !InitSOIface() ) return; - FontCollectionEntry aDefaultFontDesc( OUString( "Times New Roman" ), + FontCollectionEntry aDefaultFontDesc( "Times New Roman", ROMAN, awt::FontPitch::VARIABLE, RTL_TEXTENCODING_MS_1252 ); diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index c7f443c8979c..0679a1e7d61c 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -105,7 +105,7 @@ SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SotSt sal_uInt32 nImportFlags = 0; #ifdef DBG_UTIL - PropRead* pSummaryInformation = new PropRead( rStorage, OUString( "\005SummaryInformation" ) ); + PropRead* pSummaryInformation = new PropRead( rStorage, "\005SummaryInformation" ); if ( pSummaryInformation->IsValid() ) { pSummaryInformation->Read(); @@ -254,7 +254,7 @@ bool ImplSdPPTImport::Import() SeekOle( pDocShell, mnFilterOptions ); // hyperlinks - PropRead* pDInfoSec2 = new PropRead( mrStorage, OUString( "\005DocumentSummaryInformation" ) ); + PropRead* pDInfoSec2 = new PropRead( mrStorage, "\005DocumentSummaryInformation" ); if ( pDInfoSec2->IsValid() ) { PropItem aPropItem; |