You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by Yegor Kozlov <ye...@dinom.ru> on 2006/07/14 16:11:54 UTC
Re[3]: object model to work with styles in PowerPoint
OK. The said makes sense.
I'm not sure about method signatures, need to think about it :).
Probably there will be
getStyles(); //returns all applied styles
and
getStyles(int mask); //returns specific styles
getStyles( MASTER | TEXTRUN) is equivalent of getStyles()
We are going to add a bunch of methods to the TextRun object, probably
it's better to delegate calls to a special object :
TextFormat fmt = txrun.getTextFormat();
//do formatting via TextFormat
Yegor
NB> On Fri, 14 Jul 2006, Yegor Kozlov wrote:
>>>> My worry is that your plan doesn't easily allow someone to get all the
>>>> different bits of information from the first list.
>>
>> Do users really need this information? When editing a PPT file you don't
>> care if you are overriding a master style or not. I think this
>> information is low-level and makes sense only for developers, not for
>> end-users, if only they are familiar with PPT format.
NB> One of the things I keep meaning to write is a PPT -> S5 converter.
NB> Knowing where the stylings come from would be very useful to me
NB> On other template based stuff I've worked on in the past, you always end
NB> up needing to know if some styling came from the template, or from the
NB> text.
NB> I suppose we could have:
NB> getTextSpecificStyles
NB> returns just styles for the text
NB> flagged as being allowed to edit
NB> getAllApplyingStyles
NB> gets the master ones, then applys the text ones on top
NB> flagged as being not allowed to edit
NB> getMasterStyles
NB> calls get styles on the master
NB> turns off the edit flag
NB> setTextStyles
NB> sets the text specific styles
NB> only works on edit allowed ones
NB> Then on the master
NB> getMasterStyles
NB> returns the styles from the master
NB> flagged as being allowed to edit
NB> setMasterStyles
NB> sets the master styles
NB> only works on edit allowed ones (should always be)
NB> Would that make sense?
NB> Nick
NB> ---------------------------------------------------------------------
NB> To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
NB> Mailing List: http://jakarta.apache.org/site/mail2.html#poi
NB> The Apache Jakarta POI Project: http://jakarta.apache.org/poi/
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/
Re[3]: object model to work with styles in PowerPoint
Posted by Nick Burch <ni...@torchbox.com>.
On Fri, 14 Jul 2006, Yegor Kozlov wrote:
> OK. The said makes sense.
>
> I'm not sure about method signatures, need to think about it :).
I was suggesting the idea, not the name. They almost certainly need to
have a totally different name!
> Probably there will be
> getStyles(); //returns all applied styles
> and
> getStyles(int mask); //returns specific styles
Hmm, I'd probably go with
getStyles()
getStylesAll() - same as above
getStylesTextRun()
getStylesMaster()
but that's just me. If we do do the mask thing, we should have a "ALL"
mask too
> We are going to add a bunch of methods to the TextRun object, probably
> it's better to delegate calls to a special object :
I'd be happy with that - we could also shift some of the logic from
RichTextRun (for dealing with the actual StyleTextPropAtoms) there too
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/