It is std::chrono::system_clock that has to_time_t.
std::chrono::steady_clock does not have to_time_t.
std::chrono::high_resolution_clock is either the same as system_clock
(in libstdc++, on Linux) or steady_clock (libc++, on iOS).
(This change does not fix the actual bugs in the code, just makes it
compile for iOS. The new ISO8601 fractional time code is not unit
tested at the moment. The testTime() function is not part of the test
suite in WhiteBoxTests.cpp. If it is made part of it, it reveals
problems in the code (and/or in the unit test code).)
Change-Id: Id33342bc8b26465632f3d21d6ec2f3c975ae3681
Reviewed-on: https://gerrit.libreoffice.org/78550
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
And when at that, do that actually at the same place as where it is
handled for browser on desktop.
Reviewed-on: https://gerrit.libreoffice.org/75361
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
(cherry picked from commit fa50758a782348f031750c643cd512433c9e7aff)
Change-Id: I41612e29d15de0fdc9c0e4013f6375ffcb4c3ae4
Also sync the sidebar state on initialization, as for Writer docs.
We want View > Sidebar to show up and work also for Calc docs in the
iOS app.
Change-Id: Iaf50d03a50940a0d414b512ad55419c52c87943e
Reviewed-on: https://gerrit.libreoffice.org/75345
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
(cherry picked from commit 9c900398f3f1c95f9e30f9714c748a9d464ffb95)
Avoids having to use View > Sidebar twice for it to show up.
I am told that the sidebar initially thinks it is visible, but it
actually isn't, so the first View > Sidebar invocation caused it to
become internally non-visible, and then the second View > Sidebar
caused it to become visible for real, too.
Now the first View > Sidebar invocation is enough for it to become
visible.
Change-Id: I4bc88f5b4d488e5fb12d89106bbd113f34347dfd
Reviewed-on: https://gerrit.libreoffice.org/75310
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
(cherry picked from commit 23df55ca8f0f145b5c0eb819f2f87a6d909d7f91)
When .uno:ModifiedStatus is received, now Doc_ModifiedStatus
is fired to inform the client of the modified state of the document.
This is useful in case the integration needs to prompt the user to save
before closing the document (which they can catch with the onunload or
onbeforeunload events in the browser, as well as with our
UI_Close when the default handler is disabled).
Includes working sample and documentation.
Change-Id: Ief30483e2f078b0aa9f3c006a1ecb4093375174c
Reviewed-on: https://gerrit.libreoffice.org/74891
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Clients often need to communicate with their wopi hosts when
invoking Action_Save to provide more context when storing the
document in question. Action_Save now support passing arbitrary
string as ExtendedData entry that can be used by client to
pass any context or otherwise flags to the WOPI host, which
will receive it via the X-LOOL-WOPI-ExtendedData custom header.
See reference.html for more details.
Change-Id: I1814d1f3d984a553ffa60cec13d23b014ba59eb3
Reviewed-on: https://gerrit.libreoffice.org/74135
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
Clients expect a consistent notification API for Action_Save
and Action_SaveAs. Unfortunately, Action_SaveAs didn't
support notifying the client as Action_Save does.
Now, when Notify is set to true in the Action_SaveAs
message, the client will be notified with Action_Save_Resp.
Change-Id: Ib8eb946c3bc642cfd46124e1190e931c21f88de0
Reviewed-on: https://gerrit.libreoffice.org/74134
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
There are cases when we do get client-requests
while we are about to unload and destroy
the DocBroker. This protects against the use
of partially-destroyed DocBroker (specifically,
when TileCache is already destroyed).
Change-Id: I963f2239fd62280e70b1938d3c6f653e8af91b1e
Reviewed-on: https://gerrit.libreoffice.org/74132
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
Now Host_PostmessageReady is automatically issued
upon loading and the postMessage calls are more modular,
allowing for expansion with more functionality.
Change-Id: I22b50f7228e0fd32c4cb880f4981c1a455038d48
Reviewed-on: https://gerrit.libreoffice.org/74129
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
Clients often need to handle certain commands themselves.
This is especially true for Action_Save and Action_Close.
A new postMessage command, Disable_Default_UIAction, is
now available to support disabling/enabling the default
action for certain commands (as of this patch, only
Action_Save and Action_Close are supported).
The actions in question issue a notification and,
when the default handler is disabled, the client
is expected to handle the notification for which
they disabled the default handler and act as necessary.
See reference.html for more details.
Change-Id: Ia6ce4e2d7578f79cc2069097e0b968e6c4aeabd1
Reviewed-on: https://gerrit.libreoffice.org/74136
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
This allows for clients to issue a document
close programmatically, which is useful when they
have custom buttons or commands, or external
events/triggers, that might result in cleanly
closing the document.
A demo of how to use it is included in framed.doc.html.
Change-Id: Ib889bb01bbcaaa91fd0f341c989aeb1a6fceec28
Reviewed-on: https://gerrit.libreoffice.org/74131
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
This demonstrates the use of show and hide
functionality via Show/Hide_Button and
Show/Hide_Menu_Item postMessage events.
Save and Print buttons and menu items are
controlled in the demo.
Change-Id: I81dfea816765da50a1c20699b460765ae35f60a6
Reviewed-on: https://gerrit.libreoffice.org/74130
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
Since UI customization doesn't depend on
the document being fully loaded, while at
the same time we wouldn't want to display
misleading/incomplete UI while the document
loads, only to change it right after.
Change-Id: Ib8178a1d0033659cbeb79bd4827b528e13890095
Reviewed-on: https://gerrit.libreoffice.org/74133
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
When there is only one slide, it cannot be deleted. Use the information
from the core to enable or disable the state of the "Delete Slide"
button in the slide sorter and the menu entry.
Reviewed-on: https://gerrit.libreoffice.org/73383
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
(cherry picked from commit 3a1f68dc84dddf252cdd222ab14b2a4635f39251)
Reviewed-on: https://gerrit.libreoffice.org/73863
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I549d4c09b6fd999b14e281976320d1b6f63d64b7
After closing dialog that had its own cursor, the editor
loses the cursor until the user types, which forces a
cursor invalidation from Core. This is to make sure that
the editor always updates the visibility of its cursor
when the editor get focus back.
Change-Id: Icba5e6c2c94da7488131269749fc96e185dec6a2
(cherry picked from commit 72025d21cb127aadeb092e564da8acc884188032)
Calc tends to issue document size change very
frequently (after certain operations), and this
results in the status: message to be generated.
Unfortunately, this message signals finishing
document loading, which means it also triggers
post-loading events.
This fix is to hold a new flag in map to track
the true first laod event, to avoid triggering
post-load handlers.
Ideally, we will get a different and unambiguous
message for document loading, vs. generic status
updates.
Change-Id: Ib8b59c04a770cbfcaf443608c418557671ed207b
(cherry picked from commit c97defd5f65a1bbc69247f74a943b224111f2ca2)
Does not actually show the sidebar yet...
Change-Id: Iadddba04bbdb96159e84ffd1498a0845b32e1590
(cherry picked from commit b999c6fe6d080131f96dec34b11075164ae1d9e1)
This prevents flicker and the clipped sidebar issue.
Change-Id: Ia940894c2ad6cdcfcdcf5eb910d101c45b2f9ee5
(cherry picked from commit 5125226337e5ea826359534cccc8c46df62d6e8b)
This prevents hiding part of the sidebar behind
the scrollbar, when it appears.
Perhaps we should do this dynamically, only
where the scrollbar is visible, but that will
introduce flicker and resizing of the document
container, which are undersirable. This is
a small extra space, so can be visible.
Change-Id: Ic123832812663c14afadf0087ce49b742aa466c2
(cherry picked from commit 8231f902195deb9c510a03f25de4bc9662460e43)
And merge a single z-index property into
the main css.
Change-Id: I0a8ed76c98b46052b2cf4b32cfcae498c1615584
(cherry picked from commit 7ba1f6a12c6c8797b3d832faf540d4914b6f219b)