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
f9665fb6
Commit
f9665fb6
authored
Apr 20, 2016
by
Sergey Luzyanin
Committed by
Alexander.Trofimov
May 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix Bug 32252 - [Copy&Paste] Не вставляется текст при копировании изображения и текста из CDE в CPE
parent
8713c78f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
81 additions
and
35 deletions
+81
-35
common/Drawings/Format/Constants.js
common/Drawings/Format/Constants.js
+1
-1
common/Drawings/Format/GroupShape.js
common/Drawings/Format/GroupShape.js
+11
-0
common/Drawings/Format/Shape.js
common/Drawings/Format/Shape.js
+9
-0
common/wordcopypaste.js
common/wordcopypaste.js
+13
-14
slide/Editor/Format/Presentation.js
slide/Editor/Format/Presentation.js
+32
-20
word/Editor/ParagraphContent.js
word/Editor/ParagraphContent.js
+12
-0
word/Editor/Run.js
word/Editor/Run.js
+3
-0
No files found.
common/Drawings/Format/Constants.js
View file @
f9665fb6
"
use strict
"
;
"
use strict
"
;
var
historyitem_ChartFormatSetChart
=
1001
;
var
historyitem_AutoShapes_SetDrawingBaseCoors
=
1000
;
...
...
common/Drawings/Format/GroupShape.js
View file @
f9665fb6
...
...
@@ -63,6 +63,17 @@ CGroupShape.prototype =
return
this
.
Id
;
},
Get_AllDrawingObjects
:
function
(
DrawingObjects
)
{
for
(
var
i
=
0
;
i
<
this
.
spTree
.
length
;
++
i
)
{
if
(
this
.
spTree
[
i
].
Get_AllDrawingObjects
)
{
this
.
spTree
[
i
].
Get_AllDrawingObjects
(
DrawingObjects
);
}
}
},
documentGetAllFontNames
:
function
(
allFonts
)
{
for
(
var
i
=
0
;
i
<
this
.
spTree
.
length
;
++
i
)
...
...
common/Drawings/Format/Shape.js
View file @
f9665fb6
...
...
@@ -646,6 +646,15 @@ CShape.prototype =
this
.
Id
=
r
.
GetString2
();
},
Get_AllDrawingObjects
:
function
(
DrawingObjects
)
{
var
oContent
=
this
.
getDocContent
();
if
(
oContent
)
{
oContent
.
Get_AllDrawingObjects
(
DrawingObjects
);
}
},
convertToWord
:
function
(
document
)
{
this
.
setBDeleted
(
true
);
var
c
=
new
CShape
();
...
...
common/wordcopypaste.js
View file @
f9665fb6
...
...
@@ -3742,25 +3742,15 @@ PasteProcessor.prototype =
var
presentationSelectedContent
=
new
PresentationSelectedContent
();
presentationSelectedContent
.
DocContent
=
new
CSelectedContent
();
var
elements
=
[],
selectedElement
,
element
,
drawings
,
pDrawings
=
[],
drawingCopyObject
;
var
elements
=
[],
selectedElement
,
element
,
drawings
=
[]
,
pDrawings
=
[],
drawingCopyObject
;
var
defaultTableStyleId
=
presentation
.
DefaultTableStyleId
;
for
(
var
i
=
0
;
i
<
aContent
.
content
.
length
;
++
i
)
{
selectedElement
=
new
CSelectedElement
();
element
=
aContent
.
content
[
i
];
//drawings
drawings
=
element
.
Get_AllDrawingObjects
();
if
(
drawings
&&
drawings
.
length
)
{
for
(
var
j
=
0
;
j
<
drawings
.
length
;
j
++
)
{
drawingCopyObject
=
new
DrawingCopyObject
();
drawingCopyObject
.
Drawing
=
drawings
[
j
].
GraphicObj
;
pDrawings
.
push
(
drawingCopyObject
);
}
}
else
if
(
type_Paragraph
==
element
.
GetType
())
//paragraph
element
.
Get_AllDrawingObjects
(
drawings
);
if
(
type_Paragraph
==
element
.
GetType
())
//paragraph
{
selectedElement
.
Element
=
ConvertParagraphToPPTX
(
element
);
elements
.
push
(
selectedElement
);
...
...
@@ -3791,7 +3781,16 @@ PasteProcessor.prototype =
}
}
if
(
drawings
&&
drawings
.
length
)
{
for
(
var
j
=
0
;
j
<
drawings
.
length
;
j
++
)
{
drawingCopyObject
=
new
DrawingCopyObject
();
drawingCopyObject
.
Drawing
=
drawings
[
j
].
GraphicObj
;
pDrawings
.
push
(
drawingCopyObject
);
}
}
presentationSelectedContent
.
DocContent
.
Elements
=
elements
;
presentationSelectedContent
.
Drawings
=
pDrawings
;
...
...
slide/Editor/Format/Presentation.js
View file @
f9665fb6
...
...
@@ -3719,6 +3719,32 @@ CPresentation.prototype =
},
this
,
[]);
},
CreateAndAddShapeFromSelectedContent
:
function
(
oDocContent
)
{
var
track_object
=
new
NewShapeTrack
(
"
textRect
"
,
0
,
0
,
this
.
Slides
[
this
.
CurPage
].
Layout
.
Master
.
Theme
,
this
.
Slides
[
this
.
CurPage
].
Layout
.
Master
,
this
.
Slides
[
this
.
CurPage
].
Layout
,
this
.
Slides
[
this
.
CurPage
],
this
.
CurPage
);
track_object
.
track
({},
0
,
0
);
var
shape
=
track_object
.
getShape
(
false
,
this
.
DrawingDocument
,
this
.
Slides
[
this
.
CurPage
]);
shape
.
setParent
(
this
.
Slides
[
this
.
CurPage
]);
var
paragraph
=
shape
.
txBody
.
content
.
Content
[
0
];
var
NearPos
=
{
Paragraph
:
paragraph
,
ContentPos
:
paragraph
.
Get_ParaContentPos
(
false
,
false
)
};
paragraph
.
Check_NearestPos
(
NearPos
);
var
old_val
=
oDocContent
.
MoveDrawing
;
oDocContent
.
MoveDrawing
=
true
;
shape
.
txBody
.
content
.
Insert_Content
(
oDocContent
,
NearPos
);
oDocContent
.
MoveDrawing
=
old_val
;
var
body_pr
=
shape
.
getBodyPr
();
var
w
=
shape
.
txBody
.
getMaxContentWidth
(
this
.
Width
/
2
,
true
)
+
body_pr
.
lIns
+
body_pr
.
rIns
;
var
h
=
shape
.
txBody
.
content
.
Get_SummaryHeight
()
+
body_pr
.
tIns
+
body_pr
.
bIns
;
shape
.
spPr
.
xfrm
.
setExtX
(
w
);
shape
.
spPr
.
xfrm
.
setExtY
(
h
);
shape
.
spPr
.
xfrm
.
setOffX
((
this
.
Width
-
w
)
/
2
);
shape
.
spPr
.
xfrm
.
setOffY
((
this
.
Height
-
h
)
/
2
);
shape
.
setParent
(
this
.
Slides
[
this
.
CurPage
]);
shape
.
addToDrawingObjects
();
return
shape
;
},
Insert_Content
:
function
(
Content
)
{
var
selected_slides
=
editor
.
WordControl
.
Thumbnails
.
GetSelectedArray
(),
i
;
...
...
@@ -3764,6 +3790,11 @@ CPresentation.prototype =
Content
.
Drawings
[
i
].
Drawing
.
checkExtentsByDocContent
&&
Content
.
Drawings
[
i
].
Drawing
.
checkExtentsByDocContent
();
this
.
Slides
[
this
.
CurPage
].
graphicObjects
.
selectObject
(
Content
.
Drawings
[
i
].
Drawing
,
0
);
}
if
(
Content
.
DocContent
)
{
var
shape
=
this
.
CreateAndAddShapeFromSelectedContent
(
Content
.
DocContent
);
this
.
Slides
[
this
.
CurPage
].
graphicObjects
.
selectObject
(
shape
,
0
);
}
}
else
if
(
Content
.
DocContent
)
{
...
...
@@ -3786,26 +3817,7 @@ CPresentation.prototype =
}
else
{
var
track_object
=
new
NewShapeTrack
(
"
textRect
"
,
0
,
0
,
this
.
Slides
[
this
.
CurPage
].
Layout
.
Master
.
Theme
,
this
.
Slides
[
this
.
CurPage
].
Layout
.
Master
,
this
.
Slides
[
this
.
CurPage
].
Layout
,
this
.
Slides
[
this
.
CurPage
],
this
.
CurPage
);
track_object
.
track
({},
0
,
0
);
var
shape
=
track_object
.
getShape
(
false
,
this
.
DrawingDocument
,
this
.
Slides
[
this
.
CurPage
]);
shape
.
setParent
(
this
.
Slides
[
this
.
CurPage
]);
paragraph
=
shape
.
txBody
.
content
.
Content
[
0
];
NearPos
=
{
Paragraph
:
paragraph
,
ContentPos
:
paragraph
.
Get_ParaContentPos
(
false
,
false
)
};
paragraph
.
Check_NearestPos
(
NearPos
);
var
old_val
=
Content
.
DocContent
.
MoveDrawing
;
Content
.
DocContent
.
MoveDrawing
=
true
;
shape
.
txBody
.
content
.
Insert_Content
(
Content
.
DocContent
,
NearPos
);
Content
.
DocContent
.
MoveDrawing
=
old_val
;
var
body_pr
=
shape
.
getBodyPr
();
var
w
=
shape
.
txBody
.
getMaxContentWidth
(
this
.
Width
/
2
,
true
)
+
body_pr
.
lIns
+
body_pr
.
rIns
;
var
h
=
shape
.
txBody
.
content
.
Get_SummaryHeight
()
+
body_pr
.
tIns
+
body_pr
.
bIns
;
shape
.
spPr
.
xfrm
.
setExtX
(
w
);
shape
.
spPr
.
xfrm
.
setExtY
(
h
);
shape
.
spPr
.
xfrm
.
setOffX
((
this
.
Width
-
w
)
/
2
);
shape
.
spPr
.
xfrm
.
setOffY
((
this
.
Height
-
h
)
/
2
);
shape
.
setParent
(
this
.
Slides
[
this
.
CurPage
]);
shape
.
addToDrawingObjects
();
var
shape
=
this
.
CreateAndAddShapeFromSelectedContent
(
Content
.
DocContent
);
this
.
Slides
[
this
.
CurPage
].
graphicObjects
.
resetSelection
();
this
.
Slides
[
this
.
CurPage
].
graphicObjects
.
selectObject
(
shape
,
0
);
}
...
...
word/Editor/ParagraphContent.js
View file @
f9665fb6
...
...
@@ -4194,6 +4194,18 @@ ParaDrawing.prototype =
return
null
;
},
Get_AllDrawingObjects
:
function
(
DrawingObjects
)
{
if
(
null
==
DrawingObjects
)
{
DrawingObjects
=
[];
}
if
(
this
.
GraphicObj
.
Get_AllDrawingObjects
)
{
this
.
GraphicObj
.
Get_AllDrawingObjects
(
DrawingObjects
);
}
},
canRotate
:
function
()
{
return
isRealObject
(
this
.
GraphicObj
)
&&
typeof
this
.
GraphicObj
.
canRotate
==
"
function
"
&&
this
.
GraphicObj
.
canRotate
();
...
...
word/Editor/Run.js
View file @
f9665fb6
...
...
@@ -205,7 +205,10 @@ ParaRun.prototype.Get_AllDrawingObjects = function(DrawingObjs)
var
Item
=
this
.
Content
[
Index
];
if
(
para_Drawing
===
Item
.
Type
)
{
DrawingObjs
.
push
(
Item
);
Item
.
Get_AllDrawingObjects
(
DrawingObjs
);
}
}
};
...
...
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