Commit graph

6160 commits

Author SHA1 Message Date
Pranav Kant
b4038eb442 Make eslint more strict, and fix all the problems reported
The new checks should help keep the codebase a bit cleaner from now.

Change-Id: Ib1d77af00e234b8eeb34b09beffc24b95c2eeafc
2017-12-19 18:36:26 +05:30
Pranav Kant
0dbca24c8b lokdialog: Kill JS special character dialog; use the tunneled one
Change-Id: I4f86b3d8a1a05a522eeadaac69d14965106c47d0
Reviewed-on: https://gerrit.libreoffice.org/46466
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
(cherry picked from commit 30bae27622d3b6a2aa7af2e13f5da50a89f9e91e)
2017-12-19 17:35:15 +05:30
Jan Holesovsky
5beb6f64db Update the bundled headers.
Change-Id: Ie581a50d5c46be295127a8bf4ac813169682c9ce
Reviewed-on: https://gerrit.libreoffice.org/46379
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit 081401991e12817bdcc2aba6fcd8b029f3b7d53f)
Reviewed-on: https://gerrit.libreoffice.org/46783
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2017-12-19 12:16:07 +01:00
Marco Cecchetti
5b08091a5e loleaflet: calc: corner click cause console error when there is no group
Change-Id: I6d6de4b1126294bbbbdc464cd07441e887221163
Reviewed-on: https://gerrit.libreoffice.org/46778
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2017-12-19 12:02:29 +01:00
Marco Cecchetti
62021b4f76 loleaflet: calc: removed unused function
Change-Id: I0dc6b7b60ab1af2e6d77ac8b8a79fc6ad56f68b8
Reviewed-on: https://gerrit.libreoffice.org/46745
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2017-12-19 11:57:38 +01:00
Marco Cecchetti
ba20cd1341 loleaflet: calc: wrong data in firing of updaterowcolumnheaders event
two fixes:

- wrong data in firing of updaterowcolumnheaders event (messing up
pg-up/pg-down)

- console error message about invocation of a method for an undefined
object (annotation.mark)

Change-Id: I4e7d9de38ffe18b477c99147966fd91d7a460841
Reviewed-on: https://gerrit.libreoffice.org/46744
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2017-12-19 11:57:20 +01:00
Marco Cecchetti
149acb23aa calc: fixing auto optimal size on double-click
Change-Id: I6341c617037cd876667681d4495f77e75cad8388
Reviewed-on: https://gerrit.libreoffice.org/46718
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2017-12-18 22:06:07 +01:00
Pranav Kant
0d4bc145ba Explicit is better than implicit; avoid invalid mem access
The form.get function is something like this:

const std::string& get(const std::string& abc) { return abc; }

passing a string literal implicitly gets converted to temporary
std::string whose reference is then returned and used. This causes
crash, atleast for me, on building online with GCC 7

Change-Id: I09d0aeea57a3dbeeefd1bb28ff645723714aa6b4
Reviewed-on: https://gerrit.libreoffice.org/46727
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
(cherry picked from commit 75c2147b7f774afccf55bb93f7fae79efb615361)
Reviewed-on: https://gerrit.libreoffice.org/46730
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-12-18 16:25:57 +01:00
Marco Cecchetti
971916046a calc: use cursor position for change header highlight quickier
This patch fixes also a bug: when in edit mode the header for cell A1
are highlighted

Change-Id: If97d8d151f9d216362a9b1472c2b29fbec4f9b73
Reviewed-on: https://gerrit.libreoffice.org/46536
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2017-12-16 14:18:15 +01:00
Marco Cecchetti
9e72b2257b calc: do not scroll to cell cursor when position is not changed
Old behaviour: when a cell cursor message is handled the document is
always scrolled in order to make the cell cursor visible.

New behaviour: as the old one except when the position of the cell
cursor is unchanged: in that case no scroll occurs.

