parent
5624d589e2
commit
59793268a5
@ -1,36 +0,0 @@
|
|||||||
From 54c63c653deb070c49621bea8acbc18f76118238 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Tardon <dtardon@redhat.com>
|
|
||||||
Date: Tue, 26 May 2015 16:56:56 +0200
|
|
||||||
Subject: [PATCH 1/2] add missing breaks
|
|
||||||
|
|
||||||
Change-Id: I6a6afd517e61aff89319348de5af3aa97093bd1d
|
|
||||||
---
|
|
||||||
src/lib/KEY2Parser.cpp | 3 +++
|
|
||||||
1 file changed, 3 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/lib/KEY2Parser.cpp b/src/lib/KEY2Parser.cpp
|
|
||||||
index bb58efd..4ba70d2 100644
|
|
||||||
--- a/src/lib/KEY2Parser.cpp
|
|
||||||
+++ b/src/lib/KEY2Parser.cpp
|
|
||||||
@@ -261,8 +261,10 @@ void PointElement::attribute(const int name, const char *const value)
|
|
||||||
{
|
|
||||||
case IWORKToken::NS_URI_SFA | IWORKToken::x :
|
|
||||||
m_point.first = lexical_cast<double>(value);
|
|
||||||
+ break;
|
|
||||||
case IWORKToken::NS_URI_SFA | IWORKToken::y :
|
|
||||||
m_point.second = lexical_cast<double>(value);
|
|
||||||
+ break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -358,6 +360,7 @@ void PointPathElement::attribute(const int name, const char *const value)
|
|
||||||
ETONYEK_DEBUG_MSG(("unknown point path type: %s\n", value));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
+ break;
|
|
||||||
}
|
|
||||||
default :
|
|
||||||
KEY2XMLElementContextBase::attribute(name, value);
|
|
||||||
--
|
|
||||||
2.4.1
|
|
||||||
|
|
@ -1,75 +0,0 @@
|
|||||||
From 60c22fc853d7db4ff3ffc1661202fb3db537dbd7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Tardon <dtardon@redhat.com>
|
|
||||||
Date: Sat, 30 May 2015 15:19:32 +0200
|
|
||||||
Subject: [PATCH] avoid use of uninitialized value
|
|
||||||
|
|
||||||
Change-Id: I61c695ca8366ac366d3d450ef8e45cd4eba33fda
|
|
||||||
---
|
|
||||||
src/lib/contexts/IWORKPropertyMapElement.cpp | 18 ++++++++----------
|
|
||||||
1 file changed, 8 insertions(+), 10 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/lib/contexts/IWORKPropertyMapElement.cpp b/src/lib/contexts/IWORKPropertyMapElement.cpp
|
|
||||||
index 6788137..5d94134 100644
|
|
||||||
--- a/src/lib/contexts/IWORKPropertyMapElement.cpp
|
|
||||||
+++ b/src/lib/contexts/IWORKPropertyMapElement.cpp
|
|
||||||
@@ -264,10 +264,10 @@ IWORKXMLContextPtr_t AlignmentElement::element(const int name)
|
|
||||||
|
|
||||||
void AlignmentElement::endOfElement()
|
|
||||||
{
|
|
||||||
- IWORKAlignment prop;
|
|
||||||
-
|
|
||||||
if (m_value)
|
|
||||||
{
|
|
||||||
+ IWORKAlignment prop(IWORK_ALIGNMENT_LEFT);
|
|
||||||
+
|
|
||||||
switch (get(m_value))
|
|
||||||
{
|
|
||||||
case 0 :
|
|
||||||
@@ -285,9 +285,9 @@ void AlignmentElement::endOfElement()
|
|
||||||
default :
|
|
||||||
ETONYEK_DEBUG_MSG(("unknown alignment %d\n", get(m_value)));
|
|
||||||
}
|
|
||||||
- }
|
|
||||||
|
|
||||||
- m_propMap.put<property::Alignment>(prop);
|
|
||||||
+ m_propMap.put<property::Alignment>(prop);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -373,7 +373,8 @@ void CapitalizationElement::endOfElement()
|
|
||||||
{
|
|
||||||
if (m_capitalization)
|
|
||||||
{
|
|
||||||
- IWORKCapitalization prop;
|
|
||||||
+ IWORKCapitalization prop(IWORK_CAPITALIZATION_NONE);
|
|
||||||
+
|
|
||||||
switch (get(m_capitalization))
|
|
||||||
{
|
|
||||||
case 0 :
|
|
||||||
@@ -624,20 +625,17 @@ void SuperscriptElement::endOfElement()
|
|
||||||
{
|
|
||||||
if (m_superscript)
|
|
||||||
{
|
|
||||||
- IWORKBaseline prop;
|
|
||||||
switch (get(m_superscript))
|
|
||||||
{
|
|
||||||
case 1 :
|
|
||||||
- prop = IWORK_BASELINE_SUPER;
|
|
||||||
+ m_propMap.put<property::Baseline>(IWORK_BASELINE_SUPER);
|
|
||||||
break;
|
|
||||||
case 2 :
|
|
||||||
- prop = IWORK_BASELINE_SUB;
|
|
||||||
+ m_propMap.put<property::Baseline>(IWORK_BASELINE_SUB);
|
|
||||||
break;
|
|
||||||
default :
|
|
||||||
ETONYEK_DEBUG_MSG(("unknown superscript %d\n", get(m_superscript)));
|
|
||||||
}
|
|
||||||
-
|
|
||||||
- m_propMap.put<property::Baseline>(prop);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
1.9.3
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
|||||||
From 5bb538c7c9984d2f68b81eb182ca9bf4c12593a9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Tardon <dtardon@redhat.com>
|
|
||||||
Date: Wed, 20 May 2015 16:44:25 +0200
|
|
||||||
Subject: [PATCH] fix test on i386
|
|
||||||
|
|
||||||
Change-Id: I54379bec41f724d5c3ff8bf9e559c5bda7a9c57d
|
|
||||||
---
|
|
||||||
src/test/IWORKTransformationTest.cpp | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/test/IWORKTransformationTest.cpp b/src/test/IWORKTransformationTest.cpp
|
|
||||||
index b44d52f..77f0b27 100644
|
|
||||||
--- a/src/test/IWORKTransformationTest.cpp
|
|
||||||
+++ b/src/test/IWORKTransformationTest.cpp
|
|
||||||
@@ -209,7 +209,7 @@ void IWORKTransformationTest::testIdentities()
|
|
||||||
CPPUNIT_ASSERT(origin(100, 50) == translate(-50, -25));
|
|
||||||
CPPUNIT_ASSERT((flip(true, false) * flip(false, true)) == flip(true, true));
|
|
||||||
CPPUNIT_ASSERT((flip(false, true) * flip(true, false)) == flip(true, true));
|
|
||||||
- CPPUNIT_ASSERT((rotate(etonyek_half_pi) * rotate(etonyek_third_pi)) == (rotate(etonyek_third_pi) * rotate(etonyek_half_pi)));
|
|
||||||
+ CPPUNIT_ASSERT(approxEqual(rotate(etonyek_half_pi) * rotate(etonyek_third_pi), rotate(etonyek_third_pi) * rotate(etonyek_half_pi)));
|
|
||||||
CPPUNIT_ASSERT(scale(-1, -1) == flip(true, true));
|
|
||||||
CPPUNIT_ASSERT((translate(80, 40) * translate(10, 20)) == (translate(10, 20) * translate(80, 40)));
|
|
||||||
CPPUNIT_ASSERT((scale(2, 2) * translate(1, 2) == (translate(2, 4) * scale(2, 2))));
|
|
||||||
--
|
|
||||||
2.4.0
|
|
||||||
|
|
@ -1,90 +0,0 @@
|
|||||||
From 38a5fdf1cb946257d0dd2eb7361a8f3bb3101086 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Tardon <dtardon@redhat.com>
|
|
||||||
Date: Fri, 12 Jun 2015 15:45:21 +0200
|
|
||||||
Subject: [PATCH] get rid of last remains of libwpg
|
|
||||||
|
|
||||||
This fixes output of shapes and images.
|
|
||||||
|
|
||||||
Change-Id: I85302c72005cbb5a5a378fa8ac15666d2918c3b6
|
|
||||||
---
|
|
||||||
src/lib/IWORKCollector.cpp | 2 +-
|
|
||||||
src/lib/IWORKPath.cpp | 8 ++++----
|
|
||||||
src/test/IWORKPathTest.cpp | 4 ++--
|
|
||||||
3 files changed, 7 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/lib/IWORKCollector.cpp b/src/lib/IWORKCollector.cpp
|
|
||||||
index e4e0a8d..242f48b 100644
|
|
||||||
--- a/src/lib/IWORKCollector.cpp
|
|
||||||
+++ b/src/lib/IWORKCollector.cpp
|
|
||||||
@@ -108,7 +108,7 @@ void drawMedia(const IWORKMediaPtr_t &media, const glm::dmat3 &trafo, IWORKOutpu
|
|
||||||
|
|
||||||
librevenge::RVNGPropertyList props;
|
|
||||||
|
|
||||||
- props.insert("libwpg:mime-type", get(mimetype).c_str());
|
|
||||||
+ props.insert("librevenge:mime-type", get(mimetype).c_str());
|
|
||||||
props.insert("office:binary-data", librevenge::RVNGBinaryData(bytes, size));
|
|
||||||
|
|
||||||
glm::dvec3 vec = trafo * glm::dvec3(0, 0, 1);
|
|
||||||
diff --git a/src/lib/IWORKPath.cpp b/src/lib/IWORKPath.cpp
|
|
||||||
index 968a14e..b1b53a8 100644
|
|
||||||
--- a/src/lib/IWORKPath.cpp
|
|
||||||
+++ b/src/lib/IWORKPath.cpp
|
|
||||||
@@ -114,7 +114,7 @@ librevenge::RVNGPropertyList MoveTo::toWPG() const
|
|
||||||
{
|
|
||||||
librevenge::RVNGPropertyList element;
|
|
||||||
|
|
||||||
- element.insert("libwpg:path-action", "M");
|
|
||||||
+ element.insert("librevenge:path-action", "M");
|
|
||||||
element.insert("svg:x", pt2in(m_x));
|
|
||||||
element.insert("svg:y", pt2in(m_y));
|
|
||||||
|
|
||||||
@@ -177,7 +177,7 @@ librevenge::RVNGPropertyList LineTo::toWPG() const
|
|
||||||
{
|
|
||||||
librevenge::RVNGPropertyList element;
|
|
||||||
|
|
||||||
- element.insert("libwpg:path-action", "L");
|
|
||||||
+ element.insert("librevenge:path-action", "L");
|
|
||||||
element.insert("svg:x", pt2in(m_x));
|
|
||||||
element.insert("svg:y", pt2in(m_y));
|
|
||||||
|
|
||||||
@@ -262,7 +262,7 @@ librevenge::RVNGPropertyList CurveTo::toWPG() const
|
|
||||||
{
|
|
||||||
librevenge::RVNGPropertyList element;
|
|
||||||
|
|
||||||
- element.insert("libwpg:path-action", "C");
|
|
||||||
+ element.insert("librevenge:path-action", "C");
|
|
||||||
element.insert("svg:x", pt2in(m_x));
|
|
||||||
element.insert("svg:y", pt2in(m_y));
|
|
||||||
element.insert("svg:x1", pt2in(m_x1));
|
|
||||||
@@ -404,7 +404,7 @@ librevenge::RVNGPropertyListVector IWORKPath::toWPG() const
|
|
||||||
if (m_closed)
|
|
||||||
{
|
|
||||||
librevenge::RVNGPropertyList element;
|
|
||||||
- element.insert("libwpg:path-action", "Z");
|
|
||||||
+ element.insert("librevenge:path-action", "Z");
|
|
||||||
vec.append(element);
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/src/test/IWORKPathTest.cpp b/src/test/IWORKPathTest.cpp
|
|
||||||
index 050f3f8..2ddf4db 100644
|
|
||||||
--- a/src/test/IWORKPathTest.cpp
|
|
||||||
+++ b/src/test/IWORKPathTest.cpp
|
|
||||||
@@ -43,13 +43,13 @@ string toSVG(const IWORKPath &path)
|
|
||||||
{
|
|
||||||
const librevenge::RVNGPropertyList &element = it();
|
|
||||||
|
|
||||||
- CPPUNIT_ASSERT(0 != element["libwpg:path-action"]);
|
|
||||||
+ CPPUNIT_ASSERT(0 != element["librevenge:path-action"]);
|
|
||||||
|
|
||||||
if (first)
|
|
||||||
first = false;
|
|
||||||
else
|
|
||||||
output << ' ';
|
|
||||||
- output << element["libwpg:path-action"]->getStr().cstr();
|
|
||||||
+ output << element["librevenge:path-action"]->getStr().cstr();
|
|
||||||
if (element["svg:x1"])
|
|
||||||
output << ' ' << in2pt(element["svg:x1"]->getDouble());
|
|
||||||
if (element["svg:y1"])
|
|
||||||
--
|
|
||||||
2.4.2
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
|||||||
From 91d39222d9f120211c0189f69299898702a65d3d Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Tardon <dtardon@redhat.com>
|
|
||||||
Date: Tue, 26 May 2015 17:01:22 +0200
|
|
||||||
Subject: [PATCH 2/2] remove surplus breaks
|
|
||||||
|
|
||||||
Change-Id: Ib98a4a5bcd7d9f9eb03874f0715b45bb141ef12d
|
|
||||||
---
|
|
||||||
src/lib/KEY2Parser.cpp | 1 -
|
|
||||||
src/lib/contexts/IWORKStylesContext.cpp | 1 -
|
|
||||||
2 files changed, 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/lib/KEY2Parser.cpp b/src/lib/KEY2Parser.cpp
|
|
||||||
index 4ba70d2..9a37dcd 100644
|
|
||||||
--- a/src/lib/KEY2Parser.cpp
|
|
||||||
+++ b/src/lib/KEY2Parser.cpp
|
|
||||||
@@ -124,7 +124,6 @@ IWORKXMLContextPtr_t StylesContext::element(const int name)
|
|
||||||
return makeContext<KEY2StyleContext>(getState(), name);
|
|
||||||
|
|
||||||
case IWORKToken::NS_URI_SF | IWORKToken::layoutstyle_ref :
|
|
||||||
- break;
|
|
||||||
return makeContext<KEY2StyleRefContext>(getState(), name, false, m_anonymous);
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/src/lib/contexts/IWORKStylesContext.cpp b/src/lib/contexts/IWORKStylesContext.cpp
|
|
||||||
index ef3041b..24efa1d 100644
|
|
||||||
--- a/src/lib/contexts/IWORKStylesContext.cpp
|
|
||||||
+++ b/src/lib/contexts/IWORKStylesContext.cpp
|
|
||||||
@@ -43,7 +43,6 @@ IWORKXMLContextPtr_t IWORKStylesContext::element(const int name)
|
|
||||||
case IWORKToken::NS_URI_SF | IWORKToken::liststyle_ref :
|
|
||||||
case IWORKToken::NS_URI_SF | IWORKToken::paragraphstyle_ref :
|
|
||||||
case IWORKToken::NS_URI_SF | IWORKToken::vector_style_ref :
|
|
||||||
- break;
|
|
||||||
return makeContext<IWORKStyleRefContext>(getState(), name, false, m_anonymous);
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.4.1
|
|
||||||
|
|
Loading…
Reference in new issue