Commit graph

19550 commits

Author SHA1 Message Date
Balázs Varga (allotropia)
5e2d9bb36a WASM init fakesocket on a new thread and adding some necessary headers for later
Also feature/wasm rebased with online master.

Signed-off-by: Balázs Varga (allotropia) <balazs.varga.extern@allotropia.de>
Change-Id: I1ecba4091c22878aacc3d6033ad350b0aa2276dc
2023-01-11 09:27:36 +02:00
Tor Lillqvist
28ca327640 Need to pass strings to C++ with allocateUTF8()
Also need to free them afterwards. Later.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Ie09f268132d01fb51a7126fc3c97272f1e11246c
2023-01-11 09:27:36 +02:00
Tor Lillqvist
8cc1c1baa5 Preparations for a "WASM app"
The WASM C++ bits (in wasm/wasmapp.cpp) will have to export functions
hande_cool_message(), handle_error_message(), and
handle_debug_message() to receive the calls from JS.

Change-Id: Ic7f2cffdeb4408a9f726ad70a8ceb8db372787dd
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2023-01-11 09:27:36 +02:00
Pedro Pinto Silva
d43243bc47 Fix Zotero labels
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I25e0cbb871c7631d14cc14aca497ef944c37b58f
2023-01-10 22:35:47 +01:00
Michael Stahl
a4b31d4966 WASM add a note about memory required for linking
Signed-off-by: Michael Stahl <michael.stahl@allotropia.de>
Change-Id: Ic7f2cffdeb4408a9f726ad70a8ceb8db372787d9
2023-01-10 22:02:22 +02:00
Tor Lillqvist
9f8c4f6741 No need to export _doc_postUnoCommand from the wasm here
That is needed by core:feature/wasm for the way it implements
conversion to PDF. Not relevant here.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
2023-01-10 22:02:22 +02:00
Michael Stahl
ad6ea1a1db WASM improve README
Remove the dumb hard-coded home dir and add a section how to use the
pre-built dependencies from the container.

Signed-off-by: Michael Stahl <michael.stahl@allotropia.de>
Change-Id: Ibdc8d766be54dcde440682d2c77fb47f042f6056
2023-01-10 22:02:22 +02:00
Michael Stahl
244ca9a123 WASM add dummy main function, executable links successfully
Signed-off-by: Michael Stahl <michael.stahl@allotropia.de>
Change-Id: I698750236de88e76a493c075479a447add73dd7f
2023-01-10 22:02:22 +02:00
Michael Stahl
b1a1522a2b WASM use same CXXFLAGS as core
-pthreads is required, or wasm-ld reports errors about
"was not compiled with 'atomics' or 'bulk-memory' features"

Also, POCO needs to be built with this, add it in README.

Signed-off-by: Michael Stahl <michael.stahl@allotropia.de>
Change-Id: Ie83e3942e5fc689e6df5a5a705d7ee2e1325ce03
2023-01-10 22:02:22 +02:00
Michael Stahl
fdea5cde94 WASM WIP link an executable
Use the newly introduced soffice.html.linkdeps from core to get the
recursive dependencies into the link command.

This currently fails due to some problem with POCO:
wasm-ld: error: --shared-memory is disallowed by AtomicCounter.o because it was not compiled with 'atomics' or 'bulk-memory' features.

Signed-off-by: Michael Stahl <michael.stahl@allotropia.de>
Change-Id: I76b0a2265f67e89f6992d556525f1263ad1b45db
2023-01-10 22:02:22 +02:00
Michael Stahl
160362e21a WASM configure: prevent libtool from adding -rpath to link command
Signed-off-by: Michael Stahl <michael.stahl@allotropia.de>
Change-Id: Ided8a2abd781b19275b6fe16f8f47e262fef0541
2023-01-10 22:02:22 +02:00
Pranam Lashkari
1c73ec45dd zotero: introduce bookmark support for zotero citation
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I2cddea94988c12459e35c83ca9327c2a0a32f0f9
2023-01-10 19:28:14 +01:00
Dennis Francis
a0d86c8a6f share css-url renamer with branding
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I849948c69e9cc656c410513f9f95db2e7fb07e03
2023-01-10 11:40:50 +01:00
Szymon Kłos
f542aff8ea Zotero: show placeholder text when loading
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ib3ce91ddaa80645e844e760f5a5e90d7b78c25eb
2023-01-09 22:00:00 +01:00
Szymon Kłos
a4ebc7fda2 Zotero: use private info for key
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ie2459b8002d33a6e9a5c4bc21e129df602fe588b
2023-01-09 21:55:06 +01:00
Michael Stahl
9b40d40713 WASM fix includes in C++ code
Emscripten is very opinionated about sys/poll.h so use poll.h instead.

