Re: number of paragraphs in a document?

From: Dom Lachowicz (domlachowicz@yahoo.com)
Date: Wed Apr 02 2003 - 18:05:47 EST

  • Next message: Sinitsyn Valentine: "Problems with MinGW 2.0.0-3 and AbiWord 1.1.4"

    AP_Dialog_WordCount uses some code in FV_View to
    determine that sort of information. I know you'll
    probably want to avoid touching view-like things, but
    ultimately it digs through the PT to count how many
    PTX_Blocks, etc... that there are. It would be a
    useful reference point.

    Also, the PD_Document class should be of some great
    use to you here, since it obviously knows when
    appendSpan and appendStrux are called. You might do
    best to make a few minor mods to the Doc class that
    keeps a bit of meta-accounting information handy.

    Good luck,
    Dom

    --- Seth Delackner <seth@jtan.com> wrote:
    > I know I could find this with a little digging, but
    > in a pd_Document, the
    > pt_PieceTable represents the parts of the document.
    > What do I call to
    > determine the number of say, paragraphs or for that
    > matter, "often repeated
    > regions of a document". Is that PTStruxType?
    >
    > What I'm trying to do is generate some (modestly
    > vaguely accurate) progress
    > indication output during file import / export since
    > for whatever reason some
    > documents take so long to load. Counting the number
    > of paragraph markers
    > (ascii 13 (^M)) in an MsWord file seems pretty good.

    __________________________________________________
    Do you Yahoo!?
    Yahoo! Tax Center - File online, calculators, forms, and more
    http://tax.yahoo.com



    This archive was generated by hypermail 2.1.4 : Wed Apr 02 2003 - 18:14:56 EST