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
d293769c
Commit
d293769c
authored
Dec 02, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XlsFormat ..
parent
b45e772a
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
166 additions
and
67 deletions
+166
-67
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/MsoDrawing.cpp
...sFile2/source/XlsFormat/Logic/Biff_records/MsoDrawing.cpp
+18
-6
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/MsoDrawing.h
...XlsFile2/source/XlsFormat/Logic/Biff_records/MsoDrawing.h
+1
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/PLV.cpp
...fficeXlsFile2/source/XlsFormat/Logic/Biff_records/PLV.cpp
+1
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Password.h
...ceXlsFile2/source/XlsFormat/Logic/Biff_records/Password.h
+0
-3
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXVI.cpp
...ficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXVI.cpp
+6
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/PtgNameX.cpp
...File2/source/XlsFormat/Logic/Biff_structures/PtgNameX.cpp
+21
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DBQUERY.cpp
...ceXlsFile2/source/XlsFormat/Logic/Biff_unions/DBQUERY.cpp
+37
-10
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DBQUERY.h
...ficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DBQUERY.h
+1
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/FEAT11.cpp
...iceXlsFile2/source/XlsFormat/Logic/Biff_unions/FEAT11.cpp
+9
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/PROTECTION_COMMON.cpp
.../source/XlsFormat/Logic/Biff_unions/PROTECTION_COMMON.cpp
+5
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/QUERYTABLE.cpp
...lsFile2/source/XlsFormat/Logic/Biff_unions/QUERYTABLE.cpp
+12
-8
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/WINDOW.cpp
...iceXlsFile2/source/XlsFormat/Logic/Biff_unions/WINDOW.cpp
+5
-5
ASCOfficeXlsFile2/source/XlsFormat/Logic/ChartSheetSubstream.cpp
...ceXlsFile2/source/XlsFormat/Logic/ChartSheetSubstream.cpp
+1
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/CommonSubstream.cpp
ASCOfficeXlsFile2/source/XlsFormat/Logic/CommonSubstream.cpp
+0
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/GlobalWorkbookInfo.h
...fficeXlsFile2/source/XlsFormat/Logic/GlobalWorkbookInfo.h
+1
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/WorksheetSubstream.cpp
...iceXlsFile2/source/XlsFormat/Logic/WorksheetSubstream.cpp
+14
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/WorksheetSubstream.h
...fficeXlsFile2/source/XlsFormat/Logic/WorksheetSubstream.h
+1
-0
ASCOfficeXlsFile2/source/XlsXlsxConverter/xlsx_conversion_context.cpp
...File2/source/XlsXlsxConverter/xlsx_conversion_context.cpp
+6
-0
ASCOfficeXlsFile2/source/XlsXlsxConverter/xlsx_drawing_context.cpp
...XlsFile2/source/XlsXlsxConverter/xlsx_drawing_context.cpp
+27
-27
No files found.
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/MsoDrawing.cpp
View file @
d293769c
...
...
@@ -31,6 +31,7 @@
*/
#include "MsoDrawing.h"
#include "../Biff_structures/ODRAW/OfficeArtRecord.h"
namespace
XLS
{
...
...
@@ -78,13 +79,24 @@ void MsoDrawing::readFields()
void
MsoDrawing
::
readFields
(
CFRecord
&
record
)
{
record
>>
rgChildRec
;
isReading
=
true
;
if
(
record
.
getRdPtr
()
<
record
.
getDataSize
())
ODRAW
::
OfficeArtRecordHeader
rh_test
;
record
>>
rh_test
;
record
.
RollRdPtrBack
(
8
);
//sizeof(OfficeArtRecordHeader)
if
(
rh_test
.
recType
==
0xF002
)
//OfficeArtDgContainer
{
record
>>
rgChildRec
;
isReading
=
true
;
}
else
if
((
rh_test
.
recType
&
0xF000
)
==
0xF000
)
{
//074_JKH.OPEN.INFO.PRICE.VO_зПТПДУЛЙЕ ПЛТХЗБ юЕМСВЙОУЛПК ПВМБУФЙ_пбп юЕМСВЙОУЛПЕ БЧЙБРТЕДРТЙСФЙЕ.xls
rgChildRec
.
rh_own
.
recLen
=
record
.
getDataSize
();
rgChildRec
.
loadFields
(
record
);
isReading
=
true
;
}
else
{
int
g
=
0
;
}
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/MsoDrawing.h
View file @
d293769c
...
...
@@ -32,7 +32,7 @@
#pragma once
#include "BiffRecordSplit.h"
#include
<Logic/Biff_structures/ODRAW/OfficeArtDgContainer.h>
#include
"../Biff_structures/ODRAW/OfficeArtDgContainer.h"
namespace
XLS
{
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/PLV.cpp
View file @
d293769c
...
...
@@ -31,7 +31,7 @@
*/
#include "PLV.h"
#include
<Logic/Biff_structures/FrtHeader.h>
#include
"../Biff_structures/FrtHeader.h"
namespace
XLS
{
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Password.h
View file @
d293769c
...
...
@@ -36,8 +36,6 @@
namespace
XLS
{
// Logical representation of Password record in BIFF8
class
Password
:
public
BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO
(
Password
)
...
...
@@ -47,7 +45,6 @@ public:
~
Password
();
BaseObjectPtr
clone
();
void
readFields
(
CFRecord
&
record
);
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXVI.cpp
View file @
d293769c
...
...
@@ -63,7 +63,7 @@ void SXVI::readFields(CFRecord& record)
if
(
cchName
>
0
&&
cchName
<
0xFFFF
)
{
stName
.
setSize
(
cchName
);
stName
.
load
(
record
)
;
record
>>
stName
;
}
}
...
...
@@ -79,6 +79,11 @@ int SXVI::serialize(std::wostream & strm)
if
(
fHideDetail
)
CP_XML_ATTR
(
L"sd"
,
0
);
if
(
fFormula
)
CP_XML_ATTR
(
L"f"
,
1
);
if
(
!
stName
.
value
().
empty
())
{
CP_XML_ATTR
(
L"n"
,
stName
.
value
());
}
if
(
itmType
==
0
)
{
CP_XML_ATTR
(
L"x"
,
iCache
);
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/PtgNameX.cpp
View file @
d293769c
...
...
@@ -100,6 +100,27 @@ void PtgNameX::assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data, bool fu
else
{
name
=
global_info
->
arDefineNames
[
nameindex
-
1
];
std
::
map
<
std
::
wstring
,
std
::
vector
<
std
::
wstring
>>::
iterator
pFind
=
global_info
->
mapDefineNames
.
find
(
name
);
if
(
link
.
empty
()
&&
full_ref
&&
pFind
!=
global_info
->
mapDefineNames
.
end
())
{
if
(
ixti
<
pFind
->
second
.
size
()
&&
ixti
>=
0
)
{
if
(
!
pFind
->
second
[
ixti
].
empty
())
name
=
pFind
->
second
[
ixti
];
//значение
}
else
{
for
(
size_t
i
=
0
;
i
<
pFind
->
second
.
size
();
i
++
)
{
if
(
pFind
->
second
[
i
].
empty
()
==
false
)
{
link
=
L"["
+
std
::
to_wstring
(
i
)
+
L"]"
;
break
;
}
}
}
}
}
if
(
!
link
.
empty
()
&&
!
name
.
empty
())
{
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DBQUERY.cpp
View file @
d293769c
...
...
@@ -39,6 +39,7 @@
#include "../Biff_records/DBQueryExt.h"
#include "../Biff_records/ExtString.h"
#include "../Biff_records/DConn.h"
#include "../Biff_records/Qsi.h"
#include "../Biff_structures/DConnConnectionWeb.h"
#include "../Biff_structures/DConnConnectionOleDb.h"
...
...
@@ -224,11 +225,24 @@ int DBQUERY::serialize_connection(std::wstring & name)
{
name
=
dcon
->
rgchConnectionName
.
strTotal
;
}
//имена уникальны должны быть!!!
if
(
name
.
empty
())
name
=
L"Connection"
+
std
::
to_wstring
(
global_info
->
connectionId
);
DBQUERYEXT
*
query_ext
=
dynamic_cast
<
DBQUERYEXT
*>
(
m_DBQUERYEXT
.
get
());
DBQueryExt
*
dbQry_ext
=
query_ext
?
dynamic_cast
<
DBQueryExt
*>
(
query_ext
->
m_DBQueryExt
.
get
())
:
NULL
;
std
::
map
<
std
::
wstring
,
int
>::
iterator
pFind
=
global_info
->
connectionNames
.
find
(
name
);
if
(
pFind
==
global_info
->
connectionNames
.
end
())
{
global_info
->
connectionNames
.
insert
(
std
::
make_pair
(
name
,
1
));
}
else
{
name
=
name
+
L"_"
+
std
::
to_wstring
(
pFind
->
second
);
pFind
->
second
++
;
}
DBQUERYEXT
*
query_ext
=
dynamic_cast
<
DBQUERYEXT
*>
(
m_DBQUERYEXT
.
get
());
DBQueryExt
*
dbQry_ext
=
query_ext
?
dynamic_cast
<
DBQueryExt
*>
(
query_ext
->
m_DBQueryExt
.
get
())
:
NULL
;
Qsi
*
info
=
dynamic_cast
<
Qsi
*>
(
m_Qsi
.
get
());
DConnConnectionWeb
*
webDb
=
dcon
?
dynamic_cast
<
DConnConnectionWeb
*>
(
dcon
->
connection
.
get
())
:
NULL
;
DConnConnectionOleDb
*
oleDb
=
dcon
?
dynamic_cast
<
DConnConnectionOleDb
*>
(
dcon
->
connection
.
get
())
:
NULL
;
...
...
@@ -243,11 +257,12 @@ int DBQUERY::serialize_connection(std::wstring & name)
CP_XML_NODE
(
L"connection"
)
{
CP_XML_ATTR
(
L"id"
,
global_info
->
connectionId
);
CP_XML_ATTR
(
L"name"
,
name
);
if
(
dbQry
->
query
.
dbt
==
5
)
{
CP_XML_ATTR
(
L"keepAlive"
,
1
);
}
CP_XML_ATTR
(
L"name"
,
name
);
if
((
dcon
)
&&
(
!
dcon
->
rgchConnectionDesc
.
strTotal
.
empty
()))
{
...
...
@@ -255,12 +270,15 @@ int DBQUERY::serialize_connection(std::wstring & name)
}
CP_XML_ATTR
(
L"type"
,
dbQry
->
query
.
dbt
);
//background="1"
//saveData="1"
CP_XML_ATTR
(
L"refreshedVersion"
,
2
);
if
(
dbQry
->
query
.
fSavePwd
)
CP_XML_ATTR
(
L"savePassword"
,
1
);
if
(
info
)
{
CP_XML_ATTR
(
L"background"
,
info
->
fAsync
);
CP_XML_ATTR
(
L"saveData"
,
info
->
fSaveData
);
}
CP_XML_ATTR
(
L"refreshedVersion
"
,
1
);
if
(
dbQry
->
query
.
fSavePwd
)
CP_XML_ATTR
(
L"savePassword
"
,
1
);
if
(
dbQry
->
typeRecord
==
1
)
{
...
...
@@ -270,21 +288,30 @@ int DBQUERY::serialize_connection(std::wstring & name)
if
(
dbQry
->
query
.
dbt
==
6
)
{
TxtQry
*
query_txt
=
query_ext
?
dynamic_cast
<
TxtQry
*>
(
query_ext
->
m_TxtQry
.
get
())
:
NULL
;
if
(
query_txt
)
{
CP_XML_NODE
(
L"textPr"
)
{
CP_XML_ATTR
(
L"codePage"
,
1148
);
CP_XML_ATTR
(
L"sourceFile"
,
query_txt
->
rgchFile
.
value
());
//delimited="0"
CP_XML_ATTR
(
L"delimited"
,
query_txt
->
fDelimited
);
wchar_t
v
=
query_txt
->
chDecimal
;
CP_XML_ATTR
(
L"decimal"
,
std
::
wstring
(
&
v
,
1
));
v
=
query_txt
->
chThousSep
;
CP_XML_ATTR
(
L"thousands"
,
std
::
wstring
(
&
v
,
1
));
CP_XML_NODE
(
L"textFields"
)
{
CP_XML_ATTR
(
L"count"
,
query_txt
->
rgtxtwf
.
size
());
for
(
size_t
i
=
0
;
i
<
query_txt
->
rgtxtwf
.
size
();
i
++
)
{
CP_XML_NODE
(
L"textField"
)
{
switch
(
query_txt
->
rgtxtwf
[
i
].
fieldType
)
{
case
0
:
CP_XML_ATTR
(
L"type"
,
L"general"
);
break
;
//
case 0: CP_XML_ATTR(L"type", L"general"); break;
case
1
:
CP_XML_ATTR
(
L"type"
,
L"text"
);
break
;
case
2
:
CP_XML_ATTR
(
L"type"
,
L"MDY"
);
break
;
case
3
:
CP_XML_ATTR
(
L"type"
,
L"DMY"
);
break
;
...
...
@@ -303,7 +330,7 @@ int DBQUERY::serialize_connection(std::wstring & name)
}
}
else
{
{
size_t
index
=
0
;
size_t
commandType
=
1
;
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DBQUERY.h
View file @
d293769c
...
...
@@ -66,6 +66,7 @@ public:
std
::
vector
<
std
::
wstring
>
m_arSXString
;
//------------------------------------------------------
BaseObjectPtr
m_DBQUERYEXT
;
BaseObjectPtr
m_Qsi
;
BaseObjectPtr
m_DConn
;
GlobalWorkbookInfoPtr
global_info
;
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/FEAT11.cpp
View file @
d293769c
...
...
@@ -210,7 +210,7 @@ int FEAT11::serialize(std::wostream & strm, size_t index)
if
(
!
block_level
->
stData
.
value
().
empty
())
CP_XML_ATTR
(
L"dataCellStyle"
,
block_level
->
stData
.
value
());
}
if
(
feature11
->
rgbFeat
.
fAutoFilter
&&
(
filter
||
sort
)
)
if
(
feature11
->
rgbFeat
.
fAutoFilter
)
{
if
(
sort
)
{
...
...
@@ -236,7 +236,7 @@ int FEAT11::serialize(std::wostream & strm, size_t index)
}
}
}
else
else
if
(
filter
)
{
CP_XML_NODE
(
L"autoFilter"
)
{
...
...
@@ -254,6 +254,13 @@ int FEAT11::serialize(std::wostream & strm, size_t index)
}
}
}
else
{
CP_XML_NODE
(
L"autoFilter"
)
{
CP_XML_ATTR
(
L"ref"
,
feature11
->
sqref
);
}
}
}
CP_XML_NODE
(
L"tableColumns"
)
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/PROTECTION_COMMON.cpp
View file @
d293769c
...
...
@@ -92,6 +92,10 @@ int PROTECTION_COMMON::serialize (std::wostream & _stream)
{
CP_XML_NODE
(
L"sheetProtection"
)
{
if
(
password
)
{
CP_XML_ATTR
(
L"password"
,
password
->
wPassword
);
}
if
(
protect
)
{
CP_XML_ATTR
(
L"sheet"
,
(
protect
->
fLock
?
1
:
0
));
...
...
@@ -105,6 +109,7 @@ int PROTECTION_COMMON::serialize (std::wostream & _stream)
CP_XML_ATTR
(
L"scenarios"
,
(
scenario
->
fScenProtect
?
1
:
0
));
}
CP_XML_ATTR
(
L"selectLockedCells"
,
1
);
CP_XML_ATTR
(
L"selectUnlockedCells"
,
1
);
}
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/QUERYTABLE.cpp
View file @
d293769c
...
...
@@ -42,6 +42,8 @@
#include "../Biff_records/DbOrParamQry.h"
#include "../Biff_records/SXString.h"
#include "../../../../../Common/DocxFormat/Source/XML/Utils.h"
namespace
XLS
{
...
...
@@ -107,8 +109,10 @@ int QUERYTABLE::serialize(std::wostream & strm)
if
(
!
query
)
return
-
1
;
std
::
wstring
name
=
info
->
rgchName
.
value
();
query
->
m_DBQUERYEXT
=
m_DBQUERYEXT
;
query
->
m_Qsi
=
m_Qsi
;
int
connectionId
=
query
->
serialize_connection
(
name
);
if
(
connectionId
<
1
)
return
0
;
...
...
@@ -121,16 +125,16 @@ int QUERYTABLE::serialize(std::wostream & strm)
CP_XML_ATTR
(
L"connectionId"
,
connectionId
);
CP_XML_ATTR
(
L"name"
,
name
);
if
(
info
->
fAutoFormat
)
if
(
!
info
->
fAutoFormat
)
{
CP_XML_ATTR
(
L"autoFormatId"
,
info
->
itblAutoFmt
);
}
CP_XML_ATTR
(
L"applyNumberFormats"
,
info
->
fibitAtrNum
);
//0"
CP_XML_ATTR
(
L"applyBorderFormats"
,
info
->
fibitAtrBdr
);
//0"
CP_XML_ATTR
(
L"applyFontFormats"
,
info
->
fibitAtrFnt
);
//1"
CP_XML_ATTR
(
L"applyPatternFormats"
,
info
->
fibitAtrPat
);
//1"
CP_XML_ATTR
(
L"applyAlignmentFormats"
,
info
->
fibitAtrAlc
);
//0"
//CP_XML_ATTR(L"applyWidthHeightFormats", info->);//0"/>
CP_XML_ATTR
(
L"applyNumberFormats"
,
info
->
fibitAtrNum
);
CP_XML_ATTR
(
L"applyBorderFormats"
,
info
->
fibitAtrBdr
);
CP_XML_ATTR
(
L"applyFontFormats"
,
info
->
fibitAtrFnt
);
CP_XML_ATTR
(
L"applyPatternFormats"
,
info
->
fibitAtrPat
);
CP_XML_ATTR
(
L"applyAlignmentFormats"
,
info
->
fibitAtrAlc
);
CP_XML_ATTR
(
L"applyWidthHeightFormats"
,
0
);
}
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/WINDOW.cpp
View file @
d293769c
...
...
@@ -31,11 +31,11 @@
*/
#include "WINDOW.h"
#include
<Logic/Biff_records/Window2.h>
#include
<Logic/Biff_records/PLV.h>
#include
<Logic/Biff_records/Scl.h>
#include
<Logic/Biff_records/Pane.h>
#include
<Logic/Biff_records/Selection.h>
#include
"../Biff_records/Window2.h"
#include
"../Biff_records/PLV.h"
#include
"../Biff_records/Scl.h"
#include
"../Biff_records/Pane.h"
#include
"../Biff_records/Selection.h"
namespace
XLS
{
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/ChartSheetSubstream.cpp
View file @
d293769c
...
...
@@ -1217,7 +1217,7 @@ int ChartSheetSubstream::serialize_ser (std::wstring sNodeSer, std::wostream & _
AI
*
ai
=
dynamic_cast
<
AI
*>
(
ai_
.
get
());
BRAI
*
brai
=
dynamic_cast
<
BRAI
*>
(
ai
->
m_BRAI
.
get
());
std
::
wstring
formula
=
brai
->
formula
.
getAssembledFormula
();
std
::
wstring
formula
=
brai
->
formula
.
getAssembledFormula
(
true
);
int
rt
=
brai
->
rt
;
bool
b
=
brai
->
fUnlinkedIfmt
;
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/CommonSubstream.cpp
View file @
d293769c
...
...
@@ -87,8 +87,6 @@ int CommonSubstream::serialize_format(std::wostream & strm)
SheetExt
*
sheet_ext
=
dynamic_cast
<
SheetExt
*>
(
m_SheetExt
.
get
());
CodeName
*
code_name
=
dynamic_cast
<
CodeName
*>
(
m_CodeName
.
get
());
if
(
!
code_name
||
!
sheet_ext
)
return
0
;
CP_XML_WRITER
(
strm
)
{
CP_XML_NODE
(
L"sheetPr"
)
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/GlobalWorkbookInfo.h
View file @
d293769c
...
...
@@ -166,6 +166,7 @@ public:
std
::
wstringstream
connections_stream
;
int
connectionId
;
std
::
map
<
std
::
wstring
,
int
>
connectionNames
;
XlsConverter
*
xls_converter
;
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/WorksheetSubstream.cpp
View file @
d293769c
...
...
@@ -52,6 +52,8 @@
#include "Biff_records/DefaultRowHeight.h"
#include "Biff_records/Label.h"
#include "Biff_records/List12.h"
#include "Biff_records/PLV.h"
#include "Biff_records/CFEx.h"
#include "Biff_unions/BACKGROUND.h"
#include "Biff_unions/BIGNAME.h"
...
...
@@ -455,6 +457,18 @@ const bool WorksheetSubstream::loadContent(BinProcessor& proc)
count
--
;
}
}
break
;
case
rt_CFEx
:
//Calculadora.xls не в FORMATING
{
count
=
proc
.
repeated
<
CFEx
>
(
0
,
0
);
}
break
;
case
rt_PLV
:
//Calculadora.xls не в FORMATING
{
if
(
proc
.
optional
<
PLV
>
())
{
m_PLV
=
elements_
.
back
();
elements_
.
pop_back
();
}
}
break
;
case
rt_HeaderFooter
:
{
count
=
proc
.
repeated
<
RECORD12
>
(
0
,
0
);
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/WorksheetSubstream.h
View file @
d293769c
...
...
@@ -59,6 +59,7 @@ public:
BaseObjectPtr
m_DxGCol
;
BaseObjectPtr
m_DVAL
;
BaseObjectPtr
m_LRng
;
BaseObjectPtr
m_PLV
;
std
::
vector
<
BaseObjectPtr
>
m_arMergeCells
;
std
::
vector
<
BaseObjectPtr
>
m_arPIVOTVIEW
;
...
...
ASCOfficeXlsFile2/source/XlsXlsxConverter/xlsx_conversion_context.cpp
View file @
d293769c
...
...
@@ -229,9 +229,15 @@ void xlsx_conversion_context::add_query_table (const std::wstring & query_table)
{
if
(
query_table
.
empty
())
return
;
std
::
wstring
rid
=
L"qtId"
+
std
::
to_wstring
(
query_tables_
.
size
()
+
1
);
std
::
wstring
target
=
L"queryTable"
+
std
::
to_wstring
(
query_tables_
.
size
()
+
1
)
+
L".xml"
;
query_tables_
.
insert
(
std
::
make_pair
(
target
,
query_table
));
current_sheet
().
sheet_rels
().
add
(
oox
::
relationship
(
rid
,
L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/queryTable"
,
L"../queryTables/"
+
target
));
}
void
xlsx_conversion_context
::
add_control_props
(
const
std
::
wstring
&
target
,
const
std
::
wstring
&
props
)
...
...
ASCOfficeXlsFile2/source/XlsXlsxConverter/xlsx_drawing_context.cpp
View file @
d293769c
...
...
@@ -550,33 +550,33 @@ void xlsx_drawing_context::end_group()
{
if
(
current_level
<
1
)
return
;
std
::
vector
<
_drawing_state_ptr
>*
cur_states
=
NULL
;
for
(
size_t
i
=
0
;
i
<
current_drawing_states
->
size
();
i
++
)
{
if
(
!
current_drawing_states
->
empty
())
{
int
level
=
current_level
;
cur_states
=
current_drawing_states
;
while
(
level
>
0
)
{
_drawing_state_ptr
&
drawing_state
=
cur_states
->
front
();
if
(
i
!=
0
||
level
!=
current_level
)
// группа сама себя
{
double
kf_x
=
(
double
)
drawing_state
->
child_anchor
.
cx
/
drawing_state
->
group_anchor
.
cx
;
double
kf_y
=
(
double
)
drawing_state
->
child_anchor
.
cy
/
drawing_state
->
group_anchor
.
cy
;
current_drawing_states
->
at
(
i
)
->
child_anchor
.
cx
*=
kf_x
;
current_drawing_states
->
at
(
i
)
->
child_anchor
.
cy
*=
kf_y
;
current_drawing_states
->
at
(
i
)
->
child_anchor
.
x
=
current_drawing_states
->
at
(
i
)
->
child_anchor
.
x
*
kf_x
+
drawing_state
->
child_anchor
.
x
;
current_drawing_states
->
at
(
i
)
->
child_anchor
.
y
=
current_drawing_states
->
at
(
i
)
->
child_anchor
.
y
*
kf_y
+
drawing_state
->
child_anchor
.
y
;
}
level
--
;
cur_states
=
cur_states
->
front
()
->
parent_drawing_states
;
}
}
}
//
std::vector<_drawing_state_ptr>* cur_states = NULL;
//
for (size_t i = 0; i < current_drawing_states->size(); i++)
//
{
//
if (!current_drawing_states->empty())
//
{
//
int level = current_level;
//
cur_states = current_drawing_states;
//
while (level > 0)
//
{
//
_drawing_state_ptr & drawing_state = cur_states->front();
//
if (i != 0 || level != current_level) // группа сама себя
//
{
//
double kf_x = (double)drawing_state->child_anchor.cx / drawing_state->group_anchor.cx;
//
double kf_y = (double)drawing_state->child_anchor.cy / drawing_state->group_anchor.cy;
//
current_drawing_states->at(i)->child_anchor.cx *= kf_x;
//
current_drawing_states->at(i)->child_anchor.cy *= kf_y;
//
//
current_drawing_states->at(i)->child_anchor.x = current_drawing_states->at(i)->child_anchor.x * kf_x + drawing_state->child_anchor.x;
//
current_drawing_states->at(i)->child_anchor.y = current_drawing_states->at(i)->child_anchor.y * kf_y + drawing_state->child_anchor.y;
//
}
//
level--;
//
cur_states = cur_states->front()->parent_drawing_states;
//
}
//
}
//
}
serialize_group
();
current_drawing_states
=
current_drawing_states
->
front
()
->
parent_drawing_states
;
...
...
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