Commit Graph

2574 Commits (master)

Author SHA1 Message Date
Szymon Kłos 0a9b7b6b82 jsdialog: move About dialog to separate file
- converted to TS
- will be later extended with additional functionality

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I883da61018808d79d616d7346e86dadf9fa7079e
2024-06-01 07:48:48 +02:00
Gökay Şatır f846e66c4b Text selections handles should be active when there is a text selection.
That condition shouldn't be checked before scrolling to selection position.

This fixes "doesn't scroll to searched text" issue.

Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I9f901ba2fa15ade5416ad68f62e356e34163c641
2024-06-01 07:48:25 +02:00
Pedro Pinto Silva cc8febf7fa Toolitem: Set Clear direct formatting btns with the same css class
Before this commit:
- Impress on tabbed and compact view didn't have the common (and in
used in the other apps) 'unoResetAttributes' css class

Set all with the same CSS class so integrators with customizations
are not force to single out special cases.

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I82deb98a628b527470fcd2e54f1374df21380bfa
2024-05-31 11:56:48 +01:00
Szymon Kłos 11682f1fc8 Calc: fix following editor on different sheet
If we follow user who does editing on other part - we need to
switch to it first. Whitout that we failed with error in the
browser console due to missing marker on the screen.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I3d4150f5c8f70240d3a386a8d5a7fdbc4e8d37d9
2024-05-30 19:56:48 +02:00
Szymon Kłos bf32a3f5dc Move following state to the app docstate
- avoid using fields manually, use helper functions
  to keep correct state transitions

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Iad466ab00b256c86eebf9da2609edc68513e988c
2024-05-30 19:56:48 +02:00
Caolán McNamara d96a5a0421 dynamically change slurp timeout
as if the pending one was launched with the new delay priority
initially

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ie5553492c52baaedbd84dc1450328ce8c3b623bb
2024-05-30 17:30:48 +02:00
Caolán McNamara 0beeaafb46 don't warn about the self trigger of invaldatetiles: EMPTY
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ia3232aa18605a2b5ba4a957b961b21eb0d13b00d
2024-05-30 17:30:48 +02:00
Caolán McNamara 4d86fede5c fix up a little
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I7cc1bb2c941878420ecffcdb177c0701ba99e244
2024-05-30 17:30:48 +02:00
Michael Meeks 7ae880289d project how many tiles we are waiting for while slurping.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I464843eefaa2422ab5119e07ee4a9cb7418062f2
2024-05-30 17:30:48 +02:00
Gülşah Köse 8cd1245efa Implement Invert background color button
Button invokes the uno:InvertBackground command than user can
see the inverted document color even app is dark mode.

Signed-off-by: Gülşah Köse <gulsah.kose@collabora.com>
Change-Id: Ie273ec4b3d26ffbc38384dc39943b8656e4364d4
2024-05-30 11:20:26 +01:00
Gülşah Köse 963ed8ce01 Revert "Hide Invert Background button until implementation"
This reverts commit a73991b7f3.

Signed-off-by: Gülşah Köse <gulsah.kose@collabora.com>
Change-Id: Ib4bc64ab71f6a6f57dc1f1c1faf359455e58b529
2024-05-30 11:20:26 +01:00
Hubert Figuière 7b9b62b7a3 draw/impress: Added the convert curve command
It is .uno:ChangeBezier
See https://github.com/CollaboraOnline/online/issues/9174

Requires https://gerrit.libreoffice.org/c/core/+/168170

Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I96b8e04ac41a803446e11ae44fb6d19a2b2b0bf1
2024-05-30 05:59:22 -04:00
Henry Castro 2ac4797305 browser: fix removing new comment
1) User1 start resizing row/column
2) User2 create a new annotation
3) User1 finish resizing row/column
4) Server update comment position
5) User2 new annotation is hidden

if comment is new, do not hide when updating new comment data.

