Commit graph

8533 commits

Author SHA1 Message Date
Szymon Kłos
18305c8a44 Request text/html in get clipboard
Change-Id: I9096fb2470da0255722f58bdeaeba87fcae3511d
2019-08-05 21:38:01 -04:00
Szymon Kłos
d3208f9cfe Download complex content
Clipboard not set yet

Change-Id: Ic70c7b791d1248309ef4155c47da03e776ce00ec
2019-08-05 21:38:01 -04:00
Michael Meeks
729d95ec61 clipboard: use captive contenteditable to enable copy/cut on Safari.
Change-Id: Ifa3afc6e3257886beaffb20180f343dec6c41cd5
2019-08-05 21:36:49 -04:00
Marco Cecchetti
69fdd49db9 loleaflet: warning about large copy/paste only once
Change-Id: Ia957389b0a1ec242374398e1d555ebc4d3a6b2d8
2019-08-05 21:36:49 -04:00
Szymon Kłos
c564af1614 Paste text/html in IE
Change-Id: I9e9b400d9894e2689b86aaca8d0f66bf1f364b0e
2019-08-05 21:36:49 -04:00
Szymon Kłos
a9e698b1d0 IE fix: set timeout after open
Change-Id: I670d0e76a0afa22bf0e2f713b64920be9ad3214b
2019-08-05 21:36:49 -04:00
Michael Meeks
5696e3e916 clipboard: fix menu-bar copy/cut/paste via event re-emission.
Change-Id: I050767d32e376e7e0bafb354f9ef3c02acaf229a
2019-08-05 21:36:49 -04:00
Michael Meeks
1c3ff3f336 clipboard: implement the async download & re-up-load.
Change-Id: Ib6ad55568f56acc9c9bd677224472e56ce19c13e
2019-08-05 21:36:49 -04:00
Michael Meeks
bf6949bce7 clipboard: fixup short-circuit URL construction & comparison.
Also add stub text to drive downloading.

Change-Id: I957a4eb07f606147237ec759a8edba845a5e0843
2019-08-05 21:36:49 -04:00
Michael Meeks
67354ba185 clipboard: don't continually send new keys.
Change-Id: I802c4c1bd6f163fed8555e0f8fd6ffe87e48d585
2019-08-05 21:36:49 -04:00
Szymon Kłos
e259363fa6 Paste at least text/plain in IE
Change-Id: I11f0b82256e5a94a007bd39a02ba9b53e4c5f8f8
2019-08-05 21:36:49 -04:00
Szymon Kłos
3076ce0d62 Refactor cursor change
Change-Id: Id9b9a3aecf4594d8f0e0bcc5723bd37a6de9fae2
2019-08-05 21:36:49 -04:00
Michael Meeks
b3415abea0 clipboard: test two separate views' clipboards.
Change-Id: Ie6f2eeb1f1dd3c762cca847f4c77a5cd7d39f70a
2019-08-05 21:36:49 -04:00
Szymon Kłos
9d2cad1412 Set cursor to progress to not confuse the user
Change-Id: I5b3157744f8903a4bf1ee5198a1b668f960deea5
2019-08-05 21:28:58 -04:00
Szymon Kłos
6945490c21 Show progressbar on upload
Change-Id: I67a301fe196d27a73b03549969788a67c032303a
2019-08-05 21:28:54 -04:00
Szymon Kłos
08550fbce0 Move progressbar code to Clipboard.js
Change-Id: Id58136cef8bec96a6d711d7ca3cf930462408763
2019-08-05 21:28:49 -04:00
Marco Cecchetti
7f3f0f9453 loleaflet: download widget skeleton for larger copy/paste data operation
Change-Id: I64d8edc014241e94c45677185a935714b8eeb192
2019-08-05 21:28:43 -04:00
Michael Meeks
095edb28e2 Adapt to new 'getClipboard' API - works on clipboard not selection.
Vital for a working 'cut'.

