Instead of fighting the SolarMutex to get the messages
processed by the main loop. Simple and no additional
threading, mutexes etc.
messages from the external uno client are just
written to URPtoLoFD and the core reads from that
messages to the external uno client are written
to URPfromLoFD by core, that fd is in poll, and
activity there triggers a read by the DocBroker
to send it to the external uno client.
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ib1f0a0d5fb5ab22eee476d5d740b290c51de59dc
- Allow COOLWSD client sessions to forward messages with the prefix
'urp' to the child, and return messages with 'urp:' to the client,
communicating with binary
- Make COOLWSD child sessions use the FunctionBasedURPConnection from
https://gerrit.libreoffice.org/c/core/+/155100
(core change ID I2bda3d0b988bef7883f9b6829eeb5b7ae8075f27) to start a
new URP session
- Make COOLWSD child sessions submit messages to this URP session,
stripping and adding the 'urp' and 'urp:' prefixes so the Java client
from https://gerrit.libreoffice.org/c/core/+/154680
(core change ID I91ee52922a24688a6b94512cb7e7bc760bf25ec9) can
use the connection (and to avoid interference with any other websocket
messages)
- Add a COOLWSD option for enabling/disabling URP given the security
implications around allowing anyone to write URP (e.g. URP lets you
run shell commands so a mallicious actor can take over the child
session)
Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: Idadfe288a78cfd72b01253dfdade150d506e3f05
After 5520965b15, tablets no longer had
the context menu registered as they always start in read only mode. This
commit moves the check for tablets so it is when the long-press is being
triggered.
Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: I60da2482b711c90676ae49c8b3134d02a6cd1b02
Previously, tablets were treated as desktop devices for the purposes of
the calc sheet context menu. Unfortunately, this requires a right-click
to open the menu: a long press won't do.
To reproduce before this commit:
- Open calc on a tablet
- Open a spreadsheet
- Long press on one of the tabs at the bottom
- Notice how there's no menu, so no way to rename/move sheets/delete
sheets etc.
On a proper mobile device (i.e. a phone) a mobile wizard opens allowing
you to perform these operations.
This commit makes calc trigger the context menu if you're on a tablet
and long press on one of the sheet buttons. Notice how it wouldn't be
right to simply apply the mobile behavior to tablets as everywhere else
they use regular dialogs and context menus rather than mobile wizards.
Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: Ibf25b0d76d8487e582ed6a6cf1f82467869453f6
Failed with:
fuzzer/HttpEcho.cpp:111:17: error: 'removeSockets' is a private member of 'SocketPoll'
And:
kit/Delta.hpp:208:(.text._ZN14DeltaGenerator14DeltaBitmapRow7initRowEPKjj[_ZN14DeltaGenerator14DeltaBitmapRow7initRowEPKjj]+0x127): undefined reference to `simd_initPixRowSimd'
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I6d980698b43ca3545d9eae5f40eabaf4e442ca17
This replaces Poco's LocalDateTime, which
took a lock, called tzset each time, and
did unnecessary Julian-to-Gregorian conversion.
The result is a standards-compliant implementation
that is about an order of magnitude faster (0.3 us
vs 3 us on average).
Change-Id: Iced73056a9f9e6497106224c351110113e21d8d6
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This verifies that in debug-builds the log
thread-local buffers are destroyed, and
therefore the threads are gracefully stopped.
This is necessary to make sure no log entries
are lost by the time we exit the process.
Change-Id: I0db20835109e92d8758a5c4eec6845cd240da025
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This gives each logging thread its own buffer.
We then guarantee that all threads exit clearly
and flush their buffers.
For now, we don't flush buffers when fatally signaled,
primarily because of technical complexities.
Specifically, we don't know if we have a Poco logger
or our Buffered Logger, and there are a host of
threading and signal-safety concerns. To be revisited.
Change-Id: I39674a25feeee3aabd87c8b707ea1adf3c039817
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This replaces Poco's ColorConsoleChannel with our
own, which is simpler and more efficient. It also
doesn't break log entries arbitrarily (only when
the entry is exceedingly long).
Change-Id: I46ba58d35bc913ca83fe97aaaa958c03b81ae44e
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This is a buffered version of our ConsoleChannel.
Change-Id: Ie1728e136376fdf82ec28010b67d8344fd812768
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Now that we depend on EnableExperimental in Log.cpp,
we must define it in the standalone binaries that
otherwise don't define it.
Change-Id: Ic56032eaf6df7d0d5d707a60eeddf2d75c9041ac
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This replaces Poco's implementation of ConsoleChannel
which has a horrible issue with writing the new line
in a separate syscall. This often results in multiple
log entries on the same line and other horrors.
This implementation does no buffering.
Change-Id: I8d18de1313d8f160270ec04552ba7e7b69d2363e
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
There are very rare cases (with unit-tests)
where due to early race-conditions a signal
is raised. This helps us catch those early
cases, before the Poco config and init are
executed.
Such a case exists with tzset() and setenv().
While getenv() is thread-safe, setenv() is
not. When tzset() calls getenv(), it can
race with setenv() from a different thread.
Since we only call setenv() during
initialization, this risk is only at startup.
Change-Id: I5e3e593a5d93dd9335d8dfde932f764a45c975c1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
perf reported 1% of time in collaborative multi user test
on 2023-09-14 was spent in TileCombined::parse.
generic-ize and reuse the TileDesc::parse approach for
TileCombined::parse to avoid need for std::unordered_map
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Iadfc2001e298d8f4d46200c8488f0eb4cd8734c2
mobile screen is very small and there was not
enought space to scroll to the place where we "extend"
scrollable area, this caused that in spreadsheets we
were not able to scroll outside last used cells
- this patch make us able to scroll few lengths of screen
outside data for non-desktop devices to fix that issue
- add threshold for automatic pan after bounds has been changed
to avoid jumping of the screen back
- use twips everywhere
regression commit 48ec2f5925
Limit scrollbar range to used area in the spreadsheet
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Idf5890764462947d895df7f65b30a1d82dd64067
* Add CTRL + HOME and CTRL + END for selecting the first or last slide when slide sorter is focused.
German shortcut updates:
* F12 for save-as.
* SHIFT + F9 for showing / hiding the grid.
* SHIFT + F3 for changing the character cases.
* SHIFT + F5 for starting the slide show with the current slide.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: If9eb59377af29bebfe89fa42ea9d5afdd1bf2335
This fixes regression from:
commit 07c3538589
mobile-wizard: create separate window container
The snackbar with action button like "leave feedback | ok"
or "we can reconnect | reload" had buttons below text
what looked bad and it was not possible to click
We introduced separate windows inside main
mobile-wizard-content container which have class
.mobile-wizard-content - let's use the same rules
as before for popups
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I506aaf34741fb1ff879c0c5c44a5958d6be9912c
This fixes regression introduced in:
commit b6c26bee91
Mobile sidebar header layout #6861
- remove additional top border
- make line height regular so text will fit into snackbar
without scrollbar
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I72a1e7121d58a7583bd4efce9728c25231c7d8de
This fixes error:
Map.Keyboard.js:364 Uncaught TypeError: Cannot read properties of undefined (reading '_docType')
at NewClass._globalKeyEvent (Map.Keyboard.js:364:3
When we open document which requires some interaction from user before
load and we press any key - that error appears. It can be seen with
macro warning or broken file warning.
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ib7b3681d047dd61ffde0364ad40a4d542a5fd548
Change-Id: I4dd197666db5f85e6ba750857eba4ef6eb51d646
German shortcut changes for Calc:
* F12 for save as.
* SHIFT + F3 for function dialog.
* SHIFT + F2 for new comment.
* F9 for re-calculate.
* F5 for focusing on address input.
* ALT + 0 for format cells dialog.
* CTRL + SHIFT + L for auto filter.
* CTRL + F1 for expanding / collapsing notebookbar.
Change-Id: If9bcf4f696f4575061443423645726860d14eafe
- it applies for 2 cases:
1. when document is loaded for the first time document already has
tiles of respective theme
2. when Kit loads the document it sends canonicalidchange unconditionally
(5520965b15/kit/Kit.cpp (L1708))
we don't need to request new tiles for that also
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I42cdc5a03e70c3d3d653f3124d3d5ed9382e22c0
in error branches dlclose unusable dso, leave it open on success
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I3a2eafceb573cc59ada922d98ae6a9b421d6accc
The forum link in the README is missing https://. This commit fixes that
Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: Ica0a29ecba69e68b201c07b76ef6fd57822fc3ac
We are adjusting the sidebar when we send sidebar commands. So i couldn't add the .uno:Navigator command to core side.
It tries to open the navigator but our side should also be ready.
In the future, we can make adjustments to allow to use core side shortcuts directly.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I273b7c2cacce6ed0c8f20f672ba9ba7daa29cfd5
With the recent (and very welcoming) changes to steer away for generic
elements such as div and instead use more appropriate/semantic
elements such as button we ended up applying new rules to main-nav
buttons. These rules were only intended to be apply to classic
buttons (rectangle + text inside). Result:
- userlistheader even if invisible was getting a background
on mouseover
- all <button> elements were getting extra padding and margin
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ic774fd342df5483cd7210b85c4847688914b28f2
userListHeader, element present in compact and tabbed view to display
users present in the document (avatars), seems to suffer from a odd
alignment and duplicated usage of white space.
Best to remove any hard coded pixel that seem to come from legacy css
and rely on flex if necessary. Also the surrounding elements (doc name
and sidebar icon) already have save space around so they will never touch
on top of that this was having different result than "expected" when
using a different RTL system (since we were not using logical css properties)
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Iab0869080231ac734c087afeee97d9cd0243030d
Make tab's size dynamic
- Font-size
Instead of using always a font size that looks nice in a wide screen
but that will look cramped and without space in a narrow window:
- change it's size depending on viewport within a safe range
- new css vars added and respective comment in the code
- Also we use clamp css function but we also add a fallback for old
browser using the generic calc css function
- Padding: allow to get lower levels when the viewport is reduced
Hide document-header when the window is narrower than 800px
- this frees up space and also benefits tablet us case where user uses
2 apps side by side
Document-title bar
- Hide document name if the window is too small. This makes it
possible to fit all buttons without horizontally scrolling the main-nav
- Note user can always access the rename feature by going to File > Rename button
- Remove any hard coded pixel positioning and instead rely solely on
flex layout
Main-nav
- should always occupy (width wise) 100% of the viewport. We want
always the far left icons be always at the end of the viewport
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I58843f40e21d26f955422d6159b5777144b684fd
Before this, when using a narrow window, the top bar wouldn't be
scrollable until we would press the avatar list. Also when switching the
modes it would becomes unscrollable yet again.
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I01b2afcb125a2addf9847e2581f9498105b54b00