[prev in list] [next in list] [prev in thread] [next in thread] 

List:       abiword-dev
Subject:    Re: Proposal: using OTS and keeping the style info of the document;
From:       Nadav Rotem <nadavrotem () mail ! ru>
Date:       2003-06-03 13:04:25
[Download RAW message or body]

> Why not ignore the styles in OTS and instead just
> have word iterator functions like "getNextWord" which
> returns the plain word from the document to OTS,

OTS needs to be a generic library for programs such as gedit , OOo or
even KWrite to use. if getNextWord  returns (char *) then the font,size
and other info is lost; if getNextWord is of Abiword internal structure
then it wont be generic enough;

> which would then process it, then another function OTS can
> call into AbiWord to say whether this word is in or
> out of the summry. This way you leave all the
> formatting decisions up to AbiWord itself.

Letting  abiword build the ots structure would be simple using the ots
api (such as ots_add_line , ots_add_wordlist); then after calling ots
the all that the abiword plugin has to do is scan a GList and if the
"->selected" flag is set then it can do or not do somthing with the
pointer that was previously set.

> It might take a couple of passes. The first one to
> analyze the text, the next to iterate through and
> "do something" for each word depending on whether it's
> in or out.

how would you implement getNextWord? how would you return the text back
into abiword without loosing the style information.

-Nadav

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic