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')); }