summaryrefslogtreecommitdiffstats
path: root/external/libetonyek/glm-force-dmat3-initialization-needed-from-v0.9.9.0.patch.1
blob: 1add51828ce2e75593f2d95dbe4490232a9a8045 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
From 548c2735c09570726f08d5ae9fee8efefb54d529 Mon Sep 17 00:00:00 2001
From: osnola <alonso@loria.fr>
Date: Sun, 31 Mar 2019 09:34:11 +0200
Subject: [PATCH] glm: force dmat3 initialization (needed from v0.9.9.0)

Change-Id: I2cb285f2d9bc1e9818ed946b38caaf8a5de9e61a
Reviewed-on: https://gerrit.libreoffice.org/69993
Reviewed-by: Laurent Alonso(fr) <alonso.laurent@gmail.com>
Tested-by: Laurent Alonso(fr) <alonso.laurent@gmail.com>
---
 src/lib/IWORKCollector.cpp | 6 +++---
 src/lib/KEYCollector.cpp   | 3 +--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/lib/IWORKCollector.cpp b/src/lib/IWORKCollector.cpp
index 41a9c79..794b462 100644
--- a/src/lib/IWORKCollector.cpp
+++ b/src/lib/IWORKCollector.cpp
@@ -183,8 +183,8 @@ private:
 IWORKCollector::Level::Level()
   : m_geometry()
   , m_graphicStyle()
-  , m_trafo()
-  , m_previousTrafo()
+  , m_trafo(1)
+  , m_previousTrafo(1)
 {
 }
 
@@ -601,7 +601,7 @@ void IWORKCollector::startLevel()
     return;
   }
 
-  glm::dmat3 currentTrafo, prevTrafo;
+  glm::dmat3 currentTrafo(1), prevTrafo(1);
   if (!m_levelStack.empty())
   {
     currentTrafo = m_levelStack.top().m_trafo;
diff --git a/src/lib/KEYCollector.cpp b/src/lib/KEYCollector.cpp
index a9d8cc3..08e7e69 100644
--- a/src/lib/KEYCollector.cpp
+++ b/src/lib/KEYCollector.cpp
@@ -167,7 +167,7 @@ void KEYCollector::insertTextPlaceholder(const KEYPlaceholderPtr_t &placeholder)
 {
   if (bool(placeholder))
   {
-    glm::dmat3 trafo;
+    glm::dmat3 trafo(1);
     if (bool(placeholder->m_geometry))
       trafo = makeTransformation(*placeholder->m_geometry);
     trafo *= m_levelStack.top().m_trafo;
@@ -417,7 +417,6 @@ void KEYCollector::drawTextBox(const IWORKTextPtr_t &text, const glm::dmat3 &tra
     double w = boundingBox->m_naturalSize.m_width;
     double h = boundingBox->m_naturalSize.m_height;
     vec = trafo * glm::dvec3(w, h, 0);
-
     if (vec[0]>0)
       props.insert("svg:width", pt2in(vec[0]));
     if (vec[1]>0)
-- 
2.24.1