From 2e801efc572521bea1e86304691f598a85ead65e Mon Sep 17 00:00:00 2001 From: Martin Vermeer Date: Thu, 31 Mar 2005 14:34:57 +0000 Subject: [PATCH] Fix error message positioning git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9766 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/ChangeLog | 7 +++++++ src/insets/ExternalSupport.C | 2 +- src/insets/insetgraphics.C | 2 +- src/insets/insetnote.C | 8 ++++---- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 8596597a06..58c671b9b3 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,4 +1,11 @@ +2005-03-30 Martin Vermeer + + * 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 * insettabular.[Ch]: rename setPos -> setCursorFromCoordinates and diff --git a/src/insets/ExternalSupport.C b/src/insets/ExternalSupport.C index 5caa740762..5896bdbd2e 100644 --- a/src/insets/ExternalSupport.C +++ b/src/insets/ExternalSupport.C @@ -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 { diff --git a/src/insets/insetgraphics.C b/src/insets/insetgraphics.C index e6d6bf4dbb..10040ab8a4 100644 --- a/src/insets/insetgraphics.C +++ b/src/insets/insetgraphics.C @@ -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')); } diff --git a/src/insets/insetnote.C b/src/insets/insetnote.C index 7efca67d45..e317aa1d19 100644 --- a/src/insets/insetnote.C +++ b/src/insets/insetnote.C @@ -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')); } -- 2.39.2