summaryrefslogtreecommitdiff
path: root/drawinglayer/source/primitive3d
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2021-11-06 21:45:37 +0100
committerTomaž Vajngerl <quikee@gmail.com>2021-11-08 13:52:31 +0100
commita2fa768b73d96352ffafd166564d2c1cb2e140c3 (patch)
tree0ca8be51a8d6a2086f3bc35fca41a9f202c2cb58 /drawinglayer/source/primitive3d
parent750d64ce68ecbbf7013e498836c90e3c1ac1b371 (diff)
extend XML dumpig for primitives to support fontwork objects
This adds support for 3D drawinglayer primitive XML dumping and adds dumping support for many more primitives and attributes that were missing before. This is needed to be able to check the fontwork objects, which can be rendered in 3D. Change-Id: I0e78be4d4030a0cae3d2b952a1a38de8940ee310 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124804 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'drawinglayer/source/primitive3d')
-rw-r--r--drawinglayer/source/primitive3d/Tools.cxx67
1 files changed, 67 insertions, 0 deletions
diff --git a/drawinglayer/source/primitive3d/Tools.cxx b/drawinglayer/source/primitive3d/Tools.cxx
new file mode 100644
index 000000000000..c27896b043cc
--- /dev/null
+++ b/drawinglayer/source/primitive3d/Tools.cxx
@@ -0,0 +1,67 @@
+/* -*- 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/.
+ *
+ */
+
+#include <drawinglayer/primitive3d/Tools.hxx>
+#include <drawinglayer/primitive3d/drawinglayer_primitivetypes3d.hxx>
+
+using namespace css;
+
+namespace drawinglayer::primitive3d
+{
+OUString idToString(sal_uInt32 nId)
+{
+ switch (nId)
+ {
+ case PRIMITIVE3D_ID_GROUPPRIMITIVE3D:
+ return "GROUPPRIMITIVE3D";
+ case PRIMITIVE3D_ID_HATCHTEXTUREPRIMITIVE3D:
+ return "HATCHTEXTUREPRIMITIVE3D";
+ case PRIMITIVE3D_ID_MODIFIEDCOLORPRIMITIVE3D:
+ return "MODIFIEDCOLORPRIMITIVE3D";
+ case PRIMITIVE3D_ID_POLYGONHAIRLINEPRIMITIVE3D:
+ return "POLYGONHAIRLINEPRIMITIVE3D";
+ case PRIMITIVE3D_ID_POLYGONSTROKEPRIMITIVE3D:
+ return "POLYGONSTROKEPRIMITIVE3D";
+ case PRIMITIVE3D_ID_POLYGONTUBEPRIMITIVE3D:
+ return "POLYGONTUBEPRIMITIVE3D";
+ case PRIMITIVE3D_ID_POLYPOLYGONMATERIALPRIMITIVE3D:
+ return "POLYPOLYGONMATERIALPRIMITIVE3D";
+ case PRIMITIVE3D_ID_SDRCUBEPRIMITIVE3D:
+ return "SDRCUBEPRIMITIVE3D";
+ case PRIMITIVE3D_ID_SDREXTRUDEPRIMITIVE3D:
+ return "SDREXTRUDEPRIMITIVE3D";
+ case PRIMITIVE3D_ID_SDRLATHEPRIMITIVE3D:
+ return "SDRLATHEPRIMITIVE3D";
+ case PRIMITIVE3D_ID_SDRPOLYPOLYGONPRIMITIVE3D:
+ return "SDRPOLYPOLYGONPRIMITIVE3D";
+ case PRIMITIVE3D_ID_SDRSPHEREPRIMITIVE3D:
+ return "SDRSPHEREPRIMITIVE3D";
+ case PRIMITIVE3D_ID_SHADOWPRIMITIVE3D:
+ return "SHADOWPRIMITIVE3D";
+ case PRIMITIVE3D_ID_UNIFIEDTRANSPARENCETEXTUREPRIMITIVE3D:
+ return "UNIFIEDTRANSPARENCETEXTUREPRIMITIVE3D";
+ case PRIMITIVE3D_ID_GRADIENTTEXTUREPRIMITIVE3D:
+ return "GRADIENTTEXTUREPRIMITIVE3D";
+ case PRIMITIVE3D_ID_BITMAPTEXTUREPRIMITIVE3D:
+ return "BITMAPTEXTUREPRIMITIVE3D";
+ case PRIMITIVE3D_ID_TRANSPARENCETEXTUREPRIMITIVE3D:
+ return "TRANSPARENCETEXTUREPRIMITIVE3D";
+ case PRIMITIVE3D_ID_TRANSFORMPRIMITIVE3D:
+ return "TRANSFORMPRIMITIVE3D";
+ case PRIMITIVE3D_ID_HIDDENGEOMETRYPRIMITIVE3D:
+ return "HIDDENGEOMETRYPRIMITIVE3D";
+ default:
+ return OUString::number((nId >> 16) & 0xFF) + "|" + OUString::number(nId & 0xFF);
+ }
+}
+
+} // end of namespace drawinglayer::primitive2d
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */