Commit graph

8778 commits

Author SHA1 Message Date
kaishu-sahu
0f9492268e android: add support for screen dimming from JS.
Change-Id: Icd766c7dcc9c2d62ec90945ec88fa46f88a4711d
Reviewed-on: https://gerrit.libreoffice.org/76489
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-09-06 11:23:29 +02:00
Andras Timar
becb72a6a9 tdf#121983 is fixed, remove the hack here
Change-Id: I93bfc410d21b6283c4566586b4240f1c3556ee0e
Reviewed-on: https://gerrit.libreoffice.org/78647
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-09-05 23:57:21 +02:00
Andras Timar
d5cf8afd57 docker: install selective set of poco libraries, only what we need
Change-Id: I2776b6817696fbc8d5f24a35165e26bf5ff8c4af
Reviewed-on: https://gerrit.libreoffice.org/78646
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-09-05 23:57:03 +02:00
Michael Meeks
79637655f6 Avoid PRIx64 format - we are 64bit only, so lx will do.
Fixes RHEL6 compilation problems around inttypes inclusion / definition.

Change-Id: I4f4647c7954c32d90dad94a43c630af24d551d78
2019-09-05 22:53:09 +01:00
Andras Timar
69140fcdbb CPPUNIT_ASSERT_GREATEREQUAL is not available in cppunit of older distros
Change-Id: I37001791e05df9a55c25b48fff3bbe5d6bd050e2
2019-09-05 23:02:18 +02:00
Michael Meeks
6338bf2032 test: add --gdb option to run_unit.sh
Change-Id: Iff253d95a1a611536fe5c1244c33471e77c77c81
2019-09-05 14:10:20 +01:00
Michael Meeks
81aa1a0782 test: print out the correct way to run all-local test.
Change-Id: I2a9a90beff7b2dc689dc2de7df86404018b514fb
2019-09-05 14:10:20 +01:00
Michael Meeks
6d1cc6c01d Avoid using std::get_time to compile on older Linux.
Change-Id: I862e5f342ea485a9b65b413ab0c1bdea4f5fbb8d
2019-09-05 14:10:20 +01:00
Aron Budea
77da6afae1 leaflet: support show/hide of Format menu
Change-Id: Id40c0788c226aabadb52417a921da4a1371095f1
Reviewed-on: https://gerrit.libreoffice.org/78014
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-09-05 13:37:54 +02:00
DarkByt31
d24071e91b WhiteBoxTests: testTime corrections
Change-Id: Ia73a69396ba12921370fa12b57c249593c36e3d8
2019-09-04 22:09:50 +01:00
Tor Lillqvist
80ddb46392 Fix portability problems after 22f1656e08
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>
2019-09-03 13:50:27 +02:00
Ashod Nakashian
8deb0fbcbd leaflet: minor cleanup of sidebar
Change-Id: I0c3e9e0a35a093f529346ea3b3afbd44ed875570
2019-09-03 01:53:12 -04:00
Ashod Nakashian
2dbb7e23d9 leaflet: support creating size_changed on sidebars too
Change-Id: Iee13732838ac2c5b80256c1d2c2e8ece720244dc
2019-09-03 01:53:12 -04:00
Ashod Nakashian
53bd11c8e7 leaflet: Sidebar is not a popup window
Change-Id: Ib786a4038bfb55ee71e7e66a0e195fd43c9603af
2019-09-03 01:53:12 -04:00
Ashod Nakashian
97a7b1f170 wsd: sanitize url when error reporting
(cherry picked from commit 2b35ae713943abd5f51de383fb2d26ab96f73988)

