How to know the current viewed page and line in writer

Ptyl Dragon ptyl at cloudon.com
Mon Jul 22 03:06:34 PDT 2013


thanks!
still, this gives the page of the cursor, not the page of the viewer, which
when scrolling, can be different
from what i could see XViewDataSupplier does not have this data

we want this data to implement a location indicator similar to that on iOS
browsers, on the iOS app, using iOS UI controls.
Is it possible to extract this data from the libreoffice VCL scrollbar
elements using UNO, instead of calculating it ourselves?


On Wed, Jul 17, 2013 at 10:18 AM, Miklos Vajna <vmiklos at suse.cz> wrote:

> Hi,
>
> On Tue, Jul 16, 2013 at 07:59:43PM +0300, Ptyl Dragon <ptyl at cloudon.com>
> wrote:
> > 1. Which line the writer GUI is currently showing (which may be different
> > from the line the caret / cursor is on - such as when scrolling, for
> > example)
>
> The GUI is typically showing an area of the document, which is more a
> rectangle than a given set of lines. You can use
> document::XViewDataSupplier to read/write that data:
>
>
> http://api.libreoffice.org/docs/common/ref/com/sun/star/document/XViewDataSupplier.html
>
> > 2. How many lines there are in total, in the writer document
>
> Isn't that available as part of the document stats?
>
> > Additionally, as a fallback, we would like to simply to know which page
> > writer is showing, and how many pages there are in total.
>
> See
>
>
> http://opengrok.libreoffice.org/xref/core/sw/qa/extras/inc/swmodeltestbase.hxx#getPages
>
> on how to get the number of pages using UNO.
>
> Miklos
>



-- 

[image: appicon.png]


*Ptyl Dragon*

Twitter <http://www.twitter.com/cloudoninc> |
LinkedIn<http://www.linkedin.com/company/cloudon>
 | Facebook <http://www.facebook.com/cloudoninc> |
Blog<http://site.cloudon.com/blog>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20130722/7a28dac6/attachment.html>


More information about the LibreOffice mailing list