X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetlatex.C;h=38175672a3d622c6d279a7d054c341b70cdfc86f;hb=3c8aba3b556871fb1100a2f98cd93d5d4e3f70c9;hp=dbc6fd826212dbcc8e3a846956b1c5fc6d264149;hpb=dfe1bc44b44903faf77ef454c98c4c3e56c1d5e3;p=lyx.git diff --git a/src/insets/insetlatex.C b/src/insets/insetlatex.C index dbc6fd8262..38175672a3 100644 --- a/src/insets/insetlatex.C +++ b/src/insets/insetlatex.C @@ -1,12 +1,12 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * * Copyright 1995 Matthias Ettrich * Copyright 1995-1999 The LyX Team. * - * ======================================================*/ + * ====================================================== */ #include @@ -14,7 +14,6 @@ #pragma implementation #endif -#include "definitions.h" #include "insetlatex.h" #include "lyxdraw.h" @@ -67,7 +66,7 @@ void InsetLatex::Draw(LyXFont font, LyXScreen & scr, scr.fillRectangle(gc_lighted, int(x), baseline - Ascent(font) +1 , Width(font) - 2, Ascent(font) + Descent(font) -2); - scr.drawRectangle(gc_foot,int(x), baseline - Ascent(font) + 1, + scr.drawRectangle(gc_foot, int(x), baseline - Ascent(font) + 1, Width(font)-2, Ascent(font)+Descent(font)-2); scr.drawString(font, contents, baseline, int(x+2)); @@ -93,14 +92,21 @@ void InsetLatex::Read(LyXLex & lex) } -int InsetLatex::Latex(FILE * file, signed char /*fragile*/) +int InsetLatex::Latex(FILE * file, signed char /*fragile*/, bool /*fs*/) { fprintf(file, "%s", contents.c_str()); return 0; } -int InsetLatex::Latex(string & file, signed char /*fragile*/) +int InsetLatex::Latex(string & file, signed char /*fragile*/, bool /*fs*/) +{ + file += contents; + return 0; +} + + +int InsetLatex::Ascii(string & file) { file += contents; return 0; @@ -127,7 +133,7 @@ bool InsetLatex::Deletable() const } -Inset * InsetLatex::Clone() +InsetLatex * InsetLatex::Clone() const { InsetLatex * result = new InsetLatex(contents); return result;