X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fvspace.C;h=36d28a845a76dc2e6d38ab0e6270d3c3aba513c5;hb=ab254289c832cd045c56e6012d14b048618cb833;hp=a3b94aa0547f34f383f5b54154d4f66bf5bf4094;hpb=f284f1c8bc45e7a7c9162a3df0a8e748a5d0a717;p=lyx.git diff --git a/src/vspace.C b/src/vspace.C index a3b94aa054..36d28a845a 100644 --- a/src/vspace.C +++ b/src/vspace.C @@ -1,11 +1,10 @@ -// -*- C++ -*- /* This file is part of * ====================================================== * * LyX, The Document Processor * * Copyright 1995 Matthias Ettrich - * Copyright 1995-2000 The LyX Team. + * Copyright 1995-2001 The LyX Team. * * ====================================================== */ @@ -15,6 +14,8 @@ #pragma implementation "vspace.h" #endif +#include + #include "lyx_main.h" #include "buffer.h" #include "vspace.h" @@ -337,13 +338,13 @@ string const LyXLength::asLatexString() const switch(uni) { case PW: case PE: - buffer << "." << abs(static_cast(val)) << "\\columnwidth"; + buffer << abs(static_cast(val/100)) << "." << abs(static_cast(val)%100) << "\\columnwidth"; break; case PP: - buffer << "." << abs(static_cast(val)) << "\\pagewidth"; + buffer << "." << abs(static_cast(val/100)) << "." << abs(static_cast(val)%100) << "\\pagewidth"; break; case PL: - buffer << "." << abs(static_cast(val)) << "\\linewidth"; + buffer << "." << abs(static_cast(val/100)) << "." << abs(static_cast(val)%100) << "\\linewidth"; break; default: buffer << val << unit_name[uni]; // setw? @@ -549,7 +550,7 @@ string const VSpace::asLatexCommand(BufferParams const & params) const int VSpace::inPixels(BufferView * bv) const { // Height of a normal line in pixels (zoom factor considered) - int height = bv->text->DefaultHeight(); // [pixels] + int height = bv->text->defaultHeight(); // [pixels] int skip = 0; int width = bv->workWidth();