Skip to content

Commit e0d5efb

Browse files
ars18wrwiText-CI
authored andcommitted
Add a test on a cell rotation issue
DEVSIX-5029 Autoported commit. Original commit hash: [927101a3c]
1 parent ca4b315 commit e0d5efb

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

itext.tests/itext.layout.tests/itext/layout/RotationTest.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,31 @@ public virtual void CellRotationDependsOnNeighbourCell() {
402402
, "diff"));
403403
}
404404

405+
[NUnit.Framework.Test]
406+
public virtual void CellRotationParagraphIsGone() {
407+
// TODO DEVSIX-5029 Content of the first cell is missing
408+
String testName = "cellRotationParagraphIsGone.pdf";
409+
String outFileName = destinationFolder + testName;
410+
String cmpFileName = sourceFolder + cmpPrefix + testName;
411+
PdfDocument pdf = new PdfDocument(new PdfWriter(outFileName));
412+
Document doc = new Document(pdf);
413+
Table table = new Table(2);
414+
table.SetFixedLayout();
415+
Cell cell = new Cell().Add(new Paragraph().Add("Hello World"));
416+
cell.SetRotationAngle(MathUtil.ToRadians(90));
417+
cell.SetBackgroundColor(ColorConstants.RED);
418+
table.AddCell(cell);
419+
cell = new Cell().Add(new Paragraph().Add("AAAAAAAAAAAAAAAAA aaaaaaaaaaaaaaaaaaaaaaaa " + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
420+
));
421+
cell.SetRotationAngle(MathUtil.ToRadians(90));
422+
cell.SetBackgroundColor(ColorConstants.BLUE);
423+
table.AddCell(cell);
424+
doc.Add(table);
425+
doc.Close();
426+
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outFileName, cmpFileName, destinationFolder
427+
, "diff"));
428+
}
429+
405430
private Table CreateTable(float height) {
406431
Table table = new Table(UnitValue.CreatePercentArray(2)).UseAllAvailableWidth();
407432
Cell rotatedCell = new Cell();

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
09da765369970f1e8c0f8e5f79f23887eeb459b9
1+
927101a3cb5d9f5ca692faa4163a13a3bb5c06f5

0 commit comments

Comments
 (0)