#include "BufferView.h"
#include "gettext.h"
#include "lengthcommon.h"
-#include "LyXText.h"
+#include "Text.h"
#include "support/convert.h"
#include "support/lstrings.h"
/// used to return numeric values in parsing vspace
double number[4] = { 0, 0, 0, 0 };
/// used to return unit types in parsing vspace
-LyXLength::UNIT unit[4] = { LyXLength::UNIT_NONE,
- LyXLength::UNIT_NONE,
- LyXLength::UNIT_NONE,
- LyXLength::UNIT_NONE };
+Length::UNIT unit[4] = { Length::UNIT_NONE,
+ Length::UNIT_NONE,
+ Length::UNIT_NONE,
+ Length::UNIT_NONE };
/// the current position in the number array
int number_index;
unit[unit_index] = unitFromString(buffer);
}
- if (unit[unit_index] != LyXLength::UNIT_NONE) {
+ if (unit[unit_index] != Length::UNIT_NONE) {
++unit_index;
return 'u';
}
}
-bool isValidGlueLength(string const & data, LyXGlueLength * result)
+bool isValidGlueLength(string const & data, GlueLength * result)
{
// This parser is table-driven. First, it constructs a "pattern"
// that describes the sequence of tokens in "data". For example,
// numbers and units are stored into static arrays. Then, "pattern"
// is searched in the "table". If it is found, the associated
// table entries tell us which number and unit should go where
- // in the LyXLength structure. Example: if "data" has the "pattern"
+ // in the Length structure. Example: if "data" has the "pattern"
// "nu+nu-nu", the associated table entries are "2, 3, 2, 3".
// That means, "plus_val" is the second number that was seen
// in the input, "minus_val" is the third number, and "plus_uni"
}
-bool isValidLength(string const & data, LyXLength * result)
+bool isValidLength(string const & data, Length * result)
{
// This is a trimmed down version of isValidGlueLength.
// The parser may seem overkill for lengths without
{}
-VSpace::VSpace(LyXLength const & l)
+VSpace::VSpace(Length const & l)
: kind_(LENGTH), len_(l), keep_(false)
{}
-VSpace::VSpace(LyXGlueLength const & l)
+VSpace::VSpace(GlueLength const & l)
: kind_(LENGTH), len_(l), keep_(false)
{}
// without units in added_space_top/bottom.
// Let unit default to centimeters here.
kind_ = LENGTH;
- len_ = LyXGlueLength(LyXLength(convert<double>(input), LyXLength::CM));
+ len_ = GlueLength(Length(convert<double>(input), Length::CM));
}
}
}
-LyXGlueLength const & VSpace::length() const
+GlueLength const & VSpace::length() const
{
return len_;
}