Return-Path: X-Original-To: apmail-poi-commits-archive@minotaur.apache.org Delivered-To: apmail-poi-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B78D819709 for ; Sat, 12 Mar 2016 11:36:46 +0000 (UTC) Received: (qmail 98153 invoked by uid 500); 12 Mar 2016 11:36:46 -0000 Delivered-To: apmail-poi-commits-archive@poi.apache.org Received: (qmail 98117 invoked by uid 500); 12 Mar 2016 11:36:46 -0000 Mailing-List: contact commits-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@poi.apache.org Delivered-To: mailing list commits@poi.apache.org Received: (qmail 98108 invoked by uid 99); 12 Mar 2016 11:36:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Mar 2016 11:36:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id DB433C03E9 for ; Sat, 12 Mar 2016 11:36:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.671 X-Spam-Level: X-Spam-Status: No, score=0.671 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.329] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 4owA2R9hIX1V for ; Sat, 12 Mar 2016 11:36:45 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTP id CA77A5F1BE for ; Sat, 12 Mar 2016 11:36:44 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id E70EDE0313 for ; Sat, 12 Mar 2016 11:36:43 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id BC2543A0046 for ; Sat, 12 Mar 2016 11:36:43 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1734686 - /poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRichTextString.java Date: Sat, 12 Mar 2016 11:36:43 -0000 To: commits@poi.apache.org From: centic@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160312113643.BC2543A0046@svn01-us-west.apache.org> Author: centic Date: Sat Mar 12 11:36:43 2016 New Revision: 1734686 URL: http://svn.apache.org/viewvc?rev=1734686&view=rev Log: Add test for bug 59098 which shows that this is fixed in 3.14. Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRichTextString.java Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRichTextString.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRichTextString.java?rev=1734686&r1=1734685&r2=1734686&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRichTextString.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRichTextString.java Sat Mar 12 11:36:43 2016 @@ -28,6 +28,7 @@ import org.apache.poi.ss.usermodel.Sheet import org.apache.poi.xssf.XSSFTestDataSamples; import org.apache.poi.xssf.model.StylesTable; import org.junit.Test; +import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFont; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRPrElt; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRst; import org.openxmlformats.schemas.spreadsheetml.x2006.main.STXstring; @@ -516,4 +517,20 @@ public final class TestXSSFRichTextStrin rt = new XSSFRichTextString(); assertNull(rt.toString()); } + + public void test59008Font() { + XSSFFont font = new XSSFFont(CTFont.Factory.newInstance()); + + XSSFRichTextString rts = new XSSFRichTextString(); + rts.append("This is correct "); + int s1 = rts.length(); + rts.append("This is Bold Red", font); + int s2 = rts.length(); + rts.append(" This uses the default font rather than the cell style font"); + int s3 = rts.length(); + + assertEquals("", rts.getFontAtIndex(s1-1).toString()); + assertEquals(font, rts.getFontAtIndex(s2-1)); + assertEquals("", rts.getFontAtIndex(s3-1).toString()); + } } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org For additional commands, e-mail: commits-help@poi.apache.org