Commit graph

10130 commits

Author SHA1 Message Date
Muhammet Kara
53e6b0d07e mobile: Add orientation commands to Page Setup in hamburger menu
It checks for the state of the .uno:Orientation which
comes from core commit 7285b040ccf619210207c555981beb6df64cfc5a

Change-Id: Idc20f8b6f7c5ba10f5ce4726f4bc4408116dfe6f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86704
Reviewed-by: Aron Budea <aron.budea@collabora.com>
Tested-by: Aron Budea <aron.budea@collabora.com>
2020-01-27 14:12:25 +01:00
Tamás Zolnai
4360aba862 cypress: mobile: Update shape insertion test case.
Now, that the insertion is fixed and works.

Change-Id: I89eaf83992cb55db05953727ea973fb0e6820ae4
2020-01-27 13:53:36 +01:00
Tamás Zolnai
3ae759eec0 mobile: Fix shape insertion
Regression from:
298f4297c2

Change-Id: I4b31da57bde7f7ac6a5554f3ff7763f1b4ee76d5
2020-01-27 13:53:36 +01:00
Muhammet Kara
c0252cc281 Remove uno:ToggleOrientation from toolbars
Since the Orientation commands (Portrait and Landscape)
can now be accessed from the hamburger menu.

Change-Id: I5d07a6ac8df3e5f4e28dbd5a71d58bde5613251a
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87371
Reviewed-by: Aron Budea <aron.budea@collabora.com>
Tested-by: Aron Budea <aron.budea@collabora.com>
2020-01-27 13:45:53 +01:00
Tor Lillqvist
cad472f796 Add some more core source files for breakpointing convenience
Change-Id: Ia0f08bca84d98f45484162017bd3019876ab8604
2020-01-27 10:52:29 +02:00
Miklos Vajna
2afebbeb67 configure: make lack of Chrome an error in the enable-cypress case
Change-Id: I1e2d4c884fc58334b3fdd5d43b1821eceeb08987
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87487
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-27 09:44:29 +01:00
Tamás Zolnai
38d2bd8768 cypress: mobile: Basic tests of insertion mobile wizard.
Change-Id: I2c2b2406ae390856c001dff1b4827586a40e05be
2020-01-26 06:42:53 +01:00
Tamás Zolnai
4bbcd50bc8 cypress: Make empty.odt test docs actually empty.
Change-Id: Ib6ab2da2b5dd2fa48b3aeedb8760a0acf5b6b5d7
2020-01-26 06:42:53 +01:00
Tamás Zolnai
517ebe5f2f cypress: Add a test case of shape insertion.
Change-Id: Ic76be157b6fb61c1fbc098ab4d2e627f9b25664e
2020-01-26 06:42:38 +01:00
Tamás Zolnai
1851110139 cypress: Add an example for copy-ing.
Unfortunatly cypress does not support clipboard events
by now.

Change-Id: Iffdaf0f15275ecb27aa3ebf2731c72cf4bdd46de
2020-01-26 02:41:06 +01:00
Tamás Zolnai
b64907e918 cypress: Extract test document loading code.
Change-Id: I77b2097bd9406ec63fbb9133678456444457ca2b
2020-01-26 02:41:06 +01:00
Dennis Francis
dd48efc7ca [MobileWizard] Do not display broken-image icon in firefox
In the mobile wizard, if there are no icons for a menu entry, firefox
will display a broken image even if we set alt='' in img tag. Lets add
an error event handler for img(icon) element to not display
anything. This seems to be the general solution that works both in Chrome
and Firefox.

TODO: We may want a css-only solution probably by having a custom transparent
icon to override the broken-image icon.

Change-Id: I879035ca847c4c52611eccfc20834866c0144e02
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87373
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-25 12:29:45 +01:00
Aron Budea
185bb77eee Add correct string and translations for Function Wizard
Change-Id: Ia9d8f2b102bc405d9eb9ef6364a00fc46c5798b7
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87155
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-01-24 21:34:01 +01:00
Miklos Vajna
ea9c80b588 test: fix ODR-violation in SigUtil
==6642==ERROR: AddressSanitizer: odr-violation (0x0000024db3a0):
  [1] size=4 'SigUtil::SigHandlerTrap::SigHandling' ../common/SigUtil.cpp:113:38
  [2] size=4 'SigUtil::SigHandlerTrap::SigHandling' common/SigUtil.cpp:113:38
