summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-25 08:14:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-30 12:32:14 +0100
commit8332d6d8200e8ca1f22dd98d9373efd5a431d09c (patch)
treedd45d452202998297b8562743ea6345462304d04 /vbahelper
parentd05a4cfbdcece491f7385dbeaa7eca03f2fdc1d5 (diff)
loplugin:stringviewparam include comparisons with string literals
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/source/vbahelper/vbalineformat.cxx14
-rw-r--r--vbahelper/source/vbahelper/vbalineformat.hxx2
2 files changed, 8 insertions, 8 deletions
diff --git a/vbahelper/source/vbahelper/vbalineformat.cxx b/vbahelper/source/vbahelper/vbalineformat.cxx
index 6ae69fff2409..0045bd0f7f2c 100644
--- a/vbahelper/source/vbahelper/vbalineformat.cxx
+++ b/vbahelper/source/vbahelper/vbalineformat.cxx
@@ -34,31 +34,31 @@ ScVbaLineFormat::ScVbaLineFormat( const uno::Reference< ov::XHelperInterface >&
}
sal_Int32
-ScVbaLineFormat::convertLineStartEndNameToArrowheadStyle( const OUString& sLineName )
+ScVbaLineFormat::convertLineStartEndNameToArrowheadStyle( std::u16string_view sLineName )
{
sal_Int32 nLineType = office::MsoArrowheadStyle::msoArrowheadNone;
- if ( sLineName == "Small Arrow" || sLineName == "Arrow" || sLineName == "msArrowEnd" || sLineName == "Double Arrow")
+ if ( sLineName == u"Small Arrow" || sLineName == u"Arrow" || sLineName == u"msArrowEnd" || sLineName == u"Double Arrow")
{
// msoArrowheadTriangle
nLineType = office::MsoArrowheadStyle::msoArrowheadTriangle;
}
- else if ( sLineName == "Square 45" || sLineName == "Square" || sLineName == "msArrowDiamondEnd")
+ else if ( sLineName == u"Square 45" || sLineName == u"Square" || sLineName == u"msArrowDiamondEnd")
{
// msoArrowheadDiamond
nLineType = office::MsoArrowheadStyle::msoArrowheadDiamond;
}
- else if (sLineName == "Circle" || sLineName == "msArrowOvalEnd" || sLineName == "Dimension Lines" )
+ else if (sLineName == u"Circle" || sLineName == u"msArrowOvalEnd" || sLineName == u"Dimension Lines" )
{
// msoArrowheadOval
nLineType = office::MsoArrowheadStyle::msoArrowheadOval;
}
- else if ( sLineName == "Arrow concave" || sLineName == "msArrowStealthEnd" )
+ else if ( sLineName == u"Arrow concave" || sLineName == u"msArrowStealthEnd" )
{
// msoArrowheadStealth
nLineType = office::MsoArrowheadStyle::msoArrowheadStealth;
}
- else if ( sLineName == "Rounded short Arrow" || sLineName == "Rounded large Arrow" || sLineName == "Symmetric Arrow"
- || sLineName == "msArrowOpenEnd" || sLineName == "Line Arrow" )
+ else if ( sLineName == u"Rounded short Arrow" || sLineName == u"Rounded large Arrow" || sLineName == u"Symmetric Arrow"
+ || sLineName == u"msArrowOpenEnd" || sLineName == u"Line Arrow" )
{
// msoArrowheadOpen
nLineType = office::MsoArrowheadStyle::msoArrowheadOpen;
diff --git a/vbahelper/source/vbahelper/vbalineformat.hxx b/vbahelper/source/vbahelper/vbalineformat.hxx
index 858fb3e1e99d..c6d3c513efd2 100644
--- a/vbahelper/source/vbahelper/vbalineformat.hxx
+++ b/vbahelper/source/vbahelper/vbalineformat.hxx
@@ -35,7 +35,7 @@ private:
double m_nLineWeight;
virtual OUString getServiceImplName() override;
virtual css::uno::Sequence<OUString> getServiceNames() override;
- static sal_Int32 convertLineStartEndNameToArrowheadStyle( const OUString& sLineName );
+ static sal_Int32 convertLineStartEndNameToArrowheadStyle( std::u16string_view sLineName );
/// @throws css::uno::RuntimeException
static OUString convertArrowheadStyleToLineStartEndName( sal_Int32 nArrowheadStyle );
public: