Commit graph

17839 commits

Author SHA1 Message Date
Pedro Pinto Silva
6e9a11211e Autofilter buttons do not need special css targeting
With bda34c9096 those btns are already
generated with the proper generic classes that hold those styles so,
no need to keep individually targeting them

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I87912913d3f7340b5ed4b06b8c658791eda56d4e
2022-03-23 23:10:57 +03:00
Pedro Pinto Silva
ca316c0f3d Remove duplicated n inactive margin from annotation btns
- Better to keep everything related to buttons in the btn.css file
- Also all margins are already being set in the btn.css file anyhow

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ic1d9f7e2b895604367571a93f593ef359659c57c
2022-03-23 23:10:57 +03:00
Andras Timar
0392facc6b Bump packaga version to 21.11.3.3
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I315b7d74bfe09f0820068dc7ca36960d024c492b
2022-03-23 16:42:48 +01:00
Pedro Pinto Silva
142097b340 Fix missing icons by creating iconURL aliases
- add possibility to specify name alias for icons that are
  generated via jsbuilder (sidebar, notebookbar). The goal here is to
  avoid having multiple duplicated icons with different names:
  Example: 2 identical SVG files were being used just because of their
  name.

Context: When unifying icons between sidebar and toolbar PR #4426 ,
9576137df51725b677342c606dcad8749eaf0622 we end up with icons without
images on:
  - Calc: Notebookbar
  - Calc: Sidebar
This happens because even though we want to use the same icons the uno
commands are actually different from ones used in writer and elsewhere
(uno.AlignLeft <> uno.LeftPara)

Note: Since the sidebar uno.commands come from core we really need to
use icon url alias. If that was not the case we could have used here the
newest compatibilityAliases introduced in
7e6f3d5590

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I49647f8a32665d0363259151c09131d8c5063783
2022-03-23 17:01:43 +03:00
Pedro Pinto Silva
4be9e29a86 Update build status links
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ib2109fa3149d2f3dfbda1291975aa74a3e33e981
2022-03-23 14:29:51 +01:00
Pedro Pinto Silva
1c6206814b Fix comment reply count color
- Partly revert 7e705fcf09
  - RGB expects rgb values. Hex annotation does not work: renders it
 transparent
- Avoid low contrast between font and background (white with light bg)
  - Use instead primary color

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Iad24d6bf30d2e62505254c70b174e9b9971cbeb1
2022-03-23 13:57:35 +01:00
Ashod Nakashian
4d2351e37f wsd: reduce logging noise in socket reads
Change-Id: I4305baf828ccb1ae71d3b3b12fa90a7aeb5e0928
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-03-23 13:31:58 +01:00
Pedro Pinto Silva
5fb8c05f51 Add missing icons for mobile
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I06c24a406eb77ab22cb863ce1b2d071aa07c6582
2022-03-23 09:54:54 +01:00
Rash419
ea35dbe350 wsd: added regex support for alias tag
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I2534ea9afa7d3d3bf10f91eeac44f70381acc76a
2022-03-22 14:13:22 +01:00
Pranam Lashkari
defef6a171 util: removed duplicate string trimming function
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ia150975467d1df8a9d05c8543bcb5d7369d29099
2022-03-22 09:07:03 -04:00
Tor Lillqvist
a635f9b8a6 There is no type called COOLWSD::Server
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I7ccf4960a4161fdc5b012d72787e94b490cb4a6d
2022-03-22 11:38:51 +02:00
Tor Lillqvist
037a0929f0 Remove two forward declarations from COOLWSD.hpp
Only one of them is needed, and only in COOLWSD.cpp itself.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I03864afdc13e778a2b8ce8205e135d679dddf13d
2022-03-22 11:38:51 +02:00
Ashod Nakashian
1022a7e78e Revert "wsd: exclude deprecated openssl API"
Apparently this breaks the build on at least
CentOS. Reverting for now.

