Commit graph

14650 commits

Author SHA1 Message Date
Gökay Şatır
6a2d9c5923 Notebookbar: Sync tile container size after collapsing / expanding tabs.
Canvas element wasn't sync with map element.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I7771f662fb9a244b2acb1d450413343f4c450b1f
2021-03-26 17:39:16 +01:00
Andras Timar
f356ab5b1d typo fixes
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Id97277cb47e5082f3a5b44709b5c9fe57d8a973c
2021-03-26 11:58:30 +01:00
Gökay Şatır
3e1eaf4631 Calc: Enable freeze-panes on mobile.
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I7d4b86b010527adb8dc110246db5d4356b1cd2d3
2021-03-26 09:57:43 +03:00
Michael Meeks
c2b11b5e5b Dump versions when we have a signal.
Change-Id: I6b1f5ac1cebdd05dd9ff9541a5418059f55841ed
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-03-25 19:46:36 +00:00
Dennis Francis
4dfdd7b3af fix: calc-desktop: noticeable prev zoom grids
Partial revert of "reduce white flicker when zooming" patch for calc
desktop case. Without this revert on zooming in desktop calc, there are
remnants of previous zoom grids on the canvas till just before the
redraw. This is very noticeable when there is a cursor active. This
needs more investigation for a correct/better fix.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I8b0b99a73188d1b79f4fd8ff035ae802703ef8fd
(cherry picked from commit 1e9e199db4ad2d969bfa0ef80e4f9da16a9fa1e6)
2021-03-25 22:37:53 +05:30
Dennis Francis
0c1ceee541 fix: avoid marker/overlays at wrong position during final animation
Move the code that makes the hidden svg-overlays/markers visible again
to after when the map view is set with final zoom.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I60aa03593b5428e6c2bb5386e1ac000b1cb23ade
(cherry picked from commit e737291fc68365cd5194d76654d6eda02b297f92)
2021-03-25 22:37:53 +05:30
Dennis Francis
0dfda44d14 reduce white flicker when zooming
Fix description:
Before this patch when zoom is changed whole canvas is cleared and the
tiles are painted. This causes a white flicker when tiles take some time
to arrive and get painted after the canvas is filled with white. To
reduce the effect only clear the tile area just before they are painted
when they arrive.

In case of writer and impress there is the complication of document
content area not being the same as the view area. So we need to still
clear the "margins" outside the content area in that case.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Ib9d6c41fee0b1624da6280f4f9e3d8f85756e375
(cherry picked from commit 577d2ceefbe0d9400924f372b1699de0e00b5495)
2021-03-25 22:37:53 +05:30
Dennis Francis
4da948e549 fix: onscreen keyboard pops up during zoomanim
Problem description:
Currently we have a fake animation after pinch zoom animation, the
keyboard pops up just after the pinch zoom ends.

Fix description:
To avoid this lets disable the text-input element for the scope of the
"fake animation + map-view setting". Rename the map state
variable from "_inZoomViewPanning" to "_ignoreCursorUpdate" and
introduce [enable|disable]textInput methods which makes the intention
clear and could be used elsewhere when we need to disable onscreen
keyboard and ignore cursor update messages.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: If49c83cd7e8172845aee362ba8b37c245fe4a946
(cherry picked from commit 939ca55d22828aedf172f7134f227de01dde3c09)
2021-03-25 22:37:53 +05:30
Dennis Francis
60dff49f32 fix: pinch zoom ends with an abrupt scale change
Fix description:

Before this patch in the final frame of the pinch zoom animation we draw
it at the 'final integral zoom' but this is perceived as a sudden jump
from the last pinch zoom factor to the final zoom. To improve the UX,
lets add a linear animation from last pinch zoom to the final integral
zoom. Meanwhile lets also initiate tile fetch for final zoom and center.
Also ensure that no tile painting or canvas clear happens while animating.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Ib542cd712704876b5164e7c6bdb9a7782b58efd9
(cherry picked from commit e790ed9439f10cd6a405e15dd6098519b74ce58f)
2021-03-25 22:37:53 +05:30
Tor Lillqvist
e3e5e28930 Remove incorrect assertion in iOS-only code
It caused a crash when opening some PDF files, for instance.

Change-Id: I85515e2e14ffac8928714d218cd2353df228ff4b
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-03-25 18:31:51 +02:00
Pedro Pinto Silva
d1031e0e45 Notebookbar: Writer: References tab: Fields: rm duplicated & fix layout
- Remove duplicated of "Field" (Fields dialog)
  - Retain bigtoolitem
  - Remove menutoolitem with label
