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
9cb5bf3b
Commit
9cb5bf3b
authored
Jun 17, 2016
by
alexey.musinov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
https://github.com/ONLYOFFICE/sdkjs
into develop
parents
028b208a
112a65be
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
340 additions
and
218 deletions
+340
-218
cell/api.js
cell/api.js
+7
-4
cell/view/WorkbookView.js
cell/view/WorkbookView.js
+22
-4
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+111
-35
slide/Editor/Format/Presentation.js
slide/Editor/Format/Presentation.js
+1
-1
word/Editor/Document.js
word/Editor/Document.js
+123
-171
word/Editor/DocumentControllerBase.js
word/Editor/DocumentControllerBase.js
+10
-0
word/Editor/DrawingsController.js
word/Editor/DrawingsController.js
+20
-0
word/Editor/Footnotes.js
word/Editor/Footnotes.js
+24
-0
word/Editor/GraphicObjects/Format/ShapePrototype.js
word/Editor/GraphicObjects/Format/ShapePrototype.js
+5
-3
word/Editor/HeaderFooterController.js
word/Editor/HeaderFooterController.js
+9
-0
word/Editor/LogicDocumentController.js
word/Editor/LogicDocumentController.js
+8
-0
No files found.
cell/api.js
View file @
9cb5bf3b
...
@@ -1994,12 +1994,15 @@ var editor;
...
@@ -1994,12 +1994,15 @@ var editor;
* Делает активной указанную ячейку
* Делает активной указанную ячейку
* @param {String} reference Ссылка на ячейку вида A1 или R1C1
* @param {String} reference Ссылка на ячейку вида A1 или R1C1
*/
*/
spreadsheet_api
.
prototype
.
asc_findCell
=
function
(
reference
)
{
spreadsheet_api
.
prototype
.
asc_findCell
=
function
(
reference
)
{
if
(
this
.
wb
.
cellEditor
.
isOpened
)
return
;
if
(
this
.
wb
.
cellEditor
.
isOpened
)
{
return
;
}
var
d
=
this
.
wb
.
findCell
(
reference
);
var
d
=
this
.
wb
.
findCell
(
reference
);
if
(
!
d
)
{
if
(
!
d
)
{
this
.
handlers
.
trigger
(
"
asc_onError
"
,
c_oAscError
.
ID
.
InvalidReferenceOrName
,
c_oAscError
.
Level
.
NoCritical
);
if
(
!
this
.
isViewMode
)
{
this
.
handlers
.
trigger
(
"
asc_onError
"
,
c_oAscError
.
ID
.
InvalidReferenceOrName
,
c_oAscError
.
Level
.
NoCritical
);
}
return
;
return
;
}
}
...
...
cell/view/WorkbookView.js
View file @
9cb5bf3b
...
@@ -2247,14 +2247,13 @@
...
@@ -2247,14 +2247,13 @@
// Поиск ячейки по ссылке
// Поиск ячейки по ссылке
WorkbookView
.
prototype
.
findCell
=
function
(
reference
)
{
WorkbookView
.
prototype
.
findCell
=
function
(
reference
)
{
var
ws
=
this
.
getWorksheet
()
,
retRange
;
var
ws
=
this
.
getWorksheet
();
// Останавливаем ввод данных в редакторе ввода
// Останавливаем ввод данных в редакторе ввода
if
(
ws
.
getCellEditMode
())
{
if
(
ws
.
getCellEditMode
())
{
this
.
_onStopCellEditing
();
this
.
_onStopCellEditing
();
}
}
return
ws
.
findCell
(
reference
,
this
.
controller
.
settings
.
isViewerMode
);
return
ws
.
findCell
(
reference
);
};
};
WorkbookView
.
prototype
.
getDefinedNames
=
function
(
defNameListId
)
{
WorkbookView
.
prototype
.
getDefinedNames
=
function
(
defNameListId
)
{
...
@@ -2297,8 +2296,27 @@
...
@@ -2297,8 +2296,27 @@
defNameId
=
defNameId
?
defNameId
.
nodeId
:
null
;
defNameId
=
defNameId
?
defNameId
.
nodeId
:
null
;
}
}
ws
.
_isLockedDefNames
(
editDefinedNamesCallback
,
defNameId
);
var
callback
=
function
()
{
ws
.
_isLockedDefNames
(
editDefinedNamesCallback
,
defNameId
);
};
var
tableRange
;
if
(
oldName
&&
true
===
oldName
.
isTable
)
{
var
table
=
ws
.
model
.
autoFilters
.
_getFilterByDisplayName
(
oldName
.
Name
);
if
(
table
)
{
tableRange
=
table
.
Ref
;
}
}
if
(
tableRange
)
{
ws
.
_isLockedCells
(
tableRange
,
null
,
callback
);
}
else
{
callback
();
}
};
};
WorkbookView
.
prototype
.
delDefinedNames
=
function
(
oldName
)
{
WorkbookView
.
prototype
.
delDefinedNames
=
function
(
oldName
)
{
...
...
cell/view/WorksheetView.js
View file @
9cb5bf3b
...
@@ -11074,65 +11074,74 @@
...
@@ -11074,65 +11074,74 @@
return
oneUser
?
onReplaceCallback
(
true
)
:
this
.
_isLockedCells
(
aReplaceCells
[
options
.
indexInArray
],
/*subType*/
null
,
onReplaceCallback
);
return
oneUser
?
onReplaceCallback
(
true
)
:
this
.
_isLockedCells
(
aReplaceCells
[
options
.
indexInArray
],
/*subType*/
null
,
onReplaceCallback
);
};
};
WorksheetView
.
prototype
.
findCell
=
function
(
reference
)
{
WorksheetView
.
prototype
.
findCell
=
function
(
reference
,
isViewerMode
)
{
var
range
=
AscCommonExcel
.
g_oRangeCache
.
getRange3D
(
reference
)
||
AscCommonExcel
.
g_oRangeCache
.
getAscRange
(
reference
);
var
range
=
AscCommonExcel
.
g_oRangeCache
.
getRange3D
(
reference
)
||
if
(
!
range
)
{
AscCommonExcel
.
g_oRangeCache
.
getAscRange
(
reference
);
/*TODO: сделать поиск по названиям автофигур, должен искать до того как вызвать поиск по именованным диапазонам*/
if
(
!
range
)
{
if
(
isViewerMode
)
{
return
range
;
}
var
defName
=
this
.
model
.
workbook
.
getDefinesNames
(
reference
,
this
.
model
.
workbook
.
getActiveWs
().
getId
()
),
sheetName
,
ref
;
/*TODO: сделать поиск по названиям автофигур, должен искать до того как вызвать поиск по именованным диапазонам*/
if
(
!
defName
)
{
var
defName
=
this
.
model
.
workbook
.
getDefinesNames
(
reference
,
if
(
this
.
collaborativeEditing
.
getGlobalLock
()
||
!
this
.
handlers
.
trigger
(
"
getLockDefNameManagerStatus
"
)
)
{
this
.
model
.
workbook
.
getActiveWs
().
getId
()),
sheetName
,
ref
;
this
.
handlers
.
trigger
(
"
onErrorEvent
"
,
c_oAscError
.
ID
.
LockCreateDefName
,
c_oAscError
.
Level
.
NoCritical
);
if
(
!
defName
)
{
if
(
this
.
collaborativeEditing
.
getGlobalLock
()
||
!
this
.
handlers
.
trigger
(
"
getLockDefNameManagerStatus
"
))
{
this
.
handlers
.
trigger
(
"
onErrorEvent
"
,
c_oAscError
.
ID
.
LockCreateDefName
,
c_oAscError
.
Level
.
NoCritical
);
this
.
_updateSelectionNameAndInfo
();
this
.
_updateSelectionNameAndInfo
();
return
true
;
return
true
;
}
}
var
actRange
=
this
.
getActiveRangeObj
(),
ascRange
,
mc
=
this
.
model
.
getMergedByCell
(
actRange
.
startRow
,
actRange
.
startCol
),
c1
=
mc
?
mc
.
c1
:
actRange
.
c1
,
r1
=
mc
?
mc
.
r1
:
actRange
.
r1
,
ar_norm
=
actRange
.
normalize
(),
mc_norm
=
mc
?
mc
.
normalize
()
:
null
,
c2
=
mc_norm
?
(
mc_norm
.
isEqual
(
ar_norm
)
?
mc_norm
.
c1
:
ar_norm
.
c2
)
:
ar_norm
.
c2
,
r2
=
mc_norm
?
(
mc_norm
.
isEqual
(
ar_norm
)
?
mc_norm
.
r1
:
ar_norm
.
r2
)
:
ar_norm
.
r2
;
var
actRange
=
this
.
getActiveRangeObj
(),
ascRange
,
mc
=
this
.
model
.
getMergedByCell
(
actRange
.
startRow
,
actRange
.
startCol
),
c1
=
mc
?
mc
.
c1
:
actRange
.
c1
,
r1
=
mc
?
mc
.
r1
:
actRange
.
r1
,
ar_norm
=
actRange
.
normalize
(),
mc_norm
=
mc
?
mc
.
normalize
()
:
null
,
c2
=
mc_norm
?
(
mc_norm
.
isEqual
(
ar_norm
)
?
mc_norm
.
c1
:
ar_norm
.
c2
)
:
ar_norm
.
c2
,
r2
=
mc_norm
?
(
mc_norm
.
isEqual
(
ar_norm
)
?
mc_norm
.
r1
:
ar_norm
.
r2
)
:
ar_norm
.
r2
;
ascRange
=
new
asc_Range
(
c1
,
r1
,
c2
,
r2
);
ascRange
=
new
asc_Range
(
c1
,
r1
,
c2
,
r2
);
defName
=
this
.
model
.
workbook
.
editDefinesNames
(
null
,
new
Asc
.
asc_CDefName
(
reference
,
this
.
model
.
getName
()
+
"
!
"
+
ascRange
.
getAbsName
()
)
);
defName
=
this
.
model
.
workbook
.
editDefinesNames
(
null
,
new
Asc
.
asc_CDefName
(
reference
,
this
.
model
.
getName
()
+
"
!
"
+
ascRange
.
getAbsName
()));
}
}
if
(
defName
)
{
if
(
defName
)
{
range
=
true
;
range
=
true
;
this
.
_isLockedDefNames
(
null
,
defName
.
nodeId
);
this
.
_isLockedDefNames
(
null
,
defName
.
nodeId
);
if
(
defName
.
isTable
)
{
if
(
defName
.
isTable
)
{
sheetName
=
defName
.
Ref
.
split
(
"
!
"
);
sheetName
=
defName
.
Ref
.
split
(
"
!
"
);
ref
=
sheetName
[
1
];
ref
=
sheetName
[
1
];
sheetName
=
sheetName
[
0
];
sheetName
=
sheetName
[
0
];
if
(
sheetName
[
0
]
==
"
'
"
&&
sheetName
[
sheetName
.
length
-
1
]
==
"
'
"
)
{
if
(
sheetName
[
0
]
==
"
'
"
&&
sheetName
[
sheetName
.
length
-
1
]
==
"
'
"
)
{
sheetName
=
sheetName
.
substring
(
1
,
sheetName
.
length
-
1
);
sheetName
=
sheetName
.
substring
(
1
,
sheetName
.
length
-
1
);
}
}
range
=
AscCommonExcel
.
g_oRangeCache
.
getAscRange
(
ref
);
range
=
AscCommonExcel
.
g_oRangeCache
.
getAscRange
(
ref
);
sheetName
=
this
.
model
.
workbook
.
getWorksheetByName
(
sheetName
);
sheetName
=
this
.
model
.
workbook
.
getWorksheetByName
(
sheetName
);
}
}
else
if
(
defName
.
parsedRef
.
RefPos
.
length
==
1
&&
defName
.
parsedRef
.
outStack
.
length
==
1
)
{
else
if
(
defName
.
parsedRef
.
RefPos
.
length
==
1
&&
defName
.
parsedRef
.
outStack
.
length
==
1
)
{
ref
=
defName
.
parsedRef
.
outStack
[
0
];
ref
=
defName
.
parsedRef
.
outStack
[
0
];
if
(
ref
.
type
==
AscCommonExcel
.
cElementType
.
cell3D
)
{
if
(
ref
.
type
==
AscCommonExcel
.
cElementType
.
cell3D
)
{
range
=
ref
.
range
.
getBBox0
().
clone
(
true
);
range
=
ref
.
range
.
getBBox0
().
clone
(
true
);
sheetName
=
ref
.
getWS
();
sheetName
=
ref
.
getWS
();
}
}
else
if
(
ref
.
type
==
AscCommonExcel
.
cElementType
.
cellsRange3D
&&
ref
.
wsFrom
==
ref
.
wsTo
)
{
else
if
(
ref
.
type
==
AscCommonExcel
.
cElementType
.
cellsRange3D
&&
ref
.
wsFrom
==
ref
.
wsTo
)
{
range
=
ref
.
getRange
()[
0
].
getBBox0
().
clone
(
true
);
range
=
ref
.
getRange
()[
0
].
getBBox0
().
clone
(
true
);
sheetName
=
this
.
model
.
workbook
.
getWorksheetById
(
ref
.
wsFrom
);
sheetName
=
this
.
model
.
workbook
.
getWorksheetById
(
ref
.
wsFrom
);
}
}
}
}
if
(
range
&&
sheetName
)
{
if
(
range
&&
sheetName
)
{
ar_norm
=
range
.
normalize
();
ar_norm
=
range
.
normalize
();
mc
=
sheetName
.
getMergedByCell
(
ar_norm
.
r1
,
ar_norm
.
c1
);
mc
=
sheetName
.
getMergedByCell
(
ar_norm
.
r1
,
ar_norm
.
c1
);
range
=
{
range
:
mc
?
mc
:
range
,
sheet
:
sheetName
.
getName
()};
range
=
{
range
:
mc
?
mc
:
range
,
sheet
:
sheetName
.
getName
()};
}
}
}
}
}
}
else
{
else
{
var
ar_norm
=
range
.
normalize
(),
mc
=
this
.
model
.
getMergedByCell
(
ar_norm
.
r1
,
ar_norm
.
c1
);
var
ar_norm
=
range
.
normalize
(),
mc
=
this
.
model
.
getMergedByCell
(
ar_norm
.
r1
,
ar_norm
.
c1
);
range
=
{
range
:
mc
?
mc
:
range
,
sheet
:
this
.
model
.
getName
()};
range
=
{
range
:
mc
?
mc
:
range
,
sheet
:
this
.
model
.
getName
()};
}
}
return
range
;
// ? this.setSelection(range, true) : null;
return
range
;
};
};
/* Ищет дополнение для ячейки */
/* Ищет дополнение для ячейки */
...
@@ -13288,7 +13297,15 @@
...
@@ -13288,7 +13297,15 @@
History
.
EndTransaction
();
History
.
EndTransaction
();
};
};
t
.
_isLockedCells
(
tablePart
.
Ref
,
null
,
callback
);
var
lockRange
=
t
.
af_getRangeForChangeTableInfo
(
tablePart
,
optionType
,
val
);
if
(
lockRange
)
{
t
.
_isLockedCells
(
lockRange
,
null
,
callback
);
}
else
{
callback
();
}
}
}
};
};
...
@@ -13321,6 +13338,50 @@
...
@@ -13321,6 +13338,50 @@
return
res
;
return
res
;
};
};
WorksheetView
.
prototype
.
af_getRangeForChangeTableInfo
=
function
(
tablePart
,
optionType
,
val
)
{
var
res
=
null
;
switch
(
optionType
)
{
case
c_oAscChangeTableStyleInfo
.
columnBanded
:
case
c_oAscChangeTableStyleInfo
.
columnFirst
:
case
c_oAscChangeTableStyleInfo
.
columnLast
:
case
c_oAscChangeTableStyleInfo
.
rowBanded
:
case
c_oAscChangeTableStyleInfo
.
filterButton
:
{
res
=
tablePart
.
Ref
;
break
;
}
case
c_oAscChangeTableStyleInfo
.
rowTotal
:
{
if
(
val
===
false
)
{
res
=
tablePart
.
Ref
;
}
else
{
res
=
new
Asc
.
Range
(
tablePart
.
Ref
.
c1
,
tablePart
.
Ref
.
r1
,
tablePart
.
Ref
.
c2
,
tablePart
.
Ref
.
r2
+
1
);
}
break
;
}
case
c_oAscChangeTableStyleInfo
.
rowHeader
:
{
if
(
val
===
false
)
{
res
=
tablePart
.
Ref
;
}
else
{
res
=
new
Asc
.
Range
(
tablePart
.
Ref
.
c1
,
tablePart
.
Ref
.
r1
-
1
,
tablePart
.
Ref
.
c2
,
tablePart
.
Ref
.
r2
);
}
break
;
}
}
return
res
;
};
WorksheetView
.
prototype
.
af_insertCellsInTable
=
function
(
tableName
,
optionType
)
WorksheetView
.
prototype
.
af_insertCellsInTable
=
function
(
tableName
,
optionType
)
{
{
var
t
=
this
;
var
t
=
this
;
...
@@ -13769,7 +13830,22 @@
...
@@ -13769,7 +13830,22 @@
History
.
EndTransaction
();
History
.
EndTransaction
();
};
};
t
.
_isLockedCells
(
range
,
null
,
callback
);
//TODO возможно не стоит лочить весь диапазон. проверить: когда один ползователь меняет диапазон, другой снимает а/ф с ф/т. в этом случае в deleteAutoFilter передавать не range а имя ф/т
var
table
=
t
.
model
.
autoFilters
.
_getFilterByDisplayName
(
tableName
);
var
tableRange
=
null
!==
table
?
table
.
Ref
:
null
;
var
lockRange
=
range
;
if
(
null
!==
tableRange
)
{
var
r1
=
tableRange
.
r1
<
range
.
r1
?
tableRange
.
r1
:
range
.
r1
;
var
r2
=
tableRange
.
r2
>
range
.
r2
?
tableRange
.
r2
:
range
.
r2
;
var
c1
=
tableRange
.
c1
<
range
.
c1
?
tableRange
.
c1
:
range
.
c1
;
var
c2
=
tableRange
.
c2
>
range
.
c2
?
tableRange
.
c2
:
range
.
c2
;
lockRange
=
new
Asc
.
Range
(
c1
,
r1
,
c2
,
r2
);
}
t
.
_isLockedCells
(
lockRange
,
null
,
callback
);
};
};
WorksheetView
.
prototype
.
af_checkChangeRange
=
function
(
range
)
{
WorksheetView
.
prototype
.
af_checkChangeRange
=
function
(
range
)
{
...
...
slide/Editor/Format/Presentation.js
View file @
9cb5bf3b
...
@@ -286,7 +286,7 @@ CShowPr.prototype.Read_FromBinary = function(r){
...
@@ -286,7 +286,7 @@ CShowPr.prototype.Read_FromBinary = function(r){
this
.
penClr
=
new
AscFormat
.
CUniColor
();
this
.
penClr
=
new
AscFormat
.
CUniColor
();
this
.
penClr
.
Read_FromBinary
(
r
);
this
.
penClr
.
Read_FromBinary
(
r
);
}
}
this
.
present
=
r
.
Read_FromBinary
(
r
);
this
.
present
=
r
.
GetBool
(
);
if
(
Flags
&
16
){
if
(
Flags
&
16
){
this
.
show
=
{};
this
.
show
=
{};
this
.
show
.
showAll
=
r
.
GetBool
();
this
.
show
.
showAll
=
r
.
GetBool
();
...
...
word/Editor/Document.js
View file @
9cb5bf3b
This diff is collapsed.
Click to expand it.
word/Editor/DocumentControllerBase.js
View file @
9cb5bf3b
...
@@ -431,6 +431,16 @@ CDocumentControllerBase.prototype.SetParagraphBorders = function(Borders){};
...
@@ -431,6 +431,16 @@ CDocumentControllerBase.prototype.SetParagraphBorders = function(Borders){};
* @param bDelete
* @param bDelete
*/
*/
CDocumentControllerBase
.
prototype
.
SetParagraphFramePr
=
function
(
FramePr
,
bDelete
){};
CDocumentControllerBase
.
prototype
.
SetParagraphFramePr
=
function
(
FramePr
,
bDelete
){};
/**
* Уменьшаем или увеличиваем (по специальной таблице) размер шрифта в параграфе.
* @param {boolean} bIncrease
*/
CDocumentControllerBase
.
prototype
.
IncreaseOrDecreaseParagraphFontSize
=
function
(
bIncrease
){};
/**
* Уменьшаем или увеличиваем (по специальной таблице) отступы в параграфе.
* @param {boolean} bIncrease
*/
CDocumentControllerBase
.
prototype
.
IncreaseOrDecreaseParagraphIndent
=
function
(
bIncrease
){};
/**
/**
* Добавляем элемент в параграф.
* Добавляем элемент в параграф.
...
...
word/Editor/DrawingsController.js
View file @
9cb5bf3b
...
@@ -217,6 +217,26 @@ CDrawingsController.prototype.SetParagraphFramePr = function(FramePr, bDelete)
...
@@ -217,6 +217,26 @@ CDrawingsController.prototype.SetParagraphFramePr = function(FramePr, bDelete)
{
{
// Не добавляем и не работаем с рамками в автофигурах
// Не добавляем и не работаем с рамками в автофигурах
};
};
CDrawingsController
.
prototype
.
IncreaseOrDecreaseParagraphFontSize
=
function
(
bIncrease
)
{
this
.
DrawingObjects
.
paragraphIncDecFontSize
(
bIncrease
);
};
CDrawingsController
.
prototype
.
IncreaseOrDecreaseParagraphIndent
=
function
(
bIncrease
)
{
if
(
true
!=
this
.
DrawingObjects
.
isSelectedText
())
{
var
ParaDrawing
=
this
.
DrawingObjects
.
getMajorParaDrawing
();
if
(
null
!=
ParaDrawing
)
{
var
Paragraph
=
ParaDrawing
.
Parent
;
Paragraph
.
IncDec_Indent
(
bIncrease
);
}
}
else
{
this
.
DrawingObjects
.
paragraphIncDecIndent
(
bIncrease
);
}
};
CDrawingsController
.
prototype
.
AddToParagraph
=
function
(
oItem
,
bRecalculate
)
CDrawingsController
.
prototype
.
AddToParagraph
=
function
(
oItem
,
bRecalculate
)
{
{
...
...
word/Editor/Footnotes.js
View file @
9cb5bf3b
...
@@ -691,6 +691,30 @@ CFootnotesController.prototype.SetParagraphFramePr = function(FramePr, bDelete)
...
@@ -691,6 +691,30 @@ CFootnotesController.prototype.SetParagraphFramePr = function(FramePr, bDelete)
{
{
// TODO: Реализовать, скорее всего ничего тут не надо делать
// TODO: Реализовать, скорее всего ничего тут не надо делать
};
};
CFootnotesController
.
prototype
.
IncreaseOrDecreaseParagraphFontSize
=
function
(
bIncrease
)
{
// TODO: Доделать селект и курсор
if
(
true
===
this
.
Selection
.
Use
)
{
}
else
{
if
(
null
!==
this
.
CurFootnote
)
this
.
CurFootnote
.
Paragraph_IncDecFontSize
(
bIncrease
);
}
};
CFootnotesController
.
prototype
.
IncreaseOrDecreaseParagraphIndent
=
function
(
bIncrease
)
{
// TODO: Доделать селект и курсор
if
(
true
===
this
.
Selection
.
Use
)
{
}
else
{
if
(
null
!==
this
.
CurFootnote
)
this
.
CurFootnote
.
Paragraph_IncDecIndent
(
bIncrease
);
}
};
CFootnotesController
.
prototype
.
AddToParagraph
=
function
(
oItem
,
bRecalculate
)
CFootnotesController
.
prototype
.
AddToParagraph
=
function
(
oItem
,
bRecalculate
)
{
{
...
...
word/Editor/GraphicObjects/Format/ShapePrototype.js
View file @
9cb5bf3b
...
@@ -497,12 +497,14 @@ CShape.prototype.applyParentTransform = function(transform)
...
@@ -497,12 +497,14 @@ CShape.prototype.applyParentTransform = function(transform)
CShape
.
prototype
.
recalculateShapeStyleForParagraph
=
function
()
CShape
.
prototype
.
recalculateShapeStyleForParagraph
=
function
()
{
{
var
styles
=
editor
.
WordControl
.
m_oLogicDocument
.
Styles
;
var
styles
=
editor
.
WordControl
.
m_oLogicDocument
.
Styles
;
this
.
textStyleForParagraph
=
{
TextPr
:
styles
.
Default
.
TextPr
.
Copy
(),
ParaPr
:
styles
.
Default
.
ParaPr
.
Copy
()};
this
.
textStyleForParagraph
=
{
TextPr
:
g_oDocumentDefaultTextPr
.
Copy
(),
ParaPr
:
g_oDocumentDefaultParaPr
.
Copy
()};
this
.
textStyleForParagraph
.
ParaPr
.
Merge
(
styles
.
Default
.
ParaPr
.
Copy
()
);
this
.
textStyleForParagraph
.
TextPr
.
Merge
(
styles
.
Default
.
TextPr
.
Copy
()
);
var
DefId
=
styles
.
Default
.
Paragraph
;
var
DefId
=
styles
.
Default
.
Paragraph
;
var
DefaultStyle
=
styles
.
Style
[
DefId
];
var
DefaultStyle
=
styles
.
Style
[
DefId
];
this
.
textStyleForParagraph
.
ParaPr
.
Merge
(
g_oDocumentDefaultParaPr
);
this
.
textStyleForParagraph
.
TextPr
.
Merge
(
g_oDocumentDefaultTextPr
);
if
(
DefaultStyle
)
if
(
DefaultStyle
)
{
{
this
.
textStyleForParagraph
.
ParaPr
.
Merge
(
DefaultStyle
.
ParaPr
);
this
.
textStyleForParagraph
.
ParaPr
.
Merge
(
DefaultStyle
.
ParaPr
);
...
...
word/Editor/HeaderFooterController.js
View file @
9cb5bf3b
...
@@ -185,6 +185,15 @@ CHdrFtrController.prototype.SetParagraphFramePr = function(FramePr, bDelete)
...
@@ -185,6 +185,15 @@ CHdrFtrController.prototype.SetParagraphFramePr = function(FramePr, bDelete)
{
{
this
.
HdrFtr
.
Set_ParagraphFramePr
(
FramePr
,
bDelete
);
this
.
HdrFtr
.
Set_ParagraphFramePr
(
FramePr
,
bDelete
);
};
};
CHdrFtrController
.
prototype
.
IncreaseOrDecreaseParagraphFontSize
=
function
(
bIncrease
)
{
this
.
HdrFtr
.
Paragraph_IncDecFontSize
(
bIncrease
);
};
CHdrFtrController
.
prototype
.
IncreaseOrDecreaseParagraphIndent
=
function
(
bIncrease
)
{
this
.
HdrFtr
.
Paragraph_IncDecIndent
(
bIncrease
);
};
CHdrFtrController
.
prototype
.
AddToParagraph
=
function
(
oItem
,
bRecalculate
)
CHdrFtrController
.
prototype
.
AddToParagraph
=
function
(
oItem
,
bRecalculate
)
{
{
...
...
word/Editor/LogicDocumentController.js
View file @
9cb5bf3b
...
@@ -161,6 +161,14 @@ CLogicDocumentController.prototype.SetParagraphFramePr = function(FramePr, bDele
...
@@ -161,6 +161,14 @@ CLogicDocumentController.prototype.SetParagraphFramePr = function(FramePr, bDele
{
{
this
.
LogicDocument
.
controller_SetParagraphFramePr
(
FramePr
,
bDelete
);
this
.
LogicDocument
.
controller_SetParagraphFramePr
(
FramePr
,
bDelete
);
};
};
CLogicDocumentController
.
prototype
.
IncreaseOrDecreaseParagraphFontSize
=
function
(
bIncrease
)
{
this
.
LogicDocument
.
controller_IncreaseOrDecreaseParagraphFontSize
(
bIncrease
);
};
CLogicDocumentController
.
prototype
.
IncreaseOrDecreaseParagraphIndent
=
function
(
bIncrease
)
{
this
.
LogicDocument
.
controller_IncreaseOrDecreaseParagraphIndent
(
bIncrease
);
};
CLogicDocumentController
.
prototype
.
AddToParagraph
=
function
(
oItem
)
CLogicDocumentController
.
prototype
.
AddToParagraph
=
function
(
oItem
)
...
...
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