From 060cb00dfcc1d8ecca9c4042f5002db5ba95e9c7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Wed, 8 May 2002 17:20:55 +0000 Subject: [PATCH] ork around missing argument for layout git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4140 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView_pimpl.C | 11 +++++++++++ src/ChangeLog | 9 +++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index c9ea415853..e106c4181e 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -1808,6 +1808,17 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument) lyxerr[Debug::INFO] << "LFUN_LAYOUT: (arg) " << argument << endl; + // This is not the good solution to the empty argument + // problem, but it will hopefully suffice for 1.2.0. + // The correct solution would be to augument the + // function list/array with information about what + // functions needs arguments and their type. + if (argument.empty()) { + owner_->getLyXFunc()->setErrorMessage( + _("LyX function 'layout' needs an argument.")); + break; + } + // Derive layout number from given argument (string) // and current buffer's textclass (number). */ bool hasLayout = tclass.hasLayout(argument); diff --git a/src/ChangeLog b/src/ChangeLog index a2c9ac1541..ea75c3ad25 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2002-05-08 Lars Gullik Bjønnes + + * BufferView_pimpl.C (Dispatch): work around missing argument for + 'layout' + 2002-05-08 Juergen Vigna * text.C (leftMargin): handle paragraph leftindent. @@ -23,12 +28,12 @@ 2002-05-05 Dekel Tsur * paragraph.C (isRightToLeftPar): Return false for a paragraph - inside insetERT. + inside insetERT. * text.C (computeBidiTables): No bidi in insetERT. * BufferView_pimpl.C (setState): Fix keymap handling inside insetERT - in RTL documents. + in RTL documents. 2002-05-03 Lars Gullik Bjønnes -- 2.39.2