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
72ac11ac
Commit
72ac11ac
authored
May 04, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 34901
parent
f70ea2b7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
25 deletions
+29
-25
ASCOfficeDocxFile2/BinWriter/BinWriters.h
ASCOfficeDocxFile2/BinWriter/BinWriters.h
+14
-12
ASCOfficePPTXFile/PPTXFormat/Logic/ClrMap.h
ASCOfficePPTXFile/PPTXFormat/Logic/ClrMap.h
+15
-13
No files found.
ASCOfficeDocxFile2/BinWriter/BinWriters.h
View file @
72ac11ac
...
...
@@ -7196,6 +7196,8 @@ namespace BinDocxRW
}
void
WriteColorSchemeMapping
(
const
PPTX
::
Logic
::
ClrMap
&
oColorSchemeMapping
)
{
int
re_index
[]
=
{
0
,
1
,
2
,
3
,
4
,
5
,
10
,
11
,
6
,
7
,
8
,
9
,
10
,
6
,
7
};
int
nCurPos
=
0
;
std
::
map
<
std
::
wstring
,
PPTX
::
Limit
::
ColorSchemeIndex
>::
const_iterator
pFind
;
...
...
@@ -7204,84 +7206,84 @@ namespace BinDocxRW
{
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSer_ClrSchemeMappingType
::
Accent1
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerPropLenType
::
Byte
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
pFind
->
second
.
GetBYTECode
()
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
re_index
[
pFind
->
second
.
GetBYTECode
()]
);
}
pFind
=
oColorSchemeMapping
.
ColorMap
.
find
(
L"accent2"
);
if
(
pFind
!=
oColorSchemeMapping
.
ColorMap
.
end
())
{
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSer_ClrSchemeMappingType
::
Accent2
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerPropLenType
::
Byte
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
pFind
->
second
.
GetBYTECode
()
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
re_index
[
pFind
->
second
.
GetBYTECode
()]
);
}
pFind
=
oColorSchemeMapping
.
ColorMap
.
find
(
L"accent3"
);
if
(
pFind
!=
oColorSchemeMapping
.
ColorMap
.
end
())
{
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSer_ClrSchemeMappingType
::
Accent3
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerPropLenType
::
Byte
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
pFind
->
second
.
GetBYTECode
()
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
re_index
[
pFind
->
second
.
GetBYTECode
()]
);
}
pFind
=
oColorSchemeMapping
.
ColorMap
.
find
(
L"accent4"
);
if
(
pFind
!=
oColorSchemeMapping
.
ColorMap
.
end
())
{
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSer_ClrSchemeMappingType
::
Accent4
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerPropLenType
::
Byte
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
pFind
->
second
.
GetBYTECode
()
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
re_index
[
pFind
->
second
.
GetBYTECode
()]
);
}
pFind
=
oColorSchemeMapping
.
ColorMap
.
find
(
L"accent5"
);
if
(
pFind
!=
oColorSchemeMapping
.
ColorMap
.
end
())
{
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSer_ClrSchemeMappingType
::
Accent5
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerPropLenType
::
Byte
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
pFind
->
second
.
GetBYTECode
()
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
re_index
[
pFind
->
second
.
GetBYTECode
()]
);
}
pFind
=
oColorSchemeMapping
.
ColorMap
.
find
(
L"accent6"
);
if
(
pFind
!=
oColorSchemeMapping
.
ColorMap
.
end
())
{
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSer_ClrSchemeMappingType
::
Accent6
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerPropLenType
::
Byte
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
pFind
->
second
.
GetBYTECode
()
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
re_index
[
pFind
->
second
.
GetBYTECode
()]
);
}
pFind
=
oColorSchemeMapping
.
ColorMap
.
find
(
L"bg1"
);
if
(
pFind
!=
oColorSchemeMapping
.
ColorMap
.
end
())
{
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSer_ClrSchemeMappingType
::
Bg1
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerPropLenType
::
Byte
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
pFind
->
second
.
GetBYTECode
()
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
re_index
[
pFind
->
second
.
GetBYTECode
()]
);
}
pFind
=
oColorSchemeMapping
.
ColorMap
.
find
(
L"bg2"
);
if
(
pFind
!=
oColorSchemeMapping
.
ColorMap
.
end
())
{
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSer_ClrSchemeMappingType
::
Bg2
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerPropLenType
::
Byte
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
pFind
->
second
.
GetBYTECode
()
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
re_index
[
pFind
->
second
.
GetBYTECode
()]
);
}
pFind
=
oColorSchemeMapping
.
ColorMap
.
find
(
L"folHlink"
);
if
(
pFind
!=
oColorSchemeMapping
.
ColorMap
.
end
())
{
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSer_ClrSchemeMappingType
::
FollowedHyperlink
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerPropLenType
::
Byte
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
pFind
->
second
.
GetBYTECode
()
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
re_index
[
pFind
->
second
.
GetBYTECode
()]
);
}
pFind
=
oColorSchemeMapping
.
ColorMap
.
find
(
L"hlink"
);
if
(
pFind
!=
oColorSchemeMapping
.
ColorMap
.
end
())
{
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSer_ClrSchemeMappingType
::
Hyperlink
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerPropLenType
::
Byte
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
pFind
->
second
.
GetBYTECode
()
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
re_index
[
pFind
->
second
.
GetBYTECode
()]
);
}
pFind
=
oColorSchemeMapping
.
ColorMap
.
find
(
L"tx1"
);
if
(
pFind
!=
oColorSchemeMapping
.
ColorMap
.
end
())
{
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSer_ClrSchemeMappingType
::
T1
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerPropLenType
::
Byte
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
pFind
->
second
.
GetBYTECode
()
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
re_index
[
pFind
->
second
.
GetBYTECode
()]
);
}
pFind
=
oColorSchemeMapping
.
ColorMap
.
find
(
L"tx2"
);
if
(
pFind
!=
oColorSchemeMapping
.
ColorMap
.
end
())
{
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSer_ClrSchemeMappingType
::
T2
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerPropLenType
::
Byte
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
pFind
->
second
.
GetBYTECode
()
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
re_index
[
pFind
->
second
.
GetBYTECode
()]
);
}
};
};
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/ClrMap.h
View file @
72ac11ac
...
...
@@ -145,19 +145,21 @@ namespace PPTX
lColorIndex
.
_set
(
node
.
GetAttribute
(
_T
(
"w:followedHyperlink"
)));
ColorMap
.
insert
(
std
::
pair
<
std
::
wstring
,
Limit
::
ColorSchemeIndex
>
(
_T
(
"folHlink"
),
lColorIndex
));
lColorIndex
.
_set
(
node
.
GetAttribute
(
_T
(
"w:hyperlink"
)));
ColorMap
.
insert
(
std
::
pair
<
std
::
wstring
,
Limit
::
ColorSchemeIndex
>
(
_T
(
"hlink"
),
lColorIndex
));
}
lColorIndex
.
_set
(
node
.
GetAttribute
(
_T
(
"accent1"
)));
ColorMap
.
insert
(
std
::
pair
<
std
::
wstring
,
Limit
::
ColorSchemeIndex
>
(
_T
(
"accent1"
),
lColorIndex
));
lColorIndex
.
_set
(
node
.
GetAttribute
(
_T
(
"accent2"
)));
ColorMap
.
insert
(
std
::
pair
<
std
::
wstring
,
Limit
::
ColorSchemeIndex
>
(
_T
(
"accent2"
),
lColorIndex
));
lColorIndex
.
_set
(
node
.
GetAttribute
(
_T
(
"accent3"
)));
ColorMap
.
insert
(
std
::
pair
<
std
::
wstring
,
Limit
::
ColorSchemeIndex
>
(
_T
(
"accent3"
),
lColorIndex
));
lColorIndex
.
_set
(
node
.
GetAttribute
(
_T
(
"accent4"
)));
ColorMap
.
insert
(
std
::
pair
<
std
::
wstring
,
Limit
::
ColorSchemeIndex
>
(
_T
(
"accent4"
),
lColorIndex
));
lColorIndex
.
_set
(
node
.
GetAttribute
(
_T
(
"accent5"
)));
ColorMap
.
insert
(
std
::
pair
<
std
::
wstring
,
Limit
::
ColorSchemeIndex
>
(
_T
(
"accent5"
),
lColorIndex
));
lColorIndex
.
_set
(
node
.
GetAttribute
(
_T
(
"accent6"
)));
ColorMap
.
insert
(
std
::
pair
<
std
::
wstring
,
Limit
::
ColorSchemeIndex
>
(
_T
(
"accent6"
),
lColorIndex
));
lColorIndex
.
_set
(
node
.
GetAttribute
(
_T
(
"bg1"
)));
ColorMap
.
insert
(
std
::
pair
<
std
::
wstring
,
Limit
::
ColorSchemeIndex
>
(
_T
(
"bg1"
),
lColorIndex
));
lColorIndex
.
_set
(
node
.
GetAttribute
(
_T
(
"bg2"
)));
ColorMap
.
insert
(
std
::
pair
<
std
::
wstring
,
Limit
::
ColorSchemeIndex
>
(
_T
(
"bg2"
),
lColorIndex
));
lColorIndex
.
_set
(
node
.
GetAttribute
(
_T
(
"tx1"
)));
ColorMap
.
insert
(
std
::
pair
<
std
::
wstring
,
Limit
::
ColorSchemeIndex
>
(
_T
(
"tx1"
),
lColorIndex
));
lColorIndex
.
_set
(
node
.
GetAttribute
(
_T
(
"tx2"
)));
ColorMap
.
insert
(
std
::
pair
<
std
::
wstring
,
Limit
::
ColorSchemeIndex
>
(
_T
(
"tx2"
),
lColorIndex
));
lColorIndex
.
_set
(
node
.
GetAttribute
(
_T
(
"folHlink"
)));
ColorMap
.
insert
(
std
::
pair
<
std
::
wstring
,
Limit
::
ColorSchemeIndex
>
(
_T
(
"folHlink"
),
lColorIndex
));
lColorIndex
.
_set
(
node
.
GetAttribute
(
_T
(
"hlink"
)));
ColorMap
.
insert
(
std
::
pair
<
std
::
wstring
,
Limit
::
ColorSchemeIndex
>
(
_T
(
"hlink"
),
lColorIndex
));
else
{
lColorIndex
.
_set
(
node
.
GetAttribute
(
_T
(
"accent1"
)));
ColorMap
.
insert
(
std
::
pair
<
std
::
wstring
,
Limit
::
ColorSchemeIndex
>
(
_T
(
"accent1"
),
lColorIndex
));
lColorIndex
.
_set
(
node
.
GetAttribute
(
_T
(
"accent2"
)));
ColorMap
.
insert
(
std
::
pair
<
std
::
wstring
,
Limit
::
ColorSchemeIndex
>
(
_T
(
"accent2"
),
lColorIndex
));
lColorIndex
.
_set
(
node
.
GetAttribute
(
_T
(
"accent3"
)));
ColorMap
.
insert
(
std
::
pair
<
std
::
wstring
,
Limit
::
ColorSchemeIndex
>
(
_T
(
"accent3"
),
lColorIndex
));
lColorIndex
.
_set
(
node
.
GetAttribute
(
_T
(
"accent4"
)));
ColorMap
.
insert
(
std
::
pair
<
std
::
wstring
,
Limit
::
ColorSchemeIndex
>
(
_T
(
"accent4"
),
lColorIndex
));
lColorIndex
.
_set
(
node
.
GetAttribute
(
_T
(
"accent5"
)));
ColorMap
.
insert
(
std
::
pair
<
std
::
wstring
,
Limit
::
ColorSchemeIndex
>
(
_T
(
"accent5"
),
lColorIndex
));
lColorIndex
.
_set
(
node
.
GetAttribute
(
_T
(
"accent6"
)));
ColorMap
.
insert
(
std
::
pair
<
std
::
wstring
,
Limit
::
ColorSchemeIndex
>
(
_T
(
"accent6"
),
lColorIndex
));
lColorIndex
.
_set
(
node
.
GetAttribute
(
_T
(
"bg1"
)));
ColorMap
.
insert
(
std
::
pair
<
std
::
wstring
,
Limit
::
ColorSchemeIndex
>
(
_T
(
"bg1"
),
lColorIndex
));
lColorIndex
.
_set
(
node
.
GetAttribute
(
_T
(
"bg2"
)));
ColorMap
.
insert
(
std
::
pair
<
std
::
wstring
,
Limit
::
ColorSchemeIndex
>
(
_T
(
"bg2"
),
lColorIndex
));
lColorIndex
.
_set
(
node
.
GetAttribute
(
_T
(
"tx1"
)));
ColorMap
.
insert
(
std
::
pair
<
std
::
wstring
,
Limit
::
ColorSchemeIndex
>
(
_T
(
"tx1"
),
lColorIndex
));
lColorIndex
.
_set
(
node
.
GetAttribute
(
_T
(
"tx2"
)));
ColorMap
.
insert
(
std
::
pair
<
std
::
wstring
,
Limit
::
ColorSchemeIndex
>
(
_T
(
"tx2"
),
lColorIndex
));
lColorIndex
.
_set
(
node
.
GetAttribute
(
_T
(
"folHlink"
)));
ColorMap
.
insert
(
std
::
pair
<
std
::
wstring
,
Limit
::
ColorSchemeIndex
>
(
_T
(
"folHlink"
),
lColorIndex
));
lColorIndex
.
_set
(
node
.
GetAttribute
(
_T
(
"hlink"
)));
ColorMap
.
insert
(
std
::
pair
<
std
::
wstring
,
Limit
::
ColorSchemeIndex
>
(
_T
(
"hlink"
),
lColorIndex
));
}
}
virtual
std
::
wstring
toXML
()
const
...
...
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