Change-Id: I7937429f2f987212beaeb9a97b48bfedb0a7ac58
2019-09-03 01:53:12 -04:00
Ashod Nakashian
5772bbd8c9 leaflet: save only when not read-only
Change-Id: I0cff68d2a2e8354b8c5a6888faa9fa823295c98e
2019-09-03 01:53:12 -04:00
Ashod Nakashian
ee0f9c8d53 leaflet: add id to Format menu
Change-Id: I16569eadefde1d4bd9d841688cbb5a2a43c25f44
(cherry picked from commit 78ad91b92348dd56388c3cb7512cb67edc0688cb)
2019-09-03 01:53:12 -04:00
Ashod Nakashian
ae9c1a67c9 leaflet: support show/hide of Insert>Section menu entry
Change-Id: I89ccfcb7f9e091b26f1f67ec889556bfc07295a3
(cherry picked from commit ca7246a05639572d5c1ff133ca7dd6847ca8c7b0)
2019-09-03 01:53:12 -04:00
Jan Holesovsky
22993464b8 android: Needs the same treatment of .uno:Sidebar as iOS.
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
2019-09-03 01:53:12 -04:00
Tor Lillqvist
a0ca912085 Show the View menu in the iOS app for Calc docs
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)
2019-09-03 01:53:12 -04:00
Tor Lillqvist
a93c89d666 Sync the initial internal and apparent state of the sidebar in the iOS app
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)
2019-09-03 01:53:12 -04:00
Ashod Nakashian
8f312862ca leaflet: fire Doc_ModifiedStatus with modified state of the document
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>
2019-09-03 01:53:12 -04:00
Ashod Nakashian
3dcc68e6f1 Pass Extended Data in Action_Save from the client to the WOPI host
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>
2019-09-03 01:53:12 -04:00
Ashod Nakashian
5ff0a42b94 leaflet: Support notifying the client on Action_SaveAs completion
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>
2019-09-03 01:53:12 -04:00
Ashod Nakashian
d80fdefcbe wsd: don't use DocBrokers marked to be destroyed
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>
2019-09-03 01:53:12 -04:00
Ashod Nakashian
4dc312f549 Cleanup framed.doc.html sample
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>
2019-09-03 01:53:12 -04:00
Ashod Nakashian
df6cc01c32 leaflet: support disabling default action
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>
2019-09-03 01:53:12 -04:00
Ashod Nakashian
0852f62f56 leaflet: support Action_Close
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>
2019-09-03 01:53:12 -04:00
Ashod Nakashian
89ae4278e8 leaflet: show/hide commands demo
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>
2019-09-03 01:53:12 -04:00
Ashod Nakashian
f454b240ec Alow to modify UI before WOPIPostmessageReady
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>
2019-09-03 01:53:12 -04:00
Szymon Kłos
7b86174eb8 Add API to remove menu items
Reviewed-on: https://gerrit.libreoffice.org/74128
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit 16ba97e7ae4a06932bdd63dbf32dd9e09b6b227e)
Reviewed-on: https://gerrit.libreoffice.org/75228
(cherry picked from commit 5105f3b95117c88d91a882fb4fef5356b5e45e68)

Change-Id: I59f2e3e1ed467f58bcd56db945e0d4807c1cff6e
2019-09-03 01:53:12 -04:00
Jan Holesovsky
9783d70520 Show the state of the Delete Slide.
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
2019-09-03 01:53:12 -04:00
Samuel Mehrbrodt
11f5154432 Add postMessage methods to show/hide toolbar buttons
(cherry picked from commit c0d0ad7368)

Change-Id: Ib5ecde5a53aa0aae2346e360423e72025edade3a
2019-09-03 01:53:12 -04:00
Florin Ciornei
30cc128690 Open/close sidebar on swipe
Change-Id: I91e3889375b833c656cf81f2dc4094b1d3f13ea5
Reviewed-on: https://gerrit.libreoffice.org/72354
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
(cherry picked from commit 0fb53bb1a8487171acba1b08c720c5cdb75855c3)
2019-09-03 01:53:12 -04:00
Ashod Nakashian
4df0548d26 leaflet: update the cursor when the editor gets focus back
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)
2019-09-03 01:53:12 -04:00
Ashod Nakashian
6a99e313ec leaflet: initialize the sidebar only once
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)
2019-09-03 01:53:12 -04:00
Ashod Nakashian
5e84467f62 leaflet: Keep active even in windows and child windows
Change-Id: I7e72b21d9276e96e94852916f9e6a8e04d73c222
(cherry picked from commit 977858b8720516d50a4e0365dce5d486939427b1)
2019-09-03 01:53:12 -04:00
Ashod Nakashian
076bbc80fa leaflet: show message box dialogs centered
Change-Id: Ic55f48067c918aac2bdcfe998c8d4b5cbbcc008d
(cherry picked from commit 2f0e39b39cc16e4bc3c6157de3ba4b32dba7abf4)
2019-09-03 01:53:12 -04:00
Jan Holesovsky
5fcd8f38be Fix build.
Change-Id: Ibfe0d09ca156540f5ec535c6a5da5e9cd339b16d
(cherry picked from commit b52dd6b14e63ff160524a0f6fe2d3d4e2361d547)
2019-09-03 01:53:12 -04:00
Ashod Nakashian
7edfa725c1 leaflet: Add sidebar commands in toolbar and menu
Reviewed-on: https://gerrit.libreoffice.org/71840
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
(cherry picked from commit 212290a35dc4e87439e5d4d41b16224281c8d27d)

