]> git.lyx.org Git - lyx.git/commitdiff
Cure warning message about a missing '\end_inset' when passing data between
authorAngus Leeming <leeming@lyx.org>
Mon, 10 Mar 2003 03:11:54 +0000 (03:11 +0000)
committerAngus Leeming <leeming@lyx.org>
Mon, 10 Mar 2003 03:11:54 +0000 (03:11 +0000)
the core and the dialogs.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6409 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/ChangeLog
src/insets/insetcommand.C
src/insets/insetexternal.C
src/insets/insetfloat.C
src/insets/insetgraphics.C
src/insets/insetinclude.C
src/insets/insetminipage.C
src/insets/insettabular.C
src/insets/insetwrap.C

index c81781103649440fdc743f91617a7bd4ebd5522f..10233ff6ee0ca43e12e738bfe487d049c673e92b 100644 (file)
@@ -1,3 +1,15 @@
+2003-03-10  Angus Leeming  <leeming@lyx.org>
+
+       * insetcommand.C (string2params):
+       * insetexternal.C (string2params):
+       * insetfloat.C (string2params):
+       * insetgraphics.C (string2params):
+       * insetinclude.C (string2params):
+       * insetminipage.C (string2params):
+       * insettabular.C (string2params):
+       * insetwrap.C (string2params): cure warning message about missing
+       '\end_inset'.
+
 2003-03-09  Angus Leeming  <leeming@lyx.org>
 
        * insettabular.[Ch]: define a new class InsetTabularMailer and use
index 2759492a4471eba77af587994796b8c6302dff0e..70676127b95159e4e788518b74b33b1756bab05f 100644 (file)
@@ -127,7 +127,17 @@ void InsetCommandMailer::string2params(string const & in,
                string const name = lex.getString();
        }
 
-       params.read(lex);
+       // This is part of the inset proper that is usually swallowed
+       // by Buffer::readInset
+       if (lex.isOK()) {
+               lex.next();
+               string const token = lex.getString();
+               if (token != "LatexCommand")
+                       return;
+       }
+       if (lex.isOK()) {
+               params.read(lex);
+       }
 }
 
 
index c377a7780c4fe0fecef9a85a5d586c4ac013d8ad..9b8ffe451c0b9984236e4608c7bad675bbdc99f7 100644 (file)
@@ -401,9 +401,11 @@ void InsetExternalMailer::string2params(string const & in,
                        return;
        }
 
-       InsetExternal inset;    
-       inset.read(0, lex);
-       params = inset.params();
+       if (lex.isOK()) {
+               InsetExternal inset;    
+               inset.read(0, lex);
+               params = inset.params();
+       }
 }
 
 
index 7565a0d5261115df5de12fad5109da05f99480a4..27ae97c90ceccf00aaf4cd3370df3f009342da80 100644 (file)
@@ -440,7 +440,9 @@ void InsetFloatMailer::string2params(string const & in,
                        return;
        }
 
-       params.read(lex);
+       if (lex.isOK()) {
+               params.read(lex);
+       }
 }
 
 
index ab60e9ba70be7a7262b2bcb451e6beafc516ab51..c03c06a6ac620c87d3d6d46a3569cbb81851c101 100644 (file)
@@ -907,9 +907,11 @@ void InsetGraphicsMailer::string2params(string const & in,
                        return;
        }
 
-       InsetGraphics inset;    
-       inset.readInsetGraphics(lex);
-       params = inset.params();
+       if (lex.isOK()) {
+               InsetGraphics inset;    
+               inset.readInsetGraphics(lex);
+               params = inset.params();
+       }
 }
 
 
index 2057a751f99824767ee323411094e61a79e511a3..b03f9392024079541ae95a29d4bac07f0b46efdb 100644 (file)
@@ -667,9 +667,11 @@ void InsetIncludeMailer::string2params(string const & in,
                        return;
        }
 
-       InsetInclude inset(params);     
-       inset.read(0, lex);
-       params = inset.params();
+       if (lex.isOK()) {
+               InsetInclude inset(params);     
+               inset.read(0, lex);
+               params = inset.params();
+       }
 }
 
 
index ba8327fe6d1a4a4bbc62e3aa6a44aa8173c09677..7586407a7d5c0618ac9354ed1bb4fd010a90d40c 100644 (file)
@@ -445,7 +445,9 @@ void InsetMinipageMailer::string2params(string const & in,
                        return;
        }
 
-       params.read(lex);
+       if (lex.isOK()) {
+               params.read(lex);
+       }
 }
 
 
index edfdcfad6ef0cfadff852b0ae71dbe62232aca8a..e43c89c79bcbb1e7e19596c20a7b84460faf56ae 100644 (file)
@@ -3085,6 +3085,9 @@ int InsetTabularMailer::string2params(string const & in, InsetTabular & inset)
                        return -1;
        }
 
+       if (!lex.isOK())
+               return -1;
+
        BufferView * const bv = inset.view();
        Buffer const * const buffer = bv ? bv->buffer() : 0;
        if (buffer)
index 72e20512cf388c020cc0ca7fed032ff92791c7d0..3851bfcc3211db5c28728b0328b66916fd9cc553 100644 (file)
@@ -355,7 +355,9 @@ void InsetWrapMailer::string2params(string const & in,
                        return;
        }
 
-       params.read(lex);
+       if (lex.isOK()) {
+               params.read(lex);
+       }
 }