]> git.lyx.org Git - lyx.git/blobdiff - src/text.C
- Link against qt-mt333.lib which is what the current qt3 cvs produces
[lyx.git] / src / text.C
index dc94664fe5ef81e5b1d0e57c58d60299217ab794..089dceb5c274ff9b055c840d5fca7038c269b1c1 100644 (file)
@@ -67,7 +67,7 @@
 
 #include "support/lstrings.h"
 #include "support/textutils.h"
-#include "support/tostr.h"
+#include "support/convert.h"
 
 #include <sstream>
 
@@ -1000,6 +1000,14 @@ void LyXText::setHeightOfRow(pit_type const pit, Row & row)
        maxasc  += int(layoutasc  * 2 / (2 + pars_[pit].getDepth()));
        maxdesc += int(layoutdesc * 2 / (2 + pars_[pit].getDepth()));
 
+       // Top and bottom margin of the document (only at top-level)
+       if (bv_owner->text() == this) {
+               if (pit == 0 && row.pos() == 0)
+                       maxasc += 20;
+               if (pit == pars_.size() - 1 && row.endpos() == par.size())
+                       maxdesc += 20;
+       }
+
        row.ascent(maxasc + labeladdon);
        row.descent(maxdesc);
 }