Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poi bug 51519 and 45353 #1464

Merged
merged 3 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions testcases/main/HSSF/UserModel/TestBugs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3482,6 +3482,22 @@ public void Test53564()
}


[Test]
public void Test45353a()
{
IWorkbook wb = HSSFTestDataSamples.OpenSampleWorkbook("named-cell-in-formula-test.xls");
wb.GetCreationHelper().CreateFormulaEvaluator().EvaluateAll();
wb.Close();
}

[Test]
public void Test45353b()
{
IWorkbook wb = HSSFTestDataSamples.OpenSampleWorkbook("named-cell-test.xls");
wb.GetCreationHelper().CreateFormulaEvaluator().EvaluateAll();
wb.Close();
}

// follow https://svn.apache.org/viewvc?view=revision&revision=1896552 to write a unit test for this fix.
[Test]
public void Test52447()
Expand Down
23 changes: 20 additions & 3 deletions testcases/ooxml/XSSF/Extractor/TestXSSFExcelExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,9 @@ public void TestEmptyCells()
}

/**
* Simple test for text box text
* @throws IOException
*/
* Simple test for text box text
* @throws IOException
*/
[Test]
public void TestTextBoxes()
{
Expand Down Expand Up @@ -294,6 +294,23 @@ public void Test67784Formulas()
extractor.Close();
}

[Test]
public void TestPhoneticRuns()
{
XSSFExcelExtractor extractor = GetExtractor("51519.xlsx");
try
{
String text = extractor.Text;
Assert.IsTrue(text.Contains("\u8C4A\u7530"));
//this shows up only as a phonetic run and should not appear
//in the extracted text
Assert.IsFalse(text.Contains("\u30CB\u30DB\u30F3"));
}
finally
{
extractor.Close();
}
}
}
}

Expand Down
Binary file added testcases/test-data/spreadsheet/51519.xlsx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading