mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-12-06 02:51:36 +00:00
Added whole documents to the Translation, Grammar & Spelling, and Rewrite & Improve assistants (#1179)
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
1 parent
f7666861f1
commit
918572c158
150 files changed
+12850
-302
No files matched your search
@@ -1,3 +1,5 @@
|
||||
using AIStudio.Tools.OpenXml;
|
||||
|
||||
using DocumentFormat.OpenXml.Packaging;
|
||||
|
||||
using A = DocumentFormat.OpenXml.Drawing;
|
||||
@@ -56,16 +58,6 @@ internal sealed partial class PresentationTemplate
|
||||
/// </summary>
|
||||
private const int READING_ROWS = 50;
|
||||
|
||||
/// <summary>
|
||||
/// How a template file is opened for reading.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Other programs may go on writing or deleting the file meanwhile. PowerPoint keeps a file open
|
||||
/// for writing as long as it shows it, and a template which is still open there has to be
|
||||
/// readable all the same.
|
||||
/// </remarks>
|
||||
public const FileShare FILE_SHARE = FileShare.ReadWrite | FileShare.Delete;
|
||||
|
||||
/// <summary>
|
||||
/// Reads the template file at the given path, as Read does with a stream.
|
||||
/// </summary>
|
||||
@@ -77,7 +69,7 @@ internal sealed partial class PresentationTemplate
|
||||
/// <returns>The template.</returns>
|
||||
public static PresentationTemplate ReadFile(string path)
|
||||
{
|
||||
using var stream = new FileStream(path, FileMode.Open, FileAccess.Read, FILE_SHARE);
|
||||
using var stream = TemplateFile.OpenRead(path);
|
||||
return Read(stream);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user