summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)AuthorFilesLines
2020-06-05crashtesting: null derefCaolán McNamara1-1/+2
#0 0x00007f22b35213f0 in SwFrame::getRootFrame() (this=0x0) at sw/source/core/inc/frame.hxx:659 #1 0x00007f22b3c26a7b in SwPageFrame::RemoveFlyFromPage(SwFlyFrame*) (this=0x0, pToRemove=0x55bbdbfca920) at sw/source/core/layout/flylay.cxx:905 nOrdNum = 2 #2 0x00007f22b3c3372e in lcl_RemoveObjsFromPage(SwFrame*) (_pFrame=0x55bbddac3ba0) at sw/source/core/layout/frmtool.cxx:2699 pFlyFrame = 0x55bbdbfca920 pCnt = 0x0 pObj = 0x55bbdbfcaa10 __for_range = @0x55bbdbd94e60: {maSortedObjLst = std::__debug::vector of length 1, capacity 1 = {0x55bbdbfcaa10}} __for_begin = 0x55bbdbfcaa10 __for_end = 0x55bbdc14da6e rObjs = @0x55bbdbd94e60: {maSortedObjLst = std::__debug::vector of length 1, capacity 1 = {0x55bbdbfcaa10}} commit a96014f1365e411d700a7119dca63cdbb51931dc Author: Caolán McNamara <caolanm@redhat.com> Date: Wed Feb 6 12:34:26 2019 +0000 Resolves: tdf#123163 avoid null deref one RemoveDrawObjFromPage is already null-deref protected, do the same for the other Change-Id: I0e5a58aa35af82bec8a7e3dc1fb361cfa17e3730 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95452 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-05tdf#83309: docx import: allow for lists tabstop at zero positionVasily Melenchuk5-3/+25
Zero position is valid value for tabstop, but previously it was treated as "no tab stop defined". Right now writer distinguishes tab stop at zero postion and no tab stop. Change-Id: Ie32da3d36a263644ba85a882029a8b29ae0501c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95132 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-06-04tdf#130804: sw: Add unittestXisco Fauli2-0/+13
Change-Id: Ia0dfa1a6add423dea51bbaf896da2921183fc96c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95497 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-06-04tdf#133455 DOCX import: fix table border regressionLászló Németh2-0/+17
caused by commit 8ffc1299ebf83450e67cf2a89304859e2558cd27 (tdf#95033 DOCX import: apply tblPrEx table border). Change-Id: Ief4da3bce3282b5dab1ce4dabb4e075efcc1abaf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95504 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-06-04tdf#101211 follow-up: move cursor to start of next/prev pg UNO functionsJim Raykowski1-24/+28
This is a follow-up patch that fixes the cursor not moving to the start of the page when multiple pages are visible. The cursor move behavior is; if the cursor is visible, the page number the cursor is visible on is used as the reference. If the cursor is not visible, the page number of the first visible page is used as the reference. Change-Id: Ibdfaa763bf7283e46d8c68270dfa6b5f0012ca0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95476 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2020-06-04sw: handle SurroundTextWrapSmall when replacing compat optionsMiklos Vajna1-1/+1
This was added in commit 8f8b31abd02876c3601e343b8b3274754f8a61b6 (compatibility setting for MS Word wrapping text in less space (bnc#822908), 2013-08-06), it's off by default and on for old DOC/DOCX/RTF documents. See tdf#124790 for motivation. Change-Id: I786ea1de3feae25775055a2fb50c688ef6a6cd52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95453 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-06-04tdf#130804 sw: fix bookmark portions in line containing only as-char flyMichael Stahl1-1/+5
There were 2 problems: * due to the first bookmark portion, the line got an additional 55 twips of its descent added to its height in SwLineLayout::CalcLine(). * when called from SwTextFrame::CalcHeightOfLastLine(), SwLineLayout::MaxAscentDescent() is supposed to ignore FlyInCnt portions, but it didn't ignore the bookmark portion which had the same height, hence the resulting line spacing was 855 instead of 0 and the upper margin of the next paragraph increased similarly. (regression from 4ce8120f1e53f7b81e653b01d141643013bc69ab) Change-Id: I52b154a48c5d712b7e3e323d2e3e08f37bf1afd1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95438 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-06-04loplugin:simplifypointertobool improve (2)Noel Grandin1-5/+5
to look for the x.get() == null pattern, which can be simplified to !x Change-Id: I0eddf93257ab53ab31949961d7c33ac2dd7288ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95400 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-03Fix typosAndrea Gelmini1-1/+1
Change-Id: I111334adcf8b9b9553c585ab9669cf2cbdb909cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95444 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-06-03tdf#132420: sw: Add unittestXisco Fauli2-0/+23
Change-Id: Ic98667b688c8d865e637fb921913a2d8d57133f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95431 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-06-03loplugin:simplifypointertobool improveNoel Grandin4-16/+16
to look for the x.get() != null pattern, which can be simplified to x I'll do the x.get() == nullptr pattern in a separate patch, to reduce the chances of a mistake Change-Id: I45e0d178e75359857cdf50d712039cb526016555 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95354 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-03tdf#133569 rework the SwCommentRuler buttonJan-Marek Glogowski1-146/+132
The original design was planned in tdf#38246 and documented as: https://wiki.documentfoundation.org/Design/Whiteboards/Comments_Ruler_Control This patch includes the following changes: * use the correct highlight colors * use a down-pointing arrow for expanse with a stable position, like some tree view implementations * left-align the label in RTL for better us- / read-ability * dynamic sized arrow for HiDPI: * draw arrow using a polygon * calculate arrow size and padding based on font size * drop almost all constant values * fix the instable, mouse-over tooltip -> just show it always While at it, I found clang-format just added some minimal, additional changes, so I removed the file from the blacklist and included these. Change-Id: I6e0bade387639eae6bdaaf7960b2fe44c73adf65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/75421 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-06-03Revert "tdf#105478 sw layout: treat minHeight as "do not split row""Justin Luth3-24/+1
This reverts LO7.0 commit aa5dc0b48cd4db6883c9b52c68b16170c9c81d1f, in order to prevent regressions like tdf#133441. Change-Id: Id08f5277621703e1577fc9db917841b8b7c0bda5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95180 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2020-06-03tdf#101211 Add goto prev and next page uno commandsJim Raykowski4-0/+81
Change-Id: I7e195727066e47f93665fdebf1042282ecbb42b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91605 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2020-06-02tdf#130950: sw: Add unittestXisco Fauli2-0/+7
Change-Id: Ia4094f4f411e3f0652fbcc019594ca99ce2428cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95368 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-06-02crashtesting: fix abi11870-2.odt assert in SwBookmarkPortion::Unchain()Michael Stahl6-17/+15
This m_pPrevious pointer is a bad idea, should just use FindPrevPortion() to find it, which shouldn't take that long to iterate all the portions in the current line. (regression from 4ce8120f1e53f7b81e653b01d141643013bc69ab) Change-Id: Ibb5f2bb28d959958547ed27c51e5084cc746d642 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91622 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-02tdf#132301 AutoCorrect: fix ’« in French qu’« word »László Németh1-0/+6
instead of using the bad ’" -> ’» autocorrection. Also limit this for abbreviated single-letter form of French words ce, de, je, la, le, ne, me, te, se and si. See commit 8039c9eb27170a162830f0ecd2086010a7a5858f (tdf#38394 AutoCorrect: fix ’« in French l’« word »). Change-Id: I1761365d90ae3af3c9ab47a3a82bf0abbe1b32be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95345 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-06-02tdf#133589 AutoCorrect: transliterate to Old HungarianLászló Németh9-8/+171
In right-to-left paragraph mode, transliterate Hungarian text word by word during typing, also add the associated checkbox to Localized Options page of AutoCorrect dialog window. Old Hungarian (ISO 15924: Hung) is a historical and renewed script which is still in use to transliterate Hungarian writing. As a localized AutoCorrect feature, the patch supports the followings: – word-by-word transliteration of Hungarian texts only in right-to-left paragraph mode. – consonant disambiguation of digraphs and trigraphs based on hyphenation (now pattern-based Huhyphn dictionary of libhyphen, planned dictionary based Hunspell later) – transliteration by extended hu-Hung module of Numbertext library. Note: transliteration of the selected text using AutoCorrect Apply function has't been implemented, yet. Change-Id: Iee0f18e2485c974c35acf0a3abc3a49c2cf80196 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95303 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-06-02tdf#133271 sw textbox: handle TextRotateAngle shape propertyMiklos Vajna4-2/+35
Shape with btlr text direction is imported as TextPreRotateAngle=-270 from DOCX. Saving this to ODT turns the property name into TextRotateAngle and its type into double. Handle that as well to survive the ODF roundtrip of a shape+textbox where the textbox has a btlr text direction. (Also add a way to make multiple tests in a suite to be more independent from each other: depending on ordering, the new test made the old test fail. Calling ErrorRegistry::Reset() makes that go away.) Change-Id: Iea9212f3bbb01059caf3b0f2d809e48debf52953 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95340 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-06-02lok: add "Remove" param to .uno:ChangeTabStopTomaž Vajngerl1-5/+11
Change-Id: Ic6b71c0bb6177eb10f5be4197d77c5db5f5884a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95330 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-06-02inline some use-once typedefsNoel Grandin1-6/+2
Change-Id: I335e0c5cf7944efa487e4535a9e6a5baab2f36dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95140 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-01tdf#120394: DOCX list import: simplify zero width space hackVasily Melenchuk5-18/+49
Since introducion of list format string hack with creation of zero-width-space can be much more simple. It was being used to indicate existing, but empty list label suffix to avoid stripping down numbering. Change-Id: I9a0c6047f806b2c656ef5dbab0c6b38200818bd2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94383 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-06-01tdf#133448: sw: Add unittestXisco Fauli2-0/+13
Change-Id: I7089c56e5be0c0b8a8a23e0ebb1f64780c8d90ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95279 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-05-31tdf#128860 AutoCorrect: fix apostrophe in Czech, German,László Németh2-0/+41
Icelandic, Slovak and Slovene at "Single quotes" replacement outside of second level quotations. For example: ‚quote' -> ‚quote‘ but now apostrophe' -> apostrophe’ instead of the bad apostrophe' -> apostrophe‘ Change-Id: Ie6d367639cb80ec9f11e4d824b87f537e5285182 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95213 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-05-31tdf#133524 AutoCorrect: support double angle quotesLászló Németh2-0/+63
Add two methods to support double angle quotes, as part of "Double quotes" replacement: 1. Correct ">>" and "<<" to » and « in several languages, where double angle quotes are default or alternative primary or second level quotation marks, but actual LibreOffice locale settings don't contain double angle quotes. 2. Correct " to double angle quotes, if the cursor is there in a primary level quotation (i.e. there is a preceding primary level opening quote, but not other quotes). For example, it's possible to type Hungarian or Romanian quotation marks in „... »quote« ...” pressing only Shift + 2 (") for them. (These languages, where "Single quotes" replacement is used for apostrophe and third level quotes instead of the standard second level quotation marks.) Change-Id: Icd1584a5a2b81422de693217d2d1f7f3058a74b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95212 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-05-30ofz#22822 use TOOLS_WARN_EXCEPTIONCaolán McNamara2-2/+2
Change-Id: Iaf879d5ec52cd422634287d1fe69a4aafe13c4d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95188 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-30ofz#22775 Integer-overflowCaolán McNamara1-2/+5
Change-Id: I616350ce96e83f92beac711a59077815ff00fe50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95172 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-30CppUnittest: sw: add missing asserts in odf filesXisco Fauli5-0/+8
found by bin/check-missing-export-asserts.py Change-Id: Iec44803b9ab3b337857d2c5b636632796308321c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95179 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-05-30tdf#118579: html: Add unittestXisco Fauli2-0/+74
Change-Id: I8fe25ce6778244a235a19bab1ede299bb6e93d3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95159 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-05-30Removed duplicated includeAndrea Gelmini1-1/+0
Change-Id: I052762267bee88789e88b1b2f7ecabc192620a45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94877 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-05-30Fix typoAndrea Gelmini1-2/+2
Change-Id: Ia7b3b9d770fdaf5ba6697b4ebb23befdb51fc949 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94878 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-05-29use for-range loop on SequenceNoel Grandin1-2/+1
Change-Id: Ib2d7b21e0fa52087027c0b3b1d362693c7019ba3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93856 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-29loplugin:simplifybool in swNoel Grandin20-44/+40
Change-Id: Ib842d5a768806fc41a66802908acc8679cf7a985 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95107 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-29tdf#133453 doc import: HasSprm can return last oneJustin Luth5-18/+30
The last sprm is the one that takes effect in the rare cases of duplicate SPRMs defined, so at least have an option to return that one as the matching value. Unfortunately, that seems to have been ignored in the last 20+ years of .doc support. So I added it carefully and only enabled finding the last SPRM in the specific case I was dealing with. However, I expect it should ~always be true, so perhaps I will followup with a patch looking for examples of duplicate/different SPRMs defined. Change-Id: I5539aa3d6117380cd6d852ca165d40c7c7f3c330 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95013 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-05-29sw: ODF export: test new ODF 1.3 features exported to different versionsMichael Stahl2-0/+158
Change-Id: I57f598c39e1ffe77e351507cf661b52caa6bd4b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95141 Tested-by: Michael Stahl <michael.stahl@cib.de> Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-29tdf#131963: sw: Add UItestXisco Fauli2-0/+43
Change-Id: I44a3ce4c4a032a22882563567fdb966e6c14922c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95134 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-05-29pack a few more classesNoel Grandin11-29/+28
Change-Id: Ia7870d1d0d91de213727116ccda5b41913223866 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95097 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-29tdf#102256 sw: ODF export: oops, don't write table attributes ...Michael Stahl1-17/+17
... when not writing table itself. (regression from commit d705a860936a58e40a2894a12d02be585a06e1c1) Change-Id: I73cbb126a5c6d12399806a20cd7f4307111a6c8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95057 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-29change TreeView toggle signal to provide an iter instead of a row indexCaolán McNamara3-8/+5
Change-Id: Ib611780816d170daa40f394b9798640ff6284d68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95056 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-29Fix 983db96a17630be906b868d2be811663f0d846f6Julien Nabet8-13/+13
warn:unotools.config:172285:172285:unotools/source/config/configitem.cxx:409: ignoring XHierarchicalNameAccess to /org.openoffice.Office.Writer/FormLetter/PrintOutput/AskForMergeFormLetter/FileOutput/FilePassword/FromDatabaseField com.sun.star.container.NoSuchElementException message: FormLetter/PrintOutput/AskForMergeFormLetter/FileOutput/FilePassword/FromDatabaseField /home/julien/lo/libreoffice/configmgr/source/access.cxx:436 missing comma + confusion in switch cases in SwMiscConfig::Load + typo Encyrpted->Encrypted Author: Gülşah Köse <gulsah.kose@collabora.com> Date: Fri May 22 11:51:33 2020 +0300 Add an option to create encyrpted PDF files with mailmerge. With that option user can create encyrpted pdf files with a password column in database via mailmerge. Change-Id: I1ae9bbeb3f69ed9c0ba51709852f8edd5f2dc683 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95033 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-28tdf#133348: sw: Add UItestXisco Fauli1-0/+59
Change-Id: I8074efe8f65131c6f1ebb030c9e8cf8b9c60aaa0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95039 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-05-28sw: convert some assert in sectfrm.cxxMichael Stahl1-6/+4
Change-Id: Idf0d21ea9f0ae655584b8353140ebca4889e7fb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94945 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Jenkins
2020-05-28Resolves: tdf#133411 drop CONTENT_FLOWS_TO from dialog to search resultsCaolán McNamara3-113/+1
in the document, looks like only the calc one actually works, and when it works on large quantities of results calc grinds to a complete halt This was introduced with: commit b41332475783c31136673fb44cf4c411bb0148f8 Date: Mon Dec 2 15:54:29 2013 +0000 Integrate branch of IAccessible2 and has been a problem on and off with calc's potentially ~infinite grid There is the on-by-default search results dialog in calc (which has a limit on how many it shows) which provides an alternative route to iterate through the results Change-Id: I2685e480d2d15220be0bddbc83baad3992e7d5d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95006 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-28Related: tdf#133411 SetDocWin is using the previous search success stateCaolán McNamara1-8/+4
not the new state The order of calls probably didn't matter in the past where the use of the flag was deferred until the Accessibility data was queried which would happen in another event loop. This makes it more clear that it appears that only calc actually does anything productive here. I think this flow-to has created more trouble that its worth and I'll remove it but if we need to restore it, then this, I think, it the working state to restore to. Change-Id: Id6fbb483c081f6d5142100d70c1b29705dcb6452 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95005 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-28Make loplugin:simplifypointertobool handle parenthesized expressionsStephan Bergmann3-10/+10
...as discussed as an open TODO in the commit message of fe6cce01c88d045a1fcf09acf049c34c22299b02 "Fix loplugin:simplifypointertobool for libstdc++ std::shared_ptr". The necessary changes across the code base have been done fully automatically with the rewriting plugin on Linux. (All those changes apparently involve uses of macro arguments wrapped in parentheses in the macro body, but always in conditionally-converted-to-bool contexts. In other contexts, such automatic rewriting would add the "bool" to the macro body, which would be wrong in general, but we apparently get away with that sloppy coding for now.) The parenExprs_ stack that fe6cce01c88d045a1fcf09acf049c34c22299b02 had introduced to treat such (then-undetected, it had turned out) parenthesized cases now turns out to not be needed after all. Change-Id: I2021f61c2e2805be7e18b38edf8744d186cac3cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95010 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-28sw: handle PropLineSpacingShrinksFirstLine when replacing compat optionsMiklos Vajna1-5/+4
This was added in commit 9605763e3dc8c85137787c77c31e8639553a35ed (fdo#79602: sw: add new compatibiltiy flag PropLineSpacingShrinksFirstLine, 2014-10-30), it's on by default and off for old ODF documents. See tdf#124790 for motivation. Change-Id: If12447825ee9ed3094c5487e354eb7a0af5a46a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95004 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-05-27tdf#132236 sw_redlinehide: fix SwUndoDelete with sections even moreMichael Stahl5-3/+46
SwUndoDelete::UndoImpl may want to move something like this into the nodes-array: [ 9] 0x6356fe0 TextNode "", [ 10] 0x31cba00 ~DeletedNode , [ 11] 0x64d8840 TextNode "Introduction - xzn Overview Of KmneqxziTY\t3", [ 12] 0x64e9750 TextNode "shell\t20", [ 13] 0x7a0f0a0 ~DeletedNode , The ~DeletedNode become end nodes of section nodes; in this case m_nSectDiff != 0. Don't skip these end nodes because in the above "Untitled 1.odt" example, they are not necessarily consecutive. Between the 1st and 2nd one a new SwSectionFrame must be created via the outer section, so adapt InsertCnt_() to check for extra end nodes in the range and do this. (regression from 723728cd358693b8f4bc9d913541aa4479f2bd48) Change-Id: I7bfba9efca1789392495ebec37eb3e5b6138bd07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94883 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-27sw: dump sectionNodeIndex in layout.xmlMichael Stahl1-0/+6
useful to see if the sections are nested Change-Id: I49c92b8f3084f72a2753462724b596b07fffbe62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94882 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-27tdf#131684 tdf#132236 sw_redlinehide: fix upper of frame moved...Michael Stahl2-0/+39
... in SwUndoDelete::UndoImpl; this wasn't fixed properly in commit 6c7245e789f973cf6dad03f7008ab3f9d12d350c - the SwTextFrame was moved into the SwSectionFrame but its upper was whatever it was previously. This is rather ugly because with the constraint from the very special case of tdf#131684 the MakeFrames() requires one node with pre-existing frames, and it's not possible to move the pre-existing frame after MakeFrames() because then the tdf#132236 case will have an empty SwSectionFrame and InsertCnt_() will just delete it. So try to detect the situation with some hack in InsertCnt_() to move it into the SwSectionFrame. (regression from 723728cd358693b8f4bc9d913541aa4479f2bd48) Change-Id: Ic0199c85d7523a49676ad3df1d2c4d8fe135c2ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94881 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-27tdf#78352: docx import: allow tab at left indent for listVasily Melenchuk2-0/+9
Looks like first tab stop for list bullets is at left paragraph boundry. Luckely there is a compatibility option for this. Change-Id: Iea4bd2b51912746dbd4722ff61eeb2e9293cab31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94559 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>