From 5f3773f2b89ba9f19079ab8702b33bd8fb2d06a5 Mon Sep 17 00:00:00 2001 From: Allan Rae Date: Wed, 5 Dec 2001 05:26:22 +0000 Subject: [PATCH] John's getLyXText() fix git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3147 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/xforms/ChangeLog | 5 +++++ src/frontends/xforms/FormParagraph.C | 14 ++------------ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index f526a51536..0fcfe18da4 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,8 @@ +2001-12-05 John Levon + + * FormParagraph.C (getCurrentParagraph): + (apply): get the right LyXText ! + 2001-11-29 John Levon * FormParagraph.C: disallow page breaks in insets diff --git a/src/frontends/xforms/FormParagraph.C b/src/frontends/xforms/FormParagraph.C index e8e87c6135..791af6a5a2 100644 --- a/src/frontends/xforms/FormParagraph.C +++ b/src/frontends/xforms/FormParagraph.C @@ -63,13 +63,7 @@ void FormParagraph::disconnect() Paragraph const * FormParagraph::getCurrentParagraph() const { - LyXText * text = 0; - - if (lv_->view()->theLockingInset()) - text = lv_->view()->theLockingInset()->getLyXText(lv_->view()); - if (!text) - text = lv_->view()->text; - return text->cursor.par(); + return lv_->view()->getLyXText()->cursor.par(); } @@ -278,11 +272,7 @@ void FormParagraph::apply() } Spacing const spacing(linespacing, other_linespacing); - LyXText * text = 0; - if (lv_->view()->theLockingInset()) - text = lv_->view()->theLockingInset()->getLyXText(lv_->view()); - if (!text) - text = lv_->view()->text; + LyXText * text(lv_->view()->getLyXText()); text->setParagraph(lv_->view(), line_top, line_bottom, pagebreak_top, pagebreak_bottom, space_top, space_bottom, spacing, align, labelwidthstring, noindent); -- 2.39.5