Commit graph

296 commits

Author SHA1 Message Date
Eduard Ardeleanu
d87146d3fa fix: saveAs breaks when '%' character is used within the filename
Change-Id: I2df059abd67be88acae8bd44ae2c74be7778a595
Reviewed-on: https://gerrit.libreoffice.org/69424
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-03-19 18:31:15 +01:00
Michael Meeks
6634d3b3e9 TileCache: key almost everything on TileDesc instead of string names.
Saves lots of string construction and storage, simplifies lots of code.

Store the more exotic font-caching bits etc. in a separate store: we
should also pre-render these really and share them.

Change-Id: Icaeff8fd72f52d7215c06a687b1e39cfb7631503
2019-03-05 06:58:50 +01:00
Michael Meeks
0c46b33e72 Don't use the same std::ostringstream from multiple threads.
Avoids tests crashing with obscure memory errors re-allocating the
string buffer; and hopefully cleans up the output too.

Change-Id: I3e38680c15129e84f0c7dd8cada3b505cf08ad34
2019-03-04 22:04:46 +01:00
Tor Lillqvist
8f71365f0f Remove unnecessary leftovers after Michael's removal of the on-disk tile cache
Change-Id: I435679b48f90d2580bb9c5c86a26c9a1d43c5b59
Reviewed-on: https://gerrit.libreoffice.org/67885
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-02-15 21:36:16 +01:00
Michael Meeks
66ac62429c TileCache: switch to in-memory, rather than persistent.
Remove significant complexity; if we need it later lets do it more simply
serializing when we start / finish a session.

Turn off caching for mobile - possibly should kill for single-user too.

Change-Id: I5ea56088ddbb61f22fe7920f8c9ac7440cb3296a
2019-02-15 12:10:16 +01:00
Michael Meeks
36e9d5b376 TileCache: re-factor API to work in terms of vectors, not file references.
Change-Id: Ia9d48773121ab965b79ddb16b55b5d3fdcd7fd5c
2019-02-14 21:46:39 +01:00
Jan Holesovsky
ce95c52234 Fix build.
Change-Id: I434a22f14482bf901d08b7c833eaff01e7c9c4f5
2019-02-14 08:44:46 +01:00
Michael Meeks
92cf5707cf Add calc / typing unit test.
Change-Id: Ib62ad6e1a720bdfce41ed5520d7396e83c8f5a91
2019-02-13 18:24:36 +01:00
Michael Meeks
f98a7f0592 Improve unit test / SSL handling & detection.
Change-Id: I6bd3116ac94d3d2c61e2ec543cb17896834ef2df
2019-02-13 18:24:36 +01:00
Jan Holesovsky
f76b36193d android: #if(n)def MOBILEAPP -> #if (!)MOBILEAPP for better reliability.
Change-Id: I5f9c9420b6c83601db1c8fdba4ae5a10b17b2107
2019-02-12 12:20:11 +01:00
Miklos Vajna
d11056deaa test: use the more effective overload accepting a character for find_last_of()
Instead of the one that takes a string literal consisting of a single
character.

Also remove the clang-tidy target, 'run-clang-tidy' does a better job of
doing the same today.

Change-Id: I58f55a0e64af42694d55f9588f25618164275852
2019-01-23 09:06:04 +01:00
Ashod Nakashian
30fb30cff4 wsd: use same method to parse json
DynamicStruct is also more recent and is missing
from older distros and versions of Poco, so avoid
using it just for that.

Change-Id: I465fbbc4350101d382877bd42a1704e4e7827102
2019-01-22 14:52:40 +01:00
Tamás Zolnai
b007656e6a Add a test case of SVG export of Writer image
Change-Id: Ic81754d965a89106f50866a148c7ced0be4a3e9a
2019-01-22 14:52:39 +01:00
Tamás Zolnai
e394999caa Add test case for SVG export of selected shapes in case of Writer
Change-Id: I96e4e4bb098ea37974d6cc684c9b8170ad72869e
2019-01-22 14:52:39 +01:00
Miklos Vajna
05e409fb94 Remove unused 'Timestamp' using decl
Change-Id: If71dd6ef849c530b3c39ab55e0640d597f5a0b2f
2019-01-22 09:19:39 +01:00
Tomaž Vajngerl
7137c953d8 add export, sign and upload as one function for PDF signing
PDF export, signing and upload needs to be done in one operation
as PDF doesn't change the current document. The workflow is just
a bit different to the ODF / OOXML that it needs a change in
behaviour.

