Return-Path: Delivered-To: apmail-poi-user-archive@www.apache.org Received: (qmail 12160 invoked from network); 17 Oct 2008 14:27:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Oct 2008 14:27:24 -0000 Received: (qmail 39526 invoked by uid 500); 17 Oct 2008 14:27:24 -0000 Delivered-To: apmail-poi-user-archive@poi.apache.org Received: (qmail 39511 invoked by uid 500); 17 Oct 2008 14:27:24 -0000 Mailing-List: contact user-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "POI Users List" Delivered-To: mailing list user@poi.apache.org Received: (qmail 39500 invoked by uid 99); 17 Oct 2008 14:27:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Oct 2008 07:27:24 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [12.39.225.134] (HELO gatekeeper.adapco.com) (12.39.225.134) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Oct 2008 14:26:17 +0000 Received: from Vista6401 (main-tmp-148.adapco.com [10.14.0.148]) by gatekeeper.adapco.com (8.13.8/8.13.8) with ESMTP id m9HEObqw004364 for ; Fri, 17 Oct 2008 10:24:37 -0400 (envelope-from fred@us.cd-adapco.com) From: "Frederick J. Ross" To: "'POI Users List'" References: <394c1fd0810161850i128a943cmd806af1e328ec972@mail.gmail.com> <394c1fd0810170535u68b07f67n3b0574bf5f9ab813@mail.gmail.com> <394c1fd0810170559k2dc60389y12ee005eb00e524a@mail.gmail.com> In-Reply-To: <394c1fd0810170559k2dc60389y12ee005eb00e524a@mail.gmail.com> Subject: HSLF setFontSize gets ignored in table Date: Fri, 17 Oct 2008 10:26:06 -0400 Message-ID: <005a01c93064$4b309df0$e191d9d0$@cd-adapco.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AckwWBaHKNf6TyPDTJqU1oCGQBW4RQAC1XCA Content-Language: en-us X-PMX-Version: 5.4.4.348488, Antispam-Engine: 2.6.0.325393, Antispam-Data: 2008.10.17.140726 PMX: Gauge=IIIIIII, Probability=8%, Report='BODY_SIZE_2000_2999 0, BODY_SIZE_5000_LESS 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT_MS_GENERIC 0' X-Virus-Checked: Checked by ClamAV on apache.org I am fairly new to working with POI. I have been working on building a PowerPoint from scratch, and so far it has gone fairly well. I have been able to add pictures, and moves (using POI.3.2-FINAL). But I am having problems with tables. I tried the example code for a table, but when I run it, the bullets are not suppressed, and I can't get the correct font size. Now this might be partly due to reading the PowerPoint into Office 2007, but I assume that it should still be compatible. I was able to get the bullet suppressed by still including "rt.setBulletChar". If I comment out the line with setBulletChar, then the bullets show up. I believe if I also suppress "cell.setVerticalAlignment" or "cell.setHorizontalAlignment", once again the bullets appear. But nothing I have down gets the setFontSize(10) to be recognized. Is there something I am missing? // TODO code application logic here //table data String[][] data = { {"INPUT FILE", "NUMBER OF RECORDS"}, {"New Item File", "11,559"}, {"Vendor File", "300"}, {"Purchase History File", "10,000"}, {"Total # of requisitions", "10,200,038"} }; SlideShow ppt = new SlideShow(); Slide slide = ppt.createSlide(); //create a table of 5 rows and 2 columns Table table = new Table(5, 2); for (int i = 0; i < data.length; i++) { for (int j = 0; j < data[i].length; j++) { TableCell cell = table.getCell(i, j); RichTextRun rt = cell.getTextRun().getRichTextRuns()[0]; cell.setText(data[i][j]); rt.setFontSize(10); rt.setBullet(false); rt.setBulletOffset(0); //bullet offset rt.setTextOffset(1); //text offset (should be greater than bullet offset) rt.setBulletChar('\u2022'); //bullet character cell.setVerticalAlignment(TextBox.AnchorMiddle); cell.setHorizontalAlignment(TextBox.AlignCenter); } } //set table borders Line border = table.createBorder(); border.setLineColor(Color.black); border.setLineWidth(1.0); table.setAllBorders(border); //set width of the 1st column table.setColumnWidth(0, 300); //set width of the 2nd column table.setColumnWidth(1, 150); slide.addShape(table); table.moveTo(100, 100); FileOutputStream out = new FileOutputStream("hslf-table.ppt"); ppt.write(out); out.close(); --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@poi.apache.org For additional commands, e-mail: user-help@poi.apache.org