summaryrefslogtreecommitdiff
path: root/sw/source/uibase/wrtsh
AgeCommit message (Collapse)Author
2020-10-31tdf#135260 sw_redlinehide: fix insert-with-delete differentlyMichael Stahl
The problem with the fix for tdf#127635 is that now the cursor doesn't move left on backspace if change tracking is on. (regression from 398ba26077f9029bdf6f7378bfc9ce8376b6f02d) Revert that and fix the autocorrect position in SwWrtShell::Insert() instead. Change-Id: I5989a589b654fc6e5ba3dd66922af15eff758ecc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104280 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit be4616d6b49b8c9cf1a90b212b24ead3dabcab6c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104299 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105093 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-10-13leaflet: User may continue writing a comment after it loses focus/core part.gokaysatir
This path enables Online users to continue writing their comment after they click somewhere else in the document. Online side will remember original position of comment and it will send the cursor position when needed. When there is no cursor position, default behaviour will work. Change-Id: Ided951481af6e0ec6c930e125bec7fdf687614d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102377 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-11-07tdf#38199 Readonly mode tab key: Don't scroll if no hyperlink foundJim Raykowski
When viewing a document in readonly mode the action of the tab key is to move among Graphic, Frame, Ole, DrawObject, or DbForm if one these is already selected. If the cursor is inside an input field and has no multi selection then move among InputFields. Finally if neither the previous two cases apply then move among Hyperlinks which causes cursor position to move to top or bottom of the document when no Hyperlink is found. When no Hyperlink is found this patch restores the cursor position to the position before search and does not scroll to it on EndAction. Change-Id: I94ac882e7be124d2ddb6f86daac03a9389117cc5 Reviewed-on: https://gerrit.libreoffice.org/81955 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2019-11-05tdf#127759 Writer: add table row/column insert modeLászló Németh
using enhanced table selection. When the table rows or columns are selected by enhanced table selection, ie. clicking in front of them, next Cut operation cuts the selected rows or columns completely without leaving empty cells. Pasting them results insertion before the actual row/column instead of overwriting the actual and the next rows/columns. This greatly speeds up moving table rows and columns, like in MSO. Change-Id: I6d82ca8aad4888ab37bdb9a89d37102763fcd6c6 Reviewed-on: https://gerrit.libreoffice.org/81503 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-11-03loplugin:stringaddNoel Grandin
tweak the plugin to be more permissive, then validate by hand afterwards Change-Id: I40c5c911fe6ff7e45baaca372abf7dac211d9654 Reviewed-on: https://gerrit.libreoffice.org/81942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-31avoid intermediate vcl::WindowsCaolán McNamara
Change-Id: Ie0618107a3aee4a0d35867f3c1cf83715e7bc842 Reviewed-on: https://gerrit.libreoffice.org/81763 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-23sw: SwWrtShell: delete field command when deleting the fieldMichael Stahl
Change-Id: I6dbb7a36bdca103d6e9e72a5b5b48ffc135080a1 Reviewed-on: https://gerrit.libreoffice.org/80676 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-10-17Rename OUStringLiteral1 to OUStringCharStephan Bergmann
It started out as a wrapper around character literals, but has by now become a wrapper around arbitrary single characters. Besides updating the documentation, this change is a mechanical for i in $(git grep -Fl OUStringLiteral1); do sed -i -e s/OUStringLiteral1/OUStringChar/g "$i"; done Change-Id: I1b9eaa4b3fbc9025ce4a4bffea3db1c16188b76f Reviewed-on: https://gerrit.libreoffice.org/80892 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-11SwCursorShell argument of AttrChangedNotify is unusedCaolán McNamara
Change-Id: I1fde665dcb77d29cad7f6a5c12e82c1822cff022 Reviewed-on: https://gerrit.libreoffice.org/80621 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-02loplugin:stringadd in swNoel Grandin
Change-Id: I72e1cbc229a47660b2313f46898753e273b69d35 Reviewed-on: https://gerrit.libreoffice.org/79985 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-01Drop SfxItemIter::FirstItemMike Kaganski
It is always used right after the iterator is created, where simple GetCurItem gives the same value without reseting the position. Change-Id: I871dc7989b79e13f06436ef7928692645b5209f6 Reviewed-on: https://gerrit.libreoffice.org/79903 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-09-28loplugin:constmethod in swNoel Grandin
Change-Id: I73c3c6d2165287d2d581a04b23b1d3b48166a488 Reviewed-on: https://gerrit.libreoffice.org/79780 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-26tdf#127673 lok: On double-click, don't enter the embedded objects in Writer.Jan Holesovsky
There are all sorts of problems when we'd try to edit the embedded objects, like that that LOK thinks it is a separate view etc., so better to disable it for now, before we really need to edit embedded objects. Change-Id: Ie8c0249cb0ca8b25a2ac97c1ccec4a5a62cbb770 Reviewed-on: https://gerrit.libreoffice.org/79555 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2019-09-23Use proper which ranges to avoid resetting RES_CHRATR_RSIDMike Kaganski
Change-Id: I5be2e34e70b0381f6b5e13a375eab53172686bde Reviewed-on: https://gerrit.libreoffice.org/79387 Reviewed-by: Phil Krylov <phil.krylov@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2019-09-23Change End* order to match Start* orderMike Kaganski
Change-Id: I3e7b1e08d10dc187abda722b63c976f05c3cbfc3 Reviewed-on: https://gerrit.libreoffice.org/79380 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-09-20convert SwFieldTypesEnum to scoped enumNoel Grandin
clamp it to sal_uInt16 since we convert it that type when passing it via SfxItemSet Change-Id: I4b7bd4ba5e19015af357d5a81a629239451d71e4 Reviewed-on: https://gerrit.libreoffice.org/79289 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-22we can be less verboseCaolán McNamara
Change-Id: I3adf8299b920fc7a9a44fc65ea5d48eb123d7eee Reviewed-on: https://gerrit.libreoffice.org/77951 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-08-19uitest: pass OUString by const reference and formatting fixesMarkus Mohrhard
Change-Id: I55eca745a84998c74e2d925ed53af20382d98289
2019-08-19uitest: log more eventsAhmed ElShreif
for Calc: 1) Delete some Cells 2) Remove content from some cells 3) Insert Cells 4) Cut Cells 5) Copy Cells 6) Paste Cells 7) Merge Cells 8) Split Cell ( Delete Merge ) for Writer: 1) Insert Table 2) Copy Text 3) Cut Text 4) Paste Text 5) Inser Break Page Also, Solve some bugs in the UI logger and UNO Commands. Change-Id: Ic7cacbc20e1e400900a9760b61e8b45ae96c84ff
2019-08-15tdf#125041 fix hyperlinks to IDN websitesTünde Tóth
Revert "tdf#86087 Open relative links in Writer" This reverts commit 4b9e237850efe36f7e35d65e14d6953f1e1f3a45. The reverted commit caused a regression in the handling of internationalized domain names: these non-ASCII URLs were converted to file URIs. Change-Id: Ia481aa1199d20083b72f9f8571992e40b3fc2e77 Reviewed-on: https://gerrit.libreoffice.org/76804 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-08-15replace ".get->" with "->"Noel Grandin
Change-Id: I327a6fda1fe0170da33e06b735f09a39421c8a58 Reviewed-on: https://gerrit.libreoffice.org/77469 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-13tdf#125100 After insert of calc document as OLE object, content is shownIlhan Yesil
After inserting an OLE object, the object has to be shown with the preview of it's content. The flag for this is set in the InsertObject method. Change-Id: I9f0f362190bb9ab0bc36987cf0a6f969932544ec Reviewed-on: https://gerrit.libreoffice.org/75207 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Michael Stahl <Michael.Stahl@cib.de>
2019-08-05tdf#42949 Fix IWYU warnings in sw/source/uibase/inc/[l-z]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ie1c889bb9bd74b0d2bd859dad4c85a209db750a3 Reviewed-on: https://gerrit.libreoffice.org/76503 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-08-02Fix typosAndrea Gelmini
Change-Id: I3d1dd03022eb37609ee0dd62c4ee9cec93ac0717 Reviewed-on: https://gerrit.libreoffice.org/76813 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2019-07-20loplugin:referencecasting in swNoel Grandin
Change-Id: Ib5de4377b22815ba718559ff6fcfd6ab5a0547a6 Reviewed-on: https://gerrit.libreoffice.org/75999 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-05tdf#125863 Rework tdf#107593 so header footer delete doesn't crashJim Raykowski
Header footer delete from the last page when last page is unneeded (stack level 24 SwRootFrame::RemoveSuperfluous /// remove pages that are not needed at all) causes SwFrameMenuButtonBase::dispose() which sets m_pFrame to nullptr which causes crash when IsEmptyHeaderFooter calls GetPageFrame(). Doing ToggleHeaderFooterEdit() when header or footer deletion is accepted in SwWrtShell::ChangeHeaderOrFooter avoids the crash. SwHeaderFooterWin is also disposed which would make the GrabFocusToDocument crash if it got that far so use the shell window which is still valid here to GrabFocusToDocument. Change-Id: Iaced23e6716442671c5ea29b79be178f4fc836d3 Reviewed-on: https://gerrit.libreoffice.org/75010 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Michael Stahl <Michael.Stahl@cib.de>
2019-07-04sw comments on frames: fix comment insert for as-char frame at para startMiklos Vajna
This adapts SwWrtShell::InsertPostIt() to behave similar to commit 86fd893e32ef7a737b2c4b60e0938146b102fc07 (sw comments on frames: delete comment of frame when deleting frame, 2019-07-03), i.e. instead of hoping that the cursor will be at the end of paragraph and traveling back, just set the cursor to the remembered anchor position. This is cleaner, and as a side-effect also fixes the scenario when creating a comment on an as-char image, which happens to be at the start of the paragraph. Change-Id: Iedca0feb62242677b6e8b69ef7b813d6da72c8eb Reviewed-on: https://gerrit.libreoffice.org/75093 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-07-04sw comments on frames: delete comment of as-char frame when deleting frameMiklos Vajna
Also make sure that we only recognize postit fields as comments, not other fields. Change-Id: I31c8e5d46bb7681710734c5a0b8a26c3a70f417e Reviewed-on: https://gerrit.libreoffice.org/75072 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-07-03Fix typoAndrea Gelmini
Change-Id: I4faa2e19aee92bda2d73c83ff245871e7464d460 Reviewed-on: https://gerrit.libreoffice.org/75052 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-03sw comments on frames: delete comment of frame when deleting frameMiklos Vajna
Also group the two actions together, so only 1 undo action is visible to the user, not 2. Change-Id: Idba5a63b1653e96db4f9567a38b3f4ca740eb1df Reviewed-on: https://gerrit.libreoffice.org/75045 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-07-01sw comments on frames: fix UI to be able to annotate with at-char anchorsMiklos Vajna
We used to just comment the doc model position at the end of the paragraph of the image anchor. Change this, so that in case an at-char anchored image is commented, first we insert the comment (which creates a placeholder character), and then we set the annotation range to cover exactly that placeholder character. This results in a layout that shows a commented image. Change-Id: Ie21d62ddb9f55f3e06ee39d9eccfaa0446ce7845 Reviewed-on: https://gerrit.libreoffice.org/74957 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-06-18sw: implement inserting comments when an as-char image is selectedMiklos Vajna
Only the UI was missing in this case: creating a text selection around the placeholder character does what the user expects. Change-Id: I1068fcee3e3b6d0a6fa47b37beb1bd1b918a82df Reviewed-on: https://gerrit.libreoffice.org/74297 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-06-18sw: extract postit insert code from SwTextShell::ExecField()Miklos Vajna
Into a new SwWrtShell::InsertPostIt(), so I can reuse it in SwFrameShell. Change-Id: Ib327aed033067250f021f3857f4ba3adb8e6c597 Reviewed-on: https://gerrit.libreoffice.org/74264 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-06-12Move isIVSSelector, isCJKIVSCharacter to i18nutil/unicode.hxxStephan Bergmann
6a7db071c75609093fc3a9cbc297b8069726a33e "tdf#125497 allow backspace to remove CJK IVS" had moved these functions from sw/source/uibase/wrtsh/delete.cxx to rtl/character.hxx, but the latter appears to be a less than ideal home for them: For one, it is part of the stable URE interface, which makes it harder to maintain (e.g., later versions of Unicode have added CJK Extension C--F code blocks, which the current implementation of isCJKIVSCharacter does not reflect). And for another, besides details of legacy/ubiquitous ASCII, it only deals with the "hard" structure of Unicode (isUnicodeCodePoint, isSurrogate, etc.), not with any specific code blocks or character classifications (which can change over time). Internal i18nutil/unicode.hxx appears to be better suited. Change-Id: I88b3e4e2488411f988c1a20f79b8a58626d93dce Reviewed-on: https://gerrit.libreoffice.org/73873 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-31tdf#125372 writer, file with lots of hints very slow to open, part8Noel Grandin
Takes load time from 22s to 15.5s sw::mark::IMark does not need to be held by shared_ptr - we have one vector, which holds all marks we created, and when we remove from that vector, which remove the other references too. Change-Id: Ie6d287d9d825f7129855b64a34afa81a2ef9c378 Reviewed-on: https://gerrit.libreoffice.org/73206 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-30tdf#125497 allow backspace to remove CJK IVS.Mark Hung
Japanese users prefer to remove a CJK IVS character when pressing the backspace instead of removing the selector part of IVS. Change-Id: I4313d69ed52d82c5a7e4e4823b1da06f1d90bdad Reviewed-on: https://gerrit.libreoffice.org/72971 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
2019-05-23tdf#125447 get rid of ~ in STR_UNDO stringCaolán McNamara
Change-Id: Ifdd3df50b98641785a4b1d258092efe531e98e7d Reviewed-on: https://gerrit.libreoffice.org/72870 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-16tdf#42949 Fix IWYU warnings in include/svx/[e-g]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I861d3f0fa15ee3b7e0e830c4fac2e5794ea4071b Reviewed-on: https://gerrit.libreoffice.org/72213 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-04-26tdf#38703 i#42807 sw: stop clearing Undo stack on ToX UpdateMichael Stahl
Reverts the "fix" for i#42807 from CWS swqcore08 since there's now SwUndoUpdateIndex. Change-Id: I6e71513c4a6da57bafcbc3d57b8fa113153d6c2d Reviewed-on: https://gerrit.libreoffice.org/71324 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-04-14loplugin:sequentialassign in swNoel Grandin
Change-Id: Iec56b41dba502e438dfdc7a99385545b3efdf8c7 Reviewed-on: https://gerrit.libreoffice.org/70720 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-10tdf#124469 sw_redlinehide: fix PDF export of links to sequence fieldsMichael Stahl
Missed one call where the return value must be forwarded. (regression from 7d481f7ac1971be622520258a4b13ada29282844 and 943d9be770e550d20ca72274fa5e914d1f61e605) Change-Id: Ic405b29a1dce982bfdd81eeb5d678ceb79690bfc Reviewed-on: https://gerrit.libreoffice.org/70469 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-03-29tdf#42949 Fix IWYU warnings in include/sfx2/[n-r]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ia2bea9bd4775f4ed5ef0133971106a6c0bfdd1c0 Reviewed-on: https://gerrit.libreoffice.org/69896 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-28tdf#42949 Fix IWYU warnings in include/sfx2/[e-M]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I6e97c7ed6c0211dfafee83b9bdbea672e415fc49 Reviewed-on: https://gerrit.libreoffice.org/69715 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-27tdf#60242 remember horizontal/vertical choice in split cells dialogMartin van Zijl
Change-Id: I25f6b7c8ff6aa678b597bbede0dd1492468f2f62 Reviewed-on: https://gerrit.libreoffice.org/65606 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-03-25tdf#42949 Fix IWYU warnings in include/sfx2/[a-D]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I444cb71bc3d045072a4b1f9eed279ed7e425a0d4 Reviewed-on: https://gerrit.libreoffice.org/69481 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-22weld SwFieldDlgCaolán McNamara
Change-Id: I324a581721e01c907113bb3ab1cc91a290bd71a7 Reviewed-on: https://gerrit.libreoffice.org/69475 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-21tdf#79717 save/restore character style on selection overwritePhil Krylov
Change-Id: Ie423e72014734bc188ffb585150dcb024d377d1b Reviewed-on: https://gerrit.libreoffice.org/69323 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-13tdf#79717 save/restore character format on selection overwritePhil Krylov
Change-Id: Ic82c50d07cf4a2208a6e2956c8b9ebc4f8630b31 Reviewed-on: https://gerrit.libreoffice.org/67597 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-01-15use unique_ptr in swNoel Grandin
Change-Id: I8c472a7d363eb308e9ec78aadd7f1f20c824447b Reviewed-on: https://gerrit.libreoffice.org/66317 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-08Resolves: tdf#121940 mnemonic ends up in tooltip textCaolán McNamara
Change-Id: Ic698f23e71dbc613db2acf884fdefdeab06fde0f Reviewed-on: https://gerrit.libreoffice.org/65968 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>