Commit graph

13083 commits

Author SHA1 Message Date
mert
410c8caf3a fix auto-hiding shelf can obscure the FAB on ChromeOS
1) FAB button size has been increased to 70dp (56dp default)
2) Given 24dp margin from bottom
3) Its now placed in the bottom-center of the screen

This way it is now visible clearly with auto-hiding shelf
and ChromeOS notifications

Change-Id: Ia53c6621f2758366d04a79fe19f5cb89aaa80de5
Signed-off-by: mert <mert.tumer@collabora.com>
2020-11-17 16:17:09 +03:00
mert
b949c8bc14 Chromebook: fix unable to re-gain textarea focus
This is a regression started after:
b5bd8e1e0ef0d6f8b7c32b106e7eb611977a291d
!isChromebook() control added here accidentally

Change-Id: I0d774fdeadb30960413aa1b975145ed78ec7b20d
Signed-off-by: mert <mert.tumer@collabora.com>
2020-11-17 16:16:48 +03:00
mert
fb8f867625 ChromeOS: Fix loosing textarea focus when using arrow keys
Change-Id: Ieec5779cfbb6c864279ad4f725ed10a1860ce7a5
Signed-off-by: mert <mert.tumer@collabora.com>
2020-11-17 16:16:20 +03:00
Jan Holesovsky
94e9caffff android: Fix paste of plain text.
Without this, this scenario:

* in the browser's input line, tap, and use the "copy" icon
* open Collabora Office, long-tap, "paste"

lead to paste like ??#h#t#t#p#:#/#/#t#h#e#.#u#r#l

The actual fix is the usage of UTF-8; but at the time it is safer to
iterate over the mime types, so do that when I'm touching this code.

Change-Id: I62b7958f7fbc07acac4245465bc489fc86f202c3
Signed-off-by: Jan Holesovsky <kendy@collabora.com>
2020-11-17 15:11:46 +03:00
mert
74fe525f94 Fix Chromebook text input focus issues
This fixes various of focus problems related to
writing. We have a hack for mobile devices for
hiding onscreen keyboard and to do that, we blur the
TextInput. But it is not relevant for Chromebooks despite
being a mobile app.

Also fixes calc text input problem, now theres no need to
double tap on a cell to write.

Change-Id: I674a3d553e130c34211c04ad0ebcb6401b462412
Signed-off-by: mert <mert.tumer@collabora.com>
2020-11-17 15:07:00 +03:00
mert
5418b4b19b Make AutoSpellChecking option state remembered on first start
Change-Id: I25823025e35ba6f580b03834979fb0bea616bcc1
Signed-off-by: mert <mert.tumer@collabora.com>
2020-11-17 14:55:31 +03:00
mert
b0a7532b08 Turn off broadcast on presentation preview tiles
We don't need to broadcast for all users since
when there is a change, invalidation is sent for update
to each user. This causes a re-render for all the users
unnecessarily.

Change-Id: I071573bf0c85d16b36aeb94398cc6a5c2fcbd8ca
Signed-off-by: mert <mert.tumer@collabora.com>
2020-11-17 14:48:55 +03:00
Thais Vieira
062f43dfa7 impress/top_toolbar: Add Cypress test for italic attribute on desktop.
Change-Id: I7cf9e31beba87cd12d562b0e899b83c895ba68d7
Signed-off-by: Thais Vieira <thais.vieira@collabora.com>
2020-11-17 12:29:40 +01:00
Ezinne Nnamani
e350557c94 Created a cypress test for Apply top and bottom border and Apply border for all sides in Desktop Calc
Signed-off-by: Ezinne Nnamani <nnamani.ezinne@collabora.com>
Change-Id: Ic24f19c298cd2577f18c961b6a0a596034756445
2020-11-17 12:14:11 +01:00
Gleb Popov
f7faaad790 Replace all __linux in CPP conditions with __linux__.
Signed-off-by: Gleb Popov <6yearold@gmail.com>
Change-Id: If3e213b1cf1f3c4ab960276fc6edfb71f9416420
2020-11-17 09:21:45 +00:00
mert
4a1191003f Rotate watermark pixels by 45 degree
Change-Id: I8fac121f94c127518aadd10a6eac4c9f0e496242
Signed-off-by: mert <mert.tumer@collabora.com>
2020-11-17 08:25:15 +03:00
Ashod Nakashian
b47148ec16 wsd: log the socket id on websrv_poll
Otherwise, there is no way to know which connection
a given log belongs to, when websrv_poll handles
multiple simultaneous connections.

