summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2018-08-20Simplify containers iterations, tdf#96099 follow-upArkadiy Illarionov
Use range-based loop or replace with std::any_of, std::find and std::find_if where applicable. Change-Id: I2f80788c49d56094c29b102eb96a7a7c079567c6 Reviewed-on: https://gerrit.libreoffice.org/59143 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-20tdf#116370 cleanup Writer idle job handingJan-Marek Glogowski
This prevents the start of the idle job, while processing itself, so the fixed WinSalInstance::AnyInput of commit 3bf6c97029d2 ("tdf#112975 WIN correctly handle VclInputFlags::OTHER") won't report the timer events of the re-started idle job to process. Fixes the early abort of the background job, which resulted in the busy loop of the reported bug and this strange printing behaviour. P.S. I'm not sure, why this was just broken on Windows. Change-Id: I6503dcd925c9a0ed843e794a31eea32a4a4b2889 Reviewed-on: https://gerrit.libreoffice.org/59279 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-08-20return weld widgets by std::unique_ptr from builderNoel Grandin
Change-Id: I20c007b13dae2d1155034711ad1ad48bfdfd0ba8 Reviewed-on: https://gerrit.libreoffice.org/59288 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-19Translate German commentsJohnny_M
Change-Id: I1a4e41ccd3e3eb829419c45edd0417776a73c3ae Reviewed-on: https://gerrit.libreoffice.org/59285 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-08-19Translate German variable namesJohnny_M
Change-Id: I6b5fb91cbf32ce082fb77989e1b9ac5e8ecfe438 Reviewed-on: https://gerrit.libreoffice.org/59283 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-08-18tdf#116436 doc export: add missing table background fillJustin Luth
MS formats only have support for Table and Cell fill. Interestingly, MS Word doesn't let the cells inherit from the Table fill setting, so that value also needs to be written out into every cell. Since Word apparently ignores the table color, I didn't bother trying to search out how to export that in DOC format. (I did add it to DOCX since it was so easy to find.) Change-Id: I8946f07b45f72fed5959369182882a7bf013b1d0 Reviewed-on: https://gerrit.libreoffice.org/59281 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2018-08-18tdf#116436 docx export: add missing table background fillJustin Luth
MS formats only have support for Table and Cell fill. Interestingly, MS Word doesn't let the cells inherit from the Table fill setting (even though LO docx import currently does), so that value also needs to be written out into every cell. Change-Id: Ib49fddf52758ff641428de747ea290d1fcb894f3 Reviewed-on: https://gerrit.libreoffice.org/59260 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org>
2018-08-17sw: Replace std::list with std::vector for simplicityTakeshi Abe
Change-Id: I239df7b0009711eeaf025221bec9c95887681c8d Reviewed-on: https://gerrit.libreoffice.org/58918 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-17ofz#9934 null derefCaolán McNamara
Change-Id: I6833ad8a556b561a37e468da8845914cabfac4c5 Reviewed-on: https://gerrit.libreoffice.org/59246 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-17loplugin:useuniqueptr in Tcg255Noel Grandin
Change-Id: I68aa80fbd9d1b1dcd22ecee3a8c51fefe5574ece Reviewed-on: https://gerrit.libreoffice.org/59226 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-17loplugin:useuniqueptr in SwPagePreviewLayoutNoel Grandin
Change-Id: Iecec5b3d4651eb6a1d8fe0b29a691c945a3eb19c Reviewed-on: https://gerrit.libreoffice.org/59228 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-17tdf108064 OOXML export: keep preset dashes in shape outlinesAdam Kovacs
Extending commit d7551e32609d0e0de8ac419576ca42d65c5015be to all default MSO 2016 preset dashes: Saving an ooxml file with LibreOffice now preserves the prstDash tags with the values sysDot, sysDash, dash, dashDot, lgDash, lgDashDot, lgDashDotDot, instead of converting them to custDash tags. Note: the import of the preset dash outlines are still not relative to the line width, in spite of their original behaviour in MSO. Change-Id: I65eaf06952a968019495664067010c874fce1352 Reviewed-on: https://gerrit.libreoffice.org/59203 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2018-08-17insert->envelope->printer->setup crashesCaolán McNamara
Change-Id: I06d91941eaab0f622b384e9b3379d033890fd92f Reviewed-on: https://gerrit.libreoffice.org/59184 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-17loplugin:useuniqueptr in WW8ListManagerNoel Grandin
Change-Id: Ibd6486889797a4e660c63377a1fd3d577747aec0 Reviewed-on: https://gerrit.libreoffice.org/59229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-17loplugin:useuniqueptr in SwPageNumAndTypeOfAnchorsNoel Grandin
it's a small struct, so just store it inline in the std::vector Change-Id: Ib53c903bf960097ea395e7d54ea7b80fa027ea7b Reviewed-on: https://gerrit.libreoffice.org/59227 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-16sw: save one vcl layout call in SwFntObj::DrawText()Miklos Vajna
Pressing a key in Writer used to lay out the relevant string 4 times (counting GenericSalLayout::LayoutText() invocations), save one of them by pre-calculating the layout and sharing it between GetTextArray() and DrawTextArray(). Change-Id: Ic2194bdcbe94a546d57745463ae81e6b0cadcd92 Reviewed-on: https://gerrit.libreoffice.org/59208 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-08-16std::deque->std::vectorCaolán McNamara
Change-Id: Ia454ec1853bde1a19c6daafe5fef11bb633db080 Reviewed-on: https://gerrit.libreoffice.org/59211 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-16SvxNumberFormat::nFirstLineOffset should have a larger typeStephan Bergmann
...similar to 0d227c96e11d7d03829144183bc66d229e059a4b "SvxNumberFormat::nAbsLSpace should have a larger type", this time due to: > Testing file:///home/sbergman/lo/core/sd/qa/unit/data/ppt/pass/hang-10.ppt: [...] > filter/source/msfilter/svdfppt.cxx:3793:39: runtime error: implicit conversion from type 'sal_Int32' (aka 'int') of value -142240 (32-bit, signed) to type 'short' changed the value to -11168 (16-bit, signed) > #0 in PPTNumberFormatCreator::ImplGetNumberFormat(SdrPowerPointImport const&, SvxNumberFormat&) at filter/source/msfilter/svdfppt.cxx:3793:39 (instdir/program/libmsfilterlo.so +0x79930d) > #1 in PPTNumberFormatCreator::GetNumberFormat(SdrPowerPointImport const&, SvxNumberFormat&, unsigned int, PPTParaLevel const&, PPTCharLevel const&, TSS_Type) at filter/source/msfilter/svdfppt.cxx:3674:5 (instdir/program/libmsfilterlo.so +0x797bad) > #2 in PPTStyleSheet::PPTStyleSheet(DffRecordHeader const&, SvStream&, SdrPowerPointImport&, PPTTextParagraphStyleAtomInterpreter const&, PPTTextSpecInfo const&) at filter/source/msfilter/svdfppt.cxx:4395:13 (instdir/program/libmsfilterlo.so +0x7ac27d) > #3 in SdrPowerPointImport::SdrPowerPointImport(PowerPointImportParam&, rtl::OUString const&) at filter/source/msfilter/svdfppt.cxx:1618:59 (instdir/program/libmsfilterlo.so +0x74759f) > #4 in ImplSdPPTImport::ImplSdPPTImport(SdDrawDocument*, SotStorage&, SfxMedium&, PowerPointImportParam&) at sd/source/filter/ppt/pptin.cxx:175:7 (instdir/program/libsdfiltlo.so +0x5f2be8) > #5 in SdPPTImport::SdPPTImport(SdDrawDocument*, SvStream&, SotStorage&, SfxMedium&) at sd/source/filter/ppt/pptin.cxx:162:23 (instdir/program/libsdfiltlo.so +0x5ce2bb) > #6 in ImportPPT at sd/source/filter/ppt/pptin.cxx:2760:47 (instdir/program/libsdfiltlo.so +0x617c79) > #7 in SdPPTFilter::Import() at sd/source/filter/sdpptwrp.cxx:106:32 (instdir/program/libsdlo.so +0x2878233) > #8 in sd::DrawDocShell::ConvertFrom(SfxMedium&) at sd/source/ui/docshell/docshel4.cxx:474:46 (instdir/program/libsdlo.so +0x2e163dc) > #9 in SfxObjectShell::DoLoad(SfxMedium*) at sfx2/source/doc/objstor.cxx:786:23 (instdir/program/libsfxlo.so +0x2c8c492) > #10 in SdFiltersTest::load(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) at sd/qa/unit/filters-test.cxx:75:31 (workdir/LinkTarget/CppunitTest/libtest_sd_filters_test.so +0x19771) > #11 in test::FiltersTest::recursiveScan(test::filterStatus, rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) at unotest/source/cpp/filters-test.cxx:130:20 (workdir/LinkTarget/CppunitTest/../Library/libunotest.so +0x5724c) > #12 in test::FiltersTest::testDir(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) at unotest/source/cpp/filters-test.cxx:155:5 (workdir/LinkTarget/CppunitTest/../Library/libunotest.so +0x57ec9) > #13 in SdFiltersTest::testCVEs() at sd/qa/unit/filters-test.cxx:83:5 (workdir/LinkTarget/CppunitTest/libtest_sd_filters_test.so +0x19d6d) Change-Id: Icd83120e99ac8e7181d75e2cf9d13f49064e65e1 Reviewed-on: https://gerrit.libreoffice.org/59212 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-16Resolves: tdf#119013 do not over-aggressively reorder date particlesEike Rathke
In particular not when reading documents as we don't know what the original (default/system) locale was when the date format was created and stored and whether the format's date order actually matched the locale's ordering. Regression from commit 51478cefaa4e265b42e3f67eda0a64767ff3efba CommitDate: Tue Apr 18 17:01:27 2017 +0200 Resolves: tdf#107012 follow date order of the target locale Change-Id: I9d3bdbd512d95ed81ff6459e368a2d7497ec8a2d Reviewed-on: https://gerrit.libreoffice.org/59182 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-08-16tdf#119224 start and end are expected to exist for the scope of this functionCaolán McNamara
Change-Id: I771bce68a2ac923af6a7d54646a2c59ce6f10f7e Reviewed-on: https://gerrit.libreoffice.org/59176 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-16tdf#118385 Avoid crash on loading documentSzymon Kłos
Change-Id: Ifb18fee79667a5d0284407e84877b0d4d89536d9 Reviewed-on: https://gerrit.libreoffice.org/59173 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2018-08-16tdf#119294: reimplement fix for tdf#118859Mike Kaganski
When removing paragraphs with mail mere fields, both field type reference and node reference could get invalid, because field type will be destroyed when its last field is gone; and node will be destroyed if it is in a fly with anchor in another node which gets destroyed. To avoid use-after-delete, we will use an SwClient on field types, thus detecting if a collected field type got destroyed; iterating over fields using SwIterator is safe, because removing a node with fields would update the iterator. Change-Id: Id8b555ef7015b13ab70ebb41845d34c477ac6b31 Reviewed-on: https://gerrit.libreoffice.org/59164 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-08-16remove mempoolNoel Grandin
we've been using the normal memory allocator instead of the sal slab allocator ever since commit bc6a5d8e79e7d0e7d75ac107aa8e6aa275e434e9 Date: Wed Nov 15 16:52:44 2017 +0530 Disable custom allocator Change-Id: I3383962cedb85d56fbec695398901f6ff7057651 Reviewed-on: https://gerrit.libreoffice.org/58577 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-16tdf#113608 DOCX import: don't use numbering of removed paragraphsLászló Németh
to avoid direct numbering of the unnumbered paragraphs later using numbering of the removed w:r-less paragraph incorrectly. Test file and clean up by Justin Luth. Change-Id: I821eed11f96e56e945aa88da03cc84e29322195a Reviewed-on: https://gerrit.libreoffice.org/59117 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2018-08-16pass SfxMedium around by std::unique_ptrNoel Grandin
Change-Id: Ibde7b68d9248f80d5304991390a80742265f37b3 Reviewed-on: https://gerrit.libreoffice.org/59031 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-16loplugin:useuniqueptr in SwTOXBaseSectionNoel Grandin
Change-Id: I1c4d9cb4189073d83ea2872b87475b8bf79e43db Reviewed-on: https://gerrit.libreoffice.org/59030 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-16fix bug in SwCTBWrapper::ImportCustomToolBarNoel Grandin
the code structure here and at the callsite indicats that wants true to mean "successfully imported" Change-Id: Ibe3242e85ed970494c2ee0deb4b898db0fe85d0d Reviewed-on: https://gerrit.libreoffice.org/59130 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-16loplugin:returnconstant in DocxAttributeOutputNoel Grandin
It appears that the last code which returned something other than true from PostponeOLE was removed in commit 21d356f691a7c1859f85a19c79060a3d31cffc21 Date: Fri Feb 28 10:44:53 2014 +0100 sw: export OLE objects outside run properties Change-Id: Ie0197be980014a7ceb58c6b71adf69babd734e4e Reviewed-on: https://gerrit.libreoffice.org/59128 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-16loplugin:returnconstant in SwWrtShellNoel Grandin
Change-Id: I1f810108a3c79f4d8b7df6ef1ad755a29dbc62b6 Reviewed-on: https://gerrit.libreoffice.org/59127 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-16tdf#106572 writerfilter: don't write to dummy paragraphJustin Luth
I found a few existing unit tests that this fixes, and a few unit tests that already worked without this. So something else is at play here, but it doesn't appear to be hurt by this fix since each one still starts with "First Page" style. Change-Id: Idc61279fc5fddc9df62b6ab7a9bcd3822d52cbbb Reviewed-on: https://gerrit.libreoffice.org/59033 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org>
2018-08-15ofz#9917 use a WW8SprmIter to find the sprmCaolán McNamara
extend WW8SprmIter to support the needed paramater match feature and drop the custom WW8PLCFx_SEPX::HasSprm logic Change-Id: I5893e04402ed03493add398f0939a578807561ef Reviewed-on: https://gerrit.libreoffice.org/59118 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-15SvxNumberFormat::nAbsLSpace should have a larger typeStephan Bergmann
...as is seen when executing CppunitTest_sd_filters_test with Clang's new -fsanitize=implicit-conversion (see below). The next larger natural choice after short is sal_Int32, and some of the code calling GetAbsLSpace actually already supported the value to be as wide (but not wider than) sal_Int32; code calling GetAbsLSpace that expected the value to be no wider than short has either been adapted or at least been marked with a TODO. (Other choices could have been sal_Int64 or long.) Some dependent function's parameter types have also been changed accordingly. > Testing file:///home/sbergman/lo/core/sd/qa/unit/data/ppt/pass/hang-10.ppt: [...] > filter/source/msfilter/svdfppt.cxx:3792:33: runtime error: implicit conversion from type 'sal_uInt32' (aka 'unsigned int') of value 144780 (32-bit, unsigned) to type 'short' changed the value to 13708 (16-bit, signed) > #0 in PPTNumberFormatCreator::ImplGetNumberFormat(SdrPowerPointImport const&, SvxNumberFormat&) at filter/source/msfilter/svdfppt.cxx:3792:33 (instdir/program/libmsfilterlo.so +0x7992cc) > #1 in PPTNumberFormatCreator::GetNumberFormat(SdrPowerPointImport const&, SvxNumberFormat&, unsigned int, PPTParaLevel const&, PPTCharLevel const&, TSS_Type) at filter/source/msfilter/svdfppt.cxx:3674:5 (instdir/program/libmsfilterlo.so +0x797c6d) > #2 in PPTStyleSheet::PPTStyleSheet(DffRecordHeader const&, SvStream&, SdrPowerPointImport&, PPTTextParagraphStyleAtomInterpreter const&, PPTTextSpecInfo const&) at filter/source/msfilter/svdfppt.cxx:4395:13 (instdir/program/libmsfilterlo.so +0x7ac38d) > #3 in SdrPowerPointImport::SdrPowerPointImport(PowerPointImportParam&, rtl::OUString const&) at filter/source/msfilter/svdfppt.cxx:1618:59 (instdir/program/libmsfilterlo.so +0x74762f) > #4 in ImplSdPPTImport::ImplSdPPTImport(SdDrawDocument*, SotStorage&, SfxMedium&, PowerPointImportParam&) at sd/source/filter/ppt/pptin.cxx:175:7 (instdir/program/libsdfiltlo.so +0x5f2be8) > #5 in SdPPTImport::SdPPTImport(SdDrawDocument*, SvStream&, SotStorage&, SfxMedium&) at sd/source/filter/ppt/pptin.cxx:162:23 (instdir/program/libsdfiltlo.so +0x5ce2bb) > #6 in ImportPPT at sd/source/filter/ppt/pptin.cxx:2760:47 (instdir/program/libsdfiltlo.so +0x617c79) > #7 in SdPPTFilter::Import() at sd/source/filter/sdpptwrp.cxx:106:32 (instdir/program/libsdlo.so +0x2878413) > #8 in sd::DrawDocShell::ConvertFrom(SfxMedium&) at sd/source/ui/docshell/docshel4.cxx:474:46 (instdir/program/libsdlo.so +0x2e165bc) > #9 in SfxObjectShell::DoLoad(SfxMedium*) at sfx2/source/doc/objstor.cxx:786:23 (instdir/program/libsfxlo.so +0x2c8cb12) > #10 in SdFiltersTest::load(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) at sd/qa/unit/filters-test.cxx:75:31 (workdir/LinkTarget/CppunitTest/libtest_sd_filters_test.so +0x19771) > #11 in test::FiltersTest::recursiveScan(test::filterStatus, rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) at unotest/source/cpp/filters-test.cxx:130:20 (workdir/LinkTarget/CppunitTest/../Library/libunotest.so +0x5724c) > #12 in test::FiltersTest::testDir(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) at unotest/source/cpp/filters-test.cxx:155:5 (workdir/LinkTarget/CppunitTest/../Library/libunotest.so +0x57ec9) > #13 in SdFiltersTest::testCVEs() at sd/qa/unit/filters-test.cxx:83:5 (workdir/LinkTarget/CppunitTest/libtest_sd_filters_test.so +0x19d6d) Change-Id: Ifa298a51bb62b7cbee9249b8289963f3427721f5 Reviewed-on: https://gerrit.libreoffice.org/59116 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-15sw: nOffs is always 0 in SwFntObj::DrawText()Miklos Vajna
Since commit 95cb8d2ce96578e8968d4d74573fa528e226fac9 (Remove FONT_TEST_DEBUG, COMING_SOON and some more dead code., 2011-01-24). Change-Id: Iff4ad45f8e1550254ab237ea097b17ec3122766a Reviewed-on: https://gerrit.libreoffice.org/59109 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-08-15outer loop unrelated to inner loopCaolán McNamara
since original checkin of... commit 9cddf9da7fb256418e1bc3b4719abb55e3b0604c Date: Tue May 22 15:33:44 2007 +0000 INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED ... 2006/12/13 12:31:03 tl 1.1.2.38: #i71244# update charts in writer where I think this LockUnlockAllCharts chart2 loop was modelled on the previous chart[1] styles loop of e.g. DoUpdateAllCharts which loop over tables. chart2 objects are unrelated to these tables, so remove the outer loop, which then means the ofz#9689 ofz#9856 ofz9874 crashes that made me look at it will get fixed Change-Id: I7d7ba0a2aa257b5aa399f20d902f01306fbaecff Reviewed-on: https://gerrit.libreoffice.org/59110 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-15unroll complex if statement assignsCaolán McNamara
Change-Id: I462095f6b912bc3442c232f003278efc3f5c347e Reviewed-on: https://gerrit.libreoffice.org/59107 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-15tdf#117086 crash on deleted SwFootnoteBossFrameCaolán McNamara
use SwFrameDeleteGuard to lock pOldBoss to exist over the range its directly accessed Change-Id: I68af80114a380f68b86cbc78278fb9e5e87cccce Reviewed-on: https://gerrit.libreoffice.org/58991 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-15ofz#9908 validate no negative editengine selection positionsCaolán McNamara
Change-Id: I37dace2051518224c55756362facd3edba4a9571 Reviewed-on: https://gerrit.libreoffice.org/59058 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-15Silence bogus -Werror,-Wsign-compareStephan Bergmann
...in some Android builds like <https://tinderbox.libreoffice.org/cgi-bin/ gunzip.cgi?tree=MASTER&brief-log=1534320601.32504>, where USHRT_MAX is wrongly of type unsigned int. (Cf. similar comits like f164c68296b66d534ed2c9de6da4c01e328959d9 "Introduce dedicated SwXMLTableContext::MAX_WIDTH, replacing USHRT_MAX".) So this was the reason for 4a61006255c67bb6f9ac99107093a424a9de441e "Remove < USHRT_MAX check that is presumably no longer needed" that now had to be reverted again with d9c312d1917bc039bb0354c8c3f5c9dbbb758cf1 "tdf#119252: Revert 'Remove < USHRT_MAX check that is presumably no longer". Change-Id: I7ff4f6ab61adc2490bcab46ec5e5a65d9302141f
2018-08-15loplugin:useuniqueptr in RedlineStackNoel Grandin
Change-Id: I8e4f3599d30f94cfaa418f0adb35cf9fba97ff53 Reviewed-on: https://gerrit.libreoffice.org/59032 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-15tdf#119252: Revert "Remove < USHRT_MAX check that is presumably no longerStephan Bergmann
...needed" This reverts commit 4a61006255c67bb6f9ac99107093a424a9de441e, as it turns out to actually break things. I'm not quite sure how I came across that code and the attempted fix back then, but at least ASan+UBSan `make check` still works after the revert (and UBSan seems the most likely reason I came across this). I know too little about that Writer table layout code to know whether the original code is actually good, or would need some other fixing, so lets just revert for now. Change-Id: I1e88372a3b688a5fdd4c1bf88033b51287195799 Reviewed-on: https://gerrit.libreoffice.org/59002 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-14crashtesting: IsSctFrame assertCaolán McNamara
we have two asserting cases... soffice.bin --headless --convert-to pdf odt/tdf109532-2.odt soffice.bin --headless --convert-to odt odt/fdo45450-1.odt both pass after this Change-Id: I24a9bdc5ab19f678dc611f78ed84347789915cc5 Reviewed-on: https://gerrit.libreoffice.org/58939 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-14loplugin:returnconstant in SwSpellDialogChildWindowNoel Grandin
Change-Id: If02664294bc9503ac8a373793edfdb8231582e76 Reviewed-on: https://gerrit.libreoffice.org/58961 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-14tdf#117127 crash on inspecting value describing a tableCaolán McNamara
since... commit f86d0413f7cedf096b285c2eb6698653dd99c21e Date: Mon Mar 30 01:26:21 2015 +0200 SwXCellRange:: and SwXTextTable::getDataArray() do the same which used to have more checks than its replacement Change-Id: Id931882ef7c749ffa18ef3474e3e661ba8614ab0 Reviewed-on: https://gerrit.libreoffice.org/58976 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-14loplugin:returnconstant in SwEditShellNoel Grandin
Change-Id: I0daa8938e81017f8c6db4da55aed297f767799b7 Reviewed-on: https://gerrit.libreoffice.org/58959 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-14loplugin:returnconstant in SwChartDataProviderNoel Grandin
Change-Id: Ia9dc1f9c5a02162359c1fe6e65f21ae5dede7702 Reviewed-on: https://gerrit.libreoffice.org/58965 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-14loplugin:returnconstant in SwTextCursorNoel Grandin
Change-Id: If695e6f1564ca37e9bb9870c6fee20d639fb721c Reviewed-on: https://gerrit.libreoffice.org/58962 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-14loplugin:returnconstant in SvxCSS1ParserNoel Grandin
Change-Id: I890fe1c116c487a6065f4b47d3f9cebe4803ef77 Reviewed-on: https://gerrit.libreoffice.org/58963 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-14loplugin:returnconstant in SwTabFrameNoel Grandin
Change-Id: I9a8ecd32516315df25e7bd3c9c6672743c567035 Reviewed-on: https://gerrit.libreoffice.org/58960 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-14loplugin:returnconstant in SwGrfNodeNoel Grandin
Change-Id: If6e7c7750db8cdc45a2c487f1aebcf504a0e1edb Reviewed-on: https://gerrit.libreoffice.org/58958 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-14SvxCharSetColorItem can be removedNoel Grandin
and just use SvxColorItem in its stead, all of it's special functionality has been removed over time Change-Id: I61a4d1fb92d9dccbdfc5bbb6d1a41692b83eb320 Reviewed-on: https://gerrit.libreoffice.org/58938 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>