This reverts commit 23f02b8929.

Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Change-Id: Ie8f00bbc53a63098b473d625846c0b6fd4e074bd
2022-03-22 08:41:59 +01:00
Andras Timar
a96c224281 Bump package version to 21.11.3.2
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I5cf03151cf77b9f6031e42c61713f4b3acf4e9e8
2022-03-21 21:48:43 +01:00
Jan Holesovsky
4bef530844 Escape some parameters for a good measure
Signed-off-by: Jan Holesovsky <kendy@collabora.com>
Change-Id: Ie5d2017ed6ce9f38623b42b336c5261be322b025
2022-03-21 21:35:27 +01:00
Gökay Şatır
2a944950e4 Typo in COOLWSD.cpp.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Ib76fce22e70cb448712a33879c1484418bc75328
2022-03-21 21:34:25 +01:00
Michael Meeks
16386b9aaf Re-work welcome configuration.
Change-Id: Ia99eb5b587a849d32d7d4f392c15f84db2423e95
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-03-21 21:34:25 +01:00
Gökay Şatır
32b85273d7 Add condition for infobar.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I4df356663efa91207ef310341b7b08992bcb77de
2022-03-21 14:22:04 -04:00
Pedro Pinto Silva
2bb379afa6 Fix overflow property for FF
prefer universal value as opposed to WebKit-based and blink only
value

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ie0bff5de254829db6bffcd7a928629a98b1889ac
2022-03-21 15:32:52 +01:00
Mert Tumer
eec3ef97e2 android: fix unable to exit modified document
We dont upload to storage on mobile we save as locally
and copy the temp file into original on uno save result callback
Doing that once during close is enough since there is no
turning back and it cannot be possibly modified after

Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I047626be862cdbcb86e083534555e45530f417a2
2022-03-21 16:44:50 +03:00
Pedro Pinto Silva
0e5e1efcd0 Allow items to be shown invisible on the TopToolbar
This is important because we in many places might want to still have the
respective element's space but without actually showing it.
Example: divider's space without that being represented by a bezel
- And add this new property to breaks surounding dropdown menus

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ib58cc9564144c4ad48fa240878a3654add5d4d03
2022-03-21 11:23:52 +01:00
Mert Tumer
585974e371 mobile: fix fullscreen presentation does not work on readonly mode
we send the slideshow buttons reference to onClick function
in that item.disabled is false but later we reassign it from
w2ui get function and then it becomes disabled true on readonlymode
The logic is incorrect because onClick function does not respect
wheter the item is passed or not and tries to reassign it anyway.

Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I025e26c455a7673a002f894f49452b360550b178
2022-03-21 10:06:13 +01:00
Ashod Nakashian
23f02b8929 wsd: exclude deprecated openssl API
There are no deprecated API currently in use,
but that is a moving target as we upgrade openssl.
This prevents any accidental use of deprecated API
and will reveal any deprecated API used in any
particular build.

Change-Id: I969f7f7c4efe163d4704dea9aab45c09550baa40
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-03-21 08:57:41 +00:00
Ashod Nakashian
140b4f9c08 wsd: minor improvements to StringVector::equals overloads
Change-Id: Ifa975e579392151bef422ff985a93abf3129dfeb
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-03-21 08:57:41 +00:00
Ashod Nakashian
fc187b9e1f wsd: test: correctly show the failing code in the assertion message
Change-Id: I99b3688398fb3667ce4e0f5050aa5ca79e2fd0d1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-03-21 08:57:41 +00:00
Ashod Nakashian
e164cb4a4d wsd: trace poll events and revents flags arround ppoll
Change-Id: If6aedff69a6421a16eec9f86fed6d0ea381ecc0c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-03-21 08:57:41 +00:00
Ashod Nakashian
f74192d9ac wsd: always include the BIO errors in SSL logs
And improved socket logging in general while
making them more consistent.

Change-Id: I1ed7f2561476ca5370af91079d5d616804396f8e
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-03-21 08:57:41 +00:00
Ashod Nakashian
ea316ecae9 browser: protect against undefined keyEventFn
Change-Id: Ibe7d4af2684d3c90b8f366a3203e186d4489f7ad
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-03-21 08:57:41 +00:00
Szymon Kłos
8ecca93b14 jsdialog: find also controls with modified id
In some cases we add 'table-' prefix for toolboxes due to
some old requirements in the mobile-wizard. We need to find these
modified ids in a fallback on widget update.

In the future we should get rid of 'table-' prefix.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I4db881065b3deed427c12b417d0a30791a2184aa
2022-03-21 09:44:27 +01:00
Szymon Kłos
ff7e4a8b3b co-22.05: mobile writer/table_properties_spec.js
- use .unoXXX class instead of id
- check only if height was changed on Optimal Row Height command

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ibfa93076237b15e16ae1851e3a66b4b239c42a2d
2022-03-21 09:35:49 +01:00
Szymon Kłos
7e6f3d5590 co-22.05: mobile writer/insert_formatting_mark_spec.js
- add possibility to specify UNO command alias for newer
  version of core so we will call all the versions for
  compatibility of online with many versions of core

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I380fb1d2fd7f63bac297745401fa9d619f693348
2022-03-21 09:35:49 +01:00
Szymon Kłos
c6d347f241 Revert "image operation: make sure embedded svgs are shown in writer only"
This reverts commit 7821ce5368.