Change-Id: I593dff167f75cc3dc451467a7d76a09f94a3a556
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-05-29 08:55:01 -04:00
Parth Raiyani 7f0c21410e Toolbar: fix hyperlink protocol preservation
Signed-off-by: Parth Raiyani <pmr642001@gmail.com>
Change-Id: I0fdabc20a5f5f0f0db3f47b935968aa46bdcebeb
2024-05-28 20:09:34 +02:00
Parth Raiyani 6186c6d536 Toolbar: Fix broken urls and auto-focus on modal open
Signed-off-by: Parth Raiyani <pmr642001@gmail.com>
Change-Id: Ife153056b3dccb64b66a614c37532c59690bd792
2024-05-28 20:09:34 +02:00
Méven Car b784919bb2 UiManager: default to notebookbar by default
In case of misconfiguration (missing userInterfaceMode), deprecated "classic" or "default" userInterfaceMode, which is the default, use notebookbar.

Users can still use "compact" as documented to use the compact style
(formerly called classic).

Signed-off-by: Méven Car <meven.car@collabora.com>
Change-Id: I00ee65edb21fcf80724bc83f947341dfdc5c8ed6
2024-05-28 15:45:44 +01:00
Skyler Grey e5070e7718 fix(desktop): Prevent zoom view jump
Previously, zooming using the +/- zoom buttons caused your view to jump
such that alternating in/out zooms would move you to the top left of the
document

Additionally, the zoom did not zoom around the correct position, so a
cursor in the frame would not correctly zoom around the cursor

This is now fixed

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: I6d468795abbb972174774cf1620cb4a0959142f2
2024-05-28 13:57:41 +00:00
Bayram Çiçek 42c044dbdf add AutoFill contextmenu items
- remove Control.AutoFillOptions.ts & cleanup
- added AutoFill contextmenu items
  - Copy Cells
  - Fill Series
- add 'AutoFill':{spreadsheet:{menu:_('Auto Fill'),},}
- remove LOK_CALLBACK_CELL_ACTIONS

Signed-off-by: Bayram Çiçek <bayram.cicek@collabora.com>
Change-Id: Ib64f6078ec50c994da3ed188910cba258adfe3fa
2024-05-28 14:07:09 +02:00
Bayram Çiçek 84802577d3 remove isAutoFillFromOnMouseUp and add LOK callback
- we don't depend on OnMouseUp event of AutoFillMarkerSection.ts anymore
which makes the popup more stable in terms of open and close.
- requires: added LOK_CALLBACK_CELL_ACTIONS with
  https://gerrit.libreoffice.org/c/core/+/168086 - 1cf2a23c7cb0a149562635432b003164059617b5

Signed-off-by: Bayram Çiçek <bayram.cicek@collabora.com>
Change-Id: I2294f6aa091231c2ddf1a448776f51a3a892b646
2024-05-28 14:07:09 +02:00
Bayram Çiçek 56ae33dd34 make instance.isAutofilter false for autoFillPopup
- create instance.isAutoFillPopup
- change closeAutoFilterDialogsOnTabChange() to closePopupsOnTabChange()

Signed-off-by: Bayram Çiçek <bayram.cicek@collabora.com>
Change-Id: I32c5d26f8567a156ff0e94bc6ff1ff5bdf7be8b3
2024-05-28 14:07:09 +02:00
Bayram Çiçek 03bee87129 remove undo call and refactoring
- undo uno calls are removed: no need
- unified the popup operations with _handleKeyDownForPopup()
- make popup entries translatable
- add explanation for AutoFill

Signed-off-by: Bayram Çiçek <bayram.cicek@collabora.com>
Change-Id: I69935150597c90851c3d731b42b1adf072ae29cd
2024-05-28 14:07:09 +02:00
Bayram Çiçek b7da4e5a9d close AutoFill popup on contextmenu operations
- remove unnecessary "this._map.fire('closeautofillpopup')" calls
- refactoring
- close AutoFill popup on some contextmenu entries from sheet tabs
  - insert sheet before/after
  - delete / hide / show sheet

