Commit graph

14068 commits

Author SHA1 Message Date
Ashod Nakashian
92487cfa5d move lastStorageUploadSuccessful into StorageManager
Change-Id: I33a64b9bbb596bcd819adbfd5d7dcee0180bb5fb
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-13 13:25:36 -05:00
Ashod Nakashian
6bfbcf7a5f wsd: move documentLastModifiedTime into StorageManager
Change-Id: Ib33e5d142ce59b8d57177b1fd91cc309063a2d59
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-13 13:25:36 -05:00
Ashod Nakashian
4fc574e539 wsd: introduce StorageManager
This is to encapsulate and track the logic
for uploading documents from the Storage.

Change-Id: I5b972151fe9548526755d18063d37cc95949e68f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-13 13:25:36 -05:00
Ashod Nakashian
55b49a3c14 wsd: separate save handling from save-as and rename
We should only update the save timestamps when we
really save a new version of the document.

Requesting renaming or moving ("save as") in storage
should not be confused with actually saving in Core.

Here we take the first step in this separation,
and we only update the last save response time
when we truely get a response from Core, and
not when we execute a document path/name in storage.

Change-Id: I931c62b306dd3b4906a9e910f844a35fb3f4b6f0
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-13 13:25:36 -05:00
Ashod Nakashian
d8cddcea06 wsd: lastFileModifiedTime -> modifiedTime
The SaveManager is responsible for the file on disk.

Change-Id: I92f7843375fdc875bc7d1af3fba387f67a4f0ca5
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-13 13:25:36 -05:00
Ashod Nakashian
d806353af1 wsd: move lastFileModifiedTime into SaveManager
Change-Id: Ic3dd4f193e1676a47288bc77e75f6643438bafc7
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-13 13:25:36 -05:00
Ashod Nakashian
76be0d562b wsd: move save tracking into SaveManager
Change-Id: Ic98cc50469f1e25bb2e007554e1d9d42e020dc91
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-13 13:25:36 -05:00
Ashod Nakashian
ea96f43df9 wsd: introduce SaveManager
The SaveManager is responsible for the document's
save state. It also encapsulates the members
necessary to track the save state and related
data.

Change-Id: I3ed0f1d93f25988b1ad8b1a121a2080288866a53
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-13 13:25:36 -05:00
Andras Timar
e5adc33a32 set the StartSlideNumber URL parameter properly
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I51e95aa9d97a579bcba8a4c8127f2e2912238b77
2021-02-12 16:31:15 +01:00
Dennis Francis
8b2eae423c setup mocha framework for testing TS classes/functions
... and add a few test-cases for CPointSet.empty()

* The tests are written in TS and compiled to JS before Mocha framework
  runs them using 'npm test' via 'make check'.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I16e28404af76754b6bbb67c6743ca7d0f2701233
2021-02-12 12:02:13 +05:30
Dennis Francis
a084eafbe7 move CPointSet class to its own file
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I64e7c4d66560e309a7be670e0d0f76bccf20bfa0
2021-02-12 12:02:13 +05:30
Dennis Francis
57ef1e2fde remove generated CanvasOverlay.js
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I454384303f4b3855f34b870ef1ccfaee59f40bc9
2021-02-12 12:02:13 +05:30
Rash419
c32395ba27 added a separate option in debug mode for sidebar invalidation re-rendering debugging
Signed-off-by: Rash419 <rasheshpadia419@gmail.com>
Change-Id: I631e45c2c364522eb6b9875ff35c243db0673f35
2021-02-11 17:47:22 +00:00
Gabriel Masei
877ce2faf5 loleaflet: add support for changing ui mode dynamically
Signed-off-by: Gabriel Masei <gabriel.masei@1and1.ro>
Change-Id: Id84a4feb8f37357d7de8f9cfebea3612751709b1
2021-02-11 12:33:11 +01:00
Szymon Kłos
4f40126c7f jsdialog: handle ESC key to close
Change-Id: I6e9562c5330c3e56a84da384d6a6868625d12878
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-11 12:32:41 +01:00
Szymon Kłos
8df1e6e0ce jsdialog: don't override ok button
Change-Id: Id1c7c20c8bb6bf25c002fd106e90a9897ff53883
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-11 12:32:41 +01:00
Szymon Kłos
029450c166 jsdialog: check radio/checkbox also if clicked label
Change-Id: I0f7188aa6500c308a86e7f314949daedcfcfe237
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-11 12:32:41 +01:00
Szymon Kłos
d89964af65 mobile-wizard autofilter: don't override main container with submenu
Change-Id: Ife89dd6b8a167f06477aaccdcd944e1f178ed110
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-11 12:32:41 +01:00
Szymon Kłos
4e2131b1f6 mobile-wizard: avoid scrolling when adding new elements
when partial update creates bigger element than view
it might scroll down the content

