summaryrefslogtreecommitdiff
path: root/include/LibreOfficeKit
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2022-12-23 13:02:57 -0500
committerAndras Timar <andras.timar@collabora.com>2023-01-29 13:22:28 +0000
commite2d646665c4cb4c7eeb0a73cb5f460838589bef0 (patch)
tree42987bdec2a8e09af3b6cf70ad2b244c01d92136 /include/LibreOfficeKit
parente3e259d551c0c8b7c106191f2c258e5929db1b29 (diff)
lok: support per-user timezone
This adds support for user-specific timezone. When none is provided during loading, the system default is used. Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk> Change-Id: Ie863450687eb82bc475268a09c9112e9fd50020f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144816 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit abaf8c0af1c6c7fe01276fdf2ae62419c7b0f654) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146211 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'include/LibreOfficeKit')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.h3
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.hxx11
2 files changed, 14 insertions, 0 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index 61a68f632209..74c2100ab18c 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -493,6 +493,9 @@ struct _LibreOfficeKitDocumentClass
/// @see lok::Document::getEditMode().
int (*getEditMode) (LibreOfficeKitDocument* pThis);
+ /// @see lok::Document::setViewTimezone().
+ void (*setViewTimezone) (LibreOfficeKitDocument* pThis, int nId, const char* timezone);
+
#endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
};
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index d70e4eb44d39..2ac398edd497 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -875,6 +875,17 @@ public:
mpDoc->pClass->sendContentControlEvent(mpDoc, pArguments);
}
+ /**
+ * Set the timezone of the window with the specified nId.
+ *
+ * @param nId a view ID, returned by createView().
+ * @param timezone a timezone in the tzfile(5) format (e.g. Pacific/Auckland).
+ */
+ void setViewTimezone(int nId, const char* timezone)
+ {
+ mpDoc->pClass->setViewTimezone(mpDoc, nId, timezone);
+ }
+
#endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
};