Change-Id: Iee9b8e2d9fc8cb72d0292fb48a20cadeedeb015b
Reviewed-on: https://gerrit.libreoffice.org/46535
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2017-12-16 14:17:48 +01:00
Marco Cecchetti
037a2b246c missing to update a tile content
When a tile has been invalidated, and the new tile content has not yet
been fetched and in the between a `canceltiles` message occurs, the
new tile content will never be fetched;
example: a tile is invalidated but a sudden scroll to the cell cursor
position causes to move the tile out of the visible area before the
new content is fetched, so when the tile is back inside the visible
area its content would be the old invalidated one;

Change-Id: Ib5f2605490cb9b15fba146e185f683cb7b8d31b6
Reviewed-on: https://gerrit.libreoffice.org/46534
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2017-12-16 14:17:30 +01:00
Marco Cecchetti
96a2d3c36c calc: LOK_FEATURE_RANGE_ADDRESS (solving compatibility issue)
In order to make cp-5.3 compatible with online 2.1.x we introduced a
new enum which by default disables collecting the new range based
header data implementation.

This patch (re-)enable this feature on online 3.x

Change-Id: Ieab4145df9d132810bd871b1a315fd2171ba0ab5
Reviewed-on: https://gerrit.libreoffice.org/46288
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
(cherry picked from commit 2a2c04651c3a935a793f7710118b5945f6966ab0)
Reviewed-on: https://gerrit.libreoffice.org/46598
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2017-12-16 14:07:23 +01:00
Michael Meeks
864b07f5b3 Annotate string pointers in hex dumps to make sense of memory.
Change-Id: I7934ccf379dbca9862ddb911865aaeff692261bf
2017-12-15 22:45:04 +00:00
Jan Holesovsky
2ef04a6446 lokdialog: Fix RGBA vs. BGRA confusion.
Change-Id: I42ce8f46ab09e9b6684ace0627323a013831c571
Reviewed-on: https://gerrit.libreoffice.org/46564
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-12-15 17:11:05 +01:00
Pranav Kant
193cb33afc Use ctags for emacs TAGS file too
So that we can use same arguments for both. `etags` binary is also
supplied on some systems by emacs-common package which doesn't
understand ctag like arguments. Best to use one program for all.

Change-Id: I22b57a43f7688c96c9e138e5783ee4157a34a172
2017-12-15 00:22:15 +05:30
Henry Castro
0209af3ee4 loleaflet: merge comments and redlines items
Comments and Redlines were mutually exclusive, but a document
can contain both.

Change-Id: Idb13f0c0e1216edc6bed3291c0c486b45ad74b56
Reviewed-on: https://gerrit.libreoffice.org/38235
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-12-14 08:52:12 -04:00
Michael Meeks
453637e8a1 loolmap: fix assert on zero parent pages.
Change-Id: Ieeac3e5fc3746e4089d8688e96bb9dcb59ee17c5
2017-12-12 12:04:19 +00:00
Michael Meeks
44600de7c7 loolmap: implement a simple string scan and dump function.
Change-Id: I056f764c99f977a0178105511dfd5406ea6dbfa5
2017-12-11 21:53:40 +00:00
Michael Meeks
7dcd2ddd90 loolmap: share some /proc opening pieces.
Change-Id: I2d8b6eeec4afad52f74153c3d7ac904dfcb5db8f
2017-12-11 21:53:40 +00:00
Michael Meeks
50cdc16884 loolmap: store address space mappings.
Change-Id: I30b61ed8407996923f07368263bc8b773dfdc061
2017-12-11 21:53:40 +00:00
Jan Holesovsky
73d7aee2ac Fix an assert.
Change-Id: I5825a19740c0fa46c6cd14f067d0c1d3927c0c0b
Reviewed-on: https://gerrit.libreoffice.org/46236
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-12-11 15:28:19 +01:00
Miklos Vajna
a597fa9a47 loolmap: clean up dead assignment
style gets re-assigned on all paths below.

