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
07562a95
Commit
07562a95
authored
Nov 13, 2017
by
Alexey Golubev
Browse files
Options
Browse Files
Download
Plain Diff
v5.0.4
parents
e69c1677
f53c3d9f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
37 deletions
+45
-37
ASCOfficeDocxFile2/BinReader/Readers.h
ASCOfficeDocxFile2/BinReader/Readers.h
+15
-14
ASCOfficeDocxFile2/DocWrapper/ChartWriter.cpp
ASCOfficeDocxFile2/DocWrapper/ChartWriter.cpp
+2
-3
ASCOfficeDocxFile2/DocWrapper/XlsxSerializer.cpp
ASCOfficeDocxFile2/DocWrapper/XlsxSerializer.cpp
+25
-19
ASCOfficeDocxFile2/DocWrapper/XlsxSerializer.h
ASCOfficeDocxFile2/DocWrapper/XlsxSerializer.h
+1
-1
PdfReader/Src/GFont.cpp
PdfReader/Src/GFont.cpp
+2
-0
No files found.
ASCOfficeDocxFile2/BinReader/Readers.h
View file @
07562a95
...
@@ -7064,8 +7064,8 @@ public:
...
@@ -7064,8 +7064,8 @@ public:
std
::
wstring
sXlsxFilename
=
L"Microsoft_Excel_Worksheet"
+
std
::
to_wstring
(
nChartIndex
)
+
L".xlsx"
;
std
::
wstring
sXlsxFilename
=
L"Microsoft_Excel_Worksheet"
+
std
::
to_wstring
(
nChartIndex
)
+
L".xlsx"
;
std
::
wstring
sXlsxPath
=
pathChartsWorksheetDir
.
GetPath
()
+
FILE_SEPARATOR_STR
+
sXlsxFilename
;
std
::
wstring
sXlsxPath
=
pathChartsWorksheetDir
.
GetPath
()
+
FILE_SEPARATOR_STR
+
sXlsxFilename
;
BinXlsxRW
::
CXlsxSerializer
oXlsxSerializer
;
BinXlsxRW
::
CXlsxSerializer
oXlsxSerializer
;
oXlsxSerializer
.
writeChartXlsx
(
sXlsxPath
,
*
pChartSpace
);
if
(
oXlsxSerializer
.
writeChartXlsx
(
sXlsxPath
,
*
pChartSpace
))
{
std
::
wstring
sChartsWorksheetRelsName
=
L"../embeddings/"
+
sXlsxFilename
;
std
::
wstring
sChartsWorksheetRelsName
=
L"../embeddings/"
+
sXlsxFilename
;
long
rIdXlsx
;
long
rIdXlsx
;
std
::
wstring
bstrChartsWorksheetRelType
=
OOX
::
FileTypes
::
MicrosoftOfficeExcelWorksheet
.
RelationType
();
std
::
wstring
bstrChartsWorksheetRelType
=
OOX
::
FileTypes
::
MicrosoftOfficeExcelWorksheet
.
RelationType
();
...
@@ -7079,6 +7079,7 @@ public:
...
@@ -7079,6 +7079,7 @@ public:
pChartSpace
->
m_oChartSpace
.
m_externalData
->
m_id
->
append
(
std
::
to_wstring
(
rIdXlsx
));
pChartSpace
->
m_oChartSpace
.
m_externalData
->
m_id
->
append
(
std
::
to_wstring
(
rIdXlsx
));
pChartSpace
->
m_oChartSpace
.
m_externalData
->
m_autoUpdate
=
new
OOX
::
Spreadsheet
::
CT_Boolean
();
pChartSpace
->
m_oChartSpace
.
m_externalData
->
m_autoUpdate
=
new
OOX
::
Spreadsheet
::
CT_Boolean
();
pChartSpace
->
m_oChartSpace
.
m_externalData
->
m_autoUpdate
->
m_val
=
new
bool
(
false
);
pChartSpace
->
m_oChartSpace
.
m_externalData
->
m_autoUpdate
->
m_val
=
new
bool
(
false
);
}
//save chart.xml
//save chart.xml
NSStringUtils
::
CStringBuilder
sw
;
NSStringUtils
::
CStringBuilder
sw
;
...
...
ASCOfficeDocxFile2/DocWrapper/ChartWriter.cpp
View file @
07562a95
...
@@ -658,8 +658,7 @@ namespace BinXlsxRW{
...
@@ -658,8 +658,7 @@ namespace BinXlsxRW{
std
::
wstring
wb
,
sheetFrom
,
sheetTo
;
std
::
wstring
wb
,
sheetFrom
,
sheetTo
;
int
nRow1
,
nCol1
,
nRow2
,
nCol2
;
int
nRow1
,
nCol1
,
nRow2
,
nCol2
;
if
(
OOX
::
Spreadsheet
::
CCell
::
parse3DRef
(
*
pStrRef
->
m_f
,
wb
,
sheetFrom
,
sheetTo
,
nRow1
,
nCol1
,
nRow2
,
nCol2
)
&&
if
(
OOX
::
Spreadsheet
::
CCell
::
parse3DRef
(
*
pStrRef
->
m_f
,
wb
,
sheetFrom
,
sheetTo
,
nRow1
,
nCol1
,
nRow2
,
nCol2
)
&&
sheetFrom
.
length
()
>
0
&&
0
==
wb
.
length
()
&&
0
==
sheetTo
.
length
()
&&
sheetFrom
.
length
()
>
0
&&
0
==
sheetTo
.
length
()
&&
NULL
!=
pStrRef
->
m_strCache
)
NULL
!=
pStrRef
->
m_strCache
)
{
{
bool
bRow
=
nRow1
==
nRow2
;
bool
bRow
=
nRow1
==
nRow2
;
if
(
bUpdateRange
)
if
(
bUpdateRange
)
...
@@ -727,7 +726,7 @@ namespace BinXlsxRW{
...
@@ -727,7 +726,7 @@ namespace BinXlsxRW{
std
::
wstring
wb
,
sheetFrom
,
sheetTo
;
std
::
wstring
wb
,
sheetFrom
,
sheetTo
;
int
nRow1
,
nCol1
,
nRow2
,
nCol2
;
int
nRow1
,
nCol1
,
nRow2
,
nCol2
;
if
(
OOX
::
Spreadsheet
::
CCell
::
parse3DRef
(
*
pNumRef
->
m_f
,
wb
,
sheetFrom
,
sheetTo
,
nRow1
,
nCol1
,
nRow2
,
nCol2
)
&&
if
(
OOX
::
Spreadsheet
::
CCell
::
parse3DRef
(
*
pNumRef
->
m_f
,
wb
,
sheetFrom
,
sheetTo
,
nRow1
,
nCol1
,
nRow2
,
nCol2
)
&&
sheetFrom
.
length
()
>
0
&&
0
==
wb
.
length
()
&&
0
==
sheetTo
.
length
()
&&
NULL
!=
pNumRef
->
m_numCache
)
sheetFrom
.
length
()
>
0
&&
0
==
sheetTo
.
length
()
&&
NULL
!=
pNumRef
->
m_numCache
)
{
{
bool
bRow
=
nRow1
==
nRow2
;
bool
bRow
=
nRow1
==
nRow2
;
if
(
bUpdateRange
)
if
(
bUpdateRange
)
...
...
ASCOfficeDocxFile2/DocWrapper/XlsxSerializer.cpp
View file @
07562a95
...
@@ -181,7 +181,8 @@ namespace BinXlsxRW{
...
@@ -181,7 +181,8 @@ namespace BinXlsxRW{
std
::
wstring
sXlsxFilename
=
L"Microsoft_Excel_Worksheet"
+
std
::
to_wstring
(
lChartNumber
)
+
L".xlsx"
;
std
::
wstring
sXlsxFilename
=
L"Microsoft_Excel_Worksheet"
+
std
::
to_wstring
(
lChartNumber
)
+
L".xlsx"
;
std
::
wstring
sXlsxPath
=
sEmbedingPath
+
FILE_SEPARATOR_STR
+
sXlsxFilename
;
std
::
wstring
sXlsxPath
=
sEmbedingPath
+
FILE_SEPARATOR_STR
+
sXlsxFilename
;
writeChartXlsx
(
sXlsxPath
,
oChartSpace
);
if
(
writeChartXlsx
(
sXlsxPath
,
oChartSpace
))
{
pReader
->
m_pRels
->
m_pManager
->
m_pContentTypes
->
AddDefault
(
L"xlsx"
);
pReader
->
m_pRels
->
m_pManager
->
m_pContentTypes
->
AddDefault
(
L"xlsx"
);
std
::
wstring
sChartsWorksheetRelsName
=
L"../embeddings/"
+
sXlsxFilename
;
std
::
wstring
sChartsWorksheetRelsName
=
L"../embeddings/"
+
sXlsxFilename
;
...
@@ -196,6 +197,7 @@ namespace BinXlsxRW{
...
@@ -196,6 +197,7 @@ namespace BinXlsxRW{
oChartSpace
.
m_oChartSpace
.
m_externalData
->
m_autoUpdate
=
new
OOX
::
Spreadsheet
::
CT_Boolean
();
oChartSpace
.
m_oChartSpace
.
m_externalData
->
m_autoUpdate
=
new
OOX
::
Spreadsheet
::
CT_Boolean
();
oChartSpace
.
m_oChartSpace
.
m_externalData
->
m_autoUpdate
->
m_val
=
new
bool
(
false
);
oChartSpace
.
m_oChartSpace
.
m_externalData
->
m_autoUpdate
->
m_val
=
new
bool
(
false
);
}
}
}
std
::
wstring
strFilepath
=
sFilepath
;
std
::
wstring
strFilepath
=
sFilepath
;
std
::
wstring
strDir
=
NSSystemPath
::
GetDirectoryName
(
strFilepath
);
std
::
wstring
strDir
=
NSSystemPath
::
GetDirectoryName
(
strFilepath
);
...
@@ -233,7 +235,7 @@ namespace BinXlsxRW{
...
@@ -233,7 +235,7 @@ namespace BinXlsxRW{
m_bIsNoBase64
=
bIsNoBase64
;
m_bIsNoBase64
=
bIsNoBase64
;
}
}
void
CXlsxSerializer
::
writeChartXlsx
(
const
std
::
wstring
&
sDstFile
,
const
OOX
::
Spreadsheet
::
CChartSpace
&
oChart
)
bool
CXlsxSerializer
::
writeChartXlsx
(
const
std
::
wstring
&
sDstFile
,
const
OOX
::
Spreadsheet
::
CChartSpace
&
oChart
)
{
{
//анализируем chart
//анализируем chart
BinXlsxRW
::
ChartWriter
helper
;
BinXlsxRW
::
ChartWriter
helper
;
...
@@ -252,11 +254,15 @@ namespace BinXlsxRW{
...
@@ -252,11 +254,15 @@ namespace BinXlsxRW{
helper
.
toXlsx
(
oXlsx
);
helper
.
toXlsx
(
oXlsx
);
//write
//write
OOX
::
CContentTypes
oContentTypes
;
OOX
::
CContentTypes
oContentTypes
;
oXlsx
.
Write
(
oPath
,
oContentTypes
);
bool
res
=
oXlsx
.
Write
(
oPath
,
oContentTypes
);
if
(
res
)
{
//zip
//zip
COfficeUtils
oOfficeUtils
(
NULL
);
COfficeUtils
oOfficeUtils
(
NULL
);
oOfficeUtils
.
CompressFileOrDirectory
(
sTempDir
,
sDstFile
,
true
);
oOfficeUtils
.
CompressFileOrDirectory
(
sTempDir
,
sDstFile
,
true
);
}
//clean
//clean
NSDirectory
::
DeleteDirectory
(
sTempDir
);
NSDirectory
::
DeleteDirectory
(
sTempDir
);
return
res
;
}
}
};
};
ASCOfficeDocxFile2/DocWrapper/XlsxSerializer.h
View file @
07562a95
...
@@ -72,7 +72,7 @@ namespace BinXlsxRW {
...
@@ -72,7 +72,7 @@ namespace BinXlsxRW {
void
setDrawingConverter
(
NSBinPptxRW
::
CDrawingConverter
*
pDrawingConverter
);
void
setDrawingConverter
(
NSBinPptxRW
::
CDrawingConverter
*
pDrawingConverter
);
void
setIsNoBase64
(
bool
bIsNoBase64
);
void
setIsNoBase64
(
bool
bIsNoBase64
);
void
writeChartXlsx
(
const
std
::
wstring
&
sDstFile
,
const
OOX
::
Spreadsheet
::
CChartSpace
&
oChart
);
bool
writeChartXlsx
(
const
std
::
wstring
&
sDstFile
,
const
OOX
::
Spreadsheet
::
CChartSpace
&
oChart
);
};
};
}
}
#endif // #ifndef XLSX_SERIALIZER
#endif // #ifndef XLSX_SERIALIZER
PdfReader/Src/GFont.cpp
View file @
07562a95
...
@@ -158,6 +158,8 @@ namespace PdfReader
...
@@ -158,6 +158,8 @@ namespace PdfReader
}
}
else
else
{
{
if
(
!
seName
)
seName
=
new
StringExt
(
""
);
// TO DO: Error "Unknown font type"
// TO DO: Error "Unknown font type"
pFont
=
new
Gr8BitFont
(
pXref
,
sTag
,
oID
,
seName
,
fontUnknownType
,
pFontDict
,
pGlobalParams
);
pFont
=
new
Gr8BitFont
(
pXref
,
sTag
,
oID
,
seName
,
fontUnknownType
,
pFontDict
,
pGlobalParams
);
}
}
...
...
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