From: Jean-Marc Lasgouttes Date: Mon, 20 Oct 2003 13:55:51 +0000 (+0000) Subject: fix bug 1415; fix annoying typo X-Git-Tag: 1.6.10~15929 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=173be73b2737e1f3e45f7989bf031f4c57d9b581;p=features.git fix bug 1415; fix annoying typo git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7938 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index e6844ff92c..c941076080 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2003-10-20 Jean-Marc Lasgouttes + + * text.C (rightMargin): remove spurious semicolon + + * lengthcommon.C: add empty unit_name* entries for UNIT_NONE (bug + 1415) + 2003-10-18 Martin Vermeer * text3.C: fix one crash due to wrong cursor def diff --git a/src/lengthcommon.C b/src/lengthcommon.C index 887302296d..c8e89ed5a5 100644 --- a/src/lengthcommon.C +++ b/src/lengthcommon.C @@ -26,14 +26,14 @@ int const num_units = LyXLength::UNIT_NONE; // unit_name is for compatibility. Can be deleted when all works well. // means, when we have full language support for the lengths // in all gui's (Herbert 2002-11-01) -char const * unit_name[num_units] = { +char const * unit_name[num_units + 1] = { "sp", "pt", "bp", "dd", "mm", "pc", "cc", "cm", "in", "ex", "em", "mu", "text%", "col%", "page%", "line%", - "theight%", "pheight%" }; + "theight%", "pheight%", "" }; // the latex units -char const * unit_name_ltx[num_units] = { +char const * unit_name_ltx[num_units + 1] = { "sp", "pt", "bp", "dd", "mm", "pc", "cc", "cm", "in", "ex", "em", "mu", // in 1.4 the following names should be used. then no @@ -41,14 +41,14 @@ char const * unit_name_ltx[num_units] = { // "textheight", "columnwidth", "pagewidth", "linewidth", // "textheight", "pageheight" }; "text%", "col%", "page%", "line%", - "theight%", "pheight%" }; + "theight%", "pheight%", "" }; // the LyX gui units -char const * unit_name_gui[num_units] = { +char const * unit_name_gui[num_units + 1] = { N_("sp"), N_("pt"), N_("bp"), N_("dd"), N_("mm"), N_("pc"), N_("cc"), N_("cm"), N_("in"), N_("ex"), N_("em"), N_("mu"), N_("text%"), N_("col%"), N_("page%"), N_("line%"), - N_("theight%"), N_("pheight%") }; + N_("theight%"), N_("pheight%"), "" }; // this one maybe better ???? but there can be problems with // xforms (Herbert) diff --git a/src/text.C b/src/text.C index 6e6a0bd7f4..0620599b0e 100644 --- a/src/text.C +++ b/src/text.C @@ -609,7 +609,7 @@ int LyXText::rightMargin(Paragraph const & par, return PAPER_MARGIN + font_metrics::signedWidth(tclass.rightmargin(), - tclass.defaultfont()); + tclass.defaultfont()) + font_metrics::signedWidth(layout->rightmargin, tclass.defaultfont()) * 4 / (par.getDepth() + 4);