Signed-off-by: Bayram Çiçek <bayram.cicek@collabora.com>
Change-Id: Ie5d28addd00985f7b0335a66457da2451250e057
(cherry picked from commit 63827dcd32)
2024-05-28 14:07:09 +02:00
Bayram Çiçek b8c55589b4 add Esc and ArrowDown key support
- Esc key to close AutoFillPopup
- ArrowDown to focus elements inside AutoFillPopup
- ArrowDown/Up to cycle inside the popup

- also remove "this._map.fire('closeautofillpopup')" from
"Ctrl + Alt + PageUp/Down" since we don't need to close
AutoFill popup anymore here as we close the popup immediately
after pressing "Ctrl" key

Signed-off-by: Bayram Çiçek <bayram.cicek@collabora.com>
Change-Id: Iac4bbd1104f3140bd47842daaae2eb3bfa87daef
(cherry picked from commit 6ab88d7bf3)
2024-05-28 14:07:09 +02:00
Bayram Çiçek 0d87c761fc make AutoFill work with .uno:AutoFill
requires: https://gerrit.libreoffice.org/c/core/+/167726
5ab9b63e6624947a6076a01f9bab0d7a925e0e40

Copy cells
- this.map.sendUnoCommand('.uno:AutoFill?Copy:bool=true');

Fill series
- this.map.sendUnoCommand('.uno:AutoFill?Copy:bool=false');

Signed-off-by: Bayram Çiçek <bayram.cicek@collabora.com>
Change-Id: I40551e4323997c8de6997483b0cff239cb8d2ec4
(cherry picked from commit fad20b12a6)
2024-05-28 14:07:09 +02:00
Bayram Çiçek 378c27b998 add functionality for AutoFill Options
Added functionalities for "Copy cells" and "Fill series".

- Copy cells
this.map.sendUnoCommand('.uno:FillSeries?FillStep:string=0')

- Fill series
this.map.sendUnoCommand('.uno:FillSeries?FillStep:string=1')

Signed-off-by: Bayram Çiçek <bayram.cicek@collabora.com>
Change-Id: I77a3512627e35f2a176b147d3f54f08c7f5f7b08
(cherry picked from commit 77c1764fb3)
2024-05-28 14:07:09 +02:00
Bayram Çiçek 2e4caadd05 close AutoFill popup on tab change
close AutoFill popup when
- sheet tab is clicked
- new sheet is inserted
- sheet tab is switched using Ctrl+Alt+PageUp/PageDown
keyboard shortcuts

Signed-off-by: Bayram Çiçek <bayram.cicek@collabora.com>
Change-Id: I03711d202b47813d101bd066db1a3e8e106430e3
(cherry picked from commit 8529063378)
2024-05-28 14:07:09 +02:00
Bayram Çiçek 5b7f27f1e4 add auto fill popup UI
AutoFill popup has two options:
- Copy cells
- Fill series

Signed-off-by: Bayram Çiçek <bayram.cicek@collabora.com>
Change-Id: I08ad88afad1bb6bd2d746a9a8964f1b4446ae7c7
(cherry picked from commit 91f080976f)
2024-05-28 14:07:09 +02:00
Darshan-upadhyay1110 3591fba03e Fix state update of input element
- Input elements in jsDialog does not change state after CORE update message
- this is because in previous commits we changed input element structure.
- we should Synchronize the child elements with parent.
- this patch will Synchronize disable state of parent with it's child elements

Change-Id: Ice94de732dc7392f3c79100e6a2d60480294eb0e
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
2024-05-28 13:28:18 +02:00
Darshan-upadhyay1110 bb15a1d05a Close mobile icon should be hidden in desktop
- if we switch to compact mode & server get reconnected some icons are visible in desktop which should be only visible in mobile view.
- in control.toolbar.js we call updateItem method for icon in mobile
    - `toolbar.updateItem({id: 'closemobile', type: 'customtoolitem', w2icon: 'editmode'});`
- after this updateItem call we should also check all condition about that item like
        - item should be visible in mobile or not
        - item should be available in tablet or not etc etc
- this patch will do that checks
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>

