X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FVSpace.cpp;h=6e065964039e7ca6e1d3f02da613f81e795b0230;hb=28be7d552f62cc02fa86d7f79201d089bfb2d7b5;hp=72315072d61c8b646e47655f54fb0f57931ff8d1;hpb=9b8773826cb2a59eb563e6f98883912ce591047e;p=lyx.git diff --git a/src/VSpace.cpp b/src/VSpace.cpp index 72315072d6..6e06596403 100644 --- a/src/VSpace.cpp +++ b/src/VSpace.cpp @@ -147,9 +147,10 @@ string const VSpace::asLatexCommand(BufferParams const & params) const : "\\vspace{" + len_.asLatexString() + '}'; default: - LASSERT(false, /**/); - return string(); + LATTEST(false); + // fall through in release mode } + return string(); } @@ -200,6 +201,7 @@ string VSpace::asHTMLLength() const return result; } + int VSpace::inPixels(BufferView const & bv) const { // Height of a normal line in pixels (zoom factor considered) @@ -210,13 +212,13 @@ int VSpace::inPixels(BufferView const & bv) const case DEFSKIP: return bv.buffer().params().getDefSkip().inPixels(bv); - // This is how the skips are normally defined by LateX. + // This is how the skips are normally defined by LaTeX. // But there should be some way to change this per document. case SMALLSKIP: - return default_height / 4; + return int(default_height / 4); case MEDSKIP: - return default_height / 2; + return int(default_height / 2); case BIGSKIP: return default_height; @@ -226,12 +228,13 @@ int VSpace::inPixels(BufferView const & bv) const return 3 * default_height; case LENGTH: - return len_.len().inPixels(bv.workWidth()); + return bv.inPixels(len_.len()); default: - LASSERT(false, /**/); - return 0; + LATTEST(false); + // fall through in release mode } + return 0; }