X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fvspace.C;h=c1fdbf71ad93d5747f5dc0a219b58b96658fdd18;hb=7b3e212744e532ce0fab58c7e6bc7e3fd180d79a;hp=2ed5a50faa57c104beb37c385edf3f08e9febcad;hpb=342cdf432246110db37bee4e0aebb4b72c933ddb;p=lyx.git diff --git a/src/vspace.C b/src/vspace.C index 2ed5a50faa..c1fdbf71ad 100644 --- a/src/vspace.C +++ b/src/vspace.C @@ -14,17 +14,21 @@ #include "buffer.h" #include "bufferparams.h" #include "BufferView.h" +#include "gettext.h" #include "lengthcommon.h" #include "lyxtext.h" #include "support/convert.h" #include "support/lstrings.h" -using lyx::support::compare; -using lyx::support::isStrDbl; -using lyx::support::ltrim; -using lyx::support::prefixIs; -using lyx::support::rtrim; + +namespace lyx { + +using support::compare; +using support::isStrDbl; +using support::ltrim; +using support::prefixIs; +using support::rtrim; using std::string; @@ -478,6 +482,34 @@ string const VSpace::asLatexCommand(BufferParams const & params) const } +docstring const VSpace::asGUIName() const +{ + docstring result; + switch (kind_) { + case DEFSKIP: + result = _("Default skip"); + break; + case SMALLSKIP: + result = _("Small skip"); + break; + case MEDSKIP: + result = _("Medium skip"); + break; + case BIGSKIP: + result = _("Big skip"); + break; + case VFILL: + result = _("Vertical fill"); + break; + case LENGTH: + result = from_ascii(len_.asString()); + break; + } + if (keep_) + result += ", " + _("protected"); + return result; +} + int VSpace::inPixels(BufferView const & bv) const { @@ -512,3 +544,6 @@ int VSpace::inPixels(BufferView const & bv) const return 0; } } + + +} // namespace lyx