summaryrefslogtreecommitdiffstats
path: root/src/libnrtype
diff options
context:
space:
mode:
Diffstat (limited to 'src/libnrtype')
-rw-r--r--src/libnrtype/FontFactory.h2
-rw-r--r--src/libnrtype/Layout-TNG-OutIter.cpp4
-rw-r--r--src/libnrtype/Layout-TNG.h6
3 files changed, 8 insertions, 4 deletions
diff --git a/src/libnrtype/FontFactory.h b/src/libnrtype/FontFactory.h
index bd5a4460c..4c8c2cb29 100644
--- a/src/libnrtype/FontFactory.h
+++ b/src/libnrtype/FontFactory.h
@@ -68,7 +68,7 @@ public:
};
// Map type for gathering UI family and style names
-typedef std::map<Glib::ustring, std::list<StyleNames> > FamilyToStylesMap;
+// typedef std::map<Glib::ustring, std::list<StyleNames> > FamilyToStylesMap;
class font_factory {
public:
diff --git a/src/libnrtype/Layout-TNG-OutIter.cpp b/src/libnrtype/Layout-TNG-OutIter.cpp
index c9c318960..707897f50 100644
--- a/src/libnrtype/Layout-TNG-OutIter.cpp
+++ b/src/libnrtype/Layout-TNG-OutIter.cpp
@@ -788,12 +788,12 @@ bool Layout::iterator::prevLineCursor(int n)
{
if (!_cursor_moving_vertically)
beginCursorUpDown();
- unsigned line_index;
+ int line_index;
if (_char_index == _parent_layout->_characters.size())
line_index = _parent_layout->_lines.size() - 1;
else
line_index = _parent_layout->_characters[_char_index].chunk(_parent_layout).in_line;
- if (line_index == 0)
+ if (line_index <= 0)
return false; // nowhere to go
else
n = MIN (n, static_cast<int>(line_index));
diff --git a/src/libnrtype/Layout-TNG.h b/src/libnrtype/Layout-TNG.h
index e91c32ebe..26db1fad9 100644
--- a/src/libnrtype/Layout-TNG.h
+++ b/src/libnrtype/Layout-TNG.h
@@ -701,7 +701,11 @@ private:
/** The overall block-progression of the whole flow. */
inline Direction _blockProgression() const
- {return static_cast<InputStreamTextSource*>(_input_stream.front())->styleGetBlockProgression();}
+ {
+ if(!_input_stream.empty())
+ return static_cast<InputStreamTextSource*>(_input_stream.front())->styleGetBlockProgression();
+ return TOP_TO_BOTTOM;
+ }
/** so that LEFT_TO_RIGHT == RIGHT_TO_LEFT but != TOP_TO_BOTTOM */
static bool _directions_are_orthogonal(Direction d1, Direction d2);