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
4e8097c9
Commit
4e8097c9
authored
Apr 26, 2017
by
Sergey Konovalov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pivotButton; AddNoWrite defDir
parent
65254b57
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
10 deletions
+33
-10
Common/DocxFormat/Source/DocxFormat/IFileContainer.cpp
Common/DocxFormat/Source/DocxFormat/IFileContainer.cpp
+16
-6
Common/DocxFormat/Source/DocxFormat/IFileContainer.h
Common/DocxFormat/Source/DocxFormat/IFileContainer.h
+3
-3
Common/DocxFormat/Source/XlsxFormat/Styles/Xfs.h
Common/DocxFormat/Source/XlsxFormat/Styles/Xfs.h
+1
-0
XlsxSerializerCom/Reader/BinaryWriter.h
XlsxSerializerCom/Reader/BinaryWriter.h
+7
-0
XlsxSerializerCom/Writer/BinaryReader.h
XlsxSerializerCom/Writer/BinaryReader.h
+6
-1
No files found.
Common/DocxFormat/Source/DocxFormat/IFileContainer.cpp
View file @
4e8097c9
...
...
@@ -110,10 +110,15 @@ namespace OOX
OOX
::
CPath
oName
=
pFile
->
DefaultFileName
();
if
(
false
==
pFile
->
m_sOutputFilename
.
empty
())
oName
.
SetName
(
pFile
->
m_sOutputFilename
,
false
);
if
(
m_mNoWriteContainer
.
end
()
==
m_mNoWriteContainer
.
find
(
pPair
->
first
))
std
::
map
<
std
::
wstring
,
std
::
wstring
>::
const_iterator
itFind
=
m_mNoWriteContainer
.
find
(
pPair
->
first
);
if
(
m_mNoWriteContainer
.
end
()
==
itFind
)
{
OOX
::
CSystemUtility
::
CreateDirectories
(
oCurrent
/
oDefDir
);
pFile
->
write
(
oCurrent
/
oDefDir
/
oName
,
oDir
/
oDefDir
,
oContent
);
}
else
if
(
itFind
->
second
.
length
()
>
0
)
{
oDefDir
=
itFind
->
second
;
}
if
(
true
!=
pFile
->
m_bDoNotAddRels
)
{
...
...
@@ -189,7 +194,8 @@ namespace OOX
mNamepair
[
oName
.
m_strFilename
]
=
1
;
else
oName
=
oName
+
pNamePair
->
first
;
if
(
m_mNoWriteContainer
.
end
()
==
m_mNoWriteContainer
.
find
(
it
->
first
))
std
::
map
<
std
::
wstring
,
std
::
wstring
>::
const_iterator
itFind
=
m_mNoWriteContainer
.
find
(
it
->
first
);
if
(
m_mNoWriteContainer
.
end
()
==
itFind
)
{
OOX
::
CSystemUtility
::
CreateDirectories
(
oCurrent
/
oDefDir
);
smart_ptr
<
OOX
::
IFileBuilder
>
pFileBuilder
=
pFile
.
smart_dynamic_cast
<
OOX
::
IFileBuilder
>
();
...
...
@@ -202,6 +208,10 @@ namespace OOX
pFile
->
write
(
oCurrent
/
oDefDir
/
oName
,
oDir
/
oDefDir
,
oContent
);
}
}
else
if
(
itFind
->
second
.
length
()
>
0
)
{
oDefDir
=
itFind
->
second
;
}
oRels
.
Registration
(
it
->
first
,
pFile
->
type
(),
oDefDir
/
oName
);
}
...
...
@@ -390,18 +400,18 @@ namespace OOX
m_mContainer
[
rId
.
get
()]
=
pFile
;
}
const
RId
IFileContainer
::
AddNoWrite
(
const
smart_ptr
<
OOX
::
File
>&
pFile
)
const
RId
IFileContainer
::
AddNoWrite
(
const
smart_ptr
<
OOX
::
File
>&
pFile
,
const
std
::
wstring
&
oDefDir
)
{
const
RId
rId
=
GetMaxRId
().
next
();
AddNoWrite
(
rId
,
pFile
);
AddNoWrite
(
rId
,
pFile
,
oDefDir
);
return
rId
;
}
void
IFileContainer
::
AddNoWrite
(
const
OOX
::
RId
&
rId
,
const
smart_ptr
<
OOX
::
File
>&
pFile
)
void
IFileContainer
::
AddNoWrite
(
const
OOX
::
RId
&
rId
,
const
smart_ptr
<
OOX
::
File
>&
pFile
,
const
std
::
wstring
&
oDefDir
)
{
m_lMaxRid
=
(
std
::
max
)(
m_lMaxRid
,
rId
.
getNumber
()
);
m_mContainer
[
rId
.
get
()]
=
pFile
;
m_mNoWriteContainer
[
rId
.
get
()]
=
true
;
m_mNoWriteContainer
[
rId
.
get
()]
=
oDefDir
;
}
smart_ptr
<
OOX
::
File
>
IFileContainer
::
Find
(
const
FileType
&
oType
)
const
...
...
Common/DocxFormat/Source/DocxFormat/IFileContainer.h
View file @
4e8097c9
...
...
@@ -67,7 +67,7 @@ namespace OOX
static
std
::
map
<
std
::
wstring
,
size_t
>
m_mapEnumeratedGlobal
;
protected:
std
::
map
<
std
::
wstring
,
smart_ptr
<
OOX
::
File
>>
m_mContainer
;
std
::
map
<
std
::
wstring
,
bool
>
m_mNoWriteContainer
;
std
::
map
<
std
::
wstring
,
std
::
wstring
>
m_mNoWriteContainer
;
size_t
m_lMaxRid
;
void
Read
(
const
OOX
::
CRels
&
oRels
,
const
OOX
::
CPath
&
oRootPath
,
const
CPath
&
oPath
);
...
...
@@ -104,8 +104,8 @@ namespace OOX
const
RId
Add
(
smart_ptr
<
OOX
::
File
>&
pFile
);
void
Add
(
const
OOX
::
RId
&
rId
,
smart_ptr
<
OOX
::
File
>&
pFile
);
const
RId
AddNoWrite
(
const
smart_ptr
<
OOX
::
File
>&
pFile
);
void
AddNoWrite
(
const
OOX
::
RId
&
rId
,
const
smart_ptr
<
OOX
::
File
>&
pFile
);
const
RId
AddNoWrite
(
const
smart_ptr
<
OOX
::
File
>&
pFile
,
const
std
::
wstring
&
oDefDir
);
void
AddNoWrite
(
const
OOX
::
RId
&
rId
,
const
smart_ptr
<
OOX
::
File
>&
pFile
,
const
std
::
wstring
&
oDefDir
);
template
<
typename
T
>
T
&
Find
();
...
...
Common/DocxFormat/Source/XlsxFormat/Styles/Xfs.h
View file @
4e8097c9
...
...
@@ -198,6 +198,7 @@ namespace OOX
WritingStringNullableAttrBool
(
L"applyBorder"
,
m_oApplyBorder
);
WritingStringNullableAttrBool
(
L"applyAlignment"
,
m_oApplyAlignment
);
WritingStringNullableAttrBool
(
L"quotePrefix"
,
m_oQuotePrefix
);
WritingStringNullableAttrBool
(
L"pivotButton"
,
m_oPivotButton
);
if
(
m_oAligment
.
IsInit
())
{
writer
.
WriteString
(
_T
(
">"
));
...
...
XlsxSerializerCom/Reader/BinaryWriter.h
View file @
4e8097c9
...
...
@@ -863,6 +863,13 @@ namespace BinXlsxRW
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerPropLenType
::
Byte
);
m_oBcw
.
m_oStream
.
WriteBOOL
(
xfs
.
m_oQuotePrefix
->
ToBool
());
}
//PivotButton
if
(
false
!=
xfs
.
m_oPivotButton
.
IsInit
())
{
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerXfsTypes
::
PivotButton
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerPropLenType
::
Byte
);
m_oBcw
.
m_oStream
.
WriteBOOL
(
xfs
.
m_oPivotButton
->
ToBool
());
}
//XfId
if
(
false
!=
xfs
.
m_oXfId
.
IsInit
())
{
...
...
XlsxSerializerCom/Writer/BinaryReader.h
View file @
4e8097c9
...
...
@@ -1233,6 +1233,11 @@ namespace BinXlsxRW {
pXfs
->
m_oQuotePrefix
.
Init
();
pXfs
->
m_oQuotePrefix
->
SetValue
(
false
!=
m_oBufferedStream
.
GetBool
()
?
SimpleTypes
::
onoffTrue
:
SimpleTypes
::
onoffFalse
);
}
else
if
(
c_oSerXfsTypes
::
PivotButton
==
type
)
{
pXfs
->
m_oPivotButton
.
Init
();
pXfs
->
m_oPivotButton
->
SetValue
(
false
!=
m_oBufferedStream
.
GetBool
()
?
SimpleTypes
::
onoffTrue
:
SimpleTypes
::
onoffFalse
);
}
else
if
(
c_oSerXfsTypes
::
Aligment
==
type
)
{
pXfs
->
m_oAligment
.
Init
();
...
...
@@ -2208,7 +2213,7 @@ namespace BinXlsxRW {
if
(
m_mapPivotCacheDefinitions
.
end
()
!=
pair
&&
NULL
!=
oPivotCachesTemp
.
pTable
)
{
NSCommon
::
smart_ptr
<
OOX
::
File
>
pFileTable
(
oPivotCachesTemp
.
pTable
);
oPivotCachesTemp
.
pTable
->
AddNoWrite
(
pair
->
second
);
oPivotCachesTemp
.
pTable
->
AddNoWrite
(
pair
->
second
,
L"../pivotCache"
);
m_pCurWorksheet
->
Add
(
pFileTable
);
}
else
...
...
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