Change-Id: I752b293494a2d677fa7f12f2317954cfcf47859b
2019-01-13 23:50:18 +01:00
Andras Timar
9200c0afdf Remove empty Configuration2/ from ODT, it's better for testing signing
Change-Id: I1a10d57ea10c8006b2cdbbe4a674f9177fb35246
2018-12-28 13:10:16 +01:00
Miklos Vajna
1dd2f823e9 UnitFuzz: avoid manual std::move()
std::move() is implemented with release + reset in fact.

Change-Id: If5f0dc8f10066a7ee1ca37f7c5039fcd0affb755
2018-12-18 09:14:43 +01:00
Tamás Zolnai
209e1cd7ee Handle Special character toolbar item state correctly
The toolbar item should have the same names as the UNO command in lower case.

Change-Id: I68264e7d58cca829084965fb5ea9686a85ccd9cd
2018-12-14 17:59:00 +01:00
Miklos Vajna
f38ac3d8ba UnitWOPIDocumentConflict: no c_str() when it'll be converted back to std::string
Change-Id: Ia87598c35f5c8423b22cab0fe8e39fbd1e0818ff
2018-12-14 09:07:22 +01:00
Miklos Vajna
b773f11bdb WopiTestServer: make members private
Change-Id: If042fab5b69faf7c7dff975a95810cb96d8f02b0
2018-12-13 08:49:09 +01:00
Miklos Vajna
d390d646a6 WhiteBoxTests: clean up redundant member initialization
Change-Id: I7b9a4453a94df0a9311bfdb6c0ea3bf8c8e74208
2018-12-12 09:03:15 +01:00
Miklos Vajna
e9e1db61cc HTTPWSTest::testRenderShapeSelection: this test expects an SVG generated by core 6.0
So avoid the test with newer core, which generates a slightly different
SVG.

Change-Id: I9357530735640a40a176140e26ddeb334cd7e89f
2018-12-11 09:10:43 +01:00
Tamás Zolnai
406ae1be86 Update test SVG after export was optimized a bit
Change-Id: I40f402105e603ba793abdff95219319ed92df5ba
2018-12-07 12:39:27 +01:00
Tamás Zolnai
bdab8184a8 Remove unneeded lines from rendershapeselection test
SelectAll does the selection.

Change-Id: I2642b9c1eef1398fa78f39a1a6645e0cf7d266bb
2018-12-07 12:39:27 +01:00
Ashod Nakashian
e5723a22d7 wsd: update bundled headers and improve renderShapeSelection test
Unfortuantely it still fails, but this is not regression. Now
with the new patch in Core the exception is caught and so at least
the binary survives (and the API returns 0).
New unit-test added in Core to help track the issue down and fix.

Also, free the memory allocated by the API.

Change-Id: I5d788a2ee0383de1c323af4cd6b39b8615a35baf
2018-12-07 12:39:27 +01:00
Tamás Zolnai
4df9fd41a3 Update test SVG
Change-Id: I55a3ae676c6eb71e8e34f98f3361f9046e0a4a2f
2018-12-07 12:39:27 +01:00
Tamás Zolnai
b34b1242d6 Remove unneeded include used for debugging only
Change-Id: I82efb9b6d0a0e6ffdca4b9205804446bc871ef84
2018-12-07 12:39:27 +01:00
Tamás Zolnai
31f99bf9f5 Introduce client-server message for requesting the selected shape as SVG
It works for Impress only now.

Change-Id: I130707d8e96e0c633f2531b1cb81ce74dc6ec6e1
2018-12-07 12:39:27 +01:00
Ashod Nakashian
33aff0ce61 wsd: utility to parse integer lists
A quite common logic that is best moved to a utility
and optimized for best performance.

Includes unit-tests.

Change-Id: Id63a388690c17355eb2fac529070c38e9b082fd0
2018-12-07 12:39:27 +01:00
Miklos Vajna
c04fd49d42 TileCacheTests: these writes are never read
They are written again inside the do { ... } while (...) which runs at
least once.

Change-Id: I9ff07d7cb68b73bccf1bd38490fcba615b87a6ba
2018-12-05 09:14:50 +01:00
Andras Timar
25a177db93 typo: capabilties -> capabilities
Change-Id: I44c84d01a2ef6addf7efd5a6cd7fc1778a752c4b
2018-11-30 14:50:15 +01:00
Miklos Vajna
84d224d995 test: no need to copy procEntry
Change-Id: Iac7bca9ebcf104975d01bcd1cdfe8e0f4d2a742e
2018-11-30 08:38:00 +01:00
Tomaž Vajngerl
73c8fa9d09 Extract Authorization out of Auth and put it into common
This is needed so we can use this inside ChildSession.

