]> git.lyx.org Git - lyx.git/blob - src/Dimension.cpp
Add a constructor of UndoGroupHelper that uses a CursorData parameter
[lyx.git] / src / Dimension.cpp
1 /**
2  * \file Dimension.cpp
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  *  \author André Pönitz
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "Dimension.h"
14
15 #include "support/lassert.h"
16
17 namespace lyx {
18
19 void Dimension::operator+=(Dimension const & dim)
20 {
21         if (asc < dim.asc)
22                 asc = dim.asc;
23         if (des < dim.des)
24                 des = dim.des;
25         wid += dim.wid;
26 }
27
28
29 Point::Point(int px, int py) : x(px), y(py)
30 {
31         LASSERT(px > -1000000, x = -1000000);
32         LASSERT(px <  1000000, x =  1000000);
33         LASSERT(py > -1000000, y = -1000000);
34         LASSERT(py <  1000000, y =  1000000);
35 }
36
37 } // namespace lyx