You are viewing a plain text version of this content. The canonical link for it is here.
Posted to odf-dev@incubator.apache.org by "Svante Schubert (JIRA)" <ji...@apache.org> on 2017/06/20 10:57:00 UTC

[jira] [Closed] (ODFTOOLKIT-414) ClassCast: OdfStyle cannot be OdfAttribute on some (maybe new openoffice?)

     [ https://issues.apache.org/jira/browse/ODFTOOLKIT-414?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Svante Schubert closed ODFTOOLKIT-414.
--------------------------------------

Closing as duplicate 

> ClassCast: OdfStyle cannot be OdfAttribute on some <style:column-sep> (maybe new openoffice?)
> ---------------------------------------------------------------------------------------------
>
>                 Key: ODFTOOLKIT-414
>                 URL: https://issues.apache.org/jira/browse/ODFTOOLKIT-414
>             Project: ODF Toolkit
>          Issue Type: Bug
>          Components: odfdom
>    Affects Versions: 0.6.2-incubating
>         Environment: any
>            Reporter: Sanny Sanoff
>            Assignee: Svante Schubert
>              Labels: easyfix
>
> this part in content.xml causes the classcast:
>                     <style:column-sep style:width="0.002cm" style:color="#000000" style:height="100%" style:style="solid"/>
> this does not:
>                     <style:column-sep style:width="0.002cm" style:color="#000000" style:height="100%"/>
> Here is the source code (OdfXMLFactory.java):
> 		OdfAttribute attr = null;
> 		// lookup registered attribute class for qname
> 		Class attributeClass = getOdfAttributeClass(name);
> 		// if a class was registered create an instance of that class
> 		if (attributeClass != null) {
> // line 256:
> 			attr = (OdfAttribute) getNodeFromClass(dom, attributeClass);
>                                 ^^^^^^^^^^^^^^^^^^^
> Here's the full stack trace:
> java.lang.ClassCastException: org.odftoolkit.odfdom.incubator.doc.style.OdfStyle cannot be cast to org.odftoolkit.odfdom.pkg.OdfAttribute
> 	at org.odftoolkit.odfdom.pkg.OdfXMLFactory.newOdfAttribute(OdfXMLFactory.java:256)
> 	at org.odftoolkit.odfdom.pkg.OdfFileDom.createAttributeNS(OdfFileDom.java:332)
> 	at org.odftoolkit.odfdom.pkg.OdfFileDom.createAttributeNS(OdfFileDom.java:322)
> 	at org.odftoolkit.odfdom.pkg.OdfFileSaxHandler.startElement(OdfFileSaxHandler.java:104)
> 	at org.odftoolkit.odfdom.pkg.rdfa.MultiContentHandler.startElement(MultiContentHandler.java:83)
> 	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)