]> git.lyx.org Git - features.git/commitdiff
fix bug 1415; fix annoying typo
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 20 Oct 2003 13:55:51 +0000 (13:55 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 20 Oct 2003 13:55:51 +0000 (13:55 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7938 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/lengthcommon.C
src/text.C

index e6844ff92c5de8221b35bd1b13eaa59304a607a6..c941076080c89cfa3d7856954f5c00d54492780f 100644 (file)
@@ -1,3 +1,10 @@
+2003-10-20  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * text.C (rightMargin): remove spurious semicolon
+
+       * lengthcommon.C: add empty unit_name* entries for UNIT_NONE (bug
+       1415)
+
 2003-10-18  Martin Vermeer  <martin.vermeer@hut.fi>
 
        * text3.C: fix one crash due to wrong cursor def
index 887302296de82b03238362a48eb46d5433fd198c..c8e89ed5a5b75b666d77611281c53e45ca9faa70 100644 (file)
@@ -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)
index 6e6a0bd7f453031370e4831f31d180cf68f9a073..0620599b0ed544689f5bf425261f6a9424c9b4ef 100644 (file)
@@ -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);