Skip to content

Commit 1cc824b

Browse files
committed
Notebookbar: Impress: add a button to insert canvas slide & reshuffle
pages Signed-off-by: Mohit Marathe <[email protected]> Change-Id: I82120479cf599f9058a6151cda0827ea12c8d777
1 parent a84e1ad commit 1cc824b

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

browser/src/control/Control.NotebookbarImpress.js

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1302,6 +1302,7 @@ window.L.Control.NotebookbarImpress = window.L.Control.NotebookbarWriter.extend(
13021302
},
13031303

13041304
getFormatTab: function() {
1305+
const isODF = app.LOUtil.isFileODF(this.map);
13051306
var content = [
13061307
{
13071308
'type': 'overflowgroup',
@@ -1395,12 +1396,24 @@ window.L.Control.NotebookbarImpress = window.L.Control.NotebookbarWriter.extend(
13951396
],
13961397
'vertical': 'true'
13971398
},
1399+
(isODF && app.isExperimentalMode) ?
1400+
[
1401+
{ type: 'separator', id: 'format-namedescription-break', orientation: 'vertical' },
1402+
{
1403+
'id': 'format-shuffle-pages',
1404+
'type': 'bigtoolitem',
1405+
'text': _UNO('.uno:ReshufflePages'),
1406+
'command': '.uno:ReshufflePages',
1407+
'accessibility': { focusBack: true, combination: 'RP', de: null }
1408+
},
1409+
] : [],
13981410
];
13991411

14001412
return this.getTabPage('Format', content);
14011413
},
14021414

14031415
getInsertTab: function() {
1416+
const isODF = app.LOUtil.isFileODF(this.map);
14041417
var content = [
14051418
{
14061419
'type': 'overflowgroup',
@@ -1444,7 +1457,16 @@ window.L.Control.NotebookbarImpress = window.L.Control.NotebookbarWriter.extend(
14441457
}
14451458
],
14461459
'vertical': 'true'
1447-
}
1460+
},
1461+
(isODF) ?
1462+
{
1463+
'id': 'insert-canvas-slide',
1464+
'type': 'toolitem',
1465+
'text': _UNO('.uno:InsertCanvasSlide', 'presentation'),
1466+
'command': '.uno:InsertCanvasSlide',
1467+
'visible': app.isExperimentalMode(),
1468+
'accessibility': { focusBack: true, combination: 'CS', de: null }
1469+
} : {}
14481470
]
14491471
},
14501472
{ type: 'separator', id: 'insert-deleteslide-break', orientation: 'vertical' },

browser/src/unocommands.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ var unoCommandsArray = {
373373
'InsertAxisTitle':{global:{menu:_('Insert Axis Title'),},},
374374
'InsertBookmark':{text:{context:_('Insert Bookmark'),menu:_('Bookmar~k...'),},},
375375
'InsertBreak':{text:{menu:_('Manual ~Break...'),},},
376+
'InsertCanvasSlide':{presentation:{menu:_('New Canvas Slide'),},},
376377
'InsertCaptionDialog':{text:{context:_('Insert Caption...'),menu:_('Caption...'),},},
377378
'InsertCell':{spreadsheet:{context:_('~Insert...'),menu:_('Insert ~Cells...'),},},
378379
'InsertColumnBreak':{spreadsheet:{menu:_('~Column Break'),},text:{menu:_('Insert Column Break'),},},
@@ -531,6 +532,7 @@ var unoCommandsArray = {
531532
'ResetAllDataPoints':{global:{menu:_('Reset all Data Points'),},},
532533
'ResetAttributes':{global:{context:_('Clear Direct Formatting'),menu:_('~Clear Direct Formatting'),},spreadsheet:{context:_('Clear Direct Formatting'),menu:_('Clear ~Direct Formatting'),},text:{context:_('Clear Direct Formatting'),menu:_('Clear ~Direct Formatting'),},},
533534
'ResetDataPoint':{global:{menu:_('Reset Data Point'),},},
535+
'ReshufflePages':{presentation:{menu:_('Re-order pages'),},},
534536
'RightPara':{global:{context:_('Align Right'),menu:_('Right'),},},
535537
'RotateLeft':{text:{menu:_('Rotate 90° ~Left'),},},
536538
'RotateMenu':{global:{menu:_('Rot~ate'),},},

0 commit comments

Comments
 (0)