Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
onlyoffice_core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
onlyoffice_core
Commits
234e19d6
Commit
234e19d6
authored
Apr 25, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
https://github.com/ONLYOFFICE/core
into develop
parents
8bcc6d15
62145b72
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
874 additions
and
303 deletions
+874
-303
ASCOfficeDocFile/DocDocxConverter/VMLPictureMapping.cpp
ASCOfficeDocFile/DocDocxConverter/VMLPictureMapping.cpp
+17
-7
ASCOfficeDocFile/DocDocxConverter/VMLPictureMapping.h
ASCOfficeDocFile/DocDocxConverter/VMLPictureMapping.h
+1
-1
ASCOfficeDocFile/DocDocxConverter/WordDocument.h
ASCOfficeDocFile/DocDocxConverter/WordDocument.h
+1
-0
ASCOfficeOdfFileW/source/OdfFormat/odf_drawing_context.cpp
ASCOfficeOdfFileW/source/OdfFormat/odf_drawing_context.cpp
+8
-4
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertDrawing.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertDrawing.cpp
+4
-1
ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.cpp
+2
-0
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.cpp
+20
-15
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.h
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.h
+1
-1
ASCOfficePPTXFile/PPTXFormat/Logic/CNvGraphicFramePr.h
ASCOfficePPTXFile/PPTXFormat/Logic/CNvGraphicFramePr.h
+13
-5
ASCOfficePPTXFile/PPTXFormat/Logic/GraphicFrame.cpp
ASCOfficePPTXFile/PPTXFormat/Logic/GraphicFrame.cpp
+2
-2
ASCOfficePPTXFile/PPTXFormat/SlideLayout.h
ASCOfficePPTXFile/PPTXFormat/SlideLayout.h
+10
-0
DesktopEditor/common/File.h
DesktopEditor/common/File.h
+2
-1
DesktopEditor/xmlsec/test/windows_list_serts/main.cpp
DesktopEditor/xmlsec/test/windows_list_serts/main.cpp
+587
-131
Test/Applications/DocxFormatCodeGen/codegen/CodeGenPivot.cs
Test/Applications/DocxFormatCodeGen/codegen/CodeGenPivot.cs
+30
-20
Test/Applications/DocxFormatCodeGen/codegen/CodegenJSPivot.cs
.../Applications/DocxFormatCodeGen/codegen/CodegenJSPivot.cs
+175
-114
Test/Applications/DocxFormatCodeGen/codegen/Resource/sml.xsd
Test/Applications/DocxFormatCodeGen/codegen/Resource/sml.xsd
+1
-1
No files found.
ASCOfficeDocFile/DocDocxConverter/VMLPictureMapping.cpp
View file @
234e19d6
...
...
@@ -136,14 +136,18 @@ namespace DocFileFormat
}
return
btWin32
;
}
bool
ParseEmbeddedEquation
(
const
std
::
string
&
xmlString
,
std
::
wstring
&
newXmlString
)
bool
VMLPictureMapping
::
ParseEmbeddedEquation
(
const
std
::
string
&
xmlString
,
std
::
wstring
&
newXmlString
)
{
newXmlString
.
clear
();
std
::
wstring
sTempXmlFile
=
NSDirectory
::
CreateTempFileWithUniqueName
(
NSDirectory
::
GetTempPath
(),
L"emb"
);
sTempXmlFile
+=
L".xml"
;
std
::
wstring
sTempFolder
=
m_ctx
->
_doc
->
m_sTempFolder
;
if
(
sTempFolder
.
empty
())
{
sTempFolder
=
NSFile
::
CFileBinary
::
GetTempPath
();
}
std
::
wstring
sTempXmlFile
=
NSDirectory
::
CreateTempFileWithUniqueName
(
sTempFolder
,
L"emb"
);
NSFile
::
CFileBinary
file
;
file
.
CreateFileW
(
sTempXmlFile
);
file
.
WriteFile
((
BYTE
*
)
xmlString
.
c_str
(),
xmlString
.
size
());
...
...
@@ -186,6 +190,7 @@ namespace DocFileFormat
if
(
res
)
break
;
}
}
NSFile
::
CFileBinary
::
Remove
(
sTempXmlFile
);
return
res
;
}
//---------------------------------------------------------------
...
...
@@ -297,8 +302,13 @@ namespace DocFileFormat
case
metroBlob
:
{
//встроенная неведомая хуйня
m_isEmbedded
=
true
;
m_embeddedData
=
std
::
string
((
char
*
)
iter
->
opComplex
,
iter
->
op
);
m_isEmbedded
=
true
;
m_embeddedData
=
std
::
string
((
char
*
)
iter
->
opComplex
,
iter
->
op
);
//if (ParseEmbeddedBlob( m_embeddedData, m_blobXml)) // todoooo
//{
// m_isEmbedded = false;
//}
}
break
;
//BORDERS
case
borderBottomColor
:
...
...
ASCOfficeDocFile/DocDocxConverter/VMLPictureMapping.h
View file @
234e19d6
...
...
@@ -46,7 +46,6 @@ namespace DocFileFormat
{
class
OleObject
;
bool
ParseEmbeddedEquation
(
const
std
::
string
&
xmlString
,
std
::
wstring
&
newXmlString
);
class
VMLPictureMapping
:
public
PropertiesMapping
,
public
IMapping
{
...
...
@@ -58,6 +57,7 @@ namespace DocFileFormat
/// Writes a border element
void
writePictureBorder
(
const
std
::
wstring
&
name
,
const
BorderCode
*
brc
);
void
appendStyleProperty
(
std
::
wstring
*
b
,
const
std
::
wstring
&
propName
,
const
std
::
wstring
&
propValue
)
const
;
bool
ParseEmbeddedEquation
(
const
std
::
string
&
xmlString
,
std
::
wstring
&
newXmlString
);
protected:
/// Copies the picture from the binary stream to the zip archive
/// and creates the relationships for the image.
...
...
ASCOfficeDocFile/DocDocxConverter/WordDocument.h
View file @
234e19d6
...
...
@@ -86,6 +86,7 @@ namespace DocFileFormat
friend
class
Table
;
friend
class
TableRow
;
friend
class
VMLShapeMapping
;
friend
class
VMLPictureMapping
;
friend
class
OpenXmlPackage
;
friend
class
TextboxMapping
;
...
...
ASCOfficeOdfFileW/source/OdfFormat/odf_drawing_context.cpp
View file @
234e19d6
...
...
@@ -336,6 +336,7 @@ void odf_drawing_context::set_background_state(bool Val)
impl_
->
is_background_
=
Val
;
impl_
->
current_graphic_properties
=
new
graphic_format_properties
();
start_area_properties
();
}
void
odf_drawing_context
::
check_anchor
()
...
...
@@ -473,6 +474,7 @@ void odf_drawing_context::start_drawing()
}
void
odf_drawing_context
::
end_drawing_background
(
odf_types
::
common_draw_fill_attlist
&
common_draw_attlist
)
{
end_area_properties
();
if
(
impl_
->
current_drawing_state_
.
elements_
.
empty
()
==
false
)
return
;
if
(
!
impl_
->
is_background_
||
!
impl_
->
current_graphic_properties
)
return
;
...
...
@@ -491,15 +493,13 @@ void odf_drawing_context::end_drawing()
draw_base
*
draw
=
dynamic_cast
<
draw_base
*>
(
impl_
->
current_drawing_state_
.
elements_
[
0
].
elm
.
get
());
if
(
draw
)
{
if
(
impl_
->
is_presentation
_
)
if
(
impl_
->
current_drawing_state_
.
presentation_class_
||
impl_
->
current_drawing_state_
.
presentation_placeholder
_
)
{
_CP_OPT
(
std
::
wstring
)
draw_layer
;
if
(
impl_
->
is_presentation_
.
get
()
==
true
)
{
//master
draw_layer
=
L"backgroundobjects"
;
//if (impl_->current_drawing_state_.presentation_class_)
// draw_layer = L"backgroundobjects";
//else draw_layer = L"layout";
if
(
!
impl_
->
current_drawing_state_
.
presentation_class_
)
impl_
->
current_drawing_state_
.
presentation_class_
=
presentation_class
::
outline
;
...
...
@@ -1186,10 +1186,14 @@ void odf_drawing_context::set_shadow(int type, std::wstring hexColor, _CP_OPT(do
void
odf_drawing_context
::
set_placeholder_id
(
std
::
wstring
val
)
{
if
(
!
impl_
->
is_presentation_
)
return
;
impl_
->
current_drawing_state_
.
presentation_placeholder_
=
val
;
}
void
odf_drawing_context
::
set_placeholder_type
(
int
val
)
{
if
(
!
impl_
->
is_presentation_
)
return
;
switch
(
val
)
{
case
0
:
impl_
->
current_drawing_state_
.
presentation_class_
=
presentation_class
::
outline
;
break
;
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertDrawing.cpp
View file @
234e19d6
...
...
@@ -433,6 +433,8 @@ void OoxConverter::convert(PPTX::Logic::Shape *oox_shape)
{
if
(
oox_shape
==
NULL
)
return
;
_CP_OPT
(
bool
)
bMasterPresentation
=
odf_context
()
->
drawing_context
()
->
get_presentation
();
odf_context
()
->
drawing_context
()
->
start_drawing
();
int
type
=
1000
;
//custom
...
...
@@ -448,7 +450,8 @@ void OoxConverter::convert(PPTX::Logic::Shape *oox_shape)
type
=
preset
.
GetValue
();
}
if
(
type
==
SimpleTypes
::
shapetypeRect
&&
oox_shape
->
txBody
.
IsInit
())
type
=
2000
;
if
(
type
==
SimpleTypes
::
shapetypeRect
&&
oox_shape
->
txBody
.
IsInit
())
type
=
2000
;
if
(
type
==
2000
&&
oox_shape
->
txBody
->
bodyPr
.
IsInit
()
&&
oox_shape
->
txBody
->
bodyPr
->
fromWordArt
.
get_value_or
(
false
))
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.cpp
View file @
234e19d6
...
...
@@ -130,6 +130,8 @@ bool OoxConverter::UpdateProgress(long nComplete)
void
OoxConverter
::
set_fonts_directory
(
const
std
::
wstring
&
fontsPath
)
{
if
(
odf_context
()
==
NULL
)
return
;
odf_context
()
->
set_fonts_directory
(
fontsPath
);
}
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.cpp
View file @
234e19d6
...
...
@@ -60,7 +60,18 @@ namespace Oox2Odf
{
PptxConverter
::
PptxConverter
(
const
std
::
wstring
&
path
,
const
ProgressCallback
*
CallBack
)
{
const
OOX
::
CPath
oox_path
(
std
::
wstring
(
path
.
c_str
()));
current_clrMap
=
NULL
;
current_slide
=
NULL
;
current_theme
=
NULL
;
current_tableStyles
=
NULL
;
presentation
=
NULL
;
output_document
=
NULL
;
odp_context
=
NULL
;
pCallBack
=
CallBack
;
const
OOX
::
CPath
oox_path
(
std
::
wstring
(
path
.
c_str
()));
pptx_document
=
new
PPTX
::
Folder
();
if
(
!
pptx_document
->
isValid
(
oox_path
.
GetPath
()))
// true ???
...
...
@@ -82,13 +93,6 @@ PptxConverter::PptxConverter(const std::wstring & path, const ProgressCallback*
output_document
=
new
odf_writer
::
package
::
odf_document
(
L"presentation"
);
odp_context
=
new
odf_writer
::
odp_conversion_context
(
output_document
);
current_clrMap
=
NULL
;
current_slide
=
NULL
;
current_theme
=
NULL
;
current_tableStyles
=
NULL
;
pCallBack
=
CallBack
;
if
(
UpdateProgress
(
290000
))
return
;
}
PptxConverter
::~
PptxConverter
()
...
...
@@ -339,7 +343,7 @@ void PptxConverter::convert_slides()
current_slide
=
slide
->
Master
.
operator
->
();
if
(
bShowLayoutMasterSp
&&
bShowMasterSp
)
convert_slide
(
&
slide
->
Master
->
cSld
,
current_txStyles
,
false
);
convert_slide
(
&
slide
->
Master
->
cSld
,
current_txStyles
,
false
,
true
);
else
convert
(
slide
->
Master
->
cSld
.
bg
.
GetPointer
());
...
...
@@ -347,7 +351,7 @@ void PptxConverter::convert_slides()
current_clrMap
=
slide
->
Layout
->
clrMapOvr
->
overrideClrMapping
.
GetPointer
();
current_slide
=
slide
->
Layout
.
operator
->
();
convert_slide
(
&
slide
->
Layout
->
cSld
,
current_txStyles
,
true
);
convert_slide
(
&
slide
->
Layout
->
cSld
,
current_txStyles
,
true
,
bShowLayoutMasterSp
);
//add note master
odp_context
->
end_master_slide
();
...
...
@@ -387,7 +391,7 @@ void PptxConverter::convert_slides()
odp_context
->
current_slide
().
set_master_page
(
master_style_name
);
odp_context
->
current_slide
().
set_layout_page
(
layout_style_name
);
convert_slide
(
slide
->
cSld
.
GetPointer
(),
current_txStyles
);
convert_slide
(
slide
->
cSld
.
GetPointer
(),
current_txStyles
,
true
,
bShowMasterSp
);
convert
(
slide
->
comments
.
operator
->
());
convert
(
slide
->
Note
.
operator
->
());
...
...
@@ -943,7 +947,7 @@ void PptxConverter::convert(PPTX::Logic::Bg *oox_background)
odp_context
->
end_drawings
();
}
void
PptxConverter
::
convert_slide
(
PPTX
::
Logic
::
CSld
*
oox_slide
,
PPTX
::
Logic
::
TxStyles
*
txStyles
,
bool
bPlaceholders
)
void
PptxConverter
::
convert_slide
(
PPTX
::
Logic
::
CSld
*
oox_slide
,
PPTX
::
Logic
::
TxStyles
*
txStyles
,
bool
bPlaceholders
,
bool
bFillUp
)
{
if
(
oox_slide
==
NULL
)
return
;
...
...
@@ -966,14 +970,15 @@ void PptxConverter::convert_slide(PPTX::Logic::CSld *oox_slide, PPTX::Logic::TxS
{
if
(
pShape
->
nvSpPr
.
nvPr
.
ph
.
is_init
())
{
pShape
->
FillLevelUp
();
if
(
bFillUp
)
pShape
->
FillLevelUp
();
if
(
pShape
->
nvSpPr
.
nvPr
.
ph
->
type
.
IsInit
())
{
int
ph_type
=
pShape
->
nvSpPr
.
nvPr
.
ph
->
type
->
GetBYTECode
();
if
(
!
bMaster
&&
(
ph_type
==
5
||
ph_type
==
6
||
ph_type
==
7
||
ph_type
==
12
))
continue
;
//
if (!bMaster && (ph_type == 5 || ph_type == 6 || ph_type == 7 || ph_type == 12))
//
continue;
odf_context
()
->
drawing_context
()
->
set_placeholder_type
(
ph_type
);
}
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.h
View file @
234e19d6
...
...
@@ -106,7 +106,7 @@ namespace Oox2Odf
void
convert
(
OOX
::
WritingElement
*
oox_unknown
);
void
convert_slide
(
PPTX
::
Logic
::
CSld
*
oox_slide
,
PPTX
::
Logic
::
TxStyles
*
txStyles
,
bool
bPlaceholders
=
true
);
void
convert_slide
(
PPTX
::
Logic
::
CSld
*
oox_slide
,
PPTX
::
Logic
::
TxStyles
*
txStyles
,
bool
bPlaceholders
,
bool
bFillUp
);
void
convert_layout
(
PPTX
::
Logic
::
CSld
*
oox_slide
);
void
convert
(
PPTX
::
Comments
*
oox_comments
);
void
convert
(
PPTX
::
NotesSlide
*
oox_note
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/CNvGraphicFramePr.h
View file @
234e19d6
...
...
@@ -120,21 +120,29 @@ namespace PPTX
oAttr
.
Write
(
_T
(
"noResize"
),
noResize
);
oAttr
.
Write
(
_T
(
"noSelect"
),
noSelect
);
return
XmlUtils
::
CreateNode
(
m_namespace
+
L":cNvGraphicFramePr"
,
oAttr
.
m_strValue
.
empty
()
?
L""
:
XmlUtils
::
CreateNode
(
L"a:graphicFrameLocks"
,
oAttr
));
std
::
wstring
namespaceLocks
=
L"a"
;
if
(
m_namespace
==
L"wp"
)
namespaceLocks
=
L"wp"
;
return
XmlUtils
::
CreateNode
(
m_namespace
+
L":cNvGraphicFramePr"
,
oAttr
.
m_strValue
.
empty
()
?
L""
:
XmlUtils
::
CreateNode
(
namespaceLocks
+
L":graphicFrameLocks"
,
oAttr
));
}
virtual
void
toXmlWriter
(
NSBinPptxRW
::
CXmlWriter
*
pWriter
)
const
{
std
::
wstring
namespace_
=
m_namespace
;
std
::
wstring
namespace_
=
m_namespace
;
std
::
wstring
namespaceLock_
=
L"a"
;
if
(
pWriter
->
m_lDocType
==
XMLWRITER_DOC_TYPE_XLSX
)
namespace_
=
L"xdr"
;
if
(
pWriter
->
m_lDocType
==
XMLWRITER_DOC_TYPE_DOCX
)
namespace_
=
L"wp"
;
if
(
pWriter
->
m_lDocType
==
XMLWRITER_DOC_TYPE_DOCX
)
{
namespaceLock_
=
L"wp"
;
namespace_
=
L"wp"
;
}
pWriter
->
StartNode
(
namespace_
+
L":cNvGraphicFramePr"
);
pWriter
->
EndAttributes
();
pWriter
->
StartNode
(
_T
(
"a:graphicFrameLocks"
)
);
pWriter
->
StartNode
(
namespaceLock_
+
L"graphicFrameLocks"
);
pWriter
->
StartAttributes
();
...
...
@@ -147,7 +155,7 @@ namespace PPTX
pWriter
->
EndAttributes
();
pWriter
->
EndNode
(
_T
(
"a:graphicFrameLocks"
)
);
pWriter
->
EndNode
(
namespaceLock_
+
L":graphicFrameLocks"
);
pWriter
->
EndNode
(
namespace_
+
L":cNvGraphicFramePr"
);
}
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/GraphicFrame.cpp
View file @
234e19d6
...
...
@@ -122,8 +122,8 @@ namespace PPTX
if
(
L"xfrm"
==
strName
&&
strNamespace
!=
L"xdr"
)
xfrm
=
oReader
;
else
if
(
L"
n
vGraphicFramePr"
==
strName
)
nvGraphicFramePr
.
fromXML
(
oReader
);
else
if
(
L"
cN
vGraphicFramePr"
==
strName
)
nvGraphicFramePr
.
cNvGraphicFramePr
.
fromXML
(
oReader
);
else
if
(
L"graphic"
==
strName
)
{
...
...
ASCOfficePPTXFile/PPTXFormat/SlideLayout.h
View file @
234e19d6
...
...
@@ -156,6 +156,16 @@ namespace PPTX
}
}
}
if
(
pShape
->
nvSpPr
.
nvPr
.
ph
->
idx
.
IsInit
())
{
//not found in layout !! 100818_건강보험과_보건의료_김용익_최종.pptx
bool
bShapeMaster
=
showMasterSp
.
get_value_or
(
true
);
if
(
Master
.
IsInit
()
&&
bShapeMaster
)
{
Master
->
GetLevelUp
(
pShape
);
}
}
}
}
virtual
std
::
wstring
GetMediaFullPathNameFromRId
(
const
OOX
::
RId
&
rid
)
const
...
...
DesktopEditor/common/File.h
View file @
234e19d6
...
...
@@ -45,7 +45,8 @@
#include <windows.h>
#endif
#define U_TO_UTF8(val) NSFile::CUtf8Converter::GetUtf8StringFromUnicode2(val.c_str(), val.length())
#define U_TO_UTF8(val) NSFile::CUtf8Converter::GetUtf8StringFromUnicode2(val.c_str(), (LONG)val.length())
#define UTF8_TO_U(val) NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)val.c_str(), (LONG)val.length())
#if defined(__linux__) || defined(_MAC) && !defined(_IOS)
#include <unistd.h>
...
...
DesktopEditor/xmlsec/test/windows_list_serts/main.cpp
View file @
234e19d6
This diff is collapsed.
Click to expand it.
Test/Applications/DocxFormatCodeGen/codegen/CodeGenPivot.cs
View file @
234e19d6
...
...
@@ -75,23 +75,23 @@ namespace codegen
}
public
void
merge
(
GenMemberPivot
val
)
{
if
(
!
string
.
IsNullOrEmpty
(
val
.
sName
))
if
(
string
.
IsNullOrEmpty
(
this
.
sName
))
sName
=
val
.
sName
;
if
(
!
string
.
IsNullOrEmpty
(
val
.
sNamespace
))
if
(
string
.
IsNullOrEmpty
(
this
.
sNamespace
))
sNamespace
=
val
.
sNamespace
;
if
(
!
string
.
IsNullOrEmpty
(
val
.
sType
))
if
(
string
.
IsNullOrEmpty
(
this
.
sType
))
sType
=
val
.
sType
;
if
(
null
!=
val
.
oSystemType
)
if
(
null
==
this
.
oSystemType
)
oSystemType
=
val
.
oSystemType
;
if
(
val
.
bIsAttribute
.
HasValue
)
if
(
!
this
.
bIsAttribute
.
HasValue
)
bIsAttribute
=
val
.
bIsAttribute
;
if
(
!
string
.
IsNullOrEmpty
(
val
.
sDefAttribute
))
if
(
string
.
IsNullOrEmpty
(
this
.
sDefAttribute
))
sDefAttribute
=
val
.
sDefAttribute
;
if
(
val
.
bQualified
.
HasValue
)
if
(
!
this
.
bQualified
.
HasValue
)
bQualified
=
val
.
bQualified
;
if
(
val
.
nArrayRank
.
HasValue
)
if
(
!
this
.
nArrayRank
.
HasValue
)
nArrayRank
=
val
.
nArrayRank
;
if
(
val
.
bIsArrayTypesHidden
.
HasValue
)
if
(
!
this
.
bIsArrayTypesHidden
.
HasValue
)
bIsArrayTypesHidden
=
val
.
bIsArrayTypesHidden
;
}
public
void
completeDefaults
()
...
...
@@ -105,7 +105,7 @@ namespace codegen
//[System.Xml.Serialization.XmlElementAttribute("c")]
//public CT_CalcCell[] c {
//
bIsArray=true;aArrayTypes=[CT_CalcCell]
//
nArrayRank=0;aArrayTypes=[CT_CalcCell];bIsArrayTypesHidden=true
//[System.Xml.Serialization.XmlElementAttribute("b", typeof(CT_Boolean))]
//[System.Xml.Serialization.XmlElementAttribute("d", typeof(CT_DateTime))]
...
...
@@ -114,9 +114,18 @@ namespace codegen
//[System.Xml.Serialization.XmlElementAttribute("n", typeof(CT_Number))]
//[System.Xml.Serialization.XmlElementAttribute("s", typeof(CT_String))]
//public object[] Items {
//nArrayRank=0;aArrayTypes=[CT_Boolean, CT_DateTime, CT_Error, CT_Missing, CT_Number, CT_String];bIsArrayTypesHidden=true
//[System.Xml.Serialization.XmlElementAttribute("consolidation", typeof(CT_Consolidation))]
//[System.Xml.Serialization.XmlElementAttribute("extLst", typeof(CT_ExtensionList))]
//[System.Xml.Serialization.XmlElementAttribute("worksheetSource", typeof(CT_WorksheetSource))]
//public object Item
//{
//nArrayRank=null;aArrayTypes=[CT_Consolidation, CT_ExtensionList, CT_WorksheetSource];bIsArrayTypesHidden=true
//[System.Xml.Serialization.XmlArrayItemAttribute("author", IsNullable=false)]
//public string[] authors {
//nArrayRank=0;aArrayTypes=[string];bIsArrayTypesHidden=false
//[System.Xml.Serialization.XmlArrayItemAttribute("b", typeof(CT_Boolean), IsNullable=false)]
//[System.Xml.Serialization.XmlArrayItemAttribute("d", typeof(CT_DateTime), IsNullable=false)]
...
...
@@ -126,12 +135,7 @@ namespace codegen
//[System.Xml.Serialization.XmlArrayItemAttribute("s", typeof(CT_String), IsNullable=false)]
//[System.Xml.Serialization.XmlArrayItemAttribute("x", typeof(CT_Index), IsNullable=false)]
//public object[][] r {
//[System.Xml.Serialization.XmlElementAttribute("consolidation", typeof(CT_Consolidation))]
//[System.Xml.Serialization.XmlElementAttribute("extLst", typeof(CT_ExtensionList))]
//[System.Xml.Serialization.XmlElementAttribute("worksheetSource", typeof(CT_WorksheetSource))]
//public object Item
//{
//nArrayRank=1;aArrayTypes=[CT_Boolean, CT_DateTime, CT_Error, CT_Missing, CT_Number, CT_String, CT_Index];bIsArrayTypesHidden=false
public
class
GenClassPivot
{
...
...
@@ -222,6 +226,9 @@ namespace codegen
Queue
<
GenClassPivot
>
aTemp
=
new
Queue
<
GenClassPivot
>();
List
<
GenClassPivot
>
aRes
=
new
List
<
GenClassPivot
>();
string
[]
aTargetTypes
=
new
string
[]
{
"CT_PivotCacheDefinition"
,
"CT_PivotCacheRecords"
,
"CT_pivotTableDefinition"
};
//string[] aTargetTypes = new string[] { "CT_Workbook" };
//string[] aTargetTypes = new string[] { "CT_Comments" };
Dictionary
<
string
,
bool
>
mapTargetSubTypes
=
new
Dictionary
<
string
,
bool
>();
Dictionary
<
string
,
bool
>
namspaces
=
new
Dictionary
<
string
,
bool
>();
...
...
@@ -419,16 +426,19 @@ namespace codegen
{
if
(
1
==
aTempMemebers
.
Count
)
{
oGenMember
.
merge
(
aTempMemebers
[
0
]);
GenMemberPivot
TempMember
=
aTempMemebers
[
0
];
TempMember
.
merge
(
oGenMember
);
TempMember
.
nArrayRank
=
null
;
}
else
{
oGenMember
.
aArrayTypes
=
aTempMemebers
;
if
(
bXmlElementAttribute
)
oGenMember
.
bIsArrayTypesHidden
=
true
;
else
oGenMember
.
bIsArrayTypesHidden
=
false
;
}
}
else
{
oGenMember
.
nArrayRank
=
null
;
}
oGenMember
.
completeDefaults
();
return
oGenMember
;
...
...
Test/Applications/DocxFormatCodeGen/codegen/CodegenJSPivot.cs
View file @
234e19d6
This diff is collapsed.
Click to expand it.
Test/Applications/DocxFormatCodeGen/codegen/Resource/sml.xsd
View file @
234e19d6
...
...
@@ -568,7 +568,7 @@
<xsd:attribute
name=
"optimizeMemory"
type=
"xsd:boolean"
use=
"optional"
default=
"false"
/>
<xsd:attribute
name=
"enableRefresh"
type=
"xsd:boolean"
use=
"optional"
default=
"true"
/>
<xsd:attribute
name=
"refreshedBy"
type=
"s:ST_Xstring"
use=
"optional"
/>
<xsd:attribute
name=
"refreshedDate
Iso"
type=
"xsd:dateTim
e"
use=
"optional"
/>
<xsd:attribute
name=
"refreshedDate
"
type=
"xsd:doubl
e"
use=
"optional"
/>
<xsd:attribute
name=
"backgroundQuery"
type=
"xsd:boolean"
default=
"false"
/>
<xsd:attribute
name=
"missingItemsLimit"
type=
"xsd:unsignedInt"
use=
"optional"
/>
<xsd:attribute
name=
"createdVersion"
type=
"xsd:unsignedByte"
use=
"optional"
default=
"0"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment