[Libreoffice-commits] libvisio.git: src/lib
Fridrich Štrba
fridrich.strba at bluewin.ch
Sun Feb 5 21:32:10 UTC 2017
src/lib/VSDXMLParserBase.cpp | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
New commits:
commit fed7358999a4a49576cebc322fdf03848f130414
Author: Fridrich Štrba <fridrich.strba at bluewin.ch>
Date: Sun Feb 5 22:31:44 2017 +0100
Return uninitialized boost::optional instead of default Colour value
Change-Id: I7d3d48ac80cae9bc7fca5e5a8452122fef40c786
diff --git a/src/lib/VSDXMLParserBase.cpp b/src/lib/VSDXMLParserBase.cpp
index da5581f..ec2a4ab 100644
--- a/src/lib/VSDXMLParserBase.cpp
+++ b/src/lib/VSDXMLParserBase.cpp
@@ -2184,9 +2184,11 @@ int libvisio::VSDXMLParserBase::readExtendedColourData(Colour &value, long &idx,
if (iter != m_colours.end())
value = iter->second;
else
- idx = -1;
+ return -1000;
}
}
+ else
+ return -1000;
return 1;
}
return -1;
@@ -2196,7 +2198,10 @@ int libvisio::VSDXMLParserBase::readExtendedColourData(boost::optional<Colour> &
{
Colour tmpValue;
int ret = readExtendedColourData(tmpValue, reader);
- value = tmpValue;
+ if (ret != -1000)
+ value = tmpValue;
+ else
+ ret = 1;
return ret;
}
More information about the Libreoffice-commits
mailing list