- Fix alignment of remaining field items
  - Group it in two groups
  - Vertically so to use notebookbar space more efeciently

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I40f74dbf7818d19ddead0d7e36f1f42f3ce59032
2021-03-25 17:27:26 +01:00
Pedro Pinto Silva
2f1ad35983 Draw: Notebookbar: File tab: Stack options and add download as png
- stack odg and pdf options, allows for better placement of future options:
  - svg
  - tiff
- Add download as png and respective icon

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I81b11a79d80898aca6288cea6e4e02559d9a0c51
2021-03-25 17:27:26 +01:00
Pedro Pinto Silva
5ec75c0a2a Draw: NotebookBar: Fix Print control
- Make it as bigtoolitem instead (to be consistent with the other apps)
- Make use of command

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I801802d81ba558f3778ea31a95d183c28bc70302
2021-03-25 17:27:26 +01:00
Pedro Pinto Silva
1c2c52c291 Notebookbar: File tab: replace instead of removing ellipsis
- Safer approach
  - iteration from https://github.com/CollaboraOnline/online/pull/1767
  - in response to https://github.com/CollaboraOnline/online/pull/1767#discussion_r596834601

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: If5f3f1f2ed9b39e419911d39553df9e3fd9f19f4
2021-03-25 17:27:26 +01:00
Pedro Pinto Silva
f618744206 Notebookbar: References tab: InsertMultiIndex is too long
- Icon and label occupy a lot of horizontal space
  - Dramatic in smaller laptops
  - Limit width of that long label without increasing height

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I1e78257f0c6c166372b585b2a5a47e2811f54129
2021-03-25 17:27:26 +01:00
Pedro Pinto Silva
53196acd4f Notebookbar: File tab: Remove ellipsis from Print and _saveAs
In sequence of issue #1285:
* https://github.com/CollaboraOnline/online/issues/1285#issuecomment-764556056
  * @kendy we are actually using the right variant
  which is the one used also in core tabbed layout but it also has those
  ellipsis
* Removing the ellipsis in the most visible case (File tab) for Print...
  and Save As... shouldn't be problematic as it does not had any extra
  condition and instead just slices the string under their respective
  object's property

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I04b01d8fb8b3ecb242fa684019a293cb5aaf51b8
2021-03-25 17:27:26 +01:00
Pedro Pinto Silva
b0c3de8317 Calc: Notebookbar: Download as CSV fix alignment
New section has been wrongly back-ported and was being set inside of
existing group instead of a new one. This was resulting in a column with
3 elements and thus the whole notebookbar content was vertically
misaligned.

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I21683caf5d2d47b825b4c11eabdea98e516364e4
2021-03-25 17:27:26 +01:00
Henry Castro
3a5c56bac7 mobilewizard: check if "_docLayer" object exists
Change-Id: I875ebed7d2e8d0f8813c39a221e945988d511043
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-03-25 17:24:57 +01:00
Pedro Pinto Silva
ad26e90596 Mobile: Macro Selector: Only show ellipsis when in empty state
- Display ellipsis inside of #command element when a library is still
  not selected
	- To communicate clearly to the user that there is still stuff to be
	selected
	- But also to hide that visual (ellipsis) when there is content to show
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>

Change-Id: I5d0a1e627de9e83908c2d79e0d52abd428f0280c
2021-03-25 17:24:57 +01:00
Pedro Pinto Silva
4ac5b9d2bb Mobile: Macro Selector n Warn: Layout improvements and style..
- Warning
  - File name: Increase contrast
  - Add icon to dialog
- Make it visible when a command is selected (commands get border)
- Use consistent radius
- Use consistent colors (CSS vars)
- Add bottom border to each li so to make it clear that there are more
  elements (and that is a list) and that it can be scrolled
- Avoid fixed height for Commands list
  - it was resulting in odd extra space when a library group has only
    one macro
