A long while ago I wrote a macro in Basic to automatically adjust the zoom and scrollbars in Writer so that the current page (or pair of pages) is displayed filling the screen exactly, and when you move the cursor to the next page, say, it snaps the scroll position to display that page instead of half and half. I remember it took a while to get it right and the code was a bit messy, but for the last few years it worked exactly as I wanted.
Recently though I lost the macro during an upgrade, and now for the life of me I can't get a replacement working. I can extract the current position from
Code: Select all
thisComponent.currentController.ViewData
Am I missing something obvious? I was hoping there'd be a more explicit option to adjust the scroll without using ViewData at all, because it seemed like a bit of a hack the first time round too, but I'll take it if it's the only way