табличные замены с параметром
This commit is contained in:
@@ -479,13 +479,48 @@ internal sealed class WordWriter : WordReader, IWordWriter
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// Динамические замены на таблицу с извлечением параметра из "$key|$"
|
||||
// ============================================================
|
||||
|
||||
public void ReplaceToTable(string oldValue, Action<string, ITable> buildTable)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
ThrowIfDisposed();
|
||||
|
||||
if (string.IsNullOrEmpty(oldValue))
|
||||
throw new ArgumentException("Old value cannot be null or empty", nameof(oldValue));
|
||||
|
||||
if (buildTable is null) return;
|
||||
|
||||
#if DEBUG
|
||||
Debug.WriteLine($"[DEBUG] [WordProcessor.ReplaceToTable(dynamic)] START: '{oldValue}'");
|
||||
#endif
|
||||
|
||||
lock (_syncLock)
|
||||
{
|
||||
DynamicReplaceToTableExt.ReplaceParagraphsContainingTextToTableDynamic(_body, oldValue, buildTable);
|
||||
_isModified = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void ReplaceToTable(string oldValue, FontProps baseFont, Action<string, ITable> buildTable)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
ThrowIfDisposed();
|
||||
|
||||
if (string.IsNullOrEmpty(oldValue))
|
||||
throw new ArgumentException("Old value cannot be null or empty", nameof(oldValue));
|
||||
|
||||
if (buildTable is null) return;
|
||||
|
||||
#if DEBUG
|
||||
Debug.WriteLine($"[DEBUG] [WordProcessor.ReplaceToTable(dynamic,font)] START: '{oldValue}'");
|
||||
#endif
|
||||
|
||||
lock (_syncLock)
|
||||
{
|
||||
DynamicReplaceToTableExt.ReplaceParagraphsContainingTextToTableDynamic(_body, oldValue, buildTable, baseFont);
|
||||
_isModified = true;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user