Change-Id: I11adc3d94cacd4afe85e177d050ccc73f3112872
2024-05-28 13:19:49 +02:00
Pedro Pinto Silva 449b35b64c Color pickers: Fix image size and alignment
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ib4391a2dce205928309c94b86ad7c8e759eaffa1
2024-05-27 15:01:10 +01:00
Szymon Kłos 0dd2c55adc jsdialog: add queue for snackbars
Snackbars will appear one after other now.
Add forgotten SnackbarController to Makefile.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Iaf5ed98f8384c2688adc9653948137f23fb0ce3e
2024-05-27 13:45:08 +02:00
Darshan-upadhyay1110 5c7ee9e0c3 Replace ruler height hard coded value with css-variable
- Replacing the height value with the CSS variable will help maintain better consistency.
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I0627778919885c8ee0a989f0b47b976304892585
2024-05-24 21:10:52 +05:30
Szymon Kłos 34850e7bbd jsdialog: create separate controller for snackbar
Reduce size of UIManager and also it will make it possible
to add queue of snackbars to show.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I221049f48f471d85795ede7922a668eef4c7f0df
2024-05-24 16:20:39 +02:00
Szymon Kłos 500997fdd9 jsdialog: move types into single file
To deduplicate definitions

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I3c542e192f31ece69cff08cae5dd61e32b478420
2024-05-24 16:20:39 +02:00
Darshan-upadhyay1110 0a9968a074 Handle case for items only available in dark mode
- we have now some uno item present only in dark mode.
- so there is no resone to check image exist or not for light mode.
- we will set dummy url for those image elements.
- this patch will consider those items and will not throw error if icons are not present light mode
- Example: please see `invertbackground` item in view tab after change to dark mode
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>

Change-Id: I6aa2fc9d7bdd356617a808f17d14f77bc8453496
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
2024-05-24 11:48:27 +01:00
Darshan-upadhyay1110 8396afa1af Statusbar: Set image to false for zoom menubutton
- `zoom` menubutton is not a image to represent so we will make `image: false`
- this pathc will fix image not found error for `lc_zoom.svg`
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I39c2d68f4b0afc7b3831c2082be2ae1a315b2d8e
2024-05-24 11:48:27 +01:00
Pedro Pinto Silva 9c766bb9ee Comment: Add missing icon alias and remove unnecessary duplicates
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ie1ea6e5be762ee5d1650cf8ccb0a408ce6340c08
2024-05-24 11:48:27 +01:00
Rashesh Padia b9ef48310e mobile: add save progress bar on top toolbar
Signed-off-by: Rashesh Padia <rashesh.padia@collabora.com>
Change-Id: I14c8a715e922d00b2cfd8f67afd7fc2df2dd9d38
2024-05-24 09:16:39 +01:00
Darshan-upadhyay1110 b9bef83487 Change vertical ruler code to typscript
- remove use of Leaflet's
- change working js code to ts
- please check above commit messages for understanding of implementation.
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: Iee222bbdb343730014260c1785a90e68c6dedfd1
2024-05-24 08:56:03 +02:00
Darshan-upadhyay1110 c25e8d78cc Reset Top/Bottom values of page margin if view section changes
- we are string previous response values of top/bottom margin
- resone is because we need that values to pass after dragEnd.
- but if we change section foucs from Header to Footer or Text area to Shape then we need to reset that old values with the incoming response
- this patch will do that.
- for `table` we will hide the marker as we do not need that. table already have there marker to resize.

- added some edge cases like if start marker goes beyond end marker
- start and end marker should not cross limit beyond page top/bottom

Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>

Change-Id: Iffd3cbf08806666b858d9c3da7ca6362085223dd
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
2024-05-24 08:56:03 +02:00
Darshan-upadhyay1110 c3c7caaf0b Set upper and lower margin after drag in vertical ruler
- Send Upeer and Lower space value for header and footer according to drag
- we need to send both values in core.
- even if we drag either upper or lower we will send values accordingly but both values should be updated

Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I4ef3287c5afe6e1eef5aac225d3c06ca9d1fd9e5
2024-05-24 08:56:03 +02:00
Darshan-upadhyay1110 4a13987fdd Add markers to vertical ruler.
- As we do for horizontal ruler we need marker that will change margin of Header and Footer of the document
- current patch will have design where user can see markers in vertical ruler
- you can drag and change potition of marker.

