Just clean out the whole tmp folder.
This gets rid of copies of edited documents left behind if the app is
killed (or crashes) while editing a document. It also gets rid of
files that NSS loves to leave around. Plus empty folders that are left
even when the app dies normally, i.e. while it isn't editing any
document.
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: If1caf8ace666eafc58df981d792f8fbfda8f9ff4
External apps load loolwsd inside the iframe
and loolwsd makes postmessages to parent window.
We receive the postMessageOrigin from checkfileInfo yet
we still send some messages before we even go to the WOPI Api
in that case, if parent window runs on a different domain, we
end up with CORS blocking by the browser. To prevent that we can
allow safely passing the origin inside the first post like access_token
and sanitize it with Poco::URI::encode.
Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I5724f2d103603a599d45b7f61da81fb30834ef0e
We don't want leaking tiles to take up valuable space on the device.
Not even just while a document is open.
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I761c2bb2ab121ee76b5535e96bd5702d0fce6856
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I12660822829c874179ccffd84dcdd33f5dde27e3
(cherry picked from commit 5a1c42c4e610a9265dfe3527c964413f029060ae)
else we see a flash of client-grids on scrolling down a document that
has a non default document background-color.
Conflicts:
loleaflet/src/layer/tile/TileLayer.js
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I5d5447cb5f8aa4852ab765a343b123730b01f029
(cherry picked from commit 7bdd99c4f43307b410a0f3a4990cac34f6f0b459)
Conflicts:
loleaflet/src/layer/tile/TileLayer.js
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Ief814741df4818000cef7499a8b1c9c1ce1f4371
(cherry picked from commit bfed92dffecc3b574f24920733c74565fb1ae29c)
When building against core.git master:
kit/ChildSession.cpp:2668:13: error: enumeration value 'LOK_CALLBACK_SC_FOLLOW_JUMP' not handled in switch [-Werror,-Wswitch]
It's not clear how we want to handle this in Online, so have a default
label in debug builds as well.
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ia0b1cef33e8a5a7fbc1518586ea1e3bb13aa5f22
Fix silly mistake in my previous commit. Had put code in #if 0 that
should be in #ifdef IOS.
Change-Id: I72f4dc3867bd070a01a4ba5625baba0eea3c2d73
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Normally (ideally), tiles (.bmp files) are removed as soon as the JS
has displayed them. But occasionally something goes wrong and they are
left behind. (For instance, it seems to happen if the user closes the
document immediately when it shows up.)
Do not leave them on disk until the app starts the next time.
Change-Id: I0c764280a69a16ad3b7b67c329832fd5331c2e1e
Signed-off-by: Tor Lillqvist <tml@collabora.com>
The worker threads can be running and have not yet responded
to the last _cond.wait() by the time we start compressing again
- at least under valgrind:
loolforkit-nocaps: ./common/RenderTiles.hpp:304: void ThreadPool::run(): Assertion `_working == 0' failed.
==240379== Process terminating with default action of signal 6 (SIGABRT): dumping core
==240379== at 0x5505322: raise (raise.c:50)
==240379== by 0x54EE863: abort (abort.c:79)
==240379== by 0x54EE748: __assert_fail_base.cold (assert.c:92)
==240379== by 0x54FD9D5: __assert_fail (assert.c:101)
==240379== by 0x5886BB: ThreadPool::run() (RenderTiles.hpp:304)
==240379== by 0x56DC02: RenderTiles::doRender(std::shared_ptr<lok::Document>, TileCombined&, PngCache&, ThreadPool&, bool, std::function<void (unsigned char*, int, int, unsigned long, unsigned long, int, int, LibreOfficeKitTileMode)> const&, std::function<void (char const*, unsigned long)> const&) (RenderTiles.hpp:711)
==240379== by 0x5A0104: Document::renderTiles(TileCombined&, bool) (Kit.cpp:762)
==240379== by 0x59CF1A: Document::renderCombinedTiles(StringVector const&) (Kit.cpp:719)
==240379== by 0x59AEC8: Document::drainQueue(std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&) (Kit.cpp:1570)
That means our queue starts processing work as we do the unlocked
queue push - causing some potential badness.
Change-Id: Ib0578dac009376c0676da73a8c1d8960304dc072
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Why pass a dozen empty arguments each time: someone bitten
again by the default vector constructor.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I31bc6f23f0b5d7352b85d3df4b7b5298199044a1
Since all of the menu items under "Insert" are disabled for
the readonly mode we can safely remove it.
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ic84dedd8d76a3db69a0bff7932052f944e42b959
Extend Status bar information to display in which mode the user is
currently in.
Context:
When using Collabora Online to preview documents (readonly mode)
the user might not noticed at the first glance what is different
and why he cannot edit
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Id148fc73ad4f46673170c2372d4ba16a390bbd4f
also make sure (since there are less menu items)
that we use a bit more space for that (width)
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I7642e5fd6ee68d9738f8c2ede4854758a437df25
Removal of top pixels between that are no longer needed
due to the latest changes on neighboring elements.
Plus Make sure that even on readonly mode we do have a
bezel delimiting the bar and the document container
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I799fc099697e0b238cd55e53b91471cbd59da742
Make sure we only check the ruler state when in
edit mode.
Context:
Show ruler (menu action) has been always disabled when on readonly mode
but we seem to do checks on the ruler state and ultimately
show it even on readonly mode.
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I7987e1c54bed4117f221aac37b7fbd184ce954e2
Currently translated at 100.0% (393 of 393 strings)
Translated using Weblate (Turkish)
Currently translated at 99.4% (391 of 393 strings)
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/tr/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I03c3cad2c28407a763965c3ed46fd65d2e49e196
Currently translated at 100.0% (22 of 22 strings)
Translated using Weblate (Russian)
Currently translated at 99.7% (392 of 393 strings)
Translated using Weblate (Russian)
Currently translated at 95.4% (21 of 22 strings)
Translated using Weblate (Russian)
Currently translated at 99.2% (390 of 393 strings)
Co-authored-by: Artem <Localizer_in_Russian@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/android-lib/ru/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/ru/
Translation: Collabora Online/Android lib
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Id6151817f1bbc480839e544fae781ba7cd4f61b7
Currently translated at 99.4% (391 of 393 strings)
Translated using Weblate (Turkish)
Currently translated at 98.7% (388 of 393 strings)
Co-authored-by: Mehmet Sait Gülmez <cenggulmez.65@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/tr/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I34bf314644f812894a4dd75ae8345e31946ed2ba
_firstLine must be assigned before _data is
changed, as it is used to check _data's
first line hasn't changed
Signed-off-by: NickWingate <nicholas.wingate03@gmail.com>
Change-Id: I79dfd0a64d53fc8503709015bbe7ab6875a58204