I take it that no LFUN currently exists to make changes to the paragraph 
params? I couldn't find anything obvious. 

* Should the stuff below be handled by LyXText::dispatch?
* Can I split Paragraph::read,write into two and move the params parts to 
ParagraphParams? Will make it easy to pass the params to the frontends as a 
string.

void ControlParagraph::apply()
{
        if (!bufferIsAvailable())
                return;

        view().apply();

        LyXText * text(bufferview()->getLyXText());
        text->setParagraph(bufferview(),
                           pp_->lineTop(),
                           pp_->lineBottom(),
                           pp_->pagebreakTop(),
                           pp_->pagebreakBottom(),
                           pp_->spaceTop(),
                           pp_->spaceBottom(),
                           pp_->spacing(),
                           pp_->align(),
                           pp_->labelWidthString(),
                           pp_->noindent());

        // Actually apply these settings
        bufferview()->update(text,
                             BufferView::SELECT |
                             BufferView::FITCUR |
                             BufferView::CHANGE);

        buffer()->markDirty();

        lv_.message(_("Paragraph layout set"));
}

-- 
Angus

Reply via email to