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; ///