From 7a73a9ce1d5f8cc1a6d970ea8f093773f4ddd9db Mon Sep 17 00:00:00 2001 From: sian-ht Date: Fri, 24 Feb 2017 10:17:48 +0100 Subject: [Bug #1464987] --export-latex crashes with a svg file. Fixed bugs: - https://launchpad.net/bugs/1464987 (bzr r15544) --- src/libnrtype/Layout-TNG.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/libnrtype/Layout-TNG.h b/src/libnrtype/Layout-TNG.h index e06b8392f..c39315106 100644 --- a/src/libnrtype/Layout-TNG.h +++ b/src/libnrtype/Layout-TNG.h @@ -194,7 +194,7 @@ public: /** For expressing paragraph alignment. These values are rotated in the case of vertical text, but are not dependent on whether the paragraph is rtl or ltr, thus LEFT is always either left or top. */ - enum Alignment {LEFT, CENTER, RIGHT, FULL}; + enum Alignment {LEFT, CENTER, RIGHT, FULL, NONE}; /** The CSS spec allows line-height:normal to be whatever the user agent thinks will look good. This is our value, as a multiple of font-size. */ @@ -1144,7 +1144,7 @@ inline unsigned Layout::paragraphIndex(iterator const &it) const {return it._char_index == _characters.size() ? _paragraphs.size() - 1 : _characters[it._char_index].line(this).in_paragraph;} inline Layout::Alignment Layout::paragraphAlignment(iterator const &it) const - {return _paragraphs[paragraphIndex(it)].alignment;} + {return (_paragraphs.size() == 0) ? NONE : _paragraphs[paragraphIndex(it)].alignment;} inline bool Layout::iterator::nextGlyph() { -- cgit v1.2.3