Change-Id: I88f2cc767412fd52dbb242938f0f9897d4277639
Reviewed-on: https://gerrit.libreoffice.org/63836
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-29 21:47:13 +01:00
Miklos Vajna
54e4147887 httpwstest: 'emplace_back' is called inside a loop
Pre-allocate the vector capacity before the loop to avoid realloc waste.

Change-Id: I78370d79728ae66446d2b979d376cb50ba3ae864
2018-11-26 09:43:17 +01:00
Miklos Vajna
d52cf35418 MessageQueueBase: make members private
Change-Id: I65360bc23475b25b2c626ea75186e8863fc74b8f
2018-11-16 09:06:17 +01:00
Miklos Vajna
596f3d14db test: fix HTTPWSTest::testInactiveClient() 2018-11-13 09:12:03 +01:00
Michael Meeks
fa74404019 Add a time limit for badly behaved / huge document load / conversions.
Also improve debug printing of load times in dumpstate.

Change-Id: Ib3fd70dffb57588cd90bd928c4be9890cee8bc65
2018-11-08 01:27:40 +00:00
Tor Lillqvist
f8a0fb4c32 WaE: -Werror=unused-parameter
Change-Id: Icadfcb19ce1fff2b5009d42acf33297cda6e36f2
2018-11-01 21:34:16 +02:00
Tor Lillqvist
60ee631a9e More FakeSocket tests
Actually, I should expand on this and write a test that makes sure the
FakeSocket API semantics does in fact match that of the real socket
API... A fakefakesockettest. Later.

Change-Id: I5cf885a956d6d795976a4369448be04e88837c19
2018-11-01 16:52:06 +02:00
Tor Lillqvist
781162fddd Fix my misunderstanding of Cppunit exception use
I had no idea that the CPPUNIT_ASSERT* macros work by throwing
exceptions. They do, so one should thus not catch them, but let the
Cppunit code take care of that.

Also, make the tests a bit more specific and add some
fakeSocketAvailableDataLength() checks.

Change-Id: I9291822114331c21b774bb41116e8b2ff709dae2
2018-11-01 12:53:47 +02:00
Andras Timar
c50cd3b550 take hello-world.ods and hello-world.odp out of version control
Change-Id: I108e1a0e0981a50f35c7637f00fa15f8cf9d33c3
Reviewed-on: https://gerrit.libreoffice.org/62725
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2018-11-01 11:39:43 +01:00
Andras Timar
455cd4092e chmod -x on test data files
Change-Id: I398d75b298c86a231a76b7903f792b886450b128
Reviewed-on: https://gerrit.libreoffice.org/62724
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2018-11-01 11:39:30 +01:00
Tor Lillqvist
856965db9f Return correct exit value, 0 for success, 1 for failure
Change-Id: Ie3454cac318ce6a0e8c2c59ae9d3ae3c6658c0b8
2018-11-01 12:12:26 +02:00
Tor Lillqvist
3d408d4338 Actually run the fakesockettest
Sad that this Makefile.am is so complicated, and that this needs to be
added explicitly like this.

Change-Id: I8b1b25761eb723e124cab96479f49478d3a75194
2018-11-01 12:10:47 +02:00
Tor Lillqvist
02d3ac47ee Add a Cppunit test for the FakeSocket API
Based on Mobile/TestFakeSocket/TestFakeSocket/main.mm. Needs work,
does not really test the interesting semantic corner cases that have
been fixed only recently.

Change-Id: Ie2f3dbd2b478ab3acb4bfef0e0d3031c817d0f37
2018-11-01 11:51:34 +02:00
Tamás Zolnai
b4b0e9c6d4 Handle X-Forwarded-For with more secure
Check all pariticipating IPs to be allowed to use convert-to
functionality. In a simple use case it means the reverse-proxy's
and the actual client's IP.

Change-Id: I4ef9cb14a1c3003cba6c66f6e99d5b54b2c3b2b8
2018-10-25 10:48:52 +02:00
Tamás Zolnai
318f0629bb Handle X-Forwarded-For header for convert-to feature
Extract the client IP from the X-Forwarded-For value
and use that one to allow / deny the usage of convert-to
feature.

Change-Id: I363c0931df5a0538236cae12f943fffd65086ee6
2018-10-24 12:50:03 +02:00
Tamás Zolnai
4ff506425f Enable convert-to test
Change-Id: I7c2bf333bb4bcb803cd926bfb1d669f89d100615
2018-10-20 13:41:43 +02:00
Tamás Zolnai
ec65ecd0f1 Revert "Revert "Enable convert-to features for wopi hosts""
This reverts commit 343ba48d27.
2018-10-20 12:57:53 +02:00