Quantcast
Channel: Apache OpenOffice Community Forum
Viewing all articles
Browse latest Browse all 1281

Macros and UNO API • Re: retrieve a specific number of lines with TextInputStream

$
0
0
Yes but bytes is not line, I can't to know how lenght each line do :)
The bytes are read one at a time in sequence until the whole file is read. OO or LO doesn't know about lines either unless it reads them in sequence from the start.

If you want to jump to specific lines (Edit: without reading them in in sequence from the start] then you have to make them all the same length (length of the biggest) when you write them to the file in the first place so you can calculate the position of any line.

Alternatively you could store all the lengths of the lines somewhere when you write them to the file, perhaps in a separate document or as a kind of header at the start of the file to be read first.

Statistics: Posted by JeJe — Tue Jan 21, 2025 10:37 pm



Viewing all articles
Browse latest Browse all 1281

Trending Articles