summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-18 10:10:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-24 09:45:04 +0100
commitbb06f51308428500c9c8d11ae05f0aa03ecc179c (patch)
treeb18620e8572ed6d4c43c8605660d59f5f7a7e531 /forms
parent42e8e16cf93dcf944e5c1106f76aaa32057c0397 (diff)
loplugin:stringviewparam extend to comparison operators
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'forms')
-rw-r--r--forms/source/inc/frm_strings.hxx4
-rw-r--r--forms/source/richtext/richtextmodel.cxx2
-rw-r--r--forms/source/xforms/model_helper.hxx2
-rw-r--r--forms/source/xforms/model_ui.cxx10
4 files changed, 9 insertions, 9 deletions
diff --git a/forms/source/inc/frm_strings.hxx b/forms/source/inc/frm_strings.hxx
index 9e20636fc2ae..06d3f8cb148b 100644
--- a/forms/source/inc/frm_strings.hxx
+++ b/forms/source/inc/frm_strings.hxx
@@ -122,7 +122,7 @@ namespace frm
#define PROPERTY_TIMEMAX "TimeMax"
#define PROPERTY_LINECOUNT "LineCount"
#define PROPERTY_BOUNDCOLUMN "BoundColumn"
- #define PROPERTY_FONT "FontDescriptor"
+ #define PROPERTY_FONT u"FontDescriptor"
#define PROPERTY_FILLCOLOR "FillColor"
#define PROPERTY_LINECOLOR "LineColor"
#define PROPERTY_DROPDOWN "Dropdown"
@@ -213,7 +213,7 @@ namespace frm
#define PROPERTY_RICH_TEXT "RichText"
#define PROPERTY_ENFORCE_FORMAT "EnforceFormat"
#define PROPERTY_LINEEND_FORMAT "LineEndFormat"
- #define PROPERTY_WRITING_MODE "WritingMode"
+ #define PROPERTY_WRITING_MODE u"WritingMode"
#define PROPERTY_CONTEXT_WRITING_MODE "ContextWritingMode"
#define PROPERTY_NATIVE_LOOK "NativeWidgetLook"
diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx
index cd00e8032997..ece2d36e96fe 100644
--- a/forms/source/richtext/richtextmodel.cxx
+++ b/forms/source/richtext/richtextmodel.cxx
@@ -268,7 +268,7 @@ namespace frm
namespace
{
- void lcl_removeProperty( Sequence< Property >& _rSeq, const OUString& _rPropertyName )
+ void lcl_removeProperty( Sequence< Property >& _rSeq, std::u16string_view _rPropertyName )
{
Property* pLoop = _rSeq.getArray();
Property* pEnd = _rSeq.getArray() + _rSeq.getLength();
diff --git a/forms/source/xforms/model_helper.hxx b/forms/source/xforms/model_helper.hxx
index 59056bf26e62..51b65b67127a 100644
--- a/forms/source/xforms/model_helper.hxx
+++ b/forms/source/xforms/model_helper.hxx
@@ -123,7 +123,7 @@ public:
sal_Int32 lcl_findInstance( const InstanceCollection*,
- const OUString& );
+ std::u16string_view );
// get values from Sequence<PropertyValue> describing an Instance
diff --git a/forms/source/xforms/model_ui.cxx b/forms/source/xforms/model_ui.cxx
index 0dca32ac5b91..2ce182031579 100644
--- a/forms/source/xforms/model_ui.cxx
+++ b/forms/source/xforms/model_ui.cxx
@@ -411,7 +411,7 @@ css::uno::Reference<css::xml::dom::XDocument> Model::newInstance( const OUString
static sal_Int32 lcl_findProp( const PropertyValue* pValues,
sal_Int32 nLength,
- const OUString& rName )
+ std::u16string_view rName )
{
bool bFound = false;
sal_Int32 n = 0;
@@ -423,7 +423,7 @@ static sal_Int32 lcl_findProp( const PropertyValue* pValues,
}
sal_Int32 xforms::lcl_findInstance( const InstanceCollection* pInstances,
- const OUString& rName )
+ std::u16string_view rName )
{
sal_Int32 nLength = pInstances->countItems();
sal_Int32 n = 0;
@@ -450,7 +450,7 @@ void Model::renameInstance( const OUString& sFrom,
PropertyValue* pSeq = aSeq.getArray();
sal_Int32 nLength = aSeq.getLength();
- sal_Int32 nProp = lcl_findProp( pSeq, nLength, "ID" );
+ sal_Int32 nProp = lcl_findProp( pSeq, nLength, u"ID" );
if( nProp == -1 )
{
// add name property
@@ -464,12 +464,12 @@ void Model::renameInstance( const OUString& sFrom,
pSeq[ nProp ].Value <<= sTo;
// change url
- nProp = lcl_findProp( pSeq, nLength, "URL" );
+ nProp = lcl_findProp( pSeq, nLength, u"URL" );
if(nProp != -1)
pSeq[ nProp ].Value <<= sURL;
// change urlonce
- nProp = lcl_findProp( pSeq, nLength, "URLOnce" );
+ nProp = lcl_findProp( pSeq, nLength, u"URLOnce" );
if(nProp != -1)
pSeq[ nProp ].Value <<= bURLOnce;