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
dce58b62
Commit
dce58b62
authored
Nov 21, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug #36322
parent
bae85402
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
36 deletions
+41
-36
ASCOfficeDocFile/DocDocxConverter/IVisitable.h
ASCOfficeDocFile/DocDocxConverter/IVisitable.h
+2
-0
ASCOfficeDocFile/DocDocxConverter/PropertiesMapping.cpp
ASCOfficeDocFile/DocDocxConverter/PropertiesMapping.cpp
+34
-31
ASCOfficeDocFile/DocDocxConverter/ShadingDescriptor.h
ASCOfficeDocFile/DocDocxConverter/ShadingDescriptor.h
+4
-4
ASCOfficeDocFile/DocDocxConverter/TableCellPropertiesMapping.cpp
...ceDocFile/DocDocxConverter/TableCellPropertiesMapping.cpp
+1
-1
No files found.
ASCOfficeDocFile/DocDocxConverter/IVisitable.h
View file @
dce58b62
...
@@ -33,6 +33,8 @@
...
@@ -33,6 +33,8 @@
#include "IMapping.h"
#include "IMapping.h"
#define GETBITS(from, numL, numH) ((from & (((1 << (numH - numL + 1)) - 1) << numL)) >> numL)
namespace
DocFileFormat
namespace
DocFileFormat
{
{
class
IVisitable
class
IVisitable
...
...
ASCOfficeDocFile/DocDocxConverter/PropertiesMapping.cpp
View file @
dce58b62
...
@@ -462,10 +462,18 @@ namespace DocFileFormat
...
@@ -462,10 +462,18 @@ namespace DocFileFormat
void
PropertiesMapping
::
appendShading
(
XMLTools
::
XMLElement
*
parent
,
const
ShadingDescriptor
&
desc
)
void
PropertiesMapping
::
appendShading
(
XMLTools
::
XMLElement
*
parent
,
const
ShadingDescriptor
&
desc
)
{
{
std
::
wstring
pattern
=
getShadingPattern
(
desc
);
if
(
(
parent
!=
NULL
)
&&
(
desc
.
shadingSpecialValue
==
shadingSpecialValueNormal
))
if
(
(
parent
!=
NULL
)
&&
(
desc
.
shadingSpecialValue
==
shadingSpecialValueNormal
))
{
{
XMLTools
::
XMLElement
shd
(
L"w:shd"
);
XMLTools
::
XMLElement
shd
(
L"w:shd"
);
//pattern
XMLTools
::
XMLAttribute
val
(
L"w:val"
);
val
.
SetValue
(
pattern
);
shd
.
AppendAttribute
(
val
);
if
(
pattern
!=
L"nil"
)
{
//fill color
//fill color
XMLTools
::
XMLAttribute
fill
(
L"w:fill"
);
XMLTools
::
XMLAttribute
fill
(
L"w:fill"
);
...
@@ -507,12 +515,7 @@ namespace DocFileFormat
...
@@ -507,12 +515,7 @@ namespace DocFileFormat
}
}
shd
.
AppendAttribute
(
color
);
shd
.
AppendAttribute
(
color
);
}
//pattern
XMLTools
::
XMLAttribute
val
(
L"w:val"
);
val
.
SetValue
(
getShadingPattern
(
desc
));
shd
.
AppendAttribute
(
val
);
parent
->
RemoveChildByName
(
L"w:shd"
);
parent
->
RemoveChildByName
(
L"w:shd"
);
parent
->
AppendChild
(
shd
);
parent
->
AppendChild
(
shd
);
}
}
...
...
ASCOfficeDocFile/DocDocxConverter/ShadingDescriptor.h
View file @
dce58b62
...
@@ -174,9 +174,9 @@ namespace DocFileFormat
...
@@ -174,9 +174,9 @@ namespace DocFileFormat
//it's a Word 97 SPRM
//it's a Word 97 SPRM
short
val
=
FormatUtils
::
BytesToInt16
(
bytes
,
0
,
size
);
short
val
=
FormatUtils
::
BytesToInt16
(
bytes
,
0
,
size
);
icoFore
=
(
val
&
0x1F
);
icoFore
=
GETBITS
(
val
,
0
,
4
);
icoBack
=
((
val
>>
5
)
&
0x1F
);
icoBack
=
GETBITS
(
val
,
5
,
9
);
ipat
=
(
ShadingPattern
)
((
val
>>
10
)
&
0x3F
);
ipat
=
(
ShadingPattern
)
GETBITS
(
val
,
10
,
15
);
shadingType
=
shadingTypeShd80
;
shadingType
=
shadingTypeShd80
;
...
@@ -209,7 +209,7 @@ namespace DocFileFormat
...
@@ -209,7 +209,7 @@ namespace DocFileFormat
else
if
(
0x0F
==
icoFore
)
{
cvFore
=
RGB2
(
0x80
,
0x80
,
0x80
);
}
else
if
(
0x0F
==
icoFore
)
{
cvFore
=
RGB2
(
0x80
,
0x80
,
0x80
);
}
else
if
(
0x10
==
icoFore
)
{
cvFore
=
RGB2
(
0xC0
,
0xC0
,
0xC0
);
}
else
if
(
0x10
==
icoFore
)
{
cvFore
=
RGB2
(
0xC0
,
0xC0
,
0xC0
);
}
if
(
0x00
==
icoBack
)
{
cvBack
=
RGB2
(
0x
00
,
0x00
,
0x00
);
cvBackAuto
=
true
;
}
if
(
0x00
==
icoBack
)
{
cvBack
=
RGB2
(
0x
FF
,
0xFF
,
0xFF
);
cvBackAuto
=
true
;
}
else
if
(
0x01
==
icoBack
)
{
cvBack
=
RGB2
(
0x00
,
0x00
,
0x00
);
}
else
if
(
0x01
==
icoBack
)
{
cvBack
=
RGB2
(
0x00
,
0x00
,
0x00
);
}
else
if
(
0x02
==
icoBack
)
{
cvBack
=
RGB2
(
0x00
,
0x00
,
0xFF
);
}
else
if
(
0x02
==
icoBack
)
{
cvBack
=
RGB2
(
0x00
,
0x00
,
0xFF
);
}
else
if
(
0x03
==
icoBack
)
{
cvBack
=
RGB2
(
0x00
,
0xFF
,
0xFF
);
}
else
if
(
0x03
==
icoBack
)
{
cvBack
=
RGB2
(
0x00
,
0xFF
,
0xFF
);
}
...
...
ASCOfficeDocFile/DocDocxConverter/TableCellPropertiesMapping.cpp
View file @
dce58b62
...
@@ -349,7 +349,7 @@ namespace DocFileFormat
...
@@ -349,7 +349,7 @@ namespace DocFileFormat
void
TableCellPropertiesMapping
::
apppendCellShading
(
unsigned
char
*
sprmArg
,
int
size
,
int
cellIndex
)
void
TableCellPropertiesMapping
::
apppendCellShading
(
unsigned
char
*
sprmArg
,
int
size
,
int
cellIndex
)
{
{
if
(
sprmArg
)
if
(
sprmArg
&&
cellIndex
>=
0
)
{
{
//shading descriptor can have 10 bytes (Word 2000) or 2 bytes (Word 97)
//shading descriptor can have 10 bytes (Word 2000) or 2 bytes (Word 97)
int
shdLength
=
2
;
int
shdLength
=
2
;
...
...
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