mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
avoid evalutation of lyxerr arguments unless really needed
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17675 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2a0dd05520
commit
83b326d204
@ -145,7 +145,7 @@ Buffer * BufferView::buffer() const
|
||||
|
||||
void BufferView::setBuffer(Buffer * b)
|
||||
{
|
||||
lyxerr[Debug::INFO] << BOOST_CURRENT_FUNCTION
|
||||
LYXERR(Debug::INFO) << BOOST_CURRENT_FUNCTION
|
||||
<< "[ b = " << b << "]" << endl;
|
||||
|
||||
if (buffer_) {
|
||||
@ -181,7 +181,7 @@ void BufferView::setBuffer(Buffer * b)
|
||||
// If we are closing current buffer, switch to the first in
|
||||
// buffer list.
|
||||
if (!b) {
|
||||
lyxerr[Debug::INFO] << BOOST_CURRENT_FUNCTION
|
||||
LYXERR(Debug::INFO) << BOOST_CURRENT_FUNCTION
|
||||
<< " No Buffer!" << endl;
|
||||
// We are closing the buffer, use the first buffer as current
|
||||
buffer_ = theBufferList().first();
|
||||
@ -196,7 +196,7 @@ void BufferView::setBuffer(Buffer * b)
|
||||
offset_ref_ = 0;
|
||||
|
||||
if (buffer_) {
|
||||
lyxerr[Debug::INFO] << BOOST_CURRENT_FUNCTION
|
||||
LYXERR(Debug::INFO) << BOOST_CURRENT_FUNCTION
|
||||
<< "Buffer addr: " << buffer_ << endl;
|
||||
cursor_.push(buffer_->inset());
|
||||
cursor_.resetAnchor();
|
||||
@ -297,7 +297,7 @@ void BufferView::resize()
|
||||
if (!buffer_)
|
||||
return;
|
||||
|
||||
lyxerr[Debug::DEBUG] << BOOST_CURRENT_FUNCTION << endl;
|
||||
LYXERR(Debug::DEBUG) << BOOST_CURRENT_FUNCTION << endl;
|
||||
|
||||
updateMetrics(false);
|
||||
switchKeyMap();
|
||||
@ -339,7 +339,7 @@ bool BufferView::update(Update::flags flags)
|
||||
last_inset_ = 0;
|
||||
// This is close to a hot-path.
|
||||
if (lyxerr.debugging(Debug::DEBUG)) {
|
||||
lyxerr[Debug::DEBUG]
|
||||
LYXERR(Debug::DEBUG)
|
||||
<< BOOST_CURRENT_FUNCTION
|
||||
<< "[fitcursor = " << (flags & Update::FitCursor)
|
||||
<< ", forceupdate = " << (flags & Update::Force)
|
||||
@ -352,7 +352,7 @@ bool BufferView::update(Update::flags flags)
|
||||
return false;
|
||||
|
||||
if (lyxerr.debugging(Debug::WORKAREA)) {
|
||||
lyxerr[Debug::WORKAREA] << "BufferView::update" << std::endl;
|
||||
LYXERR(Debug::WORKAREA) << "BufferView::update" << std::endl;
|
||||
}
|
||||
|
||||
// Update macro store
|
||||
@ -409,7 +409,7 @@ bool BufferView::update(Update::flags flags)
|
||||
void BufferView::updateScrollbar()
|
||||
{
|
||||
if (!buffer_) {
|
||||
lyxerr[Debug::DEBUG] << BOOST_CURRENT_FUNCTION
|
||||
LYXERR(Debug::DEBUG) << BOOST_CURRENT_FUNCTION
|
||||
<< " no text in updateScrollbar" << endl;
|
||||
scrollbarParameters_.reset();
|
||||
return;
|
||||
@ -425,7 +425,7 @@ void BufferView::updateScrollbar()
|
||||
}
|
||||
|
||||
if (lyxerr.debugging(Debug::GUI)) {
|
||||
lyxerr[Debug::GUI]
|
||||
LYXERR(Debug::GUI)
|
||||
<< BOOST_CURRENT_FUNCTION
|
||||
<< " Updating scrollbar: height: " << t.paragraphs().size()
|
||||
<< " curr par: " << cursor_.bottom().pit()
|
||||
@ -479,7 +479,7 @@ ScrollbarParameters const & BufferView::scrollbarParameters() const
|
||||
|
||||
void BufferView::scrollDocView(int value)
|
||||
{
|
||||
lyxerr[Debug::GUI] << BOOST_CURRENT_FUNCTION
|
||||
LYXERR(Debug::GUI) << BOOST_CURRENT_FUNCTION
|
||||
<< "[ value = " << value << "]" << endl;
|
||||
|
||||
if (!buffer_)
|
||||
@ -716,7 +716,7 @@ Update::flags BufferView::dispatch(FuncRequest const & cmd)
|
||||
// << [ cmd = " << cmd << "]" << endl;
|
||||
|
||||
// Make sure that the cached BufferView is correct.
|
||||
lyxerr[Debug::ACTION] << BOOST_CURRENT_FUNCTION
|
||||
LYXERR(Debug::ACTION) << BOOST_CURRENT_FUNCTION
|
||||
<< " action[" << cmd.action << ']'
|
||||
<< " arg[" << to_utf8(cmd.argument()) << ']'
|
||||
<< " x[" << cmd.x << ']'
|
||||
@ -801,11 +801,11 @@ Update::flags BufferView::dispatch(FuncRequest const & cmd)
|
||||
for (Buffer * b = buffer_; i == 0 || b != buffer_; b = theBufferList().next(b)) {
|
||||
ParIterator par = b->getParFromID(id);
|
||||
if (par == b->par_iterator_end()) {
|
||||
lyxerr[Debug::INFO]
|
||||
LYXERR(Debug::INFO)
|
||||
<< "No matching paragraph found! ["
|
||||
<< id << "]." << endl;
|
||||
} else {
|
||||
lyxerr[Debug::INFO]
|
||||
LYXERR(Debug::INFO)
|
||||
<< "Paragraph " << par->id()
|
||||
<< " found in buffer `"
|
||||
<< b->fileName() << "'." << endl;
|
||||
@ -1084,7 +1084,7 @@ InsetBase const * BufferView::getCoveringInset(LyXText const & text, int x, int
|
||||
BOOST_ASSERT(pit != -1);
|
||||
Paragraph const & par = text.getPar(pit);
|
||||
|
||||
lyxerr[Debug::DEBUG]
|
||||
LYXERR(Debug::DEBUG)
|
||||
<< BOOST_CURRENT_FUNCTION
|
||||
<< ": x: " << x
|
||||
<< " y: " << y
|
||||
@ -1113,13 +1113,13 @@ InsetBase const * BufferView::getCoveringInset(LyXText const & text, int x, int
|
||||
}
|
||||
}
|
||||
|
||||
lyxerr[Debug::DEBUG]
|
||||
LYXERR(Debug::DEBUG)
|
||||
<< BOOST_CURRENT_FUNCTION
|
||||
<< ": Hit inset: " << inset << endl;
|
||||
return inset;
|
||||
}
|
||||
}
|
||||
lyxerr[Debug::DEBUG]
|
||||
LYXERR(Debug::DEBUG)
|
||||
<< BOOST_CURRENT_FUNCTION
|
||||
<< ": No inset hit. " << endl;
|
||||
return 0;
|
||||
@ -1519,7 +1519,7 @@ void BufferView::updateMetrics(bool singlepar)
|
||||
pit2 = cursor_.bottom().pit();
|
||||
}
|
||||
|
||||
lyxerr[Debug::DEBUG]
|
||||
LYXERR(Debug::DEBUG)
|
||||
<< BOOST_CURRENT_FUNCTION
|
||||
<< " y1: " << y1
|
||||
<< " y2: " << y2
|
||||
@ -1534,7 +1534,7 @@ void BufferView::updateMetrics(bool singlepar)
|
||||
singlepar? SingleParUpdate: FullScreenUpdate, size);
|
||||
|
||||
if (lyxerr.debugging(Debug::WORKAREA)) {
|
||||
lyxerr[Debug::WORKAREA] << "BufferView::updateMetrics" << endl;
|
||||
LYXERR(Debug::WORKAREA) << "BufferView::updateMetrics" << endl;
|
||||
coord_cache_.dump();
|
||||
}
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ public:
|
||||
os << std::setw(10) << std::setfill('0') << do_crc(orig_from.absFilename())
|
||||
<< '-' << to_format;
|
||||
cache_name = FileName(addName(cache_dir.absFilename(), os.str()));
|
||||
lyxerr[Debug::FILES] << "Add file cache item " << orig_from
|
||||
LYXERR(Debug::FILES) << "Add file cache item " << orig_from
|
||||
<< ' ' << to_format << ' ' << cache_name
|
||||
<< ' ' << timestamp << ' ' << checksum
|
||||
<< '.' << std::endl;
|
||||
@ -116,7 +116,7 @@ void ConverterCache::Impl::readIndex()
|
||||
|
||||
// Don't cache files that do not exist anymore
|
||||
if (!fs::exists(orig_from_name.toFilesystemEncoding())) {
|
||||
lyxerr[Debug::FILES] << "Not caching file `"
|
||||
LYXERR(Debug::FILES) << "Not caching file `"
|
||||
<< orig_from << "' (does not exist anymore)."
|
||||
<< std::endl;
|
||||
support::unlink(item.cache_name);
|
||||
@ -126,7 +126,7 @@ void ConverterCache::Impl::readIndex()
|
||||
// Delete the cached file if it is too old
|
||||
if (difftime(now, fs::last_write_time(item.cache_name.toFilesystemEncoding())) >
|
||||
lyxrc.converter_cache_maxage) {
|
||||
lyxerr[Debug::FILES] << "Not caching file `"
|
||||
LYXERR(Debug::FILES) << "Not caching file `"
|
||||
<< orig_from << "' (too old)." << std::endl;
|
||||
support::unlink(item.cache_name);
|
||||
continue;
|
||||
@ -219,7 +219,7 @@ void ConverterCache::add(FileName const & orig_from, string const & to_format,
|
||||
if (!lyxrc.use_converter_cache || orig_from.empty() ||
|
||||
converted_file.empty())
|
||||
return;
|
||||
lyxerr[Debug::FILES] << BOOST_CURRENT_FUNCTION << ' ' << orig_from
|
||||
LYXERR(Debug::FILES) << BOOST_CURRENT_FUNCTION << ' ' << orig_from
|
||||
<< ' ' << to_format << ' ' << converted_file
|
||||
<< std::endl;
|
||||
|
||||
@ -229,12 +229,12 @@ void ConverterCache::add(FileName const & orig_from, string const & to_format,
|
||||
time_t const timestamp = fs::last_write_time(orig_from.toFilesystemEncoding());
|
||||
Mover const & mover = getMover(to_format);
|
||||
if (item) {
|
||||
lyxerr[Debug::FILES] << "ConverterCache::add(" << orig_from << "):\n"
|
||||
LYXERR(Debug::FILES) << "ConverterCache::add(" << orig_from << "):\n"
|
||||
"The file is already in the cache."
|
||||
<< std::endl;
|
||||
// First test for timestamp
|
||||
if (timestamp == item->timestamp) {
|
||||
lyxerr[Debug::FILES] << "Same timestamp."
|
||||
LYXERR(Debug::FILES) << "Same timestamp."
|
||||
<< std::endl;
|
||||
return;
|
||||
} else {
|
||||
@ -242,14 +242,14 @@ void ConverterCache::add(FileName const & orig_from, string const & to_format,
|
||||
item->timestamp = timestamp;
|
||||
unsigned long const checksum = support::sum(orig_from);
|
||||
if (checksum == item->checksum) {
|
||||
lyxerr[Debug::FILES] << "Same checksum."
|
||||
LYXERR(Debug::FILES) << "Same checksum."
|
||||
<< std::endl;
|
||||
return;
|
||||
}
|
||||
item->checksum = checksum;
|
||||
}
|
||||
if (!mover.copy(converted_file, item->cache_name, 0600))
|
||||
lyxerr[Debug::FILES] << "ConverterCache::add("
|
||||
LYXERR(Debug::FILES) << "ConverterCache::add("
|
||||
<< orig_from << "):\n"
|
||||
"Could not copy file."
|
||||
<< std::endl;
|
||||
@ -259,7 +259,7 @@ void ConverterCache::add(FileName const & orig_from, string const & to_format,
|
||||
if (mover.copy(converted_file, new_item.cache_name, 0600))
|
||||
pimpl_->cache[orig_from][to_format] = new_item;
|
||||
else
|
||||
lyxerr[Debug::FILES] << "ConverterCache::add("
|
||||
LYXERR(Debug::FILES) << "ConverterCache::add("
|
||||
<< orig_from << "):\n"
|
||||
"Could not copy file."
|
||||
<< std::endl;
|
||||
@ -272,7 +272,7 @@ void ConverterCache::remove(FileName const & orig_from,
|
||||
{
|
||||
if (!lyxrc.use_converter_cache || orig_from.empty())
|
||||
return;
|
||||
lyxerr[Debug::FILES] << BOOST_CURRENT_FUNCTION << ' ' << orig_from
|
||||
LYXERR(Debug::FILES) << BOOST_CURRENT_FUNCTION << ' ' << orig_from
|
||||
<< ' ' << to_format << std::endl;
|
||||
|
||||
CacheType::iterator const it1 = pimpl_->cache.find(orig_from);
|
||||
@ -293,25 +293,25 @@ bool ConverterCache::inCache(FileName const & orig_from,
|
||||
{
|
||||
if (!lyxrc.use_converter_cache || orig_from.empty())
|
||||
return false;
|
||||
lyxerr[Debug::FILES] << BOOST_CURRENT_FUNCTION << ' ' << orig_from
|
||||
LYXERR(Debug::FILES) << BOOST_CURRENT_FUNCTION << ' ' << orig_from
|
||||
<< ' ' << to_format << std::endl;
|
||||
|
||||
CacheItem * const item = pimpl_->find(orig_from, to_format);
|
||||
if (!item) {
|
||||
lyxerr[Debug::FILES] << "not in cache." << std::endl;
|
||||
LYXERR(Debug::FILES) << "not in cache." << std::endl;
|
||||
return false;
|
||||
}
|
||||
time_t const timestamp = fs::last_write_time(orig_from.toFilesystemEncoding());
|
||||
if (item->timestamp == timestamp) {
|
||||
lyxerr[Debug::FILES] << "identical timestamp." << std::endl;
|
||||
LYXERR(Debug::FILES) << "identical timestamp." << std::endl;
|
||||
return true;
|
||||
}
|
||||
if (item->checksum == support::sum(orig_from)) {
|
||||
item->timestamp = timestamp;
|
||||
lyxerr[Debug::FILES] << "identical checksum." << std::endl;
|
||||
LYXERR(Debug::FILES) << "identical checksum." << std::endl;
|
||||
return true;
|
||||
}
|
||||
lyxerr[Debug::FILES] << "in cache, but too old." << std::endl;
|
||||
LYXERR(Debug::FILES) << "in cache, but too old." << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -319,7 +319,7 @@ bool ConverterCache::inCache(FileName const & orig_from,
|
||||
FileName const & ConverterCache::cacheName(FileName const & orig_from,
|
||||
string const & to_format) const
|
||||
{
|
||||
lyxerr[Debug::FILES] << BOOST_CURRENT_FUNCTION << ' ' << orig_from
|
||||
LYXERR(Debug::FILES) << BOOST_CURRENT_FUNCTION << ' ' << orig_from
|
||||
<< ' ' << to_format << std::endl;
|
||||
|
||||
CacheItem * const item = pimpl_->find(orig_from, to_format);
|
||||
@ -333,7 +333,7 @@ bool ConverterCache::copy(FileName const & orig_from, string const & to_format,
|
||||
{
|
||||
if (!lyxrc.use_converter_cache || orig_from.empty() || dest.empty())
|
||||
return false;
|
||||
lyxerr[Debug::FILES] << BOOST_CURRENT_FUNCTION << ' ' << orig_from
|
||||
LYXERR(Debug::FILES) << BOOST_CURRENT_FUNCTION << ' ' << orig_from
|
||||
<< ' ' << to_format << ' ' << dest << std::endl;
|
||||
|
||||
CacheItem * const item = pimpl_->find(orig_from, to_format);
|
||||
|
@ -58,9 +58,9 @@ void DepTable::insert(FileName const & f, bool upd)
|
||||
dep_info di;
|
||||
di.crc_prev = 0;
|
||||
if (upd) {
|
||||
lyxerr[Debug::DEPEND] << " CRC..." << flush;
|
||||
LYXERR(Debug::DEPEND) << " CRC..." << flush;
|
||||
di.crc_cur = sum(f);
|
||||
lyxerr[Debug::DEPEND] << "done." << endl;
|
||||
LYXERR(Debug::DEPEND) << "done." << endl;
|
||||
struct stat f_info;
|
||||
stat(f.toFilesystemEncoding().c_str(), &f_info);
|
||||
di.mtime_cur = f_info.st_mtime;
|
||||
@ -70,14 +70,14 @@ void DepTable::insert(FileName const & f, bool upd)
|
||||
}
|
||||
deplist[f] = di;
|
||||
} else {
|
||||
lyxerr[Debug::DEPEND] << " Already in DepTable" << endl;
|
||||
LYXERR(Debug::DEPEND) << " Already in DepTable" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DepTable::update()
|
||||
{
|
||||
lyxerr[Debug::DEPEND] << "Updating DepTable..." << endl;
|
||||
LYXERR(Debug::DEPEND) << "Updating DepTable..." << endl;
|
||||
time_type const start_time = current_time();
|
||||
|
||||
DepList::iterator itr = deplist.begin();
|
||||
@ -88,18 +88,18 @@ void DepTable::update()
|
||||
if (stat(itr->first.toFilesystemEncoding().c_str(), &f_info) == 0) {
|
||||
if (di.mtime_cur == f_info.st_mtime) {
|
||||
di.crc_prev = di.crc_cur;
|
||||
lyxerr[Debug::DEPEND] << itr->first << " same mtime" << endl;
|
||||
LYXERR(Debug::DEPEND) << itr->first << " same mtime" << endl;
|
||||
} else {
|
||||
di.crc_prev = di.crc_cur;
|
||||
lyxerr[Debug::DEPEND] << itr->first << " CRC... " << flush;
|
||||
LYXERR(Debug::DEPEND) << itr->first << " CRC... " << flush;
|
||||
di.crc_cur = sum(itr->first);
|
||||
lyxerr[Debug::DEPEND] << "done" << endl;
|
||||
LYXERR(Debug::DEPEND) << "done" << endl;
|
||||
}
|
||||
} else {
|
||||
// file doesn't exist
|
||||
// remove stale files - if it's re-created, it
|
||||
// will be re-inserted by deplog.
|
||||
lyxerr[Debug::DEPEND] << itr->first
|
||||
LYXERR(Debug::DEPEND) << itr->first
|
||||
<< " doesn't exist. removing from DepTable." << endl;
|
||||
DepList::iterator doomed = itr++;
|
||||
deplist.erase(doomed);
|
||||
@ -114,7 +114,7 @@ void DepTable::update()
|
||||
++itr;
|
||||
}
|
||||
time_type const time_sec = current_time() - start_time;
|
||||
lyxerr[Debug::DEPEND] << "Finished updating DepTable ("
|
||||
LYXERR(Debug::DEPEND) << "Finished updating DepTable ("
|
||||
<< time_sec << " sec)." << endl;
|
||||
}
|
||||
|
||||
|
@ -240,7 +240,7 @@ bool LColor::setColor(string const & lyxname, string const &x11name)
|
||||
{
|
||||
string const lcname = ascii_lowercase(lyxname);
|
||||
if (pimpl_->lyxcolors.find(lcname) == pimpl_->lyxcolors.end()) {
|
||||
lyxerr[Debug::GUI]
|
||||
LYXERR(Debug::GUI)
|
||||
<< "LColor::setColor: Unknown color \""
|
||||
<< lyxname << '"' << endl;
|
||||
addColor(static_cast<color>(pimpl_->infotab.size()), lcname);
|
||||
|
74
src/LaTeX.C
74
src/LaTeX.C
@ -215,7 +215,7 @@ int LaTeX::run(TeXErrors & terr)
|
||||
FileName const aux_file(changeExtension(file.absFilename(), "aux"));
|
||||
|
||||
if (had_depfile) {
|
||||
lyxerr[Debug::DEPEND] << "Dependency file exists" << endl;
|
||||
LYXERR(Debug::DEPEND) << "Dependency file exists" << endl;
|
||||
// Read the dep file:
|
||||
had_depfile = head.read(depfile);
|
||||
}
|
||||
@ -228,21 +228,21 @@ int LaTeX::run(TeXErrors & terr)
|
||||
// to re-run latex and collect the error messages
|
||||
// (even if they are the same).
|
||||
if (!fs::exists(output_file.toFilesystemEncoding())) {
|
||||
lyxerr[Debug::DEPEND]
|
||||
LYXERR(Debug::DEPEND)
|
||||
<< "re-running LaTeX because output file doesn't exist."
|
||||
<< endl;
|
||||
} else if (!head.sumchange()) {
|
||||
lyxerr[Debug::DEPEND] << "return no_change" << endl;
|
||||
LYXERR(Debug::DEPEND) << "return no_change" << endl;
|
||||
return NO_CHANGE;
|
||||
} else {
|
||||
lyxerr[Debug::DEPEND]
|
||||
LYXERR(Debug::DEPEND)
|
||||
<< "Dependency file has changed" << endl;
|
||||
}
|
||||
|
||||
if (head.extchanged(".bib") || head.extchanged(".bst"))
|
||||
run_bibtex = true;
|
||||
} else
|
||||
lyxerr[Debug::DEPEND]
|
||||
LYXERR(Debug::DEPEND)
|
||||
<< "Dependency file does not exist, or has wrong format"
|
||||
<< endl;
|
||||
|
||||
@ -254,13 +254,13 @@ int LaTeX::run(TeXErrors & terr)
|
||||
bibtex_info_old = scanAuxFiles(aux_file);
|
||||
|
||||
++count;
|
||||
lyxerr[Debug::LATEX] << "Run #" << count << endl;
|
||||
LYXERR(Debug::LATEX) << "Run #" << count << endl;
|
||||
message(runMessage(count));
|
||||
|
||||
startscript();
|
||||
scanres = scanLogFile(terr);
|
||||
if (scanres & ERROR_RERUN) {
|
||||
lyxerr[Debug::LATEX] << "Rerunning LaTeX" << endl;
|
||||
LYXERR(Debug::LATEX) << "Rerunning LaTeX" << endl;
|
||||
startscript();
|
||||
scanres = scanLogFile(terr);
|
||||
}
|
||||
@ -294,14 +294,14 @@ int LaTeX::run(TeXErrors & terr)
|
||||
// run makeindex
|
||||
if (head.haschanged(idxfile)) {
|
||||
// no checks for now
|
||||
lyxerr[Debug::LATEX] << "Running MakeIndex." << endl;
|
||||
LYXERR(Debug::LATEX) << "Running MakeIndex." << endl;
|
||||
message(_("Running MakeIndex."));
|
||||
// onlyFilename() is needed for cygwin
|
||||
rerun |= runMakeIndex(onlyFilename(idxfile.absFilename()),
|
||||
runparams);
|
||||
}
|
||||
if (head.haschanged(FileName(changeExtension(file.absFilename(), ".nlo")))) {
|
||||
lyxerr[Debug::LATEX]
|
||||
LYXERR(Debug::LATEX)
|
||||
<< "Running MakeIndex for nomencl."
|
||||
<< endl;
|
||||
message(_("Running MakeIndex for nomencl."));
|
||||
@ -322,7 +322,7 @@ int LaTeX::run(TeXErrors & terr)
|
||||
// "\bibdata" and/or "\bibstyle". If one of those
|
||||
// tags is found -> run bibtex and set rerun = true;
|
||||
// no checks for now
|
||||
lyxerr[Debug::LATEX] << "Running BibTeX." << endl;
|
||||
LYXERR(Debug::LATEX) << "Running BibTeX." << endl;
|
||||
message(_("Running BibTeX."));
|
||||
updateBibtexDependencies(head, bibtex_info);
|
||||
rerun |= runBibTeX(bibtex_info);
|
||||
@ -348,10 +348,10 @@ int LaTeX::run(TeXErrors & terr)
|
||||
if (rerun || head.sumchange()) {
|
||||
rerun = false;
|
||||
++count;
|
||||
lyxerr[Debug::DEPEND]
|
||||
LYXERR(Debug::DEPEND)
|
||||
<< "Dep. file has changed or rerun requested"
|
||||
<< endl;
|
||||
lyxerr[Debug::LATEX]
|
||||
LYXERR(Debug::LATEX)
|
||||
<< "Run #" << count << endl;
|
||||
message(runMessage(count));
|
||||
startscript();
|
||||
@ -365,7 +365,7 @@ int LaTeX::run(TeXErrors & terr)
|
||||
deplog(head); // reads the latex log
|
||||
head.update();
|
||||
} else {
|
||||
lyxerr[Debug::DEPEND]
|
||||
LYXERR(Debug::DEPEND)
|
||||
<< "Dep. file has NOT changed"
|
||||
<< endl;
|
||||
}
|
||||
@ -381,7 +381,7 @@ int LaTeX::run(TeXErrors & terr)
|
||||
// run makeindex if the <file>.idx has changed or was generated.
|
||||
if (head.haschanged(FileName(changeExtension(file.absFilename(), ".idx")))) {
|
||||
// no checks for now
|
||||
lyxerr[Debug::LATEX] << "Running MakeIndex." << endl;
|
||||
LYXERR(Debug::LATEX) << "Running MakeIndex." << endl;
|
||||
message(_("Running MakeIndex."));
|
||||
// onlyFilename() is needed for cygwin
|
||||
rerun = runMakeIndex(onlyFilename(changeExtension(
|
||||
@ -390,7 +390,7 @@ int LaTeX::run(TeXErrors & terr)
|
||||
|
||||
// I am not pretty sure if need this twice.
|
||||
if (head.haschanged(FileName(changeExtension(file.absFilename(), ".nlo")))) {
|
||||
lyxerr[Debug::LATEX]
|
||||
LYXERR(Debug::LATEX)
|
||||
<< "Running MakeIndex for nomencl."
|
||||
<< endl;
|
||||
message(_("Running MakeIndex for nomencl."));
|
||||
@ -420,7 +420,7 @@ int LaTeX::run(TeXErrors & terr)
|
||||
// MAX_RUNS are reached.
|
||||
rerun = false;
|
||||
++count;
|
||||
lyxerr[Debug::LATEX] << "Run #" << count << endl;
|
||||
LYXERR(Debug::LATEX) << "Run #" << count << endl;
|
||||
message(runMessage(count));
|
||||
startscript();
|
||||
scanres = scanLogFile(terr);
|
||||
@ -435,7 +435,7 @@ int LaTeX::run(TeXErrors & terr)
|
||||
|
||||
// Write the dependencies to file.
|
||||
head.write(depfile);
|
||||
lyxerr[Debug::LATEX] << "Done." << endl;
|
||||
LYXERR(Debug::LATEX) << "Done." << endl;
|
||||
return scanres;
|
||||
}
|
||||
|
||||
@ -454,7 +454,7 @@ int LaTeX::startscript()
|
||||
bool LaTeX::runMakeIndex(string const & f, OutputParams const & runparams,
|
||||
string const & params)
|
||||
{
|
||||
lyxerr[Debug::LATEX]
|
||||
LYXERR(Debug::LATEX)
|
||||
<< "idx file has been made, running makeindex on file "
|
||||
<< f << endl;
|
||||
string tmp = lyxrc.index_command + ' ';
|
||||
@ -499,7 +499,7 @@ Aux_Info const LaTeX::scanAuxFile(FileName const & file)
|
||||
|
||||
void LaTeX::scanAuxFile(FileName const & file, Aux_Info & aux_info)
|
||||
{
|
||||
lyxerr[Debug::LATEX] << "Scanning aux file: " << file << endl;
|
||||
LYXERR(Debug::LATEX) << "Scanning aux file: " << file << endl;
|
||||
|
||||
ifstream ifs(file.toFilesystemEncoding().c_str());
|
||||
string token;
|
||||
@ -519,7 +519,7 @@ void LaTeX::scanAuxFile(FileName const & file, Aux_Info & aux_info)
|
||||
while (!data.empty()) {
|
||||
string citation;
|
||||
data = split(data, citation, ',');
|
||||
lyxerr[Debug::LATEX] << "Citation: "
|
||||
LYXERR(Debug::LATEX) << "Citation: "
|
||||
<< citation << endl;
|
||||
aux_info.citations.insert(citation);
|
||||
}
|
||||
@ -531,7 +531,7 @@ void LaTeX::scanAuxFile(FileName const & file, Aux_Info & aux_info)
|
||||
string database;
|
||||
data = split(data, database, ',');
|
||||
database = changeExtension(database, "bib");
|
||||
lyxerr[Debug::LATEX] << "BibTeX database: `"
|
||||
LYXERR(Debug::LATEX) << "BibTeX database: `"
|
||||
<< database << '\'' << endl;
|
||||
aux_info.databases.insert(database);
|
||||
}
|
||||
@ -540,7 +540,7 @@ void LaTeX::scanAuxFile(FileName const & file, Aux_Info & aux_info)
|
||||
// token is now the style file
|
||||
// pass it to the helper
|
||||
style = changeExtension(style, "bst");
|
||||
lyxerr[Debug::LATEX] << "BibTeX style: `"
|
||||
LYXERR(Debug::LATEX) << "BibTeX style: `"
|
||||
<< style << '\'' << endl;
|
||||
aux_info.styles.insert(style);
|
||||
} else if (regex_match(token, sub, reg4)) {
|
||||
@ -607,7 +607,7 @@ int LaTeX::scanLogFile(TeXErrors & terr)
|
||||
int retval = NO_ERRORS;
|
||||
string tmp =
|
||||
onlyFilename(changeExtension(file.absFilename(), ".log"));
|
||||
lyxerr[Debug::LATEX] << "Log file: " << tmp << endl;
|
||||
LYXERR(Debug::LATEX) << "Log file: " << tmp << endl;
|
||||
FileName const fn = FileName(makeAbsPath(tmp));
|
||||
ifstream ifs(fn.toFilesystemEncoding().c_str());
|
||||
|
||||
@ -620,7 +620,7 @@ int LaTeX::scanLogFile(TeXErrors & terr)
|
||||
token = subst(token, '\0', '\r');
|
||||
token = subst(token, "\r", "");
|
||||
|
||||
lyxerr[Debug::LATEX] << "Log line: " << token << endl;
|
||||
LYXERR(Debug::LATEX) << "Log line: " << token << endl;
|
||||
|
||||
if (token.empty())
|
||||
continue;
|
||||
@ -630,10 +630,10 @@ int LaTeX::scanLogFile(TeXErrors & terr)
|
||||
// Here shall we handle different
|
||||
// types of warnings
|
||||
retval |= LATEX_WARNING;
|
||||
lyxerr[Debug::LATEX] << "LaTeX Warning." << endl;
|
||||
LYXERR(Debug::LATEX) << "LaTeX Warning." << endl;
|
||||
if (contains(token, "Rerun to get cross-references")) {
|
||||
retval |= RERUN;
|
||||
lyxerr[Debug::LATEX]
|
||||
LYXERR(Debug::LATEX)
|
||||
<< "We should rerun." << endl;
|
||||
} else if (contains(token, "Citation")
|
||||
&& contains(token, "on page")
|
||||
@ -656,7 +656,7 @@ int LaTeX::scanLogFile(TeXErrors & terr)
|
||||
contains(token, "Rerun to get")) {
|
||||
// at least longtable.sty and bibtopic.sty
|
||||
// might use this.
|
||||
lyxerr[Debug::LATEX]
|
||||
LYXERR(Debug::LATEX)
|
||||
<< "We should rerun." << endl;
|
||||
retval |= RERUN;
|
||||
}
|
||||
@ -664,7 +664,7 @@ int LaTeX::scanLogFile(TeXErrors & terr)
|
||||
if (contains(token, "Rerun LaTeX") ||
|
||||
contains(token, "Rerun to get")) {
|
||||
// Used by natbib
|
||||
lyxerr[Debug::LATEX]
|
||||
LYXERR(Debug::LATEX)
|
||||
<< "We should rerun." << endl;
|
||||
retval |= RERUN;
|
||||
}
|
||||
@ -706,7 +706,7 @@ int LaTeX::scanLogFile(TeXErrors & terr)
|
||||
errstr += "\n";
|
||||
getline(ifs, tmp);
|
||||
}
|
||||
lyxerr[Debug::LATEX]
|
||||
LYXERR(Debug::LATEX)
|
||||
<< "line: " << line << '\n'
|
||||
<< "Desc: " << desc << '\n'
|
||||
<< "Text: " << errstr << endl;
|
||||
@ -750,7 +750,7 @@ int LaTeX::scanLogFile(TeXErrors & terr)
|
||||
}
|
||||
}
|
||||
}
|
||||
lyxerr[Debug::LATEX] << "Log line: " << token << endl;
|
||||
LYXERR(Debug::LATEX) << "Log line: " << token << endl;
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -770,7 +770,7 @@ bool exists(FileName const & possible_name) {
|
||||
return fs::exists(possible_name.toFilesystemEncoding());
|
||||
}
|
||||
catch (fs::filesystem_error const & fe) {
|
||||
lyxerr[Debug::DEPEND] << "Got error `" << fe.what()
|
||||
LYXERR(Debug::DEPEND) << "Got error `" << fe.what()
|
||||
<< "' while checking whether file `" << possible_name
|
||||
<< "' exists." << endl;
|
||||
return false;
|
||||
@ -794,7 +794,7 @@ bool handleFoundFile(string const & ff, DepTable & head)
|
||||
// convert from native os path to unix path
|
||||
string foundfile = os::internal_path(trim(ff));
|
||||
|
||||
lyxerr[Debug::DEPEND] << "Found file: " << foundfile << endl;
|
||||
LYXERR(Debug::DEPEND) << "Found file: " << foundfile << endl;
|
||||
|
||||
// Ok now we found a file.
|
||||
// Now we should make sure that this is a file that we can
|
||||
@ -806,7 +806,7 @@ bool handleFoundFile(string const & ff, DepTable & head)
|
||||
// absolute path and should
|
||||
// be inserted.
|
||||
if (absolutePath(foundfile)) {
|
||||
lyxerr[Debug::DEPEND] << "AbsolutePath file: "
|
||||
LYXERR(Debug::DEPEND) << "AbsolutePath file: "
|
||||
<< foundfile << endl;
|
||||
// On initial insert we want to do the update at once
|
||||
// since this file cannot be a file generated by
|
||||
@ -864,7 +864,7 @@ bool handleFoundFile(string const & ff, DepTable & head)
|
||||
!fs::is_directory(absname.toFilesystemEncoding())) {
|
||||
static regex unwanted("^.*\\.(aux|log|dvi|bbl|ind|glo)$");
|
||||
if (regex_match(onlyfile, unwanted)) {
|
||||
lyxerr[Debug::DEPEND]
|
||||
LYXERR(Debug::DEPEND)
|
||||
<< "We don't want "
|
||||
<< onlyfile
|
||||
<< " in the dep file"
|
||||
@ -873,13 +873,13 @@ bool handleFoundFile(string const & ff, DepTable & head)
|
||||
// This is a tex file generated by LyX
|
||||
// and latex is not likely to change this
|
||||
// during its runs.
|
||||
lyxerr[Debug::DEPEND]
|
||||
LYXERR(Debug::DEPEND)
|
||||
<< "Tmpdir TeX file: "
|
||||
<< onlyfile
|
||||
<< endl;
|
||||
head.insert(absname, true);
|
||||
} else {
|
||||
lyxerr[Debug::DEPEND]
|
||||
LYXERR(Debug::DEPEND)
|
||||
<< "In tmpdir file:"
|
||||
<< onlyfile
|
||||
<< endl;
|
||||
@ -887,7 +887,7 @@ bool handleFoundFile(string const & ff, DepTable & head)
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
lyxerr[Debug::DEPEND]
|
||||
LYXERR(Debug::DEPEND)
|
||||
<< "Not a file or we are unable to find it."
|
||||
<< endl;
|
||||
return false;
|
||||
|
@ -144,7 +144,7 @@ docstring const MenuItem::binding(bool forgui) const
|
||||
if (bindings.size()) {
|
||||
return bindings.begin()->print(forgui);
|
||||
} else {
|
||||
lyxerr[Debug::KBMAP]
|
||||
LYXERR(Debug::KBMAP)
|
||||
<< "No binding for "
|
||||
<< lyxaction.getActionName(func_.action)
|
||||
<< '(' << to_utf8(func_.argument()) << ')' << endl;
|
||||
|
@ -100,7 +100,7 @@ void ToolbarBackend::read(LyXLex & lex)
|
||||
docstring const tooltip = translateIfPossible(lex.getDocString());
|
||||
lex.next(true);
|
||||
string const func_arg = lex.getString();
|
||||
lyxerr[Debug::PARSER]
|
||||
LYXERR(Debug::PARSER)
|
||||
<< "ToolbarBackend::read TO_ADD func: `"
|
||||
<< func_arg << '\'' << endl;
|
||||
|
||||
@ -247,12 +247,12 @@ string const ToolbarBackend::getIcon(FuncRequest const & f)
|
||||
}
|
||||
|
||||
if (!fullname.empty()) {
|
||||
lyxerr[Debug::GUI] << "Full icon name is `"
|
||||
LYXERR(Debug::GUI) << "Full icon name is `"
|
||||
<< fullname << '\'' << endl;
|
||||
return fullname;
|
||||
}
|
||||
|
||||
lyxerr[Debug::GUI] << "Cannot find icon for command \""
|
||||
LYXERR(Debug::GUI) << "Cannot find icon for command \""
|
||||
<< lyxaction.getActionName(f.action)
|
||||
<< '(' << to_utf8(f.argument()) << ")\"" << endl;
|
||||
return libFileSearch("images", "unknown", "xpm").absFilename();
|
||||
|
34
src/buffer.C
34
src/buffer.C
@ -215,13 +215,13 @@ Buffer::Impl::Impl(Buffer & parent, FileName const & file, bool readonly_)
|
||||
Buffer::Buffer(string const & file, bool readonly)
|
||||
: pimpl_(new Impl(*this, FileName(file), readonly))
|
||||
{
|
||||
lyxerr[Debug::INFO] << "Buffer::Buffer()" << endl;
|
||||
LYXERR(Debug::INFO) << "Buffer::Buffer()" << endl;
|
||||
}
|
||||
|
||||
|
||||
Buffer::~Buffer()
|
||||
{
|
||||
lyxerr[Debug::INFO] << "Buffer::~Buffer()" << endl;
|
||||
LYXERR(Debug::INFO) << "Buffer::~Buffer()" << endl;
|
||||
// here the buffer should take care that it is
|
||||
// saved properly, before it goes into the void.
|
||||
|
||||
@ -369,10 +369,10 @@ pair<Buffer::LogType, string> const Buffer::getLogName() const
|
||||
if (fs::exists(bname.toFilesystemEncoding()) &&
|
||||
(!fs::exists(fname.toFilesystemEncoding()) ||
|
||||
fs::last_write_time(fname.toFilesystemEncoding()) < fs::last_write_time(bname.toFilesystemEncoding()))) {
|
||||
lyxerr[Debug::FILES] << "Log name calculated as: " << bname << endl;
|
||||
LYXERR(Debug::FILES) << "Log name calculated as: " << bname << endl;
|
||||
return make_pair(Buffer::buildlog, bname.absFilename());
|
||||
}
|
||||
lyxerr[Debug::FILES] << "Log name calculated as: " << fname << endl;
|
||||
LYXERR(Debug::FILES) << "Log name calculated as: " << fname << endl;
|
||||
return make_pair(Buffer::latexlog, fname.absFilename());
|
||||
}
|
||||
|
||||
@ -451,7 +451,7 @@ int Buffer::readHeader(LyXLex & lex)
|
||||
continue;
|
||||
}
|
||||
|
||||
lyxerr[Debug::PARSER] << "Handling document header token: `"
|
||||
LYXERR(Debug::PARSER) << "Handling document header token: `"
|
||||
<< token << '\'' << endl;
|
||||
|
||||
string unknown = params().readToken(lex, token);
|
||||
@ -714,7 +714,7 @@ Buffer::ReadStatus Buffer::readFile(LyXLex & lex, FileName const & filename,
|
||||
<< ' ' << quoteName(filename.toFilesystemEncoding());
|
||||
string const command_str = command.str();
|
||||
|
||||
lyxerr[Debug::INFO] << "Running '"
|
||||
LYXERR(Debug::INFO) << "Running '"
|
||||
<< command_str << '\''
|
||||
<< endl;
|
||||
|
||||
@ -776,7 +776,7 @@ bool Buffer::save() const
|
||||
bformat(_("Cannot create backup file %1$s.\n"
|
||||
"Please check whether the directory exists and is writeable."),
|
||||
from_utf8(backupName.absFilename())));
|
||||
lyxerr[Debug::DEBUG] << "Fs error: " << fe.what() << endl;
|
||||
LYXERR(Debug::DEBUG) << "Fs error: " << fe.what() << endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -873,7 +873,7 @@ bool Buffer::makeLaTeXFile(FileName const & fname,
|
||||
bool output_preamble, bool output_body)
|
||||
{
|
||||
string const encoding = runparams.encoding->iconvName();
|
||||
lyxerr[Debug::LATEX] << "makeLaTeXFile encoding: "
|
||||
LYXERR(Debug::LATEX) << "makeLaTeXFile encoding: "
|
||||
<< encoding << "..." << endl;
|
||||
|
||||
odocfstream ofs(encoding);
|
||||
@ -914,10 +914,10 @@ void Buffer::writeLaTeXSource(odocstream & os,
|
||||
OutputParams runparams = runparams_in;
|
||||
|
||||
// validate the buffer.
|
||||
lyxerr[Debug::LATEX] << " Validating buffer..." << endl;
|
||||
LYXERR(Debug::LATEX) << " Validating buffer..." << endl;
|
||||
LaTeXFeatures features(*this, params(), runparams);
|
||||
validate(features);
|
||||
lyxerr[Debug::LATEX] << " Buffer validation done." << endl;
|
||||
LYXERR(Debug::LATEX) << " Buffer validation done." << endl;
|
||||
|
||||
texrow().reset();
|
||||
|
||||
@ -933,7 +933,7 @@ void Buffer::writeLaTeXSource(odocstream & os,
|
||||
texrow().newline();
|
||||
texrow().newline();
|
||||
}
|
||||
lyxerr[Debug::INFO] << "lyx document header finished" << endl;
|
||||
LYXERR(Debug::INFO) << "lyx document header finished" << endl;
|
||||
// There are a few differences between nice LaTeX and usual files:
|
||||
// usual is \batchmode and has a
|
||||
// special input@path to allow the including of figures
|
||||
@ -974,7 +974,7 @@ void Buffer::writeLaTeXSource(odocstream & os,
|
||||
os << "\\begin{document}\n";
|
||||
texrow().newline();
|
||||
} // output_preamble
|
||||
lyxerr[Debug::INFO] << "preamble finished, now the body." << endl;
|
||||
LYXERR(Debug::INFO) << "preamble finished, now the body." << endl;
|
||||
|
||||
if (!lyxrc.language_auto_begin) {
|
||||
// FIXME UNICODE
|
||||
@ -1017,9 +1017,9 @@ void Buffer::writeLaTeXSource(odocstream & os,
|
||||
os << "\\end{document}\n";
|
||||
texrow().newline();
|
||||
|
||||
lyxerr[Debug::LATEX] << "makeLaTeXFile...done" << endl;
|
||||
LYXERR(Debug::LATEX) << "makeLaTeXFile...done" << endl;
|
||||
} else {
|
||||
lyxerr[Debug::LATEX] << "LaTeXFile for inclusion made."
|
||||
LYXERR(Debug::LATEX) << "LaTeXFile for inclusion made."
|
||||
<< endl;
|
||||
}
|
||||
runparams_in.encoding = runparams.encoding;
|
||||
@ -1027,8 +1027,8 @@ void Buffer::writeLaTeXSource(odocstream & os,
|
||||
// Just to be sure. (Asger)
|
||||
texrow().newline();
|
||||
|
||||
lyxerr[Debug::INFO] << "Finished making LaTeX file." << endl;
|
||||
lyxerr[Debug::INFO] << "Row count was " << texrow().rows() - 1
|
||||
LYXERR(Debug::INFO) << "Finished making LaTeX file." << endl;
|
||||
LYXERR(Debug::INFO) << "Row count was " << texrow().rows() - 1
|
||||
<< '.' << endl;
|
||||
}
|
||||
|
||||
@ -1055,7 +1055,7 @@ void Buffer::makeDocBookFile(FileName const & fname,
|
||||
OutputParams const & runparams,
|
||||
bool const body_only)
|
||||
{
|
||||
lyxerr[Debug::LATEX] << "makeDocBookFile..." << endl;
|
||||
LYXERR(Debug::LATEX) << "makeDocBookFile..." << endl;
|
||||
|
||||
//ofstream ofs;
|
||||
odocfstream ofs;
|
||||
|
@ -184,7 +184,7 @@ Buffer * BufferList::newBuffer(string const & s, bool const ronly)
|
||||
{
|
||||
auto_ptr<Buffer> tmpbuf(new Buffer(s, ronly));
|
||||
tmpbuf->params().useClassDefaults();
|
||||
lyxerr[Debug::INFO] << "Assigning to buffer "
|
||||
LYXERR(Debug::INFO) << "Assigning to buffer "
|
||||
<< bstore.size() << endl;
|
||||
bstore.push_back(tmpbuf.get());
|
||||
return tmpbuf.release();
|
||||
|
@ -100,7 +100,7 @@ void Changes::set(Change const & change, pos_type const pos)
|
||||
void Changes::set(Change const & change, pos_type const start, pos_type const end)
|
||||
{
|
||||
if (change.type != Change::UNCHANGED && lyxerr.debugging(Debug::CHANGES)) {
|
||||
lyxerr[Debug::CHANGES] << "setting change (type: " << change.type
|
||||
LYXERR(Debug::CHANGES) << "setting change (type: " << change.type
|
||||
<< ", author: " << change.author << ", time: " << change.changetime
|
||||
<< ") in range (" << start << ", " << end << ")" << endl;
|
||||
}
|
||||
@ -120,14 +120,14 @@ void Changes::set(Change const & change, pos_type const start, pos_type const en
|
||||
pos_type oldEnd = it->range.end;
|
||||
it->range.end = start;
|
||||
if (lyxerr.debugging(Debug::CHANGES)) {
|
||||
lyxerr[Debug::CHANGES] << " cutting tail of type " << it->change.type
|
||||
LYXERR(Debug::CHANGES) << " cutting tail of type " << it->change.type
|
||||
<< " resulting in range (" << it->range.start << ", "
|
||||
<< it->range.end << ")" << endl;
|
||||
}
|
||||
++it;
|
||||
if (oldEnd >= end) {
|
||||
if (lyxerr.debugging(Debug::CHANGES)) {
|
||||
lyxerr[Debug::CHANGES] << " inserting tail in range ("
|
||||
LYXERR(Debug::CHANGES) << " inserting tail in range ("
|
||||
<< end << ", " << oldEnd << ")" << endl;
|
||||
}
|
||||
it = table_.insert(it, ChangeRange((it-1)->change, Range(end, oldEnd)));
|
||||
@ -140,7 +140,7 @@ void Changes::set(Change const & change, pos_type const start, pos_type const en
|
||||
|
||||
if (change.type != Change::UNCHANGED) {
|
||||
if (lyxerr.debugging(Debug::CHANGES)) {
|
||||
lyxerr[Debug::CHANGES] << " inserting change" << endl;
|
||||
LYXERR(Debug::CHANGES) << " inserting change" << endl;
|
||||
}
|
||||
it = table_.insert(it, ChangeRange(change, Range(start, end)));
|
||||
++it;
|
||||
@ -150,7 +150,7 @@ void Changes::set(Change const & change, pos_type const start, pos_type const en
|
||||
// new change 'contains' existing change
|
||||
if (newRange.contains(it->range)) {
|
||||
if (lyxerr.debugging(Debug::CHANGES)) {
|
||||
lyxerr[Debug::CHANGES] << " removing subrange ("
|
||||
LYXERR(Debug::CHANGES) << " removing subrange ("
|
||||
<< it->range.start << ", " << it->range.end << ")" << endl;
|
||||
}
|
||||
it = table_.erase(it);
|
||||
@ -165,7 +165,7 @@ void Changes::set(Change const & change, pos_type const start, pos_type const en
|
||||
// new change intersects with existing change
|
||||
it->range.start = end;
|
||||
if (lyxerr.debugging(Debug::CHANGES)) {
|
||||
lyxerr[Debug::CHANGES] << " cutting head of type "
|
||||
LYXERR(Debug::CHANGES) << " cutting head of type "
|
||||
<< it->change.type << " resulting in range ("
|
||||
<< end << ", " << it->range.end << ")" << endl;
|
||||
}
|
||||
@ -179,7 +179,7 @@ void Changes::set(Change const & change, pos_type const start, pos_type const en
|
||||
void Changes::erase(pos_type const pos)
|
||||
{
|
||||
if (lyxerr.debugging(Debug::CHANGES)) {
|
||||
lyxerr[Debug::CHANGES] << "Erasing change at position " << pos << endl;
|
||||
LYXERR(Debug::CHANGES) << "Erasing change at position " << pos << endl;
|
||||
}
|
||||
|
||||
ChangeTable::iterator it = table_.begin();
|
||||
@ -203,7 +203,7 @@ void Changes::erase(pos_type const pos)
|
||||
void Changes::insert(Change const & change, lyx::pos_type pos)
|
||||
{
|
||||
if (change.type != Change::UNCHANGED && lyxerr.debugging(Debug::CHANGES)) {
|
||||
lyxerr[Debug::CHANGES] << "Inserting change of type " << change.type
|
||||
LYXERR(Debug::CHANGES) << "Inserting change of type " << change.type
|
||||
<< " at position " << pos << endl;
|
||||
}
|
||||
|
||||
@ -250,7 +250,7 @@ bool Changes::isChanged(pos_type const start, pos_type const end) const
|
||||
for (; it != itend; ++it) {
|
||||
if (it->range.intersects(Range(start, end))) {
|
||||
if (lyxerr.debugging(Debug::CHANGES)) {
|
||||
lyxerr[Debug::CHANGES] << "found intersection of range ("
|
||||
LYXERR(Debug::CHANGES) << "found intersection of range ("
|
||||
<< start << ", " << end << ") with ("
|
||||
<< it->range.start << ", " << it->range.end
|
||||
<< ") of type " << it->change.type << endl;
|
||||
@ -268,14 +268,14 @@ void Changes::merge()
|
||||
|
||||
while (it != table_.end()) {
|
||||
if (lyxerr.debugging(Debug::CHANGES)) {
|
||||
lyxerr[Debug::CHANGES] << "found change of type " << it->change.type
|
||||
LYXERR(Debug::CHANGES) << "found change of type " << it->change.type
|
||||
<< " and range (" << it->range.start << ", " << it->range.end
|
||||
<< ")" << endl;
|
||||
}
|
||||
|
||||
if (it->range.start == it->range.end) {
|
||||
if (lyxerr.debugging(Debug::CHANGES)) {
|
||||
lyxerr[Debug::CHANGES] << "removing empty range for pos "
|
||||
LYXERR(Debug::CHANGES) << "removing empty range for pos "
|
||||
<< it->range.start << endl;
|
||||
}
|
||||
|
||||
@ -290,7 +290,7 @@ void Changes::merge()
|
||||
|
||||
if (it->change.isSimilarTo((it + 1)->change) && it->range.end == (it + 1)->range.start) {
|
||||
if (lyxerr.debugging(Debug::CHANGES)) {
|
||||
lyxerr[Debug::CHANGES] << "merging ranges (" << it->range.start << ", "
|
||||
LYXERR(Debug::CHANGES) << "merging ranges (" << it->range.start << ", "
|
||||
<< it->range.end << ") and (" << (it + 1)->range.start << ", "
|
||||
<< (it + 1)->range.end << ")" << endl;
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ public:
|
||||
char const * c = bindtextdomain(PACKAGE, package().locale_dir().c_str());
|
||||
int e = errno;
|
||||
if (e) {
|
||||
lyxerr[Debug::DEBUG]
|
||||
LYXERR(Debug::DEBUG)
|
||||
<< BOOST_CURRENT_FUNCTION << '\n'
|
||||
<< "Error code: " << errno << '\n'
|
||||
<< "Lang, mess: " << lang_ << " " << m << '\n'
|
||||
@ -124,7 +124,7 @@ public:
|
||||
}
|
||||
|
||||
if (!bind_textdomain_codeset(PACKAGE, ucs4_codeset)) {
|
||||
lyxerr[Debug::DEBUG]
|
||||
LYXERR(Debug::DEBUG)
|
||||
<< BOOST_CURRENT_FUNCTION << '\n'
|
||||
<< "Error code: " << errno << '\n'
|
||||
<< "Codeset : " << ucs4_codeset << '\n'
|
||||
@ -143,7 +143,7 @@ public:
|
||||
//lyxerr << "Same as entered returned" << endl;
|
||||
translated = from_ascii(tmp);
|
||||
} else {
|
||||
lyxerr[Debug::DEBUG] << "We got a translation" << endl;
|
||||
LYXERR(Debug::DEBUG) << "We got a translation" << endl;
|
||||
char_type const * ucs4 = reinterpret_cast<char_type const *>(msg);
|
||||
translated = ucs4;
|
||||
}
|
||||
|
@ -317,7 +317,7 @@ bool Converters::convert(Buffer const * buffer,
|
||||
quoteName(from_ext + ':' + from_file.toFilesystemEncoding()) +
|
||||
' ' +
|
||||
quoteName(to_ext + ':' + to_file.toFilesystemEncoding());
|
||||
lyxerr[Debug::FILES]
|
||||
LYXERR(Debug::FILES)
|
||||
<< "No converter defined! "
|
||||
"I use convertDefault.py:\n\t"
|
||||
<< command << endl;
|
||||
@ -364,7 +364,7 @@ bool Converters::convert(Buffer const * buffer,
|
||||
Converter const & conv = converterlist_[*cit];
|
||||
bool dummy = conv.To->dummy() && conv.to != "program";
|
||||
if (!dummy)
|
||||
lyxerr[Debug::FILES] << "Converting from "
|
||||
LYXERR(Debug::FILES) << "Converting from "
|
||||
<< conv.from << " to " << conv.to << endl;
|
||||
infile = outfile;
|
||||
outfile = FileName(conv.result_dir.empty()
|
||||
@ -385,13 +385,13 @@ bool Converters::convert(Buffer const * buffer,
|
||||
if (conv.latex) {
|
||||
run_latex = true;
|
||||
string const command = subst(conv.command, token_from, "");
|
||||
lyxerr[Debug::FILES] << "Running " << command << endl;
|
||||
LYXERR(Debug::FILES) << "Running " << command << endl;
|
||||
if (!runLaTeX(*buffer, command, runparams, errorList))
|
||||
return false;
|
||||
} else {
|
||||
if (conv.need_aux && !run_latex
|
||||
&& !latex_command_.empty()) {
|
||||
lyxerr[Debug::FILES]
|
||||
LYXERR(Debug::FILES)
|
||||
<< "Running " << latex_command_
|
||||
<< " to update aux file"<< endl;
|
||||
runLaTeX(*buffer, latex_command_, runparams, errorList);
|
||||
@ -421,7 +421,7 @@ bool Converters::convert(Buffer const * buffer,
|
||||
command = add_options(command,
|
||||
dvipdfm_options(buffer->params()));
|
||||
|
||||
lyxerr[Debug::FILES] << "Calling " << command << endl;
|
||||
LYXERR(Debug::FILES) << "Calling " << command << endl;
|
||||
if (buffer)
|
||||
buffer->message(_("Executing command: ")
|
||||
+ from_utf8(command));
|
||||
@ -443,7 +443,7 @@ bool Converters::convert(Buffer const * buffer,
|
||||
if (!mover.rename(outfile, real_outfile))
|
||||
res = -1;
|
||||
else
|
||||
lyxerr[Debug::FILES]
|
||||
LYXERR(Debug::FILES)
|
||||
<< "renaming file " << outfile
|
||||
<< " to " << real_outfile
|
||||
<< endl;
|
||||
@ -531,7 +531,7 @@ bool Converters::move(string const & fmt,
|
||||
string const to2 = changeExtension(
|
||||
to_base + file2.substr(base.length()),
|
||||
to_extension);
|
||||
lyxerr[Debug::FILES] << "moving " << from2
|
||||
LYXERR(Debug::FILES) << "moving " << from2
|
||||
<< " to " << to2 << endl;
|
||||
|
||||
Mover const & mover = getMover(fmt);
|
||||
|
10
src/cursor.C
10
src/cursor.C
@ -118,7 +118,7 @@ namespace {
|
||||
double d = (x - xo) * (x - xo) + (y - yo) * (y - yo);
|
||||
// '<=' in order to take the last possible position
|
||||
// this is important for clicking behind \sum in e.g. '\sum_i a'
|
||||
lyxerr[Debug::DEBUG] << "i: " << i << " d: " << d
|
||||
LYXERR(Debug::DEBUG) << "i: " << i << " d: " << d
|
||||
<< " best: " << best_dist << endl;
|
||||
if (d <= best_dist) {
|
||||
best_dist = d;
|
||||
@ -279,7 +279,7 @@ void LCursor::setCursor(DocIterator const & cur)
|
||||
|
||||
void LCursor::dispatch(FuncRequest const & cmd0)
|
||||
{
|
||||
lyxerr[Debug::DEBUG] << BOOST_CURRENT_FUNCTION
|
||||
LYXERR(Debug::DEBUG) << BOOST_CURRENT_FUNCTION
|
||||
<< " cmd: " << cmd0 << '\n'
|
||||
<< *this << endl;
|
||||
if (empty())
|
||||
@ -290,7 +290,7 @@ void LCursor::dispatch(FuncRequest const & cmd0)
|
||||
LCursor safe = *this;
|
||||
|
||||
for (; depth(); pop()) {
|
||||
lyxerr[Debug::DEBUG] << "LCursor::dispatch: cmd: "
|
||||
LYXERR(Debug::DEBUG) << "LCursor::dispatch: cmd: "
|
||||
<< cmd0 << endl << *this << endl;
|
||||
BOOST_ASSERT(pos() <= lastpos());
|
||||
BOOST_ASSERT(idx() <= lastidx());
|
||||
@ -308,7 +308,7 @@ void LCursor::dispatch(FuncRequest const & cmd0)
|
||||
// it completely to get a 'bomb early' behaviour in case this
|
||||
// object will be used again.
|
||||
if (!disp_.dispatched()) {
|
||||
lyxerr[Debug::DEBUG] << "RESTORING OLD CURSOR!" << endl;
|
||||
LYXERR(Debug::DEBUG) << "RESTORING OLD CURSOR!" << endl;
|
||||
operator=(safe);
|
||||
disp_.update(Update::None);
|
||||
disp_.dispatched(false);
|
||||
@ -1119,7 +1119,7 @@ bool LCursor::goUpDown(bool up)
|
||||
|
||||
void LCursor::handleFont(string const & font)
|
||||
{
|
||||
lyxerr[Debug::DEBUG] << BOOST_CURRENT_FUNCTION << ": " << font << endl;
|
||||
LYXERR(Debug::DEBUG) << BOOST_CURRENT_FUNCTION << ": " << font << endl;
|
||||
docstring safe;
|
||||
if (selection()) {
|
||||
macroModeClose();
|
||||
|
@ -118,14 +118,14 @@ void operator|=(lyx_debug_trait::type & d1, lyx_debug_trait::type d2)
|
||||
}
|
||||
|
||||
|
||||
// std::ostream & operator<<(std::ostream & o, Debug::type t);
|
||||
|
||||
typedef basic_debugstream<lyx_debug_trait> LyXErr;
|
||||
typedef LyXErr::debug Debug;
|
||||
|
||||
extern LyXErr lyxerr;
|
||||
|
||||
|
||||
} // namespace lyx
|
||||
|
||||
#define LYXERR(type) if (!lyx::lyxerr.debugging(type)) ; else lyx::lyxerr
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -331,7 +331,7 @@ void Encodings::read(FileName const & encfile, FileName const & symbolsfile)
|
||||
if (!info.preamble.empty())
|
||||
info.feature = info.preamble[0] != '\\';
|
||||
|
||||
lyxerr[Debug::INFO]
|
||||
LYXERR(Debug::INFO)
|
||||
<< "Read unicode symbol " << symbol << " '"
|
||||
<< to_utf8(info.command) << "' '" << info.preamble
|
||||
<< "' " << info.combining << ' ' << info.feature
|
||||
@ -363,7 +363,7 @@ void Encodings::read(FileName const & encfile, FileName const & symbolsfile)
|
||||
string const latexname = lex.getString();
|
||||
lex.next();
|
||||
string const iconvname = lex.getString();
|
||||
lyxerr[Debug::INFO] << "Reading encoding " << name << endl;
|
||||
LYXERR(Debug::INFO) << "Reading encoding " << name << endl;
|
||||
encodinglist[name] = Encoding(name, latexname, iconvname);
|
||||
if (lex.lex() != et_end)
|
||||
lex.printError("Encodings::read: "
|
||||
|
@ -517,7 +517,7 @@ InsetBase * readInset(LyXLex & lex, Buffer const & buf)
|
||||
static_cast<MathMacroTemplate*>(inset.get());
|
||||
MacroTable::globalMacros().insert
|
||||
(tmpl->name(), tmpl->asMacroData());
|
||||
lyxerr[Debug::DEBUG]
|
||||
LYXERR(Debug::DEBUG)
|
||||
<< BOOST_CURRENT_FUNCTION
|
||||
<< ": creating local macro " << to_utf8(tmpl->name())
|
||||
<< endl;
|
||||
|
@ -155,7 +155,7 @@ string Formats::getFormatFromFile(FileName const & filename) const
|
||||
find_if(formatlist.begin(), formatlist.end(),
|
||||
FormatExtensionsEqual(ext));
|
||||
if (cit != formats.end()) {
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< "\twill guess format from file extension: "
|
||||
<< ext << " -> " << cit->name() << std::endl;
|
||||
return cit->name();
|
||||
@ -315,7 +315,7 @@ bool Formats::view(Buffer const & buffer, FileName const & filename,
|
||||
command = subst(command, token_from_format, quoteName(filename.toFilesystemEncoding()));
|
||||
command = subst(command, token_path_format, quoteName(onlyPath(filename.toFilesystemEncoding())));
|
||||
command = subst(command, token_socket_format, quoteName(theLyXServerSocket().address()));
|
||||
lyxerr[Debug::FILES] << "Executing command: " << command << std::endl;
|
||||
LYXERR(Debug::FILES) << "Executing command: " << command << std::endl;
|
||||
// FIXME UNICODE utf8 can be wrong for files
|
||||
buffer.message(_("Executing command: ") + from_utf8(command));
|
||||
|
||||
@ -374,7 +374,7 @@ bool Formats::edit(Buffer const & buffer, FileName const & filename,
|
||||
command = subst(command, token_from_format, quoteName(filename.toFilesystemEncoding()));
|
||||
command = subst(command, token_path_format, quoteName(onlyPath(filename.toFilesystemEncoding())));
|
||||
command = subst(command, token_socket_format, quoteName(theLyXServerSocket().address()));
|
||||
lyxerr[Debug::FILES] << "Executing command: " << command << std::endl;
|
||||
LYXERR(Debug::FILES) << "Executing command: " << command << std::endl;
|
||||
// FIXME UNICODE utf8 can be wrong for files
|
||||
buffer.message(_("Executing command: ") + from_utf8(command));
|
||||
|
||||
|
@ -370,7 +370,7 @@ void LyXView::updateMenubar()
|
||||
|
||||
void LyXView::autoSave()
|
||||
{
|
||||
lyxerr[Debug::INFO] << "Running autoSave()" << endl;
|
||||
LYXERR(Debug::INFO) << "Running autoSave()" << endl;
|
||||
|
||||
if (view()->buffer())
|
||||
lyx::autoSave(view());
|
||||
|
@ -121,7 +121,7 @@ void Toolbars::init()
|
||||
int last_posx = 0;
|
||||
int last_posy = 0;
|
||||
for (; tb != te; ++tb) {
|
||||
lyxerr[Debug::INIT] << "Adding " << tb->get<0>() << " at position " << tb->get<1>().posx << " " << tb->get<1>().posy << endl;
|
||||
LYXERR(Debug::INIT) << "Adding " << tb->get<0>() << " at position " << tb->get<1>().posx << " " << tb->get<1>().posy << endl;
|
||||
// add toolbar break if posx or posy changes
|
||||
bool newline = tb->get<1>().location == last_loc && (
|
||||
// if two toolbars at the same location, assume uninitialized and add toolbar break
|
||||
@ -165,7 +165,7 @@ void Toolbars::display(string const & name, bool show)
|
||||
}
|
||||
}
|
||||
|
||||
lyxerr[Debug::GUI] << "Toolbar::display: no toolbar named "
|
||||
LYXERR(Debug::GUI) << "Toolbar::display: no toolbar named "
|
||||
<< name << endl;
|
||||
}
|
||||
|
||||
@ -180,7 +180,7 @@ ToolbarBackend::Flags Toolbars::getToolbarState(string const & name)
|
||||
return cit->flags;
|
||||
}
|
||||
|
||||
lyxerr[Debug::GUI] << "Toolbar::display: no toolbar named "
|
||||
LYXERR(Debug::GUI) << "Toolbar::display: no toolbar named "
|
||||
<< name << endl;
|
||||
|
||||
// return dummy for msvc
|
||||
@ -218,7 +218,7 @@ void Toolbars::toggleToolbarState(string const & name)
|
||||
return;
|
||||
}
|
||||
}
|
||||
lyxerr[Debug::GUI] << "Toolbar::display: no toolbar named "
|
||||
LYXERR(Debug::GUI) << "Toolbar::display: no toolbar named "
|
||||
<< name << endl;
|
||||
}
|
||||
#undef TurnOnFlag
|
||||
|
@ -150,14 +150,14 @@ void WorkArea::redraw()
|
||||
greyed_out_ = false;
|
||||
|
||||
if (lyxerr.debugging(Debug::WORKAREA)) {
|
||||
lyxerr[Debug::WORKAREA] << "WorkArea::redraw screen" << endl;
|
||||
LYXERR(Debug::WORKAREA) << "WorkArea::redraw screen" << endl;
|
||||
}
|
||||
int const ymin = std::max(vi.y1, 0);
|
||||
int const ymax = vi.p2 < vi.size - 1 ? vi.y2 : height();
|
||||
|
||||
expose(0, ymin, width(), ymax - ymin);
|
||||
|
||||
//lyxerr[Debug::WORKAREA]
|
||||
//LYXERR(Debug::WORKAREA)
|
||||
//<< " ymin = " << ymin << " width() = " << width()
|
||||
// << " ymax-ymin = " << ymax-ymin << std::endl;
|
||||
|
||||
|
@ -103,7 +103,7 @@ void ButtonController::valid(bool v) const
|
||||
|
||||
bool ButtonController::readOnly(bool ro) const
|
||||
{
|
||||
lyxerr[Debug::GUI] << "Setting controller ro: " << ro << std::endl;
|
||||
LYXERR(Debug::GUI) << "Setting controller ro: " << ro << std::endl;
|
||||
|
||||
if (ro) {
|
||||
bp().input(ButtonPolicy::SMI_READ_ONLY);
|
||||
|
@ -114,7 +114,7 @@ void nextState(ButtonPolicy::State & state,
|
||||
|
||||
ButtonPolicy::State tmp = s_m[state][in];
|
||||
|
||||
lyxerr[Debug::GUI] << "Transition from state "
|
||||
LYXERR(Debug::GUI) << "Transition from state "
|
||||
<< printState(state) << " to state "
|
||||
<< printState(tmp) << " after input "
|
||||
<< printInput(in) << std::endl;
|
||||
|
@ -432,7 +432,7 @@ string const find_xpm(string const & name)
|
||||
xpm_name = subst(xpm_name, "|", "bars");
|
||||
}
|
||||
|
||||
lyxerr[Debug::GUI] << "find_xpm(" << name << ")\n"
|
||||
LYXERR(Debug::GUI) << "find_xpm(" << name << ")\n"
|
||||
<< "Looking for math XPM called \""
|
||||
<< xpm_name << '"' << std::endl;
|
||||
|
||||
|
@ -100,7 +100,7 @@ SpellBase * getSpeller(BufferParams const & bp)
|
||||
|
||||
bool ControlSpellchecker::initialiseParams(std::string const &)
|
||||
{
|
||||
lyxerr[Debug::GUI] << "Spellchecker::initialiseParams" << endl;
|
||||
LYXERR(Debug::GUI) << "Spellchecker::initialiseParams" << endl;
|
||||
|
||||
speller_.reset(getSpeller(kernel().buffer().params()));
|
||||
if (!speller_.get())
|
||||
@ -126,7 +126,7 @@ bool ControlSpellchecker::initialiseParams(std::string const &)
|
||||
|
||||
void ControlSpellchecker::clearParams()
|
||||
{
|
||||
lyxerr[Debug::GUI] << "Spellchecker::clearParams" << endl;
|
||||
LYXERR(Debug::GUI) << "Spellchecker::clearParams" << endl;
|
||||
speller_.reset(0);
|
||||
}
|
||||
|
||||
@ -195,7 +195,7 @@ WordLangTuple nextWord(LCursor & cur, ptrdiff_t & progress)
|
||||
|
||||
void ControlSpellchecker::check()
|
||||
{
|
||||
lyxerr[Debug::GUI] << "Check the spelling of a word" << endl;
|
||||
LYXERR(Debug::GUI) << "Check the spelling of a word" << endl;
|
||||
|
||||
SpellBase::Result res = SpellBase::OK;
|
||||
|
||||
@ -230,7 +230,7 @@ void ControlSpellchecker::check()
|
||||
float progress = total ? float(start)/total : 1;
|
||||
newvalue_ = int(100.0 * progress);
|
||||
if (newvalue_!= oldval_) {
|
||||
lyxerr[Debug::GUI] << "Updating spell progress." << endl;
|
||||
LYXERR(Debug::GUI) << "Updating spell progress." << endl;
|
||||
oldval_ = newvalue_;
|
||||
// set progress bar
|
||||
dialog().view().partialUpdate(SPELL_PROGRESSED);
|
||||
@ -247,7 +247,7 @@ void ControlSpellchecker::check()
|
||||
return;
|
||||
}
|
||||
|
||||
lyxerr[Debug::GUI] << "Found word \"" << to_utf8(getWord()) << "\"" << endl;
|
||||
LYXERR(Debug::GUI) << "Found word \"" << to_utf8(getWord()) << "\"" << endl;
|
||||
|
||||
int const size = cur.selEnd().pos() - cur.selBegin().pos();
|
||||
cur.pos() -= size;
|
||||
@ -260,7 +260,7 @@ void ControlSpellchecker::check()
|
||||
|
||||
// set suggestions
|
||||
if (res != SpellBase::OK && res != SpellBase::IGNORED_WORD) {
|
||||
lyxerr[Debug::GUI] << "Found a word needing checking." << endl;
|
||||
LYXERR(Debug::GUI) << "Found a word needing checking." << endl;
|
||||
dialog().view().partialUpdate(SPELL_FOUND_WORD);
|
||||
}
|
||||
}
|
||||
@ -305,7 +305,7 @@ void ControlSpellchecker::showSummary()
|
||||
|
||||
void ControlSpellchecker::replace(docstring const & replacement)
|
||||
{
|
||||
lyxerr[Debug::GUI] << "ControlSpellchecker::replace("
|
||||
LYXERR(Debug::GUI) << "ControlSpellchecker::replace("
|
||||
<< to_utf8(replacement) << ")" << std::endl;
|
||||
BufferView & bufferview = *kernel().bufferview();
|
||||
cap::replaceSelectionWithString(bufferview.cursor(), replacement, true);
|
||||
|
@ -88,7 +88,7 @@ void Action::update()
|
||||
|
||||
void Action::action()
|
||||
{
|
||||
// lyxerr[Debug::ACTION] << "calling LyXFunc::dispatch: func_: " << func_ << endl;
|
||||
// LYXERR(Debug::ACTION) << "calling LyXFunc::dispatch: func_: " << func_ << endl;
|
||||
|
||||
lyxView_.dispatch(func_);
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ FileDialog::Result const FileDialog::save(docstring const & path,
|
||||
FileFilterList const & filters,
|
||||
docstring const & suggested)
|
||||
{
|
||||
lyxerr[Debug::GUI] << "Select with path \"" << to_utf8(path)
|
||||
LYXERR(Debug::GUI) << "Select with path \"" << to_utf8(path)
|
||||
<< "\", mask \"" << to_utf8(filters.as_string())
|
||||
<< "\", suggested \"" << to_utf8(suggested) << '"' << endl;
|
||||
FileDialog::Result result;
|
||||
@ -98,9 +98,9 @@ FileDialog::Result const FileDialog::save(docstring const & path,
|
||||
if (!suggested.empty())
|
||||
dlg.selectFile(toqstr(suggested));
|
||||
|
||||
lyxerr[Debug::GUI] << "Synchronous FileDialog: " << endl;
|
||||
LYXERR(Debug::GUI) << "Synchronous FileDialog: " << endl;
|
||||
int res = dlg.exec();
|
||||
lyxerr[Debug::GUI] << "result " << res << endl;
|
||||
LYXERR(Debug::GUI) << "result " << res << endl;
|
||||
if (res == QDialog::Accepted)
|
||||
result.second = from_utf8(internal_path(
|
||||
fromqstr(dlg.selectedFiles()[0])));
|
||||
@ -114,7 +114,7 @@ FileDialog::Result const FileDialog::open(docstring const & path,
|
||||
FileFilterList const & filters,
|
||||
docstring const & suggested)
|
||||
{
|
||||
lyxerr[Debug::GUI] << "Select with path \"" << to_utf8(path)
|
||||
LYXERR(Debug::GUI) << "Select with path \"" << to_utf8(path)
|
||||
<< "\", mask \"" << to_utf8(filters.as_string())
|
||||
<< "\", suggested \"" << to_utf8(suggested) << '"' << endl;
|
||||
FileDialog::Result result;
|
||||
@ -132,9 +132,9 @@ FileDialog::Result const FileDialog::open(docstring const & path,
|
||||
if (!suggested.empty())
|
||||
dlg.selectFile(toqstr(suggested));
|
||||
|
||||
lyxerr[Debug::GUI] << "Synchronous FileDialog: " << endl;
|
||||
LYXERR(Debug::GUI) << "Synchronous FileDialog: " << endl;
|
||||
int res = dlg.exec();
|
||||
lyxerr[Debug::GUI] << "result " << res << endl;
|
||||
LYXERR(Debug::GUI) << "result " << res << endl;
|
||||
if (res == QDialog::Accepted)
|
||||
result.second = from_utf8(internal_path(
|
||||
fromqstr(dlg.selectedFiles()[0])));
|
||||
@ -147,7 +147,7 @@ FileDialog::Result const FileDialog::open(docstring const & path,
|
||||
FileDialog::Result const FileDialog::opendir(docstring const & path,
|
||||
docstring const & suggested)
|
||||
{
|
||||
lyxerr[Debug::GUI] << "Select with path \"" << to_utf8(path)
|
||||
LYXERR(Debug::GUI) << "Select with path \"" << to_utf8(path)
|
||||
<< "\", suggested \"" << to_utf8(suggested) << '"' << endl;
|
||||
FileDialog::Result result;
|
||||
result.first = FileDialog::Chosen;
|
||||
@ -168,9 +168,9 @@ FileDialog::Result const FileDialog::opendir(docstring const & path,
|
||||
if (!suggested.empty())
|
||||
dlg.selectFile(toqstr(suggested));
|
||||
|
||||
lyxerr[Debug::GUI] << "Synchronous FileDialog: " << endl;
|
||||
LYXERR(Debug::GUI) << "Synchronous FileDialog: " << endl;
|
||||
int res = dlg.exec();
|
||||
lyxerr[Debug::GUI] << "result " << res << endl;
|
||||
LYXERR(Debug::GUI) << "result " << res << endl;
|
||||
if (res == QDialog::Accepted)
|
||||
result.second = from_utf8(internal_path(
|
||||
fromqstr(dlg.selectedFiles()[0])));
|
||||
|
@ -113,11 +113,11 @@ GuiApplication::GuiApplication(int & argc, char ** argv)
|
||||
qApp->installTranslator(&qt_trans_);
|
||||
// even if the language calls for RtL, don't do that
|
||||
qApp->setLayoutDirection(Qt::LeftToRight);
|
||||
lyxerr[Debug::GUI]
|
||||
LYXERR(Debug::GUI)
|
||||
<< "Successfully installed Qt translations for locale "
|
||||
<< fromqstr(language_name) << std::endl;
|
||||
} else
|
||||
lyxerr[Debug::GUI]
|
||||
LYXERR(Debug::GUI)
|
||||
<< "Could not find Qt translations for locale "
|
||||
<< fromqstr(language_name) << std::endl;
|
||||
|
||||
@ -278,7 +278,7 @@ bool GuiApplication::x11EventFilter(XEvent * xev)
|
||||
case SelectionRequest: {
|
||||
if (xev->xselectionrequest.selection != XA_PRIMARY)
|
||||
break;
|
||||
lyxerr[Debug::GUI] << "X requested selection." << endl;
|
||||
LYXERR(Debug::GUI) << "X requested selection." << endl;
|
||||
BufferView * bv = currentView()->view();
|
||||
if (bv) {
|
||||
docstring const sel = bv->requestSelection();
|
||||
@ -290,7 +290,7 @@ bool GuiApplication::x11EventFilter(XEvent * xev)
|
||||
case SelectionClear: {
|
||||
if (xev->xselectionclear.selection != XA_PRIMARY)
|
||||
break;
|
||||
lyxerr[Debug::GUI] << "Lost selection." << endl;
|
||||
LYXERR(Debug::GUI) << "Lost selection." << endl;
|
||||
BufferView * bv = currentView()->view();
|
||||
if (bv)
|
||||
bv->clearSelection();
|
||||
|
@ -42,13 +42,13 @@ namespace frontend {
|
||||
|
||||
string const GuiClipboard::getAsLyX() const
|
||||
{
|
||||
lyxerr[Debug::ACTION] << "GuiClipboard::getAsLyX(): `";
|
||||
LYXERR(Debug::ACTION) << "GuiClipboard::getAsLyX(): `";
|
||||
// We don't convert encodings here since the encoding of the
|
||||
// clipboard contents is specified in the data itself
|
||||
QMimeData const * source =
|
||||
qApp->clipboard()->mimeData(QClipboard::Clipboard);
|
||||
if (!source) {
|
||||
lyxerr[Debug::ACTION] << "' (no QMimeData)" << endl;
|
||||
LYXERR(Debug::ACTION) << "' (no QMimeData)" << endl;
|
||||
return string();
|
||||
}
|
||||
if (source->hasFormat(mime_type)) {
|
||||
@ -56,10 +56,10 @@ string const GuiClipboard::getAsLyX() const
|
||||
QByteArray const ar = source->data(mime_type);
|
||||
string const s(ar.data(), ar.count());
|
||||
if (lyxerr.debugging(Debug::ACTION))
|
||||
lyxerr[Debug::ACTION] << s << "'" << endl;
|
||||
LYXERR(Debug::ACTION) << s << "'" << endl;
|
||||
return s;
|
||||
}
|
||||
lyxerr[Debug::ACTION] << "'" << endl;
|
||||
LYXERR(Debug::ACTION) << "'" << endl;
|
||||
return string();
|
||||
}
|
||||
|
||||
@ -69,7 +69,7 @@ docstring const GuiClipboard::getAsText() const
|
||||
// text data from other applications
|
||||
QString const str = qApp->clipboard()->text(QClipboard::Clipboard);
|
||||
if (lyxerr.debugging(Debug::ACTION))
|
||||
lyxerr[Debug::ACTION] << "GuiClipboard::getAsText(): `"
|
||||
LYXERR(Debug::ACTION) << "GuiClipboard::getAsText(): `"
|
||||
<< fromqstr(str) << "'" << endl;
|
||||
if (str.isNull())
|
||||
return docstring();
|
||||
@ -81,7 +81,7 @@ docstring const GuiClipboard::getAsText() const
|
||||
void GuiClipboard::put(string const & lyx, docstring const & text)
|
||||
{
|
||||
if (lyxerr.debugging(Debug::ACTION))
|
||||
lyxerr[Debug::ACTION] << "GuiClipboard::put(`" << lyx << "' `"
|
||||
LYXERR(Debug::ACTION) << "GuiClipboard::put(`" << lyx << "' `"
|
||||
<< to_utf8(text) << "')" << endl;
|
||||
// We don't convert the encoding of lyx since the encoding of the
|
||||
// clipboard contents is specified in the data itself
|
||||
|
@ -107,7 +107,7 @@ string getRawName(string const & family)
|
||||
if (family == symbol_fonts[i].family)
|
||||
return symbol_fonts[i].xlfd;
|
||||
|
||||
lyxerr[Debug::FONT] << "BUG: family not found !" << endl;
|
||||
LYXERR(Debug::FONT) << "BUG: family not found !" << endl;
|
||||
return string();
|
||||
}
|
||||
|
||||
@ -137,10 +137,10 @@ bool isChosenFont(QFont & font, string const & family)
|
||||
// positions.
|
||||
QFontInfo fi(font);
|
||||
|
||||
lyxerr[Debug::FONT] << "got: " << fromqstr(fi.family()) << endl;
|
||||
LYXERR(Debug::FONT) << "got: " << fromqstr(fi.family()) << endl;
|
||||
|
||||
if (contains(fromqstr(fi.family()), family)) {
|
||||
lyxerr[Debug::FONT] << " got it ";
|
||||
LYXERR(Debug::FONT) << " got it ";
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -150,7 +150,7 @@ bool isChosenFont(QFont & font, string const & family)
|
||||
|
||||
pair<QFont, bool> const getSymbolFont(string const & family)
|
||||
{
|
||||
lyxerr[Debug::FONT] << "Looking for font family "
|
||||
LYXERR(Debug::FONT) << "Looking for font family "
|
||||
<< family << " ... ";
|
||||
string upper = family;
|
||||
upper[0] = toupper(family[0]);
|
||||
@ -160,30 +160,30 @@ pair<QFont, bool> const getSymbolFont(string const & family)
|
||||
font.setFamily(toqstr(family));
|
||||
|
||||
if (isChosenFont(font, family)) {
|
||||
lyxerr[Debug::FONT] << "normal!" << endl;
|
||||
LYXERR(Debug::FONT) << "normal!" << endl;
|
||||
return make_pair<QFont, bool>(font, true);
|
||||
}
|
||||
|
||||
lyxerr[Debug::FONT] << "Trying " << upper << " ... ";
|
||||
LYXERR(Debug::FONT) << "Trying " << upper << " ... ";
|
||||
font.setFamily(toqstr(upper));
|
||||
|
||||
if (isChosenFont(font, upper)) {
|
||||
lyxerr[Debug::FONT] << "upper!" << endl;
|
||||
LYXERR(Debug::FONT) << "upper!" << endl;
|
||||
return make_pair<QFont, bool>(font, true);
|
||||
}
|
||||
|
||||
// A simple setFamily() fails on Qt 2
|
||||
|
||||
string const rawName = getRawName(family);
|
||||
lyxerr[Debug::FONT] << "Trying " << rawName << " ... ";
|
||||
LYXERR(Debug::FONT) << "Trying " << rawName << " ... ";
|
||||
font.setRawName(toqstr(rawName));
|
||||
|
||||
if (isChosenFont(font, family)) {
|
||||
lyxerr[Debug::FONT] << "raw version!" << endl;
|
||||
LYXERR(Debug::FONT) << "raw version!" << endl;
|
||||
return make_pair<QFont, bool>(font, true);
|
||||
}
|
||||
|
||||
lyxerr[Debug::FONT] << " FAILED :-(" << endl;
|
||||
LYXERR(Debug::FONT) << " FAILED :-(" << endl;
|
||||
return make_pair<QFont, bool>(font, false);
|
||||
}
|
||||
|
||||
@ -262,23 +262,23 @@ QLFontInfo::QLFontInfo(LyXFont const & f)
|
||||
}
|
||||
|
||||
if (lyxerr.debugging(Debug::FONT)) {
|
||||
lyxerr[Debug::FONT] << "Font '" << to_utf8(f.stateText(0))
|
||||
LYXERR(Debug::FONT) << "Font '" << to_utf8(f.stateText(0))
|
||||
<< "' matched by\n" << fromqstr(font.family()) << endl;
|
||||
}
|
||||
|
||||
// Is this an exact match?
|
||||
if (font.exactMatch())
|
||||
lyxerr[Debug::FONT] << "This font is an exact match" << endl;
|
||||
LYXERR(Debug::FONT) << "This font is an exact match" << endl;
|
||||
else
|
||||
lyxerr[Debug::FONT] << "This font is NOT an exact match"
|
||||
LYXERR(Debug::FONT) << "This font is NOT an exact match"
|
||||
<< endl;
|
||||
|
||||
lyxerr[Debug::FONT] << "XFLD: " << fromqstr(font.rawName()) << endl;
|
||||
LYXERR(Debug::FONT) << "XFLD: " << fromqstr(font.rawName()) << endl;
|
||||
|
||||
font.setPointSizeF(convert<double>(lyxrc.font_sizes[f.size()])
|
||||
* lyxrc.zoom / 100.0);
|
||||
|
||||
lyxerr[Debug::FONT] << "The font has size: "
|
||||
LYXERR(Debug::FONT) << "The font has size: "
|
||||
<< font.pointSizeF() << endl;
|
||||
|
||||
if (f.realShape() != LyXFont::SMALLCAPS_SHAPE) {
|
||||
|
@ -59,7 +59,7 @@ void GuiSelection::haveSelection(bool own)
|
||||
docstring const GuiSelection::get() const
|
||||
{
|
||||
QString const str = qApp->clipboard()->text(QClipboard::Selection);
|
||||
lyxerr[Debug::ACTION] << "GuiSelection::get: " << fromqstr(str)
|
||||
LYXERR(Debug::ACTION) << "GuiSelection::get: " << fromqstr(str)
|
||||
<< endl;
|
||||
if (str.isNull())
|
||||
return docstring();
|
||||
@ -70,7 +70,7 @@ docstring const GuiSelection::get() const
|
||||
|
||||
void GuiSelection::put(docstring const & str)
|
||||
{
|
||||
lyxerr[Debug::ACTION] << "GuiSelection::put: " << lyx::to_utf8(str) << endl;
|
||||
LYXERR(Debug::ACTION) << "GuiSelection::put: " << lyx::to_utf8(str) << endl;
|
||||
|
||||
qApp->clipboard()->setText(toqstr(externalLineEnding(str)),
|
||||
QClipboard::Selection);
|
||||
|
@ -198,7 +198,7 @@ GuiWorkArea::GuiWorkArea(int w, int h, int id, LyXView & lyx_view)
|
||||
// PageStep only depends on the viewport height.
|
||||
verticalScrollBar()->setPageStep(viewport()->height());
|
||||
|
||||
lyxerr[Debug::GUI] << BOOST_CURRENT_FUNCTION
|
||||
LYXERR(Debug::GUI) << BOOST_CURRENT_FUNCTION
|
||||
<< "\n Area width\t" << width()
|
||||
<< "\n Area height\t" << height()
|
||||
<< "\n viewport width\t" << viewport()->width()
|
||||
@ -253,7 +253,7 @@ void GuiWorkArea::dropEvent(QDropEvent* event)
|
||||
if (files.isEmpty())
|
||||
return;
|
||||
|
||||
lyxerr[Debug::GUI] << "GuiWorkArea::dropEvent: got URIs!" << endl;
|
||||
LYXERR(Debug::GUI) << "GuiWorkArea::dropEvent: got URIs!" << endl;
|
||||
for (int i = 0; i!=files.size(); ++i) {
|
||||
string const file = os::internal_path(fromqstr(files.at(i).toLocalFile()));
|
||||
if (!file.empty())
|
||||
@ -414,7 +414,7 @@ void GuiWorkArea::generateSyntheticMouseEvent()
|
||||
|
||||
void GuiWorkArea::keyPressEvent(QKeyEvent * e)
|
||||
{
|
||||
lyxerr[Debug::KEY] << BOOST_CURRENT_FUNCTION
|
||||
LYXERR(Debug::KEY) << BOOST_CURRENT_FUNCTION
|
||||
<< " count=" << e->count()
|
||||
<< " text=" << fromqstr(e->text())
|
||||
<< " isAutoRepeat=" << e->isAutoRepeat()
|
||||
@ -462,7 +462,7 @@ void GuiWorkArea::doGreyOut(QLPainter & pain)
|
||||
|
||||
//if (!lyxrc.show_banner)
|
||||
// return;
|
||||
lyxerr[Debug::GUI] << "show banner: " << lyxrc.show_banner << endl;
|
||||
LYXERR(Debug::GUI) << "show banner: " << lyxrc.show_banner << endl;
|
||||
/// The text to be written on top of the pixmap
|
||||
QString const text = lyx_version ? QString(lyx_version) : qt_("unknown version");
|
||||
FileName const file = support::libFileSearch("images", "banner", "ppm");
|
||||
@ -502,7 +502,7 @@ void GuiWorkArea::paintEvent(QPaintEvent * ev)
|
||||
{
|
||||
QRect const rc = ev->rect();
|
||||
/*
|
||||
lyxerr[Debug::PAINTING] << "paintEvent begin: x: " << rc.x()
|
||||
LYXERR(Debug::PAINTING) << "paintEvent begin: x: " << rc.x()
|
||||
<< " y: " << rc.y()
|
||||
<< " w: " << rc.width()
|
||||
<< " h: " << rc.height() << endl;
|
||||
@ -534,7 +534,7 @@ void GuiWorkArea::updateScreen()
|
||||
QLPainter pain(&screen_);
|
||||
|
||||
if (greyed_out_) {
|
||||
lyxerr[Debug::GUI] << "splash screen requested" << endl;
|
||||
LYXERR(Debug::GUI) << "splash screen requested" << endl;
|
||||
verticalScrollBar()->hide();
|
||||
doGreyOut(pain);
|
||||
return;
|
||||
@ -587,7 +587,7 @@ void GuiWorkArea::inputMethodEvent(QInputMethodEvent * e)
|
||||
|
||||
if (!commit_string.isEmpty()) {
|
||||
|
||||
lyxerr[Debug::KEY] << BOOST_CURRENT_FUNCTION
|
||||
LYXERR(Debug::KEY) << BOOST_CURRENT_FUNCTION
|
||||
<< " preeditString =" << fromqstr(e->preeditString())
|
||||
<< " commitString =" << fromqstr(e->commitString())
|
||||
<< endl;
|
||||
|
@ -148,7 +148,7 @@ void QCitation::findKey(QString const & str, bool only_keys,
|
||||
// Reset last_searched_string in case of changed option.
|
||||
if (last_case_sensitive != case_sensitive
|
||||
|| last_reg_exp != reg_exp) {
|
||||
lyxerr[Debug::GUI] << "QCitation::findKey: optimisation disabled!" << std::endl;
|
||||
LYXERR(Debug::GUI) << "QCitation::findKey: optimisation disabled!" << std::endl;
|
||||
last_searched_string.clear();
|
||||
}
|
||||
// save option for next search.
|
||||
|
@ -143,7 +143,7 @@ void QGraphicsDialog::change_adaptor()
|
||||
void QGraphicsDialog::change_bb()
|
||||
{
|
||||
form_->controller().bbChanged = true;
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< "[controller().bb_Changed set to true]\n";
|
||||
form_->changed();
|
||||
}
|
||||
|
@ -67,27 +67,27 @@ Image::FormatList QLImage::loadableFormats()
|
||||
Formats::const_iterator end = formats.end();
|
||||
|
||||
|
||||
// lyxerr[Debug::GRAPHICS]
|
||||
// LYXERR(Debug::GRAPHICS)
|
||||
// << "D:/msys/home/yns/src/lyx-devel/lib/images/banner.ppm is of format: "
|
||||
// << fromqstr(Pic.pictureFormat("D:/msys/home/yns/src/lyx-devel/lib/images/banner.ppm"))
|
||||
// << endl;
|
||||
// if (Pic.pictureFormat("D:/msys/home/yns/src/lyx-devel/lib/images/banner.ppm"))
|
||||
// lyxerr[Debug::GRAPHICS]
|
||||
// LYXERR(Debug::GRAPHICS)
|
||||
// << "pictureFormat not returned NULL\n" << endl;
|
||||
// << "Supported formats are: " << Pic.inputFormats() << endl;
|
||||
|
||||
QList<QByteArray> qt_formats = QImageReader::supportedImageFormats ();
|
||||
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< "\nThe image loader can load the following directly:\n";
|
||||
|
||||
if (qt_formats.empty())
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< "\nQt4 Problem: No Format available!" << endl;
|
||||
|
||||
for (QList<QByteArray>::const_iterator it =qt_formats.begin(); it != qt_formats.end(); ++it) {
|
||||
|
||||
lyxerr[Debug::GRAPHICS] << (const char *) *it << ", ";
|
||||
LYXERR(Debug::GRAPHICS) << (const char *) *it << ", ";
|
||||
|
||||
string ext = ascii_lowercase((const char *) *it);
|
||||
|
||||
@ -105,17 +105,17 @@ Image::FormatList QLImage::loadableFormats()
|
||||
}
|
||||
|
||||
if (lyxerr.debugging()) {
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< "\nOf these, LyX recognises the following formats:\n";
|
||||
|
||||
FormatList::const_iterator fbegin = fmts.begin();
|
||||
FormatList::const_iterator fend = fmts.end();
|
||||
for (FormatList::const_iterator fit = fbegin; fit != fend; ++fit) {
|
||||
if (fit != fbegin)
|
||||
lyxerr[Debug::GRAPHICS] << ", ";
|
||||
lyxerr[Debug::GRAPHICS] << *fit;
|
||||
LYXERR(Debug::GRAPHICS) << ", ";
|
||||
LYXERR(Debug::GRAPHICS) << *fit;
|
||||
}
|
||||
lyxerr[Debug::GRAPHICS] << '\n' << endl;
|
||||
LYXERR(Debug::GRAPHICS) << '\n' << endl;
|
||||
}
|
||||
|
||||
return fmts;
|
||||
@ -156,14 +156,14 @@ unsigned int QLImage::getHeight_impl() const
|
||||
void QLImage::load_impl(support::FileName const & filename)
|
||||
{
|
||||
if (!original_.isNull()) {
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< "Image is loaded already!" << endl;
|
||||
finishedLoading(false);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!original_.load(toqstr(filename.absFilename()))) {
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< "Unable to open image" << endl;
|
||||
finishedLoading(false);
|
||||
return;
|
||||
|
@ -48,15 +48,15 @@ QLMenubar::QLMenubar(LyXView * view, MenuBackend & mbe)
|
||||
{
|
||||
macxMenuBarInit();
|
||||
|
||||
lyxerr[Debug::GUI] << "populating menu bar" << lyx::to_utf8(menubackend_.getMenubar().name()) << endl;
|
||||
LYXERR(Debug::GUI) << "populating menu bar" << lyx::to_utf8(menubackend_.getMenubar().name()) << endl;
|
||||
|
||||
if (menubackend_.getMenubar().size() == 0) {
|
||||
lyxerr[Debug::GUI] << "\tERROR: empty menu bar" << lyx::to_utf8(menubackend_.getMenubar().name()) << endl;
|
||||
LYXERR(Debug::GUI) << "\tERROR: empty menu bar" << lyx::to_utf8(menubackend_.getMenubar().name()) << endl;
|
||||
return;
|
||||
// continue;
|
||||
}
|
||||
else {
|
||||
lyxerr[Debug::GUI] << "menu bar entries " << menubackend_.getMenubar().size();
|
||||
LYXERR(Debug::GUI) << "menu bar entries " << menubackend_.getMenubar().size();
|
||||
}
|
||||
// for (; m != end; ++m) {
|
||||
|
||||
@ -69,15 +69,15 @@ QLMenubar::QLMenubar(LyXView * view, MenuBackend & mbe)
|
||||
for (; m != end; ++m) {
|
||||
|
||||
if (m->kind() != MenuItem::Submenu) {
|
||||
lyxerr[Debug::GUI] << "\tERROR: not a submenu " << lyx::to_utf8(m->label()) << endl;
|
||||
LYXERR(Debug::GUI) << "\tERROR: not a submenu " << lyx::to_utf8(m->label()) << endl;
|
||||
continue;
|
||||
}
|
||||
|
||||
lyxerr[Debug::GUI] << "menu bar item " << lyx::to_utf8(m->label()) << " is a submenu named " << lyx::to_utf8(m->submenuname()) << endl;
|
||||
LYXERR(Debug::GUI) << "menu bar item " << lyx::to_utf8(m->label()) << " is a submenu named " << lyx::to_utf8(m->submenuname()) << endl;
|
||||
|
||||
docstring name = m->submenuname();
|
||||
if (!menubackend_.hasMenu(name)) {
|
||||
lyxerr[Debug::GUI] << "\tERROR: " << lyx::to_utf8(name) << " submenu has no menu!" << endl;
|
||||
LYXERR(Debug::GUI) << "\tERROR: " << lyx::to_utf8(name) << " submenu has no menu!" << endl;
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -89,7 +89,7 @@ QLMenubar::QLMenubar(LyXView * view, MenuBackend & mbe)
|
||||
|
||||
pair<NameMap::iterator, bool> I = name_map_.insert(make_pair(name, qMenu));
|
||||
if (!I.second) {
|
||||
lyxerr[Debug::GUI] << "\tERROR: " << lyx::to_utf8(name) << " submenu is already there!" << endl;
|
||||
LYXERR(Debug::GUI) << "\tERROR: " << lyx::to_utf8(name) << " submenu is already there!" << endl;
|
||||
}
|
||||
/*
|
||||
QObject::connect(qMenu, SIGNAL(aboutToShow()), this, SLOT(update()));
|
||||
|
@ -248,7 +248,7 @@ int QLPainter::text(int x, int y, docstring const & s,
|
||||
setLayoutDirection(Qt::LeftToRight);
|
||||
if (isDrawingEnabled()) {
|
||||
if (lyxerr.debugging(Debug::PAINTING)) {
|
||||
lyxerr[Debug::PAINTING] << "draw " << std::string(str.toUtf8())
|
||||
LYXERR(Debug::PAINTING) << "draw " << std::string(str.toUtf8())
|
||||
<< " at " << x << "," << y << std::endl;
|
||||
}
|
||||
// Qt4 does not display a glyph whose codepoint is the
|
||||
|
@ -57,8 +57,8 @@ QLPopupMenu::QLPopupMenu(QLMenubar * owner,
|
||||
|
||||
void QLPopupMenu::update()
|
||||
{
|
||||
lyxerr[Debug::GUI] << BOOST_CURRENT_FUNCTION << endl;
|
||||
lyxerr[Debug::GUI] << "\tTriggered menu: " << lyx::to_utf8(name_) << endl;
|
||||
LYXERR(Debug::GUI) << BOOST_CURRENT_FUNCTION << endl;
|
||||
LYXERR(Debug::GUI) << "\tTriggered menu: " << lyx::to_utf8(name_) << endl;
|
||||
|
||||
clear();
|
||||
|
||||
@ -72,20 +72,20 @@ void QLPopupMenu::update()
|
||||
owner_->backend().expand(fromLyxMenu, topLevelMenu_, owner_->view()->buffer());
|
||||
|
||||
if (!owner_->backend().hasMenu(topLevelMenu_.name())) {
|
||||
lyxerr[Debug::GUI] << "\tWARNING: menu seems empty" << lyx::to_utf8(topLevelMenu_.name()) << endl;
|
||||
LYXERR(Debug::GUI) << "\tWARNING: menu seems empty" << lyx::to_utf8(topLevelMenu_.name()) << endl;
|
||||
}
|
||||
populate(this, &topLevelMenu_);
|
||||
}
|
||||
|
||||
void QLPopupMenu::populate(QMenu* qMenu, Menu * menu)
|
||||
{
|
||||
lyxerr[Debug::GUI] << "populating menu " << lyx::to_utf8(menu->name()) ;
|
||||
LYXERR(Debug::GUI) << "populating menu " << lyx::to_utf8(menu->name()) ;
|
||||
if (menu->size() == 0) {
|
||||
lyxerr[Debug::GUI] << "\tERROR: empty menu " << lyx::to_utf8(menu->name()) << endl;
|
||||
LYXERR(Debug::GUI) << "\tERROR: empty menu " << lyx::to_utf8(menu->name()) << endl;
|
||||
return;
|
||||
}
|
||||
else {
|
||||
lyxerr[Debug::GUI] << " ***** menu entries " << menu->size() << endl;
|
||||
LYXERR(Debug::GUI) << " ***** menu entries " << menu->size() << endl;
|
||||
}
|
||||
|
||||
Menu::const_iterator m = menu->begin();
|
||||
@ -96,17 +96,17 @@ void QLPopupMenu::populate(QMenu* qMenu, Menu * menu)
|
||||
if (m->kind() == MenuItem::Separator) {
|
||||
|
||||
qMenu->addSeparator();
|
||||
lyxerr[Debug::GUI] << "adding Menubar Separator" << endl;
|
||||
LYXERR(Debug::GUI) << "adding Menubar Separator" << endl;
|
||||
|
||||
} else if (m->kind() == MenuItem::Submenu) {
|
||||
|
||||
lyxerr[Debug::GUI] << "** creating New Sub-Menu " << lyx::to_utf8(getLabel(*m)) << endl;
|
||||
LYXERR(Debug::GUI) << "** creating New Sub-Menu " << lyx::to_utf8(getLabel(*m)) << endl;
|
||||
QMenu * subMenu = qMenu->addMenu(toqstr(getLabel(*m)));
|
||||
populate(subMenu, m->submenu());
|
||||
|
||||
} else { // we have a MenuItem::Command
|
||||
|
||||
lyxerr[Debug::GUI] << "creating Menu Item " << lyx::to_utf8(m->label()) << endl;
|
||||
LYXERR(Debug::GUI) << "creating Menu Item " << lyx::to_utf8(m->label()) << endl;
|
||||
|
||||
docstring label = getLabel(*m);
|
||||
addBinding(label, *m);
|
||||
|
@ -52,7 +52,7 @@ char const encode(string const & encoding, QString const & str)
|
||||
|
||||
EncodingMap::const_iterator cit = encoding_map.find(encoding);
|
||||
if (cit == encoding_map.end()) {
|
||||
lyxerr[Debug::KEY] << "Unrecognised encoding '" << encoding
|
||||
LYXERR(Debug::KEY) << "Unrecognised encoding '" << encoding
|
||||
<< "'." << endl;
|
||||
codec = encoding_map.find("")->second;
|
||||
} else {
|
||||
@ -60,15 +60,15 @@ char const encode(string const & encoding, QString const & str)
|
||||
}
|
||||
|
||||
if (!codec) {
|
||||
lyxerr[Debug::KEY] << "No codec for encoding '" << encoding
|
||||
LYXERR(Debug::KEY) << "No codec for encoding '" << encoding
|
||||
<< "' found." << endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
lyxerr[Debug::KEY] << "Using codec " << fromqstr(codec->name()) << endl;
|
||||
LYXERR(Debug::KEY) << "Using codec " << fromqstr(codec->name()) << endl;
|
||||
|
||||
if (!codec->canEncode(str)) {
|
||||
lyxerr[Debug::KEY] << "Oof. Can't encode the text !" << endl;
|
||||
LYXERR(Debug::KEY) << "Oof. Can't encode the text !" << endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -89,13 +89,13 @@ void QLyXKeySym::set(QKeyEvent * ev)
|
||||
key_ = ev->key();
|
||||
if (ev->text().isNull()) {
|
||||
if (lyxerr.debugging())
|
||||
lyxerr[Debug::KEY] << "keyevent has isNull() text !" << endl;
|
||||
LYXERR(Debug::KEY) << "keyevent has isNull() text !" << endl;
|
||||
text_ = "";
|
||||
return;
|
||||
}
|
||||
text_ = ev->text();
|
||||
if (lyxerr.debugging())
|
||||
lyxerr[Debug::KEY] << "Setting key to " << key_ << ", " << fromqstr(text_) << endl;
|
||||
LYXERR(Debug::KEY) << "Setting key to " << key_ << ", " << fromqstr(text_) << endl;
|
||||
}
|
||||
|
||||
|
||||
@ -104,7 +104,7 @@ void QLyXKeySym::init(string const & symbolname)
|
||||
key_ = string_to_qkey(symbolname);
|
||||
text_ = toqstr(symbolname);
|
||||
if (lyxerr.debugging())
|
||||
lyxerr[Debug::KEY] << "Init key to " << key_ << ", " << fromqstr(text_) << endl;
|
||||
LYXERR(Debug::KEY) << "Init key to " << key_ << ", " << fromqstr(text_) << endl;
|
||||
}
|
||||
|
||||
|
||||
@ -112,7 +112,7 @@ bool QLyXKeySym::isOK() const
|
||||
{
|
||||
bool const ok(!(text_.isEmpty() && key_ == Qt::Key_unknown));
|
||||
if (lyxerr.debugging())
|
||||
lyxerr[Debug::KEY] << "isOK is " << ok << endl;
|
||||
LYXERR(Debug::KEY) << "isOK is " << ok << endl;
|
||||
return ok;
|
||||
}
|
||||
|
||||
@ -121,7 +121,7 @@ bool QLyXKeySym::isModifier() const
|
||||
{
|
||||
bool const mod(q_is_modifier(key_));
|
||||
if (lyxerr.debugging())
|
||||
lyxerr[Debug::KEY] << "isMod is " << mod << endl;
|
||||
LYXERR(Debug::KEY) << "isMod is " << mod << endl;
|
||||
return mod;
|
||||
}
|
||||
|
||||
@ -148,9 +148,9 @@ char_type QLyXKeySym::getUCSEncoded() const
|
||||
|
||||
if (lyxerr.debugging() && text_.size() > 1) {
|
||||
// We don't know yet how well support the full ucs4 range.
|
||||
lyxerr[Debug::KEY] << "QLyXKeySym::getUCSEncoded()" << endl;
|
||||
LYXERR(Debug::KEY) << "QLyXKeySym::getUCSEncoded()" << endl;
|
||||
for (int i = 0; i < text_.size(); ++i) {
|
||||
lyxerr[Debug::KEY] << "char " << i << ": "
|
||||
LYXERR(Debug::KEY) << "char " << i << ": "
|
||||
<< text_[i].unicode() << endl;
|
||||
}
|
||||
}
|
||||
@ -183,7 +183,7 @@ bool QLyXKeySym::isText() const
|
||||
{
|
||||
if (text_.isEmpty()) {
|
||||
if (lyxerr.debugging())
|
||||
lyxerr[Debug::KEY] << "text_ empty, isText() == false" << endl;
|
||||
LYXERR(Debug::KEY) << "text_ empty, isText() == false" << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -62,11 +62,11 @@ QStandardItemModel * QToc::tocModel(int type)
|
||||
return 0;
|
||||
|
||||
if (toc_models_.empty()) {
|
||||
lyxerr[Debug::GUI] << "QToc::tocModel(): no types available " << endl;
|
||||
LYXERR(Debug::GUI) << "QToc::tocModel(): no types available " << endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
lyxerr[Debug::GUI]
|
||||
LYXERR(Debug::GUI)
|
||||
<< "QToc: type_ " << type
|
||||
<< " toc_models_.size() " << toc_models_.size()
|
||||
<< endl;
|
||||
@ -89,7 +89,7 @@ void QToc::goTo(int type, QModelIndex const & index)
|
||||
{
|
||||
if (type < 0 || !index.isValid()
|
||||
|| index.model() != toc_models_[type]) {
|
||||
lyxerr[Debug::GUI]
|
||||
LYXERR(Debug::GUI)
|
||||
<< "QToc::goTo(): QModelIndex is invalid!"
|
||||
<< endl;
|
||||
return;
|
||||
@ -99,7 +99,7 @@ void QToc::goTo(int type, QModelIndex const & index)
|
||||
|
||||
TocIterator const it = toc_models_[type]->tocIterator(index);
|
||||
|
||||
lyxerr[Debug::GUI]
|
||||
LYXERR(Debug::GUI)
|
||||
<< "QToc::goTo " << lyx::to_utf8(it->str())
|
||||
<< endl;
|
||||
|
||||
|
@ -108,7 +108,7 @@ void TocModel::populate(Toc const & toc)
|
||||
toc_map_.insert( TocPair(top_level_item, iter) );
|
||||
model_map_[iter] = top_level_item;
|
||||
|
||||
lyxerr[Debug::GUI]
|
||||
LYXERR(Debug::GUI)
|
||||
<< "Toc: at depth " << iter->depth()
|
||||
<< ", added item " << lyx::to_utf8(iter->str())
|
||||
<< endl;
|
||||
|
@ -61,7 +61,7 @@ TocWidget::TocWidget(QToc * form, QWidget * parent)
|
||||
void TocWidget::selectionChanged(const QModelIndex & current,
|
||||
const QModelIndex & /*previous*/)
|
||||
{
|
||||
lyxerr[Debug::GUI]
|
||||
LYXERR(Debug::GUI)
|
||||
<< "selectionChanged index " << current.row()
|
||||
<< ", " << current.column()
|
||||
<< endl;
|
||||
@ -181,7 +181,7 @@ void TocWidget::on_moveOutPB_clicked()
|
||||
void TocWidget::select(QModelIndex const & index)
|
||||
{
|
||||
if (!index.isValid()) {
|
||||
lyxerr[Debug::GUI]
|
||||
LYXERR(Debug::GUI)
|
||||
<< "TocWidget::select(): QModelIndex is invalid!" << endl;
|
||||
return;
|
||||
}
|
||||
@ -210,7 +210,7 @@ void TocWidget::enableButtons(bool enable)
|
||||
|
||||
void TocWidget::update()
|
||||
{
|
||||
lyxerr[Debug::GUI] << "In TocWidget::update()" << endl;
|
||||
LYXERR(Debug::GUI) << "In TocWidget::update()" << endl;
|
||||
select(form_->getCurrentIndex(typeCO->currentIndex()));
|
||||
QWidget::update();
|
||||
}
|
||||
@ -257,12 +257,12 @@ void TocWidget::setTocModel(size_t type)
|
||||
depthSL->setMaximum(form_->getTocDepth(type));
|
||||
depthSL->setValue(depth_);
|
||||
|
||||
lyxerr[Debug::GUI] << "In TocWidget::updateGui()" << endl;
|
||||
LYXERR(Debug::GUI) << "In TocWidget::updateGui()" << endl;
|
||||
|
||||
select(form_->getCurrentIndex(typeCO->currentIndex()));
|
||||
|
||||
if (toc_model) {
|
||||
lyxerr[Debug::GUI]
|
||||
LYXERR(Debug::GUI)
|
||||
<< "form_->tocModel()->rowCount "
|
||||
<< toc_model->rowCount()
|
||||
<< "\nform_->tocModel()->columnCount "
|
||||
|
@ -62,7 +62,7 @@ void PanelStack::addCategory(docstring const & n, docstring const & parent)
|
||||
|
||||
QString const name(toqstr(n));
|
||||
|
||||
lyxerr[Debug::GUI] << "addCategory n= " << lyx::to_utf8(n) << " parent= " << endl;
|
||||
LYXERR(Debug::GUI) << "addCategory n= " << lyx::to_utf8(n) << " parent= " << endl;
|
||||
|
||||
int depth = 1;
|
||||
|
||||
|
@ -69,7 +69,7 @@ void Cache::add(FileName const & file) const
|
||||
{
|
||||
// Is the file in the cache already?
|
||||
if (inCache(file)) {
|
||||
lyxerr[Debug::GRAPHICS] << "Cache::add(" << file << "):\n"
|
||||
LYXERR(Debug::GRAPHICS) << "Cache::add(" << file << "):\n"
|
||||
<< "The file is already in the cache."
|
||||
<< std::endl;
|
||||
return;
|
||||
|
@ -262,7 +262,7 @@ void CacheItem::Impl::setStatus(ImageStatus new_status)
|
||||
void CacheItem::Impl::imageConverted(bool success)
|
||||
{
|
||||
string const text = success ? "succeeded" : "failed";
|
||||
lyxerr[Debug::GRAPHICS] << "Image conversion " << text << '.' << endl;
|
||||
LYXERR(Debug::GRAPHICS) << "Image conversion " << text << '.' << endl;
|
||||
|
||||
file_to_load_ = converter_.get() ?
|
||||
FileName(converter_->convertedFile()) : FileName();
|
||||
@ -272,7 +272,7 @@ void CacheItem::Impl::imageConverted(bool success)
|
||||
success = !file_to_load_.empty() && isFileReadable(file_to_load_);
|
||||
|
||||
if (!success) {
|
||||
lyxerr[Debug::GRAPHICS] << "Unable to find converted file!"
|
||||
LYXERR(Debug::GRAPHICS) << "Unable to find converted file!"
|
||||
<< endl;
|
||||
setStatus(ErrorConverting);
|
||||
|
||||
@ -294,7 +294,7 @@ void CacheItem::Impl::imageConverted(bool success)
|
||||
void CacheItem::Impl::loadImage()
|
||||
{
|
||||
setStatus(Loading);
|
||||
lyxerr[Debug::GRAPHICS] << "Loading image." << endl;
|
||||
LYXERR(Debug::GRAPHICS) << "Loading image." << endl;
|
||||
|
||||
image_ = Image::newImage();
|
||||
|
||||
@ -308,7 +308,7 @@ void CacheItem::Impl::loadImage()
|
||||
void CacheItem::Impl::imageLoaded(bool success)
|
||||
{
|
||||
string const text = success ? "succeeded" : "failed";
|
||||
lyxerr[Debug::GRAPHICS] << "Image loading " << text << '.' << endl;
|
||||
LYXERR(Debug::GRAPHICS) << "Image loading " << text << '.' << endl;
|
||||
|
||||
// Clean up after loading.
|
||||
if (zipped_)
|
||||
@ -356,7 +356,7 @@ static string const findTargetFormat(string const & from)
|
||||
if (lyx::graphics::Converter::isReachable(from, *it))
|
||||
return *it;
|
||||
else
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< "Unable to convert from " << from
|
||||
<< " to " << *it << std::endl;
|
||||
}
|
||||
@ -375,7 +375,7 @@ void CacheItem::Impl::convertToDisplayFormat()
|
||||
if (!isFileReadable(filename_)) {
|
||||
if (status_ != ErrorNoFile) {
|
||||
setStatus(ErrorNoFile);
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< "\tThe file is not readable" << endl;
|
||||
}
|
||||
return;
|
||||
@ -388,7 +388,7 @@ void CacheItem::Impl::convertToDisplayFormat()
|
||||
unzipped_filename_ = tempName(FileName(), filename_.toFilesystemEncoding());
|
||||
if (unzipped_filename_.empty()) {
|
||||
setStatus(ErrorConverting);
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< "\tCould not create temporary file." << endl;
|
||||
return;
|
||||
}
|
||||
@ -397,7 +397,7 @@ void CacheItem::Impl::convertToDisplayFormat()
|
||||
filename = filename_;
|
||||
|
||||
docstring const displayed_filename = makeDisplayPath(filename_.absFilename());
|
||||
lyxerr[Debug::GRAPHICS] << "[graphics::CacheItem::Impl::convertToDisplayFormat]\n"
|
||||
LYXERR(Debug::GRAPHICS) << "[graphics::CacheItem::Impl::convertToDisplayFormat]\n"
|
||||
<< "\tAttempting to convert image file: " << filename
|
||||
<< "\n\twith displayed filename: " << lyx::to_utf8(displayed_filename)
|
||||
<< endl;
|
||||
@ -405,30 +405,30 @@ void CacheItem::Impl::convertToDisplayFormat()
|
||||
string const from = formats.getFormatFromFile(filename);
|
||||
if (from.empty()) {
|
||||
setStatus(ErrorConverting);
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< "\tCould not determine file format." << endl;
|
||||
}
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< "\n\tThe file contains " << from << " format data." << endl;
|
||||
to_ = findTargetFormat(from);
|
||||
|
||||
if (from == to_) {
|
||||
// No conversion needed!
|
||||
lyxerr[Debug::GRAPHICS] << "\tNo conversion needed (from == to)!" << endl;
|
||||
LYXERR(Debug::GRAPHICS) << "\tNo conversion needed (from == to)!" << endl;
|
||||
file_to_load_ = filename;
|
||||
loadImage();
|
||||
return;
|
||||
}
|
||||
|
||||
if (ConverterCache::get().inCache(filename, to_)) {
|
||||
lyxerr[Debug::GRAPHICS] << "\tNo conversion needed (file in file cache)!"
|
||||
LYXERR(Debug::GRAPHICS) << "\tNo conversion needed (file in file cache)!"
|
||||
<< endl;
|
||||
file_to_load_ = ConverterCache::get().cacheName(filename, to_);
|
||||
loadImage();
|
||||
return;
|
||||
}
|
||||
|
||||
lyxerr[Debug::GRAPHICS] << "\tConverting it to " << to_ << " format." << endl;
|
||||
LYXERR(Debug::GRAPHICS) << "\tConverting it to " << to_ << " format." << endl;
|
||||
|
||||
// Add some stuff to create a uniquely named temporary file.
|
||||
// This file is deleted in loadImage after it is loaded into memory.
|
||||
|
@ -137,7 +137,7 @@ Converter::Impl::Impl(FileName const & from_file, string const & to_file_base,
|
||||
string const & from_format, string const & to_format)
|
||||
: valid_process_(false), finished_(false)
|
||||
{
|
||||
lyxerr[Debug::GRAPHICS] << "Converter c-tor:\n"
|
||||
LYXERR(Debug::GRAPHICS) << "Converter c-tor:\n"
|
||||
<< "\tfrom_file: " << from_file
|
||||
<< "\n\tto_file_base: " << to_file_base
|
||||
<< "\n\tfrom_format: " << from_format
|
||||
@ -151,7 +151,7 @@ Converter::Impl::Impl(FileName const & from_file, string const & to_file_base,
|
||||
// The conversion commands are stored in a stringstream
|
||||
ostringstream script;
|
||||
build_script(from_file, to_file_base, from_format, to_format, script);
|
||||
lyxerr[Debug::GRAPHICS] << "\tConversion script:"
|
||||
LYXERR(Debug::GRAPHICS) << "\tConversion script:"
|
||||
<< "\n--------------------------------------\n"
|
||||
<< script.str()
|
||||
<< "\n--------------------------------------\n";
|
||||
@ -277,7 +277,7 @@ static void build_script(FileName const & from_file,
|
||||
ostream & script)
|
||||
{
|
||||
BOOST_ASSERT(from_format != to_format);
|
||||
lyxerr[Debug::GRAPHICS] << "build_script ... ";
|
||||
LYXERR(Debug::GRAPHICS) << "build_script ... ";
|
||||
typedef Converters::EdgePath EdgePath;
|
||||
|
||||
script << "#!/usr/bin/env python\n"
|
||||
@ -354,7 +354,7 @@ static void build_script(FileName const & from_file,
|
||||
<< to_format << ":' + '\"' + outfile + '\"' + '";
|
||||
string const command = os.str();
|
||||
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< "\tNo converter defined! I use convertDefault.py\n\t"
|
||||
<< command << endl;
|
||||
|
||||
@ -396,7 +396,7 @@ static void build_script(FileName const & from_file,
|
||||
|
||||
// Move the final outfile to to_file
|
||||
script << move_file("outfile", quoteName(to_file, quote_python));
|
||||
lyxerr[Debug::GRAPHICS] << "ready!" << endl;
|
||||
LYXERR(Debug::GRAPHICS) << "ready!" << endl;
|
||||
}
|
||||
|
||||
} // namespace graphics
|
||||
|
@ -42,7 +42,7 @@ Image::getScaledDimensions(Params const & params) const
|
||||
height = getHeight();
|
||||
}
|
||||
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< "graphics::Image::getScaledDimensions()"
|
||||
<< "\n\tparams.scale : " << params.scale
|
||||
<< "\n\twidth : " << width
|
||||
|
@ -36,7 +36,7 @@ LoaderQueue & LoaderQueue::get()
|
||||
|
||||
void LoaderQueue::loadNext()
|
||||
{
|
||||
lyxerr[Debug::GRAPHICS] << "LoaderQueue: "
|
||||
LYXERR(Debug::GRAPHICS) << "LoaderQueue: "
|
||||
<< cache_queue_.size()
|
||||
<< " items in the queue" << endl;
|
||||
int counter = s_numimages_;
|
||||
@ -59,7 +59,7 @@ void LoaderQueue::setPriority(int numimages , int millisecs)
|
||||
{
|
||||
s_numimages_ = numimages;
|
||||
s_millisecs_ = millisecs;
|
||||
lyxerr[Debug::GRAPHICS] << "LoaderQueue: priority set to "
|
||||
LYXERR(Debug::GRAPHICS) << "LoaderQueue: priority set to "
|
||||
<< s_numimages_ << " images at a time, "
|
||||
<< s_millisecs_ << " milliseconds between calls"
|
||||
<< endl;
|
||||
@ -75,7 +75,7 @@ LoaderQueue::LoaderQueue() : timer(s_millisecs_, Timeout::ONETIME),
|
||||
|
||||
void LoaderQueue::startLoader()
|
||||
{
|
||||
lyxerr[Debug::GRAPHICS] << "LoaderQueue: waking up" << endl;
|
||||
LYXERR(Debug::GRAPHICS) << "LoaderQueue: waking up" << endl;
|
||||
running_ = true ;
|
||||
timer.setTimeout(s_millisecs_);
|
||||
timer.start();
|
||||
@ -86,7 +86,7 @@ void LoaderQueue::stopLoader()
|
||||
{
|
||||
timer.stop();
|
||||
running_ = false ;
|
||||
lyxerr[Debug::GRAPHICS] << "LoaderQueue: I'm going to sleep" << endl;
|
||||
LYXERR(Debug::GRAPHICS) << "LoaderQueue: I'm going to sleep" << endl;
|
||||
}
|
||||
|
||||
|
||||
|
@ -411,7 +411,7 @@ PreviewLoader::Impl::Impl(PreviewLoader & p, Buffer const & b)
|
||||
font_scaling_factor_ = 0.01 * lyxrc.dpi * lyxrc.zoom *
|
||||
convert<double>(lyxrc.preview_scale_factor);
|
||||
|
||||
lyxerr[Debug::GRAPHICS] << "The font scaling factor is "
|
||||
LYXERR(Debug::GRAPHICS) << "The font scaling factor is "
|
||||
<< font_scaling_factor_ << endl;
|
||||
|
||||
if (!pconverter_)
|
||||
@ -491,7 +491,7 @@ void PreviewLoader::Impl::add(string const & latex_snippet)
|
||||
if (snippet.empty())
|
||||
return;
|
||||
|
||||
lyxerr[Debug::GRAPHICS] << "adding snippet:\n" << snippet << endl;
|
||||
LYXERR(Debug::GRAPHICS) << "adding snippet:\n" << snippet << endl;
|
||||
|
||||
pending_.push_back(snippet);
|
||||
}
|
||||
@ -553,7 +553,7 @@ void PreviewLoader::Impl::startLoading()
|
||||
if (!buffer_.fully_loaded())
|
||||
return;
|
||||
|
||||
lyxerr[Debug::GRAPHICS] << "PreviewLoader::startLoading()" << endl;
|
||||
LYXERR(Debug::GRAPHICS) << "PreviewLoader::startLoading()" << endl;
|
||||
|
||||
// As used by the LaTeX file and by the resulting image files
|
||||
string const directory = buffer_.temppath();
|
||||
@ -575,7 +575,7 @@ void PreviewLoader::Impl::startLoading()
|
||||
// command is missing.
|
||||
odocfstream of(latexfile.toFilesystemEncoding().c_str());
|
||||
if (!of) {
|
||||
lyxerr[Debug::GRAPHICS] << "PreviewLoader::startLoading()\n"
|
||||
LYXERR(Debug::GRAPHICS) << "PreviewLoader::startLoading()\n"
|
||||
<< "Unable to create LaTeX file\n"
|
||||
<< latexfile << endl;
|
||||
return;
|
||||
@ -606,7 +606,7 @@ void PreviewLoader::Impl::startLoading()
|
||||
int ret = call.startscript(command, convert_ptr);
|
||||
|
||||
if (ret != 0) {
|
||||
lyxerr[Debug::GRAPHICS] << "PreviewLoader::startLoading()\n"
|
||||
LYXERR(Debug::GRAPHICS) << "PreviewLoader::startLoading()\n"
|
||||
<< "Unable to start process\n"
|
||||
<< command << endl;
|
||||
return;
|
||||
@ -631,7 +631,7 @@ void PreviewLoader::Impl::finishedGenerating(pid_t pid, int retval)
|
||||
|
||||
string const command = git->second.command;
|
||||
string const status = retval > 0 ? "failed" : "succeeded";
|
||||
lyxerr[Debug::GRAPHICS] << "PreviewLoader::finishedInProgress("
|
||||
LYXERR(Debug::GRAPHICS) << "PreviewLoader::finishedInProgress("
|
||||
<< retval << "): processing " << status
|
||||
<< " for " << command << endl;
|
||||
if (retval > 0)
|
||||
|
@ -260,7 +260,7 @@ void updateExternal(InsetExternalParams const & params,
|
||||
if (from_checksum != temp_checksum) {
|
||||
Mover const & mover = getMover(from_format);
|
||||
if (!mover.copy(params.filename, temp_file)) {
|
||||
lyxerr[Debug::EXTERNAL]
|
||||
LYXERR(Debug::EXTERNAL)
|
||||
<< "external::updateExternal. "
|
||||
<< "Unable to copy "
|
||||
<< params.filename << " to " << temp_file << endl;
|
||||
@ -321,7 +321,7 @@ void updateExternal(InsetExternalParams const & params,
|
||||
Converters::try_default | Converters::try_cache);
|
||||
|
||||
if (!success)
|
||||
lyxerr[Debug::EXTERNAL]
|
||||
LYXERR(Debug::EXTERNAL)
|
||||
<< "external::updateExternal. "
|
||||
<< "Unable to convert from "
|
||||
<< from_format << " to " << to_format << endl;
|
||||
@ -353,7 +353,7 @@ int writeExternal(InsetExternalParams const & params,
|
||||
|
||||
Template::Formats::const_iterator cit = et.formats.find(format);
|
||||
if (cit == et.formats.end()) {
|
||||
lyxerr[Debug::EXTERNAL]
|
||||
LYXERR(Debug::EXTERNAL)
|
||||
<< "External template format '" << format
|
||||
<< "' not specified in template "
|
||||
<< params.templatename() << endl;
|
||||
|
@ -174,14 +174,14 @@ bool InsetBase::getStatus(LCursor &, FuncRequest const & cmd,
|
||||
|
||||
void InsetBase::edit(LCursor &, bool)
|
||||
{
|
||||
lyxerr[Debug::INSETS] << BOOST_CURRENT_FUNCTION
|
||||
LYXERR(Debug::INSETS) << BOOST_CURRENT_FUNCTION
|
||||
<< ": edit left/right" << std::endl;
|
||||
}
|
||||
|
||||
|
||||
InsetBase * InsetBase::editXY(LCursor &, int x, int y)
|
||||
{
|
||||
lyxerr[Debug::INSETS] << BOOST_CURRENT_FUNCTION
|
||||
LYXERR(Debug::INSETS) << BOOST_CURRENT_FUNCTION
|
||||
<< ": x=" << x << " y= " << y
|
||||
<< std::endl;
|
||||
return this;
|
||||
|
@ -316,7 +316,7 @@ vector<FileName> const InsetBibtex::getFiles(Buffer const & buffer) const
|
||||
bibfiles = split(bibfiles, tmp, ',');
|
||||
while (!tmp.empty()) {
|
||||
FileName const file = findtexfile(changeExtension(tmp, "bib"), "bib");
|
||||
lyxerr[Debug::LATEX] << "Bibfile: " << file << endl;
|
||||
LYXERR(Debug::LATEX) << "Bibfile: " << file << endl;
|
||||
|
||||
// If we didn't find a matching file name just fail silently
|
||||
if (!file.empty())
|
||||
|
@ -90,7 +90,7 @@ docstring const getNatbibLabel(Buffer const & buffer,
|
||||
changed = true;
|
||||
lyxerr << "Couldn't find or read bibtex file "
|
||||
<< f << endl;
|
||||
lyxerr[Debug::DEBUG] << "Fs error: "
|
||||
LYXERR(Debug::DEBUG) << "Fs error: "
|
||||
<< fserr.what() << endl;
|
||||
}
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ void InsetFloatList::read(Buffer const & buf, LyXLex & lex)
|
||||
|
||||
if (lex.eatLine()) {
|
||||
setParam("type", lex.getDocString());
|
||||
lyxerr[Debug::INSETS] << "FloatList::float_type: "
|
||||
LYXERR(Debug::INSETS) << "FloatList::float_type: "
|
||||
<< to_ascii(getParam("type")) << endl;
|
||||
if (!floats.typeExist(to_ascii(getParam("type"))))
|
||||
lex.printError("InsetFloatList: Unknown float type: `$$Token'");
|
||||
|
@ -123,7 +123,7 @@ string findTargetFormat(string const & format, OutputParams const & runparams)
|
||||
{
|
||||
// Are we using latex or pdflatex?
|
||||
if (runparams.flavor == OutputParams::PDFLATEX) {
|
||||
lyxerr[Debug::GRAPHICS] << "findTargetFormat: PDF mode" << endl;
|
||||
LYXERR(Debug::GRAPHICS) << "findTargetFormat: PDF mode" << endl;
|
||||
Format const * const f = formats.getFormat(format);
|
||||
// Convert vector graphics to pdf
|
||||
if (f && f->vectorFormat())
|
||||
@ -135,7 +135,7 @@ string findTargetFormat(string const & format, OutputParams const & runparams)
|
||||
return "png";
|
||||
}
|
||||
// If it's postscript, we always do eps.
|
||||
lyxerr[Debug::GRAPHICS] << "findTargetFormat: PostScript mode" << endl;
|
||||
LYXERR(Debug::GRAPHICS) << "findTargetFormat: PostScript mode" << endl;
|
||||
if (format != "ps")
|
||||
// any other than ps is changed to eps
|
||||
return "eps";
|
||||
@ -269,7 +269,7 @@ void InsetGraphics::read(Buffer const & buf, LyXLex & lex)
|
||||
if (token == "Graphics")
|
||||
readInsetGraphics(lex, buf.filePath());
|
||||
else
|
||||
lyxerr[Debug::GRAPHICS] << "Not a Graphics inset!" << endl;
|
||||
LYXERR(Debug::GRAPHICS) << "Not a Graphics inset!" << endl;
|
||||
|
||||
graphic_->update(params().as_grfxParams());
|
||||
}
|
||||
@ -283,7 +283,7 @@ void InsetGraphics::readInsetGraphics(LyXLex & lex, string const & bufpath)
|
||||
lex.next();
|
||||
|
||||
string const token = lex.getString();
|
||||
lyxerr[Debug::GRAPHICS] << "Token: '" << token << '\''
|
||||
LYXERR(Debug::GRAPHICS) << "Token: '" << token << '\''
|
||||
<< endl;
|
||||
|
||||
if (token.empty()) {
|
||||
@ -468,7 +468,7 @@ copyFileIfNeeded(FileName const & file_in, FileName const & file_out)
|
||||
bool const success = mover.copy(file_in, file_out);
|
||||
if (!success) {
|
||||
// FIXME UNICODE
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< to_utf8(support::bformat(_("Could not copy the file\n%1$s\n"
|
||||
"into the temporary directory."),
|
||||
from_utf8(file_in.absFilename())))
|
||||
@ -609,7 +609,7 @@ string const InsetGraphics::prepareFile(Buffer const & buf,
|
||||
// this file, but we can't check, because that would
|
||||
// mean to unzip the file and thereby making the
|
||||
// noUnzip parameter meaningless.
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< "\tpass zipped file to LaTeX.\n";
|
||||
|
||||
FileName const bb_orig_file = FileName(changeExtension(orig_file, "bb"));
|
||||
@ -646,32 +646,32 @@ string const InsetGraphics::prepareFile(Buffer const & buf,
|
||||
// temp_file has been unzipped already and
|
||||
// orig_file has not changed in the meantime.
|
||||
temp_file = unzipped_temp_file;
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< "\twas already unzipped to " << temp_file
|
||||
<< endl;
|
||||
} else {
|
||||
// unzipped_temp_file does not exist or is too old
|
||||
temp_file = unzipFile(temp_file);
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< "\tunzipped to " << temp_file << endl;
|
||||
}
|
||||
}
|
||||
|
||||
string const from = formats.getFormatFromFile(temp_file);
|
||||
if (from.empty()) {
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< "\tCould not get file format." << endl;
|
||||
}
|
||||
string const to = findTargetFormat(from, runparams);
|
||||
string const ext = formats.extension(to);
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< "\t we have: from " << from << " to " << to << '\n';
|
||||
|
||||
// We're going to be running the exported buffer through the LaTeX
|
||||
// compiler, so must ensure that LaTeX can cope with the graphics
|
||||
// file format.
|
||||
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< "\tthe orig file is: " << orig_file << endl;
|
||||
|
||||
if (from == to) {
|
||||
@ -685,7 +685,7 @@ string const InsetGraphics::prepareFile(Buffer const & buf,
|
||||
output_file = changeExtension(output_file, ext);
|
||||
source_file = FileName(changeExtension(source_file.absFilename(), ext));
|
||||
} else
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< "Could not rename file `"
|
||||
<< temp_file << "' to `" << new_file
|
||||
<< "'." << endl;
|
||||
@ -705,7 +705,7 @@ string const InsetGraphics::prepareFile(Buffer const & buf,
|
||||
// Yes if to_file does not exist or if temp_file is newer than to_file
|
||||
if (compare_timestamps(temp_file, to_file) < 0) {
|
||||
// FIXME UNICODE
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< to_utf8(bformat(_("No conversion of %1$s is needed after all"),
|
||||
from_utf8(rel_file)))
|
||||
<< std::endl;
|
||||
@ -716,7 +716,7 @@ string const InsetGraphics::prepareFile(Buffer const & buf,
|
||||
return stripExtensionIfPossible(output_to_file, runparams.nice);
|
||||
}
|
||||
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< "\tThe original file is " << orig_file << "\n"
|
||||
<< "\tA copy has been made and convert is to be called with:\n"
|
||||
<< "\tfile to convert = " << temp_file << '\n'
|
||||
@ -742,7 +742,7 @@ int InsetGraphics::latex(Buffer const & buf, odocstream & os,
|
||||
{
|
||||
// If there is no file specified or not existing,
|
||||
// just output a message about it in the latex output.
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< "insetgraphics::latex: Filename = "
|
||||
<< params().filename.absFilename() << endl;
|
||||
|
||||
@ -757,7 +757,7 @@ int InsetGraphics::latex(Buffer const & buf, odocstream & os,
|
||||
// "filename" found. In this case LaTeX
|
||||
// draws only a rectangle with the above bb and the
|
||||
// not found filename in it.
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< "\tMessage = \"" << message << '\"' << endl;
|
||||
|
||||
// These variables collect all the latex code that should be before and
|
||||
@ -780,14 +780,14 @@ int InsetGraphics::latex(Buffer const & buf, odocstream & os,
|
||||
|
||||
// Write the options if there are any.
|
||||
string const opts = createLatexOptions();
|
||||
lyxerr[Debug::GRAPHICS] << "\tOpts = " << opts << endl;
|
||||
LYXERR(Debug::GRAPHICS) << "\tOpts = " << opts << endl;
|
||||
|
||||
if (!opts.empty() && !message.empty())
|
||||
before += ('[' + opts + ',' + message + ']');
|
||||
else if (!opts.empty() || !message.empty())
|
||||
before += ('[' + opts + message + ']');
|
||||
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< "\tBefore = " << before
|
||||
<< "\n\tafter = " << after << endl;
|
||||
|
||||
@ -800,7 +800,7 @@ int InsetGraphics::latex(Buffer const & buf, odocstream & os,
|
||||
// FIXME UNICODE
|
||||
os << from_utf8(latex_str);
|
||||
|
||||
lyxerr[Debug::GRAPHICS] << "InsetGraphics::latex outputting:\n"
|
||||
LYXERR(Debug::GRAPHICS) << "InsetGraphics::latex outputting:\n"
|
||||
<< latex_str << endl;
|
||||
// Return how many newlines we issued.
|
||||
return int(lyx::count(latex_str.begin(), latex_str.end(),'\n'));
|
||||
|
@ -275,7 +275,7 @@ graphics::Params InsetGraphicsParams::as_grfxParams() const
|
||||
|
||||
// Get the original Bounding Box from the file
|
||||
string const tmp = readBB_from_PSFile(filename);
|
||||
lyxerr[Debug::GRAPHICS] << "BB_from_File: " << tmp << std::endl;
|
||||
LYXERR(Debug::GRAPHICS) << "BB_from_File: " << tmp << std::endl;
|
||||
if (!tmp.empty()) {
|
||||
#ifdef WITH_WARNINGS
|
||||
# warning why not convert to unsigned int? (Lgb)
|
||||
|
@ -396,9 +396,9 @@ int InsetInclude::latex(Buffer const & buffer, odocstream & os,
|
||||
|
||||
if (!runparams.nice)
|
||||
incfile = mangled;
|
||||
lyxerr[Debug::LATEX] << "incfile:" << incfile << endl;
|
||||
lyxerr[Debug::LATEX] << "exportfile:" << exportfile << endl;
|
||||
lyxerr[Debug::LATEX] << "writefile:" << writefile << endl;
|
||||
LYXERR(Debug::LATEX) << "incfile:" << incfile << endl;
|
||||
LYXERR(Debug::LATEX) << "exportfile:" << exportfile << endl;
|
||||
LYXERR(Debug::LATEX) << "writefile:" << writefile << endl;
|
||||
|
||||
if (runparams.inComment || runparams.dryrun)
|
||||
// Don't try to load or copy the file
|
||||
@ -444,7 +444,7 @@ int InsetInclude::latex(Buffer const & buffer, odocstream & os,
|
||||
if (checksum_in != checksum_out) {
|
||||
if (!copy(included_file, writefile)) {
|
||||
// FIXME UNICODE
|
||||
lyxerr[Debug::LATEX]
|
||||
LYXERR(Debug::LATEX)
|
||||
<< to_utf8(bformat(_("Could not copy the file\n%1$s\n"
|
||||
"into the temporary directory."),
|
||||
from_utf8(included_file.absFilename())))
|
||||
@ -538,9 +538,9 @@ int InsetInclude::docbook(Buffer const & buffer, odocstream & os,
|
||||
if (!runparams.nice)
|
||||
incfile = mangled;
|
||||
|
||||
lyxerr[Debug::LATEX] << "incfile:" << incfile << endl;
|
||||
lyxerr[Debug::LATEX] << "exportfile:" << exportfile << endl;
|
||||
lyxerr[Debug::LATEX] << "writefile:" << writefile << endl;
|
||||
LYXERR(Debug::LATEX) << "incfile:" << incfile << endl;
|
||||
LYXERR(Debug::LATEX) << "exportfile:" << exportfile << endl;
|
||||
LYXERR(Debug::LATEX) << "writefile:" << writefile << endl;
|
||||
|
||||
tmp->makeDocBookFile(writefile, runparams, true);
|
||||
}
|
||||
|
@ -481,7 +481,7 @@ void InsetTabular::edit(LCursor & cur, bool left)
|
||||
|
||||
void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd)
|
||||
{
|
||||
lyxerr[Debug::DEBUG] << "# InsetTabular::doDispatch: cmd: " << cmd
|
||||
LYXERR(Debug::DEBUG) << "# InsetTabular::doDispatch: cmd: " << cmd
|
||||
<< "\n cur:" << cur << endl;
|
||||
CursorSlice sl = cur.top();
|
||||
LCursor & bvcur = cur.bv().cursor();
|
||||
|
@ -254,7 +254,7 @@ InsetBase * InsetText::editXY(LCursor & cur, int x, int y)
|
||||
|
||||
void InsetText::doDispatch(LCursor & cur, FuncRequest & cmd)
|
||||
{
|
||||
lyxerr[Debug::ACTION] << BOOST_CURRENT_FUNCTION
|
||||
LYXERR(Debug::ACTION) << BOOST_CURRENT_FUNCTION
|
||||
<< " [ cmd.action = "
|
||||
<< cmd.action << ']' << endl;
|
||||
text_.dispatch(cur, cmd);
|
||||
|
@ -78,7 +78,7 @@ void Intl::keyMapSec()
|
||||
|
||||
void Intl::initKeyMapper(bool on)
|
||||
{
|
||||
lyxerr[Debug::INIT] << "Initializing key mappings..." << endl;
|
||||
LYXERR(Debug::INIT) << "Initializing key mappings..." << endl;
|
||||
|
||||
if (trans.setPrimary(prim_lang) == -1)
|
||||
prim_lang.erase();
|
||||
|
@ -221,7 +221,7 @@ docstring const from_iconv_encoding(string const & s, string const & encoding)
|
||||
ISpell::ISpell(BufferParams const & params, string const & lang)
|
||||
: in(0), out(0), inerr(0), str(0)
|
||||
{
|
||||
lyxerr[Debug::GUI] << "Created ispell" << endl;
|
||||
LYXERR(Debug::GUI) << "Created ispell" << endl;
|
||||
|
||||
encoding = params.encoding().iconvName();
|
||||
|
||||
@ -315,7 +315,7 @@ ISpell::ISpell(BufferParams const & params, string const & lang)
|
||||
|
||||
ISpell::~ISpell()
|
||||
{
|
||||
lyxerr[Debug::GUI] << "Killing ispell" << endl;
|
||||
LYXERR(Debug::GUI) << "Killing ispell" << endl;
|
||||
|
||||
if (in)
|
||||
fclose(in);
|
||||
|
@ -69,7 +69,7 @@ string::size_type kb_keymap::bind(string const & seq, FuncRequest const & func)
|
||||
if (res == string::npos) {
|
||||
defkey(&k, func);
|
||||
} else {
|
||||
lyxerr[Debug::KBMAP] << "Parse error at position " << res
|
||||
LYXERR(Debug::KBMAP) << "Parse error at position " << res
|
||||
<< " in key sequence '" << seq << "'."
|
||||
<< endl;
|
||||
}
|
||||
@ -109,7 +109,7 @@ bool kb_keymap::read(string const & bind_file)
|
||||
return false;
|
||||
}
|
||||
|
||||
lyxerr[Debug::KBMAP] << "Reading bind file:" << tmp << endl;
|
||||
LYXERR(Debug::KBMAP) << "Reading bind file:" << tmp << endl;
|
||||
|
||||
bool error = false;
|
||||
while (lexrc.isOK()) {
|
||||
@ -244,7 +244,7 @@ void kb_keymap::defkey(kb_sequence * seq,
|
||||
&& mod2 == it->mod.second) {
|
||||
// overwrite binding
|
||||
if (r + 1 == seq->length()) {
|
||||
lyxerr[Debug::KBMAP]
|
||||
LYXERR(Debug::KBMAP)
|
||||
<< "Warning: New binding for '"
|
||||
<< to_utf8(seq->print(false))
|
||||
<< "' is overriding old binding..."
|
||||
|
@ -59,7 +59,7 @@ void Languages::read(support::FileName const & filename)
|
||||
lang = lex.getString();
|
||||
else
|
||||
break;
|
||||
lyxerr[Debug::INFO] << "Reading language " << lang << endl;
|
||||
LYXERR(Debug::INFO) << "Reading language " << lang << endl;
|
||||
|
||||
if (lex.next())
|
||||
babel = lex.getString();
|
||||
|
@ -310,7 +310,7 @@ void newFile(BufferView * bv, string const & filename)
|
||||
// Split argument by :
|
||||
string name;
|
||||
string tmpname = split(filename, name, ':');
|
||||
lyxerr[Debug::INFO] << "Arg is " << filename
|
||||
LYXERR(Debug::INFO) << "Arg is " << filename
|
||||
<< "\nName is " << name
|
||||
<< "\nTemplate is " << tmpname << endl;
|
||||
|
||||
|
@ -481,7 +481,7 @@ void LyX::prepareExit()
|
||||
|
||||
// do any other cleanup procedures now
|
||||
if (package().temp_dir() != package().system_temp_dir()) {
|
||||
lyxerr[Debug::INFO] << "Deleting tmp dir "
|
||||
LYXERR(Debug::INFO) << "Deleting tmp dir "
|
||||
<< package().temp_dir() << endl;
|
||||
|
||||
if (!destroyDir(FileName(package().temp_dir()))) {
|
||||
@ -531,9 +531,9 @@ int LyX::init(int & argc, char * argv[])
|
||||
}
|
||||
|
||||
// Initialization of LyX (reads lyxrc and more)
|
||||
lyxerr[Debug::INIT] << "Initializing LyX::init..." << endl;
|
||||
LYXERR(Debug::INIT) << "Initializing LyX::init..." << endl;
|
||||
bool success = init();
|
||||
lyxerr[Debug::INIT] << "Initializing LyX::init...done" << endl;
|
||||
LYXERR(Debug::INIT) << "Initializing LyX::init...done" << endl;
|
||||
if (!success)
|
||||
return EXIT_FAILURE;
|
||||
|
||||
@ -585,7 +585,7 @@ void LyX::execBatchCommands()
|
||||
if (batch_command.empty())
|
||||
return;
|
||||
|
||||
lyxerr[Debug::INIT] << "About to handle -x '"
|
||||
LYXERR(Debug::INIT) << "About to handle -x '"
|
||||
<< batch_command << '\'' << endl;
|
||||
|
||||
pimpl_->lyxfunc_.dispatch(lyxaction.lookupFunc(batch_command));
|
||||
@ -876,7 +876,7 @@ bool LyX::init()
|
||||
return false;
|
||||
|
||||
// Load the layouts
|
||||
lyxerr[Debug::INIT] << "Reading layouts..." << endl;
|
||||
LYXERR(Debug::INIT) << "Reading layouts..." << endl;
|
||||
if (!LyXSetStyle())
|
||||
return false;
|
||||
|
||||
@ -927,7 +927,7 @@ bool LyX::init()
|
||||
lyxerr << "LyX tmp dir: `" << package().temp_dir() << '\'' << endl;
|
||||
}
|
||||
|
||||
lyxerr[Debug::INIT] << "Reading session information '.lyx/session'..." << endl;
|
||||
LYXERR(Debug::INIT) << "Reading session information '.lyx/session'..." << endl;
|
||||
pimpl_->session_.reset(new Session(lyxrc.num_lastfiles));
|
||||
|
||||
// This must happen after package initialization and after lyxrc is
|
||||
@ -1107,19 +1107,19 @@ bool LyX::queryUserLyXDir(bool explicit_userdir)
|
||||
|
||||
bool LyX::readRcFile(string const & name)
|
||||
{
|
||||
lyxerr[Debug::INIT] << "About to read " << name << "... ";
|
||||
LYXERR(Debug::INIT) << "About to read " << name << "... ";
|
||||
|
||||
FileName const lyxrc_path = libFileSearch(string(), name);
|
||||
if (!lyxrc_path.empty()) {
|
||||
|
||||
lyxerr[Debug::INIT] << "Found in " << lyxrc_path << endl;
|
||||
LYXERR(Debug::INIT) << "Found in " << lyxrc_path << endl;
|
||||
|
||||
if (lyxrc.read(lyxrc_path) < 0) {
|
||||
showFileError(name);
|
||||
return false;
|
||||
}
|
||||
} else
|
||||
lyxerr[Debug::INIT] << "Not found." << lyxrc_path << endl;
|
||||
LYXERR(Debug::INIT) << "Not found." << lyxrc_path << endl;
|
||||
return true;
|
||||
|
||||
}
|
||||
@ -1149,14 +1149,14 @@ bool LyX::readUIFile(string const & name, bool include)
|
||||
std::list<string>::const_iterator end = uifiles.end();
|
||||
it = std::find(it, end, name);
|
||||
if (it != end) {
|
||||
lyxerr[Debug::INIT] << "UI file '" << name
|
||||
LYXERR(Debug::INIT) << "UI file '" << name
|
||||
<< "' has been read already. "
|
||||
<< "Is this an include loop?"
|
||||
<< endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
lyxerr[Debug::INIT] << "About to read " << name << "..." << endl;
|
||||
LYXERR(Debug::INIT) << "About to read " << name << "..." << endl;
|
||||
|
||||
|
||||
FileName ui_path;
|
||||
@ -1170,14 +1170,14 @@ bool LyX::readUIFile(string const & name, bool include)
|
||||
ui_path = libFileSearch("ui", name, "ui");
|
||||
|
||||
if (ui_path.empty()) {
|
||||
lyxerr[Debug::INIT] << "Could not find " << name << endl;
|
||||
LYXERR(Debug::INIT) << "Could not find " << name << endl;
|
||||
showFileError(name);
|
||||
return false;
|
||||
}
|
||||
|
||||
uifiles.push_back(name);
|
||||
|
||||
lyxerr[Debug::INIT] << "Found " << name
|
||||
LYXERR(Debug::INIT) << "Found " << name
|
||||
<< " in " << ui_path << endl;
|
||||
LyXLex lex(uitags, ui_last - 1);
|
||||
lex.setFile(ui_path);
|
||||
@ -1224,7 +1224,7 @@ bool LyX::readUIFile(string const & name, bool include)
|
||||
// Read the languages file `name'
|
||||
bool LyX::readLanguagesFile(string const & name)
|
||||
{
|
||||
lyxerr[Debug::INIT] << "About to read " << name << "..." << endl;
|
||||
LYXERR(Debug::INIT) << "About to read " << name << "..." << endl;
|
||||
|
||||
FileName const lang_path = libFileSearch(string(), name);
|
||||
if (lang_path.empty()) {
|
||||
@ -1240,7 +1240,7 @@ bool LyX::readLanguagesFile(string const & name)
|
||||
bool LyX::readEncodingsFile(string const & enc_name,
|
||||
string const & symbols_name)
|
||||
{
|
||||
lyxerr[Debug::INIT] << "About to read " << enc_name << " and "
|
||||
LYXERR(Debug::INIT) << "About to read " << enc_name << " and "
|
||||
<< symbols_name << "..." << endl;
|
||||
|
||||
FileName const symbols_path = libFileSearch(string(), symbols_name);
|
||||
|
@ -276,17 +276,17 @@ void LyXFunc::gotoBookmark(unsigned int idx, bool openFile, bool switchToBuffer)
|
||||
|
||||
void LyXFunc::processKeySym(LyXKeySymPtr keysym, key_modifier::state state)
|
||||
{
|
||||
lyxerr[Debug::KEY] << "KeySym is " << keysym->getSymbolName() << endl;
|
||||
LYXERR(Debug::KEY) << "KeySym is " << keysym->getSymbolName() << endl;
|
||||
|
||||
// Do nothing if we have nothing (JMarc)
|
||||
if (!keysym->isOK()) {
|
||||
lyxerr[Debug::KEY] << "Empty kbd action (probably composing)"
|
||||
LYXERR(Debug::KEY) << "Empty kbd action (probably composing)"
|
||||
<< endl;
|
||||
return;
|
||||
}
|
||||
|
||||
if (keysym->isModifier()) {
|
||||
lyxerr[Debug::KEY] << "isModifier true" << endl;
|
||||
LYXERR(Debug::KEY) << "isModifier true" << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -301,7 +301,7 @@ void LyXFunc::processKeySym(LyXKeySymPtr keysym, key_modifier::state state)
|
||||
cancel_meta_seq->reset();
|
||||
|
||||
FuncRequest func = cancel_meta_seq->addkey(keysym, state);
|
||||
lyxerr[Debug::KEY] << BOOST_CURRENT_FUNCTION
|
||||
LYXERR(Debug::KEY) << BOOST_CURRENT_FUNCTION
|
||||
<< " action first set to [" << func.action << ']'
|
||||
<< endl;
|
||||
|
||||
@ -311,7 +311,7 @@ void LyXFunc::processKeySym(LyXKeySymPtr keysym, key_modifier::state state)
|
||||
if ((func.action != LFUN_CANCEL) && (func.action != LFUN_META_PREFIX)) {
|
||||
// remove Caps Lock and Mod2 as a modifiers
|
||||
func = keyseq->addkey(keysym, (state | meta_fake_bit));
|
||||
lyxerr[Debug::KEY] << BOOST_CURRENT_FUNCTION
|
||||
LYXERR(Debug::KEY) << BOOST_CURRENT_FUNCTION
|
||||
<< "action now set to ["
|
||||
<< func.action << ']' << endl;
|
||||
}
|
||||
@ -345,9 +345,9 @@ void LyXFunc::processKeySym(LyXKeySymPtr keysym, key_modifier::state state)
|
||||
// Let's see. But only if shift is the only modifier
|
||||
if (func.action == LFUN_UNKNOWN_ACTION &&
|
||||
state == key_modifier::shift) {
|
||||
lyxerr[Debug::KEY] << "Trying without shift" << endl;
|
||||
LYXERR(Debug::KEY) << "Trying without shift" << endl;
|
||||
func = keyseq->addkey(keysym, key_modifier::none);
|
||||
lyxerr[Debug::KEY] << "Action now " << func.action << endl;
|
||||
LYXERR(Debug::KEY) << "Action now " << func.action << endl;
|
||||
}
|
||||
|
||||
if (func.action == LFUN_UNKNOWN_ACTION) {
|
||||
@ -355,11 +355,11 @@ void LyXFunc::processKeySym(LyXKeySymPtr keysym, key_modifier::state state)
|
||||
// if it's normal insertable text not already covered
|
||||
// by a binding
|
||||
if (keysym->isText() && keyseq->length() == 1) {
|
||||
lyxerr[Debug::KEY] << "isText() is true, inserting." << endl;
|
||||
LYXERR(Debug::KEY) << "isText() is true, inserting." << endl;
|
||||
func = FuncRequest(LFUN_SELF_INSERT,
|
||||
FuncRequest::KEYBOARD);
|
||||
} else {
|
||||
lyxerr[Debug::KEY] << "Unknown, !isText() - giving up" << endl;
|
||||
LYXERR(Debug::KEY) << "Unknown, !isText() - giving up" << endl;
|
||||
lyx_view_->message(_("Unknown function."));
|
||||
return;
|
||||
}
|
||||
@ -370,7 +370,7 @@ void LyXFunc::processKeySym(LyXKeySymPtr keysym, key_modifier::state state)
|
||||
docstring const arg(1, encoded_last_key);
|
||||
dispatch(FuncRequest(LFUN_SELF_INSERT, arg,
|
||||
FuncRequest::KEYBOARD));
|
||||
lyxerr[Debug::KEY]
|
||||
LYXERR(Debug::KEY)
|
||||
<< "SelfInsert arg[`" << to_utf8(arg) << "']" << endl;
|
||||
}
|
||||
} else {
|
||||
@ -779,7 +779,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
string const argument = to_utf8(cmd.argument());
|
||||
kb_action const action = cmd.action;
|
||||
|
||||
lyxerr[Debug::ACTION] << endl << "LyXFunc::dispatch: cmd: " << cmd << endl;
|
||||
LYXERR(Debug::ACTION) << endl << "LyXFunc::dispatch: cmd: " << cmd << endl;
|
||||
//lyxerr << "LyXFunc::dispatch: cmd: " << cmd << endl;
|
||||
|
||||
// we have not done anything wrong yet.
|
||||
@ -793,7 +793,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
FuncStatus const flag = getStatus(cmd);
|
||||
if (!flag.enabled()) {
|
||||
// We cannot use this function here
|
||||
lyxerr[Debug::ACTION] << "LyXFunc::dispatch: "
|
||||
LYXERR(Debug::ACTION) << "LyXFunc::dispatch: "
|
||||
<< lyxaction.getActionName(action)
|
||||
<< " [" << action << "] is disabled at this location"
|
||||
<< endl;
|
||||
@ -1213,7 +1213,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
case LFUN_SERVER_GET_NAME:
|
||||
BOOST_ASSERT(lyx_view_ && lyx_view_->buffer());
|
||||
setMessage(from_utf8(lyx_view_->buffer()->fileName()));
|
||||
lyxerr[Debug::INFO] << "FNAME["
|
||||
LYXERR(Debug::INFO) << "FNAME["
|
||||
<< lyx_view_->buffer()->fileName()
|
||||
<< "] " << endl;
|
||||
break;
|
||||
@ -1791,7 +1791,7 @@ void LyXFunc::sendDispatchMessage(docstring const & msg, FuncRequest const & cmd
|
||||
|| cmd.origin == FuncRequest::COMMANDBUFFER);
|
||||
|
||||
if (cmd.action == LFUN_SELF_INSERT || !verbose) {
|
||||
lyxerr[Debug::ACTION] << "dispatch msg is " << to_utf8(msg) << endl;
|
||||
LYXERR(Debug::ACTION) << "dispatch msg is " << to_utf8(msg) << endl;
|
||||
if (!msg.empty())
|
||||
lyx_view_->message(msg);
|
||||
return;
|
||||
@ -1824,7 +1824,7 @@ void LyXFunc::sendDispatchMessage(docstring const & msg, FuncRequest const & cmd
|
||||
dispatch_msg += '(' + rtrim(comname) + ')';
|
||||
}
|
||||
|
||||
lyxerr[Debug::ACTION] << "verbose dispatch msg "
|
||||
LYXERR(Debug::ACTION) << "verbose dispatch msg "
|
||||
<< to_utf8(dispatch_msg) << endl;
|
||||
if (!dispatch_msg.empty())
|
||||
lyx_view_->message(dispatch_msg);
|
||||
@ -1956,7 +1956,7 @@ void LyXFunc::doImport(string const & argument)
|
||||
string format;
|
||||
string filename = split(argument, format, ' ');
|
||||
|
||||
lyxerr[Debug::INFO] << "LyXFunc::doImport: " << format
|
||||
LYXERR(Debug::INFO) << "LyXFunc::doImport: " << format
|
||||
<< " file: " << filename << endl;
|
||||
|
||||
// need user interaction
|
||||
|
@ -197,7 +197,7 @@ string const LyXLex::getLongString(string const & endtoken)
|
||||
|
||||
string const token = trim(getString(), " \t");
|
||||
|
||||
lyxerr[Debug::PARSER] << "LongString: `"
|
||||
LYXERR(Debug::PARSER) << "LongString: `"
|
||||
<< getString() << '\'' << endl;
|
||||
|
||||
// We do a case independent comparison, like search_kw does.
|
||||
@ -210,7 +210,7 @@ string const LyXLex::getLongString(string const & endtoken)
|
||||
if (i != string::npos)
|
||||
prefix = tmpstr.substr(0, i);
|
||||
firstline = false;
|
||||
lyxerr[Debug::PARSER]
|
||||
LYXERR(Debug::PARSER)
|
||||
<< "Prefix = `" << prefix << "\'" << endl;
|
||||
}
|
||||
|
||||
|
@ -150,13 +150,13 @@ bool LyXLex::Pimpl::setFile(FileName const & filename)
|
||||
string const format = getFormatFromContents(filename);
|
||||
|
||||
if (format == "gzip" || format == "zip" || format == "compress") {
|
||||
lyxerr[Debug::LYXLEX] << "lyxlex: compressed" << endl;
|
||||
LYXERR(Debug::LYXLEX) << "lyxlex: compressed" << endl;
|
||||
|
||||
// The check only outputs a debug message, because it triggers
|
||||
// a bug in compaq cxx 6.2, where is_open() returns 'true' for
|
||||
// a fresh new filebuf. (JMarc)
|
||||
if (!gz_.empty() || istream::off_type(is.tellg()) > -1)
|
||||
lyxerr[Debug::LYXLEX] << "Error in LyXLex::setFile: "
|
||||
LYXERR(Debug::LYXLEX) << "Error in LyXLex::setFile: "
|
||||
"file or stream already set." << endl;
|
||||
gz_.push(io::gzip_decompressor());
|
||||
gz_.push(io::file_source(filename.toFilesystemEncoding()));
|
||||
@ -165,13 +165,13 @@ bool LyXLex::Pimpl::setFile(FileName const & filename)
|
||||
lineno = 0;
|
||||
return gz_.component<io::file_source>(1)->is_open() && is.good();
|
||||
} else {
|
||||
lyxerr[Debug::LYXLEX] << "lyxlex: UNcompressed" << endl;
|
||||
LYXERR(Debug::LYXLEX) << "lyxlex: UNcompressed" << endl;
|
||||
|
||||
// The check only outputs a debug message, because it triggers
|
||||
// a bug in compaq cxx 6.2, where is_open() returns 'true' for
|
||||
// a fresh new filebuf. (JMarc)
|
||||
if (fb_.is_open() || istream::off_type(is.tellg()) > 0)
|
||||
lyxerr[Debug::LYXLEX] << "Error in LyXLex::setFile: "
|
||||
LYXERR(Debug::LYXLEX) << "Error in LyXLex::setFile: "
|
||||
"file or stream already set." << endl;
|
||||
fb_.open(filename.toFilesystemEncoding().c_str(), ios::in);
|
||||
is.rdbuf(&fb_);
|
||||
@ -185,7 +185,7 @@ bool LyXLex::Pimpl::setFile(FileName const & filename)
|
||||
void LyXLex::Pimpl::setStream(istream & i)
|
||||
{
|
||||
if (fb_.is_open() || istream::off_type(is.tellg()) > 0)
|
||||
lyxerr[Debug::LYXLEX] << "Error in LyXLex::setStream: "
|
||||
LYXERR(Debug::LYXLEX) << "Error in LyXLex::setStream: "
|
||||
"file or stream already set." << endl;
|
||||
is.rdbuf(i.rdbuf());
|
||||
lineno = 0;
|
||||
@ -228,7 +228,7 @@ bool LyXLex::Pimpl::next(bool esc /* = false */)
|
||||
string dummy;
|
||||
getline(is, dummy);
|
||||
|
||||
lyxerr[Debug::LYXLEX] << "Comment read: `" << c
|
||||
LYXERR(Debug::LYXLEX) << "Comment read: `" << c
|
||||
<< dummy << '\'' << endl;
|
||||
#else
|
||||
// unfortunately ignore is buggy (Lgb)
|
||||
@ -316,7 +316,7 @@ bool LyXLex::Pimpl::next(bool esc /* = false */)
|
||||
string dummy;
|
||||
getline(is, dummy);
|
||||
|
||||
lyxerr[Debug::LYXLEX] << "Comment read: `" << c
|
||||
LYXERR(Debug::LYXLEX) << "Comment read: `" << c
|
||||
<< dummy << '\'' << endl;
|
||||
#else
|
||||
// but ignore is also still buggy (Lgb)
|
||||
@ -428,7 +428,7 @@ bool LyXLex::Pimpl::eatLine()
|
||||
while (is && c != '\n') {
|
||||
is.get(cc);
|
||||
c = cc;
|
||||
//lyxerr[Debug::LYXLEX] << "LyXLex::EatLine read char: `"
|
||||
//LYXERR(Debug::LYXLEX) << "LyXLex::EatLine read char: `"
|
||||
// << c << '\'' << endl;
|
||||
if (c != '\r')
|
||||
buff.push_back(c);
|
||||
|
@ -310,7 +310,7 @@ int LyXRC::read(FileName const & filename)
|
||||
lexrc.setFile(filename);
|
||||
if (!lexrc.isOK()) return -2;
|
||||
|
||||
lyxerr[Debug::LYXRC] << "Reading '" << filename << "'..." << endl;
|
||||
LYXERR(Debug::LYXRC) << "Reading '" << filename << "'..." << endl;
|
||||
|
||||
return read(lexrc);
|
||||
}
|
||||
@ -325,7 +325,7 @@ int LyXRC::read(std::istream & is)
|
||||
lexrc.setStream(is);
|
||||
if (!lexrc.isOK()) return -2;
|
||||
|
||||
lyxerr[Debug::LYXRC] << "Reading istream..." << endl;
|
||||
LYXERR(Debug::LYXRC) << "Reading istream..." << endl;
|
||||
|
||||
return read(lexrc);
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ void LyXComm::send(string const & msg)
|
||||
|
||||
void LyXComm::openConnection()
|
||||
{
|
||||
lyxerr[Debug::LYXSERVER] << "LyXComm: Opening connection" << endl;
|
||||
LYXERR(Debug::LYXSERVER) << "LyXComm: Opening connection" << endl;
|
||||
|
||||
// If we are up, that's an error
|
||||
if (ready) {
|
||||
@ -119,7 +119,7 @@ void LyXComm::openConnection()
|
||||
ready = false;
|
||||
|
||||
if (pipename.empty()) {
|
||||
lyxerr[Debug::LYXSERVER]
|
||||
LYXERR(Debug::LYXSERVER)
|
||||
<< "LyXComm: server is disabled, nothing to do"
|
||||
<< endl;
|
||||
return;
|
||||
@ -141,17 +141,17 @@ void LyXComm::openConnection()
|
||||
|
||||
// We made it!
|
||||
ready = true;
|
||||
lyxerr[Debug::LYXSERVER] << "LyXComm: Connection established" << endl;
|
||||
LYXERR(Debug::LYXSERVER) << "LyXComm: Connection established" << endl;
|
||||
}
|
||||
|
||||
|
||||
/// Close pipes
|
||||
void LyXComm::closeConnection()
|
||||
{
|
||||
lyxerr[Debug::LYXSERVER] << "LyXComm: Closing connection" << endl;
|
||||
LYXERR(Debug::LYXSERVER) << "LyXComm: Closing connection" << endl;
|
||||
|
||||
if (pipename.empty()) {
|
||||
lyxerr[Debug::LYXSERVER]
|
||||
LYXERR(Debug::LYXSERVER)
|
||||
<< "LyXComm: server is disabled, nothing to do"
|
||||
<< endl;
|
||||
return;
|
||||
@ -260,7 +260,7 @@ void LyXComm::read_ready()
|
||||
// the delim /wasn't/ found. ?:-P
|
||||
string cmd;
|
||||
read_buffer_= split(read_buffer_, cmd,'\n');
|
||||
lyxerr[Debug::LYXSERVER]
|
||||
LYXERR(Debug::LYXSERVER)
|
||||
<< "LyXComm: status:" << status
|
||||
<< ", read_buffer_:" << read_buffer_
|
||||
<< ", cmd:" << cmd << endl;
|
||||
@ -356,7 +356,7 @@ LyXServer::~LyXServer()
|
||||
|
||||
void LyXServer::callback(LyXServer * serv, string const & msg)
|
||||
{
|
||||
lyxerr[Debug::LYXSERVER] << "LyXServer: Received: '"
|
||||
LYXERR(Debug::LYXSERVER) << "LyXServer: Received: '"
|
||||
<< msg << '\'' << endl;
|
||||
|
||||
char const * p = msg.c_str();
|
||||
@ -398,7 +398,7 @@ void LyXServer::callback(LyXServer * serv, string const & msg)
|
||||
if (*p) ++p;
|
||||
}
|
||||
|
||||
lyxerr[Debug::LYXSERVER]
|
||||
LYXERR(Debug::LYXSERVER)
|
||||
<< "LyXServer: Client: '" << client
|
||||
<< "' Command: '" << cmd
|
||||
<< "' Argument: '" << arg << '\'' << endl;
|
||||
@ -412,7 +412,7 @@ void LyXServer::callback(LyXServer * serv, string const & msg)
|
||||
if (cmd == "hello") {
|
||||
// One more client
|
||||
if (serv->numclients == MAX_CLIENTS) { //paranoid check
|
||||
lyxerr[Debug::LYXSERVER]
|
||||
LYXERR(Debug::LYXSERVER)
|
||||
<< "LyXServer: too many clients..."
|
||||
<< endl;
|
||||
return;
|
||||
@ -424,7 +424,7 @@ void LyXServer::callback(LyXServer * serv, string const & msg)
|
||||
serv->clients[i] = client;
|
||||
serv->numclients++;
|
||||
buf = "LYXSRV:" + client + ":hello\n";
|
||||
lyxerr[Debug::LYXSERVER]
|
||||
LYXERR(Debug::LYXSERVER)
|
||||
<< "LyXServer: Greeting "
|
||||
<< client << endl;
|
||||
serv->pipes.send(buf);
|
||||
@ -438,12 +438,12 @@ void LyXServer::callback(LyXServer * serv, string const & msg)
|
||||
if (i < serv->numclients) {
|
||||
serv->numclients--;
|
||||
serv->clients[i].erase();
|
||||
lyxerr[Debug::LYXSERVER]
|
||||
LYXERR(Debug::LYXSERVER)
|
||||
<< "LyXServer: Client "
|
||||
<< client << " said goodbye"
|
||||
<< endl;
|
||||
} else {
|
||||
lyxerr[Debug::LYXSERVER]
|
||||
LYXERR(Debug::LYXSERVER)
|
||||
<< "LyXServer: ignoring bye messge from unregistered client"
|
||||
<< client << endl;
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ LyXServerSocket::LyXServerSocket(LyXFunc * f, string const & addr)
|
||||
boost::bind(&LyXServerSocket::serverCallback, this)
|
||||
);
|
||||
|
||||
lyxerr[Debug::LYXSERVER] << "lyx: New server socket "
|
||||
LYXERR(Debug::LYXSERVER) << "lyx: New server socket "
|
||||
<< fd_ << ' ' << address_ << endl;
|
||||
}
|
||||
|
||||
@ -85,7 +85,7 @@ LyXServerSocket::~LyXServerSocket()
|
||||
<< " IO error on closing: " << strerror(errno);
|
||||
}
|
||||
support::unlink(support::FileName(address_));
|
||||
lyxerr[Debug::LYXSERVER] << "lyx: Server socket quitting" << endl;
|
||||
LYXERR(Debug::LYXSERVER) << "lyx: Server socket quitting" << endl;
|
||||
}
|
||||
|
||||
|
||||
@ -102,7 +102,7 @@ void LyXServerSocket::serverCallback()
|
||||
int const client_fd = support::socktools::accept(fd_);
|
||||
|
||||
if (fd_ == -1) {
|
||||
lyxerr[Debug::LYXSERVER] << "lyx: Failed to accept new client"
|
||||
LYXERR(Debug::LYXSERVER) << "lyx: Failed to accept new client"
|
||||
<< endl;
|
||||
return;
|
||||
}
|
||||
@ -203,7 +203,7 @@ void LyXServerSocket::writeln(string const & line)
|
||||
LyXDataSocket::LyXDataSocket(int fd)
|
||||
: fd_(fd), connected_(true)
|
||||
{
|
||||
lyxerr[Debug::LYXSERVER] << "lyx: New data socket " << fd_ << endl;
|
||||
LYXERR(Debug::LYXSERVER) << "lyx: New data socket " << fd_ << endl;
|
||||
}
|
||||
|
||||
|
||||
@ -214,7 +214,7 @@ LyXDataSocket::~LyXDataSocket()
|
||||
<< " IO error on closing: " << strerror(errno);
|
||||
|
||||
theApp()->unregisterSocketCallback(fd_);
|
||||
lyxerr[Debug::LYXSERVER] << "lyx: Data socket " << fd_ << " quitting."
|
||||
LYXERR(Debug::LYXSERVER) << "lyx: Data socket " << fd_ << " quitting."
|
||||
<< endl;
|
||||
}
|
||||
|
||||
@ -240,7 +240,7 @@ bool LyXDataSocket::readln(string & line)
|
||||
// Error conditions. The buffer must still be
|
||||
// processed for lines read
|
||||
if (count == 0) { // EOF -- connection closed
|
||||
lyxerr[Debug::LYXSERVER] << "lyx: Data socket " << fd_
|
||||
LYXERR(Debug::LYXSERVER) << "lyx: Data socket " << fd_
|
||||
<< ": connection closed." << endl;
|
||||
connected_ = false;
|
||||
} else if ((count == -1) && (errno != EAGAIN)) { // IO error
|
||||
@ -252,7 +252,7 @@ bool LyXDataSocket::readln(string & line)
|
||||
// Cut a line from buffer
|
||||
string::size_type pos = buffer_.find('\n');
|
||||
if (pos == string::npos) {
|
||||
lyxerr[Debug::LYXSERVER] << "lyx: Data socket " << fd_
|
||||
LYXERR(Debug::LYXSERVER) << "lyx: Data socket " << fd_
|
||||
<< ": line not completed." << endl;
|
||||
return false; // No complete line stored
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ bool layout2layout(FileName const & filename, FileName const & tempfile)
|
||||
<< ' ' << quoteName(tempfile.toFilesystemEncoding());
|
||||
string const command_str = command.str();
|
||||
|
||||
lyxerr[Debug::TCLASS] << "Running `" << command_str << '\'' << endl;
|
||||
LYXERR(Debug::TCLASS) << "Running `" << command_str << '\'' << endl;
|
||||
|
||||
support::cmd_ret const ret =
|
||||
support::runCommand(command_str);
|
||||
@ -128,7 +128,7 @@ bool LyXTextClass::isTeXClassAvailable() const
|
||||
|
||||
bool LyXTextClass::do_readStyle(LyXLex & lexrc, LyXLayout & lay)
|
||||
{
|
||||
lyxerr[Debug::TCLASS] << "Reading style " << lay.name() << endl;
|
||||
LYXERR(Debug::TCLASS) << "Reading style " << lay.name() << endl;
|
||||
if (!lay.read(lexrc, *this)) {
|
||||
// Resolve fonts
|
||||
lay.resfont = lay.font;
|
||||
@ -213,11 +213,11 @@ bool LyXTextClass::read(FileName const & filename, bool merge)
|
||||
};
|
||||
|
||||
if (!merge)
|
||||
lyxerr[Debug::TCLASS] << "Reading textclass "
|
||||
LYXERR(Debug::TCLASS) << "Reading textclass "
|
||||
<< to_utf8(makeDisplayPath(filename.absFilename()))
|
||||
<< endl;
|
||||
else
|
||||
lyxerr[Debug::TCLASS] << "Reading input file "
|
||||
LYXERR(Debug::TCLASS) << "Reading input file "
|
||||
<< to_utf8(makeDisplayPath(filename.absFilename()))
|
||||
<< endl;
|
||||
|
||||
@ -443,7 +443,7 @@ bool LyXTextClass::read(FileName const & filename, bool merge)
|
||||
}
|
||||
|
||||
if (format != FORMAT) {
|
||||
lyxerr[Debug::TCLASS] << "Converting layout file from format "
|
||||
LYXERR(Debug::TCLASS) << "Converting layout file from format "
|
||||
<< format << " to " << FORMAT << endl;
|
||||
FileName const tempfile(support::tempName());
|
||||
error = !layout2layout(filename, tempfile);
|
||||
@ -454,7 +454,7 @@ bool LyXTextClass::read(FileName const & filename, bool merge)
|
||||
}
|
||||
|
||||
if (!merge) { // we are at top level here.
|
||||
lyxerr[Debug::TCLASS] << "Finished reading textclass "
|
||||
LYXERR(Debug::TCLASS) << "Finished reading textclass "
|
||||
<< to_utf8(makeDisplayPath(filename.absFilename()))
|
||||
<< endl;
|
||||
if (defaultlayout_.empty()) {
|
||||
@ -479,12 +479,12 @@ bool LyXTextClass::read(FileName const & filename, bool merge)
|
||||
toclevel);
|
||||
}
|
||||
}
|
||||
lyxerr[Debug::TCLASS]
|
||||
LYXERR(Debug::TCLASS)
|
||||
<< "Minimum TocLevel is " << min_toclevel_
|
||||
<< ", maximum is " << max_toclevel_ <<endl;
|
||||
|
||||
} else
|
||||
lyxerr[Debug::TCLASS] << "Finished reading input file "
|
||||
LYXERR(Debug::TCLASS) << "Finished reading input file "
|
||||
<< to_utf8(makeDisplayPath(filename.absFilename()))
|
||||
<< endl;
|
||||
|
||||
|
@ -98,7 +98,7 @@ bool LyXTextClassList::read()
|
||||
{
|
||||
LyXLex lex(0, 0);
|
||||
support::FileName const real_file = libFileSearch("", "textclass.lst");
|
||||
lyxerr[Debug::TCLASS] << "Reading textclasses from `"
|
||||
LYXERR(Debug::TCLASS) << "Reading textclasses from `"
|
||||
<< real_file << '\'' << endl;
|
||||
|
||||
if (real_file.empty()) {
|
||||
@ -131,25 +131,25 @@ bool LyXTextClassList::read()
|
||||
|
||||
bool finished = false;
|
||||
// Parse config-file
|
||||
lyxerr[Debug::TCLASS] << "Starting parsing of textclass.lst" << endl;
|
||||
LYXERR(Debug::TCLASS) << "Starting parsing of textclass.lst" << endl;
|
||||
while (lex.isOK() && !finished) {
|
||||
lyxerr[Debug::TCLASS] << "\tline by line" << endl;
|
||||
LYXERR(Debug::TCLASS) << "\tline by line" << endl;
|
||||
switch (lex.lex()) {
|
||||
case LyXLex::LEX_FEOF:
|
||||
finished = true;
|
||||
break;
|
||||
default:
|
||||
string const fname = lex.getString();
|
||||
lyxerr[Debug::TCLASS] << "Fname: " << fname << endl;
|
||||
LYXERR(Debug::TCLASS) << "Fname: " << fname << endl;
|
||||
if (lex.next()) {
|
||||
string const clname = lex.getString();
|
||||
lyxerr[Debug::TCLASS] << "Clname: " << clname << endl;
|
||||
LYXERR(Debug::TCLASS) << "Clname: " << clname << endl;
|
||||
if (lex.next()) {
|
||||
string const desc = lex.getString();
|
||||
lyxerr[Debug::TCLASS] << "Desc: " << desc << endl;
|
||||
LYXERR(Debug::TCLASS) << "Desc: " << desc << endl;
|
||||
if (lex.next()) {
|
||||
bool avail = lex.getBool();
|
||||
lyxerr[Debug::TCLASS] << "Avail: " << avail << endl;
|
||||
LYXERR(Debug::TCLASS) << "Avail: " << avail << endl;
|
||||
// This code is run when we have
|
||||
// fname, clname, desc, and avail
|
||||
LyXTextClass tmpl(fname, clname, desc, avail);
|
||||
@ -162,7 +162,7 @@ bool LyXTextClassList::read()
|
||||
}
|
||||
}
|
||||
}
|
||||
lyxerr[Debug::TCLASS] << "End of parsing of textclass.lst" << endl;
|
||||
LYXERR(Debug::TCLASS) << "End of parsing of textclass.lst" << endl;
|
||||
|
||||
if (classlist_.empty()) {
|
||||
lyxerr << "LyXTextClassList::Read: no textclasses found!"
|
||||
@ -182,7 +182,7 @@ LyXTextClassList::addTextClass(std::string const & textclass, std::string const
|
||||
// NOTE: latex class name is defined in textclass.layout, which can be different from textclass
|
||||
FileName const layout_file(addName(path, textclass + ".layout"));
|
||||
if (fs::exists(layout_file.toFilesystemEncoding())) {
|
||||
lyxerr[Debug::TCLASS] << "Adding class " << textclass << " from directory " << path << endl;
|
||||
LYXERR(Debug::TCLASS) << "Adding class " << textclass << " from directory " << path << endl;
|
||||
// Read .layout file and get description, real latex classname etc
|
||||
//
|
||||
// This is a C++ version of function processLayoutFile in configure.py,
|
||||
@ -220,15 +220,15 @@ LyXTextClassList textclasslist;
|
||||
// Reads the style files
|
||||
bool LyXSetStyle()
|
||||
{
|
||||
lyxerr[Debug::TCLASS] << "LyXSetStyle: parsing configuration..." << endl;
|
||||
LYXERR(Debug::TCLASS) << "LyXSetStyle: parsing configuration..." << endl;
|
||||
|
||||
if (!textclasslist.read()) {
|
||||
lyxerr[Debug::TCLASS] << "LyXSetStyle: an error occured "
|
||||
LYXERR(Debug::TCLASS) << "LyXSetStyle: an error occured "
|
||||
"during parsing.\n Exiting." << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
lyxerr[Debug::TCLASS] << "LyXSetStyle: configuration parsed." << endl;
|
||||
LYXERR(Debug::TCLASS) << "LyXSetStyle: configuration parsed." << endl;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
24
src/lyxvc.C
24
src/lyxvc.C
@ -108,14 +108,14 @@ void LyXVC::registrer()
|
||||
FileName const cvs_entries(makeAbsPath("CVS/Entries"));
|
||||
|
||||
if (isFileReadable(cvs_entries)) {
|
||||
lyxerr[Debug::LYXVC]
|
||||
LYXERR(Debug::LYXVC)
|
||||
<< "LyXVC: registering "
|
||||
<< to_utf8(makeDisplayPath(filename.absFilename()))
|
||||
<< " with CVS" << endl;
|
||||
vcs.reset(new CVS(cvs_entries, filename));
|
||||
|
||||
} else {
|
||||
lyxerr[Debug::LYXVC]
|
||||
LYXERR(Debug::LYXVC)
|
||||
<< "LyXVC: registering "
|
||||
<< to_utf8(makeDisplayPath(filename.absFilename()))
|
||||
<< " with RCS" << endl;
|
||||
@ -125,13 +125,13 @@ void LyXVC::registrer()
|
||||
vcs->owner(owner_);
|
||||
}
|
||||
|
||||
lyxerr[Debug::LYXVC] << "LyXVC: registrer" << endl;
|
||||
LYXERR(Debug::LYXVC) << "LyXVC: registrer" << endl;
|
||||
pair<bool, docstring> tmp =
|
||||
Alert::askForText(_("LyX VC: Initial description"),
|
||||
_("(no initial description)"));
|
||||
if (!tmp.first || tmp.second.empty()) {
|
||||
// should we insist on checking tmp.second.empty()?
|
||||
lyxerr[Debug::LYXVC] << "LyXVC: user cancelled" << endl;
|
||||
LYXERR(Debug::LYXVC) << "LyXVC: user cancelled" << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -142,7 +142,7 @@ void LyXVC::registrer()
|
||||
void LyXVC::checkIn()
|
||||
{
|
||||
|
||||
lyxerr[Debug::LYXVC] << "LyXVC: checkIn" << endl;
|
||||
LYXERR(Debug::LYXVC) << "LyXVC: checkIn" << endl;
|
||||
pair<bool, docstring> tmp = Alert::askForText(_("LyX VC: Log Message"));
|
||||
if (tmp.first) {
|
||||
if (tmp.second.empty()) {
|
||||
@ -150,14 +150,14 @@ void LyXVC::checkIn()
|
||||
}
|
||||
vcs->checkIn(to_utf8(tmp.second));
|
||||
} else {
|
||||
lyxerr[Debug::LYXVC] << "LyXVC: user cancelled" << endl;
|
||||
LYXERR(Debug::LYXVC) << "LyXVC: user cancelled" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LyXVC::checkOut()
|
||||
{
|
||||
lyxerr[Debug::LYXVC] << "LyXVC: checkOut" << endl;
|
||||
LYXERR(Debug::LYXVC) << "LyXVC: checkOut" << endl;
|
||||
|
||||
vcs->checkOut();
|
||||
}
|
||||
@ -165,7 +165,7 @@ void LyXVC::checkOut()
|
||||
|
||||
void LyXVC::revert()
|
||||
{
|
||||
lyxerr[Debug::LYXVC] << "LyXVC: revert" << endl;
|
||||
LYXERR(Debug::LYXVC) << "LyXVC: revert" << endl;
|
||||
|
||||
docstring const file = makeDisplayPath(owner_->fileName(), 20);
|
||||
docstring text = bformat(_("Reverting to the stored version of the "
|
||||
@ -189,11 +189,11 @@ void LyXVC::toggleReadOnly()
|
||||
{
|
||||
switch (vcs->status()) {
|
||||
case VCS::UNLOCKED:
|
||||
lyxerr[Debug::LYXVC] << "LyXVC: toggle to locked" << endl;
|
||||
LYXERR(Debug::LYXVC) << "LyXVC: toggle to locked" << endl;
|
||||
checkOut();
|
||||
break;
|
||||
case VCS::LOCKED:
|
||||
lyxerr[Debug::LYXVC] << "LyXVC: toggle to unlocked" << endl;
|
||||
LYXERR(Debug::LYXVC) << "LyXVC: toggle to unlocked" << endl;
|
||||
checkIn();
|
||||
break;
|
||||
}
|
||||
@ -231,11 +231,11 @@ string const LyXVC::getLogFile() const
|
||||
|
||||
FileName const tmpf(tempName(FileName(), "lyxvclog"));
|
||||
if (tmpf.empty()) {
|
||||
lyxerr[Debug::LYXVC] << "Could not generate logfile "
|
||||
LYXERR(Debug::LYXVC) << "Could not generate logfile "
|
||||
<< tmpf << endl;
|
||||
return string();
|
||||
}
|
||||
lyxerr[Debug::LYXVC] << "Generating logfile " << tmpf << endl;
|
||||
LYXERR(Debug::LYXVC) << "Generating logfile " << tmpf << endl;
|
||||
vcs->getLog(tmpf);
|
||||
return tmpf.absFilename();
|
||||
}
|
||||
|
@ -521,7 +521,7 @@ void InsetMathScript::write(WriteStream & os) const
|
||||
//}
|
||||
} else {
|
||||
if (os.firstitem())
|
||||
lyxerr[Debug::MATHED] << "suppressing {} when writing"
|
||||
LYXERR(Debug::MATHED) << "suppressing {} when writing"
|
||||
<< endl;
|
||||
else
|
||||
os << "{}";
|
||||
|
@ -83,13 +83,13 @@ void Correction::write(odocstream & os) const
|
||||
|
||||
bool Correction::correct(MathAtom & at, char_type c) const
|
||||
{
|
||||
//lyxerr[Debug::MATHED]
|
||||
//LYXERR(Debug::MATHED)
|
||||
// << "trying to correct ar: " << at << " from: '" << from1_ << '\'' << endl;
|
||||
if (from2_ != c)
|
||||
return false;
|
||||
if (asString(at) != asString(from1_))
|
||||
return false;
|
||||
lyxerr[Debug::MATHED]
|
||||
LYXERR(Debug::MATHED)
|
||||
<< "match found! subst in " << at
|
||||
<< " from: '" << from1_ << "' to '" << to_ << '\'' << endl;
|
||||
at = to_;
|
||||
@ -142,7 +142,7 @@ Corrections theCorrections;
|
||||
|
||||
void initAutoCorrect()
|
||||
{
|
||||
lyxerr[Debug::MATHED] << "reading autocorrect file" << endl;
|
||||
LYXERR(Debug::MATHED) << "reading autocorrect file" << endl;
|
||||
support::FileName const file = libFileSearch(string(), "autocorrect");
|
||||
if (file.empty()) {
|
||||
lyxerr << "Could not find autocorrect file" << endl;
|
||||
@ -153,20 +153,20 @@ void initAutoCorrect()
|
||||
ifstream is(file.toFilesystemEncoding().c_str());
|
||||
while (getline(is, line)) {
|
||||
if (line.size() == 0 || line[0] == '#') {
|
||||
//lyxerr[Debug::MATHED] << "ignoring line '" << line << '\'' << endl;
|
||||
//LYXERR(Debug::MATHED) << "ignoring line '" << line << '\'' << endl;
|
||||
continue;
|
||||
}
|
||||
idocstringstream il(from_utf8(line));
|
||||
|
||||
//lyxerr[Debug::MATHED] << "line '" << line << '\'' << endl;
|
||||
//LYXERR(Debug::MATHED) << "line '" << line << '\'' << endl;
|
||||
Correction corr;
|
||||
if (corr.read(il)) {
|
||||
//lyxerr[Debug::MATHED] << "parsed: '" << corr << '\'' << endl;
|
||||
//LYXERR(Debug::MATHED) << "parsed: '" << corr << '\'' << endl;
|
||||
theCorrections.insert(corr);
|
||||
}
|
||||
}
|
||||
|
||||
lyxerr[Debug::MATHED] << "done reading autocorrections." << endl;
|
||||
LYXERR(Debug::MATHED) << "done reading autocorrections." << endl;
|
||||
}
|
||||
|
||||
|
||||
|
@ -98,7 +98,7 @@ bool math_font_available(docstring & name)
|
||||
return true;
|
||||
}
|
||||
|
||||
lyxerr[Debug::MATHED]
|
||||
LYXERR(Debug::MATHED)
|
||||
<< "font " << to_utf8(name) << " not available and I can't fake it"
|
||||
<< endl;
|
||||
return false;
|
||||
@ -108,7 +108,7 @@ bool math_font_available(docstring & name)
|
||||
void initSymbols()
|
||||
{
|
||||
support::FileName const filename = libFileSearch(string(), "symbols");
|
||||
lyxerr[Debug::MATHED] << "read symbols from " << filename << endl;
|
||||
LYXERR(Debug::MATHED) << "read symbols from " << filename << endl;
|
||||
if (filename.empty()) {
|
||||
lyxerr << "Could not find symbols file" << endl;
|
||||
return;
|
||||
@ -162,8 +162,8 @@ void initSymbols()
|
||||
if (is)
|
||||
is >> tmp.requires;
|
||||
else {
|
||||
lyxerr[Debug::MATHED] << "skipping line '" << line << '\'' << endl;
|
||||
lyxerr[Debug::MATHED]
|
||||
LYXERR(Debug::MATHED) << "skipping line '" << line << '\'' << endl;
|
||||
LYXERR(Debug::MATHED)
|
||||
<< to_utf8(tmp.name) << ' ' << to_utf8(tmp.inset) << ' ' << to_utf8(tmp.extra) << endl;
|
||||
continue;
|
||||
}
|
||||
@ -183,38 +183,38 @@ void initSymbols()
|
||||
docstring symbol_font = from_ascii("lyxsymbol");
|
||||
|
||||
if (tmp.extra == "func" || tmp.extra == "funclim" || tmp.extra == "special") {
|
||||
lyxerr[Debug::MATHED] << "symbol abuse for " << to_utf8(tmp.name) << endl;
|
||||
LYXERR(Debug::MATHED) << "symbol abuse for " << to_utf8(tmp.name) << endl;
|
||||
tmp.draw = tmp.name;
|
||||
} else if (math_font_available(tmp.inset)) {
|
||||
lyxerr[Debug::MATHED] << "symbol available for " << to_utf8(tmp.name) << endl;
|
||||
LYXERR(Debug::MATHED) << "symbol available for " << to_utf8(tmp.name) << endl;
|
||||
tmp.draw.push_back(char_type(charid));
|
||||
} else if (fallbackid && math_font_available(symbol_font)) {
|
||||
if (tmp.inset == "cmex")
|
||||
tmp.inset = from_ascii("lyxsymbol");
|
||||
else
|
||||
tmp.inset = from_ascii("lyxboldsymbol");
|
||||
lyxerr[Debug::MATHED] << "symbol fallback for " << to_utf8(tmp.name) << endl;
|
||||
LYXERR(Debug::MATHED) << "symbol fallback for " << to_utf8(tmp.name) << endl;
|
||||
tmp.draw.push_back(char_type(fallbackid));
|
||||
} else {
|
||||
lyxerr[Debug::MATHED] << "faking " << to_utf8(tmp.name) << endl;
|
||||
LYXERR(Debug::MATHED) << "faking " << to_utf8(tmp.name) << endl;
|
||||
tmp.draw = tmp.name;
|
||||
tmp.inset = from_ascii("lyxtex");
|
||||
}
|
||||
} else {
|
||||
// it's a proper inset
|
||||
lyxerr[Debug::MATHED] << "inset " << to_utf8(tmp.inset)
|
||||
LYXERR(Debug::MATHED) << "inset " << to_utf8(tmp.inset)
|
||||
<< " used for " << to_utf8(tmp.name)
|
||||
<< endl;
|
||||
}
|
||||
|
||||
if (theWordList.find(tmp.name) != theWordList.end())
|
||||
lyxerr[Debug::MATHED]
|
||||
LYXERR(Debug::MATHED)
|
||||
<< "readSymbols: inset " << to_utf8(tmp.name)
|
||||
<< " already exists." << endl;
|
||||
else
|
||||
theWordList[tmp.name] = tmp;
|
||||
|
||||
lyxerr[Debug::MATHED]
|
||||
LYXERR(Debug::MATHED)
|
||||
<< "read symbol '" << to_utf8(tmp.name)
|
||||
<< " inset: " << to_utf8(tmp.inset)
|
||||
<< " draw: " << int(tmp.draw.empty() ? 0 : tmp.draw[0])
|
||||
|
@ -66,7 +66,7 @@ Messages::Messages(string const & l)
|
||||
// strip off any encoding suffix, i.e., assume 8-bit po files
|
||||
string::size_type i = lang_.find(".");
|
||||
lang_ = lang_.substr(0, i);
|
||||
lyxerr[Debug::DEBUG] << BOOST_CURRENT_FUNCTION
|
||||
LYXERR(Debug::DEBUG) << BOOST_CURRENT_FUNCTION
|
||||
<< ": language(" << lang_ << ")" << endl;
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@ docstring const Messages::get(string const & m) const
|
||||
char const * c = bindtextdomain(PACKAGE, package().locale_dir().c_str());
|
||||
int e = errno;
|
||||
if (e) {
|
||||
lyxerr[Debug::DEBUG]
|
||||
LYXERR(Debug::DEBUG)
|
||||
<< BOOST_CURRENT_FUNCTION << '\n'
|
||||
<< "Error code: " << errno << '\n'
|
||||
<< "Lang, mess: " << lang_ << " " << m << '\n'
|
||||
@ -124,7 +124,7 @@ docstring const Messages::get(string const & m) const
|
||||
}
|
||||
|
||||
if (!bind_textdomain_codeset(PACKAGE, ucs4_codeset)) {
|
||||
lyxerr[Debug::DEBUG]
|
||||
LYXERR(Debug::DEBUG)
|
||||
<< BOOST_CURRENT_FUNCTION << '\n'
|
||||
<< "Error code: " << errno << '\n'
|
||||
<< "Codeset : " << ucs4_codeset << '\n'
|
||||
@ -156,7 +156,7 @@ docstring const Messages::get(string const & m) const
|
||||
else
|
||||
translated = from_ascii(tmp);
|
||||
} else {
|
||||
lyxerr[Debug::DEBUG] << "We got a translation" << endl;
|
||||
LYXERR(Debug::DEBUG) << "We got a translation" << endl;
|
||||
char_type const * ucs4 = reinterpret_cast<char_type const *>(msg);
|
||||
translated = ucs4;
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ TeXDeeper(Buffer const & buf,
|
||||
odocstream & os, TexRow & texrow,
|
||||
OutputParams const & runparams)
|
||||
{
|
||||
lyxerr[Debug::LATEX] << "TeXDeeper... " << &*pit << endl;
|
||||
LYXERR(Debug::LATEX) << "TeXDeeper... " << &*pit << endl;
|
||||
ParagraphList::const_iterator par = pit;
|
||||
|
||||
while (par != paragraphs.end() &&
|
||||
@ -77,7 +77,7 @@ TeXDeeper(Buffer const & buf,
|
||||
os, texrow, runparams);
|
||||
}
|
||||
}
|
||||
lyxerr[Debug::LATEX] << "TeXDeeper...done " << endl;
|
||||
LYXERR(Debug::LATEX) << "TeXDeeper...done " << endl;
|
||||
|
||||
return par;
|
||||
}
|
||||
@ -90,7 +90,7 @@ TeXEnvironment(Buffer const & buf,
|
||||
odocstream & os, TexRow & texrow,
|
||||
OutputParams const & runparams)
|
||||
{
|
||||
lyxerr[Debug::LATEX] << "TeXEnvironment... " << &*pit << endl;
|
||||
LYXERR(Debug::LATEX) << "TeXEnvironment... " << &*pit << endl;
|
||||
|
||||
BufferParams const & bparams = buf.params();
|
||||
|
||||
@ -240,7 +240,7 @@ TeXOnePar(Buffer const & buf,
|
||||
OutputParams const & runparams_in,
|
||||
string const & everypar)
|
||||
{
|
||||
lyxerr[Debug::LATEX] << "TeXOnePar... " << &*pit << " '"
|
||||
LYXERR(Debug::LATEX) << "TeXOnePar... " << &*pit << " '"
|
||||
<< everypar << "'" << endl;
|
||||
BufferParams const & bparams = buf.params();
|
||||
LyXLayout_ptr style;
|
||||
@ -575,7 +575,7 @@ int switchEncoding(odocstream & os, BufferParams const & bparams,
|
||||
oldEnc.name() != newEnc.name() &&
|
||||
oldEnc.name() != "ascii" && newEnc.name() != "ascii" &&
|
||||
oldEnc.name() != "tis620-0" && newEnc.name() != "tis620-0") {
|
||||
lyxerr[Debug::LATEX] << "Changing LaTeX encoding from "
|
||||
LYXERR(Debug::LATEX) << "Changing LaTeX encoding from "
|
||||
<< oldEnc.name() << " to "
|
||||
<< newEnc.name() << endl;
|
||||
os << setEncoding(newEnc.iconvName());
|
||||
|
@ -222,7 +222,7 @@ void writePlaintextParagraph(Buffer const & buf,
|
||||
break;
|
||||
|
||||
case '\0':
|
||||
lyxerr[Debug::INFO] <<
|
||||
LYXERR(Debug::INFO) <<
|
||||
"writePlaintextFile: NULL char in structure." << endl;
|
||||
break;
|
||||
|
||||
|
@ -939,7 +939,7 @@ bool Paragraph::simpleTeXOnePar(Buffer const & buf,
|
||||
odocstream & os, TexRow & texrow,
|
||||
OutputParams const & runparams) const
|
||||
{
|
||||
lyxerr[Debug::LATEX] << "SimpleTeXOnePar... " << this << endl;
|
||||
LYXERR(Debug::LATEX) << "SimpleTeXOnePar... " << this << endl;
|
||||
|
||||
bool return_value = false;
|
||||
|
||||
@ -1158,7 +1158,7 @@ bool Paragraph::simpleTeXOnePar(Buffer const & buf,
|
||||
runparams.moving_arg);
|
||||
}
|
||||
|
||||
lyxerr[Debug::LATEX] << "SimpleTeXOnePar...done " << this << endl;
|
||||
LYXERR(Debug::LATEX) << "SimpleTeXOnePar...done " << this << endl;
|
||||
return return_value;
|
||||
}
|
||||
|
||||
|
@ -188,7 +188,7 @@ void mergeParagraph(BufferParams const & bparams,
|
||||
// marked as unmodified. Otherwise, its change is adopted by the first
|
||||
// character of the next paragraph.
|
||||
if (par.lookupChange(par.size()).type != Change::UNCHANGED) {
|
||||
lyxerr[Debug::CHANGES] <<
|
||||
LYXERR(Debug::CHANGES) <<
|
||||
"merging par with inserted/deleted end-of-par character" << endl;
|
||||
par.setChange(par.size(), Change(Change::UNCHANGED));
|
||||
}
|
||||
|
@ -786,11 +786,11 @@ void Paragraph::Pimpl::validate(LaTeXFeatures & features,
|
||||
FontList::const_iterator fend = fontlist.end();
|
||||
for (; fcit != fend; ++fcit) {
|
||||
if (fcit->font().noun() == LyXFont::ON) {
|
||||
lyxerr[Debug::LATEX] << "font.noun: "
|
||||
LYXERR(Debug::LATEX) << "font.noun: "
|
||||
<< fcit->font().noun()
|
||||
<< endl;
|
||||
features.require("noun");
|
||||
lyxerr[Debug::LATEX] << "Noun enabled. Font: "
|
||||
LYXERR(Debug::LATEX) << "Noun enabled. Font: "
|
||||
<< to_utf8(fcit->font().stateText(0))
|
||||
<< endl;
|
||||
}
|
||||
@ -805,7 +805,7 @@ void Paragraph::Pimpl::validate(LaTeXFeatures & features,
|
||||
break;
|
||||
default:
|
||||
features.require("color");
|
||||
lyxerr[Debug::LATEX] << "Color enabled. Font: "
|
||||
LYXERR(Debug::LATEX) << "Color enabled. Font: "
|
||||
<< to_utf8(fcit->font().stateText(0))
|
||||
<< endl;
|
||||
}
|
||||
@ -816,7 +816,7 @@ void Paragraph::Pimpl::validate(LaTeXFeatures & features,
|
||||
language != latex_language)
|
||||
{
|
||||
features.useLanguage(language);
|
||||
lyxerr[Debug::LATEX] << "Found language "
|
||||
LYXERR(Debug::LATEX) << "Found language "
|
||||
<< language->babel() << endl;
|
||||
}
|
||||
}
|
||||
|
@ -35,13 +35,13 @@ PSpell::PSpell(BufferParams const &, string const & lang)
|
||||
: els(0), spell_error_object(0)
|
||||
{
|
||||
addManager(lang);
|
||||
lyxerr[Debug::GUI] << "created pspell" << endl;
|
||||
LYXERR(Debug::GUI) << "created pspell" << endl;
|
||||
}
|
||||
|
||||
|
||||
PSpell::~PSpell()
|
||||
{
|
||||
lyxerr[Debug::GUI] << "killed pspell" << endl;
|
||||
LYXERR(Debug::GUI) << "killed pspell" << endl;
|
||||
|
||||
if (spell_error_object) {
|
||||
delete_pspell_can_have_error(spell_error_object);
|
||||
|
@ -955,9 +955,9 @@ void paintPar
|
||||
// 12 lines lower):
|
||||
if (lyxerr.debugging(Debug::PAINTING)) {
|
||||
if (text.isMainText(*pi.base.bv->buffer()))
|
||||
lyxerr[Debug::PAINTING] << "#";
|
||||
LYXERR(Debug::PAINTING) << "#";
|
||||
else
|
||||
lyxerr[Debug::PAINTING] << "[" <<
|
||||
LYXERR(Debug::PAINTING) << "[" <<
|
||||
repaintAll << row_has_changed <<
|
||||
cursor_on_row << "]";
|
||||
}
|
||||
@ -978,7 +978,7 @@ void paintPar
|
||||
pi.pain.setDrawingEnabled(true);
|
||||
|
||||
if (lyxerr.debugging(Debug::PAINTING)) {
|
||||
lyxerr[Debug::PAINTING] << "." << endl;
|
||||
LYXERR(Debug::PAINTING) << "." << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,7 @@ void LastFilesSection::read(istream & is)
|
||||
lastfiles.size() < num_lastfiles)
|
||||
lastfiles.push_back(file);
|
||||
else
|
||||
lyxerr[Debug::INIT] << "LyX: Warning: Ignore last file: " << tmp << endl;
|
||||
LYXERR(Debug::INIT) << "LyX: Warning: Ignore last file: " << tmp << endl;
|
||||
} while (is.good());
|
||||
}
|
||||
|
||||
@ -113,7 +113,7 @@ void LastFilesSection::setNumberOfLastFiles(unsigned int no)
|
||||
if (0 < no && no <= absolute_max_last_files)
|
||||
num_lastfiles = no;
|
||||
else {
|
||||
lyxerr[Debug::INIT] << "LyX: session: too many last files\n"
|
||||
LYXERR(Debug::INIT) << "LyX: session: too many last files\n"
|
||||
<< "\tdefault (=" << default_num_last_files
|
||||
<< ") used." << endl;
|
||||
num_lastfiles = default_num_last_files;
|
||||
@ -137,7 +137,7 @@ void LastOpenedSection::read(istream & is)
|
||||
!fs::is_directory(file.toFilesystemEncoding()))
|
||||
lastopened.push_back(file);
|
||||
else
|
||||
lyxerr[Debug::INIT] << "LyX: Warning: Ignore last opened file: " << tmp << endl;
|
||||
LYXERR(Debug::INIT) << "LyX: Warning: Ignore last opened file: " << tmp << endl;
|
||||
} while (is.good());
|
||||
}
|
||||
|
||||
@ -193,9 +193,9 @@ void LastFilePosSection::read(istream & is)
|
||||
lastfilepos.size() < num_lastfilepos)
|
||||
lastfilepos[file] = boost::tie(pit, pos);
|
||||
else
|
||||
lyxerr[Debug::INIT] << "LyX: Warning: Ignore pos of last file: " << fname << endl;
|
||||
LYXERR(Debug::INIT) << "LyX: Warning: Ignore pos of last file: " << fname << endl;
|
||||
} catch (...) {
|
||||
lyxerr[Debug::INIT] << "LyX: Warning: unknown pos of last file: " << tmp << endl;
|
||||
LYXERR(Debug::INIT) << "LyX: Warning: unknown pos of last file: " << tmp << endl;
|
||||
}
|
||||
} while (is.good());
|
||||
}
|
||||
@ -274,9 +274,9 @@ void BookmarksSection::read(istream & is)
|
||||
idx <= max_bookmarks)
|
||||
bookmarks[idx] = Bookmark(file, pit, 0, pos);
|
||||
else
|
||||
lyxerr[Debug::INIT] << "LyX: Warning: Ignore bookmark of file: " << fname << endl;
|
||||
LYXERR(Debug::INIT) << "LyX: Warning: Ignore bookmark of file: " << fname << endl;
|
||||
} catch (...) {
|
||||
lyxerr[Debug::INIT] << "LyX: Warning: unknown Bookmark info: " << tmp << endl;
|
||||
LYXERR(Debug::INIT) << "LyX: Warning: unknown Bookmark info: " << tmp << endl;
|
||||
}
|
||||
} while (is.good());
|
||||
}
|
||||
@ -344,9 +344,9 @@ void ToolbarSection::read(istream & is)
|
||||
value >> posy;
|
||||
toolbars.push_back(boost::make_tuple(key, ToolbarInfo(state, location, posx, posy)));
|
||||
} else
|
||||
lyxerr[Debug::INIT] << "LyX: Warning: Ignore toolbar info: " << tmp << endl;
|
||||
LYXERR(Debug::INIT) << "LyX: Warning: Ignore toolbar info: " << tmp << endl;
|
||||
} catch (...) {
|
||||
lyxerr[Debug::INIT] << "LyX: Warning: unknown Toolbar info: " << tmp << endl;
|
||||
LYXERR(Debug::INIT) << "LyX: Warning: unknown Toolbar info: " << tmp << endl;
|
||||
}
|
||||
} while (is.good());
|
||||
// sort the toolbars by location, line and position
|
||||
@ -423,9 +423,9 @@ void SessionInfoSection::read(istream & is)
|
||||
string value = tmp.substr(pos + 3);
|
||||
sessioninfo[key] = value;
|
||||
} else
|
||||
lyxerr[Debug::INIT] << "LyX: Warning: Ignore session info: " << tmp << endl;
|
||||
LYXERR(Debug::INIT) << "LyX: Warning: Ignore session info: " << tmp << endl;
|
||||
} catch (...) {
|
||||
lyxerr[Debug::INIT] << "LyX: Warning: unknown Session info: " << tmp << endl;
|
||||
LYXERR(Debug::INIT) << "LyX: Warning: unknown Session info: " << tmp << endl;
|
||||
}
|
||||
} while (is.good());
|
||||
}
|
||||
@ -496,7 +496,7 @@ void Session::readFile()
|
||||
else if (tmp == sec_session)
|
||||
sessionInfo().read(is);
|
||||
else
|
||||
lyxerr[Debug::INIT] << "LyX: Warning: unknown Session section: " << tmp << endl;
|
||||
LYXERR(Debug::INIT) << "LyX: Warning: unknown Session section: " << tmp << endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -515,7 +515,7 @@ void Session::writeFile() const
|
||||
toolbars().write(os);
|
||||
sessionInfo().write(os);
|
||||
} else
|
||||
lyxerr[Debug::INIT] << "LyX: Warning: unable to save Session: "
|
||||
LYXERR(Debug::INIT) << "LyX: Warning: unable to save Session: "
|
||||
<< session_file << endl;
|
||||
}
|
||||
|
||||
|
@ -164,7 +164,7 @@ bool isFileReadable(FileName const & filename)
|
||||
// false: not writeable
|
||||
bool isDirWriteable(FileName const & path)
|
||||
{
|
||||
lyxerr[Debug::FILES] << "isDirWriteable: " << path << endl;
|
||||
LYXERR(Debug::FILES) << "isDirWriteable: " << path << endl;
|
||||
|
||||
FileName const tmpfl(tempName(path, "lyxwritetest"));
|
||||
|
||||
@ -222,7 +222,7 @@ vector<FileName> const dirList(FileName const & dir, string const & ext)
|
||||
|
||||
string const encoded_dir = dir.toFilesystemEncoding();
|
||||
if (!(fs::exists(encoded_dir) && fs::is_directory(encoded_dir))) {
|
||||
lyxerr[Debug::FILES]
|
||||
LYXERR(Debug::FILES)
|
||||
<< "Directory \"" << dir
|
||||
<< "\" does not exist to DirList." << endl;
|
||||
return dirlist;
|
||||
@ -379,7 +379,7 @@ namespace {
|
||||
|
||||
FileName const createTmpDir(FileName const & tempdir, string const & mask)
|
||||
{
|
||||
lyxerr[Debug::FILES]
|
||||
LYXERR(Debug::FILES)
|
||||
<< "createTmpDir: tempdir=`" << tempdir << "'\n"
|
||||
<< "createTmpDir: mask=`" << mask << '\'' << endl;
|
||||
|
||||
@ -837,7 +837,7 @@ string const getFormatFromContents(FileName const & filename)
|
||||
bool firstLine = true;
|
||||
while ((count++ < max_count) && format.empty()) {
|
||||
if (ifs.eof()) {
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< "filetools(getFormatFromContents)\n"
|
||||
<< "\tFile type not recognised before EOF!"
|
||||
<< endl;
|
||||
@ -948,12 +948,12 @@ string const getFormatFromContents(FileName const & filename)
|
||||
}
|
||||
|
||||
if (!format.empty()) {
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< "Recognised Fileformat: " << format << endl;
|
||||
return format;
|
||||
}
|
||||
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
LYXERR(Debug::GRAPHICS)
|
||||
<< "filetools(getFormatFromContents)\n"
|
||||
<< "\tCouldn't find a known format!\n";
|
||||
return string();
|
||||
@ -1146,7 +1146,7 @@ FileName const findtexfile(string const & fil, string const & /*format*/)
|
||||
|
||||
cmd_ret const c = runCommand(kpsecmd);
|
||||
|
||||
lyxerr[Debug::LATEX] << "kpse status = " << c.first << '\n'
|
||||
LYXERR(Debug::LATEX) << "kpse status = " << c.first << '\n'
|
||||
<< "kpse result = `" << rtrim(c.second, "\n\r")
|
||||
<< '\'' << endl;
|
||||
if (c.first != -1)
|
||||
@ -1172,7 +1172,7 @@ void removeAutosaveFile(string const & filename)
|
||||
void readBB_lyxerrMessage(FileName const & file, bool & zipped,
|
||||
string const & message)
|
||||
{
|
||||
lyxerr[Debug::GRAPHICS] << "[readBB_from_PSFile] "
|
||||
LYXERR(Debug::GRAPHICS) << "[readBB_from_PSFile] "
|
||||
<< message << std::endl;
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning Why is this func deleting a file? (Lgb)
|
||||
|
@ -76,7 +76,7 @@ ForkedCallQueue::ForkedCallQueue() : running_(false)
|
||||
|
||||
void ForkedCallQueue::startCaller()
|
||||
{
|
||||
lyxerr[Debug::GRAPHICS] << "ForkedCallQueue: waking up" << endl;
|
||||
LYXERR(Debug::GRAPHICS) << "ForkedCallQueue: waking up" << endl;
|
||||
running_ = true ;
|
||||
callNext();
|
||||
}
|
||||
@ -85,7 +85,7 @@ void ForkedCallQueue::startCaller()
|
||||
void ForkedCallQueue::stopCaller()
|
||||
{
|
||||
running_ = false ;
|
||||
lyxerr[Debug::GRAPHICS] << "ForkedCallQueue: I'm going to sleep"
|
||||
LYXERR(Debug::GRAPHICS) << "ForkedCallQueue: I'm going to sleep"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ namespace support {
|
||||
|
||||
unsigned long sum(FileName const & file)
|
||||
{
|
||||
lyxerr[Debug::FILES] << "lyx::sum() using mmap (lightning fast)"
|
||||
LYXERR(Debug::FILES) << "lyx::sum() using mmap (lightning fast)"
|
||||
<< endl;
|
||||
|
||||
int fd = open(file.toFilesystemEncoding().c_str(), O_RDONLY);
|
||||
@ -123,7 +123,7 @@ using std::istreambuf_iterator;
|
||||
|
||||
unsigned long sum(FileName const & file)
|
||||
{
|
||||
lyxerr[Debug::FILES] << "lyx::sum() using istreambuf_iterator (fast)"
|
||||
LYXERR(Debug::FILES) << "lyx::sum() using istreambuf_iterator (fast)"
|
||||
<< endl;
|
||||
|
||||
ifstream ifs(file.toFilesystemEncoding().c_str());
|
||||
@ -141,7 +141,7 @@ using std::ios;
|
||||
|
||||
unsigned long sum(FileName const & file)
|
||||
{
|
||||
lyxerr[Debug::FILES]
|
||||
LYXERR(Debug::FILES)
|
||||
<< "lyx::sum() using istream_iterator (slow as a snail)"
|
||||
<< endl;
|
||||
|
||||
|
@ -240,7 +240,7 @@ string latex_path(string const & p)
|
||||
|
||||
if (windows_style_tex_paths_ && is_absolute_path(p)) {
|
||||
string dos_path = convert_path(p, PathStyle(windows));
|
||||
lyxerr[Debug::LATEX]
|
||||
LYXERR(Debug::LATEX)
|
||||
<< "<Path correction for LaTeX> ["
|
||||
<< p << "]->>["
|
||||
<< dos_path << ']' << endl;
|
||||
|
@ -205,7 +205,7 @@ string external_path(string const & p)
|
||||
{
|
||||
string const dos_path = subst(p, "/", "\\");
|
||||
|
||||
lyxerr[Debug::LATEX]
|
||||
LYXERR(Debug::LATEX)
|
||||
<< "<Win32 path correction> ["
|
||||
<< p << "]->>["
|
||||
<< dos_path << ']' << endl;
|
||||
@ -265,7 +265,7 @@ string latex_path(string const & p)
|
||||
string const drive = p.substr(0, 2);
|
||||
string const cygprefix = cygdrive + "/" + drive.substr(0, 1);
|
||||
string const cygpath = subst(subst(p, '\\', '/'), drive, cygprefix);
|
||||
lyxerr[Debug::LATEX]
|
||||
LYXERR(Debug::LATEX)
|
||||
<< "<Path correction for LaTeX> ["
|
||||
<< p << "]->>["
|
||||
<< cygpath << ']' << endl;
|
||||
|
@ -107,11 +107,11 @@ FileName const tempName(FileName const & dir, string const & mask)
|
||||
#else
|
||||
# error No x() function.
|
||||
#endif
|
||||
lyxerr[Debug::FILES] << "Temporary file `" << t
|
||||
LYXERR(Debug::FILES) << "Temporary file `" << t
|
||||
<< "' created." << endl;
|
||||
return FileName(t);
|
||||
} else {
|
||||
lyxerr[Debug::FILES]
|
||||
LYXERR(Debug::FILES)
|
||||
<< "LyX Error: Unable to create temporary file."
|
||||
<< endl;
|
||||
return FileName();
|
||||
|
@ -2694,7 +2694,7 @@ LyXTabular::getCellFromInset(InsetBase const * inset) const
|
||||
|
||||
for (idx_type cell = 0, n = getNumberOfCells(); cell < n; ++cell)
|
||||
if (getCellInset(cell).get() == inset) {
|
||||
lyxerr[Debug::INSETTEXT] << "LyXTabular::getCellFromInset: "
|
||||
LYXERR(Debug::INSETTEXT) << "LyXTabular::getCellFromInset: "
|
||||
<< "cell=" << cell << endl;
|
||||
return cell;
|
||||
}
|
||||
|
12
src/text.C
12
src/text.C
@ -319,7 +319,7 @@ void readParagraph(Buffer const & buf, Paragraph & par, LyXLex & lex,
|
||||
break;
|
||||
}
|
||||
|
||||
lyxerr[Debug::PARSER] << "Handling paragraph token: `"
|
||||
LYXERR(Debug::PARSER) << "Handling paragraph token: `"
|
||||
<< token << '\'' << endl;
|
||||
if (token == "\\begin_layout" || token == "\\end_document"
|
||||
|| token == "\\end_inset" || token == "\\begin_deeper"
|
||||
@ -1367,7 +1367,7 @@ void LyXText::drawSelection(PainterInfo & pi, int x, int) const
|
||||
return;
|
||||
|
||||
if (lyxerr.debugging(Debug::DEBUG)) {
|
||||
lyxerr[Debug::DEBUG]
|
||||
LYXERR(Debug::DEBUG)
|
||||
<< BOOST_CURRENT_FUNCTION
|
||||
<< "draw selection at " << x
|
||||
<< endl;
|
||||
@ -1447,7 +1447,7 @@ void LyXText::drawSelection(PainterInfo & pi, int x, int) const
|
||||
}
|
||||
|
||||
if (lyxerr.debugging(Debug::DEBUG)) {
|
||||
lyxerr[Debug::DEBUG] << " y1: " << y1 << " y2: " << y2
|
||||
LYXERR(Debug::DEBUG) << " y1: " << y1 << " y2: " << y2
|
||||
<< "X1:" << X1 << " x2: " << X2 << " wid: " << tm.width()
|
||||
<< endl;
|
||||
}
|
||||
@ -1847,7 +1847,7 @@ void LyXText::setCursorFromCoordinates(LCursor & cur, int const x, int const y)
|
||||
ParagraphMetrics const & pm = tm.parMetrics(pit);
|
||||
|
||||
int yy = cur.bv().coordCache().get(this, pit).y_ - pm.ascent();
|
||||
lyxerr[Debug::DEBUG]
|
||||
LYXERR(Debug::DEBUG)
|
||||
<< BOOST_CURRENT_FUNCTION
|
||||
<< ": x: " << x
|
||||
<< " y: " << y
|
||||
@ -1865,7 +1865,7 @@ void LyXText::setCursorFromCoordinates(LCursor & cur, int const x, int const y)
|
||||
|
||||
Row const & row = pm.rows()[r];
|
||||
|
||||
lyxerr[Debug::DEBUG]
|
||||
LYXERR(Debug::DEBUG)
|
||||
<< BOOST_CURRENT_FUNCTION
|
||||
<< ": row " << r
|
||||
<< " from pos: " << row.pos()
|
||||
@ -1876,7 +1876,7 @@ void LyXText::setCursorFromCoordinates(LCursor & cur, int const x, int const y)
|
||||
pos_type const pos = row.pos()
|
||||
+ tm.getColumnNearX(pit, row, xx, bound);
|
||||
|
||||
lyxerr[Debug::DEBUG]
|
||||
LYXERR(Debug::DEBUG)
|
||||
<< BOOST_CURRENT_FUNCTION
|
||||
<< ": setting cursor pit: " << pit
|
||||
<< " pos: " << pos
|
||||
|
22
src/text2.C
22
src/text2.C
@ -94,7 +94,7 @@ InsetBase * LyXText::checkInsetHit(BufferView & bv, int x, int y)
|
||||
|
||||
Paragraph const & par = pars_[pit];
|
||||
|
||||
lyxerr[Debug::DEBUG]
|
||||
LYXERR(Debug::DEBUG)
|
||||
<< BOOST_CURRENT_FUNCTION
|
||||
<< ": x: " << x
|
||||
<< " y: " << y
|
||||
@ -105,12 +105,12 @@ InsetBase * LyXText::checkInsetHit(BufferView & bv, int x, int y)
|
||||
for (; iit != iend; ++iit) {
|
||||
InsetBase * inset = iit->inset;
|
||||
#if 1
|
||||
lyxerr[Debug::DEBUG]
|
||||
LYXERR(Debug::DEBUG)
|
||||
<< BOOST_CURRENT_FUNCTION
|
||||
<< ": examining inset " << inset << endl;
|
||||
|
||||
if (bv.coordCache().getInsets().has(inset))
|
||||
lyxerr[Debug::DEBUG]
|
||||
LYXERR(Debug::DEBUG)
|
||||
<< BOOST_CURRENT_FUNCTION
|
||||
<< ": xo: " << inset->xo(bv) << "..."
|
||||
<< inset->xo(bv) + inset->width()
|
||||
@ -119,18 +119,18 @@ InsetBase * LyXText::checkInsetHit(BufferView & bv, int x, int y)
|
||||
<< inset->yo(bv) + inset->descent()
|
||||
<< endl;
|
||||
else
|
||||
lyxerr[Debug::DEBUG]
|
||||
LYXERR(Debug::DEBUG)
|
||||
<< BOOST_CURRENT_FUNCTION
|
||||
<< ": inset has no cached position" << endl;
|
||||
#endif
|
||||
if (inset->covers(bv, x, y)) {
|
||||
lyxerr[Debug::DEBUG]
|
||||
LYXERR(Debug::DEBUG)
|
||||
<< BOOST_CURRENT_FUNCTION
|
||||
<< ": Hit inset: " << inset << endl;
|
||||
return inset;
|
||||
}
|
||||
}
|
||||
lyxerr[Debug::DEBUG]
|
||||
LYXERR(Debug::DEBUG)
|
||||
<< BOOST_CURRENT_FUNCTION
|
||||
<< ": No inset hit. " << endl;
|
||||
return 0;
|
||||
@ -354,7 +354,7 @@ void LyXText::setLayout(LCursor & cur, string const & layout)
|
||||
LyXLayout_ptr const & lyxlayout = params.getLyXTextClass()[layout];
|
||||
if (lyxlayout->is_environment) {
|
||||
// move everything in a new environment inset
|
||||
lyxerr[Debug::DEBUG] << "setting layout " << layout << endl;
|
||||
LYXERR(Debug::DEBUG) << "setting layout " << layout << endl;
|
||||
lyx::dispatch(FuncRequest(LFUN_LINE_BEGIN));
|
||||
lyx::dispatch(FuncRequest(LFUN_LINE_END_SELECT));
|
||||
lyx::dispatch(FuncRequest(LFUN_CUT));
|
||||
@ -756,7 +756,7 @@ pit_type LyXText::getPitNearY(BufferView & bv, int y) const
|
||||
BOOST_ASSERT(!paragraphs().empty());
|
||||
BOOST_ASSERT(bv.coordCache().getParPos().find(this) != bv.coordCache().getParPos().end());
|
||||
CoordCache::InnerParPosCache const & cc = bv.coordCache().getParPos().find(this)->second;
|
||||
lyxerr[Debug::DEBUG]
|
||||
LYXERR(Debug::DEBUG)
|
||||
<< BOOST_CURRENT_FUNCTION
|
||||
<< ": y: " << y << " cache size: " << cc.size()
|
||||
<< endl;
|
||||
@ -806,7 +806,7 @@ pit_type LyXText::getPitNearY(BufferView & bv, int y) const
|
||||
}
|
||||
|
||||
for (; it != et; ++it) {
|
||||
lyxerr[Debug::DEBUG]
|
||||
LYXERR(Debug::DEBUG)
|
||||
<< BOOST_CURRENT_FUNCTION
|
||||
<< " examining: pit: " << it->first
|
||||
<< " y: " << it->second.y_
|
||||
@ -820,7 +820,7 @@ pit_type LyXText::getPitNearY(BufferView & bv, int y) const
|
||||
}
|
||||
}
|
||||
|
||||
lyxerr[Debug::DEBUG]
|
||||
LYXERR(Debug::DEBUG)
|
||||
<< BOOST_CURRENT_FUNCTION
|
||||
<< ": found best y: " << yy << " for pit: " << pit
|
||||
<< endl;
|
||||
@ -1143,7 +1143,7 @@ void LyXText::fixCursorAfterDelete(CursorSlice & cur, CursorSlice const & where)
|
||||
bool LyXText::deleteEmptyParagraphMechanism(LCursor & cur,
|
||||
LCursor & old, bool & need_anchor_change)
|
||||
{
|
||||
//lyxerr[Debug::DEBUG] << "DEPM: cur:\n" << cur << "old:\n" << old << endl;
|
||||
//LYXERR(Debug::DEBUG) << "DEPM: cur:\n" << cur << "old:\n" << old << endl;
|
||||
|
||||
Paragraph & oldpar = old.paragraph();
|
||||
|
||||
|
14
src/text3.C
14
src/text3.C
@ -300,7 +300,7 @@ bool LyXText::isRTL(Buffer const & buffer, Paragraph const & par) const
|
||||
|
||||
void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
{
|
||||
lyxerr[Debug::ACTION] << "LyXText::dispatch: cmd: " << cmd << endl;
|
||||
LYXERR(Debug::ACTION) << "LyXText::dispatch: cmd: " << cmd << endl;
|
||||
|
||||
// FIXME: We use the update flag to indicates wether a singlePar or a
|
||||
// full screen update is needed. We reset it here but shall we restore it
|
||||
@ -872,7 +872,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
|
||||
case LFUN_LAYOUT: {
|
||||
string layout = to_ascii(cmd.argument());
|
||||
lyxerr[Debug::INFO] << "LFUN_LAYOUT: (arg) " << layout << endl;
|
||||
LYXERR(Debug::INFO) << "LFUN_LAYOUT: (arg) " << layout << endl;
|
||||
|
||||
// Derive layout number from given argument (string)
|
||||
// and current buffer's textclass (number)
|
||||
@ -1428,21 +1428,21 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
}
|
||||
|
||||
case LFUN_FINISHED_LEFT:
|
||||
lyxerr[Debug::DEBUG] << "handle LFUN_FINISHED_LEFT:\n" << cur << endl;
|
||||
LYXERR(Debug::DEBUG) << "handle LFUN_FINISHED_LEFT:\n" << cur << endl;
|
||||
break;
|
||||
|
||||
case LFUN_FINISHED_RIGHT:
|
||||
lyxerr[Debug::DEBUG] << "handle LFUN_FINISHED_RIGHT:\n" << cur << endl;
|
||||
LYXERR(Debug::DEBUG) << "handle LFUN_FINISHED_RIGHT:\n" << cur << endl;
|
||||
++cur.pos();
|
||||
break;
|
||||
|
||||
case LFUN_FINISHED_UP:
|
||||
lyxerr[Debug::DEBUG] << "handle LFUN_FINISHED_UP:\n" << cur << endl;
|
||||
LYXERR(Debug::DEBUG) << "handle LFUN_FINISHED_UP:\n" << cur << endl;
|
||||
cursorUp(cur);
|
||||
break;
|
||||
|
||||
case LFUN_FINISHED_DOWN:
|
||||
lyxerr[Debug::DEBUG] << "handle LFUN_FINISHED_DOWN:\n" << cur << endl;
|
||||
LYXERR(Debug::DEBUG) << "handle LFUN_FINISHED_DOWN:\n" << cur << endl;
|
||||
cursorDown(cur);
|
||||
break;
|
||||
|
||||
@ -1568,7 +1568,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
break;
|
||||
|
||||
default:
|
||||
lyxerr[Debug::ACTION]
|
||||
LYXERR(Debug::ACTION)
|
||||
<< BOOST_CURRENT_FUNCTION
|
||||
<< ": Command " << cmd
|
||||
<< " not DISPATCHED by LyXText" << endl;
|
||||
|
12
src/trans.C
12
src/trans.C
@ -178,10 +178,10 @@ int Trans::load(LyXLex & lex)
|
||||
case KCOMB: {
|
||||
string str;
|
||||
|
||||
lyxerr[Debug::KBMAP] << "KCOMB:" << endl;
|
||||
LYXERR(Debug::KBMAP) << "KCOMB:" << endl;
|
||||
if (lex.next(true)) {
|
||||
str = lex.getString();
|
||||
lyxerr[Debug::KBMAP] << str << endl;
|
||||
LYXERR(Debug::KBMAP) << str << endl;
|
||||
} else
|
||||
return -1;
|
||||
|
||||
@ -190,7 +190,7 @@ int Trans::load(LyXLex & lex)
|
||||
|
||||
if (lex.next(true)) {
|
||||
str = lex.getString();
|
||||
lyxerr[Debug::KBMAP] << str << endl;
|
||||
LYXERR(Debug::KBMAP) << str << endl;
|
||||
} else
|
||||
return -1;
|
||||
|
||||
@ -219,7 +219,7 @@ int Trans::load(LyXLex & lex)
|
||||
docstring allowed;
|
||||
if (lex.next()) {
|
||||
allowed = lex.getDocString();
|
||||
lyxerr[Debug::KBMAP] << "allowed: "
|
||||
LYXERR(Debug::KBMAP) << "allowed: "
|
||||
<< to_utf8(allowed) << endl;
|
||||
} else {
|
||||
return -1;
|
||||
@ -290,7 +290,7 @@ int Trans::load(LyXLex & lex)
|
||||
break;
|
||||
}
|
||||
case LyXLex::LEX_FEOF:
|
||||
lyxerr[Debug::PARSER] << "End of parsing" << endl;
|
||||
LYXERR(Debug::PARSER) << "End of parsing" << endl;
|
||||
break;
|
||||
default:
|
||||
lex.printError("ParseKeymapFile: "
|
||||
@ -362,7 +362,7 @@ tex_accent getkeymod(string const & p)
|
||||
|
||||
if (lyx_accent_table[i].name
|
||||
&& contains(p, lyx_accent_table[i].name)) {
|
||||
lyxerr[Debug::KBMAP] << "Found it!" << endl;
|
||||
LYXERR(Debug::KBMAP) << "Found it!" << endl;
|
||||
return static_cast<tex_accent>(i);
|
||||
}
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ void TransManager::enablePrimary()
|
||||
if (t1_->isDefined())
|
||||
active_ = t1_.get();
|
||||
|
||||
lyxerr[Debug::KBMAP] << "Enabling primary keymap" << endl;
|
||||
LYXERR(Debug::KBMAP) << "Enabling primary keymap" << endl;
|
||||
}
|
||||
|
||||
|
||||
@ -231,14 +231,14 @@ void TransManager::enableSecondary()
|
||||
{
|
||||
if (t2_->isDefined())
|
||||
active_ = t2_.get();
|
||||
lyxerr[Debug::KBMAP] << "Enabling secondary keymap" << endl;
|
||||
LYXERR(Debug::KBMAP) << "Enabling secondary keymap" << endl;
|
||||
}
|
||||
|
||||
|
||||
void TransManager::disableKeymap()
|
||||
{
|
||||
active_ = &default_;
|
||||
lyxerr[Debug::KBMAP] << "Disabling keymap" << endl;
|
||||
LYXERR(Debug::KBMAP) << "Disabling keymap" << endl;
|
||||
}
|
||||
|
||||
|
||||
|
@ -58,7 +58,7 @@ namespace fs = boost::filesystem;
|
||||
|
||||
int VCS::doVCCommand(string const & cmd, string const & path)
|
||||
{
|
||||
lyxerr[Debug::LYXVC] << "doVCCommand: " << cmd << endl;
|
||||
LYXERR(Debug::LYXVC) << "doVCCommand: " << cmd << endl;
|
||||
Systemcall one;
|
||||
support::Path p(path);
|
||||
int const ret = one.startscript(Systemcall::Wait, cmd);
|
||||
@ -77,19 +77,19 @@ FileName const RCS::find_file(FileName const & file)
|
||||
{
|
||||
// Check if *,v exists.
|
||||
FileName tmp(file.absFilename() + ",v");
|
||||
lyxerr[Debug::LYXVC] << "Checking if file is under rcs: "
|
||||
LYXERR(Debug::LYXVC) << "Checking if file is under rcs: "
|
||||
<< tmp << endl;
|
||||
if (fs::is_readable(tmp.toFilesystemEncoding())) {
|
||||
lyxerr[Debug::LYXVC] << "Yes " << file
|
||||
LYXERR(Debug::LYXVC) << "Yes " << file
|
||||
<< " is under rcs." << endl;
|
||||
return tmp;
|
||||
} else {
|
||||
// Check if RCS/*,v exists.
|
||||
tmp = FileName(addName(addPath(onlyPath(file.absFilename()), "RCS"), file.absFilename()) + ",v");
|
||||
lyxerr[Debug::LYXVC] << "Checking if file is under rcs: "
|
||||
LYXERR(Debug::LYXVC) << "Checking if file is under rcs: "
|
||||
<< tmp << endl;
|
||||
if (fs::is_readable(tmp.toFilesystemEncoding())) {
|
||||
lyxerr[Debug::LYXVC] << "Yes " << file
|
||||
LYXERR(Debug::LYXVC) << "Yes " << file
|
||||
<< " it is under rcs."<< endl;
|
||||
return tmp;
|
||||
}
|
||||
@ -100,7 +100,7 @@ FileName const RCS::find_file(FileName const & file)
|
||||
|
||||
void RCS::retrieve(FileName const & file)
|
||||
{
|
||||
lyxerr[Debug::LYXVC] << "LyXVC::RCS: retrieve.\n\t" << file << endl;
|
||||
LYXERR(Debug::LYXVC) << "LyXVC::RCS: retrieve.\n\t" << file << endl;
|
||||
VCS::doVCCommand("co -q -r " + quoteName(file.toFilesystemEncoding()),
|
||||
string());
|
||||
}
|
||||
@ -108,7 +108,7 @@ void RCS::retrieve(FileName const & file)
|
||||
|
||||
void RCS::scanMaster()
|
||||
{
|
||||
lyxerr[Debug::LYXVC] << "LyXVC::RCS: scanMaster." << endl;
|
||||
LYXERR(Debug::LYXVC) << "LyXVC::RCS: scanMaster." << endl;
|
||||
|
||||
ifstream ifs(master_.toFilesystemEncoding().c_str());
|
||||
|
||||
@ -116,7 +116,7 @@ void RCS::scanMaster()
|
||||
bool read_enough = false;
|
||||
|
||||
while (!read_enough && ifs >> token) {
|
||||
lyxerr[Debug::LYXVC]
|
||||
LYXERR(Debug::LYXVC)
|
||||
<< "LyXVC::scanMaster: current lex text: `"
|
||||
<< token << '\'' << endl;
|
||||
|
||||
@ -128,7 +128,7 @@ void RCS::scanMaster()
|
||||
ifs >> tmv;
|
||||
tmv = rtrim(tmv, ";");
|
||||
version_ = tmv;
|
||||
lyxerr[Debug::LYXVC] << "LyXVC: version found to be "
|
||||
LYXERR(Debug::LYXVC) << "LyXVC: version found to be "
|
||||
<< tmv << endl;
|
||||
} else if (contains(token, "access")
|
||||
|| contains(token, "symbols")
|
||||
@ -162,7 +162,7 @@ void RCS::scanMaster()
|
||||
read_enough = true;
|
||||
} else {
|
||||
// unexpected
|
||||
lyxerr[Debug::LYXVC]
|
||||
LYXERR(Debug::LYXVC)
|
||||
<< "LyXVC::scanMaster(): unexpected token"
|
||||
<< endl;
|
||||
}
|
||||
@ -208,7 +208,7 @@ void RCS::revert()
|
||||
|
||||
void RCS::undoLast()
|
||||
{
|
||||
lyxerr[Debug::LYXVC] << "LyXVC: undoLast" << endl;
|
||||
LYXERR(Debug::LYXVC) << "LyXVC: undoLast" << endl;
|
||||
doVCCommand("rcs -o" + version() + " "
|
||||
+ quoteName(onlyFilename(owner_->fileName())),
|
||||
owner_->filePath());
|
||||
@ -237,7 +237,7 @@ FileName const CVS::find_file(FileName const & file)
|
||||
// where we have file.
|
||||
FileName const dir(onlyPath(file.absFilename()) + "/CVS/Entries");
|
||||
string const tmpf = '/' + onlyFilename(file.absFilename()) + '/';
|
||||
lyxerr[Debug::LYXVC] << "LyXVC: checking in `" << dir
|
||||
LYXERR(Debug::LYXVC) << "LyXVC: checking in `" << dir
|
||||
<< "' for `" << tmpf << '\'' << endl;
|
||||
if (fs::is_readable(dir.toFilesystemEncoding())) {
|
||||
// Ok we are at least in a CVS dir. Parse the CVS/Entries
|
||||
@ -246,7 +246,7 @@ FileName const CVS::find_file(FileName const & file)
|
||||
ifstream ifs(dir.toFilesystemEncoding().c_str());
|
||||
string line;
|
||||
while (getline(ifs, line)) {
|
||||
lyxerr[Debug::LYXVC] << "\tEntries: " << line << endl;
|
||||
LYXERR(Debug::LYXVC) << "\tEntries: " << line << endl;
|
||||
if (contains(line, tmpf))
|
||||
return dir;
|
||||
}
|
||||
@ -257,16 +257,16 @@ FileName const CVS::find_file(FileName const & file)
|
||||
|
||||
void CVS::scanMaster()
|
||||
{
|
||||
lyxerr[Debug::LYXVC] << "LyXVC::CVS: scanMaster. \n Checking: "
|
||||
LYXERR(Debug::LYXVC) << "LyXVC::CVS: scanMaster. \n Checking: "
|
||||
<< master_ << endl;
|
||||
// Ok now we do the real scan...
|
||||
ifstream ifs(master_.toFilesystemEncoding().c_str());
|
||||
string tmpf = '/' + onlyFilename(file_.absFilename()) + '/';
|
||||
lyxerr[Debug::LYXVC] << "\tlooking for `" << tmpf << '\'' << endl;
|
||||
LYXERR(Debug::LYXVC) << "\tlooking for `" << tmpf << '\'' << endl;
|
||||
string line;
|
||||
static regex const reg("/(.*)/(.*)/(.*)/(.*)/(.*)");
|
||||
while (getline(ifs, line)) {
|
||||
lyxerr[Debug::LYXVC] << "\t line: " << line << endl;
|
||||
LYXERR(Debug::LYXVC) << "\t line: " << line << endl;
|
||||
if (contains(line, tmpf)) {
|
||||
// Ok extract the fields.
|
||||
smatch sm;
|
||||
@ -283,7 +283,7 @@ void CVS::scanMaster()
|
||||
// FIXME: must double check file is stattable/existing
|
||||
time_t mod = fs::last_write_time(file_.toFilesystemEncoding());
|
||||
string mod_date = rtrim(asctime(gmtime(&mod)), "\n");
|
||||
lyxerr[Debug::LYXVC]
|
||||
LYXERR(Debug::LYXVC)
|
||||
<< "Date in Entries: `" << file_date
|
||||
<< "'\nModification date of file: `"
|
||||
<< mod_date << '\'' << endl;
|
||||
|
Loading…
Reference in New Issue
Block a user