Skip to content

Commit a4cf1f2

Browse files
authored
Merge pull request #38 from mini-software/impPDX-main
TextColor -> FontColor,BackgroundColor->HighlightColor
2 parents 10e913b + d18ad01 commit a4cf1f2

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/MiniWord/MiniWord.Implment.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@ private static RunProperties AddColorText(MiniWordColorText miniWordColorText)
283283

284284
RunProperties runPro = new RunProperties();
285285
Text text = new Text(miniWordColorText.Text);
286-
Color color = new Color() { Val = miniWordColorText.TextColor?.Replace("#", "") };
287-
Shading shading = new Shading() { Fill = miniWordColorText.BackgroundColor?.Replace("#", "") };
286+
Color color = new Color() { Val = miniWordColorText.FontColor?.Replace("#", "") };
287+
Shading shading = new Shading() { Fill = miniWordColorText.HighlightColor?.Replace("#", "") };
288288
runPro.Append(shading);
289289
runPro.Append(color);
290290
runPro.Append(text);

src/MiniWord/MiniWordColorText.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
namespace MiniSoftware
88
{
9-
public class MiniWordColorText
9+
public class MiniWordColorText
1010
{
11-
public string TextColor { get; set; }
11+
public string FontColor { get; set; }
1212
public string Text { get; set; }
13-
public string BackgroundColor { get; set; }
13+
public string HighlightColor { get; set; }
1414
}
1515
}

tests/MiniWordTests/IssueTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -605,10 +605,10 @@ public void TestColor()
605605
var templatePath = PathHelper.GetFile("TestBasicFill.docx");
606606
var value = new
607607
{
608-
Company_Name = new MiniWordColorText { Text = "MiniSofteware", TextColor = "#eb70AB" },
609-
Name = new MiniWordColorText { Text = "Jack", BackgroundColor = "#eb70AB" },
610-
CreateDate = new MiniWordColorText { Text = new DateTime(2021, 01, 01).ToString(), BackgroundColor = "#eb70AB", TextColor = "#ffffff" },
611-
608+
Company_Name = new MiniWordColorText { Text = "MiniSofteware", FontColor = "#eb70AB" },
609+
Name = new MiniWordColorText { Text = "Jack", HighlightColor = "#eb70AB" },
610+
CreateDate = new MiniWordColorText { Text = new DateTime(2021, 01, 01).ToString()
611+
, HighlightColor = "#eb70AB", FontColor = "#ffffff" },
612612
VIP = true,
613613
Points = 123,
614614
APP = "Demo APP",

0 commit comments

Comments
 (0)