commit: fix fit to width loop

From: Patrick Lam (plam@plam.lcs.mit.edu)
Date: Wed Feb 19 2003 - 13:53:24 EST

  • Next message: ericzen: "Re: AbiWord Weekly News #131 (2003, week 07) released"

    fix infinite Fit To Width loop
    CVS:
    ----------------------------------------------------------------------
    CVS: Enter Log. Lines beginning with `CVS:' are removed automatically
    CVS:
    CVS: Committing in .
    CVS:
    CVS: Modified Files:
    CVS: src/af/xap/unix/xap_UnixFrameImpl.cpp
    CVS: src/af/xap/xp/xap_Preview.cpp src/af/xap/xp/xap_Preview.h
    CVS: src/af/xap/xp/xav_View.cpp src/af/xap/xp/xav_View.h
    CVS: src/text/fmt/xp/fv_View.cpp src/text/fmt/xp/fv_View_cmd.cpp
    CVS: src/text/fmt/xp/fv_View_protected.cpp
    CVS:
    ----------------------------------------------------------------------

    This was a bit tricky. There was a race condition involved, among other
    things. But it's fixed now, for the most part (sometimes you don't
    quite get the whole width of the txt on the screen. I think it's due to
    rounding.) It certainly won't loop anymore.

    Note that xav_View::getWindowWidth() is a tricky piece of code. It
    returns an answer in layout units, but can only take input in display
    units. Furthermore, when you change the zoom, getWindowWidth() can
    easily go wrong. I stored m_dOneTDU in AV_View to get around this. Not
    optimal, but it works.

    As Martin points out, we don't need to blow away the view anymore when
    we change zooms. There's some crufty code currently that deals with
    this in xav_UnixFrameImpl::_fe::do_ZoomUpdate. Once we update the code,
    we can decruftify this code.

    pat



    This archive was generated by hypermail 2.1.4 : Wed Feb 19 2003 - 13:58:12 EST