Change-Id: I63cdfe9176d224594b4b737f0883ded8bdc6c878
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-11 12:32:41 +01:00
Szymon Kłos
65fdb1e234 Make hyperlink handler work globally
TileLayer is not initialized when Macro Security warning
is shown - so move to the socket so it can be handled.

Change-Id: I16493d80386c7814ba11d5acc5fa6944f58accf8
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-11 12:32:41 +01:00
Szymon Kłos
357cb8b22e Allow to show help in global callback
This is needed to show help in macro security warning
dialog which is showed before the document is loaded.

Change-Id: Ic50bac0c860c5673ce3ec854e54d658157d2a9dd
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-11 12:32:41 +01:00
Szymon Kłos
a35256f803 jsdialog: handle standard buttons
Standard buttons like help or cancel can be not
wrapped with jsdialog weld wrapper so click action
will be not performed correctly. For standard buttons
we have to send correct response to the dialog.

Change-Id: Ib4d42e53f4789bd12ad83404796f6d7a4ce19ef4
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-11 12:32:41 +01:00
Szymon Kłos
2105c11bee jsdialog: don't leave focus if dialog opened
+ if jsdialog or tunneled dialog is open
  don't steal focus by CellCursor state update

Change-Id: I425ee5e0a96521d8fbdc5dd235defe247f2cf9cb
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-11 12:32:41 +01:00
Szymon Kłos
b7c6682a24 jsdialog: send entry text on keypress
Change-Id: Iac3361ccc164fe6ed7ef2eb6229588e159bc8ccd
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-11 12:32:41 +01:00
Szymon Kłos
1df38361d7 Add fontwork also in calc
Change-Id: I80821e25f78f8d90387faf54d31c1889773a3666
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-11 12:32:41 +01:00
Szymon Kłos
7c2f1d06eb Don't apply invalid canvas split position
When eg. Statistics -> Sampling dialog was opened
we received empty split position what caused to
setup NaN for split pos and no rendering at all

Change-Id: I4bd37778d23b15a01f1850459924c66f437f1570
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-11 12:32:41 +01:00
Szymon Kłos
312b934f62 notebookbar: enable defining names in calc
as it is in the release branch already

Change-Id: I695660d788842bc34aff8b2735bf6f9d36ecf79c
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-11 12:32:41 +01:00
Pedro Pinto Silva
6896f58ac7 Ignore CanvasOverlay.js
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I3a04b85558155e060bd0ed8ae67508d4a42afbfa
2021-02-11 11:46:18 +01:00
Dennis Francis
59bb3226c0 use CBounds.isValid() to check for empty bounds
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I5a93cc77d09dab8d53705e906dcbd942d5da7c89
2021-02-11 14:26:01 +05:30
Dennis Francis
c477faea45 source cursor/selections style data from CSS vars
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Ib650ba60d38ab390ae37c3bf24e24b820bd4221e
2021-02-11 14:26:01 +05:30
Dennis Francis
afb9dfd5df add purpose comment to CSelections class
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Idd7d7a4bfd110a868b41362a59092dbf97d79be6
2021-02-11 14:26:01 +05:30
umutbayramoglu
d08fda9749 Remove unused variables
Signed-off-by: umutbayramoglu <umut265@gmail.com>
Change-Id: I7c2565a01605846201cb4a35564eb52b52491fe8
2021-02-11 02:10:34 +03:00
Gleb Popov
8727db1746 Fix build with libc++: std::min() parameters should be of the same type.
Signed-off-by: Gleb Popov <6yearold@gmail.com>
Change-Id: Icdb67f0576992cd54c8e15c85fbaf2745aba218c
2021-02-11 00:31:57 +03:00
Gökay Şatır
310bd0e234 CanvasTileLayer: Move TilesSection to a typescript file.
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I305615e0fc4d9adddb2cedc7a2860e741d467dd4
2021-02-10 19:05:15 +03:00
Gökay Şatır
91094acbf5 loleaflet: Update makefile for typescript files.
It now detects and compiles ts files in specified directories.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: Ia8a399650480001193be7177b05b5cbb195a98c7
2021-02-10 19:05:15 +03:00
Tamás Zolnai
d0deb5eaa0 wsd: filter-out redundant 'formfieldbutton' messages.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I37834c63631fa44c9d37c9e1a4d448c1fef68c9e
2021-02-10 16:51:30 +01:00
Tamás Zolnai
6aa4cdfece cypress: interfer: save before closing the document.
To avoid issues coming from the delayed autosave.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Ib98b35396efb4fdfdf84846dd23619c666accbdb
2021-02-10 16:51:30 +01:00
Pranam Lashkari
20a443c2be leaflet: fixed print shortcut not working in readonly mode
original problem was when in read only mode document container
is not in focus and that is why keyboard shortcut events were
never triggered

