Skip to content

Commit

Permalink
fix: Redundant 'Object.ToString()' call
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-tihon committed Nov 26, 2023
1 parent 3eaac54 commit d777c31
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Clippit/Html/HtmlToWmlConverterCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2062,12 +2062,12 @@ old code
{
if (paraOrRun.Attribute(PtOpenXml.FontName) == null)
{
var fta = new XAttribute(PtOpenXml.FontName, fontType.ToString());
var fta = new XAttribute(PtOpenXml.FontName, fontType);
paraOrRun.Add(fta);
}
else
{
paraOrRun.Attribute(PtOpenXml.FontName).Value = fontType.ToString();
paraOrRun.Attribute(PtOpenXml.FontName).Value = fontType;
}
}
if (languageType != null)
Expand Down Expand Up @@ -2221,7 +2221,7 @@ private static XElement TransformImageToWml(XElement element, HtmlToWmlConverter
var pictureId = pid.Id;
++pid.Id;

var pictureDescription = "Picture " + pictureId.ToString();
var pictureDescription = "Picture " + pictureId;

var floatValue = element.GetProp("float").ToString();
if (floatValue == "none")
Expand Down
2 changes: 1 addition & 1 deletion Clippit/Word/DocumentBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ private static string GenStyleIdFromStyleName(string styleName)
var newStyleId = styleName
.Replace("_", "")
.Replace("#", "")
.Replace(".", "") + ((new Random()).Next(990) + 9).ToString();
.Replace(".", "") + ((new Random()).Next(990) + 9);
return newStyleId;
}

Expand Down

0 comments on commit d777c31

Please sign in to comment.