Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
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
sdkjs
Commits
9ccb17e4
Commit
9ccb17e4
authored
May 24, 2016
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 32443 - [Copy&Paste] Таблица теряет стилевые настройки при вставки из CSE
parent
0bffd58f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
11 deletions
+20
-11
common/wordcopypaste.js
common/wordcopypaste.js
+20
-11
No files found.
common/wordcopypaste.js
View file @
9ccb17e4
...
@@ -6003,7 +6003,7 @@ PasteProcessor.prototype =
...
@@ -6003,7 +6003,7 @@ PasteProcessor.prototype =
this
.
aContent
.
push
(
table
);
this
.
aContent
.
push
(
table
);
}
}
},
},
_ExecuteBorder
:
function
(
computedStyle
,
node
,
type
,
type2
,
bAddIfNull
)
_ExecuteBorder
:
function
(
computedStyle
,
node
,
type
,
type2
,
bAddIfNull
,
setUnifill
)
{
{
var
res
=
null
;
var
res
=
null
;
var
style
=
computedStyle
.
getPropertyValue
(
"
border-
"
+
type
+
"
-style
"
);
var
style
=
computedStyle
.
getPropertyValue
(
"
border-
"
+
type
+
"
-style
"
);
...
@@ -6022,7 +6022,16 @@ PasteProcessor.prototype =
...
@@ -6022,7 +6022,16 @@ PasteProcessor.prototype =
res
.
Size
=
width
;
res
.
Size
=
width
;
var
color
=
computedStyle
.
getPropertyValue
(
"
border-
"
+
type
+
"
-color
"
);
var
color
=
computedStyle
.
getPropertyValue
(
"
border-
"
+
type
+
"
-color
"
);
if
(
null
!=
color
&&
(
color
=
this
.
_ParseColor
(
color
)))
if
(
null
!=
color
&&
(
color
=
this
.
_ParseColor
(
color
)))
res
.
Color
=
color
;
{
if
(
setUnifill
&&
color
)
{
res
.
Unifill
=
AscFormat
.
CreteSolidFillRGB
(
color
.
r
,
color
.
g
,
color
.
b
);
}
else
{
res
.
Color
=
color
;
}
}
}
}
}
}
if
(
bAddIfNull
&&
null
==
res
)
if
(
bAddIfNull
&&
null
==
res
)
...
@@ -7393,16 +7402,16 @@ PasteProcessor.prototype =
...
@@ -7393,16 +7402,16 @@ PasteProcessor.prototype =
var
background_color
=
computedStyle
.
getPropertyValue
(
"
background-color
"
);
var
background_color
=
computedStyle
.
getPropertyValue
(
"
background-color
"
);
if
(
null
!=
background_color
&&
(
background_color
=
this
.
_ParseColor
(
background_color
)))
if
(
null
!=
background_color
&&
(
background_color
=
this
.
_ParseColor
(
background_color
)))
table
.
Set_TableShd
(
c_oAscShdClear
,
background_color
.
r
,
background_color
.
g
,
background_color
.
b
);
table
.
Set_TableShd
(
c_oAscShdClear
,
background_color
.
r
,
background_color
.
g
,
background_color
.
b
);
var
oLeftBorder
=
this
.
_ExecuteBorder
(
computedStyle
,
tableNode
,
"
left
"
,
"
Left
"
,
false
);
var
oLeftBorder
=
this
.
_ExecuteBorder
(
computedStyle
,
tableNode
,
"
left
"
,
"
Left
"
,
false
,
true
);
if
(
null
!=
oLeftBorder
)
if
(
null
!=
oLeftBorder
)
table
.
Set_TableBorder_Left
(
oLeftBorder
);
table
.
Set_TableBorder_Left
(
oLeftBorder
);
var
oTopBorder
=
this
.
_ExecuteBorder
(
computedStyle
,
tableNode
,
"
top
"
,
"
Top
"
,
false
);
var
oTopBorder
=
this
.
_ExecuteBorder
(
computedStyle
,
tableNode
,
"
top
"
,
"
Top
"
,
false
,
true
);
if
(
null
!=
oTopBorder
)
if
(
null
!=
oTopBorder
)
table
.
Set_TableBorder_Top
(
oTopBorder
);
table
.
Set_TableBorder_Top
(
oTopBorder
);
var
oRightBorder
=
this
.
_ExecuteBorder
(
computedStyle
,
tableNode
,
"
right
"
,
"
Right
"
,
false
);
var
oRightBorder
=
this
.
_ExecuteBorder
(
computedStyle
,
tableNode
,
"
right
"
,
"
Right
"
,
false
,
true
);
if
(
null
!=
oRightBorder
)
if
(
null
!=
oRightBorder
)
table
.
Set_TableBorder_Right
(
oRightBorder
);
table
.
Set_TableBorder_Right
(
oRightBorder
);
var
oBottomBorder
=
this
.
_ExecuteBorder
(
computedStyle
,
tableNode
,
"
bottom
"
,
"
Bottom
"
,
false
);
var
oBottomBorder
=
this
.
_ExecuteBorder
(
computedStyle
,
tableNode
,
"
bottom
"
,
"
Bottom
"
,
false
,
true
);
if
(
null
!=
oBottomBorder
)
if
(
null
!=
oBottomBorder
)
table
.
Set_TableBorder_Bottom
(
oBottomBorder
);
table
.
Set_TableBorder_Bottom
(
oBottomBorder
);
...
@@ -7547,19 +7556,19 @@ PasteProcessor.prototype =
...
@@ -7547,19 +7556,19 @@ PasteProcessor.prototype =
{
{
var
Shd
=
new
CDocumentShd
();
var
Shd
=
new
CDocumentShd
();
Shd
.
Value
=
c_oAscShdClear
;
Shd
.
Value
=
c_oAscShdClear
;
Shd
.
Color
=
background_color
;
Shd
.
Unifill
=
AscFormat
.
CreteSolidFillRGB
(
background_color
.
r
,
background_color
.
g
,
background_color
.
b
)
;
cell
.
Set_Shd
(
Shd
);
cell
.
Set_Shd
(
Shd
);
}
}
var
border
=
this
.
_ExecuteBorder
(
computedStyle
,
node
,
"
left
"
,
"
Left
"
,
bAddIfNull
);
var
border
=
this
.
_ExecuteBorder
(
computedStyle
,
node
,
"
left
"
,
"
Left
"
,
bAddIfNull
,
true
);
if
(
null
!=
border
)
if
(
null
!=
border
)
cell
.
Set_Border
(
border
,
3
);
cell
.
Set_Border
(
border
,
3
);
var
border
=
this
.
_ExecuteBorder
(
computedStyle
,
node
,
"
top
"
,
"
Top
"
,
bAddIfNull
);
var
border
=
this
.
_ExecuteBorder
(
computedStyle
,
node
,
"
top
"
,
"
Top
"
,
bAddIfNull
,
true
);
if
(
null
!=
border
)
if
(
null
!=
border
)
cell
.
Set_Border
(
border
,
0
);
cell
.
Set_Border
(
border
,
0
);
var
border
=
this
.
_ExecuteBorder
(
computedStyle
,
node
,
"
right
"
,
"
Right
"
,
bAddIfNull
);
var
border
=
this
.
_ExecuteBorder
(
computedStyle
,
node
,
"
right
"
,
"
Right
"
,
bAddIfNull
,
true
);
if
(
null
!=
border
)
if
(
null
!=
border
)
cell
.
Set_Border
(
border
,
1
);
cell
.
Set_Border
(
border
,
1
);
var
border
=
this
.
_ExecuteBorder
(
computedStyle
,
node
,
"
bottom
"
,
"
Bottom
"
,
bAddIfNull
);
var
border
=
this
.
_ExecuteBorder
(
computedStyle
,
node
,
"
bottom
"
,
"
Bottom
"
,
bAddIfNull
,
true
);
if
(
null
!=
border
)
if
(
null
!=
border
)
cell
.
Set_Border
(
border
,
2
);
cell
.
Set_Border
(
border
,
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