mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
strip out |++| nonsense
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6341 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
70687ca7fc
commit
ea878552c4
@ -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.
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
@ -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;
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user