X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FVSpace.cpp;h=19f6af41a1f638d282263e6f6be1ef01ccdf19a3;hb=70a24259f8e3eb75677178ef5e28ecbb51c2935b;hp=0cbf1bbb0b15357b5af80daacbeb1792a6f044cd;hpb=7f461f4392a19cf488dec005d2f12cfea83655d9;p=lyx.git diff --git a/src/VSpace.cpp b/src/VSpace.cpp index 0cbf1bbb0b..19f6af41a1 100644 --- a/src/VSpace.cpp +++ b/src/VSpace.cpp @@ -23,7 +23,7 @@ #include "support/convert.h" #include "support/lstrings.h" -#include "support/assert.h" +#include "support/lassert.h" #include @@ -493,6 +493,24 @@ docstring const VSpace::asGUIName() const } +string VSpace::asHTMLLength() const +{ + string result; + switch (kind_) { + case DEFSKIP: result = "2ex"; break; + case SMALLSKIP: result = "1ex"; break; + case MEDSKIP: result = "3ex"; break; + case BIGSKIP: result = "5ex"; break; + case LENGTH: { + Length tmp = len_.len(); + if (tmp.value() > 0) + result = tmp.asHTMLString(); + } + case VFILL: break; + } + return result; +} + int VSpace::inPixels(BufferView const & bv) const { // Height of a normal line in pixels (zoom factor considered)