Signed-off-by: Michael Stahl <michael.stahl@allotropia.de>
Change-Id: I9691519e27a080f03a19f0cc0dd8f796fe323062
2023-01-09 22:01:47 +02:00
Szymon Kłos
c973cb99d7 Zotero: remember last used style
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I01877c0a22f71d21cb146b350dbd8449452764a9
2023-01-09 14:46:34 +01:00
Pedro Pinto Silva
b308ba68e9 JSDialog: Add padding in between columns and fix th alignment
Before this table columns were getting "glued" (content of one
col would end and immediately would start content of another col).
Plus, we were having table content normally aligned to th start
while headers were being centered aligned

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ie0908c26d1e7bedc37b3c5d768d941b091946524
2023-01-09 14:30:39 +01:00
Tor Lillqvist
b2ea380bca Try to work around a bug in older Automake versions
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I6af557dc0d6824011aeffd981b9a0f51f27fabbf
2023-01-09 15:21:37 +02:00
Michael Stahl
901ad84339 WASM add simple automake file and dummy cpp file
Copy the list of .cpp files from the Android project, assuming this will
be similar in scope.

Signed-off-by: Michael Stahl <michael.stahl@allotropia.de>
Change-Id: I57c7ad2f10d1867307ff4fcea3d0c650726d18d8
2023-01-09 15:21:37 +02:00
Michael Stahl
e53ea70799 WASM document how to build dependencies in wasm/README
Signed-off-by: Michael Stahl <michael.stahl@allotropia.de>
Change-Id: I88977976be9212088f7a758940852719931b4263
2023-01-09 15:21:37 +02:00
Michael Stahl
be552175a2 WASM configure: disable checks that look irrelevant for emscripten
Signed-off-by: Michael Stahl <michael.stahl@allotropia.de>
Change-Id: I9cab5f105f518e1901c46b46c31e411d3708341c
2023-01-09 15:21:37 +02:00
Szymon Kłos
b338c3faec jsdialog: scroll treeview to selected entry
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I7c88df039fc0358b3444be3552f2e200ee3bf71f
2023-01-09 13:33:00 +01:00
Szymon Kłos
8371ce4437 Zotero: show snackbar on citations update
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I225d62fa006d444ac70014058e20a2dc865b5d96
2023-01-09 12:55:05 +01:00
Pedro Pinto Silva
c9a170463d JSSidebar: remove non-effective rules for expanders
These have no effect on the ui-expander-content since they
are set to display: block somewhere else (jsdialogs.css)
plus, (and even testing with flex) this does not seem to improve
or fix anything

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I0260f44413ff46f79b9ea6a15e154ee62fb1e53f
2023-01-09 12:43:53 +01:00
Pedro Pinto Silva
ac2db46325 JSSidebar: Align vertically every widget
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: If18a47848790bdf1898aab712c8900f46cd6cdbe
2023-01-09 12:40:37 +01:00
Pedro Pinto Silva
58a29afffa Revert "toolbox widgets get vertical center aligned"
This commit was initially intended to affect sidebar but it is
affecting every toolbox (dialogs, formula bar) causing regression
in the formula bar buttons

This reverts commit c0302a8d93c183b90079e3c2cbe9c90220e93cdb.

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ie872d26ec7dcfb396c7ccba13dcbf6142655be7a
2023-01-09 12:40:37 +01:00
Pedro Pinto Silva
c6e28eee58 Add float logical values fallback for buttonboxes
Before this commit, browsers such as chrome (without enabling
experimental features) were not supporting those float values

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I2530e7bf46d161ac980559c181a4e03947edbeee
2023-01-09 10:26:27 +01:00
Gökay Şatır
de1e9fa334 Re-show formula bar if only the document is a spreadsheet.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Id82bb40ef7a86f6c2a068896cdfb3084e63aaf60
2023-01-09 12:06:43 +03:00
Pedro Pinto Silva
7f26249041 Add possibility to target item images within treeview widget
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I17de1fee0a4d508fbe1cc6e5b2530ee1a3caf3d3
2023-01-09 09:13:52 +01:00
Gökay Şatır
01b378ea71 Remove extra sidebar command.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I59b5c7a66ae5811331a53288146c5965dcf610e3
2023-01-08 15:40:18 +01:00
Pranam Lashkari
4b932f24aa Util: introduce random string generator function
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Iaf99240f5a4bdda7a39420eab05813187a89e2bd
2023-01-08 13:16:14 +01:00
Pranam Lashkari
3cb8a99e67 zotero: introduce refmark support for zotero citation
now odf documents will by default use refmarks,
MS docs will use field marks by default

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I57ef5de9bef8d1e5f6b5029e478d9a43e38dbc4d
2023-01-08 13:16:14 +01:00
Michael Meeks
616197d7a1 calc cell cursor: get the layout and sizing right.
The cursor should minimally obscure the cell content - so the border
should go outside and over the cell border, and the white contrast
line inside it.

