Hello,

On 08-Sep-2012, at 3:41 PM, Rory O'Farrell <ofarr...@iol.ie> wrote:
> There is a Conditional text mechanism.  The Help file says
> 
> "Conditional Text 
> You can set up fields in your document that display text when a condition 
> that you define is met. For example, you can define the conditional text that 
> is displayed in a series of reminder letters.
> Setting up conditional text in this example is a two-part process. First you 
> create a variable, and then you create the condition."


Sure, but there is a problem with Conditional texts, which is - it requires a 
else condition. Now, I don't want a else condition. To explain things further, 
I am building a OpenOffice extension that allows switch case conditional text. 
For example:

if editor EQ "emacs"
  "Saint Ignatious"
elsif editor EQ "vim"
  "ahoy vim"
elsif editor EQ "blah"
   "blah


Now, before I can build such an extension, Openoffice XML spec much support 
such a field. The closest I found was, Conditional Text and hidden text. The 
problem with, Conditional text is - it requires a else condition and problem 
with hidden field is, it does opposite of what I want.

For example, if Hidden text behaved such that, if condition specified is true, 
then show the text else hide the text, my OpenOffice extension can generate 
following XML in the document:

<text:hidden-text text:condition="ooow:editor EQ "emacs"" 
text:string-value="Sait emacs" text:is-hidden="true">Wow man</text:hidden-text>
<text:hidden-text text:condition="ooow:editor EQ "vim"" 
text:string-value="Saint vim" text:is-hidden="true">Wow man</text:hidden-text>

Now, obviously this is not possible because - hidden text actually hides the 
text, rather than displaying it.




---------------------------------------------------------------------
To unsubscribe, e-mail: ooo-users-unsubscr...@incubator.apache.org
For additional commands, e-mail: ooo-users-h...@incubator.apache.org

Reply via email to