[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - 2 commits - bundled/include loleaflet/src tools/KitClient.cpp
Jan Holesovsky
kendy at collabora.com
Thu Sep 14 18:38:22 UTC 2017
bundled/include/LibreOfficeKit/LibreOfficeKit.h | 2 +
bundled/include/LibreOfficeKit/LibreOfficeKit.hxx | 16 +++++++++++++++
bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h | 20 +++++++++++++++++--
loleaflet/src/control/Control.Menubar.js | 9 ++++++++
tools/KitClient.cpp | 1
5 files changed, 46 insertions(+), 2 deletions(-)
New commits:
commit 741176bee21b5bd4491c09a346eec1d9f2e9fc7f
Author: Jan Holesovsky <kendy at collabora.com>
Date: Thu Sep 14 18:45:23 2017 +0200
Update the bundled includes.
Change-Id: I6f7d9247d7487c285b2d9b01a3f2cc20c8ed0b1c
diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKit.h b/bundled/include/LibreOfficeKit/LibreOfficeKit.h
index 55cff727..da6bba91 100644
--- a/bundled/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/bundled/include/LibreOfficeKit/LibreOfficeKit.h
@@ -78,6 +78,8 @@ struct _LibreOfficeKitClass
/// @see lok::Office::getVersionInfo().
char* (*getVersionInfo) (LibreOfficeKit* pThis);
+
+ bool (*runMacro) (LibreOfficeKit *pThis, const char* pURL);
#endif
};
diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx b/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx
index 46ecb5f4..72fb7c2b 100644
--- a/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -487,6 +487,9 @@ public:
*
* @param pUrl the URL of the document to load
* @param pFilterOptions options for the import filter, e.g. SkipImages.
+ * Another useful FilterOption is "Language=...". It is consumed
+ * by the documentLoad() itself, and when provided, LibreOfficeKit
+ * switches the language accordingly first.
* @since pFilterOptions argument added in LibreOffice 5.0
*/
inline Document* documentLoad(const char* pUrl, const char* pFilterOptions = NULL)
@@ -601,6 +604,19 @@ public:
{
return mpThis->pClass->getVersionInfo(mpThis);
}
+
+ /**
+ * Run a macro.
+ *
+ * Same syntax as on command line is permissible (ie. the macro:// URI forms)
+ *
+ * @param pURL macro url to run
+ */
+
+ inline bool runMacro( const char* pURL)
+ {
+ return mpThis->pClass->runMacro( mpThis, pURL );
+ }
#endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
};
diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h b/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h
index 0bf35024..c3b71f3f 100644
--- a/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -501,11 +501,27 @@ typedef enum
* The payload says if we are invalidating a row or column header.
*/
LOK_CALLBACK_INVALIDATE_HEADER = 33,
-
/**
* The text content of the address field in Calc.
*/
- LOK_CALLBACK_CELL_ADDRESS = 34
+ LOK_CALLBACK_CELL_ADDRESS = 34,
+ /**
+ * The key ruler related properties on change are reported by this.
+ *
+ * The payload format is:
+ *
+ * {
+ * "margin1": "...",
+ * "margin2": "...",
+ * "leftOffset": "...",
+ * "pageOffset": "...",
+ * "pageWidth": "...",
+ * "unit": "..."
+ * }
+ *
+ * Here all aproperties are same as described in svxruler.
+ */
+ LOK_CALLBACK_RULER_UPDATE = 35
}
LibreOfficeKitCallbackType;
diff --git a/tools/KitClient.cpp b/tools/KitClient.cpp
index 8aa38e73..ab77cff9 100644
--- a/tools/KitClient.cpp
+++ b/tools/KitClient.cpp
@@ -78,6 +78,7 @@ extern "C"
CASE(COMMENT);
CASE(INVALIDATE_HEADER);
CASE(CELL_ADDRESS);
+ CASE(RULER_UPDATE);
#undef CASE
}
std::cout << " payload: " << payload << std::endl;
commit 5391f41e5bc2945f0e4a161a5d3dbc462e69c668
Author: Jan Holesovsky <kendy at collabora.com>
Date: Thu Sep 14 11:38:29 2017 +0200
Introduce Tools -> Automatic Spell Checking.
Change-Id: Icfae090f69e49bbce2cf98c53c35ab1bb6794490
diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js
index 70616749..62fc9789 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -164,6 +164,9 @@ L.Control.Menubar = L.Control.extend({
{name: _('Cell'), type: 'unocommand', uno: '.uno:EntireCell'}]},
{name: _('Merge cells'), type: 'unocommand', uno: '.uno:MergeCells'}]
},
+ {name: _('Tools'), id: 'tools', type: 'menu', menu: [
+ {name: _('Automatic Spell Checking'), type: 'unocommand', uno: '.uno:SpellOnline'}
+ ]},
{name: _('Help'), id: 'help', type: 'menu', menu: [
{name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action'},
{name: _('About'), id: 'about', type: 'action'}]
@@ -225,6 +228,9 @@ L.Control.Menubar = L.Control.extend({
{type: 'separator', id: 'fullscreen-presentation-separator'},
{name: _('Fullscreen presentation'), id: 'fullscreen-presentation', type: 'action'}]
},
+ {name: _('Tools'), id: 'tools', type: 'menu', menu: [
+ {name: _('Automatic Spell Checking'), type: 'unocommand', uno: '.uno:SpellOnline'}
+ ]},
{name: _('Help'), id: 'help', type: 'menu', menu: [
{name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action'},
{name: _('About'), id: 'about', type: 'action'}]
@@ -273,6 +279,9 @@ L.Control.Menubar = L.Control.extend({
{name: _('Delete row'), type: 'unocommand', uno: '.uno:DeleteRows'},
{name: _('Delete column'), type: 'unocommand', uno: '.uno:DeleteColumns'}]
},
+ {name: _('Tools'), id: 'tools', type: 'menu', menu: [
+ {name: _('Automatic Spell Checking'), type: 'unocommand', uno: '.uno:SpellOnline'}
+ ]},
{name: _('Help'), id: 'help', type: 'menu', menu: [
{name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action'},
{name: _('About'), id: 'about', type: 'action'}]
More information about the Libreoffice-commits
mailing list