But empty strings are even worse.
if (tm.contains(bot_pit)) {
ParagraphMetrics const & pm = tm.parMetrics(bot_pit);
if (tm.contains(bot_pit)) {
ParagraphMetrics const & pm = tm.parMetrics(bot_pit);
- LBUFERR(!pm.rows().empty(), _(""));
+ LBUFERR(!pm.rows().empty(), "");
// FIXME: smooth scrolling doesn't work in mathed.
CursorSlice const & cs = dit.innerTextSlice();
int offset = coordOffset(dit).y_;
// FIXME: smooth scrolling doesn't work in mathed.
CursorSlice const & cs = dit.innerTextSlice();
int offset = coordOffset(dit).y_;
TextMetrics & BufferView::textMetrics(Text const * t)
{
TextMetrics & BufferView::textMetrics(Text const * t)
{
TextMetricsCache::iterator tmc_it = d->text_metrics_.find(t);
if (tmc_it == d->text_metrics_.end()) {
tmc_it = d->text_metrics_.insert(
TextMetricsCache::iterator tmc_it = d->text_metrics_.find(t);
if (tmc_it == d->text_metrics_.end()) {
tmc_it = d->text_metrics_.insert(
TextMetrics const & tm = textMetrics(sl.text());
ParagraphMetrics const & pm = tm.parMetrics(sl.pit());
TextMetrics const & tm = textMetrics(sl.text());
ParagraphMetrics const & pm = tm.parMetrics(sl.pit());
- LBUFERR(!pm.rows().empty(), _(""));
+ LBUFERR(!pm.rows().empty(), "");
y -= pm.rows()[0].ascent();
#if 1
// FIXME: document this mess
y -= pm.rows()[0].ascent();
#if 1
// FIXME: document this mess
- LBUFERR(!in.paragraphs().empty(), _(""));
+ LBUFERR(!in.paragraphs().empty(), "");
if (oldone == newone)
return;
if (oldone == newone)
return;
CursorSlice const & DocIterator::innerTextSlice() const
{
CursorSlice const & DocIterator::innerTextSlice() const
{
- LBUFERR(!empty(), _(""));
// go up until first non-0 text is hit
// (innermost text is 0 in mathed)
for (int i = depth() - 1; i >= 0; --i)
// go up until first non-0 text is hit
// (innermost text is 0 in mathed)
for (int i = depth() - 1; i >= 0; --i)
// This case is in principe not possible. We _must_
// be inside a Text.
// This case is in principe not possible. We _must_
// be inside a Text.
// Squash warning
static const CursorSlice c;
return c;
// Squash warning
static const CursorSlice c;
return c;
unsigned int & column)
{
Inset * inset = owner_->getInset(i);
unsigned int & column)
{
Inset * inset = owner_->getInset(i);
if (style.pass_thru) {
odocstringstream ods;
if (style.pass_thru) {
odocstringstream ods;