summaryrefslogtreecommitdiff
path: root/xmloff/source/meta
ModeNameSize
-rw-r--r--MetaExportComponent.cxx6553logplain
-rw-r--r--MetaImportComponent.cxx3336logplain
-rw-r--r--xmlmetae.cxx17238logplain
-rw-r--r--xmlmetai.cxx12074logplain
-rw-r--r--xmlversion.cxx14920logplain
dentsMichael Stahl The problem is that when a paragraph style specifies a SwNumRule, then this style's indents override the indents of the SwNumRule, but if the same SwNumRule is also added to the SwTextNode's mpAttrSet, then the style's indents no longer take effect. This happens both when inserting an AutoText, and when Pasting, into a list item, because DocumentContentOperationsManager::CopyImplImpl() sets the pNumRuleToPropagate as direct formatting on every pasted node. Add another flag to SwDoc::SetNumRule() to check if pNumRuleToPropagate was already in effect due to the paragraph style. Change-Id: Id98ad2a21eab4f8636fb36f9298a054cfe4f7784 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167766 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> 2024-05-03WaE: C6011 Dereferencing NULL pointer warningsCaolán McNamara Change-Id: I9b2b86c26e08221c57735c6eda88727aa8a46b5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167021 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> 2023-12-18tdf#158703: return updated position from FnAddNonBrkSpaceMike Kaganski The paragraph text may become shorter after the function succeeds, because it may remove arbitrary number of preceding spaces; since the position may then be used to access data in the string in the caller, we need to update it, to avoid use of old position (which may point beyond the string, and produce a crash; or it may point to a wrong position in it). Change-Id: Ib1b4b63cbd7150e0f69c97032e3410db7dadd4dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160924 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> 2023-12-11tdf#117651 Fix AutoCorrect crash for italic, strike, bold, and underlineMatt K This change fixes correction of indices when autocorrecting for one of the categories of bold, italic, strike, or underline. Previously, the code would hit a debug assert when selecting "Apply" because of incorrect indices into the string being autocorrected. Change-Id: I5484c589ff43cd2fc78332cdc0d63e74cdc8e256 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160547 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> 2023-12-11tdf#117651 Fix AutoCorrect support for italic, strike, bold, and underlineMatt K The previous change for italic had a "break" for "/", but it turns out that code path is hit when trying to "Apply" with slashes around some text, so we just move the "break" inside the check for French language handling. Note that trying "Apply" with this change will crash on a debug build -- there is another fix for that problem in a subsequent change. Change-Id: I4bd76505b3fdfc9f5660eb6ae4a5c5c23e9672ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160529 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> 2023-11-21tdf#117651 Add AutoCorrect support for italic and strikethroughMatt K The AutoCorrect "Apply" command calls SwAutoFormat::AutoCorrect in sw/source/core/edit/autofmt.cxx, as mentioned in the bug comments. This change just adds new cases for "/" (italic) and "-" (strikethrough), so that when "Tools" -> "AutoCorrect" -> "Apply" is invoked it changes any text between 2 "/"s or 2 "-"s (assuming your AutoCorrect options enable the setting for this). The new code is just mostly copied from the case statement above it (for bold and underline), and the only additional changes that were needed were to add the comment strings for the 2 new cases. Change-Id: I02238690a40fd0113e3e9acbecf93ef5c34e0785 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154207 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> 2023-09-07Autocorrect: Add option for autoformat bulleted lists after spaceDarshan-upadhyay1110 Enable option in Autocoorect => bulleted lists after pressing space Example: press * or - and space will change into bullets Change-Id: I9741ad4c3eb4123074f06b762b58fe7ffdb44613 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156616 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> 2023-07-03No need to name the temporariesMike Kaganski Change-Id: Idadb3473afd7890d329cc8effff7ec985d06c2e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153846 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> 2023-07-02Drop redundant assignmentMike Kaganski Assigned the same value a couple lines above. Change-Id: Id1117189142fab373f5057f8f48a49b265a07fe7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153842 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> 2023-06-23tdf#142437: Fix word boundary detection in autocorrectBaole Fang Marks (combining and spacing) were incorrectly considered word separators, because isLetterNumeric() matches only for letters and numbers. The new isBase() matches any character with BASE_FORM character class, which covers letters, numbers, and marks. Change-Id: I27ec2f7fb8d360791a280d10aba9b6d16e7cfb71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153509 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org> 2023-06-02tdf#90507: Prevent changing default style in AutoCorrectBaole Fang Change-Id: I3bc7d99daf49ff32d9d80fcbbb7538cc036bc279 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151213 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> 2023-05-13use more optional for CharClassNoel Grandin Change-Id: I67984321b8f38928bfab9fb0b624620e7d286a11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151722 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2023-05-04tdf#128192: Fix Tools/AutoCorrect/ApplyBaole Fang AutoCorrect() is applied in GET_ALL_INFO and HAS_FMTCOLL stage. Also, UITest is added by examining whether "Replace dashes" is performed. Change-Id: Idcb34ad03c4fe8df27ed126bf39ce23ab4f02846 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151008 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de> 2023-04-27tdf#145925: Add DOI recognitionBaole Fang Detect DOI string in the form of "doi:10.*" and add hyperlink to it. It works the same way as url recognition. Change-Id: I3c4e78a110fd81ad7e727d5e9acee7e51127466a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150954 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2023-02-24tdf#78510 sw,cui: split SvxLRSpaceItem for SwTextNode, SwTextFormatCollMichael Stahl Leave editengine and non-paragraph usages of SvxLRSpaceItem as-is for now. Add new items RES_MARGIN_LEFT etc., order them so that paragraphs can have 3 consecutive items RES_MARGIN_FIRSTLINE..RES_MARGIN_RIGHT and non-paragraphs also have 2-4 consecutive items RES_MARGIN_RIGHT..RES_MARGIN_LEFT (only the 3 paragraph ones are actually used now). The HTML import filter is particularly annoying because it parses CSS stuff into SfxItemSets without knowing where the items will be applied, so it can't know whether to create SvxLeftMarginItem or SvxTextLeftMarginItem... the split items are created in ParseCSS1_* functions and then converted later if necessary. WW8 import has some weird code as well, SwWW8ImplReader::Read_LR() creates 3 items and then something wants to set every item on its own so SwWW8FltControlStack::SetAttrInDoc() turned out rather weird. Convert the paragraph dialog to handle the split items (by mapping them to SID_ATTR_PARA_FIRSTLINESPACE/SID_ATTR_PARA_LEFTSPACE/ SID_ATTR_PARA_RIGHTSPACE), but the SvxRuler looks a bit more confusing so convert in sw shells for now and leave that for later (also unclear if changing these slot items like SID_ATTR_PARA_LRSPACE breaks any ABIs?). Change-Id: I40431821868fd3e1cceba121b5539ff9ae6befbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147024 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> 2023-02-08tdf#153423 tdf#150197: use getToken in proper orderJustin Luth This fixes a LO 7.5 regression from my commit 727c5ed30f68abc28bb04531b25a1df30810760f getToken steps along the string and consumes it, so these needed to remain in the same order as they had been originally. Dumb thing to overlook. Change-Id: I483980eafb7deb0c224063ad41616bb21ddb2191 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146672 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> 2022-10-11use more string_view in swNoel Grandin Change-Id: Ibefb8549834ba5011286e3221f1ae276e2c0c0bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141153 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2022-09-28use more SwPosition::SetContentNoel Grandin part of the process of hiding the internals of SwPosition Change-Id: I5328dcf01d3fc2c8e61265667512f8bdcd739509 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140670 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2022-08-22use more SwPosition::GetNodeNoel Grandin Change-Id: Iba1207fd5006c3bd56f45da3c46b84f5e8c43340 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138646 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2022-08-18loplugin:moveitNoel Grandin Change-Id: I34de7408553e4ca702cab9aa611c03dc60b9b6a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138472 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2022-08-18no need to allocate these on the heapNoel Grandin Change-Id: Ia5eec87a4b36ac2dd15c3369bd7c630277a177c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138473 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2022-08-14rename SwPaM::GetNode to GetPointNode/GetContentNodeNoel Grandin Using a parameter to select point/mark makes the code much harder to read Change-Id: I4ac8b904ac423e2b99253b7e4b6adc72c8afe1a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138083 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2022-08-14use more SwPosition::GetNode instead of nNodeNoel Grandin as part of the process of hiding the internals of SwPosition. This just changes the places we are passing nNode to the constructor of SwNodeIndex Change-Id: I3dffba5df6c044a69da27b6a1254592695b976af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138200 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2022-08-12clang-tidy modernize-pass-by-value in swNoel Grandin Change-Id: I9a3b33595e34a264baeede33672a0c090ae85157 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138134 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2022-08-11related tdf#150197: use SetListFormat instead of SetPrefix/SuffixJustin Luth Commits prior to this handled all the instances that were caught by a make check. I found a few more by temporarily setting an additional boolean parameter on SetPrefix/SetSuffix which let me catch these. This means we don't have unit tests related to these. Change-Id: I1b3bb1e6eec7878e43ccf546f6df7cb38ac5299e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138072 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> 2022-08-04add more SwPosition::AssignNoel Grandin These are just the "obviously correct" places where we can use SwPosition::Assign, i.e. the places where we are already correctly setting both nNode and nContent in SwPosition. Change-Id: I27078c91e491c9162770ce729364197056d62cb6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137775 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2022-08-02introduce SwPosition::GetContentIndexNoel Grandin as part of the process of hiding the internals of SwPosition largely done by doing: git grep -lF 'nContent.GetIndex' | xargs perl -pi -e 's/\bnContent\.GetIndex/GetContentIndex/g' Change-Id: I12684071a6666c365dbadbab2a4b37cf51b274d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137695 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2022-08-02introduce SwPosition::GetNodeNoel Grandin as part of the process of hiding the internals of SwPosition largely done by doing: git grep -lF 'nNode.GetNode' | xargs perl -pi -e 's/nNode\.GetNode/GetNode/g' Change-Id: Id1937df1bd5a54677c2c1bbfb2d693a4e22a7b98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137671 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2022-07-25rename SwIndex->SwContentIndexNoel Grandin to help my poor brain with the different kinds of index we have floating around Change-Id: I47ed223922170687d7e07812445aed66b3218230 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137404 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2022-06-08tdf#133957 sw: don't delete flys on Backspace/Delete keysMichael Stahl Also fixes: tdf#134007 tdf#138835 tdf#139514 When a character is deleted via the keyboard by Backspace or Delete key, an artificial selection is created in SwWrtShell::DelLeft()/DelRight(). Ideally this should not delete flys that may be anchored to the paragraphs, but unfortunately this may happen if there are only 2 empty paragraphs in the section, because then the artificial selection cannot be distinguished by the SwDoc implementation from a selection from Ctrl+A (Select All), which *should* delete the flys. So introduce a new flag that needs to be passed down multiple layers so that SwUndoDelete can use it to determine if flys should be deleted, and translating it to a flag that had been introduced to preserve flys in ReplaceRange() previously. There are a couple more callers that look like they want to "replace" some text, so guess a bit at where to set this new flag. (note: of course fly anchored *as char* must be deleted via keys.) (regression from commit e75dd1fc992f168f24d66595265a978071cdd277) Change-Id: Ib4467476b12a12aefbbcb74ab9802f9318cf9aa0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135476 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> 2022-04-11loplugin:stringview add check for getToken().toInt32Noel Grandin where we can convert that to o3tl::toInt32(o3tl::getToken( and avoid the heap allocation of a temporary string Change-Id: Ib11c19c6e6cdc0de3e551affd3578d181e292de4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132810 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2022-03-13tdf#147961 Crash Typing "++" and press Enter (AutoCorrect Create Table)Noel Grandin regression from commit 7cd5b35caa8d4fa9d0ba2b2c6ce4b88726ed2be6 Author: Noel Grandin <noelgrandin@gmail.com> Date: Fri Sep 24 13:21:35 2021 +0200 return SwCursor from IShellCursorSupplier Change-Id: I6a4e3f90653dc96a91091be1372f27c6303ba346 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131505 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2022-03-03use SfxItemSet::GetItemIfSet in sw/source/core/firldsNoel Grandin Change-Id: I25d46d8435b8a95ac8809b9f67a6c3a9b14dd26e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130878 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>