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
3d7cb789
Commit
3d7cb789
authored
Jul 07, 2017
by
SergeyLuzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
creating notes
parent
3bd43e04
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
70 additions
and
48 deletions
+70
-48
cell/model/DrawingObjects/Format/ShapePrototype.js
cell/model/DrawingObjects/Format/ShapePrototype.js
+0
-5
common/Drawings/CommonController.js
common/Drawings/CommonController.js
+9
-4
common/Drawings/Format/GraphicFrame.js
common/Drawings/Format/GraphicFrame.js
+0
-5
common/Drawings/Format/GraphicObjectBase.js
common/Drawings/Format/GraphicObjectBase.js
+4
-0
common/Drawings/Format/GroupShape.js
common/Drawings/Format/GroupShape.js
+0
-5
common/Drawings/Format/Image.js
common/Drawings/Format/Image.js
+0
-5
common/Private/Locks.js
common/Private/Locks.js
+6
-2
common/Shapes/Serialize.js
common/Shapes/Serialize.js
+19
-4
common/Shapes/SerializeWriter.js
common/Shapes/SerializeWriter.js
+1
-1
slide/Editor/Format/Notes.js
slide/Editor/Format/Notes.js
+12
-0
slide/Editor/Format/NotesMaster.js
slide/Editor/Format/NotesMaster.js
+15
-9
slide/Editor/Format/Presentation.js
slide/Editor/Format/Presentation.js
+4
-4
word/Editor/GraphicObjects/Format/ShapePrototype.js
word/Editor/GraphicObjects/Format/ShapePrototype.js
+0
-4
No files found.
cell/model/DrawingObjects/Format/ShapePrototype.js
View file @
3d7cb789
...
...
@@ -87,11 +87,6 @@ CShape.prototype.Is_UseInDocument = function(){
return
false
;
};
CShape
.
prototype
.
isEmptyPlaceholder
=
function
()
{
return
false
;
};
CShape
.
prototype
.
getTextArtPreviewManager
=
function
()
{
return
Asc
[
"
editor
"
].
textArtPreviewManager
;
...
...
common/Drawings/CommonController.js
View file @
3d7cb789
...
...
@@ -6827,6 +6827,9 @@ DrawingObjectsController.prototype =
setSelectionState
:
function
(
state
,
stateIndex
)
{
if
(
!
Array
.
isArray
(
state
)){
return
;
}
var
_state_index
=
AscFormat
.
isRealNumber
(
stateIndex
)
?
stateIndex
:
state
.
length
-
1
;
var
selection_state
=
state
[
_state_index
];
this
.
clearPreTrackObjects
();
...
...
@@ -6865,11 +6868,13 @@ DrawingObjectsController.prototype =
}
else
{
for
(
var
i
=
0
;
i
<
selection_state
.
selection
.
length
;
++
i
)
{
if
(
!
selection_state
.
selection
[
i
].
object
.
bDeleted
)
if
(
Array
.
isArray
(
selection_state
.
selection
)){
for
(
var
i
=
0
;
i
<
selection_state
.
selection
.
length
;
++
i
)
{
this
.
selectObject
(
selection_state
.
selection
[
i
].
object
,
selection_state
.
selection
[
i
].
pageIndex
);
if
(
!
selection_state
.
selection
[
i
].
object
.
bDeleted
)
{
this
.
selectObject
(
selection_state
.
selection
[
i
].
object
,
selection_state
.
selection
[
i
].
pageIndex
);
}
}
}
}
...
...
common/Drawings/Format/GraphicFrame.js
View file @
3d7cb789
...
...
@@ -279,11 +279,6 @@ CGraphicFrame.prototype.copy= function()
return
ret
;
};
CGraphicFrame
.
prototype
.
isEmptyPlaceholder
=
function
()
{
return
false
;
};
CGraphicFrame
.
prototype
.
getAllFonts
=
function
(
fonts
)
{
if
(
this
.
graphicObject
)
...
...
common/Drawings/Format/GraphicObjectBase.js
View file @
3d7cb789
...
...
@@ -853,6 +853,10 @@
{
return
1
;
};
CGraphicObjectBase
.
prototype
.
isEmptyPlaceholder
=
function
()
{
return
false
;
};
CGraphicObjectBase
.
prototype
.
Restart_CheckSpelling
=
function
()
{
...
...
common/Drawings/Format/GroupShape.js
View file @
3d7cb789
...
...
@@ -1200,11 +1200,6 @@ function CGroupShape()
return
null
;
};
CGroupShape
.
prototype
.
isEmptyPlaceholder
=
function
()
{
return
false
;
};
CGroupShape
.
prototype
.
getCompiledFill
=
function
()
{
this
.
compiledFill
=
null
;
...
...
common/Drawings/Format/Image.js
View file @
3d7cb789
...
...
@@ -195,11 +195,6 @@ CImageShape.prototype.isPlaceholder = function()
return
this
.
nvPicPr
!=
null
&&
this
.
nvPicPr
.
nvPr
!=
undefined
&&
this
.
nvPicPr
.
nvPr
.
ph
!=
undefined
;
};
CImageShape
.
prototype
.
isEmptyPlaceholder
=
function
()
{
return
false
;
};
CImageShape
.
prototype
.
isShape
=
function
()
{
return
false
;
...
...
common/Private/Locks.js
View file @
3d7cb789
...
...
@@ -773,11 +773,15 @@ if(typeof CPresentation !== "undefined")
AscCommon
.
CollaborativeEditing
.
OnStart_CheckLock
();
var
oController
=
this
.
GetCurrentController
();
if
(
!
oController
){
return
false
;
}
if
(
CheckType
===
AscCommon
.
changestype_Drawing_Props
)
{
if
(
cur_slide
.
deleteLock
.
Lock
.
Type
!==
locktype_Mine
&&
cur_slide
.
deleteLock
.
Lock
.
Type
!==
locktype_None
)
return
true
;
var
selected_objects
=
cur_slide
.
graphicObjects
.
selectedObjects
;
var
selected_objects
=
oController
.
selectedObjects
;
for
(
var
i
=
0
;
i
<
selected_objects
.
length
;
++
i
)
{
var
check_obj
=
...
...
@@ -919,7 +923,7 @@ if(typeof CPresentation !== "undefined")
{
if
(
cur_slide
.
deleteLock
.
Lock
.
Type
!==
locktype_Mine
&&
cur_slide
.
deleteLock
.
Lock
.
Type
!==
locktype_None
)
return
true
;
var
selected_objects
=
cur_slide
.
graphicObjects
.
selectedObjects
;
var
selected_objects
=
oController
.
selectedObjects
;
for
(
var
i
=
0
;
i
<
selected_objects
.
length
;
++
i
)
{
var
check_obj
=
...
...
common/Shapes/Serialize.js
View file @
3d7cb789
...
...
@@ -717,16 +717,31 @@ function BinaryPPTYLoader()
this
.
presentation
.
slideMasters
[
0
]
=
AscFormat
.
GenerateDefaultMasterSlide
(
this
.
presentation
.
themes
[
0
]);
this
.
presentation
.
slideLayouts
[
0
]
=
this
.
presentation
.
slideMasters
[
0
].
sldLayoutLst
[
0
];
}
if
(
this
.
presentation
.
slideMasters
[
0
].
sldLayoutLst
.
length
===
0
)
{
if
(
this
.
presentation
.
slideMasters
[
0
].
sldLayoutLst
.
length
===
0
)
{
this
.
presentation
.
slideMasters
[
0
].
sldLayoutLst
[
0
]
=
AscFormat
.
GenerateDefaultSlideLayout
(
this
.
presentation
.
slideMasters
[
0
]);
this
.
presentation
.
slideLayouts
[
0
]
=
this
.
presentation
.
slideMasters
[
0
].
sldLayoutLst
[
0
];
}
if
(
this
.
presentation
.
Slides
.
length
==
0
)
{
this
.
presentation
.
Slides
[
0
]
=
AscFormat
.
GenerateDefaultSlide
(
this
.
presentation
.
slideLayouts
[
0
]);
this
.
presentation
.
Slides
[
0
]
=
AscCommonSlide
.
GenerateDefaultSlide
(
this
.
presentation
.
slideLayouts
[
0
]);
}
if
(
this
.
presentation
.
notesMasters
.
length
===
0
)
{
this
.
presentation
.
notesMasters
[
0
]
=
AscCommonSlide
.
CreateNotesMaster
();
this
.
presentation
.
notesMasters
[
0
].
setTheme
(
this
.
presentation
.
themes
[
0
]);
}
var
_slides
=
this
.
presentation
.
Slides
;
var
_slide
;
for
(
var
i
=
0
;
i
<
_slides
.
length
;
++
i
)
{
_slide
=
_slides
[
i
];
if
(
!
_slide
.
notes
){
_slide
.
setNotes
(
AscCommonSlide
.
CreateNotes
());
_slide
.
notes
.
setSlide
(
_slide
);
_slide
.
notes
.
setNotesMaster
(
this
.
presentation
.
notesMasters
[
0
]);
}
}
//var _editor = this.Api;
//_editor.sync_InitEditorThemes(_editor.ThemeLoader.Themes.EditorThemes, _editor.ThemeLoader.Themes.DocumentThemes);
}
...
...
common/Shapes/SerializeWriter.js
View file @
3d7cb789
...
...
@@ -507,7 +507,7 @@ function CBinaryFileWriter()
for
(
var
i
=
0
;
i
<
_slide_count
;
i
++
)
{
_dst_slides
[
i
]
=
_slides
[
i
];
if
(
_slides
[
i
].
notes
)
if
(
_slides
[
i
].
notes
&&
!
_slides
[
i
].
notes
.
isEmptyBody
()
)
{
_dst_notes
.
push
(
_slides
[
i
].
notes
);
}
...
...
slide/Editor/Format/Notes.js
View file @
3d7cb789
...
...
@@ -248,9 +248,19 @@
};
CNotes
.
prototype
.
isEmptyBody
=
function
(){
var
oBodyShape
=
this
.
getBodyShape
();
if
(
!
oBodyShape
){
return
true
;
}
return
oBodyShape
.
isEmptyPlaceholder
();
};
function
CreateNotes
(){
var
oN
=
new
CNotes
();
var
oSp
=
new
AscFormat
.
CShape
();
oSp
.
setBDeleted
(
false
);
var
oNvSpPr
=
new
AscFormat
.
UniNvPr
();
var
oCNvPr
=
oNvSpPr
.
cNvPr
;
oCNvPr
.
setId
(
2
);
...
...
@@ -268,6 +278,7 @@
oN
.
addToSpTreeToPos
(
0
,
oSp
);
oSp
=
new
AscFormat
.
CShape
();
oSp
.
setBDeleted
(
false
);
oNvSpPr
=
new
AscFormat
.
UniNvPr
();
oCNvPr
=
oNvSpPr
.
cNvPr
;
oCNvPr
.
setId
(
3
);
...
...
@@ -289,6 +300,7 @@
oN
.
addToSpTreeToPos
(
1
,
oSp
);
oSp
=
new
AscFormat
.
CShape
();
oSp
.
setBDeleted
(
false
);
oNvSpPr
=
new
AscFormat
.
UniNvPr
();
oCNvPr
=
oNvSpPr
.
cNvPr
;
oCNvPr
.
setId
(
4
);
...
...
slide/Editor/Format/NotesMaster.js
View file @
3d7cb789
...
...
@@ -161,6 +161,7 @@
oNM
.
changeBackground
(
oBG
);
var
oSp
=
new
AscFormat
.
CShape
();
oSp
.
setBDeleted
(
false
);
var
oNvSpPr
=
new
AscFormat
.
UniNvPr
();
var
oCNvPr
=
oNvSpPr
.
cNvPr
;
oCNvPr
.
setId
(
2
);
...
...
@@ -173,8 +174,8 @@
oSp
.
setLockValue
(
AscFormat
.
LOCKS_MASKS
.
noGrp
,
true
);
oSp
.
setSpPr
(
new
AscFormat
.
CSpPr
());
oSp
.
spPr
.
setParent
(
oSp
);
oSp
.
spPr
.
xfrm
.
setParent
(
oSp
.
spPr
);
oSp
.
spPr
.
setXfrm
(
new
AscFormat
.
CXfrm
());
oSp
.
spPr
.
xfrm
.
setParent
(
oSp
.
spPr
);
oSp
.
spPr
.
xfrm
.
setOffX
(
0
);
oSp
.
spPr
.
xfrm
.
setOffY
(
0
);
oSp
.
spPr
.
xfrm
.
setExtX
(
2971800
/
36000
);
...
...
@@ -202,6 +203,7 @@
//endParaPr
oSp
=
new
AscFormat
.
CShape
();
oSp
.
setBDeleted
(
false
);
oNvSpPr
=
new
AscFormat
.
UniNvPr
();
oCNvPr
=
oNvSpPr
.
cNvPr
;
oCNvPr
.
setId
(
3
);
...
...
@@ -214,8 +216,8 @@
oSp
.
setLockValue
(
AscFormat
.
LOCKS_MASKS
.
noGrp
,
true
);
oSp
.
setSpPr
(
new
AscFormat
.
CSpPr
());
oSp
.
spPr
.
setParent
(
oSp
);
oSp
.
spPr
.
xfrm
.
setParent
(
oSp
.
spPr
);
oSp
.
spPr
.
setXfrm
(
new
AscFormat
.
CXfrm
());
oSp
.
spPr
.
xfrm
.
setParent
(
oSp
.
spPr
);
oSp
.
spPr
.
xfrm
.
setOffX
(
3884613
/
36000
);
oSp
.
spPr
.
xfrm
.
setOffY
(
0
);
oSp
.
spPr
.
xfrm
.
setExtX
(
2971800
/
36000
);
...
...
@@ -243,6 +245,7 @@
oNM
.
addToSpTreeToPos
(
1
,
oSp
);
oSp
=
new
AscFormat
.
CShape
();
oSp
.
setBDeleted
(
false
);
oNvSpPr
=
new
AscFormat
.
UniNvPr
();
oCNvPr
=
oNvSpPr
.
cNvPr
;
oCNvPr
.
setId
(
3
);
...
...
@@ -255,8 +258,8 @@
oSp
.
setLockValue
(
AscFormat
.
LOCKS_MASKS
.
noGrp
,
true
);
oSp
.
setSpPr
(
new
AscFormat
.
CSpPr
());
oSp
.
spPr
.
setParent
(
oSp
);
oSp
.
spPr
.
xfrm
.
setParent
(
oSp
.
spPr
);
oSp
.
spPr
.
setXfrm
(
new
AscFormat
.
CXfrm
());
oSp
.
spPr
.
xfrm
.
setParent
(
oSp
.
spPr
);
oSp
.
spPr
.
xfrm
.
setOffX
(
3884613
/
36000
);
oSp
.
spPr
.
xfrm
.
setOffY
(
0
);
oSp
.
spPr
.
xfrm
.
setExtX
(
2971800
/
36000
);
...
...
@@ -284,6 +287,7 @@
oNM
.
addToSpTreeToPos
(
2
,
oSp
);
oSp
=
new
AscFormat
.
CShape
();
oSp
.
setBDeleted
(
false
);
oNvSpPr
=
new
AscFormat
.
UniNvPr
();
oCNvPr
=
oNvSpPr
.
cNvPr
;
oCNvPr
.
setId
(
5
);
...
...
@@ -297,8 +301,8 @@
oSp
.
setLockValue
(
AscFormat
.
LOCKS_MASKS
.
noGrp
,
true
);
oSp
.
setSpPr
(
new
AscFormat
.
CSpPr
());
oSp
.
spPr
.
setParent
(
oSp
);
oSp
.
spPr
.
xfrm
.
setParent
(
oSp
.
spPr
);
oSp
.
spPr
.
setXfrm
(
new
AscFormat
.
CXfrm
());
oSp
.
spPr
.
xfrm
.
setParent
(
oSp
.
spPr
);
oSp
.
spPr
.
xfrm
.
setOffX
(
685800
/
36000
);
oSp
.
spPr
.
xfrm
.
setOffY
(
4400550
/
36000
);
oSp
.
spPr
.
xfrm
.
setExtX
(
5486400
/
36000
);
...
...
@@ -322,6 +326,7 @@
oNM
.
addToSpTreeToPos
(
3
,
oSp
);
oSp
=
new
AscFormat
.
CShape
();
oSp
.
setBDeleted
(
false
);
oNvSpPr
=
new
AscFormat
.
UniNvPr
();
oCNvPr
=
oNvSpPr
.
cNvPr
;
oCNvPr
.
setId
(
6
);
...
...
@@ -335,8 +340,8 @@
oSp
.
setLockValue
(
AscFormat
.
LOCKS_MASKS
.
noGrp
,
true
);
oSp
.
setSpPr
(
new
AscFormat
.
CSpPr
());
oSp
.
spPr
.
setParent
(
oSp
);
oSp
.
spPr
.
xfrm
.
setParent
(
oSp
.
spPr
);
oSp
.
spPr
.
setXfrm
(
new
AscFormat
.
CXfrm
());
oSp
.
spPr
.
xfrm
.
setParent
(
oSp
.
spPr
);
oSp
.
spPr
.
xfrm
.
setOffX
(
0
);
oSp
.
spPr
.
xfrm
.
setOffY
(
8685213
/
36000
);
oSp
.
spPr
.
xfrm
.
setExtX
(
2971800
/
36000
);
...
...
@@ -364,6 +369,7 @@
oNM
.
addToSpTreeToPos
(
4
,
oSp
);
oSp
=
new
AscFormat
.
CShape
();
oSp
.
setBDeleted
(
false
);
oNvSpPr
=
new
AscFormat
.
UniNvPr
();
oCNvPr
=
oNvSpPr
.
cNvPr
;
oCNvPr
.
setId
(
7
);
...
...
@@ -377,8 +383,8 @@
oSp
.
setLockValue
(
AscFormat
.
LOCKS_MASKS
.
noGrp
,
true
);
oSp
.
setSpPr
(
new
AscFormat
.
CSpPr
());
oSp
.
spPr
.
setParent
(
oSp
);
oSp
.
spPr
.
xfrm
.
setParent
(
oSp
.
spPr
);
oSp
.
spPr
.
setXfrm
(
new
AscFormat
.
CXfrm
());
oSp
.
spPr
.
xfrm
.
setParent
(
oSp
.
spPr
);
oSp
.
spPr
.
xfrm
.
setOffX
(
3884613
/
36000
);
oSp
.
spPr
.
xfrm
.
setOffY
(
8685213
/
36000
);
oSp
.
spPr
.
xfrm
.
setExtX
(
2971800
/
36000
);
...
...
@@ -430,9 +436,9 @@
oTxLstStyle
.
levels
[
0
].
DefaultRunPr
.
FontSize
=
12
;
oTxLstStyle
.
levels
[
0
].
DefaultRunPr
.
Unifill
=
AscFormat
.
CreateUniFillSchemeColorWidthTint
(
15
,
0
);
oTxLstStyle
.
levels
[
0
].
DefaultRunPr
.
RFonts
.
Ascii
.
Name
=
"
+mn-lt
"
;
oTxLstStyle
.
levels
[
0
].
DefaultRunPr
.
RFonts
.
EastAsia
.
Name
=
"
+mn-ea
"
;
oTxLstStyle
.
levels
[
0
].
DefaultRunPr
.
RFonts
.
CS
.
Name
=
"
+mn-cd
"
;
oTxLstStyle
.
levels
[
0
].
DefaultRunPr
.
RFonts
.
Ascii
=
{
Name
:
"
+mn-lt
"
,
Index
:
-
1
}
;
oTxLstStyle
.
levels
[
0
].
DefaultRunPr
.
RFonts
.
EastAsia
=
{
Name
:
"
+mn-ea
"
,
Index
:
-
1
}
;
oTxLstStyle
.
levels
[
0
].
DefaultRunPr
.
RFonts
.
CS
=
{
Name
:
"
+mn-cs
"
,
Index
:
-
1
}
;
oTxLstStyle
.
levels
[
1
]
=
oTxLstStyle
.
levels
[
0
].
Copy
();
oTxLstStyle
.
levels
[
1
].
Ind
.
Left
=
457200
/
36000
;
...
...
slide/Editor/Format/Presentation.js
View file @
3d7cb789
...
...
@@ -2038,8 +2038,8 @@ CPresentation.prototype =
}
if
(
this
.
FocusOnNotes
){
var
oCurSlide
=
this
.
Slides
[
this
.
CurPage
];
if
(
oCurSlide
.
notes
Shape
){
oCurSlide
.
notes
Shape
.
paragraphAdd
(
ParaItem
,
bRecalculate
);
if
(
oCurSlide
.
notes
){
oCurSlide
.
notes
.
graphicObjects
.
paragraphAdd
(
ParaItem
,
bRecalculate
);
bRecalculate
=
false
;
}
}
...
...
@@ -2639,7 +2639,7 @@ CPresentation.prototype =
var
oTargetTextObject
=
AscFormat
.
getTargetTextObject
(
oDrawingObjects
);
var
bNeedRedraw
;
if
(
oTargetTextObject
&&
oTargetTextObject
.
isEmptyPlaceholder
&&
oTargetTextObject
.
isEmptyPlaceholder
())
if
(
oTargetTextObject
.
isEmptyPlaceholder
())
{
bNeedRedraw
=
true
;
}
...
...
@@ -5045,7 +5045,7 @@ CPresentation.prototype =
slide
.
setLayout
(
layout
);
for
(
var
j
=
slide
.
cSld
.
spTree
.
length
-
1
;
j
>
-
1
;
--
j
)
{
if
(
slide
.
cSld
.
spTree
[
j
].
isEmptyPlaceholder
&&
slide
.
cSld
.
spTree
[
j
].
isEmptyPlaceholder
())
if
(
slide
.
cSld
.
spTree
[
j
].
isEmptyPlaceholder
())
{
slide
.
removeFromSpTreeById
(
slide
.
cSld
.
spTree
[
j
].
Get_Id
());
}
...
...
word/Editor/GraphicObjects/Format/ShapePrototype.js
View file @
3d7cb789
...
...
@@ -108,10 +108,6 @@ CShape.prototype.recalcBrush = function()
this
.
recalcInfo
.
recalculateBrush
=
true
;
};
CShape
.
prototype
.
isEmptyPlaceholder
=
function
()
{
return
false
;
};
CShape
.
prototype
.
recalcPen
=
function
()
{
...
...
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