Also removed a duplicate log entry.

Change-Id: Id74e6e7b66062daf15a716b9fea8e7995fd75af0
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-11-16 23:46:08 -05:00
Tamás Zolnai
cc85a51eeb cypress: workaround an issue of afterEach() hook.
For some reason, assertions do not work properly
in afterEach hook after a test failure. So in case
of test failure we don't check the admin page,
whether the test file was actually closed, but we
just wait a constant time.

Change-Id: If2eb927b0383816639689ec67eef7e3cd1142366
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-16 17:50:15 +01:00
Tamás Zolnai
3f4468a497 cypress: merge some selection helper methods.
To reuse as much code as we can. We can use the same
method on mobile and on desktop.

Change-Id: I15b1038313145db6cb6ea07489c0d30a0fc2ce64
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-16 17:50:15 +01:00
Ezinne Nnamani
8bcde166cd Created a Cypress test for Left and Right border, Top border, Bottom border
Signed-off-by: Ezinne Nnamani <nnamani.ezinne@collabora.com>
Change-Id: I3c1d920c9d05b44dda5172ec67226072675ba892
Signed-off-by: Ezinne Nnamani <nnamani.ezinne@collabora.com>
2020-11-16 17:29:31 +01:00
Gleb Popov
78904302da Do not call non-standard std:🧵:id constructor.
Change-Id: I916f7ba28bc9a52fa3c601fd695ff8146c1712a1
Signed-off-by: Gleb Popov <6yearold@gmail.com>
2020-11-16 14:02:23 +00:00
Gleb Popov
3ee1ee0b50 AdminModel.cpp: Fix build with libc++.
Change-Id: I46a5d8a44c9d329d52ef355f228be63b8af06947
Signed-off-by: Gleb Popov <6yearold@gmail.com>
2020-11-16 14:02:23 +00:00
Gleb Popov
92c0d375eb Port mount.cpp to FreeBSD.
Change-Id: I1fbce01d3c69c0eeab20a66e1d608a87b316f9f5
Signed-off-by: Gleb Popov <6yearold@gmail.com>
2020-11-16 14:02:23 +00:00
Gleb Popov
7f0b19baa7 map.cpp: Add an implementation of glibc-specific error() function.
Change-Id: Ib7b87ed27a27b050d38b9c51c0c8d7a7fca32973
Signed-off-by: Gleb Popov <6yearold@gmail.com>
2020-11-16 14:02:23 +00:00
Gleb Popov
8c6cbedd58 Socket.cpp: Use LOCAL_PEERCRED flag on FreeBSD instead of SO_PEERCRED.
Change-Id: I3e53f3af102b11f0dd51b8c8d97c3367d83fd09e
Signed-off-by: Gleb Popov <6yearold@gmail.com>
2020-11-16 14:02:23 +00:00
Gleb Popov
57eab254ca On FreeBSD, link to libexecinfo and libz from base. Require 3rd-party libiconv.
Change-Id: Id8ca0524d3a557e284897665d0e48de933d131d3
Signed-off-by: Gleb Popov <6yearold@gmail.com>
2020-11-16 14:02:23 +00:00
Gleb Popov
55ed321a1c Implement SslContext::id() for FreeBSD systems by calling pthread_getthreadid_np().
Change-Id: I9d92837dd35c5386222c2644ece9693d7bbb1535
Signed-off-by: Gleb Popov <6yearold@gmail.com>
2020-11-16 14:02:23 +00:00
Gleb Popov
aa97476f07 Util.cpp: Do not call setpriority for thread handles on non-Linux systems.
Change-Id: I50cdc429cd606e261c70219e51587a54a269b082
Signed-off-by: Gleb Popov <6yearold@gmail.com>
2020-11-16 14:02:23 +00:00
Gleb Popov
3930ea86a3 FileUtil.cpp: Fix building on FreeBSD.
Change-Id: Ifed1e69284724c702b53c5fbf6940c821421cdbb
Signed-off-by: Gleb Popov <6yearold@gmail.com>
2020-11-16 14:02:23 +00:00
Gleb Popov
414dd5de58 Seccomp.cpp: Fix building on FreeBSD.
Change-Id: Ie492e1f184bf1a2255a7ab03a9d61ecdca116560
Signed-off-by: Gleb Popov <6yearold@gmail.com>
2020-11-16 14:02:23 +00:00
Gleb Popov
a90bbc9223 Log.cpp: Extend #ifdef conditional to FreeBSD case.
Change-Id: I8aa4a7da9e43a606e1555a1751dd5d710d290ce8
Signed-off-by: Gleb Popov <6yearold@gmail.com>
2020-11-16 14:02:23 +00:00
Gleb Popov
333a70c05e Kit.cpp: Fix build on FreeBSD and use cap_enter() to constrain the process rights.
Change-Id: I9dbf143a11fcea9c59fb5294db74208619defa0c
Signed-off-by: Gleb Popov <6yearold@gmail.com>
2020-11-16 14:02:23 +00:00
Gleb Popov
7553c1f2fb ForKit.cpp: Implement haveCorrectCapabilities() for FreeBSD by checking that
we are running as root.

