summaryrefslogtreecommitdiff
path: root/include/LibreOfficeKit
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2022-08-24 15:40:16 +0300
committerTor Lillqvist <tml@collabora.com>2022-08-25 11:57:55 +0200
commitc8d974444507a96bebc1ef46869809cb8c9ce5c7 (patch)
tree0780c9e45a7efa909318c9c6245941ccd227cfdd /include/LibreOfficeKit
parenteaf0b96ec2acdea2376413ef3a93c4c17889e23c (diff)
Tell LibreOfficeKit clients what fonts in a document are missing on the machine
Use the OutputDevice::StartTrackingFontMappingUse() and OutputDevice::FinishTrackingFontMappingUse() functionality that was added last year. Add a new LibreOfficeKit document callback: LOK_CALLBACK_FONTS_MISSING. "Font" here means just the family name. We dont really know what style from the family is missing. Change-Id: Iec4349b5827e7d1dbdde7f8a9f8da92efde429e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138802 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'include/LibreOfficeKit')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKitEnums.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h
index f1b2328510b3..9a591413f2dd 100644
--- a/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -860,6 +860,27 @@ typedef enum
* [<startColumn>, <startRow>, <endColumn>, <endRow>]
*/
LOK_CALLBACK_PRINT_RANGES = 56,
+
+ /**
+ * Informs the LibreOfficeKit client that a font specified in the
+ * document is missing.
+ *
+ * This callback is emitted right after the document has been loaded.
+ *
+ * Payload example:
+ * {
+ * "fontsmissing": [
+ * "Some Random Font",
+ * "Another Font"
+ * ]
+ * }
+ *
+ * The names are those of the font family. Sadly it is currently
+ * not possible to know the name of the font style that is
+ * missing.
+ *
+ */
+ LOK_CALLBACK_FONTS_MISSING = 57,
}
LibreOfficeKitCallbackType;
@@ -1002,6 +1023,8 @@ static inline const char* lokCallbackTypeToString(int nType)
return "LOK_CALLBACK_CONTENT_CONTROL";
case LOK_CALLBACK_PRINT_RANGES:
return "LOK_CALLBACK_PRINT_RANGES";
+ case LOK_CALLBACK_FONTS_MISSING:
+ return "LOK_CALLBACK_FONTS_MISSING";
}
assert(!"Unknown LibreOfficeKitCallbackType type.");