summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-30 16:38:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-31 08:56:20 +0000
commit1c3e84d8192218befebcddae2ed9842d081dc6c7 (patch)
treef4fc5cddd181d6d49bf55f74e6d3d107b8ae8d18 /vcl
parente1e6cdbb1e9ff37f0bb740a70045c66953bec50c (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 'vcl')
-rw-r--r--vcl/qa/cppunit/BitmapTest.cxx4
-rw-r--r--vcl/source/filter/wmf/enhwmf.cxx2
-rw-r--r--vcl/source/font/PhysicalFontCollection.cxx4
-rw-r--r--vcl/source/gdi/configsettings.cxx4
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx9
-rw-r--r--vcl/unx/generic/dtrans/config.cxx2
6 files changed, 11 insertions, 14 deletions
diff --git a/vcl/qa/cppunit/BitmapTest.cxx b/vcl/qa/cppunit/BitmapTest.cxx
index 35b31fdf7fb5..8259ba4b80d4 100644
--- a/vcl/qa/cppunit/BitmapTest.cxx
+++ b/vcl/qa/cppunit/BitmapTest.cxx
@@ -126,7 +126,7 @@ void BitmapTest::testScale()
if (bExportBitmap)
{
- SvFileStream aStream(OUString("~/scale_before.png"), StreamMode::WRITE | StreamMode::TRUNC);
+ SvFileStream aStream("~/scale_before.png", StreamMode::WRITE | StreamMode::TRUNC);
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
rFilter.compressAsPNG(aBitmap24Bit, aStream);
}
@@ -142,7 +142,7 @@ void BitmapTest::testScale()
if (bExportBitmap)
{
- SvFileStream aStream(OUString("~/scale_after.png"), StreamMode::WRITE | StreamMode::TRUNC);
+ SvFileStream aStream("~/scale_after.png", StreamMode::WRITE | StreamMode::TRUNC);
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
rFilter.compressAsPNG(aBitmap24Bit, aStream);
}
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index d4641c6bd98c..bb6d856a7dd2 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -1351,7 +1351,7 @@ bool EnhWMFReader::ReadEnhWMF()
if(bDoSaveForVisualControl)
{
- SvFileStream aNew(OUString("c:\\metafile_content.png"), StreamMode::WRITE|StreamMode::TRUNC);
+ SvFileStream aNew("c:\\metafile_content.png", StreamMode::WRITE|StreamMode::TRUNC);
vcl::PNGWriter aPNGWriter(aBitmapEx);
aPNGWriter.Write(aNew);
}
diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx
index f90abfa7473c..49082a15ccdb 100644
--- a/vcl/source/font/PhysicalFontCollection.cxx
+++ b/vcl/source/font/PhysicalFontCollection.cxx
@@ -869,7 +869,7 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindFontFamilyOfDefaultFont() co
if (!utl::ConfigManager::IsAvoidConfig())
{
const utl::DefaultFontConfiguration& rDefaults = utl::DefaultFontConfiguration::get();
- LanguageTag aLanguageTag( OUString( "en"));
+ LanguageTag aLanguageTag("en");
OUString aFontname = rDefaults.getDefaultFont( aLanguageTag, DefaultFontType::SANS_UNICODE );
pFoundData = FindFontFamilyByTokenNames( aFontname );
@@ -1190,7 +1190,7 @@ PhysicalFontFamily* PhysicalFontCollection::FindFontFamily( FontSelectPattern& r
// if a target symbol font is not available use a default symbol font
if( rFSD.IsSymbolFont() )
{
- LanguageTag aDefaultLanguageTag( OUString( "en"));
+ LanguageTag aDefaultLanguageTag("en");
if (utl::ConfigManager::IsAvoidConfig())
aSearchName = "OpenSymbol";
else
diff --git a/vcl/source/gdi/configsettings.cxx b/vcl/source/gdi/configsettings.cxx
index 3e0497d81b4b..0fee77e37dfe 100644
--- a/vcl/source/gdi/configsettings.cxx
+++ b/vcl/source/gdi/configsettings.cxx
@@ -44,9 +44,7 @@ SettingsConfigItem* SettingsConfigItem::get()
}
SettingsConfigItem::SettingsConfigItem()
- :
- ConfigItem( OUString( SETTINGS_CONFIGNODE ),
- ConfigItemMode::DelayedUpdate ),
+ : ConfigItem( SETTINGS_CONFIGNODE, ConfigItemMode::DelayedUpdate ),
m_aSettings( 0 )
{
getValues();
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 2dd646477ee3..11c0de15ea11 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -4224,7 +4224,7 @@ void PDFWriterImpl::createDefaultPushButtonAppearance( PDFWidget& rButton, const
// (that is before endRedirect())
OStringBuffer aDA( 256 );
appendNonStrokingColor( replaceColor( rWidget.TextColor, rSettings.GetButtonTextColor() ), aDA );
- Font aDummyFont( OUString( "Helvetica" ), aFont.GetFontSize() );
+ Font aDummyFont( "Helvetica", aFont.GetFontSize() );
sal_Int32 nDummyBuiltin = getBestBuiltinFont( aDummyFont );
aDA.append( ' ' );
aDA.append( m_aBuiltinFonts[nDummyBuiltin].getNameObject() );
@@ -4455,7 +4455,7 @@ void PDFWriterImpl::createDefaultCheckBoxAppearance( PDFWidget& rBox, const PDFW
OStringBuffer aDA( 256 );
appendNonStrokingColor( replaceColor( rWidget.TextColor, rSettings.GetRadioCheckTextColor() ), aDA );
- sal_Int32 nBest = getBestBuiltinFont( Font( OUString( "ZapfDingbats" ), aFont.GetFontSize() ) );
+ sal_Int32 nBest = getBestBuiltinFont( Font( "ZapfDingbats", aFont.GetFontSize() ) );
aDA.append( ' ' );
aDA.append( m_aBuiltinFonts[nBest].getNameObject() );
aDA.append( " 0 Tf" );
@@ -4559,7 +4559,7 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P
OStringBuffer aDA( 256 );
appendNonStrokingColor( replaceColor( rWidget.TextColor, rSettings.GetRadioCheckTextColor() ), aDA );
- sal_Int32 nBest = getBestBuiltinFont( Font( OUString( "ZapfDingbats" ), aFont.GetFontSize() ) );
+ sal_Int32 nBest = getBestBuiltinFont( Font( "ZapfDingbats", aFont.GetFontSize() ) );
aDA.append( ' ' );
aDA.append( m_aBuiltinFonts[nBest].getNameObject() );
aDA.append( " 0 Tf" );
@@ -7465,8 +7465,7 @@ sal_Int32 PDFWriterImpl::emitNamedDestinations()
// directly with a reader (provided the reader has the feature) we
// need to set the name of the destination the same way it will be encoded
// in an Internet link
- INetURLObject aLocalURL(
- OUString( "http://ahost.ax" ) ); //dummy location, won't be used
+ INetURLObject aLocalURL( "http://ahost.ax" ); //dummy location, won't be used
aLocalURL.SetMark( rDest.m_aDestName );
const OUString aName = aLocalURL.GetMark( INetURLObject::DecodeMechanism::NONE ); //same coding as
diff --git a/vcl/unx/generic/dtrans/config.cxx b/vcl/unx/generic/dtrans/config.cxx
index 8f0894fa7512..cbd7d57770ba 100644
--- a/vcl/unx/generic/dtrans/config.cxx
+++ b/vcl/unx/generic/dtrans/config.cxx
@@ -66,7 +66,7 @@ sal_Int32 SelectionManager::getSelectionTimeout()
*/
DtransX11ConfigItem::DtransX11ConfigItem() :
- ConfigItem( OUString( SETTINGS_CONFIGNODE ),
+ ConfigItem( SETTINGS_CONFIGNODE,
ConfigItemMode::DelayedUpdate ),
m_nSelectionTimeout( 3 )
{