summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-12-25 08:52:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-12-26 11:43:15 +0100
commit16506994ecef4bd800575beb9f2b66eb16d902fa (patch)
treefb889fdb0c8b5ce3aa89570fe7ed0882f8ba173e
parent7313b9ecf2285768563d82c19715d34b7c66d5ef (diff)
can use OUStringLiteral here
Change-Id: I1e71a35c2ce6bc7ef3081054e51494411d9a29ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127491 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--connectivity/source/parse/sqlnode.cxx2
-rw-r--r--dbaccess/source/core/api/KeySet.cxx4
-rw-r--r--stoc/source/security/permissions.cxx2
-rw-r--r--xmloff/source/core/xmlexp.cxx4
-rw-r--r--xmloff/source/style/PageMasterImportContext.cxx6
-rw-r--r--xmloff/source/style/prstylei.cxx8
6 files changed, 13 insertions, 13 deletions
diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index 424f016db9ca..3c3feed5db21 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -2472,7 +2472,7 @@ void OSQLParseNode::parseLeaf(OUStringBuffer& rString, const SQLParseNodeParamet
case SQLNodeType::ApproxNum:
{
OUString aTmp = m_aNodeValue;
- static OUString strPoint(".");
+ static constexpr OUStringLiteral strPoint(u".");
if (rParam.bInternational && rParam.bPredicate && rParam.sDecSep != strPoint)
aTmp = aTmp.replaceAll(strPoint, rParam.sDecSep);
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index 86b397cbbff2..847a9c1a07cc 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -444,9 +444,9 @@ void OKeySet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOrigi
OUStringBuffer aSql = "UPDATE " + m_aComposedTableName + " SET ";
// list all columns that should be set
- static OUString aPara(" = ?,");
+ constexpr OUStringLiteral aPara(u" = ?,");
OUString aQuote = getIdentifierQuoteString();
- static OUString aAnd(" AND ");
+ constexpr OUStringLiteral aAnd(u" AND ");
OUString sIsNull(" IS NULL");
OUString sParam(" = ?");
diff --git a/stoc/source/security/permissions.cxx b/stoc/source/security/permissions.cxx
index 987b07ed8997..1d7aca177344 100644
--- a/stoc/source/security/permissions.cxx
+++ b/stoc/source/security/permissions.cxx
@@ -329,7 +329,7 @@ FilePermission::FilePermission(
// correct win drive letters
if (9 < m_url.getLength() && '|' == m_url[ 9 ]) // file:///X|
{
- static OUString s_colon = ":";
+ constexpr OUStringLiteral s_colon = u":";
// common case in API is a ':' (sal), so convert '|' to ':'
m_url = m_url.replaceAt( 9, 1, s_colon );
}
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 7233d0d3dc3e..fc18a3de0370 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -1084,8 +1084,8 @@ void SvXMLExport::ImplExportStyles()
if( ( mnExportFlags & SvXMLExportFlags::CONTENT ) || !mxExportInfo.is() )
return;
- static OUString sStyleNames( "StyleNames" );
- static OUString sStyleFamilies( "StyleFamilies" );
+ static constexpr OUStringLiteral sStyleNames( u"StyleNames" );
+ static constexpr OUStringLiteral sStyleFamilies( u"StyleFamilies" );
uno::Reference< beans::XPropertySetInfo > xPropertySetInfo = mxExportInfo->getPropertySetInfo();
if ( xPropertySetInfo->hasPropertyByName( sStyleNames ) && xPropertySetInfo->hasPropertyByName( sStyleFamilies ) )
{
diff --git a/xmloff/source/style/PageMasterImportContext.cxx b/xmloff/source/style/PageMasterImportContext.cxx
index 519b24ee696e..d07caf9fa852 100644
--- a/xmloff/source/style/PageMasterImportContext.cxx
+++ b/xmloff/source/style/PageMasterImportContext.cxx
@@ -166,9 +166,9 @@ void PageStyleContext::FillPropertySet_PageStyle(
// ones are used when a FillStyle is defined
if(!m_bIsFillStyleAlreadyConverted && !GetProperties().empty())
{
- static OUString s_FillStyle("FillStyle");
- static OUString s_HeaderFillStyle("HeaderFillStyle");
- static OUString s_FooterFillStyle("FooterFillStyle");
+ static constexpr OUStringLiteral s_FillStyle(u"FillStyle");
+ static constexpr OUStringLiteral s_HeaderFillStyle(u"HeaderFillStyle");
+ static constexpr OUStringLiteral s_FooterFillStyle(u"FooterFillStyle");
// note: the function must only check by property name, not any id/flag!
if (doNewDrawingLayerFillStyleDefinitionsExist(s_FillStyle)
diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx
index 016204277b54..9239f41b6837 100644
--- a/xmloff/source/style/prstylei.cxx
+++ b/xmloff/source/style/prstylei.cxx
@@ -624,10 +624,10 @@ void XMLPropStyleContext::translateNameBasedDrawingLayerFillStyleDefinitionsToSt
if(!rMapper.is())
return;
- static OUString s_FillGradientName("FillGradientName");
- static OUString s_FillHatchName("FillHatchName");
- static OUString s_FillBitmapName("FillBitmapName");
- static OUString s_FillTransparenceGradientName("FillTransparenceGradientName");
+ static constexpr OUStringLiteral s_FillGradientName(u"FillGradientName");
+ static constexpr OUStringLiteral s_FillHatchName(u"FillHatchName");
+ static constexpr OUStringLiteral s_FillBitmapName(u"FillBitmapName");
+ static constexpr OUStringLiteral s_FillTransparenceGradientName(u"FillTransparenceGradientName");
for(auto& a : maProperties)
{