Return-Path: X-Original-To: apmail-incubator-ooo-users-archive@minotaur.apache.org Delivered-To: apmail-incubator-ooo-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 45B459515 for ; Sat, 8 Sep 2012 11:41:00 +0000 (UTC) Received: (qmail 91018 invoked by uid 500); 8 Sep 2012 11:40:59 -0000 Delivered-To: apmail-incubator-ooo-users-archive@incubator.apache.org Received: (qmail 90622 invoked by uid 500); 8 Sep 2012 11:40:55 -0000 Mailing-List: contact ooo-users-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ooo-users@incubator.apache.org Delivered-To: mailing list ooo-users@incubator.apache.org Received: (qmail 90566 invoked by uid 99); 8 Sep 2012 11:40:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Sep 2012 11:40:53 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [75.180.132.120] (HELO cdptpa-omtalb.mail.rr.com) (75.180.132.120) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Sep 2012 11:40:46 +0000 X-Authority-Analysis: v=2.0 cv=LKXkseq9 c=1 sm=0 a=4Jz+jJ0YjisZbq4FujTDrw==:17 a=RsiRbAn6vsoA:10 a=LYZ9wH-sWG0A:10 a=W9ez3Lg3k8MA:10 a=7qsJXG2k14gA:10 a=8nJEP1OIZ-IA:10 a=mV9VRH-2AAAA:8 a=0qyIrEVTyQAA:10 a=e5Vwl4IUbH1B1wE4mJwA:9 a=wPNLvfGTeEIA:10 a=4Jz+jJ0YjisZbq4FujTDrw==:117 X-Cloudmark-Score: 0 X-Originating-IP: 68.205.107.180 Received: from [68.205.107.180] ([68.205.107.180:50361] helo=[127.0.0.1]) by cdptpa-oedge01.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTP id FA/C8-21812-9AE2B405; Sat, 08 Sep 2012 11:40:25 +0000 Message-ID: <504B2EA6.9030807@apache.org> Date: Sat, 08 Sep 2012 07:40:22 -0400 From: tj User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:15.0) Gecko/20120824 Thunderbird/15.0 MIME-Version: 1.0 To: ooo-users@incubator.apache.org Subject: Re: Display text if condition is true References: <20120908111117.852464f1f53ae35c16b155c2@iol.ie> <47BFBA32-A3E9-48A8-811D-494CFAEEF557@codemancers.com> In-Reply-To: <47BFBA32-A3E9-48A8-811D-494CFAEEF557@codemancers.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 9/8/2012 06:56, Hemant Kumar wrote: > Hi, > > On 08-Sep-2012, at 3:41 PM, Rory O'Farrell 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: > > Wow man > Wow man > > Now, obviously this is not possible because - hidden text actually hides the text, rather than displaying it. This should not be particularly difficult, using the "not-equal" logical operator: if editor NE "emacs" "Saint Ignatious", etc. (Caveat: I haven't used this feature either.) IMHO, the original design decision was, ah, unfortunate. HTH, /tj/ --------------------------------------------------------------------- To unsubscribe, e-mail: ooo-users-unsubscribe@incubator.apache.org For additional commands, e-mail: ooo-users-help@incubator.apache.org