summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
22 hourstdf#114799 Char highlight: skip convert if highlight existsJustin Luth3-1/+58
Don't create two w:highlight entries. This can easily occur on the endParagraph properties when the user has replaced the background color. A "none" highlight is added, the charShadingMarker is removed, and a new background color is added. So the new background tries to export as a highlight, even though the none-highlight overrides it. This depends on this bug's earlier commit, which added the context so that HasItem can even find the highlight. Change-Id: Ibfd6a3b9b94bdeb1fd9ec46fbb71ec825b09a680 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111297 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
3 daystdf#114799 Char highlight: don't convert imported shadingJustin Luth2-1/+20
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>
5 daystdf#138345 Char highlight: numbering needs charstyle props highlightJustin Luth4-2/+10
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>
9 daystdf#135774, tdf#114799 Char highlight: apply to numberingJustin Luth6-9/+48
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>
2020-12-02tdf#138345 ms formats Char highlight: no import into char-styleJustin Luth7-3/+24
MS Word ignores w:highlight in character styles, so don't import it. RES_CHRATR_HIGHLIGHT only exists in LO in order to support Microsoft's terrible idea of allowing two different attributes to define char background colour. So it should be safe to remove it from UNO. Change-Id: Ia2ee0bd61ee59dfa864e946024c8184747aa2b40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106183 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-12-01tdf#137683 sw ms formats Char highlight: export "none"Justin Luth8-14/+69
NONE settings need to be exported in order to cancel out a CharHighlight set at a higher style level. This patch has two main parts. 1.) Export none for DOCX/DOC/RTF 2.) Only export necessary "none" highlights. I am unpleasantly surprised that I did not find any existing functions that avoided spamming unnecessary settings into the export. Perhaps in the default case things are more complicated, but in this case, only paragraph styles are expected to have any hierarchical impact. This could be made into a more general function at some point, but at the moment I don't have anywhere else to apply it, and I would be terribly afraid to try to add it at some general level... Imagine the regressions. Change-Id: I83e5e3496e3ad78c8e2698a6b331c871f842f259 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106315 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-30tdf#137683 writerfilter Char highlight: import "none"Justin Luth3-1/+10
Importing a charHighlight of NONE is critical, since charHighlight can be set on a higher para-style, and so there needs to be a way to cancel it with direct formatting. DOC already imports NONE. This adds it for RTF and DOCX. (None of the formats EXPORT it though. So that needs to be done, but try not to spam NONE settings where they are not necessary, please.) Change-Id: Ic5d03ceb81a3a079c827b81561deb9068ae8259e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106314 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-27tdf#138345 sw ms export: Char highlight: no export to char-styleJustin Luth3-0/+53
MS Word ignores w:highlight in a character style. It only accepts it as direct formatting or in para-styles. So never export the character background as w:highlight, but always as w:shd for character styles. Change-Id: I7c9f4f00d957a8add848746051d3c4b1522d1520 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106182 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-26tdf#131920 sw UI Char highlight: editing via Para-style highlight tabJustin Luth3-4/+19
Modify character highlight using paragraph style dialog's new "Highlight" tab. Extends 5.0 commit 15931deb7e4689cd885ff05439bab381f0478b2f to also work in the para-style dialog. Prior to 4.4, the background tab supported char background but that was lost when the area tab replaced it, and therefore there was no capability at the time of 5.0. This highlight tab didn't exist until 5.1: author Zolnai Tamás on 2015-06-16 22:25:38 +0200 commit 9874db206eed84616e4e232b1b56c7b7532166a0 tdf#90072: No character background (highlight) tab in paragraph styles dialog Background Tab was replaced with Area Tab on Paragraph Style Dialog. With that we lost the opportunity to set character background color. So bring back the Background tab as Highlighting. Change-Id: I916a91ea4f2ce77a8c501ecea5fd25811c5c3cd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106323 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2015-03-21Char highlight: convert LO character background to MSO highlightingZolnai Tamás12-83/+174
DOC export has a good approximating algorithm for that so use it everywhere. In RTF case use the default color table which is added also by MSO Word. With that highlight colors are also added to the table. Change-Id: Ie4827a933c316d4dc0c0c7a32d8cf319477d1bf9
2015-03-21Char highlight: test related to editing of MSO background attributesZolnai Tamás2-0/+117
Change-Id: I39828754284b0e3d43d043a9695f81d404b4e0aa
2015-03-21Char highlight: editing by "Highlighting" buttonZolnai Tamás1-2/+52
Change-Id: I9581da0631643199a9c076990bf689d54dbadf8c
2015-03-21Char highlight: export character background to MSO formats based on settingsZolnai Tamás3-1/+20
Change-Id: Iaaf9e7ee5e61cfabb0d675b83fa71776dece87e2
2015-03-21Char highlight: option about export LO character background to MSO formatsZolnai Tamás6-3/+158
Export as highlighting or shading. Highlighting is the default. Change-Id: Ib2a38e4cd0d49317288bb565383b690d4222c8ed
2015-03-21Char highlight: editing by Character Properties dialogZolnai Tamás1-7/+26
Modify character highlight using character dialog's "Background" tab. Change-Id: I693aebe1915e6b77af9919acf223fb2c87608516
2015-03-21Char highlight: ODT filtersZolnai Tamás5-10/+52
Export merges the two background attribute. Change-Id: I882321fbd5a7d24991fb01b8dc9d2cc0bd294051
2015-03-21Char highlight: DOC filtersZolnai Tamás4-10/+23
Change-Id: Ia609425f6753796091d4dfdfae8e621c062e0c15
2015-03-21Char highlight: RTF filtersZolnai Tamás12-202/+106
Handle \highlightN and \chcbpatN separately. Change-Id: I20546bd4c26154e8b1168f87dcb4ab44a192ad83
2015-03-21Char highlight: enable DOCX importZolnai Tamás2-3/+3
Disabled by: b5e60724ac73bb0e62b249145a8931fd6166bb69 Change-Id: Ifde33d53198306eac845db6c269d337fa051f6ab