1 From 16d921505a56745f671525310ebb4b3c58b35afe Mon Sep 17 00:00:00 2001
2 From: David Tardon <dtardon@redhat.com>
3 Date: Sun, 23 Oct 2016 19:46:18 +0200
4 Subject: [PATCH] allow build with boost < 1.56
6 Change-Id: I81a110fc19e1540980a265c773bd840c47643d86
8 src/lib/ZMFCollector.cpp | 32 ++++++++++++++++----------------
9 1 file changed, 16 insertions(+), 16 deletions(-)
11 diff --git a/src/lib/ZMFCollector.cpp b/src/lib/ZMFCollector.cpp
12 index 18377ff..0b2608f 100644
13 --- a/src/lib/ZMFCollector.cpp
14 +++ b/src/lib/ZMFCollector.cpp
15 @@ -218,7 +218,7 @@ public:
19 - m_propList.insert("draw:opacity", m_transparency.value().opacity(), librevenge::RVNG_PERCENT);
20 + m_propList.insert("draw:opacity", get(m_transparency).opacity(), librevenge::RVNG_PERCENT);
24 @@ -251,7 +251,7 @@ public:
25 librevenge::RVNGPropertyList grad;
26 grad.insert("svg:offset", stop.offset, librevenge::RVNG_PERCENT);
27 grad.insert("svg:stop-color", stop.color.toString());
28 - grad.insert("svg:stop-opacity", m_transparency ? m_transparency.value().opacity() : 1.0, librevenge::RVNG_PERCENT);
29 + grad.insert("svg:stop-opacity", m_transparency ? get(m_transparency).opacity() : 1.0, librevenge::RVNG_PERCENT);
30 gradientVector.append(grad);
33 @@ -294,7 +294,7 @@ public:
37 - m_propList.insert("draw:opacity", m_transparency.value().opacity(), librevenge::RVNG_PERCENT);
38 + m_propList.insert("draw:opacity", get(m_transparency).opacity(), librevenge::RVNG_PERCENT);
42 @@ -667,9 +667,9 @@ void ZMFCollector::collectText(const Text &text)
43 spanPropList.insert("fo:font-style", span.font.isItalic ? "italic" : "normal");
44 spanPropList.insert("style:text-outline", static_cast<bool>(span.font.outline));
46 - if (span.font.fill && span.font.fill.value().type() == typeid(Color))
47 + if (span.font.fill && get(span.font.fill).type() == typeid(Color))
49 - auto color = boost::get<Color>(span.font.fill.value());
50 + auto color = boost::get<Color>(get(span.font.fill));
51 spanPropList.insert("fo:color", color.toString());
54 @@ -759,9 +759,9 @@ void ZMFCollector::collectTable(const Table &table)
56 librevenge::RVNGPropertyList cellPropList;
58 - if (cell.fill && cell.fill.value().type() == typeid(Color))
59 + if (cell.fill && get(cell.fill).type() == typeid(Color))
61 - auto backgroundColor = boost::get<Color>(cell.fill.value());
62 + auto backgroundColor = boost::get<Color>(get(cell.fill));
63 cellPropList.insert("fo:background-color", backgroundColor.toString());
66 @@ -769,19 +769,19 @@ void ZMFCollector::collectTable(const Table &table)
70 - writeBorder(cellPropList, "fo:border-left", cell.leftBorder.value());
71 + writeBorder(cellPropList, "fo:border-left", get(cell.leftBorder));
75 - writeBorder(cellPropList, "fo:border-right", cell.rightBorder.value());
76 + writeBorder(cellPropList, "fo:border-right", get(cell.rightBorder));
80 - writeBorder(cellPropList, "fo:border-top", cell.topBorder.value());
81 + writeBorder(cellPropList, "fo:border-top", get(cell.topBorder));
83 if (cell.bottomBorder)
85 - writeBorder(cellPropList, "fo:border-bottom", cell.bottomBorder.value());
86 + writeBorder(cellPropList, "fo:border-bottom", get(cell.bottomBorder));
89 m_painter->openTableCell(cellPropList);
90 @@ -806,7 +806,7 @@ void ZMFCollector::collectImage(const librevenge::RVNGBinaryData &image, const P
92 if (m_style.transparency)
94 - propList.insert("draw:opacity", m_style.transparency.value().opacity(), librevenge::RVNG_PERCENT);
95 + propList.insert("draw:opacity", get(m_style.transparency).opacity(), librevenge::RVNG_PERCENT);
98 m_painter->setStyle(propList);
99 @@ -847,17 +847,17 @@ void ZMFCollector::writeStyle(librevenge::RVNGPropertyList &propList, const Styl
103 - writePen(propList, style.pen.value());
104 + writePen(propList, get(style.pen));
107 if (style.fill && !noFill)
109 - writeFill(propList, style.fill.value());
110 + writeFill(propList, get(style.fill));
115 - writeShadow(propList, style.shadow.value());
116 + writeShadow(propList, get(style.shadow));
120 @@ -920,7 +920,7 @@ void ZMFCollector::writePen(librevenge::RVNGPropertyList &propList, const Pen &p
122 if (m_style.transparency)
124 - propList.insert("svg:stroke-opacity", m_style.transparency.value().opacity(), librevenge::RVNG_PERCENT);
125 + propList.insert("svg:stroke-opacity", get(m_style.transparency).opacity(), librevenge::RVNG_PERCENT);