These globals were registered at these points:
  [1]:
    #0 0x68d7d8 in __asan_register_globals.part.13 lode/packages/llvm-472c6ef8b0f53061b049039f9775ab127beafbe4.src/compiler-rt/lib/asan/asan_globals.cc:365
    #1 0x7f4b7eeed83b in asan.module_ctor (online-san/test/../test/.libs/unit-base.so+0x6fd83b)

  [2]:
    #0 0x68d7d8 in __asan_register_globals.part.13 lode/packages/llvm-472c6ef8b0f53061b049039f9775ab127beafbe4.src/compiler-rt/lib/asan/asan_globals.cc:365
    #1 0x104590e in asan.module_ctor (online-san/loolwsd+0x104590e)

No need to include SigUtil for unit-base (invoked during 'make check'),
it's only needed for unittest_SOURCES (invoked during 'make').

Same for Log::IsShutdown(), 'vtable for Session', 'typeinfo name for
TileQueue', 'JWTAuth::_key', 'vtable for ClientSession',
'UnitBase::Global', 'SocketPoll::DefaultPollTimeoutMs' and
'SslContext::Instance'.

But don't just remove all wsd_sources from the new-style unit tests, as
that would lead to missing symbols:

[ loolwsd ] ERR  Failed to load online-san/test/../test/.libs/unit-base.so: online-san/test/../test/.libs/unit-base.so: undefined symbol: _Z20documentViewCallbackiPKcPv| common/Unit.cpp:40

