summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2021-03-01tdf#124176 Use pragma once in sw/inc/ndtxt.hxxheet-2312
Change-Id: I75b6788e21ac010daea1cac5661887a0812d1773 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111729 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-03-01sw doc model xml dump: show SwAuthEntryMiklos Vajna
To see the author/title/etc of bibliography fields. Change-Id: Ia466c96d3d17b52b94a85070edd023a0579e970a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111732 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-03-01tdf#114799 Char highlight: don't convert imported shadingJustin Luth
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 Vajna
... 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-03-01tdf#140137 Don't throw exception when w:gridCol is missing "w" attrAron Budea
2149e924cbc32c370128c5f87a4f55c50c99e6bd added a division-by-zero check, which caused Writer to throw an error on the bugdoc. Since the file could be loaded fine before, let's return to a working version, with the check included. The cause is the following in document.xml (originating from a non-MS generator): <w:tblGrid> <w:gridCol/> <w:gridCol/> </w:tblGrid> Word still splits such tables differently, but that difference was always there in Writer. Change-Id: I6d91a736f460394a76f035298a238c41da201cb3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111723 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-28ofz#31538 null-derefCaolán McNamara
Change-Id: I3264c0fd509e16cf4727847199f0be316d03d0e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111713 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-28tdf#121666 DOCX export: fix missing page breakAttila Szűcs
When an empty paragraph has both page break and section break, only the section break was exported to DOCX, the page break was not, while MSO needs that to show all page breaks. The DOC and RTF exports were not changed by this fix (not sure if the problem are present with them or not). Co-authored-by: Tibor Nagy (NISZ) Change-Id: I5deac0390666415e36a541c731dda4bc0a2ad6ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111543 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-02-28tdf#124176 Use pragma once in sw/source/core/viewSuhaas Joshi
Change-Id: I89fdf4a38eac6d69f2d432eefbf13d036cfb1a14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108876 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-02-28Removed executable permission on fileAndrea Gelmini
Change-Id: I1a7b356573f424bbf594f038ab8478f68248fbd5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111650 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2021-02-27Fix typosAndrea Gelmini
Change-Id: I4188e0bcc4089db3060179b7b1c085218fce92f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111649 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-02-27Removed executable permission on fileAndrea Gelmini
Change-Id: I0aac25026b409211447517e7f276ca33f2e4230d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111524 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2021-02-27calculate text height after setting paper sizeCaolán McNamara
Change-Id: Ifb92109ead6b4a321d4abd81c2d36c415cbd767a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111655 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-27sw bibliography, refer to a page: strip URLs in the bibliography tableMiklos Vajna
In case multiple bibliography entries refer to the same source, just different page numbers, then it's pointless to list those sources multiple times in the bibliography table. As a first step, strip the page fragment of those URLs, so later we can merge these entries. Change-Id: I02991d3d19742092198309174aa3d662622fa505 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111653 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-02-27tdf#138345 Char highlight: numbering needs charstyle props highlightJustin Luth
Although a true character style should ignore RES_CHRATR_HIGHLIGHT (and it does on import), the numbering style also uses this map entry, so it shouldn't have been removed. I'm glad I found this example. This partially reverts my 7.2 commit 20574b4023952c8fbfa728590f3bdcf603633cca. When I removed it, Miklos said I should have added API CHANGE to the subject. Well, this is still the same 7.2, so the net effect is no api change. Since the attribute now exists, it returns the default of COL_TRANSPARENT when queried for CharHighlight. So the globalfilter revert was also necessary. Change-Id: I803e590233ce6db89ac5de246702f02b84692a6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111676 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2021-02-27tdf#140528 Crash in writer when switching from Numbering to PositionNoel Grandin
regression from commit e5ecb998fd78137aec32ad2cc996eaa4bb3e499d Date: Mon Dec 5 09:52:43 2016 +0000 avoid coverity#1371269 Missing move assignment operator rather write this code in a more obvious fashion, and bypass the use of the very weird operator= method, which barely copies anything at all. Change-Id: I548d8f73224c2625ed6389861551038b18396b0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111677 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-27NB writer remove style update and edit widget available at previewandreas kainz
Change-Id: Iba9c293ddce36ef9ad1bbc147cfcad942635a455 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111669 Tested-by: Jenkins Reviewed-by: Andreas Kainz <kainz.a@gmail.com>
2021-02-27tdf#140437: sw_odfexport: Add unittestXisco Fauli
Change-Id: I1d8e2f484069dffe7b635ad6fc41f40f2e626e02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111652 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-02-26sw doc model xml dump: show SwAuthorityFieldMiklos Vajna
Towards seeing the actual contents of these bibliography references. Change-Id: I9f7b623a551adf9fd3f3a5ba4e376676c891bc04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111630 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-02-26drop intermediate vcl container for these welded floating toplevelsCaolán McNamara
Change-Id: I4a528485de62a0e0acabd41abf6872e2f0e1710e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111567 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-26loplugin:refcounting in svlNoel
Change-Id: I0009464121faf6dd36793b031d892f492b56187c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111544 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-26tdf#118711 doc import: don't hardcode default page descriptionJustin Luth
well, at least not at the beginning of the document. This is a .DOC followup to the 7.1 .DOCX patch in commit 8787a45f9cbb5dce61b20817ef0e549b5a227a95. The problem with specifying is that it becomes a property of the paragraph - and so if the paragraph is copied or moved, the page break comes along with it and the user has to remove the unnecessary page break wherever it lands. Since the default will be applied anyway, there is no value in specifying it. In DOC, it appears that the first page is ALWAYS set to the default page. I tried to create a title page/first page page style, but it always round-tripped as default page. That makes it easier, with only specified page number exception. Change-Id: Ie2e5ec42331d66f1883fc7b96fcefceb6d32c73d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111240 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-02-26tdf#134940 sw: fix AutoCorrect of arrow "-->"László Németh
Fix bad replacement of "-->" with "–>" instead of "→" (i.e. premature replacement of "--" to n-dash) since '>' was added to IsAutoCorrectChar(). Regression from commit 57f07b1d7378d218648667c5b1315cc8ad905875 "tdf#133524 AutoCorrect: support double angle quotes". Change-Id: I06f0cddb48d13c8e230dab964f79f588799ed4ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111527 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-02-26tdf#131522: sw: Add unittestXisco Fauli
Change-Id: I8920f12c655b7106a3eb2a5a3916793453c3694a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111569 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-02-26tdf#124176 Use pragma once in sw/source/core/textSuhaas Joshi
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 Joshi
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-25allow use of FloatWinPopupFlags without including complete floatwin.hxxCaolán McNamara
Change-Id: Ica412938ead6f213668b3aa876bff81d8f512f1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111526 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-25sw: fix incorrect loop condition in SwTransferable::isComplex()Miklos Vajna
We're not consuming hints in that loop, so we want to end when the iteration ended, not when the list of hints is empty. Change-Id: I2cb735c03c3551f7b0be8b314183780eedff9ecf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111519 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-02-25tdf#136570 OOXML import: fix height of OLE objectsAttila Bakos (NISZ)
e.g. OLE icons or math formulas by skipping unset border properties. Regression from 636d16efe45a55c1a5a7a451c46fbb8618bf0393 (tdf#135653 OOXML import: fix OLE background color). Change-Id: I64bd68037d063de81fbb302b90d65b77af50a622 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111119 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-02-25tdf#140572 writerfilter: ignore position in docDefaultsJustin Luth
Despite the documentation saying that anything in docDefaults should apply everywhere unless it is overridden in a higher priority style, the subscript/superscript setting in docDefaults seems to be ignored. Makes sense in a way, but perhaps document those exceptions? I looked for documentation in both "docDefaults" and "position" and didn't see anything suggesting why it is ignored. Change-Id: If676415b112921e4cb8f7306b8c8ad93a6fd8cde Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111442 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-02-25adjust tooltip in Save as dialogSeth Chaiklin
Change-Id: Id54442ce9e65ab1dea010d762b989210f69f6e8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111427 Tested-by: Jenkins Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk>
2021-02-25tdf#115815 sw: fix lost annotation ranges of redlinesLászló Németh
Annotations of tracked deletions lost their ranges during ODF export, according to the limitation of ODF or its recent implementation. As a workaround, save and restore the start of the annotation ranges using temporary bookmarks (which can be part of text:deletion). Note: maybe it's possible to split redline ranges regarding to the start of the annotation ranges, mixing tracked deletions with normal text or tracked insertions, but this would be a not backward compatible solution, because the ODF import of this file inserts extra (not tracked) spaces around the annotation, losing the original text content. Change-Id: I786993a05ee1683076e213374a92969d1856cf8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111489 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-02-25tdf#133473 Change SDRATTR_SHADOWSIZEX flag.Gülşah Köse
SDRATTR_SHADOWSIZEX holds a percentage value. So we shouldn't use METRIC_ITEM. Change-Id: I9f1a20d5871f60d2899ef7d525f4cf837b0a9088 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111311 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
2021-02-24tdf#138271: sw: Add UItestXisco Fauli
Change-Id: I9bfa7e83fcafe9b809daf93e5a41bc74c9d5e3f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111501 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-02-24tdf#139486: sw: Add UItestXisco Fauli
Change-Id: I250bd21d1ffb7f2076ef08a1d69c0c6929e8420f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111492 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-02-24crashtesting: assert of unbalanced tags on exporting tdf94591-1.odt to docxCaolán McNamara
because tdf94591-1.odt has coordinates we can't parse, resulting in nulls where the export expects a number and the exception is thrown causing close tags to be omitted, put the coordinate parsing into an exception block of its own so the close tags are emitted Change-Id: Ibf17e6204f360d5c9266ed010e25f9455de2d22b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111493 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-24tdf#140572 docx export: avoid DocDefault superscript crashJustin Luth
This fixes a crash situation introduced in LO 6.4 by commit d71cf6390a89ea6a4fab724e3a7996f28ca33661. The crash was occurring when the DocDefaults were being exported. Since there was no character or paragraph context, the lookup of the related fontsize was crashing. Moving this variable closer to where it is used "just happens" to fix the crash. Because the DocDefault is considered a style, we are just exporting the superscript/subscript as a default size, and so don't need to know the font size. Thus a style-context position can't cause the crash again. So it isn't a great fix, and leaves the possibility for the same thing to happen in other situations (like RES_CHRATR_BACKGROUND), but at least it quickly solves this known problem, and is easily backportable, as well as following best practice of keeping variables as close to where they are used as possible - eliminating some unnecessary lookups. I did look for a more generic fix (or whether other properties could be affected) and didn't come with any clear examples or a better fix. Change-Id: I03dc3d74a5148973c065cadb09c5c79068f12df1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111403 Tested-by: Jenkins Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2021-02-24tdf#138701: sw: Add UItestXisco Fauli
Change-Id: I3a7ef6742d647b71a63746384daf415d77a495b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111486 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-02-24tdf#140239: sw: Add UItestXisco Fauli
Change-Id: I140cc21fa5682f1dd869da0f135337b97c3e38cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111485 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-02-24tdf#140567 don't grab focus to outline content visibility buttonJim Raykowski
when pointer is on an outline frame. Change-Id: I9a9d406340a88c24f959445b570ab1f02dffbef8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111367 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-02-24tdf#124176 Use pragma once in sw/source/core/textSuhaas Joshi
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-24Fix typoAndrea Gelmini
Change-Id: I3f3d867ef7fd930119f917c1be6e25a8c59bbf21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111365 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2021-02-24crashtesting: iterators invalidated during loop with tdf94598-3.docxCaolán McNamara
Change-Id: I27fbf1ba578724bb15eadf14db19db62bbd5fc40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111484 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-24tdf#140198: sw: Add UItestXisco Fauli
Change-Id: I0cb7286355883dc67b5bcde5ef43046dce224da1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111476 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-02-24sw: make sure g_DefaultAnchor is in sync with aPropNamesMiklos Vajna
This was already the case for one setting, but the same was not done when the default anchor setting was added, fix this now. Change-Id: Ia0cfa20468673117ff6580b270801e6605537ab6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111473 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-02-24tdf#140486: sw: Add UItestXisco Fauli
Change-Id: Ie4ae878beed0a298388db29cfecfa537013166c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111472 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-02-24uitest: no need to pass the parent as a parameterXisco Fauli
Change-Id: I750b5600d3e4ef8ba5a0666133b9066904b4cbec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111450 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-02-24tdf#134432 remove .uno:CharBackgroundExt from Writer UISeth Chaiklin
Tooltip is "Highlight Fill", but the .uno has no effect in a menu or toolbar. Remove from Customize menu. Remove from WriterCommands.xcu because no longer used in Writer UI. Change-Id: Id6447c09eb52bb9204fe4f1b4842d712ede19d7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111177 Tested-by: Jenkins Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk>
2021-02-24tdf#140397 make contenttoggle button visible again in all backendsJim Raykowski
fixes regression introduced by commit b80c2745c50d064ad9e673cf8a5b73aaf0aa1778 Change-Id: Ib93a0c1b203f399f4f64681aac8e1f76509bcc63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111439 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-02-23loplugin:unusedmethodsNoel
Change-Id: Ie0534244cc7a30ad006e65baf125c59757c90d50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111388 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-23loplugin:constantparamNoel
Change-Id: Ieaee9a3e3ef4aa9bc390ddb198ee1718f635bcbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111391 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>