Improvments that still need to do:
- user can drag but it will not change size/margin of header/Footer
- next we will pass info to CORE according to corrdinates we got from drag
- it will update text potition on document

Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>

Change-Id: I9663a75d5c84eace784266c76be12abd762434bb
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
2024-05-24 08:56:03 +02:00
Darshan-upadhyay1110 d41d73382d Add pageoffset calculation for vertical ruler
- Before this commit vertical ruler stays only in first page
- if we jum to page 2,3 so and so ruler won't change it's possition
- but i have added some calculation based data we recevice from CORE
- calculation:
    - we need to consider pageoffset for vertical ruler
    - check if cursor moves to other page
    - then add total Height of previous pages.
    - for Ex: if we are at page 3 then ruler.marginInlineStart should additionally have total height ( page1Height + page2Height)
    - this will place ruler to exact possition where we want
- next : add Top and Bottom margin drag
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>

Change-Id: Ie2a2d4e5f0cfd627bcafd81230ad33b7aec280a2
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
2024-05-24 08:56:03 +02:00
Darshan-upadhyay1110 d3d7f48225 Add vertical ruler for writer
- add new LOK callback for vertical & horizontal ruler update

Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I3c0e26f22072de4612e128d58ac41b629be82807

Add vertical ruler and implement margin calculation

- Added new vertical ruler file to separate it from horizontal ruler calculation
- For vertical ruler we do not need tab stops so removed it.
- next stpe will be to implement add top and bottom margin by drag

Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I8186c874ff59571db7a75ec4c31f81fc655ef301
2024-05-24 08:56:03 +02:00
Gökay Şatır b4bc0a71c4 Problem:
* On Calc, when user starts editing a cell and uses zoom, core side sends "cursorvisible: false" message.
* This hides the cursor.
* We also hide the cursor while user is zooming in / out.
* But the core side zoom doesn't set the opacity back.

This commit fixes the input handler's visibility issue.
But the core side will continue sending the cursorvisibility message.

Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Ibf679c132f96dc3504de17d00958133bd45244fb
2024-05-22 11:53:17 +03:00
Gökay Şatır e5256c265d User app.file.textCursor.visible instead of _isCursorVisible.
Duplicate functionality removed.

Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Id0bc972d20e6974dc2671696830a55dcb35ade7a
2024-05-22 11:53:17 +03:00
Gülşah Köse a73991b7f3 Hide Invert Background button until implementation
Signed-off-by: Gülşah Köse <gulsah.kose@collabora.com>
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I061901d748641ffbb40f60e2fa03fcc31df2cd7e
2024-05-21 13:44:25 +01:00
Gökay Şatır 85b93bfb9d Fix coordinate calculation error of cell selection area.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I5f130924455cd29018baf6fbc14c1ceffd29cf46
2024-05-21 14:10:13 +03:00
Gülşah Köse 2acc5a94c9 Introduce new formula auto complete feature
When we start to type a formula in a cell eg: =S
We will see the possible function names in a popup.
If we move with "ArrowDown and ArrowUp" and enter, or direcly select a
function with mouse, function name will be automatically inserted into
cell. Then we will see the usage details of the selected function in
another dialog.

Signed-off-by: Gülşah Köse <gulsah.kose@collabora.com>
Change-Id: Ic06ca0d904770e95bb85ccdf9a73f60b7d5c5eb0
2024-05-21 12:09:20 +01:00
Rashesh Padia a6cf4eb118 zotero: fix: can't select language or store as option in citation style
- problem: in combobox widget we were always passing the
`_defaultCallback` which will send `dialogevent` to server but in
zotero's case the callback is different
- also fixes some `undefined type` errors

Signed-off-by: Rashesh Padia <rashesh.padia@collabora.com>
Change-Id: I7bd7aff6a1a3a9715123c1335ea83ab13fd7b22a
2024-05-21 16:06:27 +05:30