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
6bc9c2eb
Commit
6bc9c2eb
authored
Feb 02, 2017
by
Sergey Luzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix Bug 33891
parent
a02b7b1c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
2 deletions
+54
-2
common/Drawings/DrawingsChanges.js
common/Drawings/DrawingsChanges.js
+48
-0
common/Drawings/Format/Format.js
common/Drawings/Format/Format.js
+6
-2
No files found.
common/Drawings/DrawingsChanges.js
View file @
6bc9c2eb
...
@@ -309,6 +309,54 @@
...
@@ -309,6 +309,54 @@
window
[
'
AscDFH
'
].
CChangesDrawingsContentLong
=
CChangesDrawingsContentLong
;
window
[
'
AscDFH
'
].
CChangesDrawingsContentLong
=
CChangesDrawingsContentLong
;
function
CChangesDrawingsContentLongMap
(
Class
,
Type
,
Pos
,
Items
,
isAdd
){
CChangesDrawingsContentLongMap
.
superclass
.
constructor
.
call
(
this
,
Class
,
Type
,
Pos
,
Items
,
isAdd
);
}
AscCommon
.
extendClass
(
CChangesDrawingsContentLongMap
,
AscDFH
.
CChangesDrawingsContentLong
);
CChangesDrawingsContentLongMap
.
prototype
.
private_InsertInArrayLoad
=
function
()
{
if
(
this
.
PosArray
.
length
<=
0
||
this
.
Items
.
length
<=
0
)
return
;
var
aChangedArray
=
this
.
private_GetChangedArray
();
if
(
null
!==
aChangedArray
)
{
for
(
var
i
=
0
;
i
<
this
.
Items
.
length
;
++
i
)
{
aChangedArray
[
this
.
PosArray
[
i
]]
=
this
.
Items
[
i
];
}
}
};
CChangesDrawingsContentLongMap
.
prototype
.
private_RemoveInArrayLoad
=
function
()
{
var
aChangedArray
=
this
.
private_GetChangedArray
();
if
(
null
!==
aChangedArray
)
{
for
(
var
i
=
0
;
i
<
this
.
PosArray
.
length
;
++
i
)
{
aChangedArray
[
this
.
PosArray
[
i
]]
=
null
;
}
}
};
CChangesDrawingsContentLongMap
.
prototype
.
private_InsertInArrayUndoRedo
=
function
()
{
var
aChangedArray
=
this
.
private_GetChangedArray
();
if
(
null
!==
aChangedArray
)
{
for
(
var
i
=
0
;
i
<
this
.
Items
.
length
;
++
i
)
{
aChangedArray
[
this
.
Pos
+
i
]
=
this
.
Items
[
i
];
}
}
};
CChangesDrawingsContentLongMap
.
prototype
.
private_RemoveInArrayUndoRedo
=
function
()
{
var
aChangedArray
=
this
.
private_GetChangedArray
();
if
(
null
!==
aChangedArray
)
{
for
(
var
i
=
0
;
i
<
this
.
Items
.
length
;
++
i
)
{
aChangedArray
[
this
.
Pos
+
i
]
=
null
;
}
}
};
window
[
'
AscDFH
'
].
CChangesDrawingsContentLongMap
=
CChangesDrawingsContentLongMap
;
function
CChangesDrawingChangeTheme
(
Class
,
Type
,
aIndexes
){
function
CChangesDrawingChangeTheme
(
Class
,
Type
,
aIndexes
){
this
.
Type
=
Type
;
this
.
Type
=
Type
;
this
.
aIndexes
=
aIndexes
;
this
.
aIndexes
=
aIndexes
;
...
...
common/Drawings/Format/Format.js
View file @
6bc9c2eb
...
@@ -65,6 +65,7 @@ var asc_CShapeProperty = Asc.asc_CShapeProperty;
...
@@ -65,6 +65,7 @@ var asc_CShapeProperty = Asc.asc_CShapeProperty;
var
CChangesDrawingsObject
=
AscDFH
.
CChangesDrawingsObject
;
var
CChangesDrawingsObject
=
AscDFH
.
CChangesDrawingsObject
;
var
CChangesDrawingsContentNoId
=
AscDFH
.
CChangesDrawingsContentNoId
;
var
CChangesDrawingsContentNoId
=
AscDFH
.
CChangesDrawingsContentNoId
;
var
CChangesDrawingsContentLong
=
AscDFH
.
CChangesDrawingsContentLong
;
var
CChangesDrawingsContentLong
=
AscDFH
.
CChangesDrawingsContentLong
;
var
CChangesDrawingsContentLongMap
=
AscDFH
.
CChangesDrawingsContentLongMap
;
var
drawingsChangesMap
=
window
[
'
AscDFH
'
].
drawingsChangesMap
;
var
drawingsChangesMap
=
window
[
'
AscDFH
'
].
drawingsChangesMap
;
...
@@ -196,7 +197,7 @@ var asc_CShapeProperty = Asc.asc_CShapeProperty;
...
@@ -196,7 +197,7 @@ var asc_CShapeProperty = Asc.asc_CShapeProperty;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_SpPr_SetGeometry
]
=
CChangesDrawingsObject
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_SpPr_SetGeometry
]
=
CChangesDrawingsObject
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_SpPr_SetFill
]
=
CChangesDrawingsObjectNoId
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_SpPr_SetFill
]
=
CChangesDrawingsObjectNoId
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_SpPr_SetLn
]
=
CChangesDrawingsObjectNoId
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_SpPr_SetLn
]
=
CChangesDrawingsObjectNoId
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_ClrMap_SetClr
]
=
CChangesDrawingsContentLong
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_ClrMap_SetClr
]
=
CChangesDrawingsContentLong
Map
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_ExtraClrScheme_SetClrScheme
]
=
CChangesDrawingsObject
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_ExtraClrScheme_SetClrScheme
]
=
CChangesDrawingsObject
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_ExtraClrScheme_SetClrMap
]
=
CChangesDrawingsObject
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_ExtraClrScheme_SetClrMap
]
=
CChangesDrawingsObject
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_ThemeSetColorScheme
]
=
CChangesDrawingsObjectNoId
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_ThemeSetColorScheme
]
=
CChangesDrawingsObjectNoId
;
...
@@ -5878,6 +5879,7 @@ ClrScheme.prototype =
...
@@ -5878,6 +5879,7 @@ ClrScheme.prototype =
Write_ToBinary
:
function
(
w
)
Write_ToBinary
:
function
(
w
)
{
{
w
.
WriteLong
(
this
.
colors
.
length
);
w
.
WriteLong
(
this
.
colors
.
length
);
w
.
WriteString2
(
this
.
name
);
for
(
var
i
=
0
;
i
<
this
.
colors
.
length
;
++
i
)
for
(
var
i
=
0
;
i
<
this
.
colors
.
length
;
++
i
)
{
{
w
.
WriteBool
(
isRealObject
(
this
.
colors
[
i
]));
w
.
WriteBool
(
isRealObject
(
this
.
colors
[
i
]));
...
@@ -5886,11 +5888,13 @@ ClrScheme.prototype =
...
@@ -5886,11 +5888,13 @@ ClrScheme.prototype =
this
.
colors
[
i
].
Write_ToBinary
(
w
);
this
.
colors
[
i
].
Write_ToBinary
(
w
);
}
}
}
}
},
},
Read_FromBinary
:
function
(
r
)
Read_FromBinary
:
function
(
r
)
{
{
var
len
=
r
.
GetLong
();
var
len
=
r
.
GetLong
();
this
.
name
=
r
.
GetString2
();
for
(
var
i
=
0
;
i
<
len
;
++
i
)
for
(
var
i
=
0
;
i
<
len
;
++
i
)
{
{
if
(
r
.
GetBool
())
if
(
r
.
GetBool
())
...
@@ -5903,6 +5907,7 @@ ClrScheme.prototype =
...
@@ -5903,6 +5907,7 @@ ClrScheme.prototype =
this
.
colors
[
i
]
=
null
;
this
.
colors
[
i
]
=
null
;
}
}
}
}
},
},
setName
:
function
(
name
)
setName
:
function
(
name
)
...
@@ -5985,7 +5990,6 @@ ClrMap.prototype =
...
@@ -5985,7 +5990,6 @@ ClrMap.prototype =
setClr
:
function
(
index
,
clr
)
setClr
:
function
(
index
,
clr
)
{
{
History
.
Add
(
new
CChangesDrawingsContentLong
(
this
,
AscDFH
.
historyitem_ClrMap_SetClr
,
index
,
[
clr
],
true
));
History
.
Add
(
new
CChangesDrawingsContentLong
(
this
,
AscDFH
.
historyitem_ClrMap_SetClr
,
index
,
[
clr
],
true
));
this
.
color_map
[
index
]
=
clr
;
this
.
color_map
[
index
]
=
clr
;
}
}
...
...
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