Bug 44336 - [PATCH] Sheet names with special characters aren't rendered properly in formulas
Summary: [PATCH] Sheet names with special characters aren't rendered properly in form...
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.0-dev
Hardware: Other All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-31 22:44 UTC by Josh Micich
Modified: 2008-02-01 05:02 UTC (History)
0 users



Attachments
svn diff for several files + 5 new java files (7.22 KB, patch)
2008-01-31 22:51 UTC, Josh Micich
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Josh Micich 2008-01-31 22:44:18 UTC
Ref3DPtg.toFormulaString() has some code to detect the presense of a space 
char.  Area3DPtg doesn't even have that.

Some sample junit code to show the error:

Ref3DPtg target = new Ref3DPtg("A1", (short)0);
Workbook book = Workbook.createWorkbook();
book.checkExternSheet(0);
book.setSheetName(0, "profit+loss");
assertEquals("'profit+loss'!A1", target.toFormulaString(book));
Comment 1 Josh Micich 2008-01-31 22:51:21 UTC
Created attachment 21457 [details]
svn diff for several files + 5 new java files

Some unrelated junit tests broke while doing the work.	These were mostly
related to printRanges.  It was assumed that the correct behaviour for
rendering 3d refs for print ranges was the same as that for rendering formulas
(i.e. delimit and escape if any special characters are present).  The junits
were modified to reflect this.
Comment 2 Nick Burch 2008-02-01 05:02:32 UTC
Thanks for this, patch applied to trunk