Files
QWERTYkez.OpenXmlProcessors/QWERTYkez.WordProcessor/IWordWriter.cs
melekhin f5eb667973 0.9.1
2026-06-08 14:31:31 +07:00

29 lines
1.5 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using QWERTYkez.WordProcessor;
namespace QWERTYkez.WordProcessor;
public interface IWordWriter : IWordReader
{
/// <summary> Добавляет новый параграф с указанным текстом в конец документа. </summary>
void AddParagraph(string text, bool preserveFormatting = true);
void ReplaceItem(IDictionary<string, IEnumerable<ReplaceItem>> replacements);
void ReplaceItem(IDictionary<string, ReplaceItem> replacements);
void ReplaceItem(IEnumerable<KeyValuePair<string, IEnumerable<ReplaceItem>>> replacements);
void ReplaceItem(IEnumerable<KeyValuePair<string, ReplaceItem>> replacements);
void ReplaceItem(string oldValue, IEnumerable<ReplaceItem> newValues);
void ReplaceItem(string oldValue, params ReplaceItem[] newValues);
void ReplaceString(IDictionary<string, IEnumerable<string>> replacements);
void ReplaceString(IDictionary<string, string> replacements);
void ReplaceString(IEnumerable<KeyValuePair<string, IEnumerable<string>>> replacements);
void ReplaceString(IEnumerable<KeyValuePair<string, string>> replacements);
void ReplaceString(string oldValue, IEnumerable<string> newValues);
void ReplaceString(string oldValue, params string[] newValues);
void ReplaceToTable(string oldValue, Action<ITable> buildTable);
void ReplaceToText(string oldValue, Action<IText> buildText);
void Save();
void SaveTo(string path);
Task SaveToAsync(string path, CancellationToken cancellationToken = default);
bool TrySaveTo(string path, out Exception? error);
}