string s = FileSearch(string(), filename, "lyx");
bool const found = !s.empty();
string s = FileSearch(string(), filename, "lyx");
bool const found = !s.empty();
if (bufferlist.exists(s)) {
string const file = MakeDisplayPath(s, 20);
string text = bformat(_("The document %1$s is already "
if (bufferlist.exists(s)) {
string const file = MakeDisplayPath(s, 20);
string text = bformat(_("The document %1$s is already "
- lyxerr[Debug::INFO] << " No Buffer!" << endl;
- // we are closing the buffer, use the first buffer as current
+ lyxerr[Debug::INFO] << BOOST_CURRENT_FUNCTION
+ << " No Buffer!" << endl;
+ // We are closing the buffer, use the first buffer as current
<< " curr par: " << bv_->cursor().bottom().pit()
<< " default height " << defaultRowHeight() << endl;
<< " curr par: " << bv_->cursor().bottom().pit()
<< " default height " << defaultRowHeight() << endl;
- //it would be better to fix the scrollbar to understand
- //values in [0..1] and divide everything by wh
+ // It would be better to fix the scrollbar to understand
+ // values in [0..1] and divide everything by wh
int const wh = workarea().workHeight() / 4;
int const h = t.getPar(anchor_ref_).height();
workarea().setScrollbarParams(t.paragraphs().size() * wh, anchor_ref_ * wh + int(offset_ref_ * wh / float(h)), int (wh * defaultRowHeight() / float(h)));
int const wh = workarea().workHeight() / 4;
int const h = t.getPar(anchor_ref_).height();
workarea().setScrollbarParams(t.paragraphs().size() * wh, anchor_ref_ * wh + int(offset_ref_ * wh / float(h)), int (wh * defaultRowHeight() / float(h)));
bool const widthChange = workarea().workWidth() != work_area_width;
bool const heightChange = workarea().workHeight() != work_area_height;
bool const widthChange = workarea().workWidth() != work_area_width;
bool const heightChange = workarea().workHeight() != work_area_height;
- lyxerr << "BufferView::Pimpl::update(fc=" << fitcursor << ", fu="
- << forceupdate << ") buffer: " << buffer_ << endl;
+ lyxerr << BOOST_CURRENT_FUNCTION
+ << "[fitcursor = " << fitcursor << ','
+ << " forceupdate = " << forceupdate
+ << "] buffer: " << buffer_ << endl;
CoordCache backup;
std::swap(theCoords, backup);
theCoords.startUpdating();
CoordCache backup;
std::swap(theCoords, backup);
theCoords.startUpdating();
} else {
// Abort updating of the coord cache - just restore the old one
std::swap(theCoords, backup);
} else {
// Abort updating of the coord cache - just restore the old one
std::swap(theCoords, backup);
- ::loadLyXFile(b, fname); // don't ask, just load it
+ // Don't ask, just load it
+ ::loadLyXFile(b, fname);
filename = FileSearch(string(), filename, "lyx");
string const disp_fn = MakeDisplayPath(filename);
filename = FileSearch(string(), filename, "lyx");
string const disp_fn = MakeDisplayPath(filename);
bind(&Paragraph::trackChanges, _1, Change::UNCHANGED));
buf->params().tracking_changes = true;
bind(&Paragraph::trackChanges, _1, Change::UNCHANGED));
buf->params().tracking_changes = true;
- lyxerr << "BufferView::Pimpl::workAreaDispatch: request: "
- << cmd0 << std::endl;
- // this is only called for mouse related events including
+ lyxerr << BOOST_CURRENT_FUNCTION
+ << "[ cmd0 " << cmd0 << "]" << endl;
+
+ // This is only called for mouse related events including
// Doesn't go through lyxfunc, so we need to update
// the layout choice etc. ourselves
// Doesn't go through lyxfunc, so we need to update
// the layout choice etc. ourselves
// Build temporary cursor.
cmd.y = min(max(cmd.y,-1), bv_->workHeight());
InsetBase * inset = bv_->text()->editXY(cur, cmd.x, cmd.y);
// Build temporary cursor.
cmd.y = min(max(cmd.y,-1), bv_->workHeight());
InsetBase * inset = bv_->text()->editXY(cur, cmd.x, cmd.y);
- lyxerr << " * hit inset at tip: " << inset << endl;
- lyxerr << " * created temp cursor:" << cur << endl;
+ lyxerr << BOOST_CURRENT_FUNCTION
+ << " * hit inset at tip: " << inset << endl;
+ lyxerr << BOOST_CURRENT_FUNCTION
+ << " * created temp cursor:" << cur << endl;
if (cmd.action != LFUN_MOUSE_MOTION) {
owner_->updateLayoutChoice();
owner_->updateToolbars();
}
if (cmd.action != LFUN_MOUSE_MOTION) {
owner_->updateLayoutChoice();
owner_->updateToolbars();
}
// clicked somewhere, so we force through the display
// of the new status here.
owner_->clearMessage();
// clicked somewhere, so we force through the display
// of the new status here.
owner_->clearMessage();
- size_t npit = text->paragraphs().size();
- lyxerr << "npit: " << npit << " pit1: " << pit1
- << " pit2: " << pit2 << endl;
+ size_t const npit = text->paragraphs().size();
+
+ lyxerr << BOOST_CURRENT_FUNCTION
+ << " npit: " << npit
+ << " pit1: " << pit1
+ << " pit2: " << pit2
+ << endl;
return ViewMetricsInfo(pit1, pit2, y1, y2);
}
return ViewMetricsInfo(pit1, pit2, y1, y2);
}