Commit graph

21981 commits

Author SHA1 Message Date
Gabriel Masei
bd9266f6fa Calc: fix Format->Sparkline menu items in notebookbar
Signed-off-by: Gabriel Masei <gabriel.masei@1and1.ro>
Change-Id: Ic51d3d020568e4c9488cc8be71ea446e66227a25
2023-10-03 04:26:13 -04:00
Balázs Varga (allotropia)
99c14f99e1 WASM: fix wasm build errors
Signed-off-by: Balázs Varga (allotropia) <balazs.varga.extern@allotropia.de>
Change-Id: I104e98ae1ddc64af55e4df0ccb301d5e88e0288d
2023-10-03 10:18:46 +02:00
Skyler Grey
a8e97f6220 Fix tablet-mode tabs due to read-only mode change
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
2023-10-03 09:40:03 +02:00
Skyler Grey
0dcb6e04c7 calc: Show tabs context menu on a tablet's press
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
2023-10-03 09:40:03 +02:00
Miklos Vajna
a0944a0b5e Fix the --enable-fuzzers build
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
2023-10-02 20:15:42 +01:00
Ashod Nakashian
7d0276c394 killpoco: replace LocalDateTime
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>
2023-10-02 20:14:53 +01:00
Ashod Nakashian
c5d47b4b20 wsd: log: verify that all threads are stopped
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>
2023-10-02 20:14:53 +01:00
Ashod Nakashian
483a602f93 wsd: log: BufferedConsoleChannel with thread-local buffer
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>
2023-10-02 20:14:53 +01:00
Ashod Nakashian
150663cc28 wsd: stop the rendering thread pool before exiting
Change-Id: I8a084ee1fd583f6c37ba4ca8c1ebf8abe74288a2
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-10-02 20:14:53 +01:00
Ashod Nakashian
370b649b3e killpoco: own implementation of ColorConsoleChannel
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>
2023-10-02 20:14:53 +01:00
Ashod Nakashian
066af307ba killpoco: own implementation of BufferedConsoleChannel
This is a buffered version of our ConsoleChannel.

Change-Id: Ie1728e136376fdf82ec28010b67d8344fd812768
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-10-02 20:14:53 +01:00
Ashod Nakashian
57a9cf053a wsd: support EnableExperimental in Log
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>
2023-10-02 20:14:53 +01:00
Ashod Nakashian
a00fbae7c5 wsd: log: retry on write failure and flush
Change-Id: I7417a74959a52e2a079bfe4502ed238d1517ea60
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-10-02 20:14:53 +01:00
Ashod Nakashian
56fd825187 killpoco: our implementation of ConsoleChannel
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>
2023-10-02 20:14:53 +01:00
Ashod Nakashian
c936f0e713 wsd: set up signal handlers early
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>
2023-10-02 20:14:53 +01:00
Caolán McNamara
131d503b93 reduce cost of TileCombined::parse
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
2023-10-02 20:05:07 +01:00
Szymon Kłos
c713e0b728 mobile: allow scroll outside data area
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
2023-10-02 19:44:09 +02:00
Caolán McNamara
3b3b62c95c remove unused used method
which is a little dubious anyway

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: If12bd7807ca5f2cff0ca05cad4948962b0cf6688
2023-10-02 17:33:14 +01:00
Timur
eee4203bac Translated using Weblate (Bosnian)
Currently translated at 13.8% (72 of 519 strings)

Co-authored-by: Timur <timur@libreoffice.org>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/bs/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I9d4bed1e7e144bca1f5b1a7c6439240c7b3725bb
2023-10-02 16:56:49 +02:00
Gökay Şatır
6bf3c11c0c Impress shortcuts:
* 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
2023-10-02 17:56:27 +03:00
Szymon Kłos
18c02410e6 mobile: fix snackbar button position
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
2023-10-02 14:55:23 +02:00
Szymon Kłos
1f11d328a1 mobile: fix snackbar text
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
2023-10-02 14:55:23 +02:00
Szymon Kłos
39399a93c5 Fix typeerror on key event in interaction handler dialog
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
2023-10-02 13:23:25 +02:00
Gökay Şatır
67bde47cee Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
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
2023-10-02 11:45:45 +03:00
Rash419
9d6b1d148b don't request new tiles unnecessarily on canonicalidchange
- 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
2023-10-02 13:29:25 +05:30
Patrick Luby
4b71e988b4 Fix compiler warnings when building on macOS Sonoma
Signed-off-by: Patrick Luby <plubius@neooffice.org>
Change-Id: I7e88e0ba272fc00892059c96a2cd0237657e23b9
2023-10-02 08:50:52 +01:00
Caolán McNamara
b25d7617d6 cid#318824 avoid Calling risky function warning
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I871035b7879157467b97e5610a38d0b53f934766
2023-10-02 08:30:42 +02:00
Caolán McNamara
ed59e9e3b0 cid#318948 Unchecked return value from library
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I543f7150c23fe6a6cffc3333754e413ee4c190a4
2023-10-02 08:30:42 +02:00
Caolán McNamara
dd2f0e26f6 cid#318881 Unchecked return value from library
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I6c02e392a96717c4ebc6f50e56bcec553aa328bb
2023-10-02 08:30:42 +02:00
Caolán McNamara
14dce568f0 cid#318836 Resource leak
in error branches dlclose unusable dso, leave it open on success

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I3a2eafceb573cc59ada922d98ae6a9b421d6accc
2023-10-02 08:30:42 +02:00
Andras Timar
16306b4966 Translated using Weblate (Portuguese (Brazil))
Currently translated at 91.5% (475 of 519 strings)