it is not needed, and blocks update of the image preview in Impress

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I1101c50a31f63e7a2acd91f22b0160e5fe204c3a
2022-03-19 01:48:36 +01:00
Kristopher Maxwell
6315aadcad Add back removed breaks from TopToolbar, see #3184
Breaks were removed in commit df925222a2

Signed-off-by: Kristopher Maxwell <kristophermaxwellc@gmail.com>
Change-Id: I376207d654ccbe98fc1d1b4b84363748190ab646
2022-03-18 18:53:06 +01:00
Rash419
da3143dbdc wsd: added mode attribute to alias_groups
you can switch between 'first' and 'groups' mode
default mode is 'first' it allows only the first host when groups are not defined.
set mode to 'groups' and define group to allow multiple host and its aliases.
also added mode option in JSON format

to make the setup backwards compaitable , auto_host is by default false it won't
resolves aliases and dockey will only use uri's path . To use alias_groups you have
to explicitly set the auto_host allow attribute value to true

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I3af439edcbc546d9a660d678e52d813951dc237a
2022-03-18 18:30:14 +03:00
Rash419
ddc13c0f4a wsd: added new method to check allowed Aliases
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I24fab96ff977d3f0a85c98257e779216f50dc92f
2022-03-18 18:30:14 +03:00
Henry Castro
6b701ce613 wsd: use get/set Authority to extract host + port
Change-Id: I91ce4e9cef6854ad2cc113d1ad6f55d7c91d6ab6
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-03-18 18:30:14 +03:00
Henry Castro
f0bfa5a53c wsd: parse and check syntax alias host
Change-Id: I66e465ed4b8997b72f3cdf1c8b85a95d951bf735
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-03-18 18:30:14 +03:00
Pranam Lashkari
7821ce5368 image operation: make sure embedded svgs are shown in writer only
fixed regression caused by 1c86fd2ff869d36
regression: while we move textbox in impress previews would not go away

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I1b3cfefdd6abb7f81ff741eee4edab7e349c932d
2022-03-18 15:48:46 +01:00
Pedro Pinto Silva
91ab74f65c Buttons: Remove unnecessary CSS on calc
Many of those CSS rules were added in the past where not all main btns
had the same class.

All of those are now generated and stamped with
`.ui-pushbutton` class. Thus we can now remove those very specific
and outdated rules.

imgs:
https://archive.org/download/cool-github-commit-imgs/statistics-dailog-define-name-pushbutton.png
https://archive.org/download/cool-github-commit-imgs/statistics-dailog-ftest-pushbutton.png
https://archive.org/download/cool-github-commit-imgs/statistics-dailog-manage-names-pushbutton.png
https://archive.org/download/cool-github-commit-imgs/statistics-dailog-sampling-pushbutton.png

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ief0211c2825c23f113fccb88e1ce6fea59d1500c
2022-03-18 13:36:19 +01:00
Pedro Pinto Silva
961f43027b Simplify CSS for vex btns on mobile, flex
Now with changes from 451d11ebacaa72307ea6b70c57a83544cbd65ce5
change-id: Ia4ab1de407ca7658242282181eeb215fb6dc0d99 we can now safely
target all the vex buttons for mobile without exception

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I660463733fa9e6ce8feb46a08e9217f7c9f414da
2022-03-18 13:36:19 +01:00
Pedro Pinto Silva
6b4293b6d4 Target all buttons, fix mixed display properties
Now with annotations btns being created with new ids it's crucial to
make sure we target them all

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I8c2dc9d0a088290fa0c2b9b3cbf83ee2f7d0dd76
2022-03-18 13:36:19 +01:00
Pedro Pinto Silva
320b4095b6 Annotations: Fix cancel confirm btns flex CSS and add class for container
This affects annotations (vex) and jsdialogs

- Set annotations btns' container to flex so we can reduce CSS rules
around specific buttons

----

