Skip to content

Commit 21b74f8

Browse files
author
Openize Words
authored
Merge pull request #17 from sabir-gmail/v24.6.0
v24.6.0 features, ehancements and bug fixes
2 parents cac6191 + 1306038 commit 21b74f8

File tree

6 files changed

+302
-112
lines changed

6 files changed

+302
-112
lines changed

OpenXML.Templates.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12816,7 +12816,7 @@ private void GeneratePartContent(CoreFilePropertiesPart part,
1281612816
var subject = dict["Subject"];// "My Subject";//dict["Subject"];
1281712817
var keywords = dict["Keywords"];//"My Keyword";//dict["Keywords"];
1281812818
var description = dict["Description"];// "My Description";//dict["Description"];
12819-
var creator = dict["Creator"];// "FileFormat.Words"; //dict["Creator"];
12819+
var creator = dict["Creator"];// "Openize.Words"; //dict["Creator"];
1282012820
var created = dict["Created"];
1282112821
var modified = dict["Modified"];
1282212822
var writer = new System.Xml.XmlTextWriter(part.GetStream(
@@ -12850,7 +12850,7 @@ private void GeneratePartContent(ExtendedFilePropertiesPart part)
1285012850
var characters1 = new Ap.Characters();
1285112851
characters1.Text = "0";
1285212852
var application1 = new Ap.Application();
12853-
application1.Text = "FileFormat.Words";
12853+
application1.Text = "Openize.Words";
1285412854
var documentSecurity1 = new Ap.DocumentSecurity();
1285512855
documentSecurity1.Text = "0";
1285612856
var lines1 = new Ap.Lines();
@@ -12860,7 +12860,7 @@ private void GeneratePartContent(ExtendedFilePropertiesPart part)
1286012860
var scaleCrop1 = new Ap.ScaleCrop();
1286112861
scaleCrop1.Text = "false";
1286212862
var company1 = new Ap.Company();
12863-
company1.Text = "FileFormat.Words";
12863+
company1.Text = "Openize.Words";
1286412864
var linksUpToDate1 = new Ap.LinksUpToDate();
1286512865
linksUpToDate1.Text = "false";
1286612866
var charactersWithSpaces1 = new Ap.CharactersWithSpaces();

OpenXML.Words.Data.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ internal void Insert(FF.IElement newElement, int position, Document doc)
5757
{
5858
_staticDocDict.TryGetValue(doc.GetInstanceInfo(), out WordprocessingDocument staticDoc);
5959

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

6262
_ooxmlDoc = OwDocument.CreateInstance(staticDoc);
6363

@@ -95,7 +95,7 @@ internal void Insert(FF.IElement newElement, int position, Document doc)
9595
staticDoc.MainDocumentPart.Document.Body.RemoveAllChildren();
9696
staticDoc.MainDocumentPart.Document.Body.Append(originalElements);
9797
var errorMessage = ConstructMessage(ex, "Remove OOXML Element(s)");
98-
throw new FileFormatException(errorMessage, ex);
98+
throw new OpenizeException(errorMessage, ex);
9999
}
100100
}
101101
}
@@ -106,7 +106,7 @@ internal void Update(FF.IElement newElement, int position, Document doc)
106106
{
107107
_staticDocDict.TryGetValue(doc.GetInstanceInfo(), out WordprocessingDocument staticDoc);
108108

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

111111
_ooxmlDoc = OwDocument.CreateInstance(staticDoc);
112112

@@ -147,7 +147,7 @@ internal void Update(FF.IElement newElement, int position, Document doc)
147147
staticDoc.MainDocumentPart.Document.Body.RemoveAllChildren();
148148
staticDoc.MainDocumentPart.Document.Body.Append(originalElements);
149149
var errorMessage = ConstructMessage(ex, "Update OOXML Element(s)");
150-
throw new FileFormatException(errorMessage, ex);
150+
throw new OpenizeException(errorMessage, ex);
151151
}
152152
}
153153
}
@@ -158,7 +158,7 @@ internal void Remove(int position, Document doc)
158158
{
159159
_staticDocDict.TryGetValue(doc.GetInstanceInfo(), out WordprocessingDocument staticDoc);
160160

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

163163
var enumerable = staticDoc.MainDocumentPart.Document.Body.Elements().ToList();
164164
var originalElements = new List<DF.OpenXmlElement>(enumerable);
@@ -174,7 +174,7 @@ internal void Remove(int position, Document doc)
174174
staticDoc.MainDocumentPart.Document.Body.RemoveAllChildren();
175175
staticDoc.MainDocumentPart.Document.Body.Append(originalElements);
176176
var errorMessage = ConstructMessage(ex, "Remove OOXML Element(s)");
177-
throw new FileFormatException(errorMessage, ex);
177+
throw new OpenizeException(errorMessage, ex);
178178
}
179179
}
180180
}
@@ -185,7 +185,7 @@ internal void Append(FF.IElement newElement, Document doc)
185185
{
186186
_staticDocDict.TryGetValue(doc.GetInstanceInfo(), out WordprocessingDocument staticDoc);
187187

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

190190
_ooxmlDoc = OwDocument.CreateInstance(staticDoc);
191191

@@ -225,7 +225,7 @@ internal void Append(FF.IElement newElement, Document doc)
225225
staticDoc.MainDocumentPart.Document.Body.RemoveAllChildren();
226226
staticDoc.MainDocumentPart.Document.Body.Append(originalElements);
227227
var errorMessage = ConstructMessage(ex, "Append OOXML Element(s)");
228-
throw new FileFormatException(errorMessage, ex);
228+
throw new OpenizeException(errorMessage, ex);
229229
}
230230
}
231231
}
@@ -245,7 +245,7 @@ internal void Save(System.IO.Stream stream, Document doc)
245245
catch (Exception ex)
246246
{
247247
var errorMessage = ConstructMessage(ex, "Save OOXML OWDocument");
248-
throw new FileFormatException(errorMessage, ex);
248+
throw new OpenizeException(errorMessage, ex);
249249
}
250250
}
251251
}

0 commit comments

Comments
 (0)