+2004-08-05 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
+
+ * kbsequence.C (print): use UI native formatting for menu
+ shortcuts
+
+ * text.C (insertChar): call Paragraph::insertChar with a font
+ argument (cosmetic)
+
+ * paragraph.C (insertInset, insertChar): the version that takes a
+ LyXFont argument is now a wrapper around the other one (the
+ opposite used to be true).
+
+ * paragraph_pimpl.C (insertInset, insertChar): remove the LyXFont
+ argument. Font setting is done in Paragraph now.
+
2004-08-04 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* outputparams.h: add new members intitle and lang.
KeySequence::size_type i, length = sequence.size();
for (i = 0; i < length; ++i) {
- buf += kb_keymap::printKeySym(*sequence[i], modifiers[i].first);
+ buf += sequence[i]->print(modifiers[i].first);
// append a blank
if (i + 1 < length) {
}
-void Paragraph::insertChar(pos_type pos, Paragraph::value_type c)
+void Paragraph::insertChar(pos_type pos, Paragraph::value_type c,
+ Change change)
{
- insertChar(pos, c, LyXFont(LyXFont::ALL_INHERIT));
+ pimpl_->insertChar(pos, c, change);
}
void Paragraph::insertChar(pos_type pos, Paragraph::value_type c,
LyXFont const & font, Change change)
{
- pimpl_->insertChar(pos, c, font, change);
+ pimpl_->insertChar(pos, c, change);
+ setFont(pos, font);
}
-void Paragraph::insertInset(pos_type pos, InsetBase * inset)
+void Paragraph::insertInset(pos_type pos, InsetBase * inset, Change change)
{
- insertInset(pos, inset, LyXFont(LyXFont::ALL_INHERIT));
+ pimpl_->insertInset(pos, inset, change);
}
void Paragraph::insertInset(pos_type pos, InsetBase * inset,
- LyXFont const & font, Change change)
+ LyXFont const & font, Change change)
{
- pimpl_->insertInset(pos, inset, font, change);
+ pimpl_->insertInset(pos, inset, change);
+ setFont(pos, font);
}
void insert(lyx::pos_type pos, std::string const & str,
LyXFont const & font);
///
- void insertChar(lyx::pos_type pos, value_type c);
+ void insertChar(lyx::pos_type pos, value_type c,
+ Change change = Change(Change::INSERTED));
///
void insertChar(lyx::pos_type pos, value_type c,
LyXFont const &, Change change = Change(Change::INSERTED));
///
bool checkInsertChar(LyXFont &);
///
- void insertInset(lyx::pos_type pos, InsetBase * inset);
+ void insertInset(lyx::pos_type pos, InsetBase * inset,
+ Change change = Change(Change::INSERTED));
///
void insertInset(lyx::pos_type pos, InsetBase * inset,
LyXFont const &, Change change = Change(Change::INSERTED));
}
-void Paragraph::Pimpl::insertChar(pos_type pos, value_type c,
- LyXFont const & font, Change change)
+void Paragraph::Pimpl::insertChar(pos_type pos, value_type c, Change change)
{
BOOST_ASSERT(pos <= size());
if (pos == size()) {
// when appending characters, no need to update tables
owner_->text_.push_back(c);
- owner_->setFont(pos, font);
return;
}
// Update the insets
owner_->insetlist.increasePosAfterPos(pos);
-
- owner_->setFont(pos, font);
}
void Paragraph::Pimpl::insertInset(pos_type pos,
- InsetBase * inset, LyXFont const & font, Change change)
+ InsetBase * inset, Change change)
{
BOOST_ASSERT(inset);
BOOST_ASSERT(pos <= size());
- insertChar(pos, META_INSET, font, change);
+ insertChar(pos, META_INSET, change);
BOOST_ASSERT(owner_->text_[pos] == META_INSET);
// Add a new entry in the insetlist.
///
void setChar(lyx::pos_type pos, value_type c);
///
- void insertChar(lyx::pos_type pos, value_type c,
- LyXFont const & font, Change change = Change(Change::INSERTED));
+ void insertChar(lyx::pos_type pos, value_type c, Change change);
///
- void insertInset(lyx::pos_type pos, InsetBase * inset,
- LyXFont const & font, Change change = Change(Change::INSERTED));
+ void insertInset(lyx::pos_type pos, InsetBase * inset, Change change);
/// definite erase
void eraseIntern(lyx::pos_type pos);
/// erase the given position. Returns true if it was actually erased
}
}
- par.insertChar(cur.pos(), c);
- setCharFont(pit, cur.pos(), rawtmpfont);
+ par.insertChar(cur.pos(), c, rawtmpfont);
current_font = rawtmpfont;
real_current_font = realtmpfont;