diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKitEnums.h | 19 | ||||
-rw-r--r-- | include/sfx2/lokhelper.hxx | 4 | ||||
-rw-r--r-- | include/svx/svdomedia.hxx | 3 |
3 files changed, 26 insertions, 0 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h index 3bc0ad940b18..1e9821204c0b 100644 --- a/include/LibreOfficeKit/LibreOfficeKitEnums.h +++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h @@ -882,6 +882,23 @@ typedef enum * */ LOK_CALLBACK_FONTS_MISSING = 57, + + /** + * Insertion, removal, movement, and selection of a media shape. + * The payload is a json with the relevant details. + * + * { + * "action": "insert", + * "id": 123456, + * "url": "file:// ..." + * "x": ..., + * "y": ..., + * } + * + * where the "svg" property is a string containing an svg document + * which is a representation of the pie segment. + */ + LOK_CALLBACK_MEDIA_SHAPE = 58, } LibreOfficeKitCallbackType; @@ -1026,6 +1043,8 @@ static inline const char* lokCallbackTypeToString(int nType) return "LOK_CALLBACK_PRINT_RANGES"; case LOK_CALLBACK_FONTS_MISSING: return "LOK_CALLBACK_FONTS_MISSING"; + case LOK_CALLBACK_MEDIA_SHAPE: + return "LOK_CALLBACK_MEDIA_SHAPE"; } assert(!"Unknown LibreOfficeKitCallbackType type."); diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx index 1c5a94966776..eaa7abe9785c 100644 --- a/include/sfx2/lokhelper.hxx +++ b/include/sfx2/lokhelper.hxx @@ -157,6 +157,10 @@ public: /// Helper for diagnosing run-time problems static void dumpState(rtl::OStringBuffer &rState); + /// Notify all views of a media update. + /// This could be a new insertion or property modifications to an existing one. + static void notifyMediaUpdate(boost::property_tree::ptree& json); + private: static int createView(SfxViewFrame* pViewFrame, ViewShellDocId docId); }; diff --git a/include/svx/svdomedia.hxx b/include/svx/svdomedia.hxx index 020f4d56c947..6199fcaffe5b 100644 --- a/include/svx/svdomedia.hxx +++ b/include/svx/svdomedia.hxx @@ -72,6 +72,9 @@ public: virtual bool shouldKeepAspectRatio() const override { return true; } + /// When Lokit is enabled, notify the media details. + void notifyPropertiesForLOKit(); + private: void mediaPropertiesChanged( const ::avmedia::MediaItem& rNewState ); virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override; |