Before we were relying solely on cancel button to change the layout,
by setting it to flex and let ok/submit/confirm btn untouched. This
was causing some inconsistencies plus it was forcing us to add CSS on a
case by case instead of fixing the root cause

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ia4ab1de407ca7658242282181eeb215fb6dc0d99
2022-03-18 13:36:19 +01:00
Pedro Pinto Silva
afc34b5128 Update branch status
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I242e83feb8073fea040a2a61a41801e9962d7520
2022-03-18 12:34:54 +01:00
Pedro Pinto Silva
3223b69c88 Code refactoring: swap annotations' size for CSS var
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Id6de428f2182520290424b33f2f7f539c0c09e4c
2022-03-18 09:54:19 +01:00
Pedro Pinto Silva
0beb1fd426 Laptop, mobile: Make it easier to insert text on a new comment
- Increase height of text area when in presence of dialog be that on
mobile or small screen size desktop or tablet for that matter

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I3791cb5ba3cc5ce10d250993b49ba058d0847dfc
2022-03-18 09:54:19 +01:00
Pedro Pinto Silva
8801b9593a Remove extra margins and padding for annotations content
These styles were initially intended to align to the user avatar but
they are not ideal anymore (specially when factoring in the compact
/collapsed mode on desktop for small screens)
- Remove these from desktop and make sure they are only avaialble on
mobile

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I1518373b1eda574e0aecbd5c76c5fdc1f5fc1c28
2022-03-18 09:54:19 +01:00
Pedro Pinto Silva
6f9ed98046 Set max height for comment annotation contents
iteration on top of
commit hash: 31284e40f573843189c001c04a13479f67e3f832
commit change-id: I03693f67c69d108ef3dcbf5cc9cd0127bd37b5a3

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I2b52243a4367f43f7449c12854261ac6235493e6
2022-03-18 09:54:19 +01:00
Mert Tumer
e99fb5309d fix comment reply is too wide when the content is big enough
Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I03693f67c69d108ef3dcbf5cc9cd0127bd37b5a3
2022-03-18 09:54:19 +01:00
Miklos Vajna
c9bba090b7 sanitizers: fix unit-base
==30332==ERROR: AddressSanitizer: odr-violation (0x0000020b9b20):
  [1] size=1 'StorageBase::SSLAsScheme' ../wsd/Storage.cpp:67:19
  [2] size=1 'StorageBase::SSLAsScheme' wsd/Storage.cpp:67:19
These globals were registered at these points:
  [1]:
    #0 0x71d0f8 in __asan_register_globals.part.13 lode/packages/llvm-llvmorg-9.0.1.src/compiler-rt/lib/asan/asan_globals.cc:362
    #1 0x7f4c362ed33b in asan.module_ctor (online-san/test/../test/.libs/unit-base.so+0x10eb33b)

  [2]:
    #0 0x71d0f8 in __asan_register_globals.part.13 lode/packages/llvm-llvmorg-9.0.1.src/compiler-rt/lib/asan/asan_globals.cc:362
    #1 0x11c709e in asan.module_ctor (online-san/coolwsd+0x11c709e)

==30332==HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_odr_violation=0
SUMMARY: AddressSanitizer: odr-violation: global 'StorageBase::SSLAsScheme' at ../wsd/Storage.cpp:67:19
==30332==ABORTING

Resolve the conflict by not providing these definitions when building
tests.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I6a8f74bd0b78a76f46b5401acaa816dd0b185aa9
2022-03-18 09:23:59 +01:00
Ashod Nakashian
1bb21868b2 wsd: reduce polling when blocked on ssl handshake
While SSL is handshaking, there can be no general
application data communication. During that early
stage of connecting we have data to send (the
request, headers, etc.) and so we poll on POLLOUT.
Naturally, we also always want to poll on POLLIN,
because we can never know when there is data to
read (especially true for web-sockets).

The problem is when SSL will not send data just
yet because it is handshaking. It is typically
waiting for handshake negotiation data to read,
so when we POLLOUT, poll immediately returns, but
writing (via SSL_write) fails with WANTS_READ
error. This goes on in a busy-loop until the
negotiation data is available for read and the
handshake is completed. Very inefficient.

The solution is to poll on whatever SSL needs
during the handshake, exclusively. Once the
handshake is complete, we poll on whatever we
need. However, SSL can renegotiate at any time,
so we also merge with what it needs.

In addition, we avoid the unnecessary read when
poll doesn't give us POLLIN in revents, since the
read will more likely than not fail (except in
the rare case when data becomes available in the
interim). Notice that SSL_read will return
SSL_WANTS_READ when there is no data, which
is misleading (since SSL isn't in need of data to
read at all, nor are we, for that matter).
Best not to do noisy reads unnecessarily.

These changes are disabled by default and can
be enabled via the experimental_features option.

Change-Id: I6a7ed7d871ed257b30062cc720a8b8c7acbab3b7
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-03-17 18:46:46 -04:00