diff options
author | Noel <noelgrandin@gmail.com> | 2020-11-18 10:10:40 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-24 09:45:04 +0100 |
commit | bb06f51308428500c9c8d11ae05f0aa03ecc179c (patch) | |
tree | b18620e8572ed6d4c43c8605660d59f5f7a7e531 /oox/source | |
parent | 42e8e16cf93dcf944e5c1106f76aaa32057c0397 (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 'oox/source')
-rw-r--r-- | oox/source/crypto/StrongEncryptionDataSpace.cxx | 4 | ||||
-rw-r--r-- | oox/source/drawingml/customshapeproperties.cxx | 2 | ||||
-rw-r--r-- | oox/source/drawingml/diagram/datamodel.cxx | 2 | ||||
-rw-r--r-- | oox/source/drawingml/diagram/diagramlayoutatoms.cxx | 4 | ||||
-rw-r--r-- | oox/source/export/drawingml.cxx | 6 |
5 files changed, 9 insertions, 9 deletions
diff --git a/oox/source/crypto/StrongEncryptionDataSpace.cxx b/oox/source/crypto/StrongEncryptionDataSpace.cxx index 9fd1778aa831..fd1b823b8870 100644 --- a/oox/source/crypto/StrongEncryptionDataSpace.cxx +++ b/oox/source/crypto/StrongEncryptionDataSpace.cxx @@ -65,7 +65,7 @@ sal_Bool StrongEncryptionDataSpace::decrypt(const Reference<XInputStream>& rxInp } Reference<XInputStream> StrongEncryptionDataSpace::getStream(const Sequence<NamedValue>& rStreams, - const OUString sStreamName) + std::u16string_view sStreamName) { for (const auto& aStream : rStreams) { @@ -84,7 +84,7 @@ Reference<XInputStream> StrongEncryptionDataSpace::getStream(const Sequence<Name sal_Bool StrongEncryptionDataSpace::readEncryptionInfo(const Sequence<NamedValue>& aStreams) { - Reference<XInputStream> xEncryptionInfo = getStream(aStreams, "EncryptionInfo"); + Reference<XInputStream> xEncryptionInfo = getStream(aStreams, u"EncryptionInfo"); if (!xEncryptionInfo.is()) return false; diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 1b4d6b4a59f6..fd39bb36e30e 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -71,7 +71,7 @@ sal_Int32 CustomShapeProperties::SetCustomShapeGuideValue( std::vector< CustomSh // returns the index into the guidelist for a given formula name, // if the return value is < 0 then the guide value could not be found -sal_Int32 CustomShapeProperties::GetCustomShapeGuideValue( const std::vector< CustomShapeGuide >& rGuideList, const OUString& rFormulaName ) +sal_Int32 CustomShapeProperties::GetCustomShapeGuideValue( const std::vector< CustomShapeGuide >& rGuideList, std::u16string_view rFormulaName ) { // traverse the list from the end, because guide names can be reused // and current is the last one diff --git a/oox/source/drawingml/diagram/datamodel.cxx b/oox/source/drawingml/diagram/datamodel.cxx index 469f404367f6..6185ee7acfb9 100644 --- a/oox/source/drawingml/diagram/datamodel.cxx +++ b/oox/source/drawingml/diagram/datamodel.cxx @@ -289,7 +289,7 @@ OString normalizeDotName( const OUString& rStr ) } #endif -static sal_Int32 calcDepth( const OUString& rNodeName, +static sal_Int32 calcDepth( std::u16string_view rNodeName, const dgm::Connections& rCnx ) { // find length of longest path in 'isChild' graph, ending with rNodeName diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx index 5071a7bd52d4..20b7a2df4233 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx @@ -547,7 +547,7 @@ namespace * Takes the connection list from rLayoutNode, navigates from rFrom on an edge * of type nType, using a direction determined by bSourceToDestination. */ -OUString navigate(LayoutNode& rLayoutNode, sal_Int32 nType, const OUString& rFrom, +OUString navigate(LayoutNode& rLayoutNode, sal_Int32 nType, std::u16string_view rFrom, bool bSourceToDestination) { for (const auto& rConnection : rLayoutNode.getDiagram().getData()->getConnections()) @@ -570,7 +570,7 @@ OUString navigate(LayoutNode& rLayoutNode, sal_Int32 nType, const OUString& rFro return OUString(); } -sal_Int32 calcMaxDepth(const OUString& rNodeName, const dgm::Connections& rConnections) +sal_Int32 calcMaxDepth(std::u16string_view rNodeName, const dgm::Connections& rConnections) { sal_Int32 nMaxLength = 0; for (auto const& aCxn : rConnections) diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 3ed451710b55..fc5051cb4bb0 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -2597,7 +2597,7 @@ bool DrawingML::IsDiagram(const Reference<XShape>& rXShape) }); } -sal_Int32 DrawingML::getBulletMarginIndentation (const Reference< XPropertySet >& rXPropSet,sal_Int16 nLevel, const OUString& propName) +sal_Int32 DrawingML::getBulletMarginIndentation (const Reference< XPropertySet >& rXPropSet,sal_Int16 nLevel, std::u16string_view propName) { if (nLevel < 0 || !GetProperty(rXPropSet, "NumberingRules")) return 0; @@ -2712,8 +2712,8 @@ void DrawingML::WriteParagraphProperties( const Reference< XTextContent >& rPara if (GetProperty(rXPropSet, "ParaBottomMargin")) mAny >>= nParaBottomMargin; - sal_Int32 nLeftMargin = getBulletMarginIndentation ( rXPropSet, nLevel,"LeftMargin"); - sal_Int32 nLineIndentation = getBulletMarginIndentation ( rXPropSet, nLevel,"FirstLineOffset"); + sal_Int32 nLeftMargin = getBulletMarginIndentation ( rXPropSet, nLevel,u"LeftMargin"); + sal_Int32 nLineIndentation = getBulletMarginIndentation ( rXPropSet, nLevel,u"FirstLineOffset"); if( !(nLevel != -1 || nAlignment != style::ParagraphAdjust_LEFT |