summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-13 14:29:59 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-17 09:57:35 +0100
commit8ef6067596cf4b2c52fbce94b44bf7af9fefa643 (patch)
treef4cca1a99ba97683b14fa6fe0f1f45f75bf855c2 /vcl
parent75bada928cf08d2afc6efe52ba99b45088bc9eec (diff)
loplugin:stringviewparam check methods too
not just functions Change-Id: Icca295dd159002b428b73f2c95d40725434f04d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105789 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/graphic/Manager.hxx3
-rw-r--r--vcl/inc/unx/gtk/gtksalmenu.hxx2
-rw-r--r--vcl/qa/cppunit/GraphicDescriptorTest.cxx8
-rw-r--r--vcl/qa/cppunit/GraphicTest.cxx18
-rw-r--r--vcl/qa/cppunit/graphicfilter/filters-test.cxx10
-rw-r--r--vcl/source/filter/FilterConfigCache.cxx16
-rw-r--r--vcl/source/filter/FilterConfigCache.hxx16
-rw-r--r--vcl/source/filter/GraphicNativeTransform.cxx8
-rw-r--r--vcl/source/filter/graphicfilter.cxx22
-rw-r--r--vcl/source/graphic/GraphicObject.cxx2
-rw-r--r--vcl/source/graphic/Manager.cxx16
-rw-r--r--vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx2
-rw-r--r--vcl/unx/gtk3/fpicker/SalGtkFilePicker.hxx2
-rw-r--r--vcl/unx/gtk3/gtk3gtksalmenu.cxx4
14 files changed, 65 insertions, 64 deletions
diff --git a/vcl/inc/graphic/Manager.hxx b/vcl/inc/graphic/Manager.hxx
index 73a6676e4d7b..51b68d95c4c4 100644
--- a/vcl/inc/graphic/Manager.hxx
+++ b/vcl/inc/graphic/Manager.hxx
@@ -40,7 +40,8 @@ private:
Manager();
- void registerGraphic(const std::shared_ptr<ImpGraphic>& rImpGraphic, OUString const& rsContext);
+ void registerGraphic(const std::shared_ptr<ImpGraphic>& rImpGraphic,
+ std::u16string_view rsContext);
DECL_LINK(SwapOutTimerHandler, Timer*, void);
diff --git a/vcl/inc/unx/gtk/gtksalmenu.hxx b/vcl/inc/unx/gtk/gtksalmenu.hxx
index 4bac1fe53d62..d9aa403de9bd 100644
--- a/vcl/inc/unx/gtk/gtksalmenu.hxx
+++ b/vcl/inc/unx/gtk/gtksalmenu.hxx
@@ -102,7 +102,7 @@ public:
bool bIsSubmenu );
void NativeSetEnableItem( gchar const * aCommand, gboolean bEnable );
void NativeCheckItem( unsigned nSection, unsigned nItemPos, MenuItemBits bits, gboolean bCheck );
- void NativeSetAccelerator( unsigned nSection, unsigned nItemPos, const vcl::KeyCode& rKeyCode, const OUString& rKeyName );
+ void NativeSetAccelerator( unsigned nSection, unsigned nItemPos, const vcl::KeyCode& rKeyCode, std::u16string_view rKeyName );
static void DispatchCommand(const gchar* pMenuCommand);
static void Activate(const gchar* pMenuCommand);
diff --git a/vcl/qa/cppunit/GraphicDescriptorTest.cxx b/vcl/qa/cppunit/GraphicDescriptorTest.cxx
index eec8f49f94f0..13f51262c233 100644
--- a/vcl/qa/cppunit/GraphicDescriptorTest.cxx
+++ b/vcl/qa/cppunit/GraphicDescriptorTest.cxx
@@ -42,7 +42,7 @@ BitmapEx createBitmap()
return BitmapEx(aBitmap);
}
-void createBitmapAndExportForType(SvStream& rStream, OUString const& sType)
+void createBitmapAndExportForType(SvStream& rStream, std::u16string_view sType)
{
BitmapEx aBitmapEx = createBitmap();
@@ -57,7 +57,7 @@ void createBitmapAndExportForType(SvStream& rStream, OUString const& sType)
void GraphicDescriptorTest::testDetectPNG()
{
SvMemoryStream aStream;
- createBitmapAndExportForType(aStream, "png");
+ createBitmapAndExportForType(aStream, u"png");
GraphicDescriptor aDescriptor(aStream, nullptr);
aDescriptor.Detect(true);
@@ -71,7 +71,7 @@ void GraphicDescriptorTest::testDetectPNG()
void GraphicDescriptorTest::testDetectJPG()
{
SvMemoryStream aStream;
- createBitmapAndExportForType(aStream, "jpg");
+ createBitmapAndExportForType(aStream, u"jpg");
GraphicDescriptor aDescriptor(aStream, nullptr);
aDescriptor.Detect(true);
@@ -85,7 +85,7 @@ void GraphicDescriptorTest::testDetectJPG()
void GraphicDescriptorTest::testDetectGIF()
{
SvMemoryStream aStream;
- createBitmapAndExportForType(aStream, "gif");
+ createBitmapAndExportForType(aStream, u"gif");
GraphicDescriptor aDescriptor(aStream, nullptr);
aDescriptor.Detect(true);
diff --git a/vcl/qa/cppunit/GraphicTest.cxx b/vcl/qa/cppunit/GraphicTest.cxx
index fd669c4d347a..50ff4a133f86 100644
--- a/vcl/qa/cppunit/GraphicTest.cxx
+++ b/vcl/qa/cppunit/GraphicTest.cxx
@@ -90,7 +90,7 @@ BitmapEx createBitmap(bool alpha = false)
}
}
-void createBitmapAndExportForType(SvStream& rStream, OUString const& sType, bool alpha)
+void createBitmapAndExportForType(SvStream& rStream, std::u16string_view sType, bool alpha)
{
BitmapEx aBitmapEx = createBitmap(alpha);
@@ -102,7 +102,7 @@ void createBitmapAndExportForType(SvStream& rStream, OUString const& sType, bool
rStream.Seek(STREAM_SEEK_TO_BEGIN);
}
-Graphic makeUnloadedGraphic(OUString const& sType, bool alpha = false)
+Graphic makeUnloadedGraphic(std::u16string_view sType, bool alpha = false)
{
SvMemoryStream aStream;
GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
@@ -181,7 +181,7 @@ char const PDFEXPORT_DATA_DIRECTORY[] = "/vcl/qa/cppunit/pdfexport/data/";
void GraphicTest::testUnloadedGraphic()
{
// make unloaded test graphic
- Graphic aGraphic = makeUnloadedGraphic("png");
+ Graphic aGraphic = makeUnloadedGraphic(u"png");
Graphic aGraphic2 = aGraphic;
// check available
@@ -193,7 +193,7 @@ void GraphicTest::testUnloadedGraphic()
CPPUNIT_ASSERT_EQUAL(true, aGraphic2.isAvailable());
// check GetSizePixel doesn't load graphic
- aGraphic = makeUnloadedGraphic("png");
+ aGraphic = makeUnloadedGraphic(u"png");
CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
CPPUNIT_ASSERT_EQUAL(tools::Long(120), aGraphic.GetSizePixel().Width());
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aGraphic.GetSizePixel().Height());
@@ -210,7 +210,7 @@ void GraphicTest::testUnloadedGraphic()
CPPUNIT_ASSERT_EQUAL(true, aGraphic.isAvailable());
//check Type
- aGraphic = makeUnloadedGraphic("png");
+ aGraphic = makeUnloadedGraphic(u"png");
CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
CPPUNIT_ASSERT_EQUAL(GraphicType::Bitmap, aGraphic.GetType());
CPPUNIT_ASSERT_EQUAL(true, aGraphic.makeAvailable());
@@ -245,7 +245,7 @@ void GraphicTest::testUnloadedGraphicWmf()
BitmapEx aBitmapEx = createBitmap();
SvMemoryStream aStream;
GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
- sal_uInt16 nFilterFormat = rGraphicFilter.GetExportFormatNumberForShortName("wmf");
+ sal_uInt16 nFilterFormat = rGraphicFilter.GetExportFormatNumberForShortName(u"wmf");
Graphic aGraphic(aBitmapEx);
aGraphic.SetPrefSize(Size(99, 99));
aGraphic.SetPrefMapMode(MapMode(MapUnit::Map100thMM));
@@ -267,14 +267,14 @@ void GraphicTest::testUnloadedGraphicWmf()
void GraphicTest::testUnloadedGraphicAlpha()
{
// make unloaded test graphic with alpha
- Graphic aGraphic = makeUnloadedGraphic("png", true);
+ Graphic aGraphic = makeUnloadedGraphic(u"png", true);
CPPUNIT_ASSERT_EQUAL(true, aGraphic.IsAlpha());
CPPUNIT_ASSERT_EQUAL(true, aGraphic.IsTransparent());
CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
// make unloaded test graphic without alpha
- aGraphic = makeUnloadedGraphic("png", false);
+ aGraphic = makeUnloadedGraphic(u"png", false);
CPPUNIT_ASSERT_EQUAL(false, aGraphic.IsAlpha());
CPPUNIT_ASSERT_EQUAL(false, aGraphic.IsTransparent());
@@ -301,7 +301,7 @@ void GraphicTest::testUnloadedGraphicSizeUnit()
void GraphicTest::testSwapping()
{
// Prepare Graphic from a PNG image first
- Graphic aGraphic = makeUnloadedGraphic("png");
+ Graphic aGraphic = makeUnloadedGraphic(u"png");
CPPUNIT_ASSERT_EQUAL(GraphicType::Bitmap, aGraphic.GetType());
CPPUNIT_ASSERT_EQUAL(true, aGraphic.makeAvailable());
diff --git a/vcl/qa/cppunit/graphicfilter/filters-test.cxx b/vcl/qa/cppunit/graphicfilter/filters-test.cxx
index 8020848b6e38..fe7485e3944a 100644
--- a/vcl/qa/cppunit/graphicfilter/filters-test.cxx
+++ b/vcl/qa/cppunit/graphicfilter/filters-test.cxx
@@ -39,7 +39,7 @@ public:
const OUString &rURL, const OUString &,
SfxFilterFlags, SotClipboardFormatId, unsigned int) override;
- void checkExportImport(const OUString& aFilterShortName);
+ void checkExportImport(std::u16string_view aFilterShortName);
/**
* Ensure CVEs remain unbroken
@@ -103,7 +103,7 @@ void VclFiltersTest::testScaling()
}
}
-void VclFiltersTest::checkExportImport(const OUString& aFilterShortName)
+void VclFiltersTest::checkExportImport(std::u16string_view aFilterShortName)
{
Bitmap aBitmap( Size( 100, 100 ), 24 );
aBitmap.Erase(COL_WHITE);
@@ -139,11 +139,11 @@ void VclFiltersTest::checkExportImport(const OUString& aFilterShortName)
void VclFiltersTest::testExportImport()
{
fprintf(stderr, "Check ExportImport JPG\n");
- checkExportImport("jpg");
+ checkExportImport(u"jpg");
fprintf(stderr, "Check ExportImport PNG\n");
- checkExportImport("png");
+ checkExportImport(u"png");
fprintf(stderr, "Check ExportImport BMP\n");
- checkExportImport("bmp");
+ checkExportImport(u"bmp");
}
void VclFiltersTest::testCVEs()
diff --git a/vcl/source/filter/FilterConfigCache.cxx b/vcl/source/filter/FilterConfigCache.cxx
index 797466366d2a..a315c0279b69 100644
--- a/vcl/source/filter/FilterConfigCache.cxx
+++ b/vcl/source/filter/FilterConfigCache.cxx
@@ -306,7 +306,7 @@ OUString FilterConfigCache::GetImportFilterName( sal_uInt16 nFormat )
return OUString();
}
-sal_uInt16 FilterConfigCache::GetImportFormatNumber( const OUString& rFormatName )
+sal_uInt16 FilterConfigCache::GetImportFormatNumber( std::u16string_view rFormatName )
{
sal_uInt16 nPos = 0;
for (auto const& elem : aImport)
@@ -319,7 +319,7 @@ sal_uInt16 FilterConfigCache::GetImportFormatNumber( const OUString& rFormatName
}
/// get the index of the filter that matches this extension
-sal_uInt16 FilterConfigCache::GetImportFormatNumberForExtension( const OUString& rExt )
+sal_uInt16 FilterConfigCache::GetImportFormatNumberForExtension( std::u16string_view rExt )
{
sal_uInt16 nPos = 0;
for (auto const& elem : aImport)
@@ -334,7 +334,7 @@ sal_uInt16 FilterConfigCache::GetImportFormatNumberForExtension( const OUString&
return GRFILTER_FORMAT_NOTFOUND;
}
-sal_uInt16 FilterConfigCache::GetImportFormatNumberForShortName( const OUString& rShortName )
+sal_uInt16 FilterConfigCache::GetImportFormatNumberForShortName( std::u16string_view rShortName )
{
sal_uInt16 nPos = 0;
for (auto & elem : aImport)
@@ -346,7 +346,7 @@ sal_uInt16 FilterConfigCache::GetImportFormatNumberForShortName( const OUString&
return GRFILTER_FORMAT_NOTFOUND;
}
-sal_uInt16 FilterConfigCache::GetImportFormatNumberForTypeName( const OUString& rType )
+sal_uInt16 FilterConfigCache::GetImportFormatNumberForTypeName( std::u16string_view rType )
{
sal_uInt16 nPos = 0;
for (auto const& elem : aImport)
@@ -435,7 +435,7 @@ OUString FilterConfigCache::GetExportFilterName( sal_uInt16 nFormat )
return OUString();
}
-sal_uInt16 FilterConfigCache::GetExportFormatNumber(const OUString& rFormatName)
+sal_uInt16 FilterConfigCache::GetExportFormatNumber(std::u16string_view rFormatName)
{
sal_uInt16 nPos = 0;
for (auto const& elem : aExport)
@@ -447,7 +447,7 @@ sal_uInt16 FilterConfigCache::GetExportFormatNumber(const OUString& rFormatName)
return GRFILTER_FORMAT_NOTFOUND;
}
-sal_uInt16 FilterConfigCache::GetExportFormatNumberForMediaType( const OUString& rMediaType )
+sal_uInt16 FilterConfigCache::GetExportFormatNumberForMediaType( std::u16string_view rMediaType )
{
sal_uInt16 nPos = 0;
for (auto const& elem : aExport)
@@ -459,7 +459,7 @@ sal_uInt16 FilterConfigCache::GetExportFormatNumberForMediaType( const OUString&
return GRFILTER_FORMAT_NOTFOUND;
}
-sal_uInt16 FilterConfigCache::GetExportFormatNumberForShortName( const OUString& rShortName )
+sal_uInt16 FilterConfigCache::GetExportFormatNumberForShortName( std::u16string_view rShortName )
{
sal_uInt16 nPos = 0;
for (auto & elem : aExport)
@@ -471,7 +471,7 @@ sal_uInt16 FilterConfigCache::GetExportFormatNumberForShortName( const OUString&
return GRFILTER_FORMAT_NOTFOUND;
}
-sal_uInt16 FilterConfigCache::GetExportFormatNumberForTypeName( const OUString& rType )
+sal_uInt16 FilterConfigCache::GetExportFormatNumberForTypeName( std::u16string_view rType )
{
sal_uInt16 nPos = 0;
for (auto const& elem : aExport)
diff --git a/vcl/source/filter/FilterConfigCache.hxx b/vcl/source/filter/FilterConfigCache.hxx
index ec1c2dc46743..4860bbc6f38b 100644
--- a/vcl/source/filter/FilterConfigCache.hxx
+++ b/vcl/source/filter/FilterConfigCache.hxx
@@ -65,10 +65,10 @@ public:
sal_uInt16 GetImportFormatCount() const
{ return sal::static_int_cast< sal_uInt16 >(aImport.size()); };
- sal_uInt16 GetImportFormatNumber( const OUString& rFormatName );
- sal_uInt16 GetImportFormatNumberForShortName( const OUString& rShortName );
- sal_uInt16 GetImportFormatNumberForTypeName( const OUString& rType );
- sal_uInt16 GetImportFormatNumberForExtension( const OUString& rExt );
+ sal_uInt16 GetImportFormatNumber( std::u16string_view rFormatName );
+ sal_uInt16 GetImportFormatNumberForShortName( std::u16string_view rShortName );
+ sal_uInt16 GetImportFormatNumberForTypeName( std::u16string_view rType );
+ sal_uInt16 GetImportFormatNumberForExtension( std::u16string_view rExt );
OUString GetImportFilterName( sal_uInt16 nFormat );
OUString GetImportFormatName( sal_uInt16 nFormat );
OUString GetImportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry = 0);
@@ -84,10 +84,10 @@ public:
sal_uInt16 GetExportFormatCount() const
{ return sal::static_int_cast< sal_uInt16 >(aExport.size()); };
- sal_uInt16 GetExportFormatNumber( const OUString& rFormatName );
- sal_uInt16 GetExportFormatNumberForMediaType( const OUString& rMediaType );
- sal_uInt16 GetExportFormatNumberForShortName( const OUString& rShortName );
- sal_uInt16 GetExportFormatNumberForTypeName( const OUString& rType );
+ sal_uInt16 GetExportFormatNumber( std::u16string_view rFormatName );
+ sal_uInt16 GetExportFormatNumberForMediaType( std::u16string_view rMediaType );
+ sal_uInt16 GetExportFormatNumberForShortName( std::u16string_view rShortName );
+ sal_uInt16 GetExportFormatNumberForTypeName( std::u16string_view rType );
OUString GetExportFilterName( sal_uInt16 nFormat );
OUString GetExportFormatName( sal_uInt16 nFormat );
OUString GetExportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry = 0 );
diff --git a/vcl/source/filter/GraphicNativeTransform.cxx b/vcl/source/filter/GraphicNativeTransform.cxx
index d6c77c71caba..d1bb5abb547b 100644
--- a/vcl/source/filter/GraphicNativeTransform.cxx
+++ b/vcl/source/filter/GraphicNativeTransform.cxx
@@ -57,11 +57,11 @@ void GraphicNativeTransform::rotate(Degree10 aInputRotation)
}
else if (aLink.GetType() == GfxLinkType::NativePng)
{
- rotateGeneric(aRotation, "png");
+ rotateGeneric(aRotation, u"png");
}
else if (aLink.GetType() == GfxLinkType::NativeGif)
{
- rotateGeneric(aRotation, "gif");
+ rotateGeneric(aRotation, u"gif");
}
else if (aLink.GetType() == GfxLinkType::NONE)
{
@@ -83,7 +83,7 @@ bool GraphicNativeTransform::rotateBitmapOnly(Degree10 aRotation)
return true;
}
-bool GraphicNativeTransform::rotateGeneric(Degree10 aRotation, const OUString& aType)
+bool GraphicNativeTransform::rotateGeneric(Degree10 aRotation, std::u16string_view aType)
{
// Can't rotate animations yet
if (mrGraphic.IsAnimated())
@@ -124,7 +124,7 @@ void GraphicNativeTransform::rotateJPEG(Degree10 aRotation)
if (aBitmap.GetSizePixel().Width() % 16 != 0 || aBitmap.GetSizePixel().Height() % 16 != 0)
{
- rotateGeneric(aRotation, "png");
+ rotateGeneric(aRotation, u"png");
}
else
{
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 6d0252648d77..6d983008544f 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -838,17 +838,17 @@ sal_uInt16 GraphicFilter::GetImportFormatCount() const
return pConfig->GetImportFormatCount();
}
-sal_uInt16 GraphicFilter::GetImportFormatNumber( const OUString& rFormatName )
+sal_uInt16 GraphicFilter::GetImportFormatNumber( std::u16string_view rFormatName )
{
return pConfig->GetImportFormatNumber( rFormatName );
}
-sal_uInt16 GraphicFilter::GetImportFormatNumberForShortName( const OUString& rShortName )
+sal_uInt16 GraphicFilter::GetImportFormatNumberForShortName( std::u16string_view rShortName )
{
return pConfig->GetImportFormatNumberForShortName( rShortName );
}
-sal_uInt16 GraphicFilter::GetImportFormatNumberForTypeName( const OUString& rType )
+sal_uInt16 GraphicFilter::GetImportFormatNumberForTypeName( std::u16string_view rType )
{
return pConfig->GetImportFormatNumberForTypeName( rType );
}
@@ -885,17 +885,17 @@ sal_uInt16 GraphicFilter::GetExportFormatCount() const
return pConfig->GetExportFormatCount();
}
-sal_uInt16 GraphicFilter::GetExportFormatNumber( const OUString& rFormatName )
+sal_uInt16 GraphicFilter::GetExportFormatNumber( std::u16string_view rFormatName )
{
return pConfig->GetExportFormatNumber( rFormatName );
}
-sal_uInt16 GraphicFilter::GetExportFormatNumberForMediaType( const OUString& rMediaType )
+sal_uInt16 GraphicFilter::GetExportFormatNumberForMediaType( std::u16string_view rMediaType )
{
return pConfig->GetExportFormatNumberForMediaType( rMediaType );
}
-sal_uInt16 GraphicFilter::GetExportFormatNumberForShortName( const OUString& rShortName )
+sal_uInt16 GraphicFilter::GetExportFormatNumberForShortName( std::u16string_view rShortName )
{
return pConfig->GetExportFormatNumberForShortName( rShortName );
}
@@ -905,7 +905,7 @@ OUString GraphicFilter::GetExportInternalFilterName( sal_uInt16 nFormat )
return pConfig->GetExportInternalFilterName( nFormat );
}
-sal_uInt16 GraphicFilter::GetExportFormatNumberForTypeName( const OUString& rType )
+sal_uInt16 GraphicFilter::GetExportFormatNumberForTypeName( std::u16string_view rType )
{
return pConfig->GetExportFormatNumberForTypeName( rType );
}
@@ -2210,7 +2210,7 @@ IMPL_LINK( GraphicFilter, FilterCallback, ConvertData&, rData, bool )
bool bRet = false;
sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW;
- OString aShortName;
+ OUString aShortName;
css::uno::Sequence< css::beans::PropertyValue > aFilterData;
switch( rData.mnFormat )
{
@@ -2232,7 +2232,7 @@ IMPL_LINK( GraphicFilter, FilterCallback, ConvertData&, rData, bool )
if( GraphicType::NONE == rData.maGraphic.GetType() || rData.maGraphic.GetReaderContext() ) // Import
{
// Import
- nFormat = GetImportFormatNumberForShortName( OStringToOUString( aShortName, RTL_TEXTENCODING_UTF8) );
+ nFormat = GetImportFormatNumberForShortName( aShortName );
bRet = ImportGraphic( rData.maGraphic, OUString(), rData.mrStm, nFormat ) == ERRCODE_NONE;
}
else if( !aShortName.isEmpty() )
@@ -2247,7 +2247,7 @@ IMPL_LINK( GraphicFilter, FilterCallback, ConvertData&, rData, bool )
aFilterData[aFilterData.getLength() - 1].Value <<= static_cast<sal_Int32>(1);
}
#endif
- nFormat = GetExportFormatNumberForShortName( OStringToOUString(aShortName, RTL_TEXTENCODING_UTF8) );
+ nFormat = GetExportFormatNumberForShortName( aShortName );
bRet = ExportGraphic( rData.maGraphic, OUString(), rData.mrStm, nFormat, &aFilterData ) == ERRCODE_NONE;
}
@@ -2330,7 +2330,7 @@ ErrCode GraphicFilter::compressAsPNG(const Graphic& rGraphic, SvStream& rOutputS
aFilterData[0].Name = "Compression";
aFilterData[0].Value <<= sal_uInt32(9);
- sal_uInt16 nFilterFormat = GetExportFormatNumberForShortName("PNG");
+ sal_uInt16 nFilterFormat = GetExportFormatNumberForShortName(u"PNG");
return ExportGraphic(rGraphic, OUString(), rOutputStream, nFilterFormat, &aFilterData);
}
diff --git a/vcl/source/graphic/GraphicObject.cxx b/vcl/source/graphic/GraphicObject.cxx
index a34e8a064d46..6728ab5d170e 100644
--- a/vcl/source/graphic/GraphicObject.cxx
+++ b/vcl/source/graphic/GraphicObject.cxx
@@ -607,7 +607,7 @@ void GraphicObject::SetGraphic( const Graphic& rGraphic, const GraphicObject* /*
maGraphic = rGraphic;
}
-void GraphicObject::SetGraphic( const Graphic& rGraphic, const OUString& /*rLink*/ )
+void GraphicObject::SetGraphic( const Graphic& rGraphic, std::u16string_view /*rLink*/ )
{
SetGraphic( rGraphic );
}
diff --git a/vcl/source/graphic/Manager.cxx b/vcl/source/graphic/Manager.cxx
index 7a25f8e41b04..6bcd709480e8 100644
--- a/vcl/source/graphic/Manager.cxx
+++ b/vcl/source/graphic/Manager.cxx
@@ -125,7 +125,7 @@ IMPL_LINK(Manager, SwapOutTimerHandler, Timer*, pTimer, void)
}
void Manager::registerGraphic(const std::shared_ptr<ImpGraphic>& pImpGraphic,
- OUString const& /*rsContext*/)
+ std::u16string_view /*rsContext*/)
{
std::scoped_lock<std::recursive_mutex> aGuard(maMutex);
@@ -167,28 +167,28 @@ void Manager::unregisterGraphic(ImpGraphic* pImpGraphic)
std::shared_ptr<ImpGraphic> Manager::copy(std::shared_ptr<ImpGraphic> const& rImpGraphicPtr)
{
auto pReturn = std::make_shared<ImpGraphic>(*rImpGraphicPtr);
- registerGraphic(pReturn, "Copy");
+ registerGraphic(pReturn, u"Copy");
return pReturn;
}
std::shared_ptr<ImpGraphic> Manager::newInstance()
{
auto pReturn = std::make_shared<ImpGraphic>();
- registerGraphic(pReturn, "Empty");
+ registerGraphic(pReturn, u"Empty");
return pReturn;
}
std::shared_ptr<ImpGraphic> Manager::newInstance(const BitmapEx& rBitmapEx)
{
auto pReturn = std::make_shared<ImpGraphic>(rBitmapEx);
- registerGraphic(pReturn, "BitmapEx");
+ registerGraphic(pReturn, u"BitmapEx");
return pReturn;
}
std::shared_ptr<ImpGraphic> Manager::newInstance(const Animation& rAnimation)
{
auto pReturn = std::make_shared<ImpGraphic>(rAnimation);
- registerGraphic(pReturn, "Animation");
+ registerGraphic(pReturn, u"Animation");
return pReturn;
}
@@ -196,21 +196,21 @@ std::shared_ptr<ImpGraphic>
Manager::newInstance(const std::shared_ptr<VectorGraphicData>& rVectorGraphicDataPtr)
{
auto pReturn = std::make_shared<ImpGraphic>(rVectorGraphicDataPtr);
- registerGraphic(pReturn, "VectorGraphic");
+ registerGraphic(pReturn, u"VectorGraphic");
return pReturn;
}
std::shared_ptr<ImpGraphic> Manager::newInstance(const GDIMetaFile& rMetaFile)
{
auto pReturn = std::make_shared<ImpGraphic>(rMetaFile);
- registerGraphic(pReturn, "Metafile");
+ registerGraphic(pReturn, u"Metafile");
return pReturn;
}
std::shared_ptr<ImpGraphic> Manager::newInstance(const GraphicExternalLink& rGraphicLink)
{
auto pReturn = std::make_shared<ImpGraphic>(rGraphicLink);
- registerGraphic(pReturn, "GraphicExternalLink");
+ registerGraphic(pReturn, u"GraphicExternalLink");
return pReturn;
}
diff --git a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
index 1015fcf67992..815d0dbe5e06 100644
--- a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
@@ -1880,7 +1880,7 @@ GtkFileFilter* SalGtkFilePicker::implAddFilter( const OUString& rFilter, const O
return filter;
}
-void SalGtkFilePicker::implAddFilterGroup( const OUString& /*_rFilter*/, const Sequence< StringPair >& _rFilters )
+void SalGtkFilePicker::implAddFilterGroup( std::u16string_view /*_rFilter*/, const Sequence< StringPair >& _rFilters )
{
// Gtk+ has no filter group concept I think so ...
// implAddFilter( _rFilter, String() );
diff --git a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.hxx b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.hxx
index 39bb6815be11..ac4959e4a571 100644
--- a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.hxx
+++ b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.hxx
@@ -213,7 +213,7 @@ class SalGtkFilePicker : public SalGtkPicker, public SalGtkFilePicker_Base
void implChangeType( GtkTreeSelection *selection );
GtkFileFilter * implAddFilter( const OUString& rFilter, const OUString& rType );
- void implAddFilterGroup( const OUString& rFilter,
+ void implAddFilterGroup( std::u16string_view rFilter,
const css::uno::Sequence< css::beans::StringPair>& _rFilters );
void updateCurrentFilterFromName(const gchar* filtername);
void unselect_type();
diff --git a/vcl/unx/gtk3/gtk3gtksalmenu.cxx b/vcl/unx/gtk3/gtk3gtksalmenu.cxx
index f71269470f15..195e8ce071d2 100644
--- a/vcl/unx/gtk3/gtk3gtksalmenu.cxx
+++ b/vcl/unx/gtk3/gtk3gtksalmenu.cxx
@@ -1067,11 +1067,11 @@ void GtkSalMenu::NativeSetItemIcon( unsigned nSection, unsigned nItemPos, const
#endif
}
-void GtkSalMenu::NativeSetAccelerator( unsigned nSection, unsigned nItemPos, const vcl::KeyCode& rKeyCode, const OUString& rKeyName )
+void GtkSalMenu::NativeSetAccelerator( unsigned nSection, unsigned nItemPos, const vcl::KeyCode& rKeyCode, std::u16string_view rKeyName )
{
SolarMutexGuard aGuard;
- if ( rKeyName.isEmpty() )
+ if ( rKeyName.empty() )
return;
guint nKeyCode;