mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Handle sending a FuncRequest object to lyxerr
* Implement the corresponding operator<< * Use it in a couple new places
This commit is contained in:
parent
47f70bd913
commit
0ef36860c3
@ -1218,14 +1218,7 @@ void BufferView::editInset(string const & name, Inset * inset)
|
||||
|
||||
void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
||||
{
|
||||
//lyxerr << [ cmd = " << cmd << "]" << endl;
|
||||
|
||||
// Make sure that the cached BufferView is correct.
|
||||
LYXERR(Debug::ACTION, " action[" << cmd.action() << ']'
|
||||
<< " arg[" << to_utf8(cmd.argument()) << ']'
|
||||
<< " x[" << cmd.x() << ']'
|
||||
<< " y[" << cmd.y() << ']'
|
||||
<< " button[" << cmd.button() << ']');
|
||||
LYXERR(Debug::ACTION, "BufferView::dispatch: cmd: " << cmd);
|
||||
|
||||
string const argument = to_utf8(cmd.argument());
|
||||
Cursor & cur = d->cursor_;
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "FuncRequest.h"
|
||||
#include "LyXAction.h"
|
||||
|
||||
#include "support/debug.h"
|
||||
#include "support/lstrings.h"
|
||||
|
||||
#include <climits>
|
||||
@ -132,12 +133,19 @@ bool operator==(FuncRequest const & lhs, FuncRequest const & rhs)
|
||||
ostream & operator<<(ostream & os, FuncRequest const & cmd)
|
||||
{
|
||||
return os
|
||||
<< " action: " << cmd.action()
|
||||
<< " [" << lyxaction.getActionName(cmd.action()) << "] "
|
||||
<< " action: " << cmd.action()
|
||||
<< " [" << lyxaction.getActionName(cmd.action()) << "] "
|
||||
<< " arg: '" << to_utf8(cmd.argument()) << "'"
|
||||
<< " x: " << cmd.x()
|
||||
<< " y: " << cmd.y();
|
||||
}
|
||||
|
||||
|
||||
LyXErr & operator<<(LyXErr &l, FuncRequest const &fr)
|
||||
{
|
||||
ostringstream oss;
|
||||
oss << fr;
|
||||
return l << oss.str();
|
||||
}
|
||||
|
||||
} // namespace lyx
|
||||
|
@ -21,6 +21,8 @@
|
||||
|
||||
namespace lyx {
|
||||
|
||||
class LyXErr;
|
||||
|
||||
/**
|
||||
* This class encapsulates a LyX action and its argument
|
||||
* in order to pass it around easily.
|
||||
@ -108,6 +110,8 @@ bool operator==(FuncRequest const & lhs, FuncRequest const & rhs);
|
||||
|
||||
std::ostream & operator<<(std::ostream &, FuncRequest const &);
|
||||
|
||||
LyXErr & operator<<(LyXErr &, FuncRequest const &);
|
||||
|
||||
|
||||
} // namespace lyx
|
||||
|
||||
|
@ -261,8 +261,7 @@ Inset * InsetText::editXY(Cursor & cur, int x, int y)
|
||||
|
||||
void InsetText::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
{
|
||||
LYXERR(Debug::ACTION, "InsetText::doDispatch()"
|
||||
<< " [ cmd.action() = " << cmd.action() << ']');
|
||||
LYXERR(Debug::ACTION, "InsetText::doDispatch(): cmd: " << cmd);
|
||||
|
||||
if (getLayout().isPassThru()) {
|
||||
// Force any new text to latex_language FIXME: This
|
||||
|
Loading…
Reference in New Issue
Block a user