Skip to content

Commit 664e388

Browse files
AlexanderRasolkoiText-CI
authored andcommitted
Set zero or negative size log message level to INFO for drawBackground method
DEVSIX-4191 Autoported commit. Original commit hash: [cf313e760]
1 parent ea7a0c3 commit 664e388

File tree

7 files changed

+3
-8
lines changed

7 files changed

+3
-8
lines changed

itext.tests/itext.forms.tests/itext/forms/PdfFormFieldTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,6 @@ public virtual void ChoiceFieldAutoSize01Test() {
10881088
}
10891089

10901090
[NUnit.Framework.Test]
1091-
[LogMessage(iText.IO.LogMessageConstant.RECTANGLE_HAS_NEGATIVE_OR_ZERO_SIZES)]
10921091
public virtual void ChoiceFieldAutoSize02Test() {
10931092
String filename = destinationFolder + "choiceFieldAutoSize02Test.pdf";
10941093
PdfDocument pdfDoc = new PdfDocument(new PdfWriter(filename));

itext.tests/itext.layout.tests/itext/layout/BlockTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,6 @@ public virtual void BlockFillAvailableArea01() {
538538
}
539539

540540
[NUnit.Framework.Test]
541-
[LogMessage(iText.IO.LogMessageConstant.RECTANGLE_HAS_NEGATIVE_OR_ZERO_SIZES)]
542541
public virtual void MarginsBordersPaddingOverflow01() {
543542
String outFileName = destinationFolder + "marginsBordersPaddingOverflow01.pdf";
544543
String cmpFileName = sourceFolder + "cmp_marginsBordersPaddingOverflow01.pdf";

itext.tests/itext.layout.tests/itext/layout/DefaultLayoutTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ public virtual void RendererTest01() {
9595
}
9696

9797
[NUnit.Framework.Test]
98-
[LogMessage(iText.IO.LogMessageConstant.RECTANGLE_HAS_NEGATIVE_OR_ZERO_SIZES, Count = 1)]
9998
public virtual void EmptyParagraphsTest01() {
10099
String outFileName = destinationFolder + "emptyParagraphsTest01.pdf";
101100
String cmpFileName = sourceFolder + "cmp_emptyParagraphsTest01.pdf";

itext.tests/itext.layout.tests/itext/layout/KeepTogetherTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,6 @@ public virtual void KeepTogetherOnInnerElementMargin02EmptyPageTest() {
686686

687687
[NUnit.Framework.Test]
688688
[LogMessage(iText.IO.LogMessageConstant.ELEMENT_DOES_NOT_FIT_AREA)]
689-
[LogMessage(iText.IO.LogMessageConstant.RECTANGLE_HAS_NEGATIVE_OR_ZERO_SIZES)]
690689
public virtual void SmallFloatInsideKeptTogetherTableTest01() {
691690
String cmpFileName = sourceFolder + "cmp_smallFloatInsideKeptTogetherTableTest01.pdf";
692691
String outFile = destinationFolder + "smallFloatInsideKeptTogetherTableTest01.pdf";

itext.tests/itext.layout.tests/itext/layout/LayoutTaggingTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,6 @@ public virtual void TableWithCaption01() {
739739
}
740740

741741
[NUnit.Framework.Test]
742-
[LogMessage(iText.IO.LogMessageConstant.RECTANGLE_HAS_NEGATIVE_OR_ZERO_SIZES, Count = 2)]
743742
public virtual void EmptyDivTest() {
744743
PdfWriter writer = new PdfWriter(destinationFolder + "emptyDivTest.pdf");
745744
PdfDocument pdf = new PdfDocument(writer);

itext/itext.layout/itext/layout/renderer/AbstractRenderer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ public virtual void DrawBackground(DrawContext drawContext) {
475475
Rectangle backgroundArea = GetBackgroundArea(ApplyMargins(bBox, false));
476476
if (backgroundArea.GetWidth() <= 0 || backgroundArea.GetHeight() <= 0) {
477477
ILog logger = LogManager.GetLogger(typeof(iText.Layout.Renderer.AbstractRenderer));
478-
logger.Warn(MessageFormatUtil.Format(iText.IO.LogMessageConstant.RECTANGLE_HAS_NEGATIVE_OR_ZERO_SIZES, "background"
478+
logger.Info(MessageFormatUtil.Format(iText.IO.LogMessageConstant.RECTANGLE_HAS_NEGATIVE_OR_ZERO_SIZES, "background"
479479
));
480480
}
481481
else {
@@ -515,7 +515,7 @@ public virtual void DrawBackground(DrawContext drawContext) {
515515
}
516516
if (imageRectangle.GetWidth() <= 0 || imageRectangle.GetHeight() <= 0) {
517517
ILog logger = LogManager.GetLogger(typeof(iText.Layout.Renderer.AbstractRenderer));
518-
logger.Warn(MessageFormatUtil.Format(iText.IO.LogMessageConstant.RECTANGLE_HAS_NEGATIVE_OR_ZERO_SIZES, "background-image"
518+
logger.Info(MessageFormatUtil.Format(iText.IO.LogMessageConstant.RECTANGLE_HAS_NEGATIVE_OR_ZERO_SIZES, "background-image"
519519
));
520520
}
521521
else {

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
96fadd774f1f5ff540d5e92f318a062064655241
1+
cf313e7603fc7e749a4dba5d4cfd0ae04a280d92

0 commit comments

Comments
 (0)