[Libreoffice-commits] libvisio.git: src/lib
Fridrich Å trba
fridrich.strba at bluewin.ch
Tue Apr 16 14:43:23 PDT 2013
src/lib/VSDContentCollector.cpp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 471f32deacf03b44749d62eed99bbb873bbe1fe5
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Tue Apr 16 23:42:57 2013 +0200
Trying to get the short texts right
diff --git a/src/lib/VSDContentCollector.cpp b/src/lib/VSDContentCollector.cpp
index eb1e2d3..e668666 100644
--- a/src/lib/VSDContentCollector.cpp
+++ b/src/lib/VSDContentCollector.cpp
@@ -590,8 +590,12 @@ void libvisio::VSDContentCollector::_flushText()
}
if (tmpBuffer.size() >= 2)
{
- tmpBuffer[tmpBuffer.size() - 2] = 0;
- tmpBuffer[tmpBuffer.size() - 1] = 0;
+ if (tmpBuffer[tmpBuffer.size() - 1] == 0 && (tmpBuffer[tmpBuffer.size() - 2] == 0x0a ||
+ tmpBuffer[tmpBuffer.size() - 2] == '\n' || tmpBuffer[tmpBuffer.size() - 2] == 0x0e))
+ {
+ tmpBuffer.pop_back();
+ tmpBuffer.pop_back();
+ }
}
else
tmpBuffer.clear();
More information about the Libreoffice-commits
mailing list