summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2018-10-24weld AdvancedSettingsDialogCaolán McNamara
make run virtual and fold executes into it, so GenericUnoDialog can call run on tabdialogs to do the right thing, and allows Start_Impl to be private again Change-Id: Ic457edfbdc7457f4c49d4e8ad679903f38ad9b42 Reviewed-on: https://gerrit.libreoffice.org/62227 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-24loplugin:useuniqueptr in SwContentTreeNoel Grandin
Change-Id: I4f42497023883450a00f8b50a7dd6d30ca1cbac4 Reviewed-on: https://gerrit.libreoffice.org/62265 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-24sw: prefix remaining members of SwIndexMarkPaneMiklos Vajna
Change-Id: I60e66fe3f92c5952172323ec2d4b0dda1f2ab5f1 Reviewed-on: https://gerrit.libreoffice.org/62266 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-10-24ww8export roundtrip forms passwordJustin Luth
This was already done for docx in LO6.0 with commit 2694162969cf86ef366d3ce812fccd0630acc800 Patch initially developed to support tdf#120499 and depnds on commit 953dad97c7ef7881c2ac6d73fe5266b44b15f3e2 Change-Id: I04b0693ed1e90f70b079040030c5bd9d2ccfbf13 Reviewed-on: https://gerrit.libreoffice.org/61952 Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2018-10-24clang-tidy performance-unnecessary-copy-init in swNoel Grandin
Change-Id: I515e3e8ddaee3e3ddc4bf3827fb85f3489e84539 Reviewed-on: https://gerrit.libreoffice.org/62253 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-23remove all use_action_appearance linesCaolán McNamara
Change-Id: I031676e939f53a28b1a62654ffe0a91b95dea029 Reviewed-on: https://gerrit.libreoffice.org/62234 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-23Frame Contextmenu in Writer and other sw appsandreas kainz
use ObjectAlign as a Frame is an Object Change-Id: I3afd1aa08e713ae919dde8b57811a5e8cbaa4b24 Reviewed-on: https://gerrit.libreoffice.org/62198 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2018-10-22pvs-studio: V763 Parameter always rewritten in function body before being usedCaolán McNamara
Change-Id: Ifd3b8b2a66a2257220f0596d31f5b545d416c748 Reviewed-on: https://gerrit.libreoffice.org/62186 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-22pvs-studio: silence dodgy V763 Parameter always rewrittenCaolán McNamara
Change-Id: I4939b77dd733a6502d9a4c8e04305764ce56f3b8 Reviewed-on: https://gerrit.libreoffice.org/62187 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-22tdf#119596 DrawText Contextmenu in Writer, Calc, Draw, Impressandreas kainz
and all other sw modules Change-Id: Ifd7161f58170f32555134250b91e537eeada3c99 Reviewed-on: https://gerrit.libreoffice.org/61988 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2018-10-22tdf#119506 Draw Contextmenu in Writer, Calc, Draw, Impressandreas kainz
and all the other sw modules Change-Id: Ie407f858bf1d17f3af4c2948fcd4cb40bc9e8c92 Reviewed-on: https://gerrit.libreoffice.org/61963 Tested-by: Jenkins Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
2018-10-22tdf#119547 Media Contextmenu sync in all appsandreas kainz
similar layout to graphic Change-Id: Id97460cdeb1db62326b7cb2e7655a39af2c1ae99 Reviewed-on: https://gerrit.libreoffice.org/61962 Tested-by: Jenkins Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
2018-10-22pvs-studio: silence V649 dubious Two identical 'if' statementsCaolán McNamara
Change-Id: I303b4db52e852011d45a147f3010a8f934c1f77b Reviewed-on: https://gerrit.libreoffice.org/62167 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-22pvs-studio: V794 The assignment operator should be protectedCaolán McNamara
Change-Id: Ia443a0e61a091d877c8da26bf7d45bf4261f8669 Reviewed-on: https://gerrit.libreoffice.org/62166 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-22loplugin:unusedfields improvemementsNoel Grandin
treat fields touched in operator== as not being important, which finds some more stuff (but also adds some false+) Change-Id: I3f5d504d7dec7945a917afbcd58c92df74f03645 Reviewed-on: https://gerrit.libreoffice.org/62020 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-22pvs-studio: V668 no sense testing against null as memory was allocated by newCaolán McNamara
category V668 complete Change-Id: I986d4cb89a7c72d54d71ea01fc598a9958deee24 Reviewed-on: https://gerrit.libreoffice.org/62138 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-22pvs-studio: V728 An excessive check can be simplifiedCaolán McNamara
for... "The '(A && !B) || (!A && B)' expression is equivalent to the 'bool(A) != bool(B)' expression" subcases, where the args are already bool Change-Id: Ica8b5c4974c513f7f7ad8acf17ca931e85ebc8af Reviewed-on: https://gerrit.libreoffice.org/62146 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-22tdf#120703 (PVS): Recurring check.Xisco Fauli
V571 The 'pNew' condition was already verified in line 47. Change-Id: Ib6b6a48f8c565ee28bbbaa8846f549639b6291be Reviewed-on: https://gerrit.libreoffice.org/62159 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2018-10-22tdf#120703 (PVS): redundant comparisons, dynamic_cast<T&> in dtorMike Kaganski
V560 A part of conditional expression is always true: (nHintStart >= nStartIdx) V509 The 'dynamic_cast' operator should be located inside the try..catch block, as it could potentially generate an exception. Raising exception inside the destructor is illegal. V560 A part of conditional expression is always true: pHint. Change-Id: Icfb9a2961f5db034fd19f4665fe3ceaae6232350 Reviewed-on: https://gerrit.libreoffice.org/62039 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-10-22tdf#120703 (PVS): Recurring check.Xisco Fauli
V571 The 'pArgs' condition was already verified in line 47. Change-Id: Id63eb556610ec457864e44b7d3f49e46f133e5a9 Reviewed-on: https://gerrit.libreoffice.org/62162 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-22tdf#120703 (PVS): Recurring check.Xisco Fauli
V571 The 'SwKeyState::KeyToView != eFlyState' condition was already verified in line 1723. Change-Id: I4fb5d7a5e50822985ca753706d4cdb1693439118 Reviewed-on: https://gerrit.libreoffice.org/62161 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-22tdf#120703 (PVS): Recurring check.Xisco Fauli
V571 The '!pNumRule' condition was already verified in line 2092. Change-Id: I2fc040e9c3053b351b99eb123285ef05f20813f5 Reviewed-on: https://gerrit.libreoffice.org/62160 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-22tdf#120703 (PVS): Recurring check.Xisco Fauli
V571 The 'pColumn->GetWidthOption()' condition was already verified in line 1033. Change-Id: I5bc11bceddc8090f41bf86b45f880ceea3dfb204 Reviewed-on: https://gerrit.libreoffice.org/62158 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-21tdf#120703 (PVS): redundant nullptr checkMike Kaganski
V668 There is no sense in testing the 'pPor' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. Change-Id: I58d553fc59606f54013246f23a1b18a4ab673aac Reviewed-on: https://gerrit.libreoffice.org/62148 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-21pvs-studio: V590 The expression is excessive or contains a misprintCaolán McNamara
Change-Id: Ibe61e593b7f0fb3abc033132450ce620ee3294c9 Reviewed-on: https://gerrit.libreoffice.org/62136 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-21pvs-studio: condition always falseCaolán McNamara
Change-Id: I7dcb927028c89f06545fe92c75cb5660767a4817 Reviewed-on: https://gerrit.libreoffice.org/62106 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-21tdf#120703 (PVS): Recurring check.Xisco Fauli
V571 The 'if (IsTabFrame())' condition was already verified in line 2879. Change-Id: I738d818207d7303bc914b140c73feeb182194b27 Reviewed-on: https://gerrit.libreoffice.org/62047 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-21NB tabbed writer: finishing correct padding and final tab reviewandreas kainz
Change-Id: Ibcc0638176ed2f7b749cea06a00ed709c21aab33 Reviewed-on: https://gerrit.libreoffice.org/62134 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2018-10-21coverity#1440400 Resource leak in objectCaolán McNamara
Change-Id: I96aea5e6004e8074630bdeeb7cbe4d16a46d5648 Reviewed-on: https://gerrit.libreoffice.org/62087 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-21fix --enable-debug buildsStephan Bergmann
Change-Id: Icf500409ac2652d38ecafa898edf6c5c50774893
2018-10-21tdf#120703 (PVS): redundant nullptr checks, redundant assignMike Kaganski
V668 There is no sense in testing the 'pMember' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. V519 The 'pObject' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 2876, 2877. Change-Id: I0c801c97e75da99bf39f7a14306e67abfb8a3d85 Reviewed-on: https://gerrit.libreoffice.org/62123 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-20clarify this code a littleCaolán McNamara
Change-Id: I10a9f29add5cefa866cbe87e5c6164738ca57d04 Reviewed-on: https://gerrit.libreoffice.org/62019 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-20permissionIdAndName is empty in permission-for-user caseCaolán McNamara
merge the two identical branches and make it do what it probably wants to do Change-Id: I38390a18fcd90349c6bd86f14c67850166b6aeaa Reviewed-on: https://gerrit.libreoffice.org/62001 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-20return by unique_ptr from CreateFieldControlNoel Grandin
Change-Id: Ic8bf9829c3320aca452fd1a40e9843fdbdbfa219 Reviewed-on: https://gerrit.libreoffice.org/61906 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-20loplugin:staticvar in swNoel Grandin
Change-Id: I73b0fb18febfe1d26bb63e1755b0b8c123aa854f Reviewed-on: https://gerrit.libreoffice.org/62004 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-20uitest for chapter numbering dialogZdeněk Crhonek
Change-Id: Id83c8298618d38d8d6631fabdf8bc1e1326a2d0d Reviewed-on: https://gerrit.libreoffice.org/62032 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2018-10-20sw mso export: PROTECT_FORM shouldn't force section to protectedJustin Luth
PROTECT_FORM maps to enforcement = true, not "everything is protected". "The enforcement of this property is determined by the documentProtection element (§17.15.1.29), as it is possible to specify protection without turning it on." So, sections should retain their protected on/off status regardless of the value of PROTECT_FORM. My guess was that this was to offset the fact that DOCX import did not import protected status, so this helped to protect the sections that should not be unprotected. A followup patch will address the import side. patch initially developed to support tdf#120499. Change-Id: I8ff6d31711651a4827cbb8520fd68e88273d6799 Reviewed-on: https://gerrit.libreoffice.org/61905 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2018-10-19expression is excessiveCaolán McNamara
Change-Id: Idb6b2af0a3d37ff9ebf13a0413f9656000296b48 Reviewed-on: https://gerrit.libreoffice.org/61996 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-19NB fix TextShape with uno:DrawText instead of uno:Textandreas kainz
Change-Id: If213ecdc5dd47f3870a71131d3e634f216b3da98 Reviewed-on: https://gerrit.libreoffice.org/61989 Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2018-10-19sw_redlinehide_3: fix some unnecessary loopsMichael Stahl
PVS-Studio complains about the funny code. Change-Id: I58e2ebcca7e13baa78cfbcc4a654d5badab8d037 Reviewed-on: https://gerrit.libreoffice.org/61987 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Michael Stahl <Michael.Stahl@cib.de>
2018-10-19NB tabbed: update draw tab drop down menu entriesandreas kainz
Change-Id: Id12b92eaa472e59681cf684e6f007476c884cc5a Reviewed-on: https://gerrit.libreoffice.org/61964 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2018-10-19NFC ww8 cleanup: remove unused variables, simplify, whitespaceJustin Luth
Change-Id: Ib4f100d4019643cde893ef1d8643a5c08b55ff8f Reviewed-on: https://gerrit.libreoffice.org/61951 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2018-10-19clang-tidy readability-container-size-emptyNoel Grandin
Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422 Reviewed-on: https://gerrit.libreoffice.org/61967 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-19sw: create SwUnoModule instances with an uno constructorMiklos Vajna
Change-Id: If05d773d6823833ef075484807bf427dcc2c1426 Reviewed-on: https://gerrit.libreoffice.org/61955 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-19clang-tidy readability-misleading-indentationNoel Grandin
Change-Id: I4673fc7c694924b41d048a1918ddb8b0e0af1f79 Reviewed-on: https://gerrit.libreoffice.org/61935 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-19clang-tidy modernize-redundant-void-argNoel Grandin
Change-Id: Ia25ac2e40f29e5b766a4c5c013fb53274196f656 Reviewed-on: https://gerrit.libreoffice.org/61934 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-19ww8import: always protect document if setJustin Luth
Just because some sections are unprotected doesn't mean that the document should not open in forms mode. MSWord 2016 opens it in "forms view" mode which also doesn't allow editing those unrestricted settings. Only when choosing the "Edit Document" view are the unprotected sections editable - similar to LO turning off the Compatibility: Protect Forms flag. Unfortunately, the "I want to address this" comment was from 2011, so obviously his temporarly solution became more permanent that expected. If this patch now blocks someone from being able to edit a document (because now only the forms components of the document are editable) they can remove the forms protection by going to tools - options - LibreOffice Writer - compatability - and disable Protect Form. patch developed to support tdf#120499 and depends on the patch for tdf#37778. Change-Id: I86e26095ade6b2cf0ab8ea8fc941a92fa672a2f7 Reviewed-on: https://gerrit.libreoffice.org/61901 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2018-10-18Sync Image/Graphic Tabb and context menuandreas kainz
NB: sync MenuImage in tabbed toolbar context menu: sync graphic.xml context menu in writer, calc, impress and draw Change-Id: Idab90ae9af7ac68815fe689811d6c11f948063ca Reviewed-on: https://gerrit.libreoffice.org/61938 Reviewed-by: andreas_kainz <kainz.a@gmail.com> Tested-by: andreas_kainz <kainz.a@gmail.com>
2018-10-18weld SwMMResultEmailDialogCaolán McNamara
Change-Id: Ib12455751074bbd818cc2da0c813fe984d887571 Reviewed-on: https://gerrit.libreoffice.org/61920 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-18weld SwMailMergeCreateFromDlgCaolán McNamara
Change-Id: I9885881bfc6baffe1184d52c207d8f5d81a4a3b4 Reviewed-on: https://gerrit.libreoffice.org/61919 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>