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
0a8032e7
Commit
0a8032e7
authored
Mar 14, 2017
by
Sergey Luzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix Bug 34159
parent
4f1eb1b5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
10 deletions
+27
-10
common/Charts/DrawingObjects.js
common/Charts/DrawingObjects.js
+17
-1
slide/Editor/DrawingObjectsController.js
slide/Editor/DrawingObjectsController.js
+3
-2
slide/api.js
slide/api.js
+2
-2
word/Editor/GraphicObjects/GraphicObjects.js
word/Editor/GraphicObjects/GraphicObjects.js
+3
-2
word/api.js
word/api.js
+2
-3
No files found.
common/Charts/DrawingObjects.js
View file @
0a8032e7
...
@@ -458,6 +458,14 @@ function asc_CChartBinary(chart) {
...
@@ -458,6 +458,14 @@ function asc_CChartBinary(chart) {
this
[
"
colorMapBinary
"
]
=
pptx_writer
.
pos
+
"
;
"
+
pptx_writer
.
GetBase64Memory
();
this
[
"
colorMapBinary
"
]
=
pptx_writer
.
pos
+
"
;
"
+
pptx_writer
.
GetBase64Memory
();
}
}
this
[
"
urls
"
]
=
JSON
.
stringify
(
AscCommon
.
g_oDocumentUrls
.
getUrls
());
this
[
"
urls
"
]
=
JSON
.
stringify
(
AscCommon
.
g_oDocumentUrls
.
getUrls
());
if
(
chart
.
parent
&&
chart
.
parent
.
docPr
){
this
[
"
cTitle
"
]
=
chart
.
parent
.
docPr
.
title
;
this
[
"
cDescription
"
]
=
chart
.
parent
.
docPr
.
descr
;
}
else
{
this
[
"
cTitle
"
]
=
chart
.
getTitle
();
this
[
"
cDescription
"
]
=
chart
.
getDescription
();
}
}
}
}
}
...
@@ -507,7 +515,6 @@ asc_CChartBinary.prototype = {
...
@@ -507,7 +515,6 @@ asc_CChartBinary.prototype = {
{
{
var
stream
=
AscFormat
.
CreateBinaryReader
(
binary
,
0
,
binary
.
length
);
var
stream
=
AscFormat
.
CreateBinaryReader
(
binary
,
0
,
binary
.
length
);
var
oBinaryReader
=
new
AscCommon
.
BinaryPPTYLoader
();
var
oBinaryReader
=
new
AscCommon
.
BinaryPPTYLoader
();
oBinaryReader
.
stream
=
new
AscCommon
.
FileStream
();
oBinaryReader
.
stream
=
new
AscCommon
.
FileStream
();
oBinaryReader
.
stream
.
obj
=
stream
.
obj
;
oBinaryReader
.
stream
.
obj
=
stream
.
obj
;
oBinaryReader
.
stream
.
data
=
stream
.
data
;
oBinaryReader
.
stream
.
data
=
stream
.
data
;
...
@@ -2688,6 +2695,15 @@ function DrawingObjects() {
...
@@ -2688,6 +2695,15 @@ function DrawingObjects() {
{
{
worksheet
.
model
.
workbook
.
theme
=
theme
;
worksheet
.
model
.
workbook
.
theme
=
theme
;
}
}
if
(
chart
[
"
cTitle
"
]
||
chart
[
"
cDescription
"
]){
if
(
!
oNewChartSpace
.
nvGraphicFramePr
){
var
nv_sp_pr
=
new
AscFormat
.
UniNvPr
();
nv_sp_pr
.
cNvPr
.
setId
(
1024
);
oNewChartSpace
.
setNvSpPr
(
nv_sp_pr
);
}
oNewChartSpace
.
setTitle
(
chart
[
"
cTitle
"
]);
oNewChartSpace
.
setDescription
(
chart
[
"
cDescription
"
]);
}
var
colorMapOverride
=
asc_chart_binary
.
getColorMap
();
var
colorMapOverride
=
asc_chart_binary
.
getColorMap
();
if
(
colorMapOverride
)
if
(
colorMapOverride
)
{
{
...
...
slide/Editor/DrawingObjectsController.js
View file @
0a8032e7
...
@@ -239,8 +239,7 @@ DrawingObjectsController.prototype.getColorMapOverride = function()
...
@@ -239,8 +239,7 @@ DrawingObjectsController.prototype.getColorMapOverride = function()
};
};
DrawingObjectsController
.
prototype
.
editChart
=
function
(
binary
)
DrawingObjectsController
.
prototype
.
editChart
=
function
(
binary
)
{
{
var
bin_object
=
{
"
binary
"
:
binary
};
var
chart_space
=
this
.
getChartSpace2
(
binary
,
null
);
var
chart_space
=
this
.
getChartSpace2
(
bin_object
,
null
);
chart_space
.
setParent
(
this
.
drawingObjects
);
chart_space
.
setParent
(
this
.
drawingObjects
);
var
by_types
,
i
;
var
by_types
,
i
;
by_types
=
AscFormat
.
getObjectsByTypesFromArr
(
this
.
selectedObjects
,
true
);
by_types
=
AscFormat
.
getObjectsByTypesFromArr
(
this
.
selectedObjects
,
true
);
...
@@ -286,6 +285,8 @@ DrawingObjectsController.prototype.editChart = function(binary)
...
@@ -286,6 +285,8 @@ DrawingObjectsController.prototype.editChart = function(binary)
chart_space
.
spPr
.
xfrm
.
setOffY
(
aSelectedCharts
[
0
].
y
);
chart_space
.
spPr
.
xfrm
.
setOffY
(
aSelectedCharts
[
0
].
y
);
var
pos
=
aSelectedCharts
[
0
].
deleteDrawingBase
();
var
pos
=
aSelectedCharts
[
0
].
deleteDrawingBase
();
chart_space
.
addToDrawingObjects
(
pos
);
chart_space
.
addToDrawingObjects
(
pos
);
chart_space
.
setTitle
(
binary
[
"
cTitle
"
]);
chart_space
.
setDescription
(
binary
[
"
cDescription
"
]);
this
.
resetSelection
();
this
.
resetSelection
();
this
.
selectObject
(
chart_space
,
this
.
drawingObjects
.
num
);
this
.
selectObject
(
chart_space
,
this
.
drawingObjects
.
num
);
this
.
startRecalculate
();
this
.
startRecalculate
();
...
...
slide/api.js
View file @
0a8032e7
...
@@ -640,7 +640,7 @@
...
@@ -640,7 +640,7 @@
this
.
_init
();
this
.
_init
();
}
}
asc_docs_api
.
prototype
=
Object
.
create
(
AscCommon
.
baseEditorsApi
.
prototype
);
asc_docs_api
.
prototype
=
Object
.
create
(
AscCommon
.
baseEditorsApi
.
prototype
);
asc_docs_api
.
prototype
.
constructor
=
asc_docs_api
;
asc_docs_api
.
prototype
.
constructor
=
asc_docs_api
;
asc_docs_api
.
prototype
.
sendEvent
=
function
()
asc_docs_api
.
prototype
.
sendEvent
=
function
()
...
@@ -5883,7 +5883,7 @@ background-repeat: no-repeat;\
...
@@ -5883,7 +5883,7 @@ background-repeat: no-repeat;\
// Находим выделенную диаграмму и накатываем бинарник
// Находим выделенную диаграмму и накатываем бинарник
if
(
AscCommon
.
isRealObject
(
chartBinary
))
if
(
AscCommon
.
isRealObject
(
chartBinary
))
{
{
this
.
WordControl
.
m_oLogicDocument
.
Edit_Chart
(
chartBinary
[
"
binary
"
]
);
this
.
WordControl
.
m_oLogicDocument
.
Edit_Chart
(
chartBinary
);
}
}
};
};
...
...
word/Editor/GraphicObjects/GraphicObjects.js
View file @
0a8032e7
...
@@ -906,8 +906,7 @@ CGraphicObjects.prototype =
...
@@ -906,8 +906,7 @@ CGraphicObjects.prototype =
editChart
:
function
(
chart
)
editChart
:
function
(
chart
)
{
{
var
bin_object
=
{
"
binary
"
:
chart
};
var
chart_space
=
this
.
getChartSpace2
(
chart
,
null
),
select_start_page
,
parent_paragraph
,
nearest_pos
;
var
chart_space
=
this
.
getChartSpace2
(
bin_object
,
null
),
select_start_page
,
parent_paragraph
,
nearest_pos
;
var
by_types
;
var
by_types
;
...
@@ -958,6 +957,8 @@ CGraphicObjects.prototype =
...
@@ -958,6 +957,8 @@ CGraphicObjects.prototype =
select_start_page
=
aSelectedCharts
[
0
].
selectStartPage
;
select_start_page
=
aSelectedCharts
[
0
].
selectStartPage
;
chart_space
.
setParent
(
aSelectedCharts
[
0
].
parent
);
chart_space
.
setParent
(
aSelectedCharts
[
0
].
parent
);
aSelectedCharts
[
0
].
parent
.
Set_GraphicObject
(
chart_space
);
aSelectedCharts
[
0
].
parent
.
Set_GraphicObject
(
chart_space
);
aSelectedCharts
[
0
].
parent
.
docPr
.
setTitle
(
chart
[
"
cTitle
"
]);
aSelectedCharts
[
0
].
parent
.
docPr
.
setDescr
(
chart
[
"
cDescription
"
]);
this
.
resetSelection
();
this
.
resetSelection
();
this
.
selectObject
(
chart_space
,
select_start_page
);
this
.
selectObject
(
chart_space
,
select_start_page
);
aSelectedCharts
[
0
].
parent
.
CheckWH
();
aSelectedCharts
[
0
].
parent
.
CheckWH
();
...
...
word/api.js
View file @
0a8032e7
...
@@ -515,7 +515,7 @@
...
@@ -515,7 +515,7 @@
this
.
_init
();
this
.
_init
();
}
}
asc_docs_api
.
prototype
=
Object
.
create
(
AscCommon
.
baseEditorsApi
.
prototype
);
asc_docs_api
.
prototype
=
Object
.
create
(
AscCommon
.
baseEditorsApi
.
prototype
);
asc_docs_api
.
prototype
.
constructor
=
asc_docs_api
;
asc_docs_api
.
prototype
.
constructor
=
asc_docs_api
;
asc_docs_api
.
prototype
.
sendEvent
=
function
()
asc_docs_api
.
prototype
.
sendEvent
=
function
()
...
@@ -6645,11 +6645,10 @@ background-repeat: no-repeat;\
...
@@ -6645,11 +6645,10 @@ background-repeat: no-repeat;\
// Находим выделенную диаграмму и накатываем бинарник
// Находим выделенную диаграмму и накатываем бинарник
if
(
AscFormat
.
isObject
(
chartBinary
))
if
(
AscFormat
.
isObject
(
chartBinary
))
{
{
var
binary
=
chartBinary
[
"
binary
"
];
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Paragraph_Content
))
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Paragraph_Content
))
{
{
History
.
Create_NewPoint
(
AscDFH
.
historydescription_Document_EditChart
);
History
.
Create_NewPoint
(
AscDFH
.
historydescription_Document_EditChart
);
this
.
WordControl
.
m_oLogicDocument
.
Edit_Chart
(
b
inary
);
this
.
WordControl
.
m_oLogicDocument
.
Edit_Chart
(
chartB
inary
);
}
}
}
}
};
};
...
...
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