+2002-02-22 Juergen Vigna <jug@sad.it>
+
+ * insettext.C (insetUnlock): set the cursor to the second paragraph
+ if available and if the first one is empty (fix #191).
+
2002-02-20 Juergen Vigna <jug@sad.it>
* insettext.C (getDrawFont): implemented this function to call the
} else
bv->owner()->setLayout(bv->text->cursor.par()->getLayout());
// hack for deleteEmptyParMech
- lt->setCursor(bv, par, 0);
+ if (par->size()) {
+ lt->setCursor(bv, par, 0);
+ } else if (par->next()) {
+ lt->setCursor(bv, par->next(), 0);
+ }
if (clear)
lt = 0;
updateLocal(bv, code, false);
template <>
string const write_attribute(string const & name, bool const & b)
{
+ // we write only true attribute values so we remove a bit of the
+ // file format bloat for tabulars.
+ if (!b)
+ return string();
+
return write_attribute(name, int(b));
}
template <>
string const write_attribute(string const & name, LyXLength const & value)
{
+ // we write only the value if we really have one same reson as above.
+ if (value.zero())
+ return string();
+
return write_attribute(name, value.asString());
}
bool getTokenValue(string const & str, const char * token, bool & flag)
{
+ // set the flag always to false as this should be the default for bools
+ // not in the file-format.
+ flag = false;
string tmp;
if (!getTokenValue(str, token, tmp))
return false;
bool getTokenValue(string const & str, const char * token, LyXLength & len)
{
+ // set the lenght to be zero() as default as this it should be if not
+ // in the file format.
+ len = LyXLength();
string tmp;
if (!getTokenValue(str, token, tmp))
return false;