summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2021-02-05Avoid test_tdf139301 hanging upon failureStephan Bergmann
At least in my local Linux build, UITest_writer_tests7 UITEST_TEST_NAME=tdf139301.tdf139301.test_tdf139301, as introduced with 183c06fc02a50fb117bb6162e4d6e56cdd34fad1 "tdf#139301 fix OOXML-compatible preset dash styles", consistently fails (for whatever reason) with > FAIL: test_tdf139301 (tdf139301.tdf139301) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "~/lo/core/sw/qa/uitest/writer_tests7/tdf139301.py", line 40, in test_tdf139301 > self.assertEqual(style, styles[i]) > AssertionError: 'Dash Dot Dot' != 'Dot' > - Dash Dot Dot > + Dot and then would hang in tearDown (presumably because the self.ui_test.close_dialog_through_button(xOKBtn) line would be skipped due to the AssertionError being thrown). While this commit does not fix the failing test, it at least makes it no longer hang. Change-Id: I80fd88d1668b162166a971f1a7bef1b5f965c421 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110452 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-05Removed executable permission on filesAndrea Gelmini
Change-Id: I99a689398865cb424be1c363906b11c159d3debb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110430 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2021-02-05Fix typosAndrea Gelmini
Change-Id: I51a158b2dafc7eb37f374f338968941e53b7c74d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110429 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2021-02-04Fix typo in codeAndrea Gelmini
Change-Id: I50bc2e4909bc34b431fcff8047b9184fa5cd7d9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110267 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2021-02-04sw: fix copying and deleting of table in section via APIMichael Stahl
This is a follow-up to 7ab349296dac79dad3fec09f60348efcbb9ea17e. The first problem was that tables that contain protected cells refused to be deleted, which caused an infinite loop in SwXTextRange::DeleteAndInsert(). This also affected SwXTextTable::dispose(), and DDE tables. Fix this by forcibly deleting even protected cells from UNO APIs; protection is an UI feature. The second problem was that pasting the table SwFEShell::Paste() would set up aCpyPam so that it selects from the start node of the table to the last text node in the table, excluding the table cell and table end nodes, which caused: DocumentContentOperationsManager.cxx:3548: An insufficient number of nodes were copied! Fix this by setting up aCpyPam over the entire body section of the clipboard document. Change-Id: I8c6caee5e75260dff79f106efc11f9669feddc0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110411 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-02-04tdf#91920 sw page gutter margin, from top: add doc model & UNO APIMiklos Vajna
Do this per-doc, rather than per-page-desc, because Word doesn't support it per-section, so we would just create interop problems for ourselves with supporting it per-page-desc. Change-Id: Id3c6aac7323deb8d27bab08675ff623f90a63cd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110423 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-02-04have one set of twips<->mm conversionsNoel
Change-Id: I510f4a0524a7c72eb124cba103cbf398024976d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110407 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-04Fix typoAndrea Gelmini
Change-Id: I7cc5e98fe967da00228c1540ac28a0074e6d5e4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110344 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2021-02-04tdf#138512 sw: fix crash on textbox alignmentAttila Bakos (NISZ)
Regression from 3347d71b23595919e167bd49932675e77cbbdbbb (sw: fix text position at textbox alignment) has been fixed by this commit. Hopefully there won't not be newer regressions. Please note the crash only occur on GTK vcl backend so, the py-test only with that case will show the problem. In the other case there were no crash. Change-Id: I3280547a6195e240e5b33e0d0931fb60d4d19fff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109669 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-02-04tdf#136059 OOXML export: fix shape wrap "Contour"Attila Bakos (NISZ)
Custom shapes lost their contour setting, e.g. the text was wrapped around the bounding box of a diamond instead of the shape. Change-Id: Ic1e276b8957751aad95cc2624e9f54dcb853ddad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108930 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-02-04tdf#136516 add positioning to SwTextBoxHelper::syncProperty()Attila Bakos (NISZ)
Before when the shape of the textbox moved, the anchor and the position synched. However if the new position of the shape required new anchor position, that was not handled. In addition after positioning and new anchor position the sync is necessary again, because anchor moving can change the calculated position values and that can change the anchor etc... The OOXMLImport test modification was necessary because a test failed during Jenkins tests however there was no difference between the test document before and after the fix. In addition I can not reproduce the fail of the test in my local repository, and only the Linux- and Windows builds showed the problem. Solved also tdf#138951, tdf#139686 and tdf#139092. Change-Id: Ibdfff89db01d75aeae74948e2ea41ce5a613b6fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109365 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-02-04use more getSdrObjectFromXShapeNoel
Change-Id: Ia237643ab040425f231f781c86e7e060f0b53717 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110400 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-04tdf#91920 sw page gutter margin: add RTF filterMiklos Vajna
Map between \gutter and SvxLRSpaceItem::m_nGutterMargin. Change-Id: I40303f87f59d18e04beb016869dc2a8f3c7da755 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110401 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-02-04use more StaticWhichCastBjoern Michaelsen
- 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-04tdf#137513: sw: Add UItestXisco Fauli
Change-Id: I21251337252688e1bc605587656a4c3e0631e594 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110393 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-02-03Fix typosAndrea Gelmini
Change-Id: I59f3229f68056fd2c3861ef44b0d803ed956891c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110266 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-02-03tdf#139301 fix OOXML-compatible preset dash stylesLászló Németh
Despite the purpose of the new interoperability styles added in commit b2d8093b19642038631dfb8f1ab6745a380a652c (tdf#127499 added 9 new line styles all are (var) and in line with MSO), collision with commit 57c9bdab377a00649299d1a4c9ed2f9e5e03b84e (tdf#127166, tdf#123903 improve import/export of line styles) resulted still missing interoperability on the user interface: 1) opening an OOXML document, preset styles weren't recognized on the UI, also the preview was a solid line on the Drawing Object Properties toolbar. 2) using the new compatibility preset styles, OOXML export resulted custom styles instead of the intended preset styles. On the UI, now the layout of the first 10 preset dash styles follows the OOXML standard, see 20.1.10.49 ST_PresetLineDashVal (Preset Line Dash Value) in ISO/IEC 29500-1, 2016: dash pattern name (OOXML name) 10 "Dot" (sysDot) 1000 "Long Dot" (dot) 1110 "Dash" (sysDash) 1111000 "Long Dash" (dash) 11111111000 "Double Dash" (lgDash) 111010 "Dash Dot" (sysDashDot) 11110001000 "Long Dash Dot (dashDot) 111111110001000 "Double Dash Dot" (lgDashDot) 11101010 "Dash Dot Dot" (sysDashDotDot) 1111111100010001000 "Double Dash Dot Dot" (lgDashDotDot) Note: add missing "Dash Dot Dot" (sysDashDotDot). Remove "Double Dot": it really wasn't an OOXML-compatible preset style, and it has a good replacement among the older styles, the similarly loosely dotted "Fine dotted", which is still supported for back-compatibility. Note: to start the new UI test, use $ (cd sw; make -srj8 UITest_writer_tests7 UITEST_TEST_NAME="tdf139301.tdf139301.test_tdf139301" SAL_USE_VCLPLUGIN=gen) Change-Id: Ifc3fa634f2170aada61632e0a419d35dcaaf5ef6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110386 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2021-02-03adjust tooltips in Bullets and Numbering dialogSeth Chaiklin
removing the "tooltips_text" from context, which may have prevented the tooltips showing in the dialog box. Change-Id: I967914a9c896a5f32492e7a767d73a28c685a139 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110305 Tested-by: Jenkins Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk>
2021-02-03tdf#91920 sw page gutter margin: add DOC filterMiklos Vajna
Map between sprmSDzaGutter and SvxLRSpaceItem::m_nGutterMargin, but leave the fRTLGutter and iGutterPos cases alone for now. Change-Id: I6f2ede619a8ea47404c4c37480b0e6d886cf5fce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110382 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-02-03enable hyperlink to be detected at the end of textPranam Lashkari
now in online hyperlink popup will appear even when the cursor is at the end of hyperlink text Change-Id: I80a1a093afa11e39236693f8a2639741f74c9876 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110227 Tested-by: Jenkins Reviewed-by: Pranam Lashkari <lpranam@collabora.com>
2021-02-03tdf#91920 sw page gutter margin: add ODF filterMiklos Vajna
Note that the context filter is not set, since fo:margin affects left margin, but should not affect the gutter margin. Also put the new entry at the end, but before the header and footer sections, so the attribute is written to the correct XML element. Change-Id: I3588d4e76cd713efed168eb93b9456bba96727fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110375 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-02-03tdf#139667 add tooltip to Outline & List tab in Paragraph Style dialogSeth Chaiklin
Change-Id: I9f6b4d9fbfd2638b847bdc5a2555aeab18f4583a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110304 Tested-by: Jenkins Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk>
2021-02-03tdf#139667 new "Outline & Numbering" label in Paragraph dialog + tooltipSeth Chaiklin
Change-Id: If18a74d6af734383c99a6fe92b1f79a3612bf34a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110303 Tested-by: Jenkins Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk>
2021-02-03tdf#91920 sw page gutter margin: add DOCX filterMiklos Vajna
- import: convert the gutter twips value to mm100, then map it to the GutterMargin property of the page style - export: map SvxLRSpaceItem::m_nGutterMargin to <w:pgMar ... w:gutter="..."/> Change-Id: I971d32ffe4e67c2c5a5518b5aa63cb8514e04e2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110345 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-02-03tdf#91920 sw page gutter margin: add layoutMiklos Vajna
Handle this in general by decreasing the print area of the page frame, that way the position and size of the child frames (header, body, etc) will be correct. One catch is that the page border is independent from the gutter margin in Word, so compensate for it in lcl_CalcBorderRect() have matching render result. (E.g. 1cm gutter margin, 1cm left and right margins, then we would default to drawing the left margin at 2cm from left edge, but 1cm is wanted.) Change-Id: I41a697e8230c975e7665a06c7b739df04826e9a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110339 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-02-02sw page gutter margin: add UNO APIMiklos Vajna
SvxLRSpaceItem is used for all sorts of left/right margins, but gutter only makes sense for pages, so only expose the gutter margin in the page properties. Change-Id: Icfca2499e944081b70bbdbc4c62e78cade25f5c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110322 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-02-02tdf#121842 sw: add hyperlinks to toxmarks in ToC/User-Defined IndexMichael Stahl
The toxmark is identified by the type of index, the name of the index type (only for user-defined; there is only one ToC type), the text (either text:string-value or text content of the toxmark), and a counter to distinguish marks with the same text. Both text and type name can contain arbitrary characters so use U+0019 control character as separator. Links look like: #1%19text%19Utypename|toxmark Change-Id: I5aeec727e2cd3a02d676cf3ea4c302bf7c77d319 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110091 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-02-02verbs can be sal_Int32 instead of tools::LongCaolán McNamara
Change-Id: I51c88b837928760c72b77de1535f7843b4fd575e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110318 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-02sw: Check for supported locale in test_tdf66043 (spelling)Ilmari Lauhakangas
similar to test_tdf46852(). Change-Id: I10aada93415231a97d44413c1374d42534bb7371 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110253 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-02-02loplugin:redundantcast catch more dynamic_castNoel
Change-Id: Ia28e58217cefa306567b53688d851fa210b7821c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110287 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-02tdf#138870 sw: fix Track Changes toolbar reappearingLászló Németh
on Save automatically. Now force enabling only on creating a new View instead of depending on the state of document modification (which is "unmodified" after saving the document, too, not only on load). Follow-up of commit afbbfb3b55beb937555a972d9edbb47ede91001a (tdf#83958: sw: enable Track Changes toolbar automatically) Change-Id: I8e074dadc4ec1280924ef88f589302c9e8dfc6e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110278 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2021-02-02tdf#140078 change Text Frame string to Frame in Undo/Redo action labelRizal Muttaqin
Change-Id: Ic3e011fae80cc94cc5fb8e94abec18bc937dec5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110279 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2021-02-02tdf#139667 Numbering->Ordered / Bullets->Unordered in dialog + tooltipsSeth Chaiklin
* change "Bullets" tab label to "Unordered" * change "Numbering" tab label to "Ordered" + Add tooltips for "Ordered", "Outline", "Graphic" "Position", and "Customize" tabs Change-Id: I5338180fd659aa10ca70b70e2d6daf2b8894d4af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109891 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2021-02-02tdf#139667 updating of "Numbering Style" dialog to "List Style"Seth Chaiklin
* change name of "Bullets" tab to "Unordered" * change name of "Numbering Style" tab to "Ordered" + add tooltips for "Ordered", "Outline" "Image", "Position" and "Customize" tabs Change-Id: Ie960b28847092d6e5ad22b1e0abe41184309586b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109890 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2021-02-02tdf#139667 change "Numbering" labels to "List" in Paragraph dialogsSeth Chaiklin
* This patch modifies the dialog box for Paragraph and Paragraph Style to use "List Style" instead of Numbering Style. * It also updates and adds some tooltips to this dialog box. * The "Outline & Numbering" tab is changed to "Outline & List" Change-Id: I2770a279b92f4c86b12373216301c6ebe0f2baf4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109886 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2021-02-02Fix typo in codeAndrea Gelmini
As per request in comments here: https://gerrit.libreoffice.org/c/core/+/108661 I don't remember if it was already corrected and rejected. Anyway, this is massive and it compiles on my laptop. Let's see adding devs. Thanks a lot to Seth! Change-Id: I27d1fe1dccecd6644304fc6c3c2feb8413598285 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108816 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2021-02-01sw lok: disable field shadingsMiklos Vajna
There are two problems with it: First, the field shading is rendered behind bullet portions depending on the cursor position (if the cursor is before the bullet, then we render it; but not if the cursor is after the bullet), and tiled rendering assumes that the render result is independent from the cursor position. Second, field shading is always painted directly (not going via invalidation), so it's possible to end up with one tile showing field shadings and another not, which is inconsistent. And even if it would be there consistently, that would mean a lot of unnecessary invalidations. The alternative would be to disable this from online.git's loolconfig.xcu, but the item's path would end with something like "ColorScheme['LibreOfficeDev']/WriterFieldShadings", which means it's not easy to do this in a way that's independent from the product name. Change-Id: I23c62acc3c15966cfba98fcee99cc96854ba4394 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110263 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-02-01tdf#140029 change Text Frame string to Frame in Navigator's Navigate ByRizal Muttaqin
Change-Id: I4cf2bd4777a1bb009579df1e6399d1e44f0f3e76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110237 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2021-02-01sw: don't repaint all text frames on selecting and deleting several bulletsMiklos Vajna
This is similar to disabling bullets for a paragraph, but in this case the text nodes are deleted as well. It seems to me that both invalidations are only useful in the numberging (e.g. Arabic) case, and not in the bullet case. Change-Id: Ie03e2847e5e50d9464399f4ea0840910e43a663a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110240 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-02-01sw: prefix members of FormatLevel, SwNumberPortion, SwPostItsPortion and ...Miklos Vajna
... 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-02-01use symbolic names for outline content visibility menu items idsJim Raykowski
Change-Id: Ic0b5d6c59cf601b21a8bedd9b9cab17014ea25b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110189 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-01-31drop call to SetQuickHelpText() with empty stringCaolán McNamara
because the QuickHelp is never set to anything non-empty. Before commit commit c230e962ca2c876187a028fa14426210b5746a0f Date: Tue Jan 12 10:43:45 2010 +0100 sw33a11y01: #i88070# refactoring of sidebar window code used for visualization of comments/annotations SetQuickHelpText was called with a non-empty string in one branch so SetQuickHelpText cleared it again, but now its always empty Change-Id: If4635e899b27ce16fd0aa25254f33415142f9718 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110165 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-30tdf#134619 docxexport: don't skip font properties in NumberingLevelJustin Luth
This partially reverts LO 6.4.5 commit 598ca431de96d8bfcf18fa2945e9e30f98387474 The output set can contain more than just the font name. Things like colour and fontsize were being lost when the "else" clause was added. Since it looks like the main intent of the else clause was to avoid specifying a font name twice, erase that from the property set before writing out the rest of the font properties. There is a unit test that enforces that. (I was not able to reproduce the original problem that this was trying to fix. The entire commit is hard to revert, and I will assume that the rest of the commit is useful/accurate, so just fix up a careless portion of the commit.) Change-Id: I772e40e8bd75c0589f3308d4d7470229855aed8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110034 Tested-by: Jenkins Reviewed-by: Vasily Melenchuk <vasily.melenchuk@cib.de> Reviewed-by: Justin Luth <justin_luth@sil.org>
2021-01-30don't scroll to cursor during GetSurroundingTextCaolán McNamara
lock against scrolling to cursor if the IM requests the surrounding text around the cursor seen on launching a menu from a sidebar comment's menubutton in writer if the cursor is a scroll-off page position in the main document Change-Id: I325004987f576df65188629bf6fb63e0ed0be9bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110153 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-30loplugin:finalclasses in swNoel
Change-Id: Ib939c1f34ae79abfc077080d2c2561ee0ee4a4fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110156 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-29remove SwCache bookkeeping from SwModifyBjoern Michaelsen
- only very few classes (SwNode, SwFormat) are the "owners" of SwBorderAttrs in the SwCache - this bookkeeping should not be in such a fundamental class of writer - also: encapsulate most of the interaction with the cache in the new sw::BorderCacheOwner. This is mostly to protect the innocent user: * As interacting with the SwCache directly is very errorprone, because its glorious idea of using void* of the "owners" as keys to the entries. * In C++, reinterpret_cast<void*>(this) might be different along the class heirachy. This might easily slip under the radar of a casual user. Change-Id: I0da774b47885abf52f63aab8d93ebbf41dcf8040 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110112 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2021-01-29sw: don't repaint all text frames on turning off a bullet for bullet numberingsMiklos Vajna
This is similar to the text node deletion case, but here no text is deleted, just a text node with bullet numbering is turned into one without a numbering. Again, it is not necessary to repaint all text frames of the numbering, since the bullet char is the same for all nodes (unlike e.g. Arabic numbering). Change-Id: Ieb071031ca5ce0421c4120c4c89089af6c811848 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110125 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-01-29tdf#75923 "Always Correct" to "Add to AutoCorrect" in Spelling dialogSeth Chaiklin
* improve choices for accelerator keys + add tooltip for "Add to AutoCorrect" + add missing extended tip for "Add to Dictionary" * change "Always correct to" to "Always AutoCorrect to" in Spelling context menu. + add tooltip for "Always AutoCorrect to" Change-Id: I54428fcd03ed7205a503935c77a7e08f9682bb1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109809 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2021-01-29loplugin:stringviewparam extend to new..Noel
O[U]StringBuffer methods Change-Id: I0ffbc33d54ae7c98b5652434f3370ee4f819f6f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110090 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-28sw: fix SwTOXMgr::UpdateOrInsertTOX() for user-definedMichael Stahl
The main problem is that when editing an existing user-defined index, the "Create From" changes aren't applied, because it does pCurTOX->SetCreate() and not pNewTOX->SetCreate(). But that wasn't obvious as the function is obviosly very confused about its 3 different TOX variables. pTOX is just used at the end, so just move it there. pCurTOX can be const. Then there is an odd condition on pSh->HasSelection() which ends up doing DelRight() but fortunately it's dead code since commit e9da29679bce3b544add9233a4aca2b19b78da1a #i97572# cleared the selection already. The pNewTOX = pCurTOX there seems pointless because pNewTOX is already a copy of *pCurTOX. Change-Id: I1e9c8178e314a188a50272410fbe566e4a566742 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110021 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>