Change-Id: I1aa1cfe92e25f754b7a9dd5e658f00d05346f38c
Signed-off-by: Gleb Popov <6yearold@gmail.com>
2020-11-16 14:02:23 +00:00
Tamás Zolnai
e8e9ed8c50 cypress: update this comment modification test.
To make it more stable.

Change-Id: Ib8731df9d29fafe568e6e7124ed8d17c315831b6
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-16 12:40:18 +01:00
Tamás Zolnai
6fa042da32 cypress: rework formulabar related tests.
To make them more stable. I used tc tool to
simulate network delay to find issues with
the test code.

Change-Id: I9a67a2650fc08e573323b1df96b940318b4a45cb
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-16 12:40:18 +01:00
Ezinne Nnamani
fc851c6cf8 Created a cypress test for Remove border cell, Right border cell and Left border cell in Desktop Calc
Signed-off-by: Ezinne Nnamani <nnamani.ezinne@collabora.com>
Change-Id: I967dee45e2956f40a8645e9578a3b7c40a8a4d58
Signed-off-by: Ezinne Nnamani <nnamani.ezinne@collabora.com>
2020-11-16 11:38:11 +01:00
Pranam Lashkari
d28567be8f leaflet: fixed incorrect info shown on the comment reply vex dialog
instead of the current author and date,
it showed the date and author of the original comment we are replying to.
It caused many problems in the development of comment wizard.

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Iad3cc8dd8b3053c73ce1f575ff5d50ba3c666c70
2020-11-16 13:52:56 +05:30
Tamás Zolnai
b3ce314264 cypress: skip afterAll() in case of failure for NC only.
Change-Id: I37c13cd9c40fe034236e675fd1ba1ed8f0dea216
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-16 02:30:16 +01:00
Tamás Zolnai
8f2df4a0a5 cypress: rework some calc tests.
Simplified getTextPosForFirstCell() method and
renamed to better match with the function.
Also modified getCursorPos() method. Sometimes
we have an additional hidden text cursor for
formulabar.

Change-Id: Ia8adc645ef3f20426dd509803fcfc4f35662a779
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-16 02:30:16 +01:00
Ashod Nakashian
cb4beaca34 wsd: avoid the using keyword and use C++ size_t
size_t in C and in C++ are not necessarily the same
type. The C++ size_t is in the std namespace. Since
we do include many C headers, and indeed some C++
runtime headers do define size_t for backwards
compatibility, it's easy to mix and match the two
types.

Also, 'using std::size_t;' isn't a great practice,
so removed.

This is not exhaustive, just some low-hanging cases.

Change-Id: I85a36b6fd1acd204274b1869de9bcb94c8b3cf13
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-11-15 15:41:41 -05:00
Ashod Nakashian
634dfdb098 test: improve failure details
We now log the test assertion failure and exception (if any) details
with file and line number to assist in faster troubleshooting.

Change-Id: I3217458f30383cd24f3cbbe15431f2b9151744d4
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-11-15 14:19:12 -05:00
Ashod Nakashian
ee0b5203ec wsd: SaveResult final and Result enum class
This makes the code self-documenting and avoids accidental
comparison or assignment of Result variables/values.

