summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-03-25 09:53:33 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-03-25 10:06:26 +0100
commita0656ec6fc2b41e65f1b40dbd64f546175e2762f (patch)
treec0d3443a27d9dc10266760110e96b50cce46ef02 /vcl
parente9c6fd6b4d09ee59b6a86942cbf001f2ba9782e6 (diff)
const OUString -> const OUStringLiteral
Mostly automated rewrite Change-Id: Ie020a083f898bc126b8fb039d4ecb2e687172da1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112965 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/filter/FilterConfigItem.cxx5
-rw-r--r--vcl/source/image/ImplImageTree.cxx2
-rw-r--r--vcl/source/treelist/transfer.cxx22
-rw-r--r--vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx2
-rw-r--r--vcl/win/dtrans/MimeAttrib.hxx10
5 files changed, 20 insertions, 21 deletions
diff --git a/vcl/source/filter/FilterConfigItem.cxx b/vcl/source/filter/FilterConfigItem.cxx
index 1514ab60dd72..90933bbcc2cc 100644
--- a/vcl/source/filter/FilterConfigItem.cxx
+++ b/vcl/source/filter/FilterConfigItem.cxx
@@ -378,11 +378,10 @@ void FilterConfigItem::WriteInt32( const OUString& rKey, sal_Int32 nNewValue )
Reference< XStatusIndicator > FilterConfigItem::GetStatusIndicator() const
{
Reference< XStatusIndicator > xStatusIndicator;
- const OUString sStatusIndicator( "StatusIndicator" );
auto pPropVal = std::find_if(aFilterData.begin(), aFilterData.end(),
- [&sStatusIndicator](const css::beans::PropertyValue& rPropVal) {
- return rPropVal.Name == sStatusIndicator; });
+ [](const css::beans::PropertyValue& rPropVal) {
+ return rPropVal.Name == "StatusIndicator"; });
if (pPropVal != aFilterData.end())
{
pPropVal->Value >>= xStatusIndicator;
diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx
index 92ef534467dc..51f61f1f29b4 100644
--- a/vcl/source/image/ImplImageTree.cxx
+++ b/vcl/source/image/ImplImageTree.cxx
@@ -562,7 +562,7 @@ bool ImplImageTree::findImage(std::vector<OUString> const & rPaths, ImageRequest
void ImplImageTree::loadImageLinks()
{
- const OUString aLinkFilename("links.txt");
+ static const OUStringLiteral aLinkFilename(u"links.txt");
if (!checkPathAccess())
return;
diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx
index e659eef56c04..ac3557d0efd5 100644
--- a/vcl/source/treelist/transfer.cxx
+++ b/vcl/source/treelist/transfer.cxx
@@ -171,14 +171,14 @@ static void ImplSetParameterString( TransferableObjectDescriptor& rObjDesc, cons
if( xMimeType.is() )
{
- const OUString aClassNameString( "classname" );
- const OUString aTypeNameString( "typename" );
- const OUString aDisplayNameString( "displayname" );
- const OUString aViewAspectString( "viewaspect" );
- const OUString aWidthString( "width" );
- const OUString aHeightString( "height" );
- const OUString aPosXString( "posx" );
- const OUString aPosYString( "posy" );
+ static const OUStringLiteral aClassNameString( u"classname" );
+ static const OUStringLiteral aTypeNameString( u"typename" );
+ static const OUStringLiteral aDisplayNameString( u"displayname" );
+ static const OUStringLiteral aViewAspectString( u"viewaspect" );
+ static const OUStringLiteral aWidthString( u"width" );
+ static const OUStringLiteral aHeightString( u"height" );
+ static const OUStringLiteral aPosXString( u"posx" );
+ static const OUStringLiteral aPosYString( u"posy" );
if( xMimeType->hasParameter( aClassNameString ) )
{
@@ -1226,7 +1226,7 @@ void TransferableDataHelper::FillDataFlavorExVector( const Sequence< DataFlavor
Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
Reference< XMimeContentTypeFactory > xMimeFact = MimeContentTypeFactory::create( xContext );
DataFlavorEx aFlavorEx;
- const OUString aCharsetStr( "charset" );
+ static const OUStringLiteral aCharsetStr( u"charset" );
for (auto const& rFlavor : rDataFlavorSeq)
@@ -2216,7 +2216,7 @@ bool TransferableDataHelper::IsEqual( const css::datatransfer::DataFlavor& rInte
if( xRequestType1->getFullMediaType().equalsIgnoreAsciiCase( "text/plain" ) )
{
// special handling for text/plain media types
- const OUString aCharsetString( "charset" );
+ static const OUStringLiteral aCharsetString( u"charset" );
if( !xRequestType2->hasParameter( aCharsetString ) ||
xRequestType2->getParameterValue( aCharsetString ).equalsIgnoreAsciiCase( "utf-16" ) ||
@@ -2228,7 +2228,7 @@ bool TransferableDataHelper::IsEqual( const css::datatransfer::DataFlavor& rInte
else if( xRequestType1->getFullMediaType().equalsIgnoreAsciiCase( "application/x-openoffice" ) )
{
// special handling for application/x-openoffice media types
- const OUString aFormatString( "windows_formatname" );
+ static const OUStringLiteral aFormatString( u"windows_formatname" );
if( xRequestType1->hasParameter( aFormatString ) &&
xRequestType2->hasParameter( aFormatString ) &&
diff --git a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
index 4bccf1e24d72..840ef268d4b1 100644
--- a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
+++ b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
@@ -63,7 +63,7 @@ OUString applicationDirPath()
OUString findPickerExecutable()
{
const auto path = applicationDirPath();
- const OUString app("lo_kde5filepicker");
+ static const OUStringLiteral app(u"lo_kde5filepicker");
OUString ret;
osl_searchFileURL(app.pData, path.pData, &ret.pData);
if (ret.isEmpty())
diff --git a/vcl/win/dtrans/MimeAttrib.hxx b/vcl/win/dtrans/MimeAttrib.hxx
index 33e53d779f01..ed47f0a4e0ca 100644
--- a/vcl/win/dtrans/MimeAttrib.hxx
+++ b/vcl/win/dtrans/MimeAttrib.hxx
@@ -21,11 +21,11 @@
#include <rtl/ustring.hxx>
-const OUString TEXTPLAIN_PARAM_CHARSET("charset");
+static const OUStringLiteral TEXTPLAIN_PARAM_CHARSET(u"charset");
-const OUString PRE_WINDOWS_CODEPAGE("windows");
-const OUString PRE_OEM_CODEPAGE("cp");
-const OUString CHARSET_UTF16("utf-16");
-const OUString CHARSET_UNICODE("unicode");
+static const OUStringLiteral PRE_WINDOWS_CODEPAGE(u"windows");
+static const OUStringLiteral PRE_OEM_CODEPAGE(u"cp");
+static const OUStringLiteral CHARSET_UTF16(u"utf-16");
+static const OUStringLiteral CHARSET_UNICODE(u"unicode");
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */