So we don't need to close the mobile wizard before copying.
The main issue was with contains() method, which first
selects the HTML items and waits until these items gets
the content 'Copy'. What we actually need is to wait until
an item appears with the content 'Copy'. Not the existing
items's content is updated with the 'Copy' text, but new
items are created.
Change-Id: I235d2756ce41a099267fa335c215d3eca6f468c2
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91913
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
This was added in commit 70af76e28c
(Replaced pipe with websocket based on Unix socket in communication with
ForKit, 2020-04-02), but it seems to me that the shared_from_this()
member function (which is now available, due to ineritance) is not
actually called anywhere, so this is not necessary.
Additionally, Debian 8 / gcc-4.9 has problems compiling this:
In file included from /usr/include/c++/4.9/bits/shared_ptr.h:52:0,
from /usr/include/c++/4.9/memory:82,
from wsd/AdminModel.hpp:13,
from wsd/AdminModel.cpp:12:
/usr/include/c++/4.9/bits/shared_ptr_base.h: In instantiation of ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...) [with _Alloc = std::allocator<ForKitProcWSHandler>; _Args = {std::shared_ptr<StreamSocket>&, const Poco::Net::HTTPRequest&}; _Tp = ForKitProcWSHandler; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2u]’:
/usr/include/c++/4.9/bits/shared_ptr.h:316:64: required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...) [with _Alloc = std::allocator<ForKitProcWSHandler>; _Args = {std::shared_ptr<StreamSocket>&, const Poco::Net::HTTPRequest&}; _Tp = ForKitProcWSHandler]’
/usr/include/c++/4.9/bits/shared_ptr.h:588:39: required from ‘std::shared_ptr<_Tp1> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = ForKitProcWSHandler; _Alloc = std::allocator<ForKitProcWSHandler>; _Args = {std::shared_ptr<StreamSocket>&, const Poco::Net::HTTPRequest&}]’
/usr/include/c++/4.9/bits/shared_ptr.h:604:42: required from ‘std::shared_ptr<_Tp1> std::make_shared(_Args&& ...) [with _Tp = ForKitProcWSHandler; _Args = {std::shared_ptr<StreamSocket>&, const Poco::Net::HTTPRequest&}]’
./wsd/LOOLWSD.hpp:201:97: required from here
/usr/include/c++/4.9/bits/shared_ptr_base.h:1096:64: error: call of overloaded ‘__enable_shared_from_this_helper(std::__shared_count<>&, ForKitProcWSHandler*&, ForKitProcWSHandler*&)’ is ambiguous
So just remove it till that inheritance is needed.
Change-Id: I74d38b90bcf06d4490feed31783c098ed831f1ee
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91879
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Gabriel Masei <gabriel.masei@1and1.ro>
Now, finally, I think it works as it should, knock on wood. After an
auto-save (or explicit save by tapping the button), the edited
document does show up with its auto-saved contents if you open it from
iCloud Drive or Nextcloud while it is still open in the iOS app.
What I was missing was that the document hadn't actually been saved by
the core (to the temporary copy) until we get the
LOK_CALLBACK_UNO_COMMAND_RESULT for the .uno:Save. We must call the
-[UIDocumentsaveToURL:forSaveOperation:completionHandler:] only upon
receiving that callback.
Change-Id: I10486f3bc587c871ee2644a0c097493f33baf420
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91880
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Import cypress-wait-until directly in the test file. This module
is not intended to use everywhere, so it's not a big issue
if we need to import it before use.
Change-Id: I33ff8ae1eae2ec124b286cd7760d5571e5c67531
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91874
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Also add dummy, run-every-build test to validate wopi like proofs.
Change-Id: Ic2dc647a8d61693ae87b6523aaa30632979fd5d6
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91854
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
unit-admin is currently disabled, so... how to reproduce:
Edit loleaflet/admin/src/AdminSocketOverview.js to try to kill e.g. pid
0.
Expected result:
[ admin ] WRN Invalid PID to kill (not a document pid)| wsd/Admin.cpp:168
Change-Id: I06dda68b38096689c1b9327cefba2cbfc96805f8
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91868
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
It is enough to call the -[UIDocument
saveToURL:forSaveOperation:completionHandler:] only in
DocumentBroker::sendUnoSave(). And on the other hand, in
-[DocumentViewController bye] we can't want for the
LOOLWSD::lokit_main_mutex as the main queue is needed for parts of
what the saveToURL does.
Also, use a separate copy of the document as the file that is actually
edited by LO core. This matches what the Android app does. I think it
is useful to do this in order to avoid some hangs that I noticed. They
probably were caused by both LO core and the system frameworks
occasionally accessing the same document file at the same time.
Change-Id: Idb65be23a7cb6ad1288fbbd23c7471e0fb8d52f4
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91851
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
(So that it is easier to copy them freshly in the configure script.)
Change-Id: Ib8210850abcb259cb6be7ff0d708de0cf05c135d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91838
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I50e0c0c96d8d13082c977ca2538d2f4c4cc89a24
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91826
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Reviewed-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
In linkOrCopy, the nftw() function is used without the FTW_PHYS flag to
populate child roots from systemplate. From man nftw:
FTW_PHYS
If set, do not follow symbolic links. (This is what you want.)
If not set, symbolic links are followed, but no file is reported twice.
Because the order in which directory entries are visited is not defined,
having multiple symlinks to a file results in only one of the paths
being created in the chroot.
This is not really a problem because loolwsd-systemplate-setup creates
systemplate without symlinks. Fixing it might prevent unpleasant
surprises in the future though, and might possibly allow to make
systemplate and chroots smaller (also the manpage says that you want
it:)).
The commit adds FTW_PHYS flag to the call as well as symlink handling.
Change-Id: I01354f529b5d340185988ed026f266caf17a6881
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87749
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
- Add class
- make sure there is no float position affecting those
(previously that ^css rule was applied to all elements that have in their id the prefix checkbutton via "div[id^=checkbutton]" but not all elements were being set with that convention in mind)
Change-Id: I285955d956a60002065421c4e8384df6359c4d68
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91806
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Reviewed-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
cause of the problem: if the last position of the cursor
before selecting a complex object is out of view
then the page will scroll to that point.
This happens because scrolling takes place between
deselecting object and cursor position update
test failing problem with aba812f resolved
Change-Id: I7c1aea4a4a8b83cec9bd166adaa0e099ad16f070
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91781
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
It is not enough to just have the core code rewrite the document file.
We need to do the same dance as in -[DocumentViewController bye].
I wonder if it would be cleaner to copy the document file to some
temporary location when opening it, and use only that copy in Online
and core, and then after core has saved it (either for an auto-save,
an explicit save, or when closing the document) do the -[UIDocument
saveToURL:forSaveOperation:completionHandler] thing?
Change-Id: I78fec08a90424780dc6e794347a0acf2c64e1dab
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91741
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
and fixing changes started with b906c6985a
Change-Id: Ic9927a725240658d03ed764b1136088edc8d99f3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91091
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Reviewed-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
1) Don't actually kill anything with the kill command, otherwise kill(0,
SIGKILL) will kill the fuzzer itself.
2) Don't require a valid signature when authenticating with JWT, since
the private key is generated on each process startup.
3) Log when the JWT would be invalid due to an expired timestamp.
Change-Id: I0da285617e27910329c0e7ed80a6d02e86344ccf
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91737
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
cause of the problem: if the last position of the cursor
before selecting a complex object is out of view
then the page will scroll to that point.
This happens because scrolling takes place between
deselecting object and cursor position update
Change-Id: I4046cf6728f7da32a4f6d89768e201982023afa9
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91734
Tested-by: Andras Timar <andras.timar@collabora.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>