[Libreoffice-commits] dev-tools.git: help3/xhpeditor

Olivier Hallot (via logerrit) logerrit at kemper.freedesktop.org
Sun Dec 8 01:35:02 UTC 2019


 help3/xhpeditor/snippets.js |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit dcda9497ff65fb54eeafd4c054e5afc487b7d0c3
Author:     Olivier Hallot <olivier.hallot at libreoffice.org>
AuthorDate: Sat Dec 7 22:30:46 2019 -0300
Commit:     Olivier Hallot <olivier.hallot at libreoffice.org>
CommitDate: Sun Dec 8 02:34:45 2019 +0100

    Add MAC code snippets
    
    Change-Id: Iea9a6d185beaacb8590d7c8f79760c49fcf4c4da
    Reviewed-on: https://gerrit.libreoffice.org/84703
    Reviewed-by: Olivier Hallot <olivier.hallot at libreoffice.org>
    Tested-by: Olivier Hallot <olivier.hallot at libreoffice.org>

diff --git a/help3/xhpeditor/snippets.js b/help3/xhpeditor/snippets.js
index ac61034..3c5c18d 100644
--- a/help3/xhpeditor/snippets.js
+++ b/help3/xhpeditor/snippets.js
@@ -27,7 +27,7 @@ function docHeading() {
 
 // Paragraph
 function paragraph(role) {
-    var a0 = '<paragraph role="'+ role + '" id="' + random('par') + '">'
+    var a0 = '<paragraph role="'+ role + '" id="' + random("par") + '">'
     var a1 = '</paragraph>\n';
     editor.replaceSelection(a0 + editor.doc.getSelection() + a1,'');
 }
@@ -185,7 +185,12 @@ function switchInline(type) {
     var a4 = '</switchinline>';
     editor.replaceRange(a1 + a2 + a3 + a4, editor.doc.getCursor());
 }
-
+function MenuPrefMAC(){
+    editor.replaceRange('<switchinline select="sys"><caseinline select="MAC"><menuitem>%PRODUCTNAME - Preferences</menuitem></caseinline><defaultinline><menuitem>Tools - Options</menuitem></defaultinline></switchinline><menuitem> - </menuitem> ', editor.doc.getCursor());
+}
+function KeyMAC(){
+    editor.replaceRange('<switchinline select="sys"><caseinline select="MAC"><keystroke>command</keystroke></caseinline><defaultinline><keystroke>Ctrl</keystroke></defaultinline></switchinline><keystroke>+</keystroke>', editor.doc.getCursor());
+}
 // lists
 function tList(mode){
     var a1 = '<list type="' + mode + '">\n\n</list>';


More information about the Libreoffice-commits mailing list