X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FBiblioInfo.cpp;h=f2bf332a2655204b8dbdce3b630bbc4c5fbd0c20;hb=8009edd3d4f3deee5ed8721113bbf31abe9e0aa6;hp=d306c87e5f149cfb254327fb3748f2a71aac1c89;hpb=94e992c5ed71c8b3fbb131e6269f9a1a6cd6ab16;p=lyx.git diff --git a/src/BiblioInfo.cpp b/src/BiblioInfo.cpp index d306c87e5f..f2bf332a26 100644 --- a/src/BiblioInfo.cpp +++ b/src/BiblioInfo.cpp @@ -756,8 +756,7 @@ docstring BibTeXInfo::getValueForKey(string const & oldkey, Buffer const & buf, ret = html::cleanAttr(ret); // make sure it is not too big - if (ret.size() > maxsize) - ret = ret.substr(0, maxsize - 3) + from_ascii("..."); + support::truncateWithEllipsis(ret, maxsize); return ret; } @@ -928,14 +927,9 @@ docstring const BiblioInfo::getLabel(vector keys, before, after, dialog, key + 1 != ken); } - if (ret.size() > max_size) { - ret.resize(max_size - 3); - ret += "..."; - } else if (too_many_keys) { - if (ret.size() > max_size - 3) - ret.resize(max_size - 3); - ret += "..."; - } + if (too_many_keys) + ret.push_back(0x2026);//HORIZONTAL ELLIPSIS + support::truncateWithEllipsis(ret, max_size); return ret; }