This only works for unix. It's a simple matter to fix the other platforms
though, just take a look at the ap_UnixFrame.cpp changes and do the same
for the others. I also modified FV_View::moveInsPtTo() so that it won't
work unless the cursor is at the beginning of the document, which is fine
for now (since its only called in one place), but might cause problems
later on. Besides it makes the zoom better.
richie
Index: text/fmt/xp/fv_View.cpp
===================================================================
RCS file: /u2/cvsroot/abi/src/text/fmt/xp/fv_View.cpp,v
retrieving revision 1.221
diff -r1.221 fv_View.cpp
820,824d819
< if (!isSelectionEmpty())
< _clearSelection();
< else
< _eraseInsertionPoint();
<
829,835c824,827
<
< if (!_ensureThatInsertionPointIsOnScreen())
< {
< _fixInsertionPointCoords();
< _drawInsertionPoint();
< }
<
---
>
> _fixInsertionPointCoords();
> cmdScroll(AV_SCROLLCMD_LINEDOWN, (UT_uint32) (m_yPoint + m_iPointHeight/2 -
>m_iWindowHeight/2));
> cmdScroll(AV_SCROLLCMD_LINERIGHT, (UT_uint32) (m_xPoint - m_iWindowWidth/2));
Index: wp/ap/unix/ap_UnixFrame.cpp
===================================================================
RCS file: /u2/cvsroot/abi/src/wp/ap/unix/ap_UnixFrame.cpp,v
retrieving revision 1.46
diff -r1.46 ap_UnixFrame.cpp
89a90
> int point = 0;
102a104,106
> if (m_pView != NULL) {
> point = ((FV_View *) m_pView)->getPoint();
> }
204a209,210
> if (point != 0)
> ((FV_View *) m_pView)->moveInsPtTo(point);