diff options
author | Noel <noelgrandin@gmail.com> | 2020-11-25 08:14:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-30 12:32:14 +0100 |
commit | 8332d6d8200e8ca1f22dd98d9373efd5a431d09c (patch) | |
tree | dd45d452202998297b8562743ea6345462304d04 /slideshow | |
parent | d05a4cfbdcece491f7385dbeaa7eca03f2fdc1d5 (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 'slideshow')
-rw-r--r-- | slideshow/source/engine/shapes/shapeimporter.cxx | 14 | ||||
-rw-r--r-- | slideshow/source/inc/shapeimporter.hxx | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/slideshow/source/engine/shapes/shapeimporter.cxx b/slideshow/source/engine/shapes/shapeimporter.cxx index 6d5b668efb00..877f4217348a 100644 --- a/slideshow/source/engine/shapes/shapeimporter.cxx +++ b/slideshow/source/engine/shapes/shapeimporter.cxx @@ -198,16 +198,16 @@ bool ShapeOfGroup::isBackgroundDetached() const ShapeSharedPtr ShapeImporter::createShape( uno::Reference<drawing::XShape> const& xCurrShape, uno::Reference<beans::XPropertySet> const& xPropSet, - OUString const& shapeType ) const + std::u16string_view shapeType ) const { - if( shapeType == "com.sun.star.drawing.MediaShape" || shapeType == "com.sun.star.presentation.MediaShape" ) + if( shapeType == u"com.sun.star.drawing.MediaShape" || shapeType == u"com.sun.star.presentation.MediaShape" ) { // Media shape (video etc.). This is a special object return createMediaShape(xCurrShape, mnAscendingPrio, mrContext); } - else if( shapeType == "com.sun.star.drawing.AppletShape" ) + else if( shapeType == u"com.sun.star.drawing.AppletShape" ) { // PropertyValues to copy from XShape to applet static const char* aPropertyValues[] = @@ -227,7 +227,7 @@ ShapeSharedPtr ShapeImporter::createShape( SAL_N_ELEMENTS(aPropertyValues), mrContext ); } - else if( shapeType == "com.sun.star.drawing.OLE2Shape" || shapeType == "com.sun.star.presentation.OLE2Shape" ) + else if( shapeType == u"com.sun.star.drawing.OLE2Shape" || shapeType == u"com.sun.star.presentation.OLE2Shape" ) { // #i46224# Mark OLE shapes as foreign content - scan them for // unsupported actions, and fallback to bitmap, if necessary @@ -237,7 +237,7 @@ ShapeSharedPtr ShapeImporter::createShape( true, mrContext ); } - else if( shapeType == "com.sun.star.drawing.GraphicObjectShape" || shapeType == "com.sun.star.presentation.GraphicObjectShape" ) + else if( shapeType == u"com.sun.star.drawing.GraphicObjectShape" || shapeType == u"com.sun.star.presentation.GraphicObjectShape" ) { // to get hold of GIF animations, inspect Graphic // objects more thoroughly (the plain-jane shape @@ -335,7 +335,7 @@ ShapeSharedPtr ShapeImporter::createShape( bool ShapeImporter::isSkip( uno::Reference<beans::XPropertySet> const& xPropSet, - OUString const& shapeType, + std::u16string_view shapeType, uno::Reference< drawing::XLayer> const& xLayer ) { // skip empty presentation objects: @@ -370,7 +370,7 @@ bool ShapeImporter::isSkip( // they can be non empty when user edits the default texts if(mbConvertingMasterPage) { - if( shapeType == "com.sun.star.presentation.TitleTextShape" || shapeType == "com.sun.star.presentation.OutlinerShape" ) + if( shapeType == u"com.sun.star.presentation.TitleTextShape" || shapeType == u"com.sun.star.presentation.OutlinerShape" ) { return true; } diff --git a/slideshow/source/inc/shapeimporter.hxx b/slideshow/source/inc/shapeimporter.hxx index a0ccb1fd44af..5254e0a9feaf 100644 --- a/slideshow/source/inc/shapeimporter.hxx +++ b/slideshow/source/inc/shapeimporter.hxx @@ -97,13 +97,13 @@ public: double getImportedShapesCount() const{ return mnAscendingPrio; } private: bool isSkip( css::uno::Reference<css::beans::XPropertySet> const& xPropSet, - OUString const& shapeType, + std::u16string_view shapeType, css::uno::Reference<css::drawing::XLayer> const& xLayer); ShapeSharedPtr createShape( css::uno::Reference<css::drawing::XShape> const& xCurrShape, css::uno::Reference<css::beans::XPropertySet> const& xPropSet, - OUString const& shapeType ) const; + std::u16string_view shapeType ) const; void importPolygons(css::uno::Reference< css::beans::XPropertySet > const& xPropSet) ; |