Co-authored-by: Andras Timar <andras.timar@collabora.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/pt_BR/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I7b5d91997166b81d7a5bc608df80f8ee5b1a7474
2023-10-01 13:42:25 +02:00
Aron Budea
c068bce4cc Translated using Weblate (German)
Currently translated at 99.4% (516 of 519 strings)

Co-authored-by: Aron Budea <aron.budea@collabora.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/de/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I363c27e2dcea196f43fab2dfa5dae611359716dc
2023-10-01 13:42:25 +02:00
ButterflyOfFire
05eecc19c0 Translated using Weblate (Arabic)
Currently translated at 58.1% (64 of 110 strings)

Co-authored-by: ButterflyOfFire <boffire@users.noreply.hosted.weblate.org>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/android-app/ar/
Translation: Collabora Online/Android app
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ia53b05b21e1841b31724e1063d41fcf0c5f26c6b
2023-10-01 13:42:25 +02:00
Skyler
9ab75b549e fix broken forum link in README
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
2023-09-29 18:12:05 +02:00
Gökay Şatır
dc75c1e8bf Add note for the CTRL+SHIFT+L combination.
Use sendUnoCommand insted of sendmessage.

Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Id123864d897a2838066c97bb649c1a355b44dde1
2023-09-29 17:14:09 +03:00
Gökay Şatır
6d65c4db70 German shortcuts:
Assign CTRL+F3 to change upper/lower case letters.

Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Ib612ba69ec19abce0164d6273f8ee83124c0c455
2023-09-29 17:14:09 +03:00
Gökay Şatır
48eb5f5811 Assign GoToPage function to F5 in Writer for German.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Ia82d191d9445bfd8cf08e8011f9a47a17876235a
2023-09-29 17:14:09 +03:00
Gökay Şatır
131586f757 Assign save-as shortcut to F12 for German.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I94dd9ebe21be34d94db6b950174098ab1a56d799
2023-09-29 17:14:09 +03:00
Gökay Şatır
f4577f91b6 German key bindings (Writer):
* Seperate ctrl+k and ctrl+shift+k.
   * Add ctrl+space for search.

Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Iee5f60ded801505aef11962e5950607dca29b431
2023-09-29 17:14:09 +03:00
Gökay Şatır
1520d8ba67 Add navigator shortcut to keyboard handler.
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
2023-09-29 17:14:09 +03:00
Pedro Pinto Silva
b7a4b13970 Fix main-nav elements being treated as generic primary, secondary btn
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
2023-09-29 10:26:23 +02:00
Pedro Pinto Silva
0a7e0fe65d userListHeader: remove legacy padding and margin
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
2023-09-29 10:26:23 +02:00
Pedro Pinto Silva
d0b4229aff Tabbed view: Fix main-nav for small screens
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
2023-09-29 10:26:23 +02:00
Pedro Pinto Silva
86623afddd Fix tabbed view top bar not being scrollable sometimes
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
2023-09-29 10:26:23 +02:00
aarsh21
5520965b15 calc: hide spreadsheet context menu in readonly mode
Signed-off-by: aarsh21 <aarshpersonal21@gmail.com>
Change-Id: I541d076a457daa0e01b660e5cd91e468a22aa09d
2023-09-28 10:57:37 +02:00
Andras Timar
2e86ea467e docker: use env vars to configure the container
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib6267c05e687a64d5a2e4df2a1d42c33e001f999
2023-09-28 10:54:14 +02:00
Andras Timar
cc628feda7 docker: do not generate WOPI proof key, it's better to mount it externally
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I4141546c4ab281dfe749b16b119eb9de46fd9e67
2023-09-28 10:54:14 +02:00
Andras Timar
6789c663d2 docker: use internal inotify implementation instead of inotifywait command
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I74e16827bd7033fe3a2282da562b35cc9bfc3eb4
2023-09-28 10:54:14 +02:00
Andras Timar
28737d8272 docker: we do not have to set SAL_LOG here, because it's set in coolwsd.xml
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I80bdc3a2b8fa6f571624395ed8c1917eb241b0cd
2023-09-28 10:54:14 +02:00
Pedro Pinto Silva
9a116dd6d0 Calc: clone formatting cursor has misaligned hotspot
Before:
"When I use the "clone formatting" tool, I have to point the handle of
the brush icon to the cell I want to clone rather than the
brush. Logically I would expect to point the brush part to the cell I
want to clone, but because the handle seems to be the point at which
cloning occurs, I end up cloning the cell above and not the actual
cell I want to clone."

Fix vertical coordinate so the bottom of the hotspot is in the brush
and change the outdate comment WRT the png in question.

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I69e0935542c068016366a26d8100866c23ca17dc
2023-09-27 19:44:54 +05:30