diff --git a/src/ChangeLog b/src/ChangeLog index 3362bac7f8..4e2127f112 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2002-12-18 Juergen Spitzmueller + + * lyxlength.[Ch]: set default unit to UNIT_NONE, + implement bool empty() [bug 490] + +2002-12-17 Alfredo Braunstein + + * lyxfunc.C: correct inversion of WORDFINDBACK/FORWARD + 2002-12-16 Jean-Marc Lasgouttes * version.C.in: update (again) release date for 1.2.2 diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 7d31349711..7ac7cfcffc 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,8 @@ +2002-12-18 Juergen Spitzmueller + + * xforms_helpers.C: (updateWidgetsFromLength) + use len.empty() instead of len.zero() [bug 490] + 2002-10-22 Jean-Marc Lasgouttes * xformsGImage.C (getWidth): add 4 instead of 2 in the fix below, diff --git a/src/frontends/xforms/xforms_helpers.C b/src/frontends/xforms/xforms_helpers.C index a4bd349cc5..f5060cb97a 100644 --- a/src/frontends/xforms/xforms_helpers.C +++ b/src/frontends/xforms/xforms_helpers.C @@ -201,7 +201,7 @@ void updateWidgetsFromLength(FL_OBJECT * input, FL_OBJECT * choice, lyx::Assert(input && input->objclass == FL_INPUT && choice && choice->objclass == FL_CHOICE); - if (len.zero()) { + if (len.empty()) { fl_set_input(input, ""); fl_set_choice_text(choice, default_unit.c_str()); } else { diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 11bd016cd4..ae6aa2d629 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -1045,7 +1045,7 @@ string const LyXFunc::dispatch(kb_action action, string argument) } else { searched_string = last_search; } - bool fw = (action == LFUN_WORDFINDBACKWARD); + bool fw = (action == LFUN_WORDFINDFORWARD); if (!searched_string.empty()) { lyxfind::LyXFind(owner->view(), searched_string, fw); } diff --git a/src/lyxlength.C b/src/lyxlength.C index f64a9bf172..ae086acfad 100644 --- a/src/lyxlength.C +++ b/src/lyxlength.C @@ -27,7 +27,7 @@ using std::abs; LyXLength::LyXLength() - : val_(0), unit_(LyXLength::PT) + : val_(0), unit_(LyXLength::UNIT_NONE) {} @@ -160,6 +160,12 @@ bool LyXLength::zero() const } +bool LyXLength::empty() const +{ + return unit_ == LyXLength::UNIT_NONE; +} + + int LyXLength::inPixels(int default_width, int default_height) const { // Zoom factor specified by user in percent diff --git a/src/lyxlength.h b/src/lyxlength.h index 1c51bc96aa..0dcd7a2776 100644 --- a/src/lyxlength.h +++ b/src/lyxlength.h @@ -63,6 +63,8 @@ public: void unit(LyXLength::UNIT unit); /// bool zero() const; + /// + bool empty() const; /// return string representation string const asString() const; /// return string representation for LaTeX diff --git a/status.12x b/status.12x index 3957470103..d5aba49540 100644 --- a/status.12x +++ b/status.12x @@ -22,4 +22,10 @@ What's new ** Bug fixes +- fix problem where it was not possible to force some values to 0 in + custom margins + +- fix functions word-find-forward and word-find-backward, which + meaning was inverted + - fix an installation issue with solaris