summaryrefslogtreecommitdiffstats
path: root/slideshow
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-29 08:46:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-29 09:57:15 +0100
commit933660e591211f06a1be43e83c64ad1e8529bc2f (patch)
treeadc0ede7c30c9ee5af7b75e649c806831f73da41 /slideshow
parentRevert "comment out the EvaluateAsInt compat code for now" (diff)
downloadcore-933660e591211f06a1be43e83c64ad1e8529bc2f.tar.gz
core-933660e591211f06a1be43e83c64ad1e8529bc2f.zip
loplugin:stringconstant look for unnecessary OString constructor use
and tweak the methods in check.hxx to make them more flexible when called with dc.Class(xxx ? "foo" : "bar") Change-Id: I881fe628f22121ced4d8849715d6b1c92b092da1 Reviewed-on: https://gerrit.libreoffice.org/64207 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/shapes/drawshapesubsetting.cxx7
-rw-r--r--slideshow/source/engine/shapes/drawshapesubsetting.hxx2
-rw-r--r--slideshow/source/engine/shapes/gdimtftools.cxx2
3 files changed, 6 insertions, 5 deletions
diff --git a/slideshow/source/engine/shapes/drawshapesubsetting.cxx b/slideshow/source/engine/shapes/drawshapesubsetting.cxx
index 5a0193e71928..10a5283e3b9c 100644
--- a/slideshow/source/engine/shapes/drawshapesubsetting.cxx
+++ b/slideshow/source/engine/shapes/drawshapesubsetting.cxx
@@ -23,6 +23,7 @@
#include <rtl/math.hxx>
#include <sal/log.hxx>
+#include <utility>
#include <vcl/metaact.hxx>
#include <vcl/gdimtf.hxx>
#include <basegfx/numeric/ftools.hxx>
@@ -73,7 +74,7 @@ namespace slideshow
MetaCommentAction* pAct = static_cast<MetaCommentAction*>(pCurrAct);
// skip comment if not a special XTEXT... comment
- if( pAct->GetComment().matchIgnoreAsciiCase( OString("XTEXT") ) )
+ if( pAct->GetComment().matchIgnoreAsciiCase( "XTEXT" ) )
{
// fill classification vector with NOOPs,
// then insert corresponding classes at
@@ -261,9 +262,9 @@ namespace slideshow
}
DrawShapeSubsetting::DrawShapeSubsetting( const DocTreeNode& rShapeSubset,
- const GDIMetaFileSharedPtr& rMtf ) :
+ GDIMetaFileSharedPtr rMtf ) :
maActionClassVector(),
- mpMtf( rMtf ),
+ mpMtf(std::move( rMtf )),
maSubset( rShapeSubset ),
maSubsetShapes(),
maCurrentSubsets(),
diff --git a/slideshow/source/engine/shapes/drawshapesubsetting.hxx b/slideshow/source/engine/shapes/drawshapesubsetting.hxx
index 68e541bf7fb1..ff32a4a653cf 100644
--- a/slideshow/source/engine/shapes/drawshapesubsetting.hxx
+++ b/slideshow/source/engine/shapes/drawshapesubsetting.hxx
@@ -59,7 +59,7 @@ namespace slideshow
generated with verbose text comments switched on).
*/
DrawShapeSubsetting( const DocTreeNode& rShapeSubset,
- const ::std::shared_ptr< GDIMetaFile >& rMtf );
+ ::std::shared_ptr< GDIMetaFile > rMtf );
/// Forbid copy construction
DrawShapeSubsetting(const DrawShapeSubsetting&) = delete;
diff --git a/slideshow/source/engine/shapes/gdimtftools.cxx b/slideshow/source/engine/shapes/gdimtftools.cxx
index 3bce67733f1e..aa30ac3feaff 100644
--- a/slideshow/source/engine/shapes/gdimtftools.cxx
+++ b/slideshow/source/engine/shapes/gdimtftools.cxx
@@ -409,7 +409,7 @@ bool getRectanglesFromScrollMtf( ::basegfx::B2DRectangle& o_rScrollRect,
MetaCommentAction * pAct =
static_cast<MetaCommentAction *>(pCurrAct);
// skip comment if not a special XTEXT... comment
- if( pAct->GetComment().matchIgnoreAsciiCase( OString("XTEXT") ) )
+ if( pAct->GetComment().matchIgnoreAsciiCase( "XTEXT" ) )
{
if (pAct->GetComment().equalsIgnoreAsciiCase("XTEXT_SCROLLRECT"))
{