Change-Id: I4164f745c00e39b82410820cffe4682c079fd741
Reviewed-on: https://gerrit.libreoffice.org/46211
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-12-11 09:49:51 +01:00
Marco Cecchetti
c56bf54193 loleaflet: calc: some small fixes
- the very last col/row (CTRL+RIGHT/DOWN) had no header
- in some cases DataImpl.getNext() didn't catch that there was no more
header ranges
- parent group of a collapsed group spanning exactly the same range
was not drawn correctly
- removed some console.log code lines
- fixed some typos

Change-Id: I083171c09288081592477d889016910e416ab5b3
Reviewed-on: https://gerrit.libreoffice.org/45787
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2017-12-10 22:51:12 +01:00
Pranav Kant
1333d21753 lokdialog: fix cursor_visible status in dialogs
Change-Id: I4c96a05911df29207c9280c3835dbdd7e72a1e80
2017-12-09 00:33:42 +05:30
Aditya Dewan
3d23119399 no text selection when ruler interactions are happening
Change-Id: Id3628f407067506ddf6ce2e2dd2587bd2e35ddbc
Reviewed-on: https://gerrit.libreoffice.org/46040
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-12-08 18:14:27 +01:00
Henry Castro
c635fce623 loleaflet: add Header/Footer menu
Change-Id: I2a2a8702e9b038292915d859009376463bef5838
Reviewed-on: https://gerrit.libreoffice.org/39841
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: Henry Castro <hcastro@collabora.com>
2017-12-08 18:11:14 +01:00
Henry Castro
595f28c067 loleaflet: .uno:DocumentRepair state is reported by LOKit
Change-Id: I457c607055bfde8ec68c81cf3b9b2f5a80a4b345
Reviewed-on: https://gerrit.libreoffice.org/39376
Reviewed-by: Henry Castro <hcastro@collabora.com>
Tested-by: Henry Castro <hcastro@collabora.com>
2017-12-07 19:15:00 +01:00
Aditya Dewan
a508d5b490 Disable interactive ruler for readonly docs
Change-Id: I7982387d5dd913dd5e4ca5ff5d188ad0eed00fa6
Reviewed-on: https://gerrit.libreoffice.org/45962
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-12-07 14:26:11 +01:00
Pranav Kant
8ac82593ec Remove special type, 'dialog', from Menubar items
Treat all commands as UNO commands only. I see no advantange of keeping
a separate 'dialog' type if all dialogs are opened by UNO Commands only.
There was a need earlier before we had a separate "created" callback,
but this is unnecessary now.

Change-Id: Ibea8cc1f24819597ddf2c49f3b8a47072e04e637
2017-12-06 17:21:42 +05:30
Pranav Kant
13144cbc8f Add elipsis to dialogs in menubar
And change 'Spelling & Grammar' to 'Spelling...' to match with latest
desktop UI names.

Change-Id: I51000e93c7dd6e60d31b11b731d9d5427fea271b
2017-12-06 17:05:29 +05:30
Pranav Kant
ba7cc8d68b lokdialog: Restructure menubar a bit; make it like desktop version
Change-Id: I75032e8ac321b8c8d41825eaaea7897ae7eea6d6
2017-12-06 16:40:06 +05:30
Henry Castro
ad4103eb49 loleaflet: fix comments that are cut off at the bottom of the page
Change-Id: Idadaa0dfcd4f3c9f02e8878d243b5d3e34087606
2017-12-05 08:34:25 -04:00
Pranav Kant
155b3131fc Fix build; -Wunused-var
Change-Id: Iba03c7b64188c89d668aac07365fd8c706eeefdd
2017-12-05 09:38:04 +05:30
Michael Meeks
e11794da25 Disable delta generator for now.
Change-Id: I7aee52b5dc0dc0b09868170e50afc8ccb0e2f7b6
2017-12-04 22:01:16 +00:00
Michael Meeks
73327ce2ec loolmap: more cleanup print more metrics.
Change-Id: Ie6d82222a5d8960a317ea22d0628e6250330bbc7
2017-12-04 21:55:14 +00:00
Pranav Kant
a5d4c3bb90 lokdialog: Set view id before posting to LOK dialog api
Change-Id: I53925a71718f1acfc2337f86f97f4f5526546383
2017-12-05 02:39:26 +05:30
Pranav Kant
53fc694a3c lokdialog: Use dialog close LOK API when user clicks 'X'
Change-Id: I3a90eb8b83688eed7db8228763633e31f82e58d1
2017-12-05 00:41:19 +05:30
Pranav Kant
fc432c85ea Update bundled headers
Change-Id: I15c60a5b9f6c61d5ab276fc08058f89bca272f4e
2017-12-04 22:16:07 +05:30
Pranav Kant
849eb0d500 lokdialog: Adapt to LOK dialog API changes
Change-Id: I653304e71573eb253e09a72bc87d54b8554ba7ff
2017-12-04 22:13:50 +05:30
Pranav Kant
99a7f1f992 Fix build; no operator== on std::stringstream
I guess we wanted to match strings there.