Similarly the autofill handle should not obscure the number in the
cell you're trying to read - so move it out and down to a more
familiar position, shrink the size somewhat, and correct the
white boarders around it too.

Change-Id: Ib107adc2927172d69b8cd9a6523b50327d4f81cb
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-01-08 07:24:36 +01:00
Tor Lillqvist
8233d030e5 Don't pointlessly assign global.socket = app.socket
Note that the code changed is inside an anonymous function that is
called with one argument: window, for the function parameter called
global. Thus the assignment that this change removes sets
window.socket.

The window.socket variable is not used by code later, so this change
can be this minimal.

The window.socket variable has earlier been set to the WebSocket
object used to communicate with the COOL server. Let's keep it for
that purpose. app.socket is the app.definitions.Socket object. Even
though JavaScript is not type-safe, it is very confusing to use the
same variable for completely different object types at different
stages in the code execution. I am working on some new code that will
want to access the WebSocket object also later.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I6273a6d6acee3fa46ab9fedc5742ae44c8bfa567
2023-01-07 00:16:02 +02:00
Tor Lillqvist
410270fd14 Actually use the safer (escaped) string we construct
Also, no reason to append a null byte to it.

Don't know why this worked even when not escaping "dangerous"
characters. Does Webkit have a more relaxed lexical analyser?

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Idfedcbf11a9ee565b954ba972e7e3bc9b804a122
2023-01-06 16:09:52 +02:00
Pranam Lashkari
383b6a7080 zotero: implement citation refresh
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Id91acbed6c651dfed02777d7fa4142edf597a55a
2023-01-06 12:47:34 +01:00
Pranam Lashkari
46d1f930de zotero: renumber citations on citation insertion for numeric style
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I5cc8b7d6cb16a7f849bf42dd893487c95a7a3e8d
2023-01-06 12:47:34 +01:00
Pranam Lashkari
9be49e17c7 Zotero: introduce the citation update mechanism
Commit introduces the following capabilities:
1. Users can now change the style and the existing citations will respond to it and update
2. Citations numbers are handled
3. Citation clusters(multiple citations) can be read and handled now

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I1e7d85ab955db49bf962303f3b6a0471b37e6ae7
2023-01-06 12:47:34 +01:00
Pranam Lashkari
fb5be17057 zotero: fetch the selected citation style details
fetching selected style language details will allow us to make adjustments to citation texts
this is particularly helpful in handling citation numbers and citation clusters

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ia469e0e44fc0550c083ce572f8fe9f512947a1f4
2023-01-06 12:47:34 +01:00
Szymon Kłos
f6a2d93265 Add missing icon for macro dialog
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Id9f5929886703c3881b550dec6987b26203fafcd
2023-01-06 11:15:23 +01:00
Szymon Kłos
85ada3b6f8 Add UserPrivateInfo
it will be used to store user data which shouldn't
be shared between views

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I58b7f22e4364ce9e07bb6cc74e8431363912a872
2023-01-06 10:36:43 +01:00
Ashod Nakashian
12f3f1e6a4 browser: package.json always get resorted anyway
On every build, nodejs (v12.22.9 for me) re-sorts
the packages in package.json. I expect this is
the case for everyone, so best to commit it
sorted.

Change-Id: Ifa69989ae1bee0fda5a9cc19c2215db92959a434
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-01-06 11:19:18 +03:00
Ashod Nakashian
faddcc8103 gitignore: differentiate files from dirs
Change-Id: I2fbf7284a82ecc272ab9b55ce9fb83ea079574f6
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-01-06 11:19:18 +03:00
Pedro Pinto Silva
6ad1b900e0 Remove zotero search label and use placeholder instead
Remove citation search label and instead use placeholder

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I0eef0cd9321babd7239b18b4fd5a422cc4d09831
2023-01-05 19:21:29 +01:00
Szymon Kłos
350ce691b8 cypress: skip failing macro test
now we have text + icon in the cell

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I2634ef8b23dff1ab3226f7a20e5305f9cb69487a
2023-01-05 15:24:18 +01:00
Szymon Kłos
4d2b020513 Add missing icons for macro dialog
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I9ee72a697b30571234af9314acc64513ee8184c9
2023-01-05 15:24:18 +01:00
Pranam Lashkari
16349472eb zotero: avoid asking unnecessary bibliography data
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I6aab932715cdfc9511f0b96b4f6aaf671f0b6efb
2023-01-04 17:29:12 +05:30
Pranam Lashkari
8086aba917 zotero: keep citation JSON in same sequence as the desktop
makes it easy to compare for debugging

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I948b79d1f17224dfe40dd70671abfb35f49d7336
2023-01-04 17:28:55 +05:30
Pranam Lashkari
60a11b58f8 zotero: add missing fields in style property
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I048d351e5590413fe57e1ac009bd96933e73b5df
2023-01-04 17:28:55 +05:30