mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-05 13:26:21 +00:00
have row information on state line + one more bformat variant
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7663 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
781e0ef62e
commit
2faa06b829
@ -10,6 +10,10 @@
|
||||
up the dialogs. Cursor has to be in front of the inset (i.e.
|
||||
start of row) for this to function.
|
||||
|
||||
2003-09-04 Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||
|
||||
* bufferview_funcs.C (currentState): output row information
|
||||
|
||||
2003-09-04 Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||
|
||||
* bufferview_funcs.C (currentState): output paragraph position
|
||||
|
@ -364,6 +364,8 @@ string const currentState(BufferView * bv)
|
||||
#ifdef DEVEL_VERSION
|
||||
state << _(", Paragraph: ") << text->cursor.par()->id();
|
||||
state << _(", Position: ") << text->cursor.pos();
|
||||
RowList::iterator rit = text->cursorRow();
|
||||
state << bformat(_(", Row b:%1$d e:%2$d"), rit->pos(), rit->end());
|
||||
state << _(", Inset: ") <<
|
||||
(text->cursor.par()->inInset() ? text->cursor.par()->inInset()->id() : -1);
|
||||
#endif
|
||||
|
@ -1,3 +1,7 @@
|
||||
2003-09-04 Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||
|
||||
* lstrings.[Ch] (bformat): add a variant taking two ints.
|
||||
|
||||
2003-09-04 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* filetools.h:
|
||||
|
@ -627,6 +627,12 @@ string bformat(string const & fmt, string const & arg1, string const & arg2)
|
||||
}
|
||||
|
||||
|
||||
string bformat(string const & fmt, int arg1, int arg2)
|
||||
{
|
||||
return STRCONV((boost::format(STRCONV(fmt)) % arg1 % arg2).str());
|
||||
}
|
||||
|
||||
|
||||
string bformat(string const & fmt, string const & arg1, string const & arg2,
|
||||
string const & arg3)
|
||||
{
|
||||
@ -671,6 +677,16 @@ string bformat(string const & fmt, string const & arg1, string const & arg2)
|
||||
}
|
||||
|
||||
|
||||
string bformat(string const & fmt, int arg1, int arg2)
|
||||
{
|
||||
Assert(contains(fmt, "%1$d"));
|
||||
Assert(contains(fmt, "%2$d"));
|
||||
string str = subst(fmt, "%1$d", arg1);
|
||||
str = subst(str, "%2$d", arg2);
|
||||
return subst(str, "%%", "%");
|
||||
}
|
||||
|
||||
|
||||
string bformat(string const & fmt, string const & arg1, string const & arg2,
|
||||
string const & arg3)
|
||||
{
|
||||
|
@ -206,6 +206,8 @@ string const getStringFromVector(std::vector<string> const & vec,
|
||||
string bformat(string const & fmt, string const & arg1);
|
||||
// arguments %1$s and %2$s
|
||||
string bformat(string const & fmt, string const & arg1, string const & arg2);
|
||||
// arguments %1$d and %2$d
|
||||
string bformat(string const & fmt, int arg1, int arg2);
|
||||
// arguments %1$s and %2$s and %3$s
|
||||
string bformat(string const & fmt, string const & arg1, string const & arg2,
|
||||
string const & arg3);
|
||||
|
Loading…
Reference in New Issue
Block a user