summaryrefslogtreecommitdiff
path: root/sw/sdi
AgeCommit message (Collapse)Author
2023-02-07Resolves tdf#148441 - Hide viewlayout in statusbar in preview modeHeiko Tietze
Change-Id: I255ad3b952d7b424e9ff0475798bbe0cfc57ef9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146004 Tested-by: Jenkins Reviewed-by: Rafael Lima <rafael.palma.lima@gmail.com>
2023-02-02sw, FN_UPDATE_TEXT_FORMFIELD: remove unused StateMethodMiklos Vajna
This was added in 337416dafb66ed8f930d2d69e83fae438fc85f3c (sw: add a new .uno:UpdateTextFormField UNO command, 2023-01-06), but only SwTextShell::ExecField() handles FN_UPDATE_TEXT_FORMFIELD, so the StateMethod is not needed. Change-Id: I237f82f7f3b5efa7e619576880d973d144c77b25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146474 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-26sw, FN_DELETE_TEXT_FORMFIELDS: remove unused StateMethodMiklos Vajna
FN_DELETE_TEXT_FORMFIELDS is only handled in SwTextShell::ExecField() and SwTextShell::StateField() doesn't seem to have a default handler for slots not mentioned explicitly, so this is not needed. Change-Id: I00bc3c543c44d541d352748c721be43b76965e32 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146144 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-25tdf#129905 Create toggle for Section boundariesRafael Lima
Currently in Writer it is not possible to enable/disable Section Boundaries independently from Text Boundaries (which are toggleable via View - Text Boundaries). Hence its only possible to enable/disable them together. This patch creates a new command that allows to enable/disable Section Boundaries (now in View - Section Boundaries) indepentently from Text Boundaries. Change-Id: I76981ed1a055ce8d1e0f83c3055fef75df37f019 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146077 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-01-20sw: add a new .uno:DeleteSections UNO commandMiklos Vajna
This is similiar to commit 1d6593dd799ff4eb931ffbb5338e4856fb87f77f (sw: add a new .uno:DeleteFields UNO command, 2023-01-16), but that deleted refmarks (used for e.g. Zotero citations), while this deletes sections (used for e.g. Zotero bibliography). Implement the section "unlinking" (delete the section, but not its data) by deleting the section format: that will remove the matching section node as well, but not the content nodes. Change-Id: Ib00a8f592ddbb77c5e8e08ff94bb0eebfcf7cea8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145870 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-01-18document svx.sdi with link to SDI slot config detailsJustin Luth
UI stuff is a total black box, so most of the config is just copy/pasted from a similar function, with nothing to indicate what any of it means or does. Miklos pointed me to this documentation, so I've dumped it here so that there are a few breadcrumbs pointing to the specs for what this stuff means. Change-Id: Iccbc0ff5b400328af8ae683fdcf42203e4029d48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145624 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-18sw, .uno:InsertField: add a new Wrapper parameterMiklos Vajna
This is similar to ceea8f3924f26d5f10adc41b9ea587c77c2fda74 (sw: .uno:TextFormField: add new Wrapper parameter, 2023-01-16), but that was for fieldmarks & footnotes, while this is for refmarks & footnotes. Also start a new test file as the one for the entire directory starts to grow too long. Change-Id: Ib7c0e03d6686a8a52a5691a4e2dbf97dcc2facba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145698 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-17sw: .uno:TextFormField: add new Wrapper parameterMiklos Vajna
Currently all fieldmarks are inserted into the document body unconditionally when this UNO command is dispatched. Inserting at the current cursor position makes sense, but some citation styles want to insert the actual citation as footnotes, and only have the footnote anchor at the cursor position. Fix the problem by adding a new Wrapper parameter to this UNO command: currently the only interesting value it may have is Footnote, if this is specified then first we insert a footnote and the footnote content will host the fieldmark, not the original body text. The same will be wanted for endnotes as well, but that's not yet done in this commit. Change-Id: I5c96c7dc9ddaace09b1dbc21b8f12005a2934d04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145602 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-16sw: disable AutoUpdate for many new recent field/book/refmark UNO commandsMiklos Vajna
As noted in <https://gerrit.libreoffice.org/c/core/+/145470/1#message-afe4d72912e02c6bacc63392305c3f910a354c6a>, these only make sense for commands which have a GetState() implementation (AutoUpdate will call GetState() automatically for you after an exec), and none of these commands have an explicit GetState(), so AutoUpdate=TRUE doesn't make sense for them. Change-Id: I9899c297a7b0f8c447c66b50a228bc7e1896e146 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145557 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-16sw: add a new .uno:DeleteFields UNO commandMiklos Vajna
This is similar to 40753de837b9776dd8b33e830be0cceef83f024a (sw: add a new .uno:DeleteBookmarks UNO command, 2023-01-13), but that was about deleting bookmarks matching a given prefix with their name, and this one is about reference marks (fields in general), matching a certain type & prefix with their name. Change-Id: Iec953034cd0e6875f173712b0fb10bfddf16ed3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145551 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-01-14ThemeDialog added which allows to change the theme used by the doc.Tomaž Vajngerl
ThemeDialog is a common dialog that can be used to select the theme used by the document. Currently it only implements colors but in the future also the fonts and formats (for shapes) will be adde. The IThemeColorChanger interface is used by the dialog to change the actual color values inside the document. For the writer the existing ThemeColorChanger is now implementing the interface. The dialog is accessible in Writer at Format -> Theme... in the main menu. Change-Id: I23c7dc9668cdc5427f36d604a76c433d6dbef497 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145264 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-13sw: add a new .uno:DeleteBookmarks UNO commandMiklos Vajna
This is similar to commit c68d06dfa1498f862923eaddf3e5d247650a53d5 (sw: add a new .uno:DeleteTextFormFields UNO command, 2023-01-10), but that was for fieldmarks and this is for bookmarks. The primary use-case is to specify a prefix for the name, so e.g. all Zotero-related bookmarks can be removed, but it can be also used to remove all bookmarks when no prefix is specified. Change-Id: Ifc1f666f66d9fc3f6cd055f9263f0e4f949c191d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145458 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-01-13sw: add a new .uno:UpdateField UNO commandMiklos Vajna
This is similar to commit ea208f6004770eb4b81d28e6930cd0c7bd5d8f12 (sw: add a new .uno:UpdateBookmark UNO command, 2023-01-11, but that was for the bookmark under cursor, and this is for fields (refmarks as a start). Change-Id: I3e547b668361898b7ed734ea325fdf1d74e5dbb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145427 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-01-12sw, UpdateSections: remove not needed StateMethodMiklos Vajna
SwTextShell::GetState() doesn't handle FN_UPDATE_SECTIONS at the moment, so this is unused. Noticed by Justin at <https://gerrit.libreoffice.org/c/core/+/145281/2#message-6b432c5700d3c28284c59e507be378e59859bba2>. Change-Id: If1a95aa0f1cbe83b42f720421d345a3e12f0b97b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145346 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-11sw: add a new .uno:UpdateBookmark UNO commandMiklos Vajna
It is possible to update all bookmarks (having a certain name prefix) and their contet, but one can't update the bookmark under the cursor, which is needed for Zotero citation clusters. Fix the problem by adding a new .uno:UpdateBookmark UNO command that can update the (innermost) bookmark under the current cursor. This can be implemented on top of the recently added IDocumentMarkAccess::getBookmarkFor(). The UNO command is intentionally hidden from the customize dialog since it only makes sense to invoke it from a macro / API with parameters, not interactively. Change-Id: I3e750dfb637f50716be1155a94bc986131b84f20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145351 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-01-10sw: add a new .uno:DeleteTextFormFields UNO commandMiklos Vajna
Users sometimes want to "unlink" their citations, which means deleting the fieldmarks (if fieldmarks are used to represent citations, e.g. with Zotero), which means keeping the field result as-is, but removing the field metadata and the actual field start/seprator/end characters. Do this similar to .uno:TextFormFields, which can do an update of such fieldmarks, i.e. add the ability to filter for a certain type and field command prefix. This is meant to allow removal af all fieldmark that belongs to one one feature, e.g. Zotero. This is similar to 7765b442e13048f857fd7ee49ced1731caee297e (sw: add a new .uno:TextFormFields UNO command, 2022-11-28), but this is about deleting (the field commands, not the result), while that was about updating. The same for bookmarks & refmarks are not yet supported. Change-Id: I02548b030b1822f7b36d3bc5ff9553d728f065c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145272 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-01-10sw: add a new .uno:UpdateSections commandMiklos Vajna
There was LOK API to insert a new section with provided HTML content and to query it, but there was no LOK API to update such created section with new names/contents. This is needed in case Zotero wants to store citations with refmarks, in which case it wants to store the bibliography with sections. Introduce a .uno:UpdateSections UNO command that can do this: the sections will be renamed if necessary & the content will be updated. The content update is reasonably straightforward, because the section always contains at least one empty paragraph, so there is no danger in simply deleting the old content before inserting the new one. This is similar to babba472391d26aed68d7ac31c7a918c08e65256 (sw, UpdateFields: add new TypeName, NamePrefix and Fields parameters, 2023-01-04), but that was for refmarks / citations, this is for sections / bibliography. Change-Id: Idde6d5ed1b0f25f40df502bb6b7e7ca590ef9151 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145249 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-01-09sw, .uno:InsertSection: add a new Content parameter and accept HTML thereMiklos Vajna
When Zotero uses refmarks to represent citations, then a section is used for the bibliography. While it was possible to insert refmarks with a given name & content, inserting a section with a provided HTML content was not possible. A section (and not a refmark) is needed for the bibliography, as a refmark is a text attribute, so it must start and end in the same paragraph. Fix this by adding a new, optional Content parameter to .uno:InsertSection, which allows providing multi-paragraph, formatted text. This is somewhat similar to what commit fa82e151d80d15eeb6dfae434f1dbb3b68907188 (sw, .uno:InsertBookmark: add a new BookmarkText parameter and accept HTML there, 2022-12-06) did for the bookmark case. Change-Id: I0ccbc8a765fed4e019783d0b743c1cd2d0596093 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145188 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-01-06sw: add a new .uno:UpdateTextFormField UNO commandMiklos Vajna
It is possible to update all fieldsmarks (of a certion type, of a certain field command prefix), but one can't update the fieldmark under the cursor, which is needed for Zotero citation clusters. To make this more complex, insertion inside an existing fieldmark is explicitly not wanted, see commit a178a2ac6df8dc63a7ab8d4a19b90ae8a17baca4 (sw UI: fix crash on inserting a fieldmark inside a fieldmark, 2023-01-02). Fix the problem by adding a new .uno:UpdateTextFormField UNO command that can update the (innermost) fieldmark under the current cursor. The uno command is intentionally hidden from the customize dialog since it only makes sense to invoke it from a macro / API with parameters, not interactively. Change-Id: I46fc4f701a20839945d765eb13aec7362ab83788 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145135 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-01-06tdf#86630 sw: Add one-step page number insertion wizardofftkp
Add a one-step wizard for easy insertion of the page number to the header/footer. Change-Id: Idb33c92d594e04d9256460fe414e4b10e5166af5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144683 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-06tdf#56258 svx SetOutline: convert to toggleJustin Luth
The "Outline Format" toolbar button is normally hidden. It didn't check state like the bullet and toggle numbering do. This patch adds that - so it lights up when the text contains a numbering list that matches a valid outline choice. I also added a toggle aspect to the button. Toggling ON is not great. It works fine if there is no numbering yet, but if you are in an outline and toggle off, it won't toggle back on to the same list - it starts a new one. I don't think there is much that can be done about that, since the removal delete the level information too, and outlines are all about multiple levels of numbering. The proper response to an errant toggle off is (multiple) undo(s), not toggle back on. (In the ideal world, it would popup the dropdown choices). Toggling ON does nothing when there are already bullets or numbering. The proper response is to use the dropdown if the desire is to change to an outline format. Toggling OFF is only possible when we are on a valid outline. This is extremely important because otherwise it isn't clear how to remove Outline Numbering's mix of bullets and numbers. (When the selection contains one list with both bullet and number levels, the number and bullet buttons do nothing.) Although not perfect, this is not a bad user experience, so I'm going to push the full patch to gerrit. There is one known obscure case that troubles all methods. If the selection spans multiple list definitions and ends on an un-numbered paragraph, then the toggle-on will happen. It is possible to just not do any toggling and ALWAYS show the dropdown action, but that isn't very consistent with the other related buttons. Change-Id: I6d927604e49711f1da8549be9f3dbf8b8133a06b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145061 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-01-04Related: tdf#150339 remove SID_ATTR_COLOR_STRCaolán McNamara
re: https://gerrit.libreoffice.org/c/core/+/144866 "ColorString is not needed anymore (we used that in LOK previously)." Change-Id: I50a2f0e2ad254afb8ede33b05c89ae40bfeb4d3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144967 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-04sw, UpdateFields: add new TypeName, NamePrefix and Fields parametersMiklos Vajna
Currently the .uno:InsertField command allows inserting a refmark with a provided name & content, but existing refmarks can't be updated similarly. This is a problem in case Zotero citations are to be modeled with refmarks. Another trouble is that refmarks don't have dummy characters and have to stay inside a single paragraph, so we need to be careful to replace the content in a way that keeps the refmark alive, a naive delete + insert will delete the refmark as well. Fix the problem by extending the existing .uno:UpdateFields command with 3 new optional parameters, somewhat similar to what commit 724180ec495a696c79332653cb6fb52ecfbccc29 (sw: add a new .uno:UpdateBookmarks UNO command, 2022-12-14) did. As usual, the provided new text is meant to be HTML, which allows formatted content. Change-Id: Ib0951aa1a39e1b47bcf8b47bc9d65c89e0853e96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145033 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-01-02Resolves: tdf#150339 two arguments called "Color"Caolán McNamara
from around: commit 780d83771af89e6b27b3618d9c033c3fb29ba803 Date: Mon Nov 4 17:17:58 2019 +0100 jsdialogs: .uno:Color with string argument and: commit 1144712bb99cfb699e73b473ee44351c50a35613 Date: Mon Oct 28 10:19:50 2019 +0100 jsdialogs: make possible to set .uno:BackgroundColor in Writer SvxColorItem Color SID_ATTR_CHAR_COLOR (SfxStringItem Color SID_ATTR_COLOR_STR, SvxColorItem Color SID_ATTR_CHAR_COLOR,... ^^^^^ ^^^^^ rename the most recently added to "ColorString" Change-Id: I9e00be60c768af124be7df800df4b26df83b5267 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144866 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-21sw, field insert: handle the Content param for refmarks and accept HTML thereMiklos Vajna
Creating a bookmark just to refer to it is a bit hacky, refmarks are the proper solution to that. But while .uno:InsertBookmark allows specifying custom HTML for the content of the created bookmark, there is no matching UNO command that would do the same for refmarks. Fix the problem by extending .uno:InsertField: - add a TypeName parameter, so TypeName=SetRef can be used in macros, which is more readable than Type=12 - handle the previously ignored Content parameter when creating a refmark and accept HTML there to allow rich formatting Note that unlike bookmarks, refmarks are text attributes in a text node, so in case multi-paragraph HTML would be provided, the created refmark will only cover the content till the end of the first paragraph. Also not that unlike fieldmarks and bookmarks, a refmark can only represent a reference, not a bibliography, we'll need sections for that. Change-Id: I4d95f0a6e5618f1b611f7431e9189a63ee75d349 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144646 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-12-19[API CHANGE] tdf#85592: deprecate .uno:BackColor, use .uno:CharBackColorJustin Luth
EditEngine stuff uses CharBackColor, while SW used BackColor. Deprecate the SW-only SID. What does this do? It allows the toolbar "Character Highlighting Color" to work with both body text (previously BackColor) and comment text(CharBackColor). Otherwise, the toolbar item was disabled when moving into a comment. (Shapes/Textboxes got their own formatting toolbar, so those are unaffected.) AFAIK, after this commit, SID_ATTR_CHAR_COLOR_BACKGROUND should still work fine for API calls, or for customized toolbars. That's why I didn't try to remove it completely - just deprecate. Do I know what I am doing here? No, although I'm fairly confident nontheless, and I've had some good help from reviewers. Change-Id: I0afcbdb1b91c872f6d47f3c82c573f3b9fea6dfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137334 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2022-12-16[API CHANGE] related tdf#85592: drop duplicate use of .uno:CharBackgroundExtJustin Luth
The primary purpose of CharBackgroundExt is a bool flag to indicate that the watering-can for text background coloring is active. It could also function as a synonym for BackColor in the "execute" state. A prior (NFC) commit removed internal LO use in this way, so lets drop the ability to do this altogether. I'm not sure why anyone would have selected to use CharBackgroundExt instead of .uno:BackColor in API calls. Perhaps they discovered it via LO_COLLECT_UIINFO. A google search didn't indicate any significant use or suggestion to use CharBackgroundExt. P.S. I'm also trying to deprecate BackColor and replace it with .uno:CharBackColor - which is what this bug report is actually about. Change-Id: I8d8a2aedb1af18e4a10ff09ad0dabc58e90514a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138167 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2022-12-14sw: add a new .uno:UpdateBookmarks UNO commandMiklos Vajna
Current the .uno:InsertBookmark command allows inserting a bookmark with a provided content into the document, but an existing bookmark can't be updated similarly. This is a problem in case Zotero citations are to be modeled with bookmarks. Another trouble is that bookmarks don't have dummy characters, so we need to be careful to replace the content in a way that maintains these bookmarks, a naive delete + insert will collapse them. Fix the problem by introducing a new .uno:UpdateBookmarks command, somewhat similar to what commit 7765b442e13048f857fd7ee49ced1731caee297e (sw: add a new .uno:TextFormFields UNO command, 2022-11-28) did. As usual, the provided new text is meant to be HTML, which allows multi-paragraph, formatted content. Change-Id: Id5bb3fd2fd9e147d98709b5a7e0c322e73c6d283 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144167 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-12-08sw: introduce a .uno:GotoMark commandMiklos Vajna
This is meant to be used from macros, it does the same as manually opening the navigator, selecting a given bookmark and pressing enter. It also helps debugging when you want to jump somewhere, but the surrounding document content changes, so jumping to a certain page won't work due to the changing page number. Change-Id: I3bc08ae8023997bab89cf4732fb67233a6a1e134 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143825 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-12-06sw, .uno:InsertBookmark: add a new BookmarkText parameter and accept HTML thereMiklos Vajna
There was already an UNO command to insert a new bookmark with the provided name, in a non-interactive way. What was missing is to allow specifying the bookmark text, which is to some extent not part of the bookmark, but e.g. the bookmark dialog allows editing that still. Add a new BookmarkText parameter to .uno:InsertBookmark, in case it's specified then we interpret this as HTML and we create the bookmark on the imported content, not simply at the current cursor position. This is similar to commit 1c2ef850db29beb369dcc89a58fc73416ecd9c5c (sw, .uno:TextFormField command: accept HTML in the FieldResult parameter, 2022-11-16), but that was for the field mode, while this is for the bookmark mode of Zotero. Change-Id: I4928d173e197796d40fdb53f81e84b6bfd77cdc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143736 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-11-29sw: hide TextFormFields from the customization dialog likeMiklos Vajna
Addresses <https://gerrit.libreoffice.org/c/core/+/143361/2#message-ab38e28cbdbbfe57d48bec1ce3026bb4fded60f6>, this command is meant to be invoked from macros and the LOK API, not from the UI, so hide these instead of adding a label. Change-Id: Icc17aa10db49fd2937453b3a5ceddfb368787574 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143430 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-11-28sw: add a new .uno:TextFormFields UNO commandMiklos Vajna
Currently .uno:TextFormField can be used to insert a new fieldmark, but then there is no way to update it. Also, there is no way to update several fieldmarks at the same time. Given that the "ADDON" field type in a field mark can be used by extensions like Zotero, it's useful in case these fieldmarks can be not only inserted, but they can be also updated. This works by (in the LOK case) calling getCommandValues() with .uno:TextFormFields, and then once the client generates the new expanded values, there is no way to insert these updated expanded values into the document currently. Fix this by adding a new .uno:TextFormFields UNO command that can update all fieldmarks matching a certain prefix (looking at their field command). This allows e.g. updating all Zotero citations or the bibliography, but the API is generic to support any kind of ADDON fields. Similar to insertion, the content can be multi-paragraph, formatted HTML. This required adjusting SfxUnoAnyItem::CreateDefault(), this way an UNO command parameter can be an array of beans::PropertyValues, which is how the client can provide details of multiple fieldmarks. Change-Id: I44a1b1495ead79b92ccd0c9f6412a34cbec5d68b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143361 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-11-18sw: add a menu option to enable/disable online a11y checkTomaž Vajngerl
Change-Id: I656037ef4e40e7c79daef5dd73f8f10c9818ac25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142215 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-11-17sw: improve a11y check statusbarTomaž Vajngerl
Change-Id: I86f589d6618ae80f26542cf83b6b5e3695ca35f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142193 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-11-15sw: add new FieldCode parameter for the .uno:TextFormField commandMiklos Vajna
The field code/command is the input of the field expand. Also allow setting a field result, given that the entire point of "unhandled" fieldmarks is that Writer itself doesn't know how to compute the field result / expanded string. Note that a field result can be a multi-paragraph and formatted content, so far we only allow single-paragraph plain text. Change-Id: I1739cb985d1d4ed8e45068f15a4e0d82fd118d83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142726 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-11-15sw: add accessibility check statusbar controlTomaž Vajngerl
A11y check statusbar control, which reports the current status of the online a11y check. Change-Id: I07528f39ed84136f99bc1ce07c10aa6163649305 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141605 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-11-14sw: add new FieldType parameter for the .uno:TextFormField commandMiklos Vajna
Currently LOK clients can't insert fieldmarks which are comparable to the ones Zotero's Word extension inserts into DOCX files. There is already a .uno:TextFormField UNO command to insert fieldmarks, but it has a hardcoded field type set to ODF_FORMTEXT, which is not what we need. Fix this by adding a new, optional FieldType parameter to the existing UNO command. The field code/command and the result is not yet possible to customize. Change-Id: I5625858af950f718220eebeef8fb90267693db7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142709 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-10-28tdf#142446 Show outline content up to a given outline levelJim Raykowski
This enhancement provides means to hide outline paragraphs and their so called outline content for outline levels greater than a given outline level. This can be done whether or not outline folding is enabled. Change-Id: I2769b8f39ef2bc11e03cae07c234cf345104567e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141678 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-10-12new uno command uno:Translate with deepl apiMert Tumer
New Uno command added for translation right now it is only using deepl translation api There's a section in the options > language settings for setting up the api url and auth key uno:Translate is a menu button under Format tab which will bring up Language Selection dialog for translation. DeepL can accept html as the input for translation, this new feature leverages that by exporting paragraphs/selections to html and paste them back without losing the formatting (in theory) This works good in general but we may lose formatting in very complex styled sentences. Translation works in two ways; 1) Whole document when there is no selection, it assumes that we want to translate whole document. Each paragraphs is sent one by one so that the output timeout can be minimum for each paragraph. 2) Selection Change-Id: Ia2d3ab2f6757faf565b939e1d670a7dedac33390 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140624 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-09-29tdf#151197: Remove EmojiControlKhaled Hosny
Change-Id: I7fb423727425ec42d1161f6ac5649f5cac82f12f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140651 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-23sw content controls, combo box: add insert UIMiklos Vajna
- expose the combo box case in SwWrtShell::InsertContentControl() as a new .uno:InsertComboBoxContentControl command - - add the new uno command to the default & MS-compatible menus Change-Id: Ifb1a9cede8c219d956ce438119ee789a69507679 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140468 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-08-12sw: select entry in Insert->Bookmarks dialog when called from NavigatorMichael Stahl
The context menu is called "Edit", so let's put dialog in edit mode. Change-Id: Ib3a2b164e4d6a0b93e3a5aac26125a20d41a60dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138155 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-07-26sw content controls, plain text: add insert UIMiklos Vajna
- handle the plain text case in SwWrtShell::InsertContentControl() - expose this as a new .uno:InsertPlainTextContentControl command - add the new uno command to the default & MS-compatible menus Change-Id: Ie6eb7271f2c1603fb92036e0067b1e6be70d93ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137447 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-07-05tdf#149741 Mirror insert column icons for RTL tablesMaxim Monastirsky
The usual approach of setting the respective property in *Commands.xcu won't work here, as that works with the paragraph direction, which doesn't have to be the same as the table direction. Change-Id: I9c4d49a5c553a8a74e7760d257167a0be42c89c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136818 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-07-01sw content controls: fix picture placeholdersMiklos Vajna
This went wrong in commit c321498f915f4e8b3f4853232860ce040ab48e46 (sw content controls: reject typing inside checkbox or picture content controls, 2022-06-10), now a freshly inserted picture content control is not replaced with an image on click. The problem is that we want to forbid typing into a picture content control (it should only host a single as-char image), but changing the picture's bitmap is meant to be still possible. Fix the problem by allowing SID_CHANGE_PICTURE even if the cursor is protected: this allows changing the picture again, and a real read-only document still doesn't show the "change" menu item in its context menu. If we later find some other corner-case where this command should be still disabled, we can extend SwGrfShell::GetAttrState(), similar to how e.g. inserting images in input fields is disabled there. Change-Id: I8b55e930330b9748ecda950dedae907b86c57e2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136729 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-06-16sw content controls: allow the properties dialog in read-only selMiklos Vajna
Once you enter a checkbox or picture content control, the selection is read-only to avoid loosing content the next time the content control is updated. But this means you can't launch the properties dialog to e.g. enable placeholder mode. Fix this by relaxing the restriction and allow the properties dialog on protected cursor as well, matching Word behavior. Change-Id: Ifef9af66d077682c46c852c9ecba2df5f17234fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135965 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-05-31sw content controls, date: add insert UIMiklos Vajna
- handle the date case in SwWrtShell::InsertContentControl() - expose this as a new .uno:InsertDateContentControl command - add the new uno command to the default & MS-compatible menus - hide the old .uno:DatePickerFormField from the menus that has the problems described in the sw::mark::DateFieldmark documentation. Change-Id: If3c1050d6a8302be0da4a11067a67805396dec48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135153 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-05-20sw content controls, picture: add insert UIMiklos Vajna
- handle the picture case in SwWrtShell::InsertContentControl(): insert a placeholder bitmap & create content control around the as-char image - expose this as a new .uno:InsertPictureContentControl command - add the new uno command to the default & MS-compatible menus - rename the SwWrtShell::Insert() overload taking a Graphic to make this a bit more readable Change-Id: I289d6b6a9cd622c585b6cf0ec0c91d6b51ad81ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134681 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-05-13sw content controls, dropdown: add an initial properties dialogMiklos Vajna
- read the doc model: show if a content control is a placeholder or not - work with a shared pointer in the dialog, which avoids lifetime issues in case the content control we edit in one view gets deleted in an other view - write the doc model: set the placeholder mode of the content control based on the checkbox state and mark the doc as modified if any widget is touched when pressing OK - handle command state: allow this dialog only inside content controls Change-Id: Ie0b9075ccd3450dd403cc7f8bbf93fc04de3b234 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134278 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-05-12sw content controls, dropdown: add insert UIMiklos Vajna
- introduce a SwContentControlListItem::ToString() that tries to use the display text of the list item, otherwise falls back to its value and use it while building the dropdown widget and when inserting selected list item - handle the dropdown case in SwWrtShell::InsertContentControl() - expose this as a new .uno:InsertDropdownContentControl command - mention the new and all previous content control commands in the MS-compatible forms menu as well Change-Id: I075f77933c1466b5258357d5a661e173c34de34f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134215 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins