X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flyxlength.C;h=c38e7a33729300a0e59ae5ecafa17f3faedb16a1;hb=a9713c5563c924f4ab98bde3d9f24a5c1e4dd50e;hp=ff1b580c094784b0fa70dbfc2899f6bbf9f9a0c2;hpb=53274e31ec1cc715c0b48921ee67818790c2e99a;p=lyx.git diff --git a/src/lyxlength.C b/src/lyxlength.C index ff1b580c09..c38e7a3372 100644 --- a/src/lyxlength.C +++ b/src/lyxlength.C @@ -10,10 +10,6 @@ #include -#ifdef __GNUG__ -#pragma implementation -#endif - #include "lyxlength.h" #include "lengthcommon.h" #include "lyxrc.h" @@ -27,7 +23,7 @@ using std::abs; LyXLength::LyXLength() - : val_(0), unit_(LyXLength::PT) + : val_(0), unit_(LyXLength::UNIT_NONE) {} @@ -123,6 +119,12 @@ bool LyXLength::zero() const } +bool LyXLength::empty() const +{ + return unit_ == LyXLength::UNIT_NONE; +} + + int LyXLength::inPixels(int text_width, int em_width_base) const { // Zoom factor specified by user in percent