Change-Id: I980a4d65ef14eb922343d1d321177a9b3e1629f3
2019-08-05 21:28:09 -04:00
Szymon Kłos
8ebb0bb930 Make request async and avoid double paste
Change-Id: I01ce55cfa6b01186b81397debf47c47f103908ea
2019-08-05 21:28:09 -04:00
Szymon Kłos
501229d939 Send uno:Paste after success of 'set clipboard'
Change-Id: I88636c87bb80fe0f2ed2f34eb3c84781821194a9
2019-08-05 21:28:09 -04:00
Szymon Kłos
610c2aaf23 Fix ParseError on valid data
Change-Id: I0706030d9933313e44ae89b92b62576dacbf7e9e
2019-08-05 21:28:09 -04:00
Szymon Kłos
7f6af05213 Sync request with clipboard parser
Allow to use multiple clipboard streams.

Change-Id: Ib98a7c1db8738145138fa3657e94c404260e4a28
2019-08-05 21:28:09 -04:00
Szymon Kłos
6533efaebd Send POST request to set clipboard
Change-Id: I1f700e142d40e266a461e573a0561518392a0555
2019-08-05 21:28:09 -04:00
Szymon Kłos
3fab8a9937 Fix crash: Send bad request when no data
Change-Id: I705c47925b1e44bf7b112325f06c915e841dab2a
2019-08-05 21:28:09 -04:00
Szymon Kłos
a2e3fdb3ae Use correct clipboard name to allow save the key
Change-Id: I47c2dfe6676ceb9ca6638c9de24bd72411ff88df
2019-08-05 21:28:09 -04:00
Szymon Kłos
dbca23ddac Fix Clipboard initialization
Change-Id: I65254de5a04a9683373edb23a4bbf7dec546ce21
2019-08-05 21:28:09 -04:00
Szymon Kłos
7ba9b09fd1 Send all available paste formats
Send as a string for now:

mimetype=xxx\n
length=xxx\n
[string content]
...

Change-Id: I648c01d86d25a88cab16294063764110bc05151f
2019-08-05 21:28:09 -04:00
Ashod Nakashian
26303bf340 Add complexselection message
Change-Id: Iecf5d96451e2548e6a44edac164096bca57139a8
2019-08-05 21:28:09 -04:00
Michael Meeks
fb2507bd3c Re-factor more of clipboard related bits into a single place.
Change-Id: Ie7392de9e63201e3c62e505c0b9292782a418fea
2019-08-05 21:23:44 -04:00
Michael Meeks
3c42f3525a Rename to clipboardkey.
Change-Id: Idba1d839e75a5525a8b0e71b9aecff17b8aa05e9
2019-08-05 21:21:45 -04:00
Michael Meeks
229ca09419 Start of separating clipboard code to Clipboard.js.
Change-Id: I59ba0c093002cb60b13d2f71a4801e76f6a94b2a
2019-08-05 21:20:21 -04:00
Ashod Nakashian
e7cec81846 Fix build - potential use before initialization
Change-Id: I5d9db13b0241af64fa8e9eb9528a6e460166f280
2019-08-05 21:18:57 -04:00
Michael Meeks
13469e8b00 clipboard - set it with a post now.
Change-Id: I6b9234988185984335408da502f479ccda8a95a7
2019-08-05 21:18:44 -04:00
Michael Meeks
15af6cf042 clipboard: test for set-clipboard endpoint (disabled).
Change-Id: I3bc31dfb231aaacc01ddd717b39abdebd26a76bb
2019-08-05 21:18:36 -04:00
Michael Meeks
4347883c65 clipboard: add more unit tests.
Change-Id: Id1841935927e451e6aa15489c303dd9f01ac21b4
2019-08-05 21:18:31 -04:00
Michael Meeks
149b861975 clipboard: a more helpful calc test.
Change-Id: Ibe0e583a2019e7bc5968dd8f73cf4e4a07d363b2
2019-08-05 21:18:27 -04:00
Michael Meeks
ba4907b791 clipboard: factor out parsing, and add checks in unit test.
Change-Id: I8c23b10769293b07cc94fdc0d6110e9d540a16b9
2019-08-05 21:18:20 -04:00
Michael Meeks
9726ce6f77 Various copy/paste fixes, unit test passing, parsing of result.
Change-Id: I9168853dd011e86896c3bd474a4d05ee82c0e336
2019-08-05 21:18:12 -04:00
Michael Meeks
c7956349f6 More work getting the unit test closer to passing.
Change-Id: If2ec0d5465a84e11dec1f5c5b9839a369b393784
2019-08-05 21:16:37 -04:00
Michael Meeks
245e509413 clipboard: start of rotating clipboard key management.
Change-Id: I8caab267ec5391e2cd7cb20907fa080111cc70dd
2019-08-05 21:16:37 -04:00
Michael Meeks
7f4a7404cc Add hard random/hex key generation utility.
Change-Id: I8bb95153a5bd63a6b41edf65a0fdf0ebd52ad070
2019-08-05 21:08:07 -04:00
Michael Meeks
4a9de331ed Unit testing - add more hooks and helpers.
Change-Id: Ieb12699e3b012606eaa0be3cc94d6f9b58adc441
2019-08-05 21:08:01 -04:00
Michael Meeks
f25d9eb10e fixup d3887f7a94
Change-Id: I26cbe5cfa226465114608d6960c6ffaec96dddbf
2019-08-05 20:48:50 -04:00
Ashod Nakashian
da455c486a Serve a decidedly unpretty clipboard download page
The initial bits to serving some page with provision
to ingest the different formats into a table.

