OASIS Open Document Format for Office Applications (OpenDocument) TC

 View Only

Re: [office] Visibility and protection of layers

  • 1.  Re: [office] Visibility and protection of layers

    Posted 06-27-2003 16:47
    Hi David,
    
    David Faure wrote:
    
    >>4) text:condition contains the condition string (if hiding is based on a 
    >>condition)
    >>    
    >>
    >Can this condition be something like "this is displayed on screen,
    >but not when printing"?
    >
    
    As of now, the condition is an arithmetic expression for document 
    variables, i.e. you have a text field with a value and can then display 
    the section only if the value exceeds 1000: text:condition="value > 1000".
    
    >If not, this could be a useful addition, even for layers (apparently 
    >Adobe Illustrator has that, see below).
    >
    >(Overall I'm still a bit confused by the condition stuff. Can users enter
    >conditions in kind of a scripting language? Is that language specified in 
    >the file format? I haven't seen it yet, but I might have missed it.
    >
    
    Well, it's just ordinary expressions, i.e. stuff like "a > b". It's the 
    same expression language that is used in all the text fields for 
    calculating values. Frankly, I suspect we were sloppy and have not 
    defined the syntax anywhere. I need to check...
    
    >Hmm, anyway, even if it's possible to model "not when printing" as a
    >condition, this is far from as convenient as a GUI element to do that).
    >
    >  
    >
    >>So... I suggest we add draw:protected="true|false" and 
    >>draw:display="true|none" to the <draw:layer> element.
    >>    
    >>
    >
    >Looks very good.
    >The only addition we would suggest is maybe a "screenonly"
    >value for draw:display, for "helper" layers, which are only to be shown
    >on screen but not in print, like Adobe Illustrator offers.
    >
    That makes sense. 
    
    > The reason why this would be better than a separate attribute
    > (print = true/false), is that the combination "print=true + display=false"
    > can be very surprising to the user. With the solution of a "screenonly" value 
    > for draw:display, this can't happen.
    
    
    I asked our graphics people, and they preferred the independent 
    approach. A possible use-case would be a presentation, which might have 
    additional explanations for the print version which you would not want 
    displayed in the presentation itself. So one could either do 
    draw:display="true|screen|print|none", or one could have two boolean 
    attributes, draw:display="true|none" and draw:print="true|false". I like 
    the former slightly because of default handling. I guess the most common 
    use case is visible (screen and print). This is a good candidate for 
    defaults, i.e. making both default to 'true'. If somebody now wants to 
    hide them, they would add draw:display="none", thus making it invisible 
    but printable, which is probably not desired. Having one attribute with 
    four values would solve that problem.
    
    Hmm, interestingly, this is something OOo already can do on a per-view 
    basis. Thus, this is currently saved in the view settings, and even as a 
    bitfield. I guess this makes it a rather spectacular failure of our  
    requirements, so it may be a rather good idea to add these attributes... :-P
    
    Sincerely,
    Daniel