]> git.lyx.org Git - features.git/commitdiff
Fix error message positioning
authorMartin Vermeer <martin.vermeer@hut.fi>
Thu, 31 Mar 2005 14:34:57 +0000 (14:34 +0000)
committerMartin Vermeer <martin.vermeer@hut.fi>
Thu, 31 Mar 2005 14:34:57 +0000 (14:34 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9766 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/ChangeLog
src/insets/ExternalSupport.C
src/insets/insetgraphics.C
src/insets/insetnote.C

index 8596597a06388df53795e4653b3f1dd9cfab59cb..58c671b9b33298ab8162a938b745c3714c4ae7d5 100644 (file)
@@ -1,4 +1,11 @@
 
+2005-03-30  Martin Vermeer  <martin.vermeer@hut.fi>
+
+       * ExternalSupport.C (writeExternal):
+       * insetgraphics.C (latex):
+       * insetnote.C (latex, linuxdoc, docbook, plaintext): fix
+       mis-count in computing latex error location
+
 2005-03-21  Alfredo Braunstein  <abraunst@lyx.org>
 
        * insettabular.[Ch]: rename setPos -> setCursorFromCoordinates and
index 5caa740762376d49bd826085246968306def0056..5896bdbd2e6b91f5784df663d71bfaca8c1cb09d 100644 (file)
@@ -314,7 +314,7 @@ int writeExternal(InsetExternalParams const & params,
        str = substituteCommands(params, str, format);
        str = substituteOptions(params, str, format);
        os << str;
-       return int(lyx::count(str.begin(), str.end(),'\n') + 1);
+       return int(lyx::count(str.begin(), str.end(),'\n'));
 }
 
 namespace {
index e6d6bf4dbb55106789eea2b3470d6b1e4162abc6..10040ab8a4242977f8ed587f6a447078f3186e90 100644 (file)
@@ -750,7 +750,7 @@ int InsetGraphics::latex(Buffer const & buf, ostream & os,
        lyxerr[Debug::GRAPHICS] << "InsetGraphics::latex outputting:\n"
                                << latex_str << endl;
        // Return how many newlines we issued.
-       return int(lyx::count(latex_str.begin(), latex_str.end(),'\n') + 1);
+       return int(lyx::count(latex_str.begin(), latex_str.end(),'\n'));
 }
 
 
index 7efca67d458b0928a2092715d960ed9bb2bc3c6b..e317aa1d191d04ba252cf62a328ff3002fe966c3 100644 (file)
@@ -232,7 +232,7 @@ int InsetNote::latex(Buffer const & buf, ostream & os,
        string const str = ss.str();
        os << str;
        // Return how many newlines we issued.
-       return int(lyx::count(str.begin(), str.end(),'\n') + 1);
+       return int(lyx::count(str.begin(), str.end(),'\n'));
 }
 
 
@@ -254,7 +254,7 @@ int InsetNote::linuxdoc(Buffer const & buf, std::ostream & os,
        string const str = ss.str();
        os << str;
        // Return how many newlines we issued.
-       return int(lyx::count(str.begin(), str.end(),'\n') + 1);
+       return int(lyx::count(str.begin(), str.end(),'\n'));
 }
 
 
@@ -276,7 +276,7 @@ int InsetNote::docbook(Buffer const & buf, std::ostream & os,
        string const str = ss.str();
        os << str;
        // Return how many newlines we issued.
-       return int(lyx::count(str.begin(), str.end(),'\n') + 1);
+       return int(lyx::count(str.begin(), str.end(),'\n'));
 }
 
 
@@ -294,7 +294,7 @@ int InsetNote::plaintext(Buffer const & buf, std::ostream & os,
        string const str = ss.str();
        os << str;
        // Return how many newlines we issued.
-       return int(lyx::count(str.begin(), str.end(),'\n') + 1);
+       return int(lyx::count(str.begin(), str.end(),'\n'));
 }