Merge branch 'develop' into release/v7.5.0

This commit is contained in:
Elena Subbotina
2023-09-26 12:59:12 +03:00
committed by GitHub
17 changed files with 2111 additions and 1139 deletions

View File

@ -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)
{

View File

@ -41,7 +41,7 @@ namespace codegen
{
class CodeGenXmlJSCPP
{
string toXmlNaspace = "w:";
string toXmlNaspace = "";
Dictionary<string, GenClassPivot> m_mapProcessedClasses = new Dictionary<string, GenClassPivot>();
string[] gc_numeric = { "Null", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine" };
public static Dictionary<string, string> m_mapNamespaceToPrefix = new Dictionary<string, string>()

View File

@ -0,0 +1,830 @@
<!--
XML for Visio Schema
http://schemas.microsoft.com/office/visio/2011/1/core
Copyright (C) 2000-2002 Microsoft Corporation. All rights reserved.
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://schemas.microsoft.com/office/visio/2012/main"
xmlns="http://schemas.microsoft.com/office/visio/2012/main"
xmlns:r="http://purl.oclc.org/ooxml/officeDocument/relationships"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xsd:import namespace="http://purl.oclc.org/ooxml/officeDocument/relationships"
schemaLocation="../shared-relationshipReference.xsd"/>
<xsd:annotation>
<xsd:documentation>
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.
</xsd:documentation>
</xsd:annotation>
<!--
Root-level elements for different parts
-->
<!--document.xml-->
<xsd:element name="VisioDocument" type="VisioDocument_Type" />
<!--masters/masters.xml-->
<xsd:element name="Masters" type="Masters_Type" />
<!--masters/master#.xml-->
<xsd:element name="MasterContents" type="PageContents_Type" />
<!--pages/pages.xml-->
<xsd:element name="Pages" type="Pages_Type" />
<!--pages/page#.xml-->
<xsd:element name="PageContents" type="PageContents_Type" />
<!--data/connections.xml-->
<xsd:element name="DataConnections" type="DataConnections_Type" />
<!--data/recordsets.xml-->
<xsd:element name="DataRecordSets" type="DataRecordSets_Type" />
<!--comments.xml-->
<xsd:element name="Comments" type="Comments_Type" />
<!--extensions.xml-->
<xsd:element name="Extensions" type="Extensions_Type" />
<!--
Complex types
-->
<xsd:complexType name="VisioDocument_Type">
<xsd:sequence>
<xsd:element name="DocumentSettings" type="DocumentSettings_Type" minOccurs="0"
maxOccurs="1" />
<xsd:element name="Colors" type="Colors_Type" minOccurs="0" maxOccurs="1" />
<xsd:element name="FaceNames" type="FaceNames_Type" minOccurs="0"
maxOccurs="1" />
<xsd:element name="StyleSheets" type="StyleSheets_Type" minOccurs="0"
maxOccurs="1" />
<xsd:element name="DocumentSheet" type="DocumentSheet_Type" minOccurs="0"
maxOccurs="1" />
<xsd:element name="EventList" type="EventList_Type" minOccurs="0"
maxOccurs="1" />
<xsd:element name="HeaderFooter" type="HeaderFooter_Type" minOccurs="0"
maxOccurs="1" />
<xsd:element name="PublishSettings" type="PublishSettings_Type" minOccurs="0"
maxOccurs="1" />
<xsd:any minOccurs="0" maxOccurs="unbounded" namespace="##other"
processContents="lax" />
</xsd:sequence>
<xsd:anyAttribute namespace="##other" processContents="lax" />
</xsd:complexType>
<!--Sheet abstract base class-->
<xsd:complexType name="Sheet_Type" abstract="true">
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
<xsd:element name="Cell" type="Cell_Type" minOccurs="0"
maxOccurs="unbounded" />
<xsd:element name="Trigger" type="Trigger_Type" minOccurs="0"
maxOccurs="unbounded" />
<xsd:element name="Section" type="Section_Type" minOccurs="0"
maxOccurs="unbounded" />
<!--Sheets can hold and roundtrip arbitrary, unknown sub-XML-->
<xsd:any minOccurs="0" maxOccurs="unbounded" namespace="##other"
processContents="lax" />
</xsd:sequence>
<!--Style sheet IDs for inheritance-->
<xsd:attribute name="LineStyle" type="xsd:unsignedInt" />
<xsd:attribute name="FillStyle" type="xsd:unsignedInt" />
<xsd:attribute name="TextStyle" type="xsd:unsignedInt" />
<!--Sheets can hold and roundtrip arbitrary, unknown attributes-->
<xsd:anyAttribute namespace="##other" processContents="lax" />
</xsd:complexType>
<!--Section base types-->
<xsd:complexType name="Section_Type">
<xsd:sequence>
<!--Cells only show up directly under the Geometry section-->
<xsd:element name="Cell" type="Cell_Type" minOccurs="0"
maxOccurs="unbounded" />
<xsd:element name="Trigger" type="Trigger_Type" minOccurs="0"
maxOccurs="unbounded" />
<!--All Sections have child rows-->
<xsd:element name="Row" type="Row_Type" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="N" type="xsd:string" use="required" />
<xsd:attribute name="Del" type="xsd:boolean" />
<!--Only Geometry sections have indexes as there can be several in a Sheet-->
<xsd:attribute name="IX" type="xsd:unsignedInt" />
</xsd:complexType>
<!--Row base types-->
<xsd:complexType name="Row_Type">
<xsd:sequence>
<xsd:element name="Cell" type="Cell_Type" minOccurs="0"
maxOccurs="unbounded" />
<xsd:element name="Trigger" type="Trigger_Type" minOccurs="0"
maxOccurs="unbounded" />
</xsd:sequence>
<!--The name attributes are only used on named rows-->
<xsd:attribute name="N" type="xsd:string" />
<xsd:attribute name="LocalName" type="xsd:string" />
<!--The index attribute is only used on indexed rows-->
<xsd:attribute name="IX" type="xsd:unsignedInt" />
<!--The type attribute is only used on Rows in the Geometry section-->
<xsd:attribute name="T" type="xsd:string" />
<!--Any row can be locally deleted-->
<xsd:attribute name="Del" type="xsd:boolean" />
</xsd:complexType>
<!--Cell base type-->
<xsd:complexType name="Cell_Type" mixed="true">
<xsd:sequence>
<xsd:element name="RefBy" type="RefBy_Type" minOccurs="0"
maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="N" type="xsd:string" use="required" />
<xsd:attribute name="U" type="xsd:string" />
<xsd:attribute name="E" type="xsd:string" />
<xsd:attribute name="F" type="xsd:string" />
<xsd:attribute name="V" type="xsd:string" />
</xsd:complexType>
<!--Trigger base type-->
<xsd:complexType name="Trigger_Type" mixed="true">
<xsd:sequence>
<xsd:element name="RefBy" type="RefBy_Type" minOccurs="0"
maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="N" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="DocumentSheet_Type">
<xsd:complexContent>
<xsd:extension base="Sheet_Type">
<xsd:attribute name="Name" type="xsd:string" />
<xsd:attribute name="NameU" type="xsd:string" />
<xsd:attribute name="IsCustomName" type="xsd:boolean" />
<xsd:attribute name="IsCustomNameU" type="xsd:boolean" />
<xsd:attribute name="UniqueID" type="xsd:string" />
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="StyleSheet_Type">
<xsd:complexContent>
<xsd:extension base="Sheet_Type">
<xsd:attribute name="ID" type="xsd:unsignedInt" use="required" />
<xsd:attribute name="Name" type="xsd:string" />
<xsd:attribute name="NameU" type="xsd:string" />
<xsd:attribute name="IsCustomName" type="xsd:boolean" />
<xsd:attribute name="IsCustomNameU" type="xsd:boolean" />
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="PageSheet_Type">
<xsd:complexContent>
<xsd:extension base="Sheet_Type">
<xsd:attribute name="UniqueID" type="xsd:string" />
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="ShapeSheet_Type">
<xsd:complexContent>
<xsd:extension base="Sheet_Type">
<xsd:sequence>
<!--Shape Text-->
<xsd:element name="Text" type="Text_Type" minOccurs="0" maxOccurs="1" />
<!--Legacy data fields-->
<xsd:element name="Data1" type="Data_Type" minOccurs="0" maxOccurs="1" />
<xsd:element name="Data2" type="Data_Type" minOccurs="0" maxOccurs="1" />
<xsd:element name="Data3" type="Data_Type" minOccurs="0" maxOccurs="1" />
<!--Foreign object data for images, OLE, ActiveX, etc.-->
<xsd:element name="ForeignData" type="ForeignData_Type" minOccurs="0"
maxOccurs="1" />
<!--Sub-shapes if this is a group-->
<xsd:element name="Shapes" type="Shapes_Type" minOccurs="0"
maxOccurs="1" />
</xsd:sequence>
<xsd:attribute name="ID" type="xsd:unsignedInt" use="required" />
<xsd:attribute name="OriginalID" type="xsd:unsignedInt" />
<xsd:attribute name="Del" type="xsd:boolean" />
<xsd:attribute name="MasterShape" type="xsd:unsignedInt" />
<xsd:attribute name="UniqueID" type="xsd:string" />
<xsd:attribute name="Name" type="xsd:string" />
<xsd:attribute name="NameU" type="xsd:string" />
<xsd:attribute name="IsCustomName" type="xsd:boolean" />
<xsd:attribute name="IsCustomNameU" type="xsd:boolean" />
<xsd:attribute name="Master" type="xsd:unsignedInt" />
<xsd:attribute name="Type" type="xsd:token" />
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="Text_Type" mixed="true">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="cp" type="cp_Type" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="pp" type="pp_Type" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="tp" type="tp_Type" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="fld" type="fld_Type" minOccurs="0" maxOccurs="unbounded" />
</xsd:choice>
</xsd:complexType>
<!--Text fields-->
<xsd:complexType name="cp_Type">
<xsd:attribute name="IX" type="xsd:unsignedInt" use="required" />
</xsd:complexType>
<xsd:complexType name="pp_Type">
<xsd:attribute name="IX" type="xsd:unsignedInt" use="required" />
</xsd:complexType>
<xsd:complexType name="tp_Type">
<xsd:attribute name="IX" type="xsd:unsignedInt" use="required" />
</xsd:complexType>
<xsd:complexType name="fld_Type">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="IX" type="xsd:unsignedInt" use="required" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="Data_Type">
<xsd:simpleContent>
<xsd:extension base="xsd:string" />
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="ForeignData_Type" mixed="true">
<xsd:sequence>
<xsd:element name="Rel" type="Rel_Type" minOccurs="1" maxOccurs="1" />
</xsd:sequence>
<xsd:attribute name="ForeignType" type="xsd:token" use="required" />
<xsd:attribute name="ObjectType" type="xsd:unsignedInt" />
<xsd:attribute name="ShowAsIcon" type="xsd:boolean" />
<xsd:attribute name="ObjectWidth" type="xsd:double" />
<xsd:attribute name="ObjectHeight" type="xsd:double" />
<xsd:attribute name="MappingMode" type="xsd:unsignedShort" />
<xsd:attribute name="ExtentX" type="xsd:double" />
<xsd:attribute name="ExtentY" type="xsd:double" />
<xsd:attribute name="CompressionType" type="xsd:token" />
<xsd:attribute name="CompressionLevel" type="xsd:double" />
</xsd:complexType>
<xsd:complexType name="DocumentSettings_Type">
<xsd:all>
<xsd:element name="GlueSettings" type="GlueSettings_Type" minOccurs="0"
maxOccurs="1" />
<xsd:element name="SnapSettings" type="SnapSettings_Type" minOccurs="0"
maxOccurs="1" />
<xsd:element name="SnapExtensions" type="SnapExtensions_Type" minOccurs="0"
maxOccurs="1" />
<xsd:element name="SnapAngles" type="SnapAngles_Type" minOccurs="0"
maxOccurs="1" />
<xsd:element name="DynamicGridEnabled" type="DynamicGridEnabled_Type"
minOccurs="0" maxOccurs="1" />
<xsd:element name="ProtectStyles" type="ProtectStyles_Type" minOccurs="0"
maxOccurs="1" />
<xsd:element name="ProtectShapes" type="ProtectShapes_Type" minOccurs="0"
maxOccurs="1" />
<xsd:element name="ProtectMasters" type="ProtectMasters_Type" minOccurs="0"
maxOccurs="1" />
<xsd:element name="ProtectBkgnds" type="ProtectBkgnds_Type" minOccurs="0"
maxOccurs="1" />
<xsd:element name="CustomMenusFile" type="CustomMenusFile_Type" minOccurs="0"
maxOccurs="1" />
<xsd:element name="CustomToolbarsFile" type="CustomToolbarsFile_Type"
minOccurs="0" maxOccurs="1" />
<xsd:element name="AttachedToolbars" type="AttachedToolbars_Type" minOccurs="0"
maxOccurs="1" />
</xsd:all>
<xsd:attribute name="TopPage" type="xsd:unsignedInt" />
<xsd:attribute name="DefaultTextStyle" type="xsd:unsignedInt" />
<xsd:attribute name="DefaultLineStyle" type="xsd:unsignedInt" />
<xsd:attribute name="DefaultFillStyle" type="xsd:unsignedInt" />
<xsd:attribute name="DefaultGuideStyle" type="xsd:unsignedInt" />
</xsd:complexType>
<xsd:complexType name="GlueSettings_Type">
<xsd:simpleContent>
<xsd:extension base="xsd:int" />
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="SnapSettings_Type">
<xsd:simpleContent>
<xsd:extension base="xsd:int" />
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="SnapExtensions_Type">
<xsd:simpleContent>
<xsd:extension base="xsd:int" />
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="SnapAngles_Type">
<xsd:sequence>
<xsd:element name="SnapAngle" type="SnapAngle_Type" minOccurs="0"
maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="SnapAngle_Type">
<xsd:simpleContent>
<xsd:extension base="xsd:double" />
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="DynamicGridEnabled_Type">
<xsd:simpleContent>
<xsd:extension base="xsd:boolean" />
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="ProtectStyles_Type">
<xsd:simpleContent>
<xsd:extension base="xsd:boolean" />
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="ProtectShapes_Type">
<xsd:simpleContent>
<xsd:extension base="xsd:boolean" />
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="ProtectMasters_Type">
<xsd:simpleContent>
<xsd:extension base="xsd:boolean" />
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="ProtectBkgnds_Type">
<xsd:simpleContent>
<xsd:extension base="xsd:boolean" />
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="CustomMenusFile_Type">
<xsd:simpleContent>
<xsd:extension base="xsd:string" />
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="CustomToolbarsFile_Type">
<xsd:simpleContent>
<xsd:extension base="xsd:string" />
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="AttachedToolbars_Type">
<xsd:simpleContent>
<xsd:extension base="xsd:base64Binary" />
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="Colors_Type">
<xsd:sequence>
<xsd:element name="ColorEntry" type="ColorEntry_Type" minOccurs="1"
maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ColorEntry_Type">
<xsd:attribute name="IX" type="xsd:unsignedInt" use="required" />
<xsd:attribute name="RGB" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="FaceNames_Type">
<xsd:sequence>
<xsd:element name="FaceName" type="FaceName_Type" minOccurs="1"
maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="FaceName_Type">
<xsd:attribute name="NameU" type="xsd:string" use="required" />
<xsd:attribute name="UnicodeRanges" type="xsd:string" />
<xsd:attribute name="CharSets" type="xsd:string" />
<xsd:attribute name="Panos" type="xsd:string" />
<xsd:attribute name="Panose" type="xsd:string" />
<xsd:attribute name="Flags" type="xsd:unsignedInt" />
</xsd:complexType>
<xsd:complexType name="StyleSheets_Type">
<xsd:sequence>
<xsd:element name="StyleSheet" type="StyleSheet_Type" minOccurs="0"
maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Masters_Type">
<xsd:sequence>
<xsd:element name="Master" type="Master_Type" minOccurs="0"
maxOccurs="unbounded" />
<xsd:element name="MasterShortcut" type="MasterShortcut_Type" minOccurs="0"
maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Master_Type">
<xsd:all>
<xsd:element name="PageSheet" type="PageSheet_Type" minOccurs="0"
maxOccurs="1" />
<xsd:element name="Rel" type="Rel_Type" minOccurs="1" maxOccurs="1" />
<xsd:element name="Icon" type="Icon_Type" minOccurs="0" maxOccurs="1" />
</xsd:all>
<xsd:attribute name="ID" type="xsd:unsignedInt" use="required" />
<xsd:attribute name="BaseID" type="xsd:string" />
<xsd:attribute name="UniqueID" type="xsd:string" />
<xsd:attribute name="MatchByName" type="xsd:boolean" />
<xsd:attribute name="Name" type="xsd:string" />
<xsd:attribute name="NameU" type="xsd:string" />
<xsd:attribute name="IsCustomName" type="xsd:boolean" />
<xsd:attribute name="IsCustomNameU" type="xsd:boolean" />
<xsd:attribute name="IconSize" type="xsd:unsignedShort" />
<xsd:attribute name="PatternFlags" type="xsd:unsignedShort" />
<xsd:attribute name="Prompt" type="xsd:string" />
<xsd:attribute name="Hidden" type="xsd:boolean" />
<xsd:attribute name="IconUpdate" type="xsd:boolean" />
<xsd:attribute name="AlignName" type="xsd:unsignedShort" />
<xsd:attribute name="MasterType" type="xsd:unsignedShort" />
</xsd:complexType>
<xsd:complexType name="Icon_Type">
<xsd:simpleContent>
<xsd:extension base="xsd:base64Binary" />
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="MasterShortcut_Type">
<xsd:all>
<xsd:element name="Icon" type="Icon_Type" minOccurs="0" maxOccurs="1" />
</xsd:all>
<xsd:attribute name="ID" type="xsd:unsignedInt" use="required" />
<xsd:attribute name="Name" type="xsd:string" />
<xsd:attribute name="NameU" type="xsd:string" />
<xsd:attribute name="IsCustomName" type="xsd:boolean" />
<xsd:attribute name="IsCustomNameU" type="xsd:boolean" />
<xsd:attribute name="IconSize" type="xsd:unsignedShort" />
<xsd:attribute name="PatternFlags" type="xsd:unsignedShort" />
<xsd:attribute name="Prompt" type="xsd:string" />
<xsd:attribute name="ShortcutURL" type="xsd:string" />
<xsd:attribute name="ShortcutHelp" type="xsd:string" />
<xsd:attribute name="AlignName" type="xsd:unsignedShort" />
<xsd:attribute name="MasterType" type="xsd:unsignedShort" />
</xsd:complexType>
<xsd:complexType name="PageContents_Type">
<xsd:sequence>
<xsd:element name="Shapes" type="Shapes_Type" minOccurs="0" maxOccurs="1" />
<xsd:element name="Connects" type="Connects_Type" minOccurs="0"
maxOccurs="1" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Shapes_Type">
<xsd:sequence>
<xsd:element name="Shape" type="ShapeSheet_Type" minOccurs="0"
maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Connects_Type">
<xsd:sequence>
<xsd:element name="Connect" type="Connect_Type" minOccurs="0"
maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Connect_Type">
<xsd:attribute name="FromSheet" type="xsd:unsignedInt" use="required" />
<xsd:attribute name="FromCell" type="xsd:string" />
<xsd:attribute name="FromPart" type="xsd:int" />
<xsd:attribute name="ToSheet" type="xsd:unsignedInt" use="required" />
<xsd:attribute name="ToCell" type="xsd:string" />
<xsd:attribute name="ToPart" type="xsd:int" />
</xsd:complexType>
<xsd:complexType name="Pages_Type">
<xsd:sequence>
<xsd:element name="Page" type="Page_Type" minOccurs="0"
maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Page_Type">
<xsd:all>
<xsd:element name="PageSheet" type="PageSheet_Type" minOccurs="0"
maxOccurs="1" />
<xsd:element name="Rel" type="Rel_Type" minOccurs="1" maxOccurs="1" />
</xsd:all>
<xsd:attribute name="ID" type="xsd:unsignedInt" use="required" />
<xsd:attribute name="Name" type="xsd:string" />
<xsd:attribute name="NameU" type="xsd:string" />
<xsd:attribute name="IsCustomName" type="xsd:boolean" />
<xsd:attribute name="IsCustomNameU" type="xsd:boolean" />
<xsd:attribute name="Background" type="xsd:boolean" />
<xsd:attribute name="BackPage" type="xsd:unsignedInt" />
<xsd:attribute name="ViewScale" type="xsd:double" />
<xsd:attribute name="ViewCenterX" type="xsd:double" />
<xsd:attribute name="ViewCenterY" type="xsd:double" />
<xsd:attribute name="ReviewerID" type="xsd:unsignedInt" />
<xsd:attribute name="AssociatedPage" type="xsd:unsignedInt" />
</xsd:complexType>
<xsd:complexType name="EventList_Type">
<xsd:sequence>
<xsd:element name="EventItem" type="EventItem_Type" minOccurs="0"
maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="EventItem_Type">
<xsd:attribute name="ID" type="xsd:unsignedInt" use="required" />
<xsd:attribute name="Action" type="xsd:unsignedShort" use="required" />
<xsd:attribute name="EventCode" type="xsd:unsignedShort" use="required" />
<xsd:attribute name="Enabled" type="xsd:boolean" />
<xsd:attribute name="Target" type="xsd:string" use="required" />
<xsd:attribute name="TargetArgs" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="HeaderFooter_Type">
<xsd:all>
<xsd:element name="HeaderMargin" type="HeaderMargin_Type" minOccurs="0"
maxOccurs="1" />
<xsd:element name="FooterMargin" type="FooterMargin_Type" minOccurs="0"
maxOccurs="1" />
<xsd:element name="HeaderLeft" type="HeaderLeft_Type" minOccurs="0"
maxOccurs="1" />
<xsd:element name="HeaderCenter" type="HeaderCenter_Type" minOccurs="0"
maxOccurs="1" />
<xsd:element name="HeaderRight" type="HeaderRight_Type" minOccurs="0"
maxOccurs="1" />
<xsd:element name="FooterLeft" type="FooterLeft_Type" minOccurs="0"
maxOccurs="1" />
<xsd:element name="FooterCenter" type="FooterCenter_Type" minOccurs="0"
maxOccurs="1" />
<xsd:element name="FooterRight" type="FooterRight_Type" minOccurs="0"
maxOccurs="1" />
<xsd:element name="HeaderFooterFont" type="HeaderFooterFont_Type" minOccurs="0"
maxOccurs="1" />
</xsd:all>
<xsd:attribute name="HeaderFooterColor" type="xsd:string" />
</xsd:complexType>
<xsd:complexType name="HeaderMargin_Type">
<xsd:simpleContent>
<xsd:extension base="xsd:double">
<xsd:attribute name="Unit" type="xsd:string" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="FooterMargin_Type">
<xsd:simpleContent>
<xsd:extension base="xsd:double">
<xsd:attribute name="Unit" type="xsd:string" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="HeaderLeft_Type">
<xsd:simpleContent>
<xsd:extension base="xsd:string" />
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="HeaderCenter_Type">
<xsd:simpleContent>
<xsd:extension base="xsd:string" />
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="HeaderRight_Type">
<xsd:simpleContent>
<xsd:extension base="xsd:string" />
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="FooterLeft_Type">
<xsd:simpleContent>
<xsd:extension base="xsd:string" />
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="FooterCenter_Type">
<xsd:simpleContent>
<xsd:extension base="xsd:string" />
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="FooterRight_Type">
<xsd:simpleContent>
<xsd:extension base="xsd:string" />
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="HeaderFooterFont_Type">
<xsd:attribute name="Height" type="xsd:int" />
<xsd:attribute name="Width" type="xsd:int" />
<xsd:attribute name="Escapement" type="xsd:int" />
<xsd:attribute name="Orientation" type="xsd:int" />
<xsd:attribute name="Weight" type="xsd:int" />
<xsd:attribute name="Italic" type="xsd:unsignedByte" />
<xsd:attribute name="Underline" type="xsd:unsignedByte" />
<xsd:attribute name="StrikeOut" type="xsd:unsignedByte" />
<xsd:attribute name="CharSet" type="xsd:unsignedByte" />
<xsd:attribute name="OutPrecision" type="xsd:unsignedByte" />
<xsd:attribute name="ClipPrecision" type="xsd:unsignedByte" />
<xsd:attribute name="Quality" type="xsd:unsignedByte" />
<xsd:attribute name="PitchAndFamily" type="xsd:unsignedByte" />
<xsd:attribute name="FaceName" type="xsd:string" />
</xsd:complexType>
<xsd:complexType name="DataConnections_Type">
<xsd:sequence>
<xsd:element name="DataConnection" type="DataConnection_Type" minOccurs="1"
maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="NextID" type="xsd:unsignedInt" use="required" />
</xsd:complexType>
<xsd:complexType name="DataConnection_Type">
<xsd:attribute name="ID" type="xsd:unsignedInt" use="required" />
<xsd:attribute name="FileName" type="xsd:string" use="required" />
<xsd:attribute name="ConnectionString" type="xsd:string" />
<xsd:attribute name="Command" type="xsd:string" />
<xsd:attribute name="FriendlyName" type="xsd:string" />
<xsd:attribute name="Timeout" type="xsd:unsignedInt" />
<xsd:attribute name="AlwaysUseConnectionFile" type="xsd:boolean" />
</xsd:complexType>
<xsd:complexType name="DataRecordSets_Type">
<xsd:sequence>
<xsd:element name="DataRecordSet" type="DataRecordSet_Type" minOccurs="0"
maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="NextID" type="xsd:unsignedInt" use="required" />
<xsd:attribute name="ActiveRecordsetID" type="xsd:unsignedInt" />
<xsd:attribute name="DataWindowOrder" type="xsd:string" />
</xsd:complexType>
<xsd:complexType name="DataRecordSet_Type">
<xsd:sequence>
<xsd:element name="Rel" type="Rel_Type" minOccurs="1" maxOccurs="1" />
<xsd:element name="DataColumns" type="DataColumns_Type" minOccurs="1"
maxOccurs="1" />
<xsd:element name="PrimaryKey" type="PrimaryKey_Type" minOccurs="0"
maxOccurs="unbounded" />
<xsd:element name="RowMap" type="RowMap_Type" minOccurs="0"
maxOccurs="unbounded" />
<xsd:element name="RefreshConflict" type="RefreshConflict_Type" minOccurs="0"
maxOccurs="unbounded" />
<xsd:element name="AutoLinkComparison" type="AutoLinkComparison_Type"
minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="ID" type="xsd:unsignedInt" use="required" />
<xsd:attribute name="ConnectionID" type="xsd:unsignedInt" />
<xsd:attribute name="Command" type="xsd:string" />
<xsd:attribute name="Options" type="xsd:unsignedInt" />
<xsd:attribute name="TimeRefreshed" type="xsd:dateTime" />
<xsd:attribute name="NextRowID" type="xsd:unsignedInt" />
<xsd:attribute name="Name" type="xsd:string" />
<xsd:attribute name="RowOrder" type="xsd:boolean" />
<xsd:attribute name="RefreshOverwriteAll" type="xsd:boolean" />
<xsd:attribute name="RefreshNoReconciliationUI" type="xsd:boolean" />
<xsd:attribute name="RefreshInterval" type="xsd:unsignedInt" />
<xsd:attribute name="ReplaceLinks" type="xsd:unsignedInt" />
<xsd:attribute name="Checksum" type="xsd:unsignedInt" />
</xsd:complexType>
<xsd:complexType name="DataColumns_Type">
<xsd:sequence>
<xsd:element name="DataColumn" type="DataColumn_Type" minOccurs="1"
maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="SortColumn" type="xsd:string" />
<xsd:attribute name="SortAsc" type="xsd:boolean" />
</xsd:complexType>
<xsd:complexType name="DataColumn_Type">
<xsd:attribute name="ColumnNameID" type="xsd:string" use="required" />
<xsd:attribute name="Name" type="xsd:string" use="required" />
<xsd:attribute name="Label" type="xsd:string" use="required" />
<xsd:attribute name="OrigLabel" type="xsd:string" />
<xsd:attribute name="LangID" type="xsd:unsignedInt" />
<xsd:attribute name="Calendar" type="xsd:unsignedShort" />
<xsd:attribute name="DataType" type="xsd:unsignedShort" />
<xsd:attribute name="UnitType" type="xsd:string" />
<xsd:attribute name="Currency" type="xsd:unsignedShort" />
<xsd:attribute name="Degree" type="xsd:unsignedInt" />
<xsd:attribute name="DisplayWidth" type="xsd:unsignedInt" />
<xsd:attribute name="DisplayOrder" type="xsd:unsignedInt" />
<xsd:attribute name="Mapped" type="xsd:boolean" />
<xsd:attribute name="Hyperlink" type="xsd:boolean" />
</xsd:complexType>
<xsd:complexType name="PrimaryKey_Type">
<xsd:sequence>
<xsd:element name="RowKeyValue" type="RowKeyValue_Type" minOccurs="0"
maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="ColumnNameID" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="RowKeyValue_Type">
<xsd:attribute name="RowID" type="xsd:unsignedInt" use="required" />
<xsd:attribute name="Value" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="RowMap_Type">
<xsd:attribute name="RowID" type="xsd:unsignedInt" use="required" />
<xsd:attribute name="PageID" type="xsd:unsignedInt" use="required" />
<xsd:attribute name="ShapeID" type="xsd:unsignedInt" use="required" />
</xsd:complexType>
<xsd:complexType name="RefreshConflict_Type">
<xsd:attribute name="RowID" type="xsd:unsignedInt" use="required" />
<xsd:attribute name="ShapeID" type="xsd:unsignedInt" use="required" />
<xsd:attribute name="PageID" type="xsd:unsignedInt" use="required" />
</xsd:complexType>
<xsd:complexType name="AutoLinkComparison_Type">
<xsd:attribute name="ColumnName" type="xsd:string" use="required" />
<xsd:attribute name="ContextType" type="xsd:unsignedInt" use="required" />
<xsd:attribute name="ContextTypeLabel" type="xsd:string" />
</xsd:complexType>
<xsd:complexType name="PublishSettings_Type">
<xsd:sequence>
<xsd:element name="PublishedPage" type="PublishedPage_Type" minOccurs="0"
maxOccurs="unbounded" />
<xsd:element name="RefreshableData" type="RefreshableData_Type" minOccurs="0"
maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Comments_Type">
<xsd:sequence>
<xsd:element name="AuthorList" type="AuthorList_Type" minOccurs="0"
maxOccurs="1" />
<xsd:element name="CommentList" type="CommentList_Type" minOccurs="0"
maxOccurs="1" />
</xsd:sequence>
<xsd:attribute name="ShowCommentTags" type="xsd:boolean" />
</xsd:complexType>
<xsd:complexType name="AuthorList_Type">
<xsd:sequence>
<xsd:element name="AuthorEntry" type="AuthorEntry_Type" minOccurs="0"
maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="AuthorEntry_Type">
<xsd:attribute name="Name" type="xsd:string" />
<xsd:attribute name="Initials" type="xsd:string" />
<xsd:attribute name="ResolutionID" type="xsd:string" />
<xsd:attribute name="ID" type="xsd:unsignedInt" use="required" />
</xsd:complexType>
<xsd:complexType name="CommentList_Type">
<xsd:sequence>
<xsd:element name="CommentEntry" type="CommentEntry_Type" minOccurs="0"
maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CommentEntry_Type">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="AuthorID" type="xsd:unsignedInt" use="required" />
<xsd:attribute name="PageID" type="xsd:unsignedInt" use="required" />
<xsd:attribute name="ShapeID" type="xsd:unsignedInt" />
<xsd:attribute name="Date" type="xsd:dateTime" use="required" />
<xsd:attribute name="EditDate" type="xsd:dateTime" />
<xsd:attribute name="Done" type="xsd:boolean" />
<xsd:attribute name="CommentID" type="xsd:unsignedInt" use="required" />
<xsd:attribute name="AutoCommentType" type="xsd:unsignedInt" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="PublishedPage_Type">
<xsd:attribute name="ID" type="xsd:unsignedInt" use="required" />
</xsd:complexType>
<xsd:complexType name="RefreshableData_Type">
<xsd:attribute name="ID" type="xsd:unsignedInt" use="required" />
</xsd:complexType>
<xsd:complexType name="RefBy_Type">
<xsd:attribute name="T" type="xsd:string" use="required" />
<xsd:attribute name="ID" type="xsd:unsignedInt" use="required" />
</xsd:complexType>
<xsd:complexType name="Extensions_Type">
<xsd:sequence>
<xsd:element name="CellDef" type="CellDef_Type" minOccurs="0"
maxOccurs="unbounded" />
<xsd:element name="FunctionDef" type="FunctionDef_Type" minOccurs="0"
maxOccurs="unbounded" />
<xsd:element name="SectionDef" type="SectionDef_Type" minOccurs="0"
maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CellDef_Type">
<xsd:attribute name="N" type="xsd:string" use="required" />
<xsd:attribute name="T" type="xsd:token" use="required" />
<xsd:attribute name="F" type="xsd:string" />
<xsd:attribute name="IX" type="xsd:unsignedByte" />
<xsd:attribute name="S" type="xsd:unsignedByte" />
</xsd:complexType>
<xsd:complexType name="FunctionDef_Type">
<xsd:attribute name="N" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="SectionDef_Type">
<xsd:sequence>
<xsd:element name="CellDef" type="CellDef_Type" minOccurs="0"
maxOccurs="unbounded" />
<xsd:element name="RowDef" type="RowDef_Type" minOccurs="0" maxOccurs="1" />
</xsd:sequence>
<xsd:attribute name="N" type="xsd:string" use="required" />
<xsd:attribute name="T" type="xsd:string" />
<xsd:attribute name="S" type="xsd:unsignedByte" />
</xsd:complexType>
<xsd:complexType name="RowDef_Type">
<xsd:sequence>
<xsd:element name="CellDef" type="CellDef_Type" minOccurs="0"
maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Rel_Type">
<xsd:attribute ref="r:id" use="required"/>
</xsd:complexType>
</xsd:schema>

View File

@ -821,14 +821,16 @@
</xsd:complexType>
<xsd:complexType name="CT_BookmarkRange">
<xsd:attribute name="id" type="xsd:int" use="required"/>
<xsd:attribute name="displacedByCustomXml" type="ST_DisplacedByCustomXml" use="optional"/>
<xsd:attribute name="colFirst" type="xsd:int" use="optional"/>
<xsd:attribute name="colLast" type="xsd:int" use="optional"/>
</xsd:complexType>
<xsd:complexType name="CT_Bookmark">
<xsd:attribute name="displacedByCustomXml" type="ST_DisplacedByCustomXml" use="optional"/>
<xsd:attribute name="colFirst" type="xsd:int" use="optional"/>
<xsd:attribute name="colLast" type="xsd:int" use="optional"/>
</xsd:complexType>
<xsd:complexType name="CT_Bookmark">
<xsd:attribute name="name" type="s:ST_String" use="required"/>
<xsd:attribute name="id" type="xsd:int" use="required"/>
<xsd:attribute name="displacedByCustomXml" type="ST_DisplacedByCustomXml" use="optional"/>
<xsd:attribute name="colFirst" type="xsd:int" use="optional"/>
<xsd:attribute name="colLast" type="xsd:int" use="optional"/>
</xsd:complexType>
<xsd:complexType name="CT_MoveBookmark">
<xsd:attribute name="colFirst" type="xsd:int" use="optional"/>

View File

@ -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<long, long> hash = new Dictionary<long, long>();
@ -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)));
}
}
}
}

View File

@ -182,6 +182,7 @@ namespace ParseAllCultureInfo
static Dictionary<int, int> g_mapUsedValues = new Dictionary<int, int>() {
{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},

View File

@ -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<string, int> unique = new Dictionary<string, int>();
@ -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);
}
}
}

View File

@ -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()
{