summaryrefslogtreecommitdiff
path: root/basegfx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-10-23 10:58:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-10-23 13:18:01 +0200
commitfbb5ab3e0ecb862fa5c48ef4640859c4aeb77984 (patch)
tree7c5a4300427ce5b2da5ba50d5e528abbcccd45d6 /basegfx
parent2fb74f6e155322ca25edc3b0b59d0d1347903195 (diff)
tdf#156525 Save as > HTML loses drawing object as invalid gif
This patch is specifically for the 7-6 branch, other changes meant that master received a simpler fix. This reverts the following patches commit f22c23e71d4ae628e9e90ee98d22d1fc8fca1619 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Wed Aug 2 15:26:06 2023 +0200 tdf#156525 Save as > HTML loses drawing object as invalid gif commit 04f02cfecfae481f256b6c98a1940fc5235a921a Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Wed May 10 14:06:49 2023 +0200 AlphaMask::BlendWith wants an AlphaMask parameter commit 8270eb5d5600cc84dbf5f0e339f90c4519ef88bb Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Fri May 19 13:35:31 2023 +0200 loplugin:unusedmethods Change-Id: I2146557b6401079061474d5d83082f75d6f1974f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158340 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basegfx')
-rw-r--r--basegfx/test/B2DPolyPolygonTest.cxx1
-rw-r--r--basegfx/test/boxclipper.cxx9
-rw-r--r--basegfx/test/boxclipper.hxx31
3 files changed, 41 insertions, 0 deletions
diff --git a/basegfx/test/B2DPolyPolygonTest.cxx b/basegfx/test/B2DPolyPolygonTest.cxx
index 5319e6b46967..f51d396b8578 100644
--- a/basegfx/test/B2DPolyPolygonTest.cxx
+++ b/basegfx/test/B2DPolyPolygonTest.cxx
@@ -24,6 +24,7 @@
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <basegfx/polygon/b2dtrapezoid.hxx>
+#include "boxclipper.hxx"
#include <random>
namespace basegfx
diff --git a/basegfx/test/boxclipper.cxx b/basegfx/test/boxclipper.cxx
index d58806cb739e..b65f25bae425 100644
--- a/basegfx/test/boxclipper.cxx
+++ b/basegfx/test/boxclipper.cxx
@@ -31,10 +31,19 @@
#include <comphelper/random.hxx>
#include <rtl/math.hxx>
+#include "boxclipper.hxx"
+
using namespace ::basegfx;
namespace basegfx2d
{
+/// Gets a random ordinal [0,n)
+double getRandomOrdinal( const std::size_t n )
+{
+ // use this one when displaying polygons in OOo, which still sucks
+ // great rocks when trying to import non-integer svg:d attributes
+ return comphelper::rng::uniform_size_distribution(0, n-1);
+}
static bool compare(const B2DPoint& left, const B2DPoint& right)
{
diff --git a/basegfx/test/boxclipper.hxx b/basegfx/test/boxclipper.hxx
new file mode 100644
index 000000000000..03aad0d2ba74
--- /dev/null
+++ b/basegfx/test/boxclipper.hxx
@@ -0,0 +1,31 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <sal/config.h>
+
+#include <cstddef>
+
+namespace basegfx2d
+{
+double getRandomOrdinal(const std::size_t n);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */