Skip to content
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
2 changes: 1 addition & 1 deletion ooxml/XSSF/UserModel/XSSFVMLDrawing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ internal void Read(Stream is1)
//Stream vmlsm = new EvilUnclosedBRFixingInputStream(is1); --TODO:: add later

doc.LoadXml(
data.Replace("<br>","")
data.Replace("<br>","").Replace("</br>", "")
);

XmlNamespaceManager nsmgr = new XmlNamespaceManager(doc.NameTable);
Expand Down
11 changes: 11 additions & 0 deletions testcases/ooxml/XSSF/UserModel/TestXSSFVMLDrawing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,17 @@ public void TestFindCommentShape()
Assert.AreSame(sh_a1, newVml.FindCommentShape(0, 1));
}
[Test]
public void TestRead()
{
XSSFVMLDrawing vml = new XSSFVMLDrawing();

// Act
TestDelegate testDelegate = () => vml.Read(POIDataSamples.GetSpreadSheetInstance().OpenResourceAsStream("vmlDrawing1.vml"));

// Assert
Assert.DoesNotThrow(testDelegate);
}
[Test]
public void TestRemoveCommentShape()
{
XSSFVMLDrawing vml = new XSSFVMLDrawing();
Expand Down
3 changes: 3 additions & 0 deletions testcases/test-data/spreadsheet/vmlDrawing1.vml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
<v:path o:connecttype="none"/>
<v:textbox style="mso-direction-alt:auto">
<div style="text-align:left"/>
<div style='text-align:center'>
<b>Some Text<br></br></b>
</div>
</v:textbox>
<x:ClientData ObjectType="Note">
<x:MoveWithCells/>
Expand Down