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
857b79ee
Commit
857b79ee
authored
Jan 25, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x2t - fix smart art
parent
ecba12b2
Changes
12
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
254 additions
and
177 deletions
+254
-177
ASCOfficeDocFile/DocDocxConverter/WordprocessingDocument.cpp
ASCOfficeDocFile/DocDocxConverter/WordprocessingDocument.cpp
+2
-8
ASCOfficeOdfFileW/OdfFileWTest/OdfFileWTest.vcproj
ASCOfficeOdfFileW/OdfFileWTest/OdfFileWTest.vcproj
+54
-2
ASCOfficePPTXFile/ASCOfficeDrawingConverter.cpp
ASCOfficePPTXFile/ASCOfficeDrawingConverter.cpp
+46
-47
ASCOfficePPTXFile/Editor/BinaryFileReaderWriter.cpp
ASCOfficePPTXFile/Editor/BinaryFileReaderWriter.cpp
+25
-11
ASCOfficePPTXFile/Editor/BinaryFileReaderWriter.h
ASCOfficePPTXFile/Editor/BinaryFileReaderWriter.h
+21
-21
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/Blip.h
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/Blip.h
+6
-5
ASCOfficePPTXFile/PPTXFormat/Logic/GraphicFrame.cpp
ASCOfficePPTXFile/PPTXFormat/Logic/GraphicFrame.cpp
+94
-75
ASCOfficePPTXFile/PPTXFormat/Logic/GraphicFrame.h
ASCOfficePPTXFile/PPTXFormat/Logic/GraphicFrame.h
+3
-4
ASCOfficePPTXFile/PPTXFormat/Logic/SmartArt.cpp
ASCOfficePPTXFile/PPTXFormat/Logic/SmartArt.cpp
+1
-1
ASCOfficeXlsFile2/source/win32/XlsXlsxConverter.vcproj
ASCOfficeXlsFile2/source/win32/XlsXlsxConverter.vcproj
+1
-1
Common/DocxFormat/DocxFormatLib/DocxFormatLib.pro
Common/DocxFormat/DocxFormatLib/DocxFormatLib.pro
+0
-1
Common/DocxFormat/Source/DocxFormat/Rels.h
Common/DocxFormat/Source/DocxFormat/Rels.h
+1
-1
No files found.
ASCOfficeDocFile/DocDocxConverter/WordprocessingDocument.cpp
View file @
857b79ee
...
@@ -183,8 +183,6 @@ namespace DocFileFormat
...
@@ -183,8 +183,6 @@ namespace DocFileFormat
void
WordprocessingDocument
::
SaveDocument
()
void
WordprocessingDocument
::
SaveDocument
()
{
{
std
::
wstring
pathWord
=
m_strOutputPath
+
FILE_SEPARATOR_STR
+
L"word"
;
std
::
wstring
pathWord
=
m_strOutputPath
+
FILE_SEPARATOR_STR
+
L"word"
;
//OOX::CPath pathWord = CString(m_strOutputPath) + FILE_SEPARATOR_STR + L"word" );
//FileSystem::Directory::CreateDirectory( pathWord.GetPath() );
NSDirectory
::
CreateDirectory
(
pathWord
);
NSDirectory
::
CreateDirectory
(
pathWord
);
WritePackage
();
WritePackage
();
...
@@ -204,8 +202,6 @@ namespace DocFileFormat
...
@@ -204,8 +202,6 @@ namespace DocFileFormat
if
(
!
ImagesList
.
empty
())
if
(
!
ImagesList
.
empty
())
{
{
std
::
wstring
pathMedia
=
pathWord
+
FILE_SEPARATOR_STR
+
L"media"
;
std
::
wstring
pathMedia
=
pathWord
+
FILE_SEPARATOR_STR
+
L"media"
;
//OOX::CPath pathMedia = pathWord + FILE_SEPARATOR_STR + L"media";
//FileSystem::Directory::CreateDirectory( pathMedia.GetPath() );
NSDirectory
::
CreateDirectory
(
pathMedia
);
NSDirectory
::
CreateDirectory
(
pathMedia
);
...
@@ -237,8 +233,6 @@ namespace DocFileFormat
...
@@ -237,8 +233,6 @@ namespace DocFileFormat
if
(
!
OleObjectsList
.
empty
())
if
(
!
OleObjectsList
.
empty
())
{
{
std
::
wstring
pathObjects
=
pathWord
+
FILE_SEPARATOR_STR
+
L"embeddings"
;
std
::
wstring
pathObjects
=
pathWord
+
FILE_SEPARATOR_STR
+
L"embeddings"
;
//OOX::CPath pathObjects = pathWord + FILE_SEPARATOR_STR + L"embeddings" ;
//FileSystem::Directory::CreateDirectory( pathObjects.GetPath());
NSDirectory
::
CreateDirectory
(
pathObjects
);
NSDirectory
::
CreateDirectory
(
pathObjects
);
int
i
=
1
;
int
i
=
1
;
...
...
ASCOfficeOdfFileW/OdfFileWTest/OdfFileWTest.vcproj
View file @
857b79ee
...
@@ -43,11 +43,11 @@
...
@@ -43,11 +43,11 @@
<Tool
<Tool
Name=
"VCCLCompilerTool"
Name=
"VCCLCompilerTool"
Optimization=
"0"
Optimization=
"0"
PreprocessorDefinitions=
"WIN32;_DEBUG;_CONSOLE;
_MSC_VER=1800
"
PreprocessorDefinitions=
"WIN32;_DEBUG;_CONSOLE;
USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;__WORDSIZE=32;DONT_WRITE_EMBEDDED_FONTS
"
MinimalRebuild=
"true"
MinimalRebuild=
"true"
BasicRuntimeChecks=
"3"
BasicRuntimeChecks=
"3"
RuntimeLibrary=
"3"
RuntimeLibrary=
"3"
UsePrecompiledHeader=
"
2
"
UsePrecompiledHeader=
"
0
"
WarningLevel=
"3"
WarningLevel=
"3"
Detect64BitPortabilityProblems=
"true"
Detect64BitPortabilityProblems=
"true"
DebugInformationFormat=
"4"
DebugInformationFormat=
"4"
...
@@ -402,6 +402,58 @@
...
@@ -402,6 +402,58 @@
/>
/>
</FileConfiguration>
</FileConfiguration>
</File>
</File>
<Filter
Name=
"oox"
>
<File
RelativePath=
"..\..\ASCOfficeDocxFile2\BinWriter\BinWriters.cpp"
>
</File>
<File
RelativePath=
"..\..\XlsxSerializerCom\Reader\ChartFromToBinary.cpp"
>
</File>
<File
RelativePath=
"..\..\ASCOfficeDocxFile2\DocWrapper\ChartWriter.cpp"
>
</File>
<File
RelativePath=
"..\..\XlsxSerializerCom\Common\Common.cpp"
>
</File>
<File
RelativePath=
"..\..\XlsxSerializerCom\Reader\CommonWriter.cpp"
>
</File>
<File
RelativePath=
"..\..\XlsxSerializerCom\Reader\CSVReader.cpp"
>
</File>
<File
RelativePath=
"..\..\XlsxSerializerCom\Writer\CSVWriter.cpp"
>
</File>
<File
RelativePath=
"..\..\ASCOfficeDocxFile2\DocWrapper\DocxSerializer.cpp"
>
<FileConfiguration
Name=
"Debug|Win32"
>
<Tool
Name=
"VCCLCompilerTool"
AdditionalOptions=
"/bigobj"
/>
</FileConfiguration>
</File>
<File
RelativePath=
"..\..\ASCOfficeDocxFile2\DocWrapper\FontProcessor.cpp"
>
</File>
<File
RelativePath=
"..\..\ASCOfficeDocxFile2\DocWrapper\XlsxSerializer.cpp"
>
</File>
</Filter>
</Filter>
</Filter>
</Files>
</Files>
<Globals>
<Globals>
...
...
ASCOfficePPTXFile/ASCOfficeDrawingConverter.cpp
View file @
857b79ee
...
@@ -1023,10 +1023,8 @@ bool CDrawingConverter::ParceObject(const std::wstring& strXml, std::wstring** p
...
@@ -1023,10 +1023,8 @@ bool CDrawingConverter::ParceObject(const std::wstring& strXml, std::wstring** p
if
(
!
oMainNode
.
GetNodes
(
L"*"
,
oNodes
))
if
(
!
oMainNode
.
GetNodes
(
L"*"
,
oNodes
))
return
NULL
;
return
NULL
;
//ULONG lCurrentPosition = m_pBinaryWriter->GetPosition();
m_pBinaryWriter
->
StartRecord
(
0
);
m_pBinaryWriter
->
StartRecord
(
0
);
m_pBinaryWriter
->
ClearCurShapePositionAndSizes
();
m_pBinaryWriter
->
ClearShapeCurSizes
();
LONG
lCount
=
oNodes
.
GetCount
();
LONG
lCount
=
oNodes
.
GetCount
();
for
(
LONG
i
=
0
;
i
<
lCount
;
++
i
)
for
(
LONG
i
=
0
;
i
<
lCount
;
++
i
)
...
@@ -1051,10 +1049,14 @@ bool CDrawingConverter::ParceObject(const std::wstring& strXml, std::wstring** p
...
@@ -1051,10 +1049,14 @@ bool CDrawingConverter::ParceObject(const std::wstring& strXml, std::wstring** p
if
(
oNodeAnchorInline
.
IsValid
())
if
(
oNodeAnchorInline
.
IsValid
())
{
{
XmlUtils
::
CXmlNode
oNodeExt
;
XmlUtils
::
CXmlNode
oNodeExt
;
m_pBinaryWriter
->
m_lXCurShape
=
0
;
m_pBinaryWriter
->
m_lYCurShape
=
0
;
if
(
oNodeAnchorInline
.
GetNode
(
L"wp:extent"
,
oNodeExt
))
if
(
oNodeAnchorInline
.
GetNode
(
L"wp:extent"
,
oNodeExt
))
{
{
m_pBinaryWriter
->
m_l
Width
CurShape
=
oNodeExt
.
ReadAttributeInt
(
L"cx"
);
m_pBinaryWriter
->
m_l
Cx
CurShape
=
oNodeExt
.
ReadAttributeInt
(
L"cx"
);
m_pBinaryWriter
->
m_l
Height
CurShape
=
oNodeExt
.
ReadAttributeInt
(
L"cy"
);
m_pBinaryWriter
->
m_l
Cy
CurShape
=
oNodeExt
.
ReadAttributeInt
(
L"cy"
);
}
}
SendMainProps
(
oNodeAnchorInline
.
GetXml
(),
pMainProps
);
SendMainProps
(
oNodeAnchorInline
.
GetXml
(),
pMainProps
);
...
@@ -1083,11 +1085,12 @@ bool CDrawingConverter::ParceObject(const std::wstring& strXml, std::wstring** p
...
@@ -1083,11 +1085,12 @@ bool CDrawingConverter::ParceObject(const std::wstring& strXml, std::wstring** p
else
if
(
L"wpc:wpc"
==
oNodeContent
.
GetName
())
else
if
(
L"wpc:wpc"
==
oNodeContent
.
GetName
())
{
{
PPTX
::
Logic
::
SpTree
*
pTree
=
new
PPTX
::
Logic
::
SpTree
();
PPTX
::
Logic
::
SpTree
*
pTree
=
new
PPTX
::
Logic
::
SpTree
();
pTree
->
grpSpPr
.
xfrm
=
new
PPTX
::
Logic
::
Xfrm
();
pTree
->
grpSpPr
.
xfrm
=
new
PPTX
::
Logic
::
Xfrm
();
pTree
->
grpSpPr
.
xfrm
->
offX
=
0
;
pTree
->
grpSpPr
.
xfrm
->
offX
=
m_pBinaryWriter
->
m_lXCurShape
;
pTree
->
grpSpPr
.
xfrm
->
offY
=
0
;
pTree
->
grpSpPr
.
xfrm
->
offY
=
m_pBinaryWriter
->
m_lYCurShape
;
pTree
->
grpSpPr
.
xfrm
->
extX
=
m_pBinaryWriter
->
m_l
Width
CurShape
;
pTree
->
grpSpPr
.
xfrm
->
extX
=
m_pBinaryWriter
->
m_l
Cx
CurShape
;
pTree
->
grpSpPr
.
xfrm
->
extY
=
m_pBinaryWriter
->
m_l
Height
CurShape
;
pTree
->
grpSpPr
.
xfrm
->
extY
=
m_pBinaryWriter
->
m_l
Cy
CurShape
;
pTree
->
fromXML
(
oNodeContent
);
pTree
->
fromXML
(
oNodeContent
);
oElem
.
InitElem
(
pTree
);
oElem
.
InitElem
(
pTree
);
...
@@ -1104,7 +1107,7 @@ bool CDrawingConverter::ParceObject(const std::wstring& strXml, std::wstring** p
...
@@ -1104,7 +1107,7 @@ bool CDrawingConverter::ParceObject(const std::wstring& strXml, std::wstring** p
if
(
!
oElem
.
is_init
())
if
(
!
oElem
.
is_init
())
{
{
std
::
wstring
strXFRM
=
L"<a:xfrm><a:off x=
\"
0
\"
y=
\"
0
\"
/><a:ext cx=
\"
"
+
std
::
wstring
strXFRM
=
L"<a:xfrm><a:off x=
\"
0
\"
y=
\"
0
\"
/><a:ext cx=
\"
"
+
std
::
to_wstring
(
m_pBinaryWriter
->
m_l
WidthCurShape
)
+
L"
\"
cy=
\"
"
+
std
::
to_wstring
(
m_pBinaryWriter
->
m_lHeight
CurShape
)
+
L"
\"
/></a:xfrm>"
;
std
::
to_wstring
(
m_pBinaryWriter
->
m_l
CxCurShape
)
+
L"
\"
cy=
\"
"
+
std
::
to_wstring
(
m_pBinaryWriter
->
m_lCy
CurShape
)
+
L"
\"
/></a:xfrm>"
;
std
::
wstring
strUnsupported
=
L"<wps:wsp \
std
::
wstring
strUnsupported
=
L"<wps:wsp \
xmlns:a=
\"
http://schemas.openxmlformats.org/drawingml/2006/main
\"
\
xmlns:a=
\"
http://schemas.openxmlformats.org/drawingml/2006/main
\"
\
...
@@ -1366,9 +1369,6 @@ void CDrawingConverter::doc_LoadDiagram(PPTX::Logic::SpTreeElem *result, XmlUtil
...
@@ -1366,9 +1369,6 @@ void CDrawingConverter::doc_LoadDiagram(PPTX::Logic::SpTreeElem *result, XmlUtil
pDiagramData
=
dynamic_cast
<
OOX
::
CDiagramData
*>
(
oFileData
.
operator
->
());
pDiagramData
=
dynamic_cast
<
OOX
::
CDiagramData
*>
(
oFileData
.
operator
->
());
if
(
pDiagramData
)
if
(
pDiagramData
)
{
{
m_strCurrentRelsPath
=
pDiagramData
->
m_strFilename
;
SetCurrentRelsPath
();
for
(
int
i
=
0
;
(
pDiagramData
->
m_oExtLst
.
IsInit
())
&&
i
<
pDiagramData
->
m_oExtLst
->
m_arrExt
.
size
();
i
++
)
for
(
int
i
=
0
;
(
pDiagramData
->
m_oExtLst
.
IsInit
())
&&
i
<
pDiagramData
->
m_oExtLst
->
m_arrExt
.
size
();
i
++
)
{
{
if
(
pDiagramData
->
m_oExtLst
->
m_arrExt
[
i
]
->
m_oDataModelExt
.
IsInit
())
if
(
pDiagramData
->
m_oExtLst
->
m_arrExt
[
i
]
->
m_oDataModelExt
.
IsInit
())
...
@@ -1379,9 +1379,9 @@ void CDrawingConverter::doc_LoadDiagram(PPTX::Logic::SpTreeElem *result, XmlUtil
...
@@ -1379,9 +1379,9 @@ void CDrawingConverter::doc_LoadDiagram(PPTX::Logic::SpTreeElem *result, XmlUtil
}
}
}
}
}
}
if
(
id_drawing
.
is_init
())
if
(
id_drawing
.
is_init
())
{
{
oFileDrawing
=
(
*
m_pBinaryWriter
->
m_pCommonRels
)
->
Find
(
*
id_drawing
);
pDiagramDrawing
=
dynamic_cast
<
OOX
::
CDiagramDrawing
*>
(
oFileDrawing
.
operator
->
());
pDiagramDrawing
=
dynamic_cast
<
OOX
::
CDiagramDrawing
*>
(
oFileDrawing
.
operator
->
());
}
}
if
(
!
pDiagramDrawing
)
if
(
!
pDiagramDrawing
)
...
@@ -1401,7 +1401,7 @@ void CDrawingConverter::doc_LoadDiagram(PPTX::Logic::SpTreeElem *result, XmlUtil
...
@@ -1401,7 +1401,7 @@ void CDrawingConverter::doc_LoadDiagram(PPTX::Logic::SpTreeElem *result, XmlUtil
if
(
pDiagramDrawing
)
if
(
pDiagramDrawing
)
{
{
result
->
InitElem
(
pDiagramDrawing
->
m_oShapeTree
.
operator
->
(
));
result
->
InitElem
(
new
PPTX
::
Logic
::
SpTree
(
*
pDiagramDrawing
->
m_oShapeTree
));
}
}
else
else
{
//BG-FSC1.docx
{
//BG-FSC1.docx
...
@@ -1414,33 +1414,26 @@ void CDrawingConverter::doc_LoadDiagram(PPTX::Logic::SpTreeElem *result, XmlUtil
...
@@ -1414,33 +1414,26 @@ void CDrawingConverter::doc_LoadDiagram(PPTX::Logic::SpTreeElem *result, XmlUtil
{
{
_pElem
.
grpSpPr
.
xfrm
=
new
PPTX
::
Logic
::
Xfrm
();
_pElem
.
grpSpPr
.
xfrm
=
new
PPTX
::
Logic
::
Xfrm
();
_pElem
.
grpSpPr
.
xfrm
->
offX
=
(
int
)
0
;
_pElem
.
grpSpPr
.
xfrm
->
offX
=
m_pBinaryWriter
->
m_lXCurShape
;
_pElem
.
grpSpPr
.
xfrm
->
offY
=
(
int
)
0
;
_pElem
.
grpSpPr
.
xfrm
->
offY
=
m_pBinaryWriter
->
m_lYCurShape
;
_pElem
.
grpSpPr
.
xfrm
->
extX
=
m_pBinaryWriter
->
m_l
Width
CurShape
;
_pElem
.
grpSpPr
.
xfrm
->
extX
=
m_pBinaryWriter
->
m_l
Cx
CurShape
;
_pElem
.
grpSpPr
.
xfrm
->
extY
=
m_pBinaryWriter
->
m_l
Height
CurShape
;
_pElem
.
grpSpPr
.
xfrm
->
extY
=
m_pBinaryWriter
->
m_l
Cy
CurShape
;
_pElem
.
grpSpPr
.
xfrm
->
chOffX
=
(
int
)
0
;
_pElem
.
grpSpPr
.
xfrm
->
chOffX
=
(
int
)
0
;
_pElem
.
grpSpPr
.
xfrm
->
chOffY
=
(
int
)
0
;
_pElem
.
grpSpPr
.
xfrm
->
chOffY
=
(
int
)
0
;
_pElem
.
grpSpPr
.
xfrm
->
chExtX
=
m_pBinaryWriter
->
m_l
Width
CurShape
;
_pElem
.
grpSpPr
.
xfrm
->
chExtX
=
m_pBinaryWriter
->
m_l
Cx
CurShape
;
_pElem
.
grpSpPr
.
xfrm
->
chExtY
=
m_pBinaryWriter
->
m_l
Height
CurShape
;
_pElem
.
grpSpPr
.
xfrm
->
chExtY
=
m_pBinaryWriter
->
m_l
Cy
CurShape
;
}
}
else
else
{
{
if
(
!
_pElem
.
grpSpPr
.
xfrm
->
offX
.
is_init
())
if
(
!
_pElem
.
grpSpPr
.
xfrm
->
offX
.
is_init
())
_pElem
.
grpSpPr
.
xfrm
->
offX
=
m_pBinaryWriter
->
m_lXCurShape
;
_pElem
.
grpSpPr
.
xfrm
->
offX
=
(
int
)
0
;
if
(
!
_pElem
.
grpSpPr
.
xfrm
->
offY
.
is_init
())
_pElem
.
grpSpPr
.
xfrm
->
offY
=
m_pBinaryWriter
->
m_lYCurShape
;
if
(
!
_pElem
.
grpSpPr
.
xfrm
->
offY
.
is_init
())
if
(
!
_pElem
.
grpSpPr
.
xfrm
->
extX
.
is_init
())
_pElem
.
grpSpPr
.
xfrm
->
extX
=
m_pBinaryWriter
->
m_lCxCurShape
;
_pElem
.
grpSpPr
.
xfrm
->
offY
=
(
int
)
0
;
if
(
!
_pElem
.
grpSpPr
.
xfrm
->
extY
.
is_init
())
_pElem
.
grpSpPr
.
xfrm
->
extY
=
m_pBinaryWriter
->
m_lCyCurShape
;
if
(
!
_pElem
.
grpSpPr
.
xfrm
->
extX
.
is_init
())
_pElem
.
grpSpPr
.
xfrm
->
extX
=
m_pBinaryWriter
->
m_lWidthCurShape
;
if
(
!
_pElem
.
grpSpPr
.
xfrm
->
chOffX
.
is_init
())
_pElem
.
grpSpPr
.
xfrm
->
chOffX
=
(
int
)
0
;
if
(
!
_pElem
.
grpSpPr
.
xfrm
->
extY
.
is_init
())
if
(
!
_pElem
.
grpSpPr
.
xfrm
->
chOffY
.
is_init
())
_pElem
.
grpSpPr
.
xfrm
->
chOffY
=
(
int
)
0
;
_pElem
.
grpSpPr
.
xfrm
->
extY
=
m_pBinaryWriter
->
m_lHeightCurShape
;
if
(
!
_pElem
.
grpSpPr
.
xfrm
->
chExtX
.
is_init
())
_pElem
.
grpSpPr
.
xfrm
->
chExtX
=
m_pBinaryWriter
->
m_lCxCurShape
;
if
(
!
_pElem
.
grpSpPr
.
xfrm
->
chOffX
.
is_init
())
if
(
!
_pElem
.
grpSpPr
.
xfrm
->
chExtY
.
is_init
())
_pElem
.
grpSpPr
.
xfrm
->
chExtY
=
m_pBinaryWriter
->
m_lCyCurShape
;
_pElem
.
grpSpPr
.
xfrm
->
chOffX
=
(
int
)
0
;
if
(
!
_pElem
.
grpSpPr
.
xfrm
->
chOffY
.
is_init
())
_pElem
.
grpSpPr
.
xfrm
->
chOffY
=
(
int
)
0
;
if
(
!
_pElem
.
grpSpPr
.
xfrm
->
chExtX
.
is_init
())
_pElem
.
grpSpPr
.
xfrm
->
chExtX
=
m_pBinaryWriter
->
m_lWidthCurShape
;
if
(
!
_pElem
.
grpSpPr
.
xfrm
->
chExtY
.
is_init
())
_pElem
.
grpSpPr
.
xfrm
->
chExtY
=
m_pBinaryWriter
->
m_lHeightCurShape
;
}
}
}
}
...
@@ -2482,8 +2475,11 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
...
@@ -2482,8 +2475,11 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
}
}
else
else
{
{
m_pBinaryWriter
->
m_lWidthCurShape
=
0
;
m_pBinaryWriter
->
m_lXCurShape
=
0
;
m_pBinaryWriter
->
m_lHeightCurShape
=
0
;
m_pBinaryWriter
->
m_lYCurShape
=
0
;
m_pBinaryWriter
->
m_lCxCurShape
=
0
;
m_pBinaryWriter
->
m_lCyCurShape
=
0
;
pShape
->
spPr
.
xfrm
=
new
PPTX
::
Logic
::
Xfrm
();
pShape
->
spPr
.
xfrm
=
new
PPTX
::
Logic
::
Xfrm
();
pShape
->
spPr
.
xfrm
->
offX
=
oProps
.
X
;
pShape
->
spPr
.
xfrm
->
offX
=
oProps
.
X
;
...
@@ -2894,8 +2890,11 @@ std::wstring CDrawingConverter::GetDrawingMainProps(XmlUtils::CXmlNode& oNode, P
...
@@ -2894,8 +2890,11 @@ std::wstring CDrawingConverter::GetDrawingMainProps(XmlUtils::CXmlNode& oNode, P
oProps
.
Width
=
width
;
oProps
.
Width
=
width
;
oProps
.
Height
=
height
;
oProps
.
Height
=
height
;
m_pBinaryWriter
->
m_lWidthCurShape
=
width
;
m_pBinaryWriter
->
m_lXCurShape
=
left
;
m_pBinaryWriter
->
m_lHeightCurShape
=
height
;
m_pBinaryWriter
->
m_lYCurShape
=
top
;
m_pBinaryWriter
->
m_lCxCurShape
=
width
;
m_pBinaryWriter
->
m_lCyCurShape
=
height
;
if
(
bIsInline
)
if
(
bIsInline
)
{
{
...
...
ASCOfficePPTXFile/Editor/BinaryFileReaderWriter.cpp
View file @
857b79ee
...
@@ -423,22 +423,33 @@ namespace NSBinPptxRW
...
@@ -423,22 +423,33 @@ namespace NSBinPptxRW
m_lPosition
+=
lSize
;
m_lPosition
+=
lSize
;
m_pStreamCur
=
m_pStreamData
+
m_lPosition
;
m_pStreamCur
=
m_pStreamData
+
m_lPosition
;
}
}
double
CBinaryFileWriter
::
Get
WidthMM
()
double
CBinaryFileWriter
::
Get
ShapeHeight
()
{
{
if
(
m_l
Width
CurShape
==
0
)
if
(
m_l
Cy
CurShape
==
0
)
return
-
1
;
return
-
1
;
return
(
double
)
m_l
WidthCurShape
/
36000
;
return
(
double
)
m_l
CyCurShape
/
36000
;
//mm
}
}
double
CBinaryFileWriter
::
Get
HeightMM
()
double
CBinaryFileWriter
::
Get
ShapeWidth
()
{
{
if
(
m_l
Height
CurShape
==
0
)
if
(
m_l
Cy
CurShape
==
0
)
return
-
1
;
return
-
1
;
return
(
double
)
m_l
Height
CurShape
/
36000
;
return
(
double
)
m_l
Cx
CurShape
/
36000
;
}
}
void
CBinaryFileWriter
::
ClearShapeCurSizes
()
double
CBinaryFileWriter
::
GetShapeY
()
{
{
m_lWidthCurShape
=
0
;
return
(
double
)
m_lYCurShape
/
36000
;
m_lHeightCurShape
=
0
;
}
double
CBinaryFileWriter
::
GetShapeX
()
{
return
(
double
)
m_lXCurShape
/
36000
;
//mm
}
void
CBinaryFileWriter
::
ClearCurShapePositionAndSizes
()
{
m_lXCurShape
=
0
;
m_lYCurShape
=
0
;
m_lCxCurShape
=
0
;
m_lCyCurShape
=
0
;
}
}
void
CBinaryFileWriter
::
Clear
()
void
CBinaryFileWriter
::
Clear
()
{
{
...
@@ -451,8 +462,11 @@ namespace NSBinPptxRW
...
@@ -451,8 +462,11 @@ namespace NSBinPptxRW
m_lStackPosition
=
0
;
m_lStackPosition
=
0
;
memset
(
m_arStack
,
0
,
MAX_STACK_SIZE
*
sizeof
(
_UINT32
));
memset
(
m_arStack
,
0
,
MAX_STACK_SIZE
*
sizeof
(
_UINT32
));
m_lWidthCurShape
=
0
;
m_lCxCurShape
=
0
;
m_lHeightCurShape
=
0
;
m_lCyCurShape
=
0
;
m_lXCurShape
=
0
;
m_lYCurShape
=
0
;
}
}
void
CBinaryFileWriter
::
SetMainDocument
(
BinDocxRW
::
CDocxSerializer
*
pMainDoc
)
void
CBinaryFileWriter
::
SetMainDocument
(
BinDocxRW
::
CDocxSerializer
*
pMainDoc
)
...
...
ASCOfficePPTXFile/Editor/BinaryFileReaderWriter.h
View file @
857b79ee
...
@@ -253,21 +253,24 @@ namespace NSBinPptxRW
...
@@ -253,21 +253,24 @@ namespace NSBinPptxRW
std
::
vector
<
CSeekTableEntry
>
m_arMainTables
;
std
::
vector
<
CSeekTableEntry
>
m_arMainTables
;
public:
public:
_INT32
m_lWidthCurShape
;
_INT32
m_lCxCurShape
;
//emu
_INT32
m_lHeightCurShape
;
_INT32
m_lCyCurShape
;
_INT32
m_lXCurShape
;
_INT32
m_lYCurShape
;
public:
BYTE
*
GetBuffer
();
BYTE
*
GetBuffer
();
_UINT32
GetPosition
();
_UINT32
GetPosition
();
void
SetPosition
(
const
_UINT32
&
lPosition
);
void
SetPosition
(
const
_UINT32
&
lPosition
);
void
Skip
(
const
_UINT32
&
lSize
);
void
Skip
(
const
_UINT32
&
lSize
);
double
GetWidthMM
();
double
GetShapeWidth
();
double
GetHeightMM
();
double
GetShapeHeight
();
void
ClearShapeCurSizes
();
double
GetShapeX
();
double
GetShapeY
();
void
ClearCurShapePositionAndSizes
();
// -------------------- stream simple types -----------------------
public:
void
Clear
();
void
Clear
();
void
SetMainDocument
(
BinDocxRW
::
CDocxSerializer
*
pMainDoc
);
void
SetMainDocument
(
BinDocxRW
::
CDocxSerializer
*
pMainDoc
);
...
@@ -305,7 +308,6 @@ namespace NSBinPptxRW
...
@@ -305,7 +308,6 @@ namespace NSBinPptxRW
void
WriteDouble64
(
const
double
&
dValue
);
void
WriteDouble64
(
const
double
&
dValue
);
// --------------------------------------------------------
// --------------------------------------------------------
public:
CBinaryFileWriter
();
CBinaryFileWriter
();
~
CBinaryFileWriter
();
~
CBinaryFileWriter
();
...
@@ -317,8 +319,6 @@ namespace NSBinPptxRW
...
@@ -317,8 +319,6 @@ namespace NSBinPptxRW
void
WriteMainPart
();
void
WriteMainPart
();
public:
void
WriteString1
(
int
type
,
const
std
::
wstring
&
val
);
void
WriteString1
(
int
type
,
const
std
::
wstring
&
val
);
void
WriteString2
(
int
type
,
const
NSCommon
::
nullable_string
&
val
);
void
WriteString2
(
int
type
,
const
NSCommon
::
nullable_string
&
val
);
void
WriteString
(
const
std
::
wstring
&
val
);
void
WriteString
(
const
std
::
wstring
&
val
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/Blip.h
View file @
857b79ee
...
@@ -125,16 +125,17 @@ namespace PPTX
...
@@ -125,16 +125,17 @@ namespace PPTX
pWriter
->
EndRecord
();
pWriter
->
EndRecord
();
double
dX
=
0
;
double
dX
=
pWriter
->
GetShapeX
();
//mm
double
dY
=
0
;
double
dY
=
pWriter
->
GetShapeY
();
double
dW
=
pWriter
->
GetWidthMM
();
double
dH
=
pWriter
->
GetHeightMM
();
double
dW
=
pWriter
->
GetShapeWidth
();
//mm
double
dH
=
pWriter
->
GetShapeHeight
();
FileContainer
*
pRels
=
NULL
;
FileContainer
*
pRels
=
NULL
;
if
(
pWriter
->
m_pCommonRels
->
is_init
())
if
(
pWriter
->
m_pCommonRels
->
is_init
())
pRels
=
pWriter
->
m_pCommonRels
->
operator
->
();
pRels
=
pWriter
->
m_pCommonRels
->
operator
->
();
std
::
wstring
olePath
;
std
::
wstring
olePath
;
if
(
!
oleFilepathBin
.
empty
())
if
(
!
oleFilepathBin
.
empty
())
{
{
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/GraphicFrame.cpp
View file @
857b79ee
This diff is collapsed.
Click to expand it.
ASCOfficePPTXFile/PPTXFormat/Logic/GraphicFrame.h
View file @
857b79ee
...
@@ -54,7 +54,6 @@ namespace PPTX
...
@@ -54,7 +54,6 @@ namespace PPTX
explicit
GraphicFrame
(
XmlUtils
::
CXmlNode
&
node
);
explicit
GraphicFrame
(
XmlUtils
::
CXmlNode
&
node
);
const
GraphicFrame
&
operator
=
(
XmlUtils
::
CXmlNode
&
node
);
const
GraphicFrame
&
operator
=
(
XmlUtils
::
CXmlNode
&
node
);
public:
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
);
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
);
virtual
std
::
wstring
toXML
()
const
;
virtual
std
::
wstring
toXML
()
const
;
virtual
void
GetRect
(
Aggplus
::
RECT
&
pRect
)
const
;
virtual
void
GetRect
(
Aggplus
::
RECT
&
pRect
)
const
;
...
@@ -64,10 +63,10 @@ namespace PPTX
...
@@ -64,10 +63,10 @@ namespace PPTX
virtual
void
toPPTY
(
NSBinPptxRW
::
CBinaryFileWriter
*
pWriter
)
const
;
virtual
void
toPPTY
(
NSBinPptxRW
::
CBinaryFileWriter
*
pWriter
)
const
;
virtual
void
fromPPTY
(
NSBinPptxRW
::
CBinaryFileReader
*
pReader
);
virtual
void
fromPPTY
(
NSBinPptxRW
::
CBinaryFileReader
*
pReader
);
public:
NvGraphicFramePr
nvGraphicFramePr
;
NvGraphicFramePr
nvGraphicFramePr
;
Xfrm
xfrm
;
nullable
<
Xfrm
>
xfrm
;
nullable_string
spid
;
nullable_string
spid
;
nullable
<
Table
>
table
;
nullable
<
Table
>
table
;
nullable
<
SmartArt
>
smartArt
;
nullable
<
SmartArt
>
smartArt
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/SmartArt.cpp
View file @
857b79ee
...
@@ -116,7 +116,7 @@ namespace PPTX
...
@@ -116,7 +116,7 @@ namespace PPTX
pDiagramDrawing
=
dynamic_cast
<
OOX
::
CDiagramDrawing
*>
(
oFileDrawing
.
operator
->
());
pDiagramDrawing
=
dynamic_cast
<
OOX
::
CDiagramDrawing
*>
(
oFileDrawing
.
operator
->
());
}
}
if
(
pDiagramDrawing
)
if
(
(
pDiagramDrawing
)
&&
(
pDiagramDrawing
->
m_oShapeTree
.
IsInit
())
)
{
{
m_diag
=
pDiagramDrawing
->
m_oShapeTree
;
m_diag
=
pDiagramDrawing
->
m_oShapeTree
;
m_oCommonRels
=
smart_ptr
<
PPTX
::
CCommonRels
>
(
dynamic_cast
<
PPTX
::
CCommonRels
*>
(
pDiagramDrawing
));
m_oCommonRels
=
smart_ptr
<
PPTX
::
CCommonRels
>
(
dynamic_cast
<
PPTX
::
CCommonRels
*>
(
pDiagramDrawing
));
...
...
ASCOfficeXlsFile2/source/win32/XlsXlsxConverter.vcproj
View file @
857b79ee
<?xml version="1.0" encoding="windows-1251"?>
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
<VisualStudioProject
ProjectType=
"Visual C++"
ProjectType=
"Visual C++"
Version=
"8
.
00"
Version=
"8
,
00"
Name=
"XlsXlsxConverter"
Name=
"XlsXlsxConverter"
ProjectGUID=
"{CBEDD0D1-10A8-45C1-AF81-8492F40964CA}"
ProjectGUID=
"{CBEDD0D1-10A8-45C1-AF81-8492F40964CA}"
RootNamespace=
"XlsXlsxConverter"
RootNamespace=
"XlsXlsxConverter"
...
...
Common/DocxFormat/DocxFormatLib/DocxFormatLib.pro
View file @
857b79ee
...
@@ -257,7 +257,6 @@ HEADERS += docxformatlib.h \
...
@@ -257,7 +257,6 @@ HEADERS += docxformatlib.h \
..
/
Source
/
XlsxFormat
/
Workbook
.
h
\
..
/
Source
/
XlsxFormat
/
Workbook
.
h
\
..
/
Source
/
XlsxFormat
/
WritingElement
.
h
\
..
/
Source
/
XlsxFormat
/
WritingElement
.
h
\
..
/
Source
/
XlsxFormat
/
Xlsx
.
h
\
..
/
Source
/
XlsxFormat
/
Xlsx
.
h
\
..
/
Source
/
XML
/
StringWriter
.
h
\
..
/
Source
/
XML
/
Utils
.
h
\
..
/
Source
/
XML
/
Utils
.
h
\
..
/
Source
/
XML
/
XmlSimple
.
h
\
..
/
Source
/
XML
/
XmlSimple
.
h
\
..
/
Source
/
DocxFormat
/
Drawing
/
DrawingShapeElements
.
h
\
..
/
Source
/
DocxFormat
/
Drawing
/
DrawingShapeElements
.
h
\
...
...
Common/DocxFormat/Source/DocxFormat/Rels.h
View file @
857b79ee
...
@@ -216,7 +216,7 @@ namespace OOX
...
@@ -216,7 +216,7 @@ namespace OOX
XmlUtils
::
CXmlNode
oNode
;
XmlUtils
::
CXmlNode
oNode
;
if
(
oNode
.
FromXmlFile
2
(
oRelsPath
.
GetPath
()
)
&&
_T
(
"Relationships"
)
==
oNode
.
GetName
()
)
if
(
oNode
.
FromXmlFile
(
oRelsPath
.
GetPath
()
)
&&
_T
(
"Relationships"
)
==
oNode
.
GetName
()
)
{
{
XmlUtils
::
CXmlNodes
oNodes
;
XmlUtils
::
CXmlNodes
oNodes
;
if
(
oNode
.
GetNodes
(
_T
(
"Relationship"
),
oNodes
)
)
if
(
oNode
.
GetNodes
(
_T
(
"Relationship"
),
oNodes
)
)
...
...
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