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
4b7ae689
Commit
4b7ae689
authored
Mar 29, 2016
by
Sergey Luzyanin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
https://github.com/ONLYOFFICE/sdkjs
into develop
parents
093c5865
feae3232
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
74 deletions
+55
-74
build/Gruntfile.js
build/Gruntfile.js
+3
-26
word/Editor/Paragraph.js
word/Editor/Paragraph.js
+52
-48
No files found.
build/Gruntfile.js
View file @
4b7ae689
...
...
@@ -36,23 +36,6 @@ module.exports = function(grunt) {
grunt
.
loadNpmTasks
(
'
grunt-exec
'
);
grunt
.
loadNpmTasks
(
'
grunt-replace
'
);
grunt
.
registerTask
(
'
get_svn_info
'
,
'
Initialize svn information
'
,
function
()
{
// Instruct this task to wait until we call the done() method to continue
var
done
=
this
.
async
();
grunt
.
util
.
spawn
({
cmd
:
'
svnversion
'
,
args
:
[
'
../../
'
],
},
function
(
error
,
result
,
code
)
{
if
(
null
===
error
)
{
revision
=
result
;
}
// All done, continue to the next tasks
done
();
});
});
grunt
.
registerTask
(
'
build_webword_init
'
,
'
Initialize build WebWord SDK.
'
,
function
(){
defaultConfig
=
path
+
'
/webword.json
'
;
packageFile
=
require
(
defaultConfig
);
...
...
@@ -140,14 +123,8 @@ module.exports = function(grunt) {
grunt
.
log
.
ok
(
'
Use Jenkins build number as sdk-all build number!
'
.
yellow
);
packageFile
[
'
info
'
][
'
build
'
]
=
parseInt
(
process
.
env
[
'
BUILD_NUMBER
'
]);
pkg
.
info
.
build
=
packageFile
[
'
info
'
][
'
build
'
];
}
if
(
undefined
!==
process
.
env
[
'
SVN_REVISION
'
]){
packageFile
[
'
info
'
][
'
rev
'
]
=
process
.
env
[
'
SVN_REVISION
'
];
}
else
{
grunt
.
log
.
ok
(
'
Use revision number
\
"
'
+
revision
+
'
\
" from svnversion!
'
.
yellow
);
packageFile
[
'
info
'
][
'
rev
'
]
=
revision
;
}
}
packageFile
[
'
info
'
][
'
rev
'
]
=
process
.
env
[
'
SVN_REVISION
'
]
||
revision
;
grunt
.
file
.
write
(
defaultConfig
,
JSON
.
stringify
(
pkg
,
null
,
4
));
});
...
...
@@ -253,5 +230,5 @@ module.exports = function(grunt) {
grunt
.
registerTask
(
'
compile_sdk
'
,
[
'
compile_sdk_init:
'
+
level
,
'
closure-compiler
'
,
'
concat
'
,
'
replace
'
,
'
clean
'
]);
grunt
.
registerTask
(
'
compile_sdk_native
'
,
[
'
compile_sdk_init:
'
+
level
,
'
closure-compiler:sdk
'
,
'
concat
'
,
'
replace
'
,
'
clean
'
]);
grunt
.
registerTask
(
'
default
'
,
[
'
get_svn_info
'
,
'
build_all
'
]);
grunt
.
registerTask
(
'
default
'
,
[
'
build_all
'
]);
};
\ No newline at end of file
word/Editor/Paragraph.js
View file @
4b7ae689
...
...
@@ -2123,54 +2123,58 @@ Paragraph.prototype =
Element
=
aUnderline
.
Get_Next
();
}
// Рисуем красный рект вокруг измененных ранов
var
arrRunReviewRectsLine
=
[];
Element
=
aRunReview
.
Get_NextForward
();
while
(
null
!==
Element
)
{
if
(
null
===
RunPrReview
||
true
!==
RunPrReview
.
Is_Equal
(
Element
.
Additional
.
RunPr
))
{
if
(
arrRunReviewRectsLine
.
length
>
0
&&
arrRunReviewRects
)
{
arrRunReviewRects
.
push
(
arrRunReviewRectsLine
);
arrRunReviewRectsLine
=
[];
}
RunPrReview
=
Element
.
Additional
.
RunPr
;
arrRunReviewRects
=
[];
arrRunReviewAreas
.
push
(
arrRunReviewRects
);
arrRunReviewAreasColors
.
push
(
new
CDocumentColor
(
Element
.
r
,
Element
.
g
,
Element
.
b
));
}
arrRunReviewRectsLine
.
push
({
X
:
Element
.
x0
,
Y
:
Page
.
Y
+
Line
.
Y
-
Line
.
Metrics
.
TextAscent
,
W
:
Element
.
x1
-
Element
.
x0
,
H
:
Line
.
Metrics
.
TextDescent
+
Line
.
Metrics
.
TextAscent
+
Line
.
Metrics
.
LineGap
,
Page
:
0
});
Element
=
aRunReview
.
Get_NextForward
();
}
if
(
arrRunReviewRectsLine
.
length
>
0
)
arrRunReviewRects
.
push
(
arrRunReviewRectsLine
);
if
(
this
.
bFromDocument
)
{
// Рисуем рект вокруг измененных ранов (измененных другим пользователем)
Element
=
aCollChange
.
Get_Next
();
while
(
null
!==
Element
)
{
pGraphics
.
p_color
(
Element
.
r
,
Element
.
g
,
Element
.
b
,
255
);
pGraphics
.
AddSmartRect
(
Element
.
x0
,
Page
.
Y
+
Line
.
Top
,
Element
.
x1
-
Element
.
x0
,
Line
.
Bottom
-
Line
.
Top
,
0
);
Element
=
aCollChange
.
Get_Next
();
}
// Рисуем подчеркивание орфографии
if
(
this
.
LogicDocument
&&
true
===
this
.
LogicDocument
.
Spelling
.
Use
)
{
pGraphics
.
p_color
(
255
,
0
,
0
,
255
);
var
SpellingW
=
editor
.
WordControl
.
m_oDrawingDocument
.
GetMMPerDot
(
1
);
Element
=
aSpelling
.
Get_Next
();
while
(
null
!=
Element
)
{
pGraphics
.
DrawSpellingLine
(
Element
.
y0
,
Element
.
x0
,
Element
.
x1
,
SpellingW
);
Element
=
aSpelling
.
Get_Next
();
}
}
}
if
(
pGraphics
.
RENDERER_PDF_FLAG
!==
true
)
{
// Рисуем красный рект вокруг измененных ранов
var
arrRunReviewRectsLine
=
[];
Element
=
aRunReview
.
Get_NextForward
();
while
(
null
!==
Element
)
{
if
(
null
===
RunPrReview
||
true
!==
RunPrReview
.
Is_Equal
(
Element
.
Additional
.
RunPr
))
{
if
(
arrRunReviewRectsLine
.
length
>
0
&&
arrRunReviewRects
)
{
arrRunReviewRects
.
push
(
arrRunReviewRectsLine
);
arrRunReviewRectsLine
=
[];
}
RunPrReview
=
Element
.
Additional
.
RunPr
;
arrRunReviewRects
=
[];
arrRunReviewAreas
.
push
(
arrRunReviewRects
);
arrRunReviewAreasColors
.
push
(
new
CDocumentColor
(
Element
.
r
,
Element
.
g
,
Element
.
b
));
}
arrRunReviewRectsLine
.
push
({
X
:
Element
.
x0
,
Y
:
Page
.
Y
+
Line
.
Y
-
Line
.
Metrics
.
TextAscent
,
W
:
Element
.
x1
-
Element
.
x0
,
H
:
Line
.
Metrics
.
TextDescent
+
Line
.
Metrics
.
TextAscent
+
Line
.
Metrics
.
LineGap
,
Page
:
0
});
Element
=
aRunReview
.
Get_NextForward
();
}
if
(
arrRunReviewRectsLine
.
length
>
0
)
arrRunReviewRects
.
push
(
arrRunReviewRectsLine
);
if
(
this
.
bFromDocument
)
{
// Рисуем рект вокруг измененных ранов (измененных другим пользователем)
Element
=
aCollChange
.
Get_Next
();
while
(
null
!==
Element
)
{
pGraphics
.
p_color
(
Element
.
r
,
Element
.
g
,
Element
.
b
,
255
);
pGraphics
.
AddSmartRect
(
Element
.
x0
,
Page
.
Y
+
Line
.
Top
,
Element
.
x1
-
Element
.
x0
,
Line
.
Bottom
-
Line
.
Top
,
0
);
Element
=
aCollChange
.
Get_Next
();
}
// Рисуем подчеркивание орфографии
if
(
this
.
LogicDocument
&&
true
===
this
.
LogicDocument
.
Spelling
.
Use
)
{
pGraphics
.
p_color
(
255
,
0
,
0
,
255
);
var
SpellingW
=
editor
.
WordControl
.
m_oDrawingDocument
.
GetMMPerDot
(
1
);
Element
=
aSpelling
.
Get_Next
();
while
(
null
!=
Element
)
{
pGraphics
.
DrawSpellingLine
(
Element
.
y0
,
Element
.
x0
,
Element
.
x1
,
SpellingW
);
Element
=
aSpelling
.
Get_Next
();
}
}
}
}
if
(
pGraphics
.
End_Command
)
{
pGraphics
.
End_Command
()
...
...
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