Original approach before comment autosave:
When we save a new comment, original DOM element which user was editing
is removed from the DOM and new comment DOM element is created from the data and message sent by core.
Previous comment autosave approach:
When we save a new comment, original DOM element which user was editing
is not removed but kept in editing mode. We register the comment message sent by the core
but react and create new comment DOM element only after user clicks on save or cancel.
This lazy initialization caused many regression due to juggling of the new and old comment DOM element.
All these problems were in JS side only, reloading doc would bring comment in correct state.
This approach gave smoother transition between different comment states without any flickers.
New comment autosave approach:
Simple as the original approach, when comment loses focus we save it as normal comment.
When new DOM element created via core comment message, we immidietly set it to edit mode.
This approach may have a little flicker when we replace old comment DOM element with new comment DOM element.
Overall this approach requires less condition checking which makes it easy to maintain and hopefully reduces any regression from previous method.
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I4098085825ede65cdbf2e2243fc4d2bb1f63c716
Helper that is easier to use as has "options" parameter
not a long list of possibly optional ones...
It is first step to refactor old UIManager.showInfoModal
helper, which is less flexible.
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I34eae39cab583985ad3d940aa025aee0a374e25e
If administrator doesn't allow some URLs in the coolwsd.xml
under net.lok_allow then when pasting webpage with images
- it might result in missing pictures. We should show the
user what happened.
User can click "don't show this again" to avoid annoying
dialog on every paste.
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Iec9035860b1c6a332420defd539000e8854447c9
This is a workaround for the bug, when a txt or a csv file was opened,
and there were both the classic menu and the menu of the notebookbar
at the same time at the top of the window. This bug occurred because
regardless of the user's UI mode setting, the read-only mode has the
classic menu. The fix also have a side effect, that is better than
the original symptom. Now when a txt file is opened, and user starts
editing it, the Zotero buttons won't be on the References tab. I
think it's a good trade-off, but FIXME.
Eventually, when we won't have the classic UI mode any more, this
problem would be solved better, for all corner cased (txt. csv, pdf,
read-only shares etc.)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ic3f95c02a0b75136a0b8069fa8297ed129b63865
otherwise the carefully retained startup log message don't appear
in a non-debugging online version
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ie4caf3462539e07f14f6c84bccab47fcbe9d5203
switching tabs should not send events to the core
notebookbar is online-only widget
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I39c487d3c91f1fe858438e03fd9369f3dc571f52
with in in place the sizes are
-Os for core and online
du -h online.wasm 155M
-Oz for core and online
du -h online.wasm 145M
and a warning of:
em++: warning: running limited binaryen optimizations because DWARF info requested (or indirectly required) [-Wlimited-postlink-optimizations]
without gseparate-dwarf the sizes are:
-Os for core and online without -gseparate-dwarf
du -h online.wasm 133M
-Oz for core and online without -gseparate-dwarf
du -h online.wasm 119M
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I91586abe0e52f6de20d0f04636bb5a2be93d92be
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
- Now we can check/uncheck by clicking on label
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I03c5e866d89f61a93b07dbbd1f5bd7752f5c723f
so the launching site can query if wasm is enabled to see if it needs to
insert the required headers, so we can then in turn make it optional on
those being set to also require matching headers.
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Icd73081809abb8098c21bc61a8357869db45ff6c
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: Ifa40864a332718f9c58335e6d950149673d03f10
A small typo in Class name which is cause for `FontColor` icon not working in dark mode. it is not fully related here but pushing that as a commit in this PR :)
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I516220240d204302074f72e20d98df7591cb00cb
- there are 3 cases we need to consider
- 1) data. Icon if present, then set Icon based on its value.
- Here 2 child cases 1) data.Icon can be direct an image URl in that case we will not perform and operation directly use `buttonImage.src = data.icon `
- if values is just an image identifier like lc_save.svg then will call setImage method as we do in many other case
- 2) data.Image if present the we directly go with data.Image URl
- `buttonImage.src = data.image;`
For ex:
In ODP file => sidebar => Line (section) => width (property name)
Here we are setting the icon based on `data.command` instead of `data.image` that makes icon different
- 3) If both above case is not valid then byDefault we will go with data.Command
- `L.LOUtil.setImage(buttonImage, builder._createIconURL(data.command), builder.map);`
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: Ia112202fdebec2f3529f3bbd19d46084d4e0dc1a
debugging some intermittent failures in UnitBadDocLoad I see that there
are some duplicate jsdialog messages appearing which is easily
reproducible by just opening test/data/corrupted.odt in online.
probably has been like this since:
commit 7f70197723
Date: Mon Dec 28 11:37:27 2020 -0400
kit: enable input process when early dialog show
and possibly not the problem I was originally trying to chase
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I7aa342e86ad9ae73082cb71f1b2c9b2bf0f212b9
This allow being able to disable pick up of a local image. Handle the UI as well.
To be used with EnableInsertRemoteImage.
Return DisableInsertLocalImage: true as part of the WOPI CheckFileInfo reply
Default value is false (enabled)
Added an 'insertremotegraphic' button to the classic toolbar for use when
it's the only option.
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I1925f804433a7bda6025cb65b0943d78927bea15
Also add state dumping of tile on the fly statistics per session.
Change-Id: I8413cdfd489be3c238738f95d9d5c4aa177ff262
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
To reproduce:
./clientsession_fuzzer -max_len=16384 fuzzer/data/crash-32e5136d2291e6c5fa99aa5942acded42b66a528
Failed with:
#7 0x7f1aeb9c9cf1 in __assert_fail (/lib64/libc.so.6+0x42cf1) (BuildId: f732026552f6adff988b338e92d466bc81a01c37)
#8 0x55a9f13968a5 in DocumentBroker::forwardToChild(std::shared_ptr<ClientSession> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) /home/vmiklos/git/collaboraonline/online-fuzz/wsd/DocumentBroker.cpp:3613:5
#9 0x55a9f1676a9a in ClientSession::forwardToChild(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::shared_ptr<DocumentBroker> const&) /home/vmiklos/git/collaboraonline/online-fuzz/wsd/ClientSession.cpp:1414:23
#10 0x55a9f166f96a in ClientSession::_handleInput(char const*, int) /home/vmiklos/git/collaboraonline/online-fuzz/wsd/ClientSession.cpp:1100:20
The reproducer was originally added in commit
aefc65465b (wsd: fix crash when downloadas
has not enough parameters, 2020-02-21), but now it also triggered this
assertion failure problem as well.
The brave assert was added in commit
b2aff3e817 (wsd: pass ClientSession to
forwardToChild, 2022-11-26).
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I4a0adda49aa2d24925d448fa5753509917d2585a
New postmessage `Show_Command` and `Hide_Command`.
Pass a command name (uno or otherwise) in `Values.id`.
Will hide the corresponding toolbar, menu and notebookbar items.
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: Idaa86f7a936a282c636fa0532ab165c6977db873
Currently translated at 99.6% (537 of 539 strings)
Translated using Weblate (Icelandic)
Currently translated at 71.0% (332 of 467 strings)
Translated using Weblate (Icelandic)
Currently translated at 99.2% (535 of 539 strings)
Co-authored-by: Sveinn í Felli <sv1@fellsnet.is>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/help/is/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/is/
Translation: Collabora Online/Help
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib8efb2ada68af1b958b2b72f023dcc2ff5900bb1
Invalidations were not cropped to the split pane, such that large
invalidations that crossed from the mane pane over another top/left
split pane, would cause partial re-render, flicker and other problems.
Regression from: 0453140f61
Potential fix is to have a complex multi-rectangle clip region, or
to only do this for simple cases, which are common: of invalidation
within a single split pane, doing a complete re-render elsewhere.
Change-Id: I255806286f6c80a233d4c6ade2bcb4e12f2bf753
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
This can happen like this:
#8 0x7f14fdf4ec86 in std::terminate() (/usr/lib64/libstdc++.so.6+0xb7c86) (BuildId: c74eca671e2dd0f063706372d103f8acef88f1e3)
#9 0x7f14fdf4eee7 in __cxa_throw (/usr/lib64/libstdc++.so.6+0xb7ee7) (BuildId: c74eca671e2dd0f063706372d103f8acef88f1e3)
#10 0x55ddc5b906d2 in Poco::AutoPtr<Poco::Channel>::operator->() /usr/include/Poco/AutoPtr.h:232:4
#11 0x55ddc5b7eb07 in AdminSocketHandler::handleMessage(std::vector<char, std::allocator<char>> const&) /home/vmiklos/git/collaboraonline/online-fuzz/wsd/Admin.cpp:236:13
Note how LOG_ANY() assumes that Log::logger().getChannel() is not
nullptr (so the caller has to check for it), while the more typical
variants with a log level like LOG_TRC() already do a similar check via
LOG_CONDITIONAL().
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I5e1379f33e6640fd07de673ef0d07b1d4d611c89
- uses new lok_allow setting to provide such list
- for backward compatibility uses also all post_allow and storage.wopi
entries
- Used for example in: PostMessage Action_InsertGraphics,
=WEBSERVICE() function, external reference in the cell
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ib930e0119d4ea124b9cd565f6b3683310b1b3ced
- now setImage method will handle the refresh of icons when theme change to Light/Dark
- added listner to setImage method
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I0529588487c2436d53585e63a2467fe0a917adee