Change-Id: I5b76435144ce931718cc758963e79de7d0f5a9ea
2017-12-04 19:04:25 +05:30
Pranav Kant
245cb007af lokdialog: Add FormatCellDialog, EditStyle dialog commands to menubar
There is no exact menubar header as in calc, impress desktop version and
it doesn't look nice to create a new menubar header just for these
commands. So adjust them in most appropriate menubar headers for now.

Change-Id: Id52a2946904f0031168dcffcd0ab445f1a07a5bb
2017-12-04 18:53:40 +05:30
Marco Cecchetti
1943c4b8f1 loleaflet: calc: fix styles fetching in browsers different from Chrome
'font', 'border-width', 'border-color' are shortcut properties that
are available on Chrome but not on other browsers such as Firefox or
Edge.

Change-Id: I22d2a3db87b9d6f888bd345e06e605530358be51
Reviewed-on: https://gerrit.libreoffice.org/45665
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2017-12-04 11:54:00 +01:00
Michael Meeks
886a8a7ab8 loolmap - improve page annotation, and page diffs, count dirty bytes.
Change-Id: Iaaae8fca2bdd11961682d6f8dafa38e4ca51c44c
2017-12-01 17:39:28 +00:00
Marco Cecchetti
29a233e5a9 calc: set outline state
use a specific message from the client for set the visibility state of
a group instead of hijacking the update row/column header message

Change-Id: I69d66b30db0b4d8a0082cbd2524120491d4f97cb
Reviewed-on: https://gerrit.libreoffice.org/45446
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2017-12-01 01:10:43 +01:00
Michael Meeks
26876e6165 loolmap - read the parent's page data for unshared pages too.
Change-Id: I23bb319fa4694638efc82c7af86224d2e041160c
2017-11-30 13:33:25 +00:00
Jan Holesovsky
5032529cb9 Don't crash when ssl.cipher_list is not present in loolwsd.xml.
Change-Id: I3834550328ebd8627fc130c6ac2d0fccd2505311
Reviewed-on: https://gerrit.libreoffice.org/45525
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-11-29 20:07:40 +01:00
Pranav Kant
87e5d25471 lokdialog: Add some initial spreadsheet, presentation dialogs
Change-Id: I726601533cc8a33d912d42284d5585710036a817
2017-11-29 19:15:07 +05:30
Pranav Kant
c6a69901fa lokdialog: Kill Find&Replace js code; add/remove dialogs for writer
Change-Id: I3a7bb1ffdb4f50776868fee6eade44f194d290e0
2017-11-29 19:14:55 +05:30
Marco Cecchetti
550de38648 calc: outline and groups handling
Change-Id: Ie7dcb9a742344e6b0a8813faebc589167a457261
Reviewed-on: https://gerrit.libreoffice.org/45360
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2017-11-29 12:42:53 +01:00
Marco Cecchetti
94591b22f2 loleaflet: sc: handle header data subdiveded in ranges
Change-Id: I54b8bc80af91414d8a804e54a478a2eb452510e3
Reviewed-on: https://gerrit.libreoffice.org/44674
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2017-11-29 12:42:29 +01:00