Doesn't yet link with the actual document, but it's
a start.

The link will have some unique id(s) in it to
reference the document in question, which will
be some hash (possibly changing with some logic for
security reasons). This hash will have to be
something valid that WSD will use to locate
the DocBroker in question, connect to it and
fetch the formats supported and generate unique
links for each. When the user clicks on a link,
the contents will be downloaded in the given
format and copied to the user's clipboard.

The clipboard.html template is based on loleaflet.html
as we're very likely to use the same customization,
branding, localization, and javascript bits.

We would probably want to add a brandable title
with logo etc. and possibly some more reasable
background (ideally, an image enlarged and blured
to give the page some semblance of having content).

Change-Id: If0550184d4423bef1e98fecbb072bdf8df07701b
2019-08-05 20:26:13 -04:00
Michael Meeks
c36da1cd97 Implement getClipboard and start of a unit test.
includes Change-Id: I47d38f9285c855dcc6fbeeb73d35f22a46a30c05

Change-Id: I60b84bef1cf832ec5c191d664afd90a080b7ffbc
2019-08-05 20:25:49 -04:00
Michael Meeks
d3887f7a94 handle web clipboard request. 2019-08-05 20:06:54 -04:00
Iván Sánchez Ortega
8440e286cb Calc: Update clipboard container only on 'celladdress', not 'cellformula'
Change-Id: I5e3f4eb56447060a54751172bd9d891c88a593fe
2019-08-05 19:23:07 -04:00
Michael Meeks
8c80c08729 Add clipboard debugging to our options.
Change-Id: If0e0ced9d9a6e44cc7ba5f390604cc10fd869a52
2019-08-05 19:21:13 -04:00
Marco Cecchetti
3c3a3ee204 loleaflet: copy/paste: upload widget and cross copy/paste widged
Change-Id: I9042b8263d9af51897ed7ba7488fe6399561b965
2019-08-05 19:15:36 -04:00
Marco Cecchetti
fdc5d259ea loleaflet: download widget skeleton for larger copy/paste data operation
Change-Id: I64d8edc014241e94c45677185a935714b8eeb192
2019-08-05 19:15:28 -04:00