Commit graph

14870 commits

Author SHA1 Message Date
Ashod Nakashian
352840c0ea wsd: http: larger 64kb upload-file read buffer
Change-Id: Ie9a0e6f76425d796979dbc77eecf1b05993b834d
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
(cherry picked from commit 34f629c6adc5bb6eb93fd8c813d72ee923d09a05)
2021-04-27 17:48:23 -04:00
Ashod Nakashian
c5490f628e wsd: enable fat writes in WebSocket
This enables writing multiple WS frames
at a time, up to the capacity (rounded
to the next full-frame's size).

Change-Id: I30d25f9ba1e405156d1e44886b2f3ac8017f0f3c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 17:48:23 -04:00
Ashod Nakashian
3decba7eec wsd: specify the minimum bytes we can write to the socket
When writing to the socket, it's always more efficient
to fill the buffer up to the hardware limit for each
write. This is doubly important for efficiency with
SSL, due to the overhead of encrypting multiple
small buffers instead of one large one.

Currently we don't write more than one message
at a time, primarily due to limitations in
the Poco sockets in the unit-tests, which
have a hard time consuming multiple WS frames
with a single poll (subsequent calls to poll
doesn't enter signalled state until new data
arrives, possibly because the data is read and
buffered internally, making the whole scheme
of using poll unreliable and meaningless).

Change-Id: Ic2e2cf1babfb5ab4116efd93f392977ba234d92b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 17:48:23 -04:00
Ashod Nakashian
26be3a2a2f wsd: perform socket writes more efficiently
Since it's most efficent to send full blocks at
once (especially so when SSL encryption is done),
we now perform write when the buffer has fewer
than the send-buffer-size bytes. Previously,
we were only getting more data to write to the
socket when the buffer was completely empty,
potentially wasting valuable opportunity to
write more data to the socket while we're at it.

Change-Id: I69a18a042dc2e551ebc5e1af40dae091da3f3d13
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 17:48:23 -04:00
Pranam Lashkari
4e9ffdf6d5 annotation: avoid comment wizard opening on text modify
problem:
when the text where comment was inserted is modified
it would invoke comment wizard

i.e: try to insert image between comment text

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ie9422cb5c868eac52239a3a0998246e9b98972cb
2021-04-27 22:43:54 +05:30
codewithvk
7b54f0b300 leaflet: show checked status for full screen in menu
Signed-off-by: codewithvk <vivekpatel7202@gmail.com>
Change-Id: I6d465c4c3cde2e0140a585a6252cca0cc879cb0e
Signed-off-by: codewithvk <vivekpatel7202@gmail.com>
2021-04-27 22:42:52 +05:30
Szymon Kłos
77821e49ed notebookbar: reinitialize only once
Change-Id: Ie931a5d443505fe5d60637cb4a6f24c1a22fbfa4
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-04-27 17:20:54 +02:00
Miklos Vajna
d3c9e07ff3 StringVector: add a way to get a string-number pair out of this ...
... without copying the token.

And use it in TileDesc::parse(), which is known to be a hot path.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I0dcf2eb26c93254cdc6a1c11f9708daf213a825d
2021-04-27 15:31:21 +02:00
Miklos Vajna
c11f0e5708 StringVector: add a way to get a number out of this without copying the token
And use it in TileDesc::parse(), which is known to be a hot path.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I20375d7a1c31f61662446979e4d6799fd45b49d3
2021-04-27 15:31:21 +02:00
Ashod Nakashian
ade93f5f57 wsd: more informative initialization failure log
In some rare cases Poco throws "Exists" exception.

It's not clear what causes it, so this should
log more of the original exception, hoping that
it would shed some light.

Change-Id: I51723f35c9e062c56608e8f7b80c9a65d3f0488f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 08:09:49 -04:00
Ashod Nakashian
6444c35d21 wsd: mobileapp: fix a warning
Change-Id: Ie710a76f3cd5d96056648815ffe393ab2e58ac78
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 08:09:49 -04:00
Ashod Nakashian
17cdf3766d wsd: test: improve the stability of UnitCopyPaste
The .uno:Copy command has to get executed before
we can read the clipboard. Since .uno commands
are executed asynchronously, it possible to
invoke getClipboard before having the data
copied into it, thereby failing the test.

Here we wait for the first sign that the
.uno commands have been executed, although
we can't know if they have finished or not.

This improves the test reliability significantly.

Change-Id: I7da1e4a32092c05dfb533571ea50d5edbc07f554
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 08:09:49 -04:00
Ashod Nakashian
5f6a717b8b wsd: test: simplify and reuse some helpers
Change-Id: I652a77523559f1dd123b56e1a776a8fc64a96bda
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 08:09:49 -04:00
Ashod Nakashian
f20b1f3899 wsd: test: better logging in copy/paste
Change-Id: Ia9561f6603b79336b908fade40d49465c2288a4b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 08:09:49 -04:00
Ashod Nakashian
55309e128d wsd: notify outside the lock
Change-Id: I4b1c693dc561221161768ff0ddc0da5a23d512f2
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 08:09:49 -04:00
Ashod Nakashian
a5368cb287 make: simplify
Change-Id: I67ef881fd36c27ed312b0bd97de1856cad465374
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 08:09:49 -04:00
Ashod Nakashian
1159286fb2 wsd: test: killpoco in TileCacheTests
TileCacheTests now completely uses
async WebSockets. It is both more
stable and faster (by about 20-25%).

Change-Id: I6da0fd12ddf671a7ad666561249b6fb1c5d32a01
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 08:09:49 -04:00
Ashod Nakashian
b47c81e7a8 wsd: improved WebSocketSession interface
SocketPoll is captured as weak_ptr into
WebSocketSession and a much better shutdown
support is now available. The new logic
can do async-shutdown after flushing and
will do sync-shutdown if SocketPoll is
no longer around.

Change-Id: Ia206cab58a13f20f7aeb3a6d8c57afee731c8231
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 08:09:49 -04:00
Ashod Nakashian
930d977c36 wsd: test: log the actual test name instead of function names
Change-Id: I9b9fb93ac0b02fe55ea2876639c6e5a3a3d1ab85
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 08:09:49 -04:00
Ashod Nakashian
c50af5b94c wsd: better and consistent logging of ShutdownRequestFlag setting
Change-Id: Ic9e41d193b6a6a678170ec5ca30bd80bcee04c80
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 08:09:49 -04:00
Ashod Nakashian
358b30a682 wsd: test: fully enable loopback testing of http
Change-Id: Ia54f80bd76b2b7188608dd8df7947139564255dd
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 08:09:49 -04:00
Ashod Nakashian
838af866d6 wsd: test: killpoco in TileCacheTests
Change-Id: I7f0212e488fada532377a5922a2c48e064530bb8
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 08:09:49 -04:00
Ashod Nakashian
ce7ae3f499 wsd: test: killpoco in TileCacheTests again
Change-Id: Ib7a208d69babf3cb004713bd8715659b266aad3b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 08:09:49 -04:00
Ashod Nakashian
04640009f4 wsd: test: move SocketPoll to UnitBase
This is the SocketPoll used by async
WebSocket clients.

Change-Id: I2ec3c0ff9984a6a0c457fd3189a3d7833061147e
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 08:09:49 -04:00
Ashod Nakashian
497de388af wsd: test: start the test poll thread only during the test
CppUnit creates a unique instance of the test fixture
for each test, up front. But calls the setUp and
tearDown functions only right before and after
executing a given test. By starting the poll thread
only right before each test, and destroying right
after, we reduce the number of polling threads
and avoid noise in the logs.

Change-Id: Ia089579443ef3a1aa27e79e0bb90a359db0da07b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 08:09:49 -04:00
Ashod Nakashian
a7b2f14074 wsd: test: single UnitBase ctor with default name
We always want to have some default name so
we can log something relevant. Having
two constructors isn't very helpful,
especially because we must initialize all
members in only one initialization list
(since we call the default-ctor from the
overloaded one).

Having a single constructor with a default
parameter is one of few cases where default
parameters are justified.

Change-Id: Ia2d390be46ea7ad5486248d7ede7a7c95c4352e3
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 08:09:49 -04:00
Ashod Nakashian
bb8069c86b wsd: test: remove superfluous object
Change-Id: I5e1e6becc40dc1634eeef177cd9ad9fe4ee0d006
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 08:09:49 -04:00
Ashod Nakashian
5b96d59747 wsd: test: log the testname in the test setup and result
Change-Id: I0e0277afc3956783ad26ca57e6e2604d60f75a66
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 08:09:49 -04:00
Ashod Nakashian
eb790c7174 wsd: test: set the test name for old-style tests
Change-Id: Iba77f215faba4235351c93453d39b40bed265cfa
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 08:09:49 -04:00
Ashod Nakashian
9742f91527 wsd: log the reason for terminating DocumentBroker
Change-Id: Ieef1d30bd4abc18e27cc057ac2374f730b8992c2
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 08:09:49 -04:00
Ashod Nakashian
eeda9adb29 wsd: read can return 0 from the socket
Change-Id: If74a46a8649ee422ed12a2e247d316451fc9cd75
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 08:09:49 -04:00
Ashod Nakashian
bc38af30dc wsd: safer asyncShutdown in WebSocketSession
Change-Id: I3108a10be7691ed532301dcd42b659bdeb553473
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 08:09:49 -04:00
Ashod Nakashian
0f94eb261c wsd: test: killpoco in UnitCopyPaste
Change-Id: I2657a095e0a9d79b678c826db46b9c69d9aac056
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 08:09:49 -04:00
Ashod Nakashian
4f9d029bde wsd: test: killpoco web-sockets in httpwstest
Change-Id: Ic0b577693abb10dca0dcc9df75fa28943daa5cdf
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 08:09:49 -04:00
Rash419
04bb760497 cypress:added image operation for impress and writer
Signed-off-by: Rash419 <rasheshpadia419@gmail.com>
Change-Id: I3db41c146bcab4ec90ae376909db0f50b4174704
2021-04-27 16:15:27 +05:30
Rash419
8a61603f01 loleaflet:desktop: added delete option in context menu on rightclicking the graphic
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ic552217d03d77f93f5c38107d622d8404c122cd7
2021-04-27 16:15:27 +05:30
Pedro Pinto Silva
4535a65b85 Notebookbar: closebutton: Fix size
it seems close button is bigger than it's parent
- Avoid that
- Remove paddings
- Use background position instead

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I9ff86be375be78fc27dddaf5a8d38d4c41590be9
2021-04-27 11:30:55 +02:00
Pedro Pinto Silva
7e12749e55 Text import (csv imports): add missing icon lc_fromrow
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I0a82908c5ec3262fe1b0637389c90461a4a87c2b
2021-04-27 11:30:41 +02:00
Dennis Francis
991a5a14c7 fix: header draws with old size after resize + mousemove
Fix: clear the cached "entry" with old size after a drag has ended.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I73840e380dc808c5805588947d774984def288d0
2021-04-27 11:57:24 +05:30
Dennis Francis
46781aa313 avoid flicker of header resize handle on resize
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I5c3373fee44b21e40a3b5da7c554fb30b096a342
2021-04-27 11:57:24 +05:30
Dennis Francis
8f5ac693a7 fix: header resize line not updating on scroll
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: If10d884cb7b24289cb1e4c8e8996f526e6fe4cbe
2021-04-27 11:57:24 +05:30
Dennis Francis
1886c8984f gridsection: fix flicker on typing with freeze-panes
When the request is to paint a specific area and pane, do just that and
avoid painting other panes. The calls to onDrawArea() are specfic to a
pane intersecting with a tile from tile-section painting.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I3f74e38fe8a1535e980f8b05ee8d6fdd98cf55f5
2021-04-27 11:56:46 +05:30
Dennis Francis
fc1f0aee1a freezepanes: avoid drawing the same tile multiple times
This can happen when a tile is visible in more than one pane. This was
not a problem before we introduced client side background and grid
rendering but now it is.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I8dd448f9d89358a71bafd4cffe431a251076a206
2021-04-27 11:56:46 +05:30
Dennis Francis
10665f70ec let the section container do the draw ordering
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Ifd1bc9e9a3efbab53ff4616d11c405fcc41449b8
2021-04-27 11:56:46 +05:30
Dennis Francis
2a1f4a4baa fix reference/autofill selection redraw on removal
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I8b6c8dc14093125acbbfc362afb52e0c4c865e2c
2021-04-27 11:56:46 +05:30
Pedro Pinto Silva
85b21d715f Notebookbar: Styles preview: Fix inconsistency, less borders
Had too many different border styles (parent with dashed border,
different colors used in different places, and not making use of
css vars)

- Less decorative css styles
- Decrease distinction between Styles preview and whole notebookbar
  (more at home with the surroundings)
- Use shadows to differentiate states
  - add vendor prefix
	- add border-collapse: separate; for ie

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I77188f414b7d539f8ea6631016b5def8dcf90034
2021-04-27 08:22:46 +02:00
Pedro Pinto Silva
a5757282f5 Fix RGB within CSS vars
CSS Var with RGB value goes inside of of `rgb()` and not the other
way around

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I1401309c00d91160e757f4fdca0b00ea74763911
2021-04-27 08:21:56 +02:00
merttumer
68697eba55 Fix Rotation moves the center away on calc
For calc, gridoffset must be taken into account
when calculating the center point of the shape
otherwise the coordinates will not match with
core

Signed-off-by: merttumer <mert.tumer@collabora.com>
Change-Id: Ie1003d52f233a79e5b1640c2cf7a095a7315a749
2021-04-26 20:26:18 -07:00
merttumer
6b3149b022 Fix glitches of shape handlers on show/hide
Wrong positioning etc.

Signed-off-by: merttumer <mert.tumer@collabora.com>
Change-Id: Ie636b4d056faf0cb5204a1a8cda7a98d7ea2e681
2021-04-26 20:19:20 -07:00
merttumer
e609d27a67 android: Request ODF conversion for text files on Android
Also now txt files can be opened and edited.

Signed-off-by: merttumer <mert.tumer@collabora.com>
Change-Id: Id7b57c219a2e8eaa46153cd3ae4b91dcb9352eab
2021-04-26 20:19:02 -07:00