Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 53106 invoked from network); 16 Dec 2004 15:22:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 16 Dec 2004 15:22:35 -0000 Received: (qmail 77105 invoked by uid 500); 16 Dec 2004 15:22:24 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 77014 invoked by uid 500); 16 Dec 2004 15:22:23 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: users@cocoon.apache.org Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 76967 invoked by uid 99); 16 Dec 2004 15:22:23 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from rose.man.poznan.pl (HELO rose.man.poznan.pl) (150.254.173.3) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 16 Dec 2004 07:20:35 -0800 Received: from [150.254.149.186] (krystian@chestnut.man.poznan.pl [150.254.149.186]) (authenticated bits=0) by rose.man.poznan.pl (8.12.10/8.12.10/auth/ldap/milter/tls) with ESMTP id iBGFFPkV023424; Thu, 16 Dec 2004 16:15:27 +0100 (CET) Message-ID: <41C1A68D.9000900@man.poznan.pl> Date: Thu, 16 Dec 2004 16:15:25 +0100 From: Krystian Nowak User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5 X-Accept-Language: pl, en-gb, en, en-us MIME-Version: 1.0 To: poi-dev@jakarta.apache.org, poi-user@jakarta.apache.org, users@cocoon.apache.org, dev@cocoon.apache.org Subject: Cocoon-POI question Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by PSNC antivirus scanner X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi There! I saw Victor's modification to Cocoon-POI: http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/EP_Orientation.java?r1=1.5&r2=1.6&diff_format=h relased in Cocoon 2.1.6 Can you tell me what is the level of activity of block POI right now? (commits or functional points per month ;)). I am interested in gmr:Style's Orient attibute ("The text orientation" - accoring to http://www.jfree.org/jworkbook/gnumeric-xml.pdf) which defaults to "1". It is a kind of weird attribute: 1) There is a class that represents the attribute: org.apache.cocoon.components.elementprocessor.impl.poi.hssf.elements.StyleOrientation having following methods: public boolean isHoriz() public boolean isVertHorizText() public boolean isVertVertText() public boolean isVertVertText2() 2) It is used by: having methods calling representants in StyleOrientation: public boolean isStyleOrientationHoriz() throws IOException { return getStyleOrientation().isHoriz(); } public boolean isStyleOrientationVertHorizText() throws IOException { return getStyleOrientation().isVertHorizText(); } public boolean isStyleOrientationVertVertText() throws IOException { return getStyleOrientation().isVertVertText(); } public boolean isStyleOrientationVertVertText2() throws IOException { return getStyleOrientation().isVertVertText2(); } 3) It could have been used on org.apache.poi.hssf.usermodel.HSSFCellStyle calling its setRotation(short rotation) method 4) BUT no one calls those methods!!! So what the !@?%^*# is going on? Recent Gnumeric still seems not to implement text rotation: http://gnomedesktop.org/node/2020#comment-32238 and it was a problem since a while: http://mail.gnome.org/archives/gnome-office-list/2003-December/msg00008.html so I couldn't find good explanation for "Orient" attibute values. Also the only value written by Gnumeric in Orient attribute is of course "1", since there is no option in Gnumeric's menu to rotate cell's text. According to org.apache.cocoon.components.elementprocessor.impl.poi.hssf.elements.StyleOrientation class it seems to be a 4-bit number: "Style orientation is written as an integer, and each bit in the integer specifies a particular boolean attribute. This class deals with all that information in an easily digested form" So there are the bits: 0-bit is horiz - default value ( == 1 ) 1-bit is vert_horiz_text 2-bit is vert_vert_text 3-bit is vert_vert_text2 What do the three upper bits mean? Those bits are also mentioned in http://cvs.gnome.org/viewcvs/gnumeric/gnumeric.xsd?rev=1.11&view=markup as: I guess that to set cell text orientation/rotation there is enough to code it like that: public abstract class EPStyle extends org.apache.cocoon.components.elementprocessor.impl.poi.hssf.elements.EPStyle { public void initialize(Attribute[] attributes, ElementProcessor parent) throws IOException { super.initialize(attributes, parent); EPStyleRegion sregion = (EPStyleRegion)parent; if (sregion.isValid()) { HSSFCellStyle style = sregion.getStyle(); boolean horiz = isStyleOrientationHoriz(); boolean vert_horiz_text = isStyleOrientationVertHorizText(); boolean vert_vert_text = isStyleOrientationVertVertText(); boolean vert_vert_text2 = isStyleOrientationVertVertText2(); short rotation = magicallMetodCreatingRotationValue( horiz, vert_horiz_text, vert_vert_text, vert_vert_text2); style.setRotation(rotation); } } public abstract short magicallMetodCreatingRotationValue( boolean horiz, boolean vert_horiz_text, boolean vert_vert_text, boolean vert_vert_text2); } But I need to know how to write magicallMetodCreatingRotationValue!!! Do you know what can help me? BTW - what is http://cvs.apache.org/viewcvs.cgi/cocoon-2.2/ repository points to? There are no blocks - especially my beloved poi one ;) Regards, Krystian -- Krystian Nowak krystian@man.poznan.pl =========================================== Poznan Supercomputing and Networking Center Poland, 60-814 Poznan, Zwierzyniecka 20 tel. (+48 61) 8582164 fax. (+48 61) 8582151 http://www.man.poznan.pl =========================================== BlueEyes - Human-Operator Monitoring System http://www.blueeyes.prv.pl http://www.cs.put.poznan.pl/csidc/2001 =========================================== --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org