summaryrefslogtreecommitdiff
path: root/svgio
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-02-02 16:15:51 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-02-08 06:08:14 +0000
commitb14224fe97b8a44232c9c1401d3a49771f46582e (patch)
tree8f9cf31cf4b51a0edbb43022499a6acd17d0945d /svgio
parentc474e610e453d0f38f7cc6cb9559ad7e7b5d69ca (diff)
loplugin:unusedmethods
using an idea from dtardon: <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... <noelgrandin> dtardon, interesting idea! Sure, I can do that. Change-Id: I5653953a426a2186a1e43017212d87ffce520387 Reviewed-on: https://gerrit.libreoffice.org/22041 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svgio')
-rw-r--r--svgio/qa/cppunit/SvgImportTest.cxx17
1 files changed, 16 insertions, 1 deletions
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.