summaryrefslogtreecommitdiff
path: root/sw/source/core/text
AgeCommit message (Collapse)AuthorFilesLines
16 hourstdf#142130 sw track changes: fix crossing out of neighboring imagesLászló Németh3-7/+6
Normal images got crossing out from the next deleted images. Fix it by using only the start position of the image in CheckLine() instead of the 1-character length range of the anchor point. Note: add unit test also for tdf#78864. Follow-up to commit d845b91bcc6eb885c55494d4d4fab4ec09577e1d (tdf#78864 sw track changes: cross out deleted images). Change-Id: I8894e625d479adea4b1003f55f24f292064ed7ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115255 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
4 dayscid#1401328 Uncaught exceptionCaolán McNamara1-3/+3
and cid#1401334 Uncaught exception Change-Id: I609ec44bf28db28e69533d7b795f705fa8a330f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115228 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
7 dayscid#1478174 Uninitialized scalar fieldCaolán McNamara1-0/+1
Change-Id: Ib17e55b600012ef5f6a26d01e9d54aa7be9c590d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115052 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
8 dayssal_uLong->sal_uInt32 in SvParserNoel Grandin1-2/+2
Change-Id: Ibe5599e1cc136330a8e9c089c7cc66d0ef4bc966 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115002 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
11 daystdf#78864 sw track changes: cross out deleted imagesLászló Németh3-1/+59
Show Changes mode shows deleted images with crossing out to allow differentiate deleted and inserted images during change tracking. See also commit d6322bcedc197a654abc7d64bfea8cf570f123bf (tdf#59463 track changes: record deletion of images). Change-Id: If9bc2252c6cdd06cbe267fe130023c416aa53ce7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114906 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
13 dayssw: fix crash in SwAnchoredObject::dumpAsXml()Michael Stahl1-1/+2
SwAnchoredObject::GetObjBoundRect() is const, so it's only idiomatic that calling it reformats everything. Change-Id: Id57472ae3041c7264bc904e1a68907c48e60ac96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114757 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-04-19tdf#141550 tdf#141557 tdf#140975 sw: fix textbox crashAttila Bakos (NISZ)1-0/+1
and regressions by refactoring SwTextBoxHelper. tdf#141550 was a DOCX import regression from commit ff321dd36554d25f0817903becf4598065e0a194 (tdf#140828 sw textbox: fix AS_CHAR regression), resulting bad horizontal position of the frame of the textbox. tdf#141557 was a regression resulting crash by changing text box anchoring "To Paragraph". tdf#140975 was an implementation error, resulting broken textbox by changing box anchoring to "As Character". In the SwTextBoxHelper class there were many repeating code parts for textbox positioning. Now these parts have been replaced with the calls of several new functions: 1) getShapeFormat() returns with the SwFrameFormat of the UNO XShape; 2) setWrapThrough() only sets the surround of the textframe (used in the code frequently); 3) changeAnchor() sets the anchor of the textframe according to the anchor of the shape; 4) doTextFramePositioning() sets the position of the textbox according to the shape (used in the code frequently); 5) isAnchorTypeDifferent() shows difference of the anchor types of the shape and the textframe. Also it handles the situation of anchoring "As Character"; 6) isTextBoxHasValidTextFrame() checks if the shape is a part of a textbox or not. Every function returns with true on success, otherwise gives information to the log. All of them can be called with ShapeFormat or UNO XShape. The goal of this to make the possibility to advance this class for further functions – rotation, grouped textboxes etc. – without code copying. Change-Id: I4441cab87931f161d0ace4983646d6d2a68a7321 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113463 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-04-15loplugin:stringliteralvar look for assignmentsNoel Grandin1-26/+26
to O[U]String from char array literals, we can convert the char literals to O[U]StringLiteral and avoid a runtime allocation Change-Id: I15d8dddb2cd428b90740e39f20daf98e0941aa6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-14sw: layout dump: sorted_objs of SwPageFrameMichael Stahl1-0/+21
Change-Id: I2bf8493744d054c513ab9b65136b6e29e9aa07f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114065 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-04-13tdf#132393 sw: disable TabOverMargin layout flag inside sectionsMiklos Vajna1-1/+6
Regression from commit bdfc6363d66aa079512cc8008996b633f693fed1 (n#793998 sw: add TabOverMargin compat mode, 2013-01-08), the problem is that currently adding an alphabetical index generates document model where tab positions are explicitly over the margin and users expect that the page numbers are still visible, even for Word documents. Fix the problem by disabling this mode inside sections. Long-term we may want to fix the ToX generator to create a more sane document model and then this flag can be handled even inside sections. Change-Id: Ic91ac36e703d59e4711a009db1f921e456bf8645 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114018 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-04-09Recheck include/ with IWYUGabor Kelemen1-0/+1
See tdf#42949 for motivation Change-Id: Ifc253bf800bb1468b5774663a93f4fb30bec81d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113657 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-03-30related tdf#131801: remove completed TODO commentJustin Luth1-2/+0
The todo was done in LO 7.1 with commit c77b9c349f0a48392d8cb7a49532844b2cafb5ba Michael's reference to testParagraphMark is puzzling because the only place that is found is in a unit test, and Miklos' ooxmlexport.cxx test has nothing to do with numbering. Change-Id: Ie24ff6a69edf92f9dbe586c64a6ea631718002cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110122 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-03-29tdf#140828 sw textbox: fix AS_CHAR regressionAttila Bakos (NISZ)1-0/+4
Textboxes anchored as characters don't lose their text frames after changing the anchor "To character". Regression from commit 493a916a3113e877835c9bc7c93faef0d29f9a33 (tdf#140158 tdf#138598 tdf#140598 sw: fix sync of AS_CHAR textboxes). Change-Id: I0e6d88c9dcdeff515744bc4c201a5640eb810d1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112209 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-03-29sw: prefix members of IndexEntrySupplierWrapper, SwDropCapCache, ...Miklos Vajna3-172/+220
... SwFootnoteSave and XmlPortionDumper See tdf#94879 for motivation. Change-Id: Ibd956314173cfd18e15c7c6b3c75d655bc9adf55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113292 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-03-26cid#1474452 Unchecked dynamic_castCaolán McNamara1-2/+2
Change-Id: Ib50140fad741d34eae0dfe28fd4ed03024d11e96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113165 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-26loplugin:flattenNoel1-25/+25
Change-Id: Ib7a895fba66f8dc9b6501e61631c02694053b7fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113157 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-25tdf#141079 Restore double click behavior for script fieldsSamuel Mehrbrodt1-2/+6
Change-Id: I5daa730740ea042bdae56b832f2557ec974339b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112668 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-03-24sw bibliography, refer to a page: add PDF export linksMiklos Vajna1-0/+62
This is similar to hyperlinks or footnote references, but the source rectangle is a field here and still the links are always external. With this, the UI and the PDF export result is consistent, it doesn't happen that you can click on biblio entry fields on the UI, but not in the PDF export result. Change-Id: I655ef6d5f79a7e372cdc8448ddc10af9ca488ac5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113035 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-03-23tdf#124176 replace include guards with pragma oncePanos9-36/+9
Change-Id: Iac0caac45130fd7da21ed9e7869abbd288931747 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112975 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-03-21cid#1473798 silence Unchecked return value from libraryCaolán McNamara1-1/+1
Change-Id: I00174b5444749f3345f5691e24eb5219d1b47059 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112837 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-19silence coverity unchecked return value from library on xmlText* functionsCaolán McNamara1-93/+93
Change-Id: I651abb00d8ae1bdbf758a6a0176fd8912531a585 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112753 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-18tdf#108518 partial revert tdf#64222 sw: better DOCX im/exportJustin Luth1-3/+3
...of paragraph marker formatting 6.4 commit 5ba30f588d6e41a13d68b1461345fca7a7ca61ac Ultimately, this just reverts back to an earlier 6.4 change (which means that this really is untested and unproven)... > Also revert the change in checkApplyParagraphMarkFormatToNumbering() > to consider hints that start before the end of the paragraph, > as it has unintended side effects as pointed out by Mike Kaganski. But those side effects were from a DOCX file, and DOCX isn't processed here anymore. The (unedited) comment (still) says: //Formatting for the paragraph mark is usually set to apply only to the //non-existent extra character at end of the text node but there can be //other hints too (ending at nTextLen), so look for all matching hints. //Still the (non-existent) extra character at the end is preferred So, that suggests that there is more than one possible valid autofmt, and that not ALL autofmts will have a start==end. This is being considered since it fixes the one example file that I could find that still broke when reverting OOo's 2012 hack commit 1c22545edf9085b9f2656ca92781158b6b123db3 Fix issue #i119405: Numbering text style changed after importing the *.doc The other alternative would be to // TODO remove this fallback (for WW8/RTF) Change-Id: I69b6e31fe570742b4b9dd94d2cce2b5b9850360d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112319 Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2021-03-17sw: prefix members of SwIsoRefPortion, SwIsoToxPortion, ...Miklos Vajna7-67/+66
... SwSoftHyphPortion and SwSpaceManipulator See tdf#94879 for motivation. Change-Id: Ib7034bfa158885d23cf51b9db2e8f7095885cf39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112595 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-03-17tdf#52065 sw: revert tdf#45908: Cleaning up the tabs too earlyJustin Luth2-0/+7
... can cause loops from LO 3.5 commit 36c905d8c2874f6f984d5fbbc07784ec20c43524 The PostFormat for Center and Decimal tabstops is critical since the space they take up is unknown until the following text is evaluated. The search position in these two cases is invalid until the text position is calculated by PostFormat. PostFormat normally returns FALSE, so in almost all cases the rest of NewTabPortion completes. The function only returned early if the start of the tabstop was beyond the right margin. I assume the original intent was to avoid potentially unnecessary processing. However, returning early can cause looping, which the LO 3.5 commit "fixed" by removing everything. Well, just remove the early return and both problems are solved. Change-Id: I4afc4cce8249f90097bc1f263df1a39bc219098d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112559 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-03-13tdf#135774 Char highlight: partial revert tdf#114799Justin Luth1-0/+4
...DOCX import: fix missing numbering highlight from 7.0 commit 315d56582f8a56d8f2d3ea6cda63ea4832249608. If the numbering had a specified w:highlight in numbering.xml, then that character background should apply to the bullet point. However, SetDiffFnt automatically clears the highlight, the same as it does with mxBackColor (fixed in earlier commit). So a special step is needed to check if the font has a highlight, and since that direct formatting has priority, re-apply it after SetDiffFnt has finished. This is slightly different from mxBackColor - which is an optional attribute. Highlight is reset to COL_TRANSPARENT. If a RES_CHRATR_HIGHLIGHT exists explicitly setting a COL_TRANSPARENT, then any overrides should have been removed from pCleanedSet, and so it never needs to SetHighlightColor(AUTO). Change-Id: Id9d88054254563706b9aee90a1d257b467139334 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112410 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2021-03-12tdf#135774 Char highlight: numbering: don't clear existing mxBackColorJustin Luth1-0/+8
If the numbering had a specified w:shd in numbering.xml, then that character background should apply to the bullet point. However, SetDiffFnt automatically clears mxBackColor (and I'm not sure why - but that has been true since way back to original import). Well, in this section the paragraph marker properties should only apply if the numbering doesn't have direct formatting already. So a special step is needed to check if the font has an mxBackColor, and since that direct formatting has priority, re-apply it after SetDiffFnt has finished. (P.S. This had been done earlier for GetHighlightColor, but it was reverted in 7.0. From my testing, I haven't seen an example where it was needed, but it too is reset to null - only it isn't optional.) Again, a unit test will be challenging here, since this is a visual change only. Change-Id: I2be129b11b6f746ba11c19d69bf01f3174c1b64b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111675 Tested-by: Jenkins Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2021-03-08sw: prefix members of SwHyphStrPortion, SwMinMaxArgs, SwMinMaxNodeArgs ...Miklos Vajna6-99/+110
... and SwTextCursor See tdf#94879 for motivation. Change-Id: Id226a5b30fae4c29476aebc6edf7fb180726eb4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112153 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-03-08tdf#140796: Wrong English string for U+2060 characterJulien Nabet4-4/+4
Rename "No-width No ~Break" to "Word ~Joiner" + replace pattern "ZWNBSP" variable names by "WJ" Change-Id: I95a874a9d2d20a30d2c4c3add6041adbe72d872c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112055 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-03-07loplugin:staticdynamic now with extra saltNoel1-2/+3
because it wasn't quite there yet - now checks for casts with and without const, because const doesn't really matter here. Change-Id: I319025b2095a803fcaad2a7a696d2730b7fd2f81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112098 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-01tdf#140158 tdf#138598 tdf#140598 sw: fix sync of AS_CHAR textboxesAttila Bakos (NISZ)1-11/+21
Textboxes anchored "As Character" fell apart, when typing before some characters or inserting a page break. By fixing that, the tdf#138598 bug also have fixed which was a regression from commit b6850bbe95418ecfde404be1696548f18d200c9b (tdf#106153 sw compatibility: fix textboxes exceeding the page). In addition, tdf140598 is also fixed, which was a regression from commit c96c386c5db45dc4d5e358915caad7474e373068 (tdf#136516 add positioning to SwTextBoxHelper::syncProperty()). Change-Id: Ifeadd8b2055ce52a019d651369ca41185de7bbe3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111338 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-03-01tdf#114799 Char highlight: don't convert imported shadingJustin Luth1-1/+15
Under normal circumstances, this was already done, but in this case where the end paragraph properties are being written out, there was no context, so the grabbag was not found, and thus there could be no indication that this came from an imported value. I'm still mildly uncomfortable with this patch. ISet takes priority over ChrIter. The TOX does add a fake ChrIter for the whole section, but doesn't document why (and the commits don't help much either - very early stuff). That seems to be the only place where this patch overrides an otherwise working situation. The comment for this function encourages me that I'm doing the right thing. /// Outputs an item set... so it should be appropriate to set pISet, right? This is just a visual change, so nearly impossible to test reliably in a unit test. [see https://gerrit.libreoffice.org/c/core/+/93082] This causes LO to match how MS Word shows w:shd on numbering (i.e. it doesn't show anything). Change-Id: Ic3024c8f26a7e866c0b407a963dd9a1fc20b75cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111295 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-03-01sw: prefix members of SwDropPortion, SwDropPortionPart, ...Miklos Vajna4-70/+70
... SwFootnotePortion and SwQuoVadisPortion See tdf#94879 for motivation. Change-Id: I8a2b01892c0198b1fd382eb0c3f29f7df3c6437d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111730 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-02-26tdf#124176 Use pragma once in sw/source/core/textSuhaas Joshi1-4/+2
Change-Id: I6fa5895ae050e9f8cbb4cfd13572ddad0e2cb1f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108832 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-02-26tdf#124176 Use pragma once in sw/source/core/textSuhaas Joshi2-8/+3
Change-Id: I2104cad267e6f704f9389b03ff3f116fca875517 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108796 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-02-24tdf#124176 Use pragma once in sw/source/core/textSuhaas Joshi2-8/+3
Change-Id: I9eb44c16fef1da8a1931e60857912887282bff59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108735 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-02-23tdf#135774, tdf#114799 Char highlight: apply to numberingJustin Luth1-5/+11
This is a partial revert of LO 7.0's commit 315d56582f8a56d8f2d3ea6cda63ea4832249608 The character background is exported as either w:highlight or w:shd, based on a user setting. w:shd does not affect numbering in MS Word, only the 16 color w:highlight does. (tools - options - Load/Save - Microsoft Office - Character highlighting export as: Highlight or Shading) I replaced tdf114799.docx with a version that uses w:highlight instead of w:shd. The test was doing it backwards - MS Word was NOT highlighting the numbering in the original unit test. I added another test using the original unit test to ensure that the numbering was not affected by the paragraph's char shading. There are many other "Char highlight:" patches in 7.2 that are not going to be backported. See http://wiki.documentfoundation.org/Documentation/CharHighlight for more details about this topic. Change-Id: I38b6f700895e29f634f07430f6c7a13722ffa4f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111201 Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2021-02-22sw: prefix members of SwFixPortion, SwFlyPortion, SwGluePortion and ...Miklos Vajna5-30/+30
... SwTabPortion See tdf#94879 for motivation. Change-Id: Ic3918caa922cfd99e361010b44fe9d0c95e28b1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111298 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-02-18adapt to prefixing , even when OSL_DEBUG_LEVEL > 1Tomoyuki Kubota1-2/+2
Change-Id: I5fe9755eaf0cce963fda2dbc2ec27b31d0d7dc52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111045 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-02-15sw: prefix members of SwHangingPortion, SwKernPortion, SwTextGuess and ...Miklos Vajna4-136/+136
... SwTmpEndPortion See tdf#94879 for motivation. Change-Id: I36ef3b7abd4b4e1fd7f246ea4373794826c2add4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110893 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-02-10Fix loplugin:stringliteralvarStephan Bergmann1-2/+2
...detection of OUString( const sal_Unicode * value, sal_Int32 length ) ctor. (On platforms where sal_Int32 is a typedef for int, an argument that already is of type int will not be wrapped in an ImplicitCastExpr to the sal_Int32 typedef.) Change-Id: Ifc5456a62d42c1acad76ea949549dc24bd67201a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110654 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-08sw: prefix members of SwArrowPortion, SwTextLine, SwTextPainter and ...Miklos Vajna8-42/+42
... WidowsAndOrphans See tdf#94879 for motivation. Change-Id: I1999c83e5afe100b95481ac470f4d854b5f113f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110547 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-02-04use more StaticWhichCastBjoern Michaelsen1-80/+76
- because it uses TypedWhichIds well-defined mapping of id to type - ... and assert, if the content found doesnt match up expectations Change-Id: Idda58ccda47c5d074326537dcc6670ef0cfcabf1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110233 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2021-02-01sw: prefix members of FormatLevel, SwNumberPortion, SwPostItsPortion and ...Miklos Vajna7-53/+53
... SwRubyPortion See tdf#94879 for motivation. Change-Id: I24bb59ea921cdea2888d5a1009db5030e4ee897a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110239 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-01-28simplify code, use more subView()Noel1-2/+2
Change-Id: I569c7f34acbdf8451cd5c9acf1abd334637072d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110051 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-28add string_view variants of methods to O[U]StringBufferNoel1-5/+5
and update the stringview loplugin to detect cases where we can use these new methods. Change-Id: I998efe02e35c8efcb3abfb4d7186165bbe6dfb2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110046 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-25sw: prefix members of SwBidiPortion, SwDoubleLinePortion, ...Miklos Vajna6-140/+140
... SwGrfNumPortion and SwSaveClip See tdf#94879 for motivation. Change-Id: Iade32e16fa36555aacbfe794895d015bee0226de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109866 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-01-20tdf#116757 sw ChangesInMargin: add "Show Insertions in Margin"László Németh2-4/+7
layout mode to allow to show the original text inline, i.e. only deletions, while insertions are showed in margin (opposite of the Show Deletions in Margin mode). Add a menu to the Show Changes icon on the Changes toolbar with menu items for the 3 layout modes "All Changes Inline", "Deletions in Margin" and "Insertions in Margin" with the following behavior: – Selecting a menu item turns on also the Show Changes mode to show the result immediately; – Disabling Show Changes mode always show the final text, i.e. only insertions. Enabling Show Changes mode again shows the changes according to the last Show Changes mode selected in the menu. – The new "Insertions in Margin" mode is intended to be only a run-time option, i.e. it's not possible to set it as a default Show Changes mode in Options, unlike "Deletions in Margin". Change-Id: Ie4dc9fe3b4b201fa9976ef04877af649e242ab46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109649 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-01-18sw: prefix members of SwCombinedPortion, SwEnhancedPDFExportHelper, ...Miklos Vajna6-119/+123
... SwSetToRightMargin and SwTextPaintInfo See tdf#94879 for motivation. Change-Id: I05ef098d16d186782aba8200bddee5b15533dc01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109509 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-01-15tdf#135014 sw_redlinehide: fix missing frames when removing fieldmarkMichael Stahl1-0/+2
A fieldmark was deleted. UpdateFramesForRemoveDeleteRedline() deleted the MergedPara but its start node was before the start node of the fieldmark, and then MakeFrames() didn't find a frame on the preceding node and did nothing. Similar problem likely possible with redline. Change-Id: I532f9a67c0268f3287736a61da4cc9fefec7b8e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109307 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-01-15tdf#135014 sw_fieldmarkhide: fix bogus assert on loading the bugdocMichael Stahl1-1/+1
The == case was omitted, iirc because of changing the first compare at the last minute. (regression from aacaa2aa91f705d64b929b5cff2872f160021b9f) Change-Id: I03602917def8248150139d788c880d93cab18bf1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109304 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>