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
2b5bbc90
Commit
2b5bbc90
authored
Apr 05, 2016
by
Sergey Luzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
вынес изменение ватермарка в TableId
parent
25e3763d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
31 deletions
+47
-31
cell/model/Workbook.js
cell/model/Workbook.js
+0
-12
common/editorscommon.js
common/editorscommon.js
+47
-0
slide/Editor/Format/Presentation.js
slide/Editor/Format/Presentation.js
+0
-12
word/Editor/Document.js
word/Editor/Document.js
+0
-7
No files found.
cell/model/Workbook.js
View file @
2b5bbc90
...
...
@@ -2889,18 +2889,6 @@ Workbook.prototype.DeserializeHistory = function(aChanges, fCallback){
for
(
var
k
=
0
,
length3
=
item
.
oData
.
elem
.
length
;
k
<
length3
;
++
k
)
oFontMap
[
item
.
oData
.
elem
[
k
]]
=
1
;
}
if
(
g_oUndoRedoWorkbook
==
item
.
oClass
&&
historyitem_Common_AddWatermark
==
item
.
nActionType
)
{
var
oWsModel
=
window
[
"
Asc
"
][
"
editor
"
].
wbModel
.
aWorksheets
[
0
];
if
(
oWsModel
)
{
var
objectRender
=
new
DrawingObjects
();
var
oNewDrawing
=
objectRender
.
createDrawingObject
(
c_oAscCellAnchorType
.
cellanchorAbsolute
);
var
oImage
=
DrawingObjectsController
.
prototype
.
createWatermarkImage
();
oNewDrawing
.
graphicObject
=
oImage
;
oWsModel
.
Drawings
.
push
(
oNewDrawing
);
}
}
aUndoRedoElems
.
push
(
item
);
}
...
...
common/editorscommon.js
View file @
2b5bbc90
...
...
@@ -2088,6 +2088,12 @@ CTableId.prototype.Save_Changes = function(Data, Writer)
break
;
}
case
historyitem_Common_AddWatermark
:
{
Writer
.
WriteString2
(
"
AVSUnregisteredVersion.emf
"
);
break
;
}
}
};
CTableId
.
prototype
.
Save_Changes2
=
function
(
Data
,
Writer
)
...
...
@@ -2108,6 +2114,47 @@ CTableId.prototype.Load_Changes = function(Reader, Reader2)
switch
(
Type
)
{
case
historyitem_Common_AddWatermark
:
{
var
sUrl
=
Reader
.
GetString2
();
if
(
'
undefined
'
!=
typeof
editor
&&
editor
.
WordControl
&&
editor
.
WordControl
.
m_oLogicDocument
)
{
var
oLogicDocument
=
editor
.
WordControl
.
m_oLogicDocument
;
if
(
oLogicDocument
instanceof
CDocument
)
{
var
oParaDrawing
=
oLogicDocument
.
DrawingObjects
.
getTrialImage
(
sUrl
);
var
oFirstParagraph
=
oLogicDocument
.
Get_FirstParagraph
();
ExecuteNoHistory
(
function
(){
var
oRun
=
new
CRun
();
oRun
.
Content
.
splice
(
0
,
oParaDrawing
);
oFirstParagraph
.
Content
.
splice
(
0
,
oRun
);
},
this
,
[]);
}
else
if
(
oLogicDocument
instanceof
CPresentation
)
{
if
(
oLogicDocument
.
Slides
[
0
])
{
var
oDrawing
=
oLogicDocument
.
Slides
[
0
].
graphicObjects
.
createWatermarkImage
(
sUrl
);
oDrawing
.
spPr
.
xfrm
.
offX
=
(
oLogicDocument
.
Width
-
oDrawing
.
spPr
.
extX
)
/
2
;
oDrawing
.
spPr
.
xfrm
.
offY
=
(
oLogicDocument
.
Height
-
oDrawing
.
spPr
.
extY
)
/
2
;
oLogicDocument
.
Slides
[
0
].
cSld
.
spTree
.
push
(
oDrawing
);
}
}
}
else
{
var
oWsModel
=
window
[
"
Asc
"
][
"
editor
"
].
wbModel
.
aWorksheets
[
0
];
if
(
oWsModel
)
{
var
objectRender
=
new
DrawingObjects
();
var
oNewDrawing
=
objectRender
.
createDrawingObject
(
c_oAscCellAnchorType
.
cellanchorAbsolute
);
var
oImage
=
DrawingObjectsController
.
prototype
.
createWatermarkImage
();
oNewDrawing
.
graphicObject
=
oImage
;
oWsModel
.
Drawings
.
push
(
oNewDrawing
);
}
}
break
;
}
case
historyitem_TableId_Add
:
{
// String : Id элемента
...
...
slide/Editor/Format/Presentation.js
View file @
2b5bbc90
...
...
@@ -4705,18 +4705,6 @@ CPresentation.prototype =
switch
(
Type
)
{
case
historyitem_Common_AddWatermark
:
{
if
(
this
.
Slides
[
0
])
{
var
sUrl
=
Reader
.
GetString2
();
var
oDrawing
=
this
.
Slides
[
0
].
graphicObjects
.
createWatermarkImage
(
sUrl
);
oDrawing
.
spPr
.
xfrm
.
offX
=
(
this
.
Width
-
oDrawing
.
spPr
.
extX
)
/
2
;
oDrawing
.
spPr
.
xfrm
.
offY
=
(
this
.
Height
-
oDrawing
.
spPr
.
extY
)
/
2
;
this
.
Slides
[
0
].
cSld
.
spTree
.
push
(
oDrawing
);
}
break
;
}
case
historyitem_Presentation_SetShowPr
:
{
if
(
Reader
.
GetBool
()){
...
...
word/Editor/Document.js
View file @
2b5bbc90
...
...
@@ -14014,13 +14014,6 @@ CDocument.prototype =
switch
(
Type
)
{
case
historyitem_Common_AddWatermark
:
{
var
sUrl
=
Reader
.
GetString2
();
var
oParaDrawing
=
this
.
DrawingObjects
.
getTrialImage
(
sUrl
);
break
;
}
case
historyitem_Document_AddItem
:
{
// Long : Количество элементов
...
...
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