Change-Id: Icac459849196a70b62ac0e2a558882d8cc199e6c
2019-09-03 01:53:12 -04:00
Ashod Nakashian
3d4f148a56 leaflet: Enable sidebar in writer and calc
Does not actually show the sidebar yet...

Change-Id: Iadddba04bbdb96159e84ffd1498a0845b32e1590
(cherry picked from commit b999c6fe6d080131f96dec34b11075164ae1d9e1)
2019-09-03 01:53:12 -04:00
Szymon Kłos
652ae5c68f Sidebar: don't show border and placeholder if not visible
Change-Id: I689fa47b0dcb034688ec73c0d338c99423b10a38
(cherry picked from commit 9b31ab7d44894dda87276eae6bb852bbbc692e1e)
2019-09-03 01:53:12 -04:00
Szymon Kłos
d5b906f3d5 Z-index doc, sidebar under menu
Change-Id: Ic9c0dbb326d45c205746e50018906030f7a6fd27
(cherry picked from commit 0d7b28daf8a8bf6f2adc33bbe3d7d5f7f72d6659)
2019-09-03 01:53:12 -04:00
Ashod Nakashian
c02d6527fb leaflet: resize the sidebar just befor rendering
This prevents flicker and the clipped sidebar issue.

Change-Id: Ia940894c2ad6cdcfcdcf5eb910d101c45b2f9ee5
(cherry picked from commit 5125226337e5ea826359534cccc8c46df62d6e8b)
2019-09-03 01:53:12 -04:00
Ashod Nakashian
8e5905fb8c leaflet: keep the client active while the user interacts with dialogs/sidebar
Change-Id: I7667f2ae98b04d6066de779348a0aa8a2c0cb14a
(cherry picked from commit 3857d7e08b3924731ab65fa4fe874c71b319f071)
2019-09-03 01:53:12 -04:00
Ashod Nakashian
1e161388a1 leaflet: allow space for the vertical scrollbar
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)
2019-09-03 01:53:12 -04:00
Ashod Nakashian
9a8b12ce0e leaflet: hide sidebar's horizontal scrollbar
And merge a single z-index property into
the main css.

Change-Id: I0a8ed76c98b46052b2cf4b32cfcae498c1615584
(cherry picked from commit 7ba1f6a12c6c8797b3d832faf540d4914b6f219b)
2019-09-03 01:53:12 -04:00
Szymon Kłos
8221f12d76 Allow to grab focus by dialogs without a cursor
Change-Id: Ifb40ffbc3ea3e921dff9e31247318e377b372400
(cherry picked from commit 8595bb421989091584447aeb9bc549ef88953a96)
2019-09-03 01:53:12 -04:00
Szymon Kłos
cc778dca9b Get correct canvas object
Change-Id: Iedc41741968a4baab787c0b364764415c941aa16
(cherry picked from commit 25ea25c938d3d939878f83b6ab2cacac021d91c3)
2019-09-03 01:53:12 -04:00
Ashod Nakashian
c21797d9ac leaflet: hide sidebar on mobile screens
Change-Id: I9d43dab6e44eeda35bdd8f2fffe0702d5d0c11f1
(cherry picked from commit 41b80a56b79e9d8eb45a8fde07d15cefc3603377)
2019-09-03 01:53:12 -04:00