Skip to content

Commit e149ebe

Browse files
committed
fixup: single table border line builders
1 parent 43f6f2d commit e149ebe

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

  • migration-library/src/main/kotlin/com/quadient/migration/api/dto/migrationmodel/builder/documentcontent

migration-library/src/main/kotlin/com/quadient/migration/api/dto/migrationmodel/builder/documentcontent/BorderOptionsBuilder.kt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,27 @@ class BorderOptionsBuilder {
2020

2121
fun leftLine(color: Color?, width: Size?) = apply {
2222
val builder = BorderLineBuilder()
23-
color?.let { this.leftLine = this.leftLine?.copy(color = it) }
24-
width?.let { this.leftLine = this.leftLine?.copy(width = it) }
25-
builder.build()
23+
color?.let(builder::color)
24+
width?.let(builder::width)
25+
this.leftLine = builder.build()
2626
}
2727
fun rightLine(color: Color?, width: Size?) = apply {
2828
val builder = BorderLineBuilder()
29-
color?.let { this.rightLine = this.rightLine?.copy(color = it) }
30-
width?.let { this.rightLine = this.rightLine?.copy(width = it) }
31-
builder.build()
29+
color?.let(builder::color)
30+
width?.let(builder::width)
31+
this.rightLine = builder.build()
3232
}
3333
fun topLine(color: Color?, width: Size?) = apply {
3434
val builder = BorderLineBuilder()
35-
color?.let { this.topLine = this.topLine?.copy(color = it) }
36-
width?.let { this.topLine = this.topLine?.copy(width = it) }
37-
builder.build()
35+
color?.let(builder::color)
36+
width?.let(builder::width)
37+
this.topLine = builder.build()
3838
}
3939
fun bottomLine(color: Color?, width: Size?) = apply {
4040
val builder = BorderLineBuilder()
41-
color?.let { this.bottomLine = this.bottomLine?.copy(color = it) }
42-
width?.let { this.bottomLine = this.bottomLine?.copy(width = it) }
43-
builder.build()
41+
color?.let(builder::color)
42+
width?.let(builder::width)
43+
this.bottomLine = builder.build()
4444
}
4545
fun allBorders(color: Color?, width: Size?) = apply {
4646
val builder = BorderLineBuilder()

0 commit comments

Comments
 (0)