summaryrefslogtreecommitdiff
path: root/sw/inc
AgeCommit message (Collapse)Author
2023-02-14sw: document SwAuthorityFieldMiklos Vajna
Its invariant was already documented, but it wasn't mentioned that the UI's bibliography entry is called an authority field internally. Change-Id: I55a946a5bdb59e8d6e1def54b16d0c986e531c34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146942 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-02-13tdf#152605 (tdf#137968) "heading level" -> "outline level"Seth Chaiklin
Reformulate error messages for headings whose outline levels are not in sequence. UX cleanup: Add missing periods to error messages. Change-Id: I62b8f7af79460b644fae20dd521a160907605b76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146807 Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk> Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2023-02-13sw floattable: handle table-in-fly in SwFrame::GetNextFlyLeaf()Miklos Vajna
Trying to lay out a split fly that contains a table resulted in a stack overflow. The reason for this was that SwObjectFormatter::FormatObjsAtFrame_() has a loop that will format all objects of the current fly frame, but we managed to anchor the follow fly into itself. Fix the problem by improving SwFrame::GetNextFlyLeaf(), somewhat based on how SwFrame::GetNextSctLeaf() has special cases for tables. This way once we split the fly frame, we'll try to move the follow anchor frame to the next page's body frame, and not to a child of the follow fly itself. Also add a first floattable testcase, we can already assert that the table is split correctly. Do this in a separate suite for now, since the pool's default SwFormatFlySplit is only created once, so SwFormatFlySplit::SetForce(false) doesn't have the wanted effect. The anchor's text is still on both pages, should be on page 2 only. Change-Id: Ie2ce75dbace5d9716008351aedb6a8989036badb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146854 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-02-11sw: rename getFieldmarkFor() to getInnerFieldmarkFor()Justin Luth
The same change was made for getBookmarkFor() in https://gerrit.libreoffice.org/c/core/+/145412 Because otherwise it's quite confusing that we have a For() and an At() which could only be differentiated by a code read. Also improve getInnerFieldmarkFor() a tiny bit, so we process the first hit only once. Suggested at <https://gerrit.libreoffice.org/c/core/+/145348/1#message-286262286f234823b390e8f962e3ba11f5fa71b2>. Change-Id: I47e815eea0b8ac0df4957ac0d224acb6c5975b8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145486 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-02-10tdf#153205 related: Fix selection problems caused by cursor shellJim Raykowski
push pop during insert state update This patch renames the SelectHiddenRange function to IsInHiddenRange and modifies it to take a bool argument that when true selects the hidden range if the current cursor position is in a hidden range. When the argument is false, the hidden range is not selected if the current cursor position is in a hidden range. This makes using cursor push pop unnecessary when all that is wanted to know is if the current cursor position is in a hidden range. Change-Id: I622dfaf8e73c5b432bb74a48d36433ff755542b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146725 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2023-02-09sw: fix undo comment of FN_UPDATE_TEXT_FORMFIELDMiklos Vajna
It's an update, not an insert. One has to dispatch .uno:TextFormField, then move inside the formfield with the cursor finally dispatch .uno:UpdateTextFormField to see this in action. Change-Id: Id9e3c7b9d08582cbf83f64ff04c97dff5cbb88f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146671 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-02-03sw layout xml dump: extract SwTable::dumpAsXml() from SwTableNodeMiklos Vajna
The idea is that each class only dumps itself & what it owns, otherwise the same info is dumped multiple times. Change-Id: Ib21bd2d31aa0d70d58b2b8aa453e0ede788c7144 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146511 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-02-01Resolves: tdf#152845 AutoText preview not readable in high contrast modeCaolán McNamara
if its a high contrast mode with white text on black background. Reuse isOutputToWindow to distinguish between the case we are outputting to screen but not using a vcl::Window (and want to use the appropiate color for autocolor) vs the cases we are printing or exporting to pdf and not using a vcl::Window where the color should be black. Change-Id: Ib688892a6315fe88ba585613539088611d3995ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145234 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-01sw: implement "Theme" property for the XDrawPage in WriterTomaž Vajngerl
Change-Id: I8eed04f0ccb2e626a648abcaecd957b6f62c39d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146226 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-31tdf#143148 sw: inc: Use pragma once instead of include guardsRasenkai
Change-Id: I7a491038d1b8532385e70294872d209dcdc63ce9 Signed-off-by: Rasenkai <rasenkai99@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146300 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2023-01-31sw: if the fly is to be split, then limit its growth in SwFlyFrame::Format()Miklos Vajna
It seems the first direct cause why flys are not split is because flys can grow forever, so an inner paragraph's SwContentFrame::MakeAll() will never hit the nBottomDist < 0 condition, which is necessary to call into SwFlowFrame::MoveFwd(). With this, at least nBottomDist is negative when a fly with two paragraphs is at the bottom of a page and only one of them fits the body frame. Also add a debug environment variable, so I can debug the "fly split" case till we don't have import/export filters for this. Towards an initial layout for multi-page fly frames. Change-Id: I43114b5795dd42e518a1d776ccd2e7ab607ad859 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146376 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-01-31sw: document SwTextFootnoteMiklos Vajna
It's a bit confusing that "footnote" may mean "footnote" or "footnote or endnote", depending on context. Change-Id: Ibe19dc29f68d1409feb052296e9a3537b160882e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146366 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-30loplugin:virtualdeadNoel Grandin
GetPDFAnchorStructureElementId was added in commit 6e5d59c2ca696, but was unused even there Change-Id: Id0624cac2854f5406ca93a4c495632fc3c1d0e74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146354 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-30tdf#151548 sw content controls: keyboard navigation with tab keyJustin Luth
Combine content controls with legacy formfield controls in keyboard tab navigation. MS Word (I tested 2010) is extremely irrational and inconsistent in its behaviour, so I modeled my implementation on the specification and general logic, and not at all on "compatible misbehaviour". There is a third category of form control (activeX rich content), but these are mapped to internal LO controls that are only exposed at VCL level, and don't pass the keystrokes back to SW. Plus, they are not inline, but fly controls. However, it is still a TODO to handle these if reasonably possible. Change-Id: I1fef34d05a779e9d4f549987238435acb6c043d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146219 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-30tdf#119229 docx: Set paraIdParent upon FN_REPLYParis Oplopoios
Set the paraIdParent SwPostItField attribute when replying on an existing comment in Writer Change-Id: I33d89688d5a36a91b26a64cf4b0f605d7bf33b1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145750 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-27tdf#114973 sw: enable SelectAll with hidden para at start/endMichael Stahl
If there's a hidden para the shell cursor can't be positioned in it ordinarily, so SelectAll will exclude these at the start or end of the document. There is already special code to handle a table at the start of the document body, and it's relatively simple to adapt it to handle hidden paragraphs as well. This appears to work surprisingly well, the point is at the start of the first node of the document, and moving it right immediately puts it to the first non-hidden paragraph. But it only works for paragraphs hidden by character formatting or hidden paragraph field, not if there's a hidden section - there are no (not even 0-height) SwTextFrames in hidden sections. Change-Id: Ifd3c11f4169a037fdae2c2b376d0138bec46774f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146257 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-01-25sw: support theme colors in color picker in writerTomaž Vajngerl
Implements SfxDocumentShell::GetThemeColors, which allows the color picker to use the theme colors and change them in Writer. Change-Id: Ic13d2086d4ff037b377b475630b02ed1509fdf3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146120 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.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-24related tdf#151548 formfield navigation: loop to beginning/endJustin Luth
When reaching the end of the form using keyboard navigation, the next tabstop should return the user to the beginning of the form. This patch adds that to the existing legacy formfield navigation. I'll wait with a unit test until I have added activeX/contentControls into the mix. Change-Id: I24a15a60f5a0a2721f512cca50397efddcbf7e4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146035 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-01-24sw: add document model for multi-page fly framesMiklos Vajna
Currently we can have multi-page tables and fly frames (where the content wraps around the fly frame), but not both at the same time. Allowing multi-page fly frames in general would probably go too far, but handling this in case the fly frame only contains a table would make sense to support Word's multi-page floating tables. Fix this by adding a new SwFormatFlySplit property on fly frames: this is meant to be enabled when the fly frame is part of a multi-page floating table. Unlike table split, this is off by default. Some logic will be needed later to enable this in case the fly frame originates from a Word floating table. (And obvously this is just the doc model, everything else still needs doing.) Change-Id: Id92130c684016cd7e7153e15b0ec6821e4471879 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146095 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-01-24sw: send LOK call back on refmark deletionPranam Lashkari
this helps with zotero when user deletes a refmark or use undo without this online will be unaware of any such changes made by user Signed-off-by: Pranam Lashkari <lpranam@collabora.com> Change-Id: Ia4326fd03f6b7d27fdb59ccc25d60331ba7923d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145774 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146005 Tested-by: Jenkins
2023-01-23sw doc model xml dump: show endnote info about footnote formatsMiklos Vajna
The text-attr doesn't know if this is a footnote or endnote, so let's show its format, which has this info. Change-Id: Ib36621f3206188f48e87fbc7f7899cbe2c8b4326 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146002 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-01-23tdf#153090 writerfilter,sw: DOCX/RTF import/export of TOC \c \tMichael Stahl
This is for Table of Figures/Objects/Tables. The core will happily generate entries from paragraph styles by simply setting the Template flag and adding the style name. In Word, this feature differs from ToC in that only a single paragraph style is allowed, and there is only one level to assign to so that is omitted and \t is simply the style name (presumably suffering the usual i18n disaster, see tdf#153083). So implement it with the same limitations, not reusing the CreateFromLevelParagraphStyles property on SwXDocumentIndex but instead add new property CreateFromParagraphStyle. Change-Id: Ic8ab1fa9e81bdc85cc932f6bba8724d560e0fbc1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145904 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-01-20Base SwXBodyText on WeakImplHeplerStephan Bergmann
...rather than on the deprecated WeakAggImplHelper2. It was found that that class was implementing queryInterface in a way that is incompatible with the XAggregation protocol inherited via WeakAggImplHelper2. It looks like no code actually made use of the XAggregation offered by this class, so the easiest fix for this queryInterface implementation appears to switch from WeakAggImplHelper2 to WeakImplHelper (thereby dropping XAggregation, and thus rendering the existing queryInterface implementation OK). Change-Id: Ia66e1d8f89740752d8ed69f0e17b75fa2c470f41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145893 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-20Base SwXShapeBaseClass on WeakImplHelperStephan Bergmann
...rather than on the deprecated WeakAggImplHelper6. The two classes SwXShape and SwXGroupShape, both deriving from SwXShapeBaseClass, had been found to implement their respective queryInterface in a way that is incompatible with the XAggregation protocol inherited via WeakAggImplHelper6. It looks like no code actually made use of the XAggregation offered by this class hierarchy, so the easiest fix for those queryInterface implementations appears to switch from WeakAggImplHelper6 to WeakImplHelper (thereby dropping XAggregation, and thus rendering the existing queryInterface implementations OK). Change-Id: I47dd177db7f3ddbd53482c3b4c194b6e7f15f69c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145892 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
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-20XUnoTunnel->dynamic_cast in SwXTextRangeNoel Grandin
Change-Id: I87e635f371278132be9da4e6a60ba90180d25522 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145857 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-20tdf#149073 SwNavigator: provide an indication for linked imagesJim Raykowski
Sets an image for image content entries that are of linked type Function 'InsertContent' added to replace duplicated code that inserts content. Change-Id: I25dec3f5765fa3dffe505743cd9c5fe044349ab0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145530 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2023-01-19XUnoTunnel->dynamic_cast in SwXTextRangesNoel Grandin
Change-Id: I12565dcdd1437c461762688ed3bf0e1adad828ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145827 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-19XUnoTunnel->dynamic_cast in SwXTextTableNoel Grandin
Change-Id: I18c229f31738707e4a379c9379425141ba4dc690 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145787 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-19XUnoTunnel->dynamic_cast in SwXCellRangeNoel Grandin
Change-Id: Ib2ffd8a58eb696dfa845a08f6d05fd9898ff7db8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145785 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-19XUnoTunnel->dynamic_cast in SwXTextSearchNoel Grandin
Change-Id: Id9d80bac06377018eaf768bdbd68e98b1de0666b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145782 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-19XUnoTunnel->dynamic_cast in SwXNumberingRulesNoel Grandin
Change-Id: If22cf501522115ebd87dee8580831750ea8bbbd5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145781 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-19XUnoTunnel->dynamic_cast in SwXParagraphNoel Grandin
Change-Id: Ib39e51900826b13824906c33775a8aa375955fcd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145780 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-19storing WeakReference in std::set is a bad ideaNoel Grandin
because if we allocate two things in the same location, we can subtlely lose the second one. Change-Id: I4dda5c738802da8544d280c020e059da63b5d71c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145779 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-19Fix SwFmDrawPage queryAggregationStephan Bergmann
The base SvxDrawPage uses WeakAggImplHelper7, so (for better or worse) derives from XAggregation, but SwFmDrawPage failed to properly implement the XAggregation protocol. Change-Id: Idf2c2d27cd5fb443e574cfd770091600a23c6e8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145771 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-19Fix SvxFmDrawPage et al getTypesStephan Bergmann
The implementation of SxvFmDrawPage::getTypes was presumably forgotten when e97beb270fd1a5121cdb69ffafd12ea04100e290 "NTEGRATION: CWS xmlperf02" changed SvxFmDrawPage from supporting XFormsSupplier to supporting XFormsSupplier2 (which derives from XFormsSupplier). And SwFmDrawPage uses ImplInheritanceHelper to derivefrom SvxFmDrawPage, so there should be no need to implement SwFmDrawPage::getTypes manually (and wrongly, at that, in that it included the types of SvxFmDrawPage twice, once directly via SvxFmDrawPage::getTypes(), and once indirectly via SwFmDrawPage_Base::getTypes()). Change-Id: I8c467f5a20e1f44396378abe9199851e646f6947 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145772 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-19XUnoTunnel->dynamic_cast for SwXFrameNoel Grandin
Change-Id: I48fd10781e7f09b37b6b0000f68456e8194e6d7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145761 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-19XUnoTunnel->dynamic_cast in OTextCursorHelperNoel Grandin
Change-Id: I9b0101b4f0b96c59ddbde01c7cf7f286aac2a8e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145703 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-18remove XUnoTunnel in SwChartDataSequenceNoel Grandin
we can just use the concrete type, instead of casting Change-Id: I947b45eb454328390e077654bbf677f6a0fe8a89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145740 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-18tdf#119229 docx: Preserve w15:paraIdParent attribute in commentsExtendedParis Oplopoios
w15:paraIdParent attribute indicates that the comment is a reply to the value id Change-Id: I9e6eca6a656594c956629c1434b8e5c3aa573c60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145314 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-18sw: rename getBookmarkFor() further to getOneInnermostBookmarkFor()Miklos Vajna
One additional complexity I missed is that there can be only one innermost fieldmark for a position, but there can be multiple bookmarks, because bookmarks don't have a starting dummy character. See <https://gerrit.libreoffice.org/c/core/+/145412/2#message-85a4780c8140038a9cc2bd4b9af64ecf97ee5e60>. Change-Id: Ia5d3bebddd42be7c44b8df2d5db3c5312285a5f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145699 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-17Properties SortedTextId and DocumentElementsCount added for grammar checkFred Kruse
The LanguageTool extension (LT extension) runs not only a grammar check on the level of sentences and paragraphs, some rules work on the level of many paragraphs or full text. The LT extension uses a complex caching mechanism to support this feature. A mapping from a check request to the cached to the (flat)paragraphs is necessary. Until now, this is done by a time-consuming and error-prone mechanism. The adding of the SortedTextId introduce a feature, a paragraph to be checked can be fast and easy identified. The flatparagraphs also can easily be mapped to cursors to get additional information of the paragraph, used for further features of LT extension. The added Property DocumentElementsCount to flatparagraphs and doProofreading gives the extension the hint to recreate the cache. Change-Id: I4b6b58bba4dfb3e870fe7b71fd8537ee9ffd6476 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142251 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-01-17tdf#143148 Use pragma once instead of include guardsDowdyJ
Change-Id: Ibaa1f275cd4ef5a56b8014bf99013aa511a2c413 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145648 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2023-01-17sw: document SwSectionNodeMiklos Vajna
Note how all the table cells, sections, flys etc have low-level sections, but only the UI-level section's start node is called a section node. Change-Id: I730f17b3a63c9e49ee099f82aa39f7a55b2da3fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145634 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-14sw: add ThemeColorChanger that sweeps the model and changes colorsTomaž Vajngerl
The ThemeColorChanger responisiblity is to recalculate and change all the theme colors in the model. This includes styles and direct formatting changes. It uses ModelTraverser for direct formatting changes as it already implements traversing through nodes. The ThemeColorChanger replaces the code to change the colors in ThemePanel. Also modify undo/redo for changing of attributes to not move the cursor and selection when undoing and redoing (new flag NO_CURSOR_CHANGE), as in this case it is very distrcting. Change-Id: Ida1912bd0697307daad9244d474862830ab2686f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145263 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-13tdf#152952 sw: don't hyphenate URLs by defaultMichael Stahl
New compatibility flag HyphenateURLs, disabled by default for Word interop and enabled for old ODT documents. Change-Id: I1496819599deb5ed0fd736698d269ab9a22167fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145415 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
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