From b14224fe97b8a44232c9c1401d3a49771f46582e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 2 Feb 2016 16:15:51 +0200 Subject: loplugin:unusedmethods using an idea from dtardon: noelgrandin, hi. could you try to run the unusedmethods clang plugin with "make build-nocheck"? that would catch functions that are only used in tests. e.g., i just removed the whole o3tl::range class, which has not been used in many years, but htere was a test for it... dtardon, interesting idea! Sure, I can do that. Change-Id: I5653953a426a2186a1e43017212d87ffce520387 Reviewed-on: https://gerrit.libreoffice.org/22041 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- svgio/qa/cppunit/SvgImportTest.cxx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'svgio/qa') diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx index 3c40e3e21df5..d065e0f34f1c 100644 --- a/svgio/qa/cppunit/SvgImportTest.cxx +++ b/svgio/qa/cppunit/SvgImportTest.cxx @@ -31,7 +31,6 @@ namespace using namespace css::uno; using namespace css::io; using namespace css::graphic; -using drawinglayer::primitive2d::arePrimitive2DSequencesEqual; using drawinglayer::primitive2d::Primitive2DSequence; using drawinglayer::primitive2d::Primitive2DContainer; @@ -96,6 +95,22 @@ void Test::checkRectPrimitive(Primitive2DSequence& rPrimitive) } + +static bool arePrimitive2DSequencesEqual(const Primitive2DSequence& rA, const Primitive2DSequence& rB) +{ + const sal_Int32 nCount(rA.getLength()); + + if(nCount != rB.getLength()) + return false; + + for(sal_Int32 a(0L); a < nCount; a++) { + if(!drawinglayer::primitive2d::arePrimitive2DReferencesEqual(rA[a], rB[a])) + return false; + } + + return true; +} + // Attributes for an object (like rect as in this case) can be defined // in different ways (directly with xml attributes, or with CSS styles), // however the end result should be the same. -- cgit