]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetNomencl.cpp
When selecting special logos, set their color correctly
[lyx.git] / src / insets / InsetNomencl.cpp
index 227976623bbb637fcc38fb4b3096519acc7b9de0..2595b14a6992b35f04797aae1888718bbc58b53d 100644 (file)
@@ -31,6 +31,7 @@
 #include "OutputParams.h"
 #include "output_xhtml.h"
 #include "sgml.h"
+#include "texstream.h"
 #include "TocBackend.h"
 
 #include "frontends/FontMetrics.h"
@@ -75,12 +76,8 @@ ParamInfo const & InsetNomencl::findInfo(string const & /* cmdName */)
 docstring InsetNomencl::screenLabel() const
 {
        size_t const maxLabelChars = 25;
-
        docstring label = _("Nom: ") + getParam("symbol");
-       if (label.size() > maxLabelChars) {
-               label.erase(maxLabelChars - 3);
-               label += "...";
-       }
+       support::truncateWithEllipsis(label, maxLabelChars);
        return label;
 }
 
@@ -175,7 +172,7 @@ docstring InsetPrintNomencl::screenLabel() const
 
 
 struct NomenclEntry {
-       NomenclEntry() {}
+       NomenclEntry() : par(0) {}
        NomenclEntry(docstring s, docstring d, Paragraph const * p)
          : symbol(s), desc(d), par(p)
        {}