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
ea0421e2
Commit
ea0421e2
authored
Feb 02, 2017
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 33637
parent
92289066
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
1 deletion
+39
-1
common/wordcopypaste.js
common/wordcopypaste.js
+39
-1
No files found.
common/wordcopypaste.js
View file @
ea0421e2
...
...
@@ -4611,6 +4611,44 @@ PasteProcessor.prototype =
var
computedStyle
=
this
.
_getComputedStyle
(
node
);
if
(
computedStyle
)
{
var
font_family
=
computedStyle
.
getPropertyValue
(
"
font-family
"
);
if
(
font_family
&&
""
!=
font_family
)
{
var
oFontItem
=
this
.
oFonts
[
font_family
];
if
(
null
!=
oFontItem
&&
null
!=
oFontItem
.
Name
&&
Para
.
TextPr
&&
Para
.
TextPr
.
Value
&&
Para
.
TextPr
.
Value
.
RFonts
)
{
Para
.
TextPr
.
Value
.
RFonts
.
Ascii
=
{
Name
:
oFontItem
.
Name
,
Index
:
oFontItem
.
Index
};
Para
.
TextPr
.
Value
.
RFonts
.
HAnsi
=
{
Name
:
oFontItem
.
Name
,
Index
:
oFontItem
.
Index
};
Para
.
TextPr
.
Value
.
RFonts
.
CS
=
{
Name
:
oFontItem
.
Name
,
Index
:
oFontItem
.
Index
};
Para
.
TextPr
.
Value
.
RFonts
.
EastAsia
=
{
Name
:
oFontItem
.
Name
,
Index
:
oFontItem
.
Index
};
}
}
var
font_size
=
node
.
style
?
node
.
style
.
fontSize
:
null
;
if
(
!
font_size
)
font_size
=
computedStyle
.
getPropertyValue
(
"
font-size
"
);
if
(
font_size
&&
Para
.
TextPr
&&
Para
.
TextPr
.
Value
)
{
var
obj
=
this
.
_ValueToMmType
(
font_size
);
if
(
obj
&&
"
%
"
!=
obj
.
type
&&
"
none
"
!=
obj
.
type
)
{
font_size
=
obj
.
val
;
//���� ������� �� ������������ ������� ������� �������� ���������� ������, ��� ���������� ��� ������� 8, 11, 14, 20, 26pt
if
(
"
px
"
==
obj
.
type
&&
false
==
this
.
bIsDoublePx
)
font_size
=
Math
.
round
(
font_size
*
g_dKoef_mm_to_pt
);
else
font_size
=
Math
.
round
(
2
*
font_size
*
g_dKoef_mm_to_pt
)
/
2
;
//���������� �������� ���������.
//TODO use constant
if
(
font_size
>
300
)
font_size
=
300
;
else
if
(
font_size
===
0
)
font_size
=
1
;
Para
.
TextPr
.
Value
.
FontSize
=
font_size
;
}
}
//Ind
var
Ind
=
new
CParaInd
();
var
margin_left
=
computedStyle
.
getPropertyValue
(
"
margin-left
"
);
...
...
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