Commit graph

14319 commits

Author SHA1 Message Date
Pedro Pinto Silva
6bec466c0e loleaflet: AlertDialog: Style link
- wrap it in element
- reduce size (it's not a title)
- add URL icon/tag at the beginning so to avoiding scaring user when opening long links

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I5c4bbec29d05ed49d034c4f11f740b5327c05d26
2021-03-15 13:56:00 +01:00
Pedro Pinto Silva
41d8f2d6a6 MacroSelectorDialog: Categories should expand from the top
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I27d73b56d7f62f7e93fe4d365219276ea710b477
2021-03-15 13:56:00 +01:00
Pedro Pinto Silva
d381de457f Macros dialogs: do not capitalize text
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Iff98f6f0fb2214d4ad764850e89f6f753fde161c
2021-03-15 13:56:00 +01:00
Pedro Pinto Silva
ce9e910eae MacroSelectorDialog: treeview-entry hover: ...
- avoid too long background
- add effect on hover with triangle

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I267427e77ab964ece22670b8a5db22ee190c6691
2021-03-15 13:56:00 +01:00
Pedro Pinto Silva
c1c5e04e1f Jsdialogs: unifying expanders
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ia155566f9c297fc8c6c400e7d94d4a472def53c6
2021-03-15 13:56:00 +01:00
Pedro Pinto Silva
37e49b1dc9 MacroSelectorDialog: initial layout and style...
- avoid changing width of each frame every time the selection changes
- fix spacing and padding
- Categories: selection will never be full width so
  - do not pretend it is a selection and instead
  - make it look like a side navigation to the final content (on the right)
- More fixes
  - Do not open dialog with minuscule height force static size on the content side (right)

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Id799ea9cddf8c3b3c61f5cd9167cb44983f6ba0f
2021-03-15 13:56:00 +01:00
Pedro Pinto Silva
bdba3ee157 loleaflet: refactor jsdialogs.css add macro section
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I57fb8864968a06e3e769bfd62df774673aa53ac2
2021-03-15 13:56:00 +01:00
Pedro Pinto Silva
6598a9c8ae Make table markers clickable on desktop
- Currently the markers are not touchable on ipad (both via web and app) so
- Revert back listener change introduce in ebaca16c4f

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ia2ff20ed4ddf810c50b11c49600709489f07785f
2021-03-15 13:56:00 +01:00
Pedro Pinto Silva
01c0fbd573 Sidebar: panelContainer is being set without height #1322
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I2c6421b34cd6c2345981008dd1bbee494bc13ca2
2021-03-15 13:56:00 +01:00
Szymon Kłos
f7c79a13df notebookbar: clean tabs in wirter
Change-Id: I3a2c31524852f4dbfed715932c0f1237956942dc
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-15 11:24:02 +01:00
Szymon Kłos
4773549dfc notebookbar: clean tabs in calc
Change-Id: Ic4a2ba7cfd84a612b027937f0f47d19a26efbffd
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-15 11:24:02 +01:00
Szymon Kłos
7a5d8b7441 notebookbar: clean tabs in impress
Change-Id: I53e3f82923381257e540b0f23e744d97bb5d9115
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-15 11:24:02 +01:00
Szymon Kłos
f34dac6b70 notebookbar: add missing items in impress
Change-Id: I72bac1a01fef85d99edd2970bfc8d3394a850578
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-15 11:24:02 +01:00
Szymon Kłos
37a8f5fb5d notebookbar: clean format tab in impress
Change-Id: I7e3d93aa39171607f01aa45158c706237a9cd82e
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-15 11:24:02 +01:00
Szymon Kłos
10df7e45a6 notebookbar: add missing items in data tab
Change-Id: Ia527b75bdcc91f637fd72aa3c29250ae2698cda7
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-15 11:24:02 +01:00
Szymon Kłos
a64d650702 notebookbar: clean data tab
Change-Id: I77cdf89f16657c1bbb8039985184562319ecd6c3
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-15 11:24:02 +01:00
Szymon Kłos
463c15c63c notebookbar: add missing format tab in calc
Change-Id: Iecdf243486756f8e831805076714f9653c9bcb92
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-15 11:24:02 +01:00
Szymon Kłos
f40d531bf8 notebookbar: add missing items in format tab
Change-Id: I2c14a530818acfd17916499ce62527587298f5c4
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-15 11:24:02 +01:00
Szymon Kłos
c9a6016153 notebookbar: clean insert tab
Change-Id: I2962b3be55145c19dad678271f07f28c3de3a165
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-15 11:24:02 +01:00
Szymon Kłos
082240a107 notebookbar: clean format tab
Change-Id: I0eeab88ed0fc0518c18522c33e00ff8750c50949
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-15 11:24:02 +01:00
Szymon Kłos
2d99853d7c notebookbar: add .uno:ShowResolvedAnnotations
and fix it's state not in sync after inserting comment

Change-Id: I6cb63e55a1bea569fc043cbe20b5221d6e510fff
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-15 11:24:02 +01:00
Szymon Kłos
62ff9daf41 notebookbar: clean Review tab
Change-Id: I8f8605af3a976636fa74d3933021a3f0dba87d22
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-15 11:24:02 +01:00
Szymon Kłos
041163e917 mobilewizard: show frame contant directly if 1 child
Useful for macro selector dialog where we had to open
many menus while working with dialog.

Change-Id: I7dd710196d79617ff2441cc975f8d83b8dea5835
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-15 09:19:27 +01:00
Szymon Kłos
168871e579 mobilewizard: hide cancel and help buttons
Change-Id: I6d9d42f5f31f19b6a0cd00803cc350fcac32d505
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-15 09:19:27 +01:00
Szymon Kłos
c9c7e90e33 mobilewizard: show all elements from previous level
When going back to the root level show not only headers.

Change-Id: I86d91f03b6f9aaa1ce14fb9ccbb567a62fb4fb15
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-15 09:19:27 +01:00
Szymon Kłos
34aed8e94c notebookbar: don't switch if context is the same
avoid unwanted switch to home tab

Change-Id: Ie58ac122233a638d3b7743f4e4de433d960b7e1d
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-15 09:19:27 +01:00
Szymon Kłos
2a8e4e5f99 notebookbar: alignment fixes
Change-Id: If7f775806720af6e3221f4b90d32b4386c58beb2
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-15 09:19:27 +01:00
Szymon Kłos
d81758206d notebookbar: keep insert annotation in insert tab
Change-Id: I03415aaafabc626204583ffd5cddd76998a41ef4
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-15 09:19:27 +01:00
Szymon Kłos
5c6481d86d styles preview: use flex layout
with inline-block with many styles there were
empty spaces

Change-Id: I5752b26694b630e871b26a1fd7044db58808ccfe
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-15 09:19:27 +01:00
Andras Timar
dd9d93de49 typo fix
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I7c6f869be1de3b584b89999b9dc5f6085594b7f4
2021-03-14 17:54:16 +01:00
Ashod Nakashian
293d1c0a2a wsd: detect misuse of SocketPoll::startThread
There are scenarios where startThread is
called either when the thread is already
running or when it has long since finished.

Logs are added to catch them, and better
document the expected behavior in those
cases (they shouldn't happen).

Change-Id: I219a59b92c943445ec4520667a8ed6d9bd1c328d
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-13 19:34:02 -05:00
Ashod Nakashian
1d09484eb8 wsd: check before doing unnecessary work
Change-Id: I4afb812346e3cef4fe9d7d6c39ee72817df067aa
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-13 19:34:02 -05:00
Ashod Nakashian
0e73346d5e wsd: read -> wrote
Change-Id: I1a02b42931a1ab2202233918d542be7c2ccb9225
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-13 19:34:02 -05:00
Ashod Nakashian
9ce552b5a5 wsd: better logging
Change-Id: I9c6bfcc22b1d80a27a4b4fa7229766d95fc62f9a
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-13 19:34:02 -05:00
Ashod Nakashian
e6fe7c0bd0 wsd: improved thread ownership management and logging
Change-Id: I00a7dc303a873cc249ec56db0611d104557bbf45
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-13 19:34:02 -05:00
Ashod Nakashian
8fd593c076 wsd: do more outside mutex and std::move
Change-Id: I994cc62ffee41b9d8d86748b25e27a473b124599
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-13 19:34:02 -05:00
Ashod Nakashian
6d134c3228 wsd: log on EPIPE while writing to socket
Change-Id: I27c4df2d8e139e9da5a97acb0cb16e55501174d9
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-13 19:34:02 -05:00
Ashod Nakashian
0cd55fde61 wsd: better socket logging
Change-Id: If7d8411b40510d4942c6ef7a1c248f587b7dbdae
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-13 19:34:02 -05:00
Ashod Nakashian
65f71a2efb wsd: better logging of hex data dumps
And guard http data dumping with debug directives.

Change-Id: I22a725ba49bfb0399a27889ce9732dfe061e2563
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-13 19:34:02 -05:00
Ashod Nakashian
5467a7f7ef wsd: simplify and document dumpHex
Change-Id: I636dd6548b0712a72dfc162eb7381e3e7ac18b5a
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-13 19:34:02 -05:00
Ashod Nakashian
c4c354e7cf wsd: remove a TODO and explain rationale
Change-Id: I903ac749c4e17753136cb999df622bcaf593d479
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-13 19:34:02 -05:00
Ashod Nakashian
da2309f147 make: delete loolwsd binary if it fails to cleanup
A broken loolwsd may be lurking around, which will
then get used during the next `make` invocation to
cleanup the jails. If it fails, it will break the
build altogether. This is not ideal. In this case,
we delete the loolwsd binary so that we force
building it anew. And in any case it was useless
for make, if it failed to do the only thing that
make needs it for: cleaning up the jails.

The new loolwsd will subsequently get used to
clean any left over jails before running the
tests, so that should be fine.

Change-Id: I76c16b5fc7c6f08308c9fb2e619228f8e0266b74
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-13 16:44:09 -05:00
Ashod Nakashian
112b04def5 wsd: move srv instance into LOOLWSD and rename
This makes things more consistent in naming
and in namespace.

Change-Id: I2149c9e0b96eddf9fe2ad1dbc80c932fa7582f84
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-13 16:44:09 -05:00
Ashod Nakashian
a99edb5d29 wsd: convert static objects to unique_ptr
This moves WebServerPoll and PrisonerPoll
from the global namespace into LOOLWSD
while converting them to unique_ptr. This
is to manage their lifetimes better and
avoid having out-of-order destruction,
especially with regards to Poco and other
statics that are out of our control.

The PrisonerPoll class had to be renamed
to PrisonPoll because the following is
otherwise invalid:

PrisonerPoll = Util::make_unique<PrisonerPoll>();

Change-Id: Id6c50ebf12ad0f313fea130ffba364beff54f686
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-13 16:44:09 -05:00
Ashod Nakashian
3e5be297f5 wsd: avoid static LOOLWSDServer instance
LOOLWSDServer needs to shutdown its
accept_poll SocketPoll in its destructor,
which may be called after Poco's Logging
subsystem has been destroyed.

Instead of managing the lifetime of
accept_poll member of LOOLWSDServer,
it is safer to manage the lifetime
of LOOLWSDServer itself, and destroy
it in the cleanup stage. This makes
sure that its other members, or indeed
LOOLWSDServer itself, can't have any
late-destoryed objects that can cause
trouble.

The stacktrace for this crash:

    terminate called after throwing an instance of 'std::bad_alloc'
      what():  std::bad_alloc

    Program received signal SIGABRT, Aborted.
    __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
    51      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
    (gdb) bt
    #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
    #1  0x00007ffff613f801 in __GI_abort () at abort.c:79
    #2  0x00007ffff6d51957 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
    #3  0x00007ffff6d57ae6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
    #4  0x00007ffff6d56b49 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
    #5  0x00007ffff6d574b8 in __gxx_personality_v0 () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
    #6  0x00007ffff671f573 in ?? () from /lib/x86_64-linux-gnu/libgcc_s.so.1
    #7  0x00007ffff671fad1 in _Unwind_RaiseException () from /lib/x86_64-linux-gnu/libgcc_s.so.1
    #8  0x00007ffff6d57d47 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
    #9  0x00007ffff6d582dc in operator new(unsigned long) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
    #10 0x00005555556b6127 in void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag) [clone .isra.41] ()
    #11 0x0000555555986b94 in Poco::Message::Message(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Poco::Message::Priority) ()
    #12 0x000055555585ea49 in SocketPoll::~SocketPoll (this=0x555555d13490 <srv+16>, __in_chrg=<optimized out>) at net/Socket.cpp:145
    #13 0x000055555575d794 in TerminatingPoll::~TerminatingPoll (this=0x555555d13490 <srv+16>, __in_chrg=<optimized out>) at ./net/Socket.hpp:832
    #14 LOOLWSDServer::AcceptPoll::~AcceptPoll (this=0x555555d13490 <srv+16>, __in_chrg=<optimized out>) at wsd/LOOLWSD.cpp:3766
    #15 LOOLWSDServer::~LOOLWSDServer (this=0x555555d13480 <srv>, __in_chrg=<optimized out>) at wsd/LOOLWSD.cpp:3640
    #16 0x00007ffff6142041 in __run_exit_handlers (status=0, listp=0x7ffff64ea718 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:108
    #17 0x00007ffff614213a in __GI_exit (status=<optimized out>) at exit.c:139
    #18 0x0000555555753658 in LOOLWSD::innerInitialize (this=<optimized out>, self=...) at wsd/LOOLWSD.cpp:1213
    #19 0x0000555555789527 in LOOLWSD::initialize (this=<optimized out>, self=...) at wsd/LOOLWSD.hpp:439
    #20 0x00005555558e1964 in Poco::Util::Application::run() ()
    #21 0x00005555556b6d74 in main (argc=3, argv=0x7fffffffe4f8) at wsd/LOOLWSD.cpp:4286

Change-Id: I28ea6215ce49c752cbb90bc33269ab3b662accf1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-13 16:44:09 -05:00
Ashod Nakashian
42a7607489 wsd: avoid static SocketPoll
The lifetime management of static objects
is extremely unpredictable and depends on
many variables outside of our control or
even reliable reproducibility.

Complex static objects that own threads
and other objects are doubly problematic
because of their dependency and/or
interaction with other objects.

Here we replace the static DelayPoll
instance with one we control its lifetime
in the LOOLWSD main body, such that it
is destroyed properly.

Specifically, DelayPoll's dtor  was
accessing Poco's Logging subsystem out of
order. That is, after Poco had been
destroyed.

Another advantage to this approach is that
we don't even create the DelayPoll at all
if we don't need it. The onus now is on
the user of DelayPoll to make sure they
create a Delay object with a long-enough
lifetime to encompase it use.

For completeness, here is the stacktrace:

    terminate called after throwing an instance of 'std::bad_alloc'
      what():  std::bad_alloc

    Program received signal SIGABRT, Aborted.
    __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
    51      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
    (gdb) bt
    #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
    #1  0x00007ffff613f801 in __GI_abort () at abort.c:79
    #2  0x00007ffff6d51957 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
    #3  0x00007ffff6d57ae6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
    #4  0x00007ffff6d56b49 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
    #5  0x00007ffff6d574b8 in __gxx_personality_v0 () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
    #6  0x00007ffff671f573 in ?? () from /lib/x86_64-linux-gnu/libgcc_s.so.1
    #7  0x00007ffff671fad1 in _Unwind_RaiseException () from /lib/x86_64-linux-gnu/libgcc_s.so.1
    #8  0x00007ffff6d57d47 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
    #9  0x00007ffff6d582dc in operator new(unsigned long) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
    #10 0x00005555556b5927 in void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag) [clone .isra.41] ()
    #11 0x0000555555982a14 in Poco::Message::Message(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Poco::Message::Priority) ()
    #12 0x000055555585a909 in SocketPoll::~SocketPoll (this=0x555555d10f60 <DelayPoll>, __in_chrg=<optimized out>) at net/Socket.cpp:145
    #13 0x00007ffff6142041 in __run_exit_handlers (status=0, listp=0x7ffff64ea718 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:108
    #14 0x00007ffff614213a in __GI_exit (status=<optimized out>) at exit.c:139
    #15 0x0000555555752d78 in LOOLWSD::innerInitialize (this=<optimized out>, self=...) at wsd/LOOLWSD.cpp:1213
    #16 0x0000555555788b07 in LOOLWSD::initialize (this=<optimized out>, self=...) at wsd/LOOLWSD.hpp:432
    #17 0x00005555558dd7e4 in Poco::Util::Application::run() ()
    #18 0x00005555556b6574 in main (argc=2, argv=0x7fffffffe528) at wsd/LOOLWSD.cpp:4276

Change-Id: Ifda55fe869fa6734b9c2490da4497d2551ac21c1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-13 16:44:09 -05:00
Ashod Nakashian
e9cf4681a2 wsd: move TerminatingPoll to Socket.hpp
Makes it accessible to more code.

Change-Id: I73dd1895defe47ae40873b6155203768055206ec
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-13 16:44:09 -05:00
Ashod Nakashian
e34b100c03 wsd: capture and log exceptions during un/initialization
Change-Id: I37959fe6f6f1829eb89a81eaf26fac60bbced905
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-13 16:44:09 -05:00
Gökay Şatır
477e40f065 CanvasSectionContainer: Improve dragging feature.
Allow dragging event even when the mouse is outside the document.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I2b871e9a7556b465d55aa0d1b50ac9f489246d17
2021-03-13 19:29:14 +03:00
Dennis Francis
3df4ac53fe avoid branches for manual vs transform()/translate() APIs
In commit 64dc25f70 a new branch of coordinate transformation was
introduced to avoid breaching the coordinate limits supported by
canvasRenderingContext2D.transform(). But this caused additional burden
on testers by forcing them to test all branches and made the code harder
to maintain.

It is straighforward to implement the features of
transform()/translate() that we need and use them always and not rely on
those apis. This is what the patch implements.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: If690a254b44fb4e6ca9a5536785de6f3310413d8
2021-03-12 18:10:48 +05:30