static bool moveItem(Paragraph & fromPar, pos_type fromPos,
Paragraph & toPar, pos_type toPos, BufferParams const & params)
{
// Note: moveItem() does not honour change tracking!
// Therefore, it should only be used for breaking and merging paragraphs
static bool moveItem(Paragraph & fromPar, pos_type fromPos,
Paragraph & toPar, pos_type toPos, BufferParams const & params)
{
// Note: moveItem() does not honour change tracking!
// Therefore, it should only be used for breaking and merging paragraphs
Font const tmpFont = fromPar.getFontSettings(params, fromPos);
Change const tmpChange = fromPar.lookupChange(fromPos);
Font const tmpFont = fromPar.getFontSettings(params, fromPos);
Change const tmpChange = fromPar.lookupChange(fromPos);
// marked as unmodified. Otherwise, its change is adopted by the first
// character of the next paragraph.
if (par.lookupChange(par.size()).type != Change::UNCHANGED) {
// marked as unmodified. Otherwise, its change is adopted by the first
// character of the next paragraph.
if (par.lookupChange(par.size()).type != Change::UNCHANGED) {
Font const outerFont(pit_type par_offset, ParagraphList const & pars)
{
depth_type par_depth = pars[par_offset].getDepth();
Font const outerFont(pit_type par_offset, ParagraphList const & pars)
{
depth_type par_depth = pars[par_offset].getDepth();
- return tmpfont;
-}
-
-
-/// return the number of InsetOptArg in a paragraph
-int numberOfOptArgs(Paragraph const & par)
-{
- int num = 0;
-
- InsetList::const_iterator it = par.insetList().begin();
- InsetList::const_iterator end = par.insetList().end();
- for (; it != end ; ++it) {
- if (it->inset->lyxCode() == OPTARG_CODE)
- ++num;
- }
- return num;