diff --git a/Test/Applications/DocxFormatCodeGen/codegen/CodeGenXmlJS.cs b/Test/Applications/DocxFormatCodeGen/codegen/CodeGenXmlJS.cs index 1273cacf97..b6c704ea64 100644 --- a/Test/Applications/DocxFormatCodeGen/codegen/CodeGenXmlJS.cs +++ b/Test/Applications/DocxFormatCodeGen/codegen/CodeGenXmlJS.cs @@ -76,12 +76,12 @@ namespace codegen //string gc_sTargetNamespace = "http://schemas.microsoft.com/office/spreadsheetml/2019/namedsheetviews"; //string gc_sXsd = "xlsx-ext/sml.xsd"; - //string[] gc_aTargetTypes = new string[] { "CT_Stylesheet" }; + //string[] gc_aTargetTypes = new string[] { "CT_Workbook", "CT_Worksheet", "CT_PivotCacheDefinition", "CT_PivotCacheRecords", "CT_pivotTableDefinition", "CT_Stylesheet" }; //string gc_sTargetNamespace = "http://schemas.openxmlformats.org/spreadsheetml/2006/main"; - string gc_sXsd = "wml.xsd"; - string[] gc_aTargetTypes = new string[] { "CT_Comments" }; - string gc_sTargetNamespace = "http://purl.oclc.org/ooxml/wordprocessingml/main"; + //string gc_sXsd = "wml.xsd"; + //string[] gc_aTargetTypes = new string[] { "CT_Document", "CT_GlossaryDocument", "CT_Styles", "CT_Numbering", "CT_Settings", "CT_HdrFtr", "CT_Footnotes", "CT_Endnotes", "CT_Comments" }; + //string gc_sTargetNamespace = "http://purl.oclc.org/ooxml/wordprocessingml/main"; //string gc_sXsd = "dml-chart.xsd"; //string[] gc_aTargetTypes = new string[] { "CT_ChartSpace" }; @@ -107,6 +107,10 @@ namespace codegen //string[] gc_aTargetTypes = new string[] { "CT_CommentsExtensible" }; //string gc_sTargetNamespace = "http://schemas.microsoft.com/office/word/2018/wordml/cex"; + string gc_sXsd = "vsdx/visio.xsd"; + string[] gc_aTargetTypes = new string[] { "VisioDocument_Type", "Masters_Type", "PageContents_Type", "Pages_Type", "PageContents_Type", + "DataConnections_Type", "DataRecordSets_Type", "Comments_Type", "Extensions_Type"}; + string gc_sTargetNamespace = "http://schemas.microsoft.com/office/visio/2012/main"; public void Start(string sDirIn, string sDirCppXmlOut, string sDirCppBinOut, string sDirJsBinOut, ValidationEventHandler oValidationEventHandler) { diff --git a/Test/Applications/DocxFormatCodeGen/codegen/CodegenXmlJSFiles.cs b/Test/Applications/DocxFormatCodeGen/codegen/CodegenXmlJSFiles.cs index 61d5f235ca..921ea66b97 100644 --- a/Test/Applications/DocxFormatCodeGen/codegen/CodegenXmlJSFiles.cs +++ b/Test/Applications/DocxFormatCodeGen/codegen/CodegenXmlJSFiles.cs @@ -41,7 +41,7 @@ namespace codegen { class CodeGenXmlJSCPP { - string toXmlNaspace = "w:"; + string toXmlNaspace = ""; Dictionary m_mapProcessedClasses = new Dictionary(); string[] gc_numeric = { "Null", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine" }; public static Dictionary m_mapNamespaceToPrefix = new Dictionary() diff --git a/Test/Applications/DocxFormatCodeGen/codegen/Resource/vsdx/visio.xsd b/Test/Applications/DocxFormatCodeGen/codegen/Resource/vsdx/visio.xsd new file mode 100644 index 0000000000..b3381b6c57 --- /dev/null +++ b/Test/Applications/DocxFormatCodeGen/codegen/Resource/vsdx/visio.xsd @@ -0,0 +1,830 @@ + + + + + + + + Permission to copy, display and distribute the contents of this document (the + "Specification"), in any medium for any purpose without fee or royalty is + hereby granted, provided that you include the following notice on ALL copies of + the Specification, or portions thereof, that you make: + Copyright (c) Microsoft Corporation. All rights reserved. Permission to copy, + display and distribute this document is available at: + http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp?frame=true. + No right to create modifications or derivatives of this Specification is + granted herein. There is a separate patent license available to parties + interested in implementing software programs that can read and write files that + conform to the Specification. This patent license is available at this + location: http://www.microsoft.com/mscorp/ip/format/xmlpatentlicense.asp. + THE SPECIFICATION IS PROVIDED "AS IS" AND MICROSOFT MAKES NO REPRESENTATIONS OR + WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; + THAT THE CONTENTS OF THE SPECIFICATION ARE SUITABLE FOR ANY PURPOSE; NOR THAT + THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, + COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. MICROSOFT WILL NOT BE LIABLE FOR ANY + DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF + OR RELATING TO ANY USE OR DISTRIBUTION OF THE SPECIFICATION. + The name and trademarks of Microsoft may NOT be used in any manner, including + advertising or publicity pertaining to the Specification or its contents + without specific, written prior permission. Title to copyright in the + Specification will at all times remain with Microsoft. No other rights are + granted by implication, estoppel or otherwise. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Test/Applications/DocxFormatCodeGen/codegen/Resource/wml.xsd b/Test/Applications/DocxFormatCodeGen/codegen/Resource/wml.xsd index 300a688133..40a4fa61f8 100644 --- a/Test/Applications/DocxFormatCodeGen/codegen/Resource/wml.xsd +++ b/Test/Applications/DocxFormatCodeGen/codegen/Resource/wml.xsd @@ -821,14 +821,16 @@ - - - - - + + + + + + + diff --git a/Test/Applications/FilesSort/FilesSort/Program.cs b/Test/Applications/FilesSort/FilesSort/Program.cs index 6db1322b2c..df0be93898 100644 --- a/Test/Applications/FilesSort/FilesSort/Program.cs +++ b/Test/Applications/FilesSort/FilesSort/Program.cs @@ -40,8 +40,8 @@ namespace FilesSort } static void Main(string[] args) { - string input = @"D:\logs\doc.onlyoffice.com\sync\files"; - string output = @"D:\logs\doc.onlyoffice.com\6.4.1\errorsorted"; + string input = @"D:\logs\doc.onlyoffice.com\7.3.2\files"; + string output = @"D:\logs\doc.onlyoffice.com\7.3.2\files-sorted"; DateTime start = DateTime.Now; Dictionary hash = new Dictionary(); @@ -58,39 +58,43 @@ namespace FilesSort string[] dirs2 = Directory.GetDirectories(dirs[i]); for (int j = 0; j < dirs2.Length; ++j) { - string curDir = dirs2[j]; - if (!curDir.EndsWith("browser")) + string[] dirs3 = Directory.GetDirectories(dirs2[j]); + for (int k = 0; k < dirs3.Length; ++k) { - string source = Path.Combine(curDir, "source"); - bool bError = true; - if (Directory.Exists(source)) + string curDir = dirs3[k]; + if (!curDir.EndsWith("browser")) { - string[] files = Directory.GetFiles(source); - if (files.Length > 0) + string source = Path.Combine(curDir, "source"); + bool bError = true; + if (Directory.Exists(source)) { - bError = false; - string file = files[0]; - long size = new System.IO.FileInfo(file).Length; - long outVal; - if (!hash.TryGetValue(size, out outVal)) + string[] files = Directory.GetFiles(source); + if (files.Length > 0) { - hash[size] = 1; + bError = false; + string file = files[0]; + long size = new System.IO.FileInfo(file).Length; + long outVal; + if (!hash.TryGetValue(size, out outVal)) + { + hash[size] = 1; - int format = FormatChecker.GetFileFormat(file); - string formatStr = FormatChecker.FileFormats.ToString(format); - if (string.IsNullOrEmpty(formatStr)) - formatStr = "unknown"; - string formatDir = Path.Combine(output, formatStr); - Directory.CreateDirectory(formatDir); - Copy(curDir, Path.Combine(formatDir, Path.GetFileName(curDir))); + int format = FormatChecker.GetFileFormat(file); + string formatStr = FormatChecker.FileFormats.ToString(format); + if (string.IsNullOrEmpty(formatStr)) + formatStr = "unknown"; + string formatDir = Path.Combine(output, formatStr); + Directory.CreateDirectory(formatDir); + Copy(curDir, Path.Combine(formatDir, Path.GetFileName(curDir))); + } } } - } - if (bError) - { - string error = Path.Combine(output, "error"); - Directory.CreateDirectory(error); - Copy(curDir, Path.Combine(error, Path.GetFileName(curDir))); + if (bError) + { + string error = Path.Combine(output, "error"); + Directory.CreateDirectory(error); + Copy(curDir, Path.Combine(error, Path.GetFileName(curDir))); + } } } } diff --git a/Test/Applications/ParseAllCultureInfo/ParseAllCultureInfo/Parser.cs b/Test/Applications/ParseAllCultureInfo/ParseAllCultureInfo/Parser.cs index 6d3d9daf8c..5b10315f1d 100644 --- a/Test/Applications/ParseAllCultureInfo/ParseAllCultureInfo/Parser.cs +++ b/Test/Applications/ParseAllCultureInfo/ParseAllCultureInfo/Parser.cs @@ -182,6 +182,7 @@ namespace ParseAllCultureInfo static Dictionary g_mapUsedValues = new Dictionary() { {4, 1}, {5, 1}, + {6, 1}, {7, 1}, {8, 1}, {9, 1}, @@ -208,6 +209,7 @@ namespace ParseAllCultureInfo {1026, 1}, {1028, 1}, {1029, 1}, + {1030, 1}, {1031, 1}, {1032, 1}, {1033, 1}, diff --git a/Test/Applications/ParseLogs/ParseLogs/Program.cs b/Test/Applications/ParseLogs/ParseLogs/Program.cs index e137c1e561..4bb3a4fd51 100644 --- a/Test/Applications/ParseLogs/ParseLogs/Program.cs +++ b/Test/Applications/ParseLogs/ParseLogs/Program.cs @@ -15,17 +15,18 @@ namespace ParseLogs string logMessage = ""; foreach (var line in File.ReadLines(filename)) { + var _line = line.Replace("\\n", "\n"); if (!start) { - if (line.Contains("[ERROR] nodeJS - changesError")) + if (_line.Contains("changesError:")) { key = ""; logMessage = ""; - int indexStart = line.IndexOf(" Error: "); + int indexStart = _line.IndexOf("Error:"); if (-1 != indexStart) { - key = line.Substring(indexStart); - int indexEnd = key.IndexOf(" userAgent: "); + key = _line.Substring(indexStart); + int indexEnd = key.IndexOf("userAgent:"); if (-1 != indexEnd) { key = key.Substring(0, indexEnd); @@ -38,7 +39,7 @@ namespace ParseLogs unique[key] = 1; } start = true; - logMessage += line; + logMessage += _line; logMessage += '\n'; } } @@ -47,7 +48,7 @@ namespace ParseLogs { if ("" == key) { - key = line; + key = _line; if (!unique.ContainsKey(key)) { unique[key] = 1; @@ -58,9 +59,9 @@ namespace ParseLogs continue; } } - if (!line.StartsWith("[")) + if (!_line.StartsWith("202") && !line.StartsWith("[202") && !_line.StartsWith("\"{\"\"startTime") && !_line.StartsWith("{\"\"startTime")) { - logMessage += line; + logMessage += _line; logMessage += '\n'; } else @@ -76,9 +77,9 @@ namespace ParseLogs } static void Main(string[] args) { - string inputDir = @"D:\logs\doc.onlyoffice.com\sync\logs\docservice"; - string outputFile = @"D:\logs\doc.onlyoffice.com\sync\changesError.txt"; - string startDate = "out.log-20200601"; + //string inputDir = @"D:\logs\doc.onlyoffice.eu\7.3.2\log2"; + string inputDir = @"D:\logs\doc.onlyoffice.eu\7.4.0\log"; + string outputFile = @"D:\logs\doc.onlyoffice.eu\7.4.0\changesError.txt"; using (StreamWriter writetext = new StreamWriter(outputFile)) { Dictionary unique = new Dictionary(); @@ -87,12 +88,8 @@ namespace ParseLogs Array.Sort(fileNames, StringComparer.InvariantCulture); foreach (string file in fileNames) { - if (String.Compare(Path.GetFileName(file), startDate) >= 0) - { start = processFile(file, start, unique, writetext); - } } - start = processFile(Path.Combine(inputDir, "out.log"), start, unique, writetext); } } } diff --git a/Test/Applications/TestDocsWithChart/TestDocsWithChart/Program.cs b/Test/Applications/TestDocsWithChart/TestDocsWithChart/Program.cs index 07a47797b2..078d17e955 100644 --- a/Test/Applications/TestDocsWithChart/TestDocsWithChart/Program.cs +++ b/Test/Applications/TestDocsWithChart/TestDocsWithChart/Program.cs @@ -63,7 +63,8 @@ namespace TestDocsWithChart //getGradientPos(); //getCAFiles(); //getSlicerFiles(); - getNamedSheetView(); + //getNamedSheetView(); + getExternalMasters(); } static void getFilesPivot() { @@ -437,7 +438,30 @@ namespace TestDocsWithChart catch { } } } - + static void getExternalMasters() + { + string sDirInput = @"D:\Files\xlsx-testers"; + string sDirOutput = @"D:\Files\external-masters"; + String[] allfiles = System.IO.Directory.GetFiles(sDirInput, "*.*", System.IO.SearchOption.AllDirectories); + for (var i = 0; i < allfiles.Length; ++i) + { + string file = allfiles[i]; + try + { + ZipArchive zip = ZipFile.OpenRead(file); + foreach (ZipArchiveEntry entry in zip.Entries) + { + if (entry.FullName.Contains("externalLink")) + { + System.IO.File.Copy(file, Path.Combine(sDirOutput, Path.GetFileName(file)), true); + break; + } + } + } + catch { } + } + } + static void getFilesConditional() {