Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v24.6.0 features, ehancements and bug fixes #17

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions OpenXML.Templates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12816,7 +12816,7 @@ internal class CoreProperties
var subject = dict["Subject"];// "My Subject";//dict["Subject"];
var keywords = dict["Keywords"];//"My Keyword";//dict["Keywords"];
var description = dict["Description"];// "My Description";//dict["Description"];
var creator = dict["Creator"];// "FileFormat.Words"; //dict["Creator"];
var creator = dict["Creator"];// "Openize.Words"; //dict["Creator"];
var created = dict["Created"];
var modified = dict["Modified"];
var writer = new System.Xml.XmlTextWriter(part.GetStream(
Expand Down Expand Up @@ -12850,7 +12850,7 @@ private void GeneratePartContent(ExtendedFilePropertiesPart part)
var characters1 = new Ap.Characters();
characters1.Text = "0";
var application1 = new Ap.Application();
application1.Text = "FileFormat.Words";
application1.Text = "Openize.Words";
var documentSecurity1 = new Ap.DocumentSecurity();
documentSecurity1.Text = "0";
var lines1 = new Ap.Lines();
Expand All @@ -12860,7 +12860,7 @@ private void GeneratePartContent(ExtendedFilePropertiesPart part)
var scaleCrop1 = new Ap.ScaleCrop();
scaleCrop1.Text = "false";
var company1 = new Ap.Company();
company1.Text = "FileFormat.Words";
company1.Text = "Openize.Words";
var linksUpToDate1 = new Ap.LinksUpToDate();
linksUpToDate1.Text = "false";
var charactersWithSpaces1 = new Ap.CharactersWithSpaces();
Expand Down
18 changes: 9 additions & 9 deletions OpenXML.Words.Data.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ internal void Insert(FF.IElement newElement, int position, Document doc)
{
_staticDocDict.TryGetValue(doc.GetInstanceInfo(), out WordprocessingDocument staticDoc);

if (staticDoc?.MainDocumentPart?.Document?.Body == null) throw new FileFormatException("Package or Document or Body is null", new NullReferenceException());
if (staticDoc?.MainDocumentPart?.Document?.Body == null) throw new OpenizeException("Package or Document or Body is null", new NullReferenceException());

_ooxmlDoc = OwDocument.CreateInstance(staticDoc);

Expand Down Expand Up @@ -95,7 +95,7 @@ internal void Insert(FF.IElement newElement, int position, Document doc)
staticDoc.MainDocumentPart.Document.Body.RemoveAllChildren();
staticDoc.MainDocumentPart.Document.Body.Append(originalElements);
var errorMessage = ConstructMessage(ex, "Remove OOXML Element(s)");
throw new FileFormatException(errorMessage, ex);
throw new OpenizeException(errorMessage, ex);
}
}
}
Expand All @@ -106,7 +106,7 @@ internal void Update(FF.IElement newElement, int position, Document doc)
{
_staticDocDict.TryGetValue(doc.GetInstanceInfo(), out WordprocessingDocument staticDoc);

if (staticDoc?.MainDocumentPart?.Document?.Body == null) throw new FileFormatException("Package or Document or Body is null", new NullReferenceException());
if (staticDoc?.MainDocumentPart?.Document?.Body == null) throw new OpenizeException("Package or Document or Body is null", new NullReferenceException());

_ooxmlDoc = OwDocument.CreateInstance(staticDoc);

Expand Down Expand Up @@ -147,7 +147,7 @@ internal void Update(FF.IElement newElement, int position, Document doc)
staticDoc.MainDocumentPart.Document.Body.RemoveAllChildren();
staticDoc.MainDocumentPart.Document.Body.Append(originalElements);
var errorMessage = ConstructMessage(ex, "Update OOXML Element(s)");
throw new FileFormatException(errorMessage, ex);
throw new OpenizeException(errorMessage, ex);
}
}
}
Expand All @@ -158,7 +158,7 @@ internal void Remove(int position, Document doc)
{
_staticDocDict.TryGetValue(doc.GetInstanceInfo(), out WordprocessingDocument staticDoc);

if (staticDoc?.MainDocumentPart?.Document?.Body == null) throw new FileFormatException("Package or Document or Body is null", new NullReferenceException());
if (staticDoc?.MainDocumentPart?.Document?.Body == null) throw new OpenizeException("Package or Document or Body is null", new NullReferenceException());

var enumerable = staticDoc.MainDocumentPart.Document.Body.Elements().ToList();
var originalElements = new List<DF.OpenXmlElement>(enumerable);
Expand All @@ -174,7 +174,7 @@ internal void Remove(int position, Document doc)
staticDoc.MainDocumentPart.Document.Body.RemoveAllChildren();
staticDoc.MainDocumentPart.Document.Body.Append(originalElements);
var errorMessage = ConstructMessage(ex, "Remove OOXML Element(s)");
throw new FileFormatException(errorMessage, ex);
throw new OpenizeException(errorMessage, ex);
}
}
}
Expand All @@ -185,7 +185,7 @@ internal void Append(FF.IElement newElement, Document doc)
{
_staticDocDict.TryGetValue(doc.GetInstanceInfo(), out WordprocessingDocument staticDoc);

if (staticDoc?.MainDocumentPart?.Document?.Body == null) throw new FileFormatException("Package or Document or Body is null", new NullReferenceException());
if (staticDoc?.MainDocumentPart?.Document?.Body == null) throw new OpenizeException("Package or Document or Body is null", new NullReferenceException());

_ooxmlDoc = OwDocument.CreateInstance(staticDoc);

Expand Down Expand Up @@ -225,7 +225,7 @@ internal void Append(FF.IElement newElement, Document doc)
staticDoc.MainDocumentPart.Document.Body.RemoveAllChildren();
staticDoc.MainDocumentPart.Document.Body.Append(originalElements);
var errorMessage = ConstructMessage(ex, "Append OOXML Element(s)");
throw new FileFormatException(errorMessage, ex);
throw new OpenizeException(errorMessage, ex);
}
}
}
Expand All @@ -245,7 +245,7 @@ internal void Save(System.IO.Stream stream, Document doc)
catch (Exception ex)
{
var errorMessage = ConstructMessage(ex, "Save OOXML OWDocument");
throw new FileFormatException(errorMessage, ex);
throw new OpenizeException(errorMessage, ex);
}
}
}
Expand Down