Change-Id: I84b8e36aa999191c8704938552b73ddc1c3dc3fc
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-11-15 13:50:16 -05:00
Ashod Nakashian
2ddc1afb69 wsd: resuse Stat where possible
This replaces Util::getFileTimestamp with
FileUtil::Stat::modifiedTimepoint() and fixes a potential bug:
getFileTimestamp had only 1 second precision (it simply dropped
sub-second data). This could mean that any modifications to a file
within a second could not be detected.

Minor simplifications done where possible and overly long lines
have been reformatted.

This is a non-functional change (except that file modified-time
now supports microsecond precision).

Change-Id: I3606638a86fc3e00c0ad5cb602bdbb2b4651867b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-11-15 13:50:16 -05:00
Ashod Nakashian
20f95a17a9 wsd: improved Stat modified-time and unit-tests
Change-Id: Ic6e7972e3d69c78681f599b6e6797e3e4164cd34
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-11-15 13:50:16 -05:00
Ashod Nakashian
2fd9bbb509 wsd: socket comments and cosmetics
Change-Id: Icb202f5d44238a436ff5095341c9287a01df1247
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-11-15 13:50:16 -05:00
Ashod Nakashian
23638329bb sample: new form page to load documents via post requests
Often loleaflet.html is loaded via POST requests. This
new sample demonstrates and exercises this approach and
is a handy way to load documents.

Change-Id: I065a946413ab08d399ac5704c67f6f1ba37bdd9e
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-11-15 11:10:20 -05:00
Ashod Nakashian
ebcdaa9e87 sample: added usage and improved url construction in framed.doc.html
This should make this sample much more useful by documenting
the proper usage and helping the user avoid common pitfalls.

Change-Id: I965bed0e4ab685dd2a68f7b246dd9a409d296337
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-11-15 11:10:20 -05:00
mert
8422d2d596 Fix distortion on watermark text
Change-Id: Id1bda715723e717d6f0893dbc1aef937014076e3
Signed-off-by: mert <mert.tumer@collabora.com>
2020-11-15 13:54:33 +03:00
Michael Meeks
7a02a8c24e Ensure consistent canonical view id accounting between wsd and kit.
Confusion arose due to separate creation of session, and watermark
property fetch from CheckFileInfo which happens in DocumentBroker::load
which doesn't do a load. This happens in a subsequent 'load url='
message cf. global.js which can then race vs. the session creation.

This causes mis-ordering of another unhelpfully shared Session,
letting the view canonicalization list to get out of sync between
the two processes.

So instead - tell the view it's canonical id. An example of the
problems of trying to share some unclear subset of the Session
class between kit and wsd perhaps.

Change-Id: I63dc30f9a047e3f889fd339b6aaf392b9fef37b9
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2020-11-14 19:56:09 +03:00
Michael Meeks
0d10c2cae8 Set normalized view id for broadcast (ie. slide preview) thumbnails.
Change-Id: Ica5312ae9c7147c8dc969523e28d460348ba2e76
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2020-11-14 19:54:56 +03:00
Tamás Zolnai
04139d31cd cypress: diable this new multi-user test case for NC and php-proxy.
Change-Id: I18688e130f9ac5b8976ca60ad44b798c48181129
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-14 12:24:36 +01:00
Tamás Zolnai
2c338ef7e2 cypress: this test is unstable recently.
Needs some rework.

Change-Id: Ied3008463e9a7210a400702a0331ab7f09139ed3
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-14 12:24:36 +01:00
Tamás Zolnai
1a6fc4ca05 cypress: disable these unstable tests for now.
Change-Id: I99f166933ddbaf899d2d4fffd218f2824e3adf52
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-13 23:17:06 +01:00
Tamás Zolnai
d9ce03331d cypress: php-proxy: reenable this test.
The issue was fixed triggered by this test case.

Change-Id: I00522835c25ca18aa374958c5b33b13f35e79563
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-13 23:17:06 +01:00
Tamás Zolnai
6611d6359a Fix 'Cannot read property 'getSouthWest' of null' error.
Change-Id: I6344ea781bce1de817a6e73897fc494172550aa9
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-13 23:17:06 +01:00