word table base font
This commit is contained in:
@@ -44,7 +44,7 @@ internal static class ReplaceToTableExt
|
||||
/// Заменяет все параграфы, содержащие указанный текст, на таблицы
|
||||
/// </summary>
|
||||
internal static void ReplaceParagraphsContainingTextToTable(Body body,
|
||||
string oldValue, Action<TableBuilder> buildTable)
|
||||
string oldValue, Action<TableBuilder> buildTable, FontProps? baseFont = null)
|
||||
{
|
||||
if (body is null || string.IsNullOrEmpty(oldValue) || buildTable is null)
|
||||
return;
|
||||
@@ -64,10 +64,10 @@ internal static class ReplaceToTableExt
|
||||
continue;
|
||||
|
||||
// Извлекаем свойства шрифта для передачи в TableBuilder
|
||||
var fontProps = ExtractFontPropsFromParagraph(paragraph, oldValue);
|
||||
baseFont ??= ExtractFontPropsFromParagraph(paragraph, oldValue);
|
||||
|
||||
// Заменяем параграф на таблицу
|
||||
ReplaceWithTableBuilder(paragraph, buildTable, fontProps);
|
||||
ReplaceWithTableBuilder(paragraph, buildTable, baseFont);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user