Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 14087200B6B for ; Thu, 25 Aug 2016 17:36:41 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 12824160AA5; Thu, 25 Aug 2016 15:36:41 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 342CB160AA4 for ; Thu, 25 Aug 2016 17:36:40 +0200 (CEST) Received: (qmail 54931 invoked by uid 500); 25 Aug 2016 15:36:39 -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 54911 invoked by uid 99); 25 Aug 2016 15:36:38 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Aug 2016 15:36:38 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 7D5F8C818B for ; Thu, 25 Aug 2016 15:36:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 6nEXr9i-h0oE for ; Thu, 25 Aug 2016 15:36:34 +0000 (UTC) Received: from mail-yb0-f169.google.com (mail-yb0-f169.google.com [209.85.213.169]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id B066C5FC0A for ; Thu, 25 Aug 2016 15:36:33 +0000 (UTC) Received: by mail-yb0-f169.google.com with SMTP id e31so17661676ybi.3 for ; Thu, 25 Aug 2016 08:36:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=36d2vGee73bw2r9h2uPKonRaO5g94QbbmoXIrF+F6xM=; b=uc99QvkZOsGY6HGRK1jxezI09hVwdljJJvBkhIOcdCvOA3xiOWA9zBqvgqBl07R5gy QYxA1975qQAxrJTpcaQ4yJI7ScUA4YKgydjAZpveO9VG/XmmF2jKvwWl5tw8HFZqTXTL Smd1/pDa/U6FCrf8z9eCgIPenRGF39dxFpFU4vH+CGQ+iNrfK9JnT9gl0IAuY+E0n6vU wqqcqTnqG6FrUIDrpWHtLAzpXoNkB1m61Hn+l2NHR1PT+DyGSaDSnHOuIJnqZVYyTuE8 PKE/cGxUAzh9Cc25f1kc2dtf4GDvV3YvpX3JFTDrC2sYDti6qxofW2BDndaO4QjSVhyo gPRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=36d2vGee73bw2r9h2uPKonRaO5g94QbbmoXIrF+F6xM=; b=SCO6QZrzuz5LY5fKcxxt+nuKTNvS0PIdLwCcYN4H/MIAh4GBZPaonCnrxEhCW95W7z BtxRZ1zijfr4vJu14yaqw2aRKCQGH+kg47dXpkozkWkd2nxKAK+JPeatcXsn6QbZDZI8 IfNYT9gXEa1X2LQbZNwROwMMwGs+a6DKm5S8qrRp3d7/Vt5voCNP4vycCXJeTP3huoiK QVYUjh+nZBRAudKADha3RNJbLzcZzjCmQooJqU5l8dRFwOze+NCV+pXrscBIG1ju9o1y iZs1cpeSug9lAUtHm61C56YN1RuBxU5EAkp8J3LteLYktuPD1BuyR2DGDjQXOqeSza2M DZuw== X-Gm-Message-State: AEkoouvfgpdjr1PyB6uhHNBbnVrll66hfZLfDzDaEHP0OzaUCKXfGreFwp0lHAlDaH9fpYAGIoO/iwEJYvm2CQ== X-Received: by 10.37.205.134 with SMTP id d128mr6923995ybf.5.1472139387289; Thu, 25 Aug 2016 08:36:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.218.137 with HTTP; Thu, 25 Aug 2016 08:36:26 -0700 (PDT) Received: by 10.37.218.137 with HTTP; Thu, 25 Aug 2016 08:36:26 -0700 (PDT) In-Reply-To: References: <99A494E1-A7C6-4741-9222-6D16545CD520@ebi.ac.uk> From: "Javen O'Neal" Date: Thu, 25 Aug 2016 08:36:26 -0700 Message-ID: Subject: Re: Apache POI - XSLF ooxml library To: POI Users List Content-Type: multipart/alternative; boundary=94eb2c189f643d45df053ae729d1 archived-at: Thu, 25 Aug 2016 15:36:41 -0000 --94eb2c189f643d45df053ae729d1 Content-Type: text/plain; charset=UTF-8 From https://poi.apache.org/faq.html#faq-N10025 "the poi-ooxml-schemas jar only contains the XSDs and classes that are typically used, as identified by the unit tests" If you want to use the smaller poi-ooxml-schemas file in the future, write a unit test that uses the missing class. We build poi-ooxml-schemas by running the unit test suite and searching for all loaded xmlbeans-generated ooxml classes. If you open a bug with a (hopefully meaningful) unit test as a patch, we can commit it, giving you the option of using the smaller poi-ooxml-schemas in the future. On Aug 25, 2016 5:57 AM, "Guilherme Viteri" wrote: > Hi, > Now it worked fine :D > > So, at the moment I end up using the 3.15-beta2 - the latest available in > Maven Repository - removed the poi-ooxml-schemas and added > ooxml-schemas-1.3.jar as recommend in the FAQ you sent and everything > worked fine. > > Thanks for all of your help Dominik. > > > On 25 Aug 2016, at 10:51, Dominik Stadler > wrote: > > > > Hi, > > > > That sounds like you still have some old jars in use in your project, can > > you check? You can also try to use the full schema-jar instead of the > > ooxml-schemas, see http://poi.apache.org/faq.html#faq-N10025 for > details. > > > > Dominik. > > > > On Wed, Aug 24, 2016 at 3:31 PM, Guilherme Viteri > wrote: > > > >> Hi, > >> > >> Thanks for testing and validating my code > >> > >> As you said I downloaded the trunk version from svn (git svn clone > >> https://svn.apache.org/repos/asf/poi/trunk poisvngit --revision HEAD), > >> then I built using ant jar. I added these jars into my project and then > I > >> assume now I get the latest version. However it did not work. > >> > >> Still getting > >> java.lang.ClassCastException: org.apache.xmlbeans.impl. > values.XmlComplexContentImpl > >> cannot be cast to org.openxmlformats.schemas.drawingml.x2006.main. > >> CTPath2DQuadBezierTo > >> at org.openxmlformats.schemas.drawingml.x2006.main.impl. > >> CTPath2DImpl.addNewQuadBezTo(Unknown Source) > >> at org.apache.poi.xslf.usermodel.XSLFFreeformShape.setPath( > >> XSLFFreeformShape.java:85) > >> at org.reactome.server.rd2pptx.poi.TestBoneShape.main( > >> TestBoneShape.java:22) > >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > >> at sun.reflect.NativeMethodAccessorImpl.invoke( > >> NativeMethodAccessorImpl.java:62) > >> at sun.reflect.DelegatingMethodAccessorImpl.invoke( > >> DelegatingMethodAccessorImpl.java:43) > >> at java.lang.reflect.Method.invoke(Method.java:497) > >> at com.intellij.rt.execution.application.AppMain.main( > >> AppMain.java:144) > >> > >> > >> I tried xmlbeans version 2.3.0 and version 2.6.0 also but I don't this > is > >> the problem. I am also running Java 8 on OS X > >> > >> Thanks > >> > >> On Mon, Aug 23, 2016 at 12:05 PM, Dominik Stadler @gmx.at> > >> wrote: > >> Hi, > >> > >> Your sample code works with current POI trunk, maybe you can try with > the > >> latest version or at least a recent nightly build to see if your > problem is > >> actually fixed there already. > >> > >> Dominik. > >> > >> On Mon, Aug 22, 2016 at 11:51 AM, Guilherme Viteri @ > ebi.ac.uk> > >> wrote: > >> > >> Dear Developers, > >> > >> Is there anyone monitoring the stack overflow forum for #apache-poi ? > >> > >> I have created a couple of post but I haven't gotten any replies > recently > >> > >> http://stackoverflow.com/questions/38971376/apache-poi- > xslfconnectorshape > >> xslfconnectorshape > >>> > >> xslfconnectorshape > >> xslfconnectorshape > >>> > >> > >> http://stackoverflow.com/questions/39001499/apache-poi- < > >> http://stackoverflow.com/questions/39001499/apache-poi-> > >> xslfautoshape-shape-offset-property >> http://stackoverflow.com/> > >> questions/39001499/apache-poi-xslfautoshape-shape-offset-property> > >> > >> Besides that, I have one more issue when drawing XSLFFreeFormShape. I am > >> trying to draw a kind of bone shape, however I am getting an exception > in > >> the low-level xml classes. I am adding the class. > >> > >> public class TestBoneShape { > >> > >> public static void main(String[] args) { > >> try { > >> XMLSlideShow pptx = new XMLSlideShow(); > >> XSLFSheet slide = pptx.createSlide(); > >> > >> XSLFFreeformShape freeformShape = slide.createFreeform(); > >> > >> freeformShape.setPath(boneShape(300, 300, 200, 100, 20)); > >> freeformShape.setLineColor(Color.RED); > >> freeformShape.setAnchor(new Rectangle2D.Double(300, 300, 500, > >> 200)); > >> > >> FileOutputStream out = new FileOutputStream("custom- > >> shape.pptx"); > >> pptx.write(out); > >> out.close(); > >> > >> } catch (Exception e) { > >> e.printStackTrace(); > >> } > >> } > >> > >> static Path2D.Double boneShape(double x, > >> double y, > >> double width, > >> double height, > >> double loopWidth) { > >> > >> Path2D.Double bone = new Path2D.Double(); > >> double right = x + width; > >> double bottom = y + height; > >> > >> double xAux = x + loopWidth; > >> double yAux = y + loopWidth / 2; > >> bone.moveTo(xAux, yAux); > >> xAux = right - loopWidth; > >> bone.lineTo(xAux, yAux); > >> yAux = y + height / 2; > >> bone.quadTo(right, y, right, yAux); > >> > >> xAux = right - loopWidth; > >> yAux = bottom - loopWidth / 2; > >> bone.quadTo(right, bottom, xAux, yAux); > >> > >> xAux = x + loopWidth; > >> bone.lineTo(xAux, yAux); > >> yAux = y + height / 2; > >> bone.quadTo(x, bottom, x, yAux); > >> > >> xAux = x + loopWidth; > >> yAux = y + loopWidth / 2; > >> bone.quadTo(x, y, xAux, yAux); > >> > >> bone.closePath(); > >> > >> return bone; > >> } > >> } > >> > >> Thank you > >> Guilherme. > > --94eb2c189f643d45df053ae729d1--