Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Does not really answer your question, but:

MsgBox "PageCount = " & ThisComponent.CurrentController.PageCount & CHR$(10) & _ "LineCount = " & ThisComponent.CurrentController.LineCount & CHR$(10) & _
     "Current Page = " & ThisComponent.CurrentController.ViewCursor.Page

In AndrewMacro.odt, look for a section titled "Where is the Display Cursor?", which also does not answer your question, but it might be useful.

On 07/17/2013 03:18 AM, Miklos Vajna wrote:
Hi,

On Tue, Jul 16, 2013 at 07:59:43PM +0300, Ptyl Dragon <ptyl@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


_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.