- Macro Name: Use ellipsis in the content until the use selects library
- Add parent id to css rules( #MacroSelectorDialog )

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I0e5aaf40e143b708104462da39b506feb29f6569
2021-03-25 17:24:57 +01:00
Pedro Pinto Silva
a0328fc627 Mobile: mobilewizard: use outline style for cancel btn
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I341d1d5f03d4582fa08f03a496aff46c56ae6bae
2021-03-25 17:24:57 +01:00
Pedro Pinto Silva
0c6bf9c28c CSS var: Add one more gray and replace instances
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I8091ebd6e720dba8b6af4c503f515899e7f5f2d1
2021-03-25 17:24:57 +01:00
Pedro Pinto Silva
2610689d10 Mobile: Hamburger Menu: do not show Run Macro when in readonly
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Id2b40f142c45e25b4af3adeaeb81490253424ead
2021-03-25 17:24:57 +01:00
Gökay Şatır
9f7e2e7344 Calc: Sync tile container size after expanding / collapsing input bar.
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I1dbe63587d9714101416dcf91726fcc40f8eedf8
2021-03-25 16:35:30 +01:00
Tor Lillqvist
5a7e467134 Allow the iOS app to open PDF files
Part of implementing https://github.com/CollaboraOnline/online/issues/1824

Change-Id: Ib1fd2626880d0bafece2a79f6bfd26616d8a61ad
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-03-25 15:12:54 +02:00
Pedro Pinto Silva
738e50d17d Notebookbar: unnobutton: no need to increase size on hover
Already been set properly with
e23bf9fb30c75228d9a435504c98eddbabc322dd

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I731ba3883144e4fb34015434fa876d06be9d96e8
2021-03-25 13:24:29 +01:00
Pedro Pinto Silva
3ad3a7cc5e Notebookbar: Increase select status of unobuttons
in the sequence of the idea started in
https://github.com/CollaboraOnline/online/pull/1212
- by adding padding to unobuttons (independent of its status)
- do not really solely on margin

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Iad3389226297b7a8504def148b5d869db936fd19
2021-03-25 13:24:29 +01:00
Tor Lillqvist
761ea64851 tdf#141217: Fix several keyboard shortcut problems on iOS
On Apple devices shortcuts like Copy, Paste, etc use the Cmd key
(also known as the ⌘ key), not the Ctrl key. We shouldn't check
KeyboardEvent.ctrlKey but e.metaKey. Introduce a function _isCtrlKey
that checks the proper property depending on platform.

That Cmd-V still doesn't work for plan text put on the pasteboard by
another app needs to be fixed in core.

Change-Id: I4e8a05afaed0bde193d00a7ded52fcebf3536b5f
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-03-25 11:01:25 +02:00
Gökay Şatır
f1aef821bd Scrollbar: Fix flickering.
Scroll bar animation was flickering after mouse leaves its area.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: Ie4d96d98dee806e6b02c8c8a23dd4eaccabbf7b0
2021-03-25 10:34:03 +03:00
Pranam Lashkari
cd1f4f6e95 leaflet: removed Obsolete property fullscreen
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Idb7742730294e6891e2971be8e63914c4985603b
2021-03-24 18:23:08 +05:30
Dennis Francis
58e207631c fix: avoid view jump after pinch zoom animation
Fix description:

The view jump is because after the zoom animation has ended, the map
center is set to the pinch center and not the last frame's center. The
patch computes the last frame's center and uses that to set the map
view's center. This only fixes the view jump and not the flicker after
the animation which is an independent issue.

Caveat:
Since we show only one discontinuous frame at the "final allowable zoom"
at the end of the zoom animation, there will be perceived view jump at
the end of the animation itself. This apparent if the user pays
attention to the contents of the document at the corners of the view
before and after the is pinch stopped. This jump is more pronounced if
the pinch zoom factor is much different from the "final-zoom".
Note: The final zoom is determined from the final pinch zoom as
var finalZoom = this._map._limitZoom(zoomDelta > 0 ? Math.ceil(this._zoom) : Math.floor(this._zoom));
--
A possible solution for this problem is to render a few frames at the
end of the animation that are closer to the "final zoom" from the where
the pinch left off.
--

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I0a6989248970aeb60acc451d9b0bc7a08a0dbf06
(cherry picked from commit 5b2daac61edb78150ad9700ce11fab8bdfb7dd27)
2021-03-24 11:49:06 +05:30
Gökay Şatır
1390411757 Socket.js: Refresh the page after a server restart.
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I81eec6d40368768ca1a53d57bfe0eb6136464b90
2021-03-23 20:46:19 +03:00
Pranam Lashkari
d0f8e5f74b leaflet: set German bold shortcut to ctrl+shift+f
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I97ff4d95250aad326b7d48635ab425045959ca5d
2021-03-23 13:41:05 +01:00
Tor Lillqvist
a51df73a95 Tweak ODF types in Info.plist, making ODF documents openable from Google Drive
Move the ODF entries for the ODF file types from the
UTExportedTypeDeclarations section to the UTImportedTypeDeclarations
section in the Info.plist. This, for some unclear reason, is necessary
to make ODF documents not appear greyed out for folders provided by
the Google Drive file provider extension. Sadly the documentation of
exact semantics of the Info.plist file leaves much to be desired.

This fixes https://github.com/CollaboraOnline/online/issues/1509

Change-Id: I7ff35cf9f6c717d1579adc7a4d7350f78d7bee8e
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-03-23 13:08:35 +02:00
Gökay Şatır
5f9d4216d3 ScrollSection.ts: Enable fade out.
When user moves cursor out of the scroll bar area or at the end of a
scrolling event, scroll bar will slowly disappear.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: Ic1c993869bdee3be342330c847b6d89e66784f69
2021-03-23 12:20:14 +03:00
Gökay Şatır
7c1cbeb385 CanvasSectionContainer: Add animation feature.
User can set stopping events, duration or they can directly stop, reset
the animation.

In order to use stoppingFunctionList, canvas element should get events.
Currently, CanvasTileLayer is calling callbacks of
CanvasSectionContainer.

So if one needs to use stoppingFunctionList, they should update _mirrorEventsFromSourceToCanvasSectionContainer
function and use "element.dispatchEvent" feature. We need this because
of leaflet.

I didn't change "_mirrorEventsFromSourceToCanvasSectionContainer"
function because it would have to be tested with different browsers. But
i tested the dispatchEvent feature in order to test
stoppingFunctionList.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: Ifb335d433af4656294223fa6c16378819abbb950
2021-03-23 12:20:14 +03:00
Ashod Nakashian
1fd0f7302b wsd: http: make writeData const
Change-Id: I43b7abd737836873300b2195b6bb8b703cc3ec64
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-22 10:09:22 -04:00
Ashod Nakashian
601b1cbd8b wsd: http: use std::move where efficient
Change-Id: Ic99ce8fd3508b496d544ac9a1459853f985165b7
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-22 10:09:22 -04:00
Ashod Nakashian
0c9283a7ae wsd: http: set date and server/agent as early as possible
Change-Id: I2856d7502f63e04138e2d615347f343280690b42
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-22 10:09:22 -04:00
Ashod Nakashian
b3f8657550 wsd: use http::Response to parse client websocket upgrade
Change-Id: I9e869fa22c7696f7ee903770579abe5f4e03d4fc
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-22 10:09:22 -04:00
Ashod Nakashian
725a3070c3 wsd: tolerate missing FinishedCallback in http::Response
And explain the use of linear search in header().

Change-Id: If6c39bffa738861d0c86684f9560ed6e4a6970e1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-22 10:09:22 -04:00
Ashod Nakashian
69436ed0f3 wsd: const correctness
Change-Id: I14118245e77d796ad494d5e576d2e2c593f6d742
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-22 10:09:22 -04:00
Ashod Nakashian
f494c27024 wsd: correct User-Agent usage in http headers
User-Agent is designed for client-side use only,
in http requests. For servers, the Server header
is designed to announce the server name and version.

This tries to normalize the use and documents
the proper intent and usage.

Change-Id: I42d68d65611cab64c45adf03fe74f9466798b093
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-22 10:09:22 -04:00
Ashod Nakashian
4bda1ff1d1 wsd: http: use writeData to serialize http::Request
Change-Id: Ib67f92c34d42d7cdb922cbfc47222040a6deb603
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-22 10:09:22 -04:00
Ashod Nakashian
40b1aa1077 wsd: add member to Socket to flush safely
In many cases we write directly to the socket
outgoing buffer directly. The only way to flush
this buffer to the socket is to use send(),
which is artificial if we don't have any more
data to pass to send().

This makes it possible to safely call flush()
and, if there is buffered data, we flush it
to the socket.

Change-Id: I025e7ba5d1898e72dd0001547e104642608ab20a
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-22 10:09:22 -04:00
Ashod Nakashian
de0358198c wsd: http: better serialization into the socket buffer directly
This adds writeData() member to write into the output
buffer of the socket directly, instead of serializing
into a string and then copying it over to the buffer.

Change-Id: I42aaa23e96a6120c738bc0bb36bc01f4ed5e70c5
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-22 10:09:22 -04:00
Ashod Nakashian
38f2707881 wsd: test: http: improve HttpRequestTests
Change-Id: Ideaf8f1cad492fda6eab57bcefefac861a05e28a
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-22 10:09:22 -04:00
Ashod Nakashian
5749d7457d wsd: http: improve StatusLine
And update unit-tests.

Change-Id: I29bcb8232c77d3c0c1fe316854417726671765f1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-22 10:09:22 -04:00
Ashod Nakashian
1f978d9b50 wsd: cleanup Poco headers
Change-Id: I1eec2301576fc2f1cde40389b1f858f80b1204c0
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-22 10:09:22 -04:00
Ashod Nakashian
b13b1e85ce wsd: http: log the hostname in warning
Change-Id: I3aa5e134002aafe2e0090e87f9e275130983450f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-22 10:09:22 -04:00