[
https://issues.apache.org/jira/browse/ODFTOOLKIT-360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Svante Schubert updated ODFTOOLKIT-360:
---------------------------------------
Priority: Major (was: Blocker)
> comparison of tablnames on setting data to the dataset is wrong and fails
> -------------------------------------------------------------------------
>
> Key: ODFTOOLKIT-360
> URL: https://issues.apache.org/jira/browse/ODFTOOLKIT-360
> Project: ODF Toolkit
> Issue Type: Bug
> Components: simple api
> Affects Versions: 0.7-incubating
> Reporter: Michael Kabdebo
>
> I'm using a cell range address like this: 'TableName'.A1:'TableName.EN4'
> This is a valid format and matches the regex in the class
> CellRangeAddress.class.
> In DataSet:618 you are going through a NodeList to find the table by a given
> name. The given table name has been extracted from the cell range address.
> The problem: the extracted table name contains the quotes chars and no table
> will be found in this case, because: 'Tablename' != TableName
> possible solution:
> private boolean matchingTable(String extractedName, String tableName){
> if(extractedName != null && extractedName.startsWith("'")&&
> extractedName.endsWith("'")){
> extractedName = extractedName.substring(1, extractedName.length()-1);
> }
> if(tableName != null && tableName.startsWith("'")&&
> tableName.endsWith("'")){
> tableName = tableName.substring(1, tableName.length()-1);
> }
> return extractedName.equals(tableName);
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)