From ea878552c4bcf181ffc1425ab89c00c2c41a72c3 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Tue, 4 Mar 2003 18:54:56 +0000 Subject: [PATCH] strip out |++| nonsense git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6341 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/ChangeLog | 2 ++ src/mathed/command_inset.C | 14 ++------------ src/mathed/command_inset.h | 4 ++-- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index b9fa3f9598..69bf59cb93 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -2,6 +2,8 @@ * command_inset.[Ch] (createDialogStr): a new function to generate something that the frontend Dialogs will understand. + (c-tor): the string passed to the c-tor is now understood to be + simply the inset's name, not some strange beast containing "|++|". * math_factory.[Ch] (createMathInset_fromDialogStr): new function parses the string passed from the frontends. diff --git a/src/mathed/command_inset.C b/src/mathed/command_inset.C index f8a03c2e38..34956bcdff 100644 --- a/src/mathed/command_inset.C +++ b/src/mathed/command_inset.C @@ -5,20 +5,10 @@ #include "Lsstream.h" -CommandInset::CommandInset(string const & data) +CommandInset::CommandInset(string const & name) + : name_(name) { lock_ = true; - - string::size_type idx0 = data.find("|++|"); - name_ = data.substr(0, idx0); - if (idx0 == string::npos) - return; - idx0 += 4; - string::size_type idx1 = data.find("|++|", idx0); - cell(0) = asArray(data.substr(idx0, idx1 - idx0)); - if (idx1 == string::npos) - return; - cell(1) = asArray(data.substr(idx1 + 4)); } diff --git a/src/mathed/command_inset.h b/src/mathed/command_inset.h index 9902afc811..d8264067d7 100644 --- a/src/mathed/command_inset.h +++ b/src/mathed/command_inset.h @@ -20,8 +20,8 @@ /// Inset for things like \name[options]{contents} class CommandInset : public ButtonInset { public: - /// name, contents, options deliminited by '|++|' - explicit CommandInset(string const & data); + /// + explicit CommandInset(string const & name); /// MathInset * clone() const; ///