This solution focuses the document for composed keys to trigger
shortcuts

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I084635c5d3e61215a4e88d84271587186605133d
2021-02-10 17:17:31 +05:30
Dennis Francis
444cc5d131 clear tile section before overlay repaint
This is needed in cases where the tiles have transparent pixels in them.
For example in Writer's tiles, page borders use transparent pixels. In
this case if the tile section background is not white before we paint
tiles, the page border becomes darker.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Id35cfe2e4b22efab8f1b1fb77c4f35dd46f0d1d2
2021-02-10 15:26:14 +05:30
Dennis Francis
29b7fdf360 remove hardcoding of debug-mode calc-grid drawingOrder
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I1b074e73b5e8dd8110f66e3f639433a07c73ae57
2021-02-10 15:26:14 +05:30
Dennis Francis
088e48ecc5 skip redraw only if both current and prev bounds are not in view
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Iaa7c8efc41b77f72f1804a4c81d2ec6c6f3d1f10
2021-02-10 15:26:14 +05:30
Dennis Francis
3a40feda4a migrate text/cell-area selections to canvas overlay
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Ia9d1adb942fd0a0e1ea23805b2edbc76f9537b17
2021-02-10 15:26:14 +05:30
Dennis Francis
f242f1e654 Introduce anyRingBoundContains which is meaningful for orthogonal polygons
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I0fa487ba875f4e52228df4f89705c4bb9bb435b6
2021-02-10 15:26:14 +05:30
Dennis Francis
35d18d147f allow a pointSet/Polygon to be empty
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Id415cee8c89a89d80b21e2aa3b3e0f19514dbb3c
2021-02-10 15:26:14 +05:30
Dennis Francis
31beafb2c9 export rectanglesToPointSet util function
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Id20b2bf47863a2d8e9ade16fd009e6d9d330cf20
2021-02-10 15:26:14 +05:30
Ashod Nakashian
e6ece7dff6 wsd: add FileUrl tests
Change-Id: I7f9ba86ceb5a31f0133c0d36dee090348386ea95
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-09 10:45:37 -05:00
Ashod Nakashian
bafcc98285 wsd: support FileUrl
Change-Id: I433b5f79956be9d8557df1a1f433a99d6ae10f65
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-09 10:45:37 -05:00
Ashod Nakashian
ec58e833e8 wsd: refactor downloadStorageFileToLocal
Prepare to support FileUrl.

Change-Id: I0ac4eccb937653ba86e74c2e6cecb7ddd5dd4ffe
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-09 10:45:37 -05:00
Ashod Nakashian
f7d61ae0d3 wsd: remove single-use member
And a couple of const cases.
The removed const is to allow move on return.

Change-Id: I7a81b531e75c39379871f5ffeb82d49ba1110ab1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-09 10:45:37 -05:00
Tor Lillqvist
6dcefc4f14 Add toString()
Please do not remove even if unused. It can be useful in temporary
console.log() etc.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I2734efa3cffb8dd5e4a9923672ec179fcae3e12f
2021-02-09 17:32:46 +02:00