(Seen during make check's unit-base.)

Change-Id: I305185f6437c5b4887d8e09a592e578a94f2659c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87323
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-24 10:34:00 +01:00
Tamás Zolnai
14764fd052 cypress: Add node_modules to eslintignore
Change-Id: Ifc8243b7b3a5cc6790209955249626b81f7ecdde
2020-01-24 09:30:48 +01:00
Dennis Francis
acccf779ce Show missing anchor submenu items in the context menu
This is about the context menu related to shapes.
The core is already sending data about all anchor menu items but they
were not whitelisted. After whitelisting them, they work well except
that the 'anchor' overlay image is not shown over the cell the shape
is anchored to.

Change-Id: I9c2c84e58047d92132329d09a4a2569272d804ff
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87232
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-24 07:20:31 +01:00
Miklos Vajna
6add8295bf test: remove documentation about no longer working CPPUNIT_TEST_NAME variant
This is not needed, the commandline to run the test is printed on
failure.

Change-Id: Ia4da4344ede4ad8c1627a5560f1bc1264f4203c7
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87288
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-24 00:09:34 +01:00
Tamás Zolnai
aaab96fd12 cypress: make chrome check depend on enable_cypress flag.
Change-Id: I0e61ef55be68991ae6d55247d93beb0cd6913084
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87292
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-01-23 21:02:46 +01:00
Pedro Pinto Silva
1476d914e4 Desktop: id document-name-input: set input field based on its value
Change-Id: I8010b5fd435580a0637d5b9c5d23d5c109674c9c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86774
Reviewed-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Tested-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
2020-01-23 15:50:16 +01:00
Tamás Zolnai
4bb0372604 cypress: Update README
Change-Id: I98e83a77ae490890aeb515eeb4e03eb18093c694
2020-01-23 14:55:50 +01:00
Tamás Zolnai
0145c03ed6 cypress: Introduce an --enable-cypress config option.
Removing the cypress_test subdir from top level
folder made the packaging process to fail.
So better to use a flag to enable cypress tests.

Change-Id: Iead4b7cbbea5c6aaba18c0b85f23d67a4fbe920b
2020-01-23 14:55:43 +01:00
Miklos Vajna
9f91b01633 wsd: fix Android build
Don't just rename the variable, also make sure we get the FD before we
reset our local reference to it.

Change-Id: I676f148874831eaf9f37bdcde1216c58f89229e5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87244
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-23 11:18:46 +01:00
Andras Timar
b5290c3dc7 accept standard BCP 47 language tags
Some integrations send a BCP 47 language tag in lang parameter (by the way
this is what makes sense, the lower case codes are non-standard). This commit
fixes the bug, when for example lang=pt-BR fell back to pt with the JavaScript
UI.

Change-Id: I770f499feb605696fa589bfc326194218c3c9fb1
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87222
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-01-23 09:27:47 +01:00
Miklos Vajna
abe076e56d test: restore ability to just run a single unit test
This was removed in commit 0599db3576
(copyFile: de-poco-ize and handle EINTR and short writes., 2020-01-18),
probably by accident.

Change-Id: I36bed5851fbfa0c37a007bedb6f318aaf4d8c64a
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87233
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-23 09:19:43 +01:00
Michael Meeks
c9cfde6d72 wsd: use port number after, rather than before allocating it.
Particularly printing it on the console, and passing it to the kit.

Change-Id: I158f97b7b219c44c885939d71af2e5e8283be4c2
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87227
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-23 00:39:19 +01:00
Pranam Lashkari
a019c93d90 Resolved: Server crash when link opened in new tab
When trying to open a link normally from help->Online help
nothing happens but the popup is closed.

When trying to open a like forcefully in new tab
from help->online help it crashes the server.

Change-Id: I7e0944ebe521002625a84e155e379ed7e25d2309
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/85466
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-22 23:23:51 +01:00
Tamás Zolnai
34015a5798 cypress: Use a bigger timeout for document load.
Change-Id: I8bc142468fb301e8aa6fc12d5f271421fb68ee8c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87220
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-01-22 21:21:55 +01:00
Tamás Zolnai
dbb87bab34 cypress: Fix CHROME program detection.
For checking more binaries, we need AC_PATH_PROGS and
a blank separated list.

Change-Id: Ie1f5660b912970b70ba1aa51885989fbd0563914
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87213
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-01-22 21:21:37 +01:00
Tamás Zolnai
ce56626bea cypress: Update mobile test cases.
Mobile wizard was changed in the meantime.

Change-Id: Ic4813b10f946e58878bbc2dd926570e2e712606a
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87212
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-01-22 21:12:02 +01:00
Henry Castro
576e41a682 loleaflet: show SVG background while dragging
When a user creates a graphic and immediately start
dragging it will show only a bounding rectangle,
then it will show the proper SVG background when
download is complete

Change-Id: I3b623e6a15b5af683f858171f22f47af101495c3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87200
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2020-01-22 19:54:47 +01:00
Henry Castro
cbdccb6d1d loleaflet: do not remove the rectangle path
The main invisible rectangle should not be removed
and the SVG is just a background it should not be
draggable

Change-Id: I828c38dbdab3cf9baad5002b5f45470c5e4fa07a
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87196
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2020-01-22 19:54:02 +01:00
Henry Castro
d34f8eb151 loleaflet: remove the graphics filter to edit text
This was a bad idea, since 'XTEXT_PAINTSHAPE_BEGIN' is not unique
to identify graphic text, I will find another solution

Change-Id: Ic60f53254e461299b24251aa325a42a1eb8e896e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87193
Reviewed-by: Henry Castro <hcastro@collabora.com>
Tested-by: Henry Castro <hcastro@collabora.com>
2020-01-22 19:53:32 +01:00
Henry Castro
56747ba5c6 loleaflet: cache the selected graphic background
Unfortunately, when drag and drop the selected graphic,
the SVG background does not finish downloading to client side.
In order to improve the selected graphic the SVG background is cached

Change-Id: If2a88ab3df50b7defe52a7beda074563af20415b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87166
Reviewed-by: Henry Castro <hcastro@collabora.com>
Tested-by: Henry Castro <hcastro@collabora.com>
2020-01-22 19:52:11 +01:00
Miklos Vajna
ed586d9601 cypress: accept chromium next to chrome
Change-Id: Id2a577b1413227840e2af29abe4cc96e5a81dd82
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87191
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-22 18:59:46 +01:00
Pranam Lashkari
edc2b3c53e resolved: No avatar in comments/changes
Change-Id: Icbdffdfa4567364f306a5f94b5788fce2c43388e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/85661
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
2020-01-22 17:23:14 +01:00
Tamás Zolnai
33245f42ab cypress: Disable SSL for the test loolwsd server.
Change-Id: I613768b3a91e5f34c64495cb5ca13312210f3549
2020-01-22 12:55:13 +01:00
Tamás Zolnai
d87fab2acf cypress: Don't use hardcoded wsd hash.
Change-Id: Iff7296c6a9def8df9ddb6d78a29e0adf64436b7e
2020-01-22 12:55:13 +01:00
Tamás Zolnai
2165ffa38c cypress: README: Add some installation \ test runner info.
Change-Id: I71eccf7e72eb634e83d97f89ea2c55d684009a19
2020-01-22 12:55:13 +01:00
Tor Lillqvist
d39a9f84d5 Add sources in sd/source/ui/slidesorter/view for breakpointing convenience
Change-Id: I1f8919f86b64dd6a9f6befec90b13956b2b845d3
2020-01-22 13:39:55 +02:00
Pranam Lashkari
8add3d1274 Moved: getMenuStructureForMobileWizard
moved the getMenuStructureForMobileWizard from map
to more appropriate place in JSDialogBuilder.js

Change-Id: I366b8317c6469652ee9469746ae7b78c2c3a1f7f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87169
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-22 10:12:56 +01:00
Miklos Vajna
9a92cd2415 Fix an UB in the DocumentBroker dtor
The problem is that both the DocBrokers map and the instance returned by
Admin::instance() are static, so there it's not safe to assume that by
the time the DocumentBroker dtor runs, the static Admin instance is
still alive. Still, the DocumentBroker dtor calls Admin::instance().

Fix this by clearing the DocBrokers map in LOOLWSD::cleanup(), which is
used exactly to destroy statics in a controlled order.

Sanitizers output was:

wsd/DocumentBroker.cpp:497:23: runtime error: member call on address 0x0000024a5ba0 which does not point to an object of type 'Admin'
0x0000024a5ba0: note: object is of type 'SocketPoll'
 00 00 00 00  50 21 45 01 00 00 00 00  b8 5b 4a 02 00 00 00 00  05 00 00 00 00 00 00 00  61 64 6d 69
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'SocketPoll'
    #0 0xa10af3 in DocumentBroker::~DocumentBroker() wsd/DocumentBroker.cpp:497:23
...
    #17 0x7fa27622ddc9 in exit (/lib64/libc.so.6+0x38dc9)
    #18 0x7fa276215f90 in __libc_start_main (/lib64/libc.so.6+0x20f90)
    #19 0x670189 in _start /home/abuild/rpmbuild/BUILD/glibc-2.26/csu/../sysdeps/x86_64/start.S:120

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior wsd/DocumentBroker.cpp:497:23 in

(Seen during make check CPPUNIT_TEST_NAME="unit-each-view".)

Change-Id: I02ad44deb9de06d9973216428c640248ea2512ce
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87174
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-22 09:19:05 +01:00
Mike Kaganski
0c0510cccf Implement proper proof-key value attribute
Change-Id: I3f2ad960ce6d3dad4d0b064492355b5643f345c8
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87148
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-21 19:28:32 +01:00
Tamás Zolnai
b06ec9c71b cypress: let's have these two commands in separate lines.
Change-Id: Idf7856518121ca2ce84a9eb8f77b6f596a21ca18
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87156
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-01-21 18:47:02 +01:00
Tamás Zolnai
8081afc8e0 eslint: Enable "semi" rule as an error.
This checks whether all statements end with a semicolon.
We already use this rule in the code, so I enable to check
this rule by eslint to keep the code consistent.

Change-Id: I5ea46376d2b6fb488224d4d69e4d117139763a8c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87154
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-01-21 18:32:33 +01:00
Miklos Vajna
a6af954b62 wsd: fix a typo in JWTAuth::cleanup()
Change-Id: I2c88403de12e2011746964b05a0c7e239dcbfd1b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87151
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-21 17:39:09 +01:00
Tamás Zolnai
c782c033b0 cypress: Use a better wait method for loolwsd server
Use the wait-on npm module for this.

Change-Id: I602f95aa79d46cf7b55bcc598e612bbc5342c52b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87150
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-01-21 17:37:28 +01:00
Pedro Pinto Silva
298f4297c2 Mobile: MobileWizard: swipe/scroll indicator: improve scroll detection for different exceptions
Change-Id: I2f3661b2eaafc8d8facb186e92738818431483e4
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87153
Reviewed-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Tested-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
2020-01-21 17:14:46 +01:00
Tamás Zolnai
7da6ea8404 cypress: mobile: Fix 'Close mobile wizard by context wizard' test case
It needs a better indicator that the mobile wizard actually opened
with the right content.

Change-Id: If1d146a6b02b2b5f79e1ac627dbec4fc43906f43
2020-01-21 16:13:01 +01:00
Tamás Zolnai
8f498034a2 cypress: Update README with instructions how to run one test case.
Change-Id: Ib6e80f92d64565471f30abc89b3ed4a1bbcebb20
(cherry picked from commit e11c0f8efa8a873eb699873613e86395d7e23200)
2020-01-21 16:13:01 +01:00
Tamás Zolnai
423f2eb0db cypress: Don't run cypress test for top level make check for now.
Change-Id: I06c724e82b3717e36a7a4550118baba3aac1a7f6
(cherry picked from commit b48ac5933c4b8671e8ba68c9f9d50216ff4dd620)
2020-01-21 16:13:01 +01:00