summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-10-22loplugin:singlevalfieldsNoel Grandin
Change-Id: I92c5634b16862abe1c73c20cfe66abe92f58bb88 Reviewed-on: https://gerrit.libreoffice.org/81303 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-22external/libxml2: Simplify UBSan nullptr-with-offset fixStephan Bergmann
...that had been added with fcb2d8a87ad696f7f2fe069f0ed68a88803e1b54 "external/libxml2: Avoid UBSan nullptr-with-offset" Change-Id: I7ee234c8c6a868ed825a8ed3fa0dcdc69decb7ba Reviewed-on: https://gerrit.libreoffice.org/81299 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-22tdf#128230 Require password if the Unprotect button is visibleGabor Kelemen
Regression from commit a2279bb2f52ee5bbe8d38433aac55aa1a16661fb Before that requiring password depended on the current text of the Protect/Unprotect button, which was changed dynamically. This commit changed that logic and introduced two buttons in the new .ui file that are hidden/shown dynamically. The password condition however was changed to check the visibility of the new Protect button instead of the Unprotect button. Change-Id: Ie24e1b2d45fa92a375a29b7bc71689f9b83ae9dc Reviewed-on: https://gerrit.libreoffice.org/81283 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-22tdf#42949 Fix IWYU warnings in fpicker/Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ia3f05f9c9e74ef211cc21bf92f88a330e3e2378e Reviewed-on: https://gerrit.libreoffice.org/81288 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-10-22Don't cast to check lower 16 bits; apply mask explicitlyMike Kaganski
This partly reverts f7a2795c881c2eba95aa09f21881f842281ae819 and removes useless casts that don't serve any purpose, to improve readability. Change-Id: Ia3559cb765a645ed81ba286e59d37005cee93bb1 Reviewed-on: https://gerrit.libreoffice.org/81275 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-22tdf#127412 sw: fix reported ZOrder of shape+textbox pairsMiklos Vajna
Writer documents may have shape+textbox pairs, in which case internally they have individual ZOrders, but the textbox ZOrder is always just 1 larger than their shape, and externally this is not visible (UNO API, UI). This is implemented by e.g. SwXDrawPage::getCount(), which ignores those textboxes. This worked in general for SwVirtFlyDrawObj, but in case the textbox is a SwFlyDrawObj, then these were not filtered out. Fix this, so the scenario when the shapes are added to the draw page following ZOrder (0, 1, etc) works (internally producing 0, 1, 2, 3, etc ZOrders). Change-Id: I2a04fb76029d83390d418c764fdfbe7a1ee0f208 Reviewed-on: https://gerrit.libreoffice.org/81277 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-10-22Revert OUString -> OUString& changesMichael Weghorn
Revert the OUString -> OUString& related part of commit b13421c6560e4f189265c96a3145aa11568b4437 ("Use const references to avoid copying") as suggested by Stephan in [1] to avoid "ongoing maintenance effort to guarantee that the references are not dangling, and future maintainers might draw wrong assumptions from the atypical behavior of holding OUString instances by reference." [1] https://gerrit.libreoffice.org/#/c/81029/ Change-Id: I50a81a170ba7c40cd3257e250e17f107d4a9f015 Reviewed-on: https://gerrit.libreoffice.org/81273 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-22tdf#126942 Fix flickering headings in navigatorJim Raykowski
Change-Id: Ib77154c13bd26f0bd5b700a69a86abd8a382052d Reviewed-on: https://gerrit.libreoffice.org/81296 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2019-10-22sc: rowcol: tdf#50916 convert some in uiAron Budea
Change-Id: I7c505774a4174e211598affead664592c2fe9a0f Reviewed-on: https://gerrit.libreoffice.org/81293 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-22loplugin:virtualdead unused param in ResourceChangeListenerNoel Grandin
Change-Id: I6bfaef6694ec654889ddf1f300851f323bcc56b3 Reviewed-on: https://gerrit.libreoffice.org/81272 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-22loplugin:virtualdead unused param in ChartTypeDialogControllerNoel Grandin
Change-Id: I71eaedcd2fbd5b6d05bc90c4c5ddbc7fca9f5925 Reviewed-on: https://gerrit.libreoffice.org/81271 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-22loplugin:virtualdead unused params in OCacheSetNoel Grandin
these methods do nothing except forward to their similar named variants, so just remove them Change-Id: I28d31bbe2c1e39fe5a9c2d7eaa9e14006213ab27 Reviewed-on: https://gerrit.libreoffice.org/81247 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-22loplugin:virtualdead unused param in IContainerApproveNoel Grandin
Change-Id: I59edede149d02085125ee946994b6088c3152e7b Reviewed-on: https://gerrit.libreoffice.org/81246 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-22Rather not put unencrypted doc in a tempfileSamuel Mehrbrodt
Keep it in memory instead Change-Id: I25e5cb7183a4d192938110323e27f2f5d1d006fc Reviewed-on: https://gerrit.libreoffice.org/81253 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-10-22external/libxml2: Avoid UBSan nullptr-with-offsetStephan Bergmann
...(new with Clang 10 trunk), where adding even an offset of 0 to a null pointer is UB in C. Seen when building UIConfig_modules/schart: > [UIL] chart2/uiconfig/ui/3dviewdialog > xpath.c:14532:5: runtime error: applying zero offset to null pointer > #0 in xmlXPathTryStreamCompile at workdir/UnpackedTarball/libxml2/xpath.c:14532:5 > #1 in xmlXPathCtxtCompile__internal_alias at workdir/UnpackedTarball/libxml2/xpath.c:14634:12 > #2 in xsltXPathCompileFlags at workdir/UnpackedTarball/libxslt/libxslt/xsltutils.c:2323:11 > #3 in xsltValueOfComp at workdir/UnpackedTarball/libxslt/libxslt/preproc.c:1258:18 > #4 in xsltStylePreCompute at workdir/UnpackedTarball/libxslt/libxslt/preproc.c:2225:6 > #5 in xsltParseTemplateContent at workdir/UnpackedTarball/libxslt/libxslt/xslt.c:4916:13 > #6 in xsltParseStylesheetTemplate at workdir/UnpackedTarball/libxslt/libxslt/xslt.c:5467:5 > #7 in xsltParseStylesheetTop at workdir/UnpackedTarball/libxslt/libxslt/xslt.c:6205:6 > #8 in xsltParseStylesheetProcess at workdir/UnpackedTarball/libxslt/libxslt/xslt.c:6461:2 > #9 in xsltParseStylesheetImportedDoc at workdir/UnpackedTarball/libxslt/libxslt/xslt.c:6675:9 > #10 in xsltParseStylesheetDoc at workdir/UnpackedTarball/libxslt/libxslt/xslt.c:6714:11 > #11 in main at workdir/UnpackedTarball/libxslt/xsltproc/xsltproc.c:888:9 Change-Id: I016ca8d24315385bcfeafca56dda44d9be10f517 Reviewed-on: https://gerrit.libreoffice.org/81285 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-22external/expat: Avoid -fsanitizenullptr-with-offsetStephan Bergmann
...(new with Clang 10 trunk), where adding even an offset of 0 to a null pointer is UB in C. Seen when building CustomTarget_writerfilter/source: > [PY ] CustomTarget/writerfilter/source/ooxml/resourceids.hxx > workdir/UnpackedTarball/expat/lib/xmlparse.c:6488:23: runtime error: applying zero offset to null pointer > #0 in hashTableIterInit at workdir/UnpackedTarball/expat/lib/xmlparse.c:6488:23 > #1 in dtdDestroy at workdir/UnpackedTarball/expat/lib/xmlparse.c:6130:3 > #2 in XML_ParserFree at workdir/UnpackedTarball/expat/lib/xmlparse.c:1368:5 > #3 in xmlparse_dealloc at workdir/UnpackedTarball/python3/Modules/pyexpat.c:1222:9 > #4 in insertdict at workdir/UnpackedTarball/python3/Objects/dictobject.c:807:9 > #5 in _PyObjectDict_SetItem at workdir/UnpackedTarball/python3/Objects/dictobject.c:3927:19 > #6 in _PyObject_GenericSetAttrWithDict at workdir/UnpackedTarball/python3/Objects/object.c:1159:19 > #7 in PyObject_SetAttr at workdir/UnpackedTarball/python3/Objects/object.c:930:15 > #8 in PyEval_EvalFrameEx at workdir/UnpackedTarball/python3/Python/ceval.c:2310:19 [...] Change-Id: I152ddb20c726dbeb638c5fab4403423f5c6da7b5 Reviewed-on: https://gerrit.libreoffice.org/81284 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-22Comparison between css::uno::WeakReference and css::uno::ReferenceStephan Bergmann
...causes overload resolution ambiguity in C++20, as observed with recent Clang 10 trunk with -std=c++2a: > sd/source/ui/framework/factories/BasicPaneFactory.cxx:327:39: error: use of overloaded operator '==' is ambiguous (with operand types 'css::uno::WeakReference<css::drawing::framework::XConfigurationController>' and 'const ::css::uno::Reference< ::css::uno::XInterface>') > if (mxConfigurationControllerWeak == rEventObject.Source) > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~ > include/com/sun/star/uno/Reference.hxx:425:28: note: candidate function (with reversed parameter order) > inline bool BaseReference::operator == ( const BaseReference & rRef ) const > ^ > include/cppuhelper/weakref.hxx:106:19: note: candidate function > bool SAL_CALL operator == ( const WeakReferenceHelper & rObj ) const An alternative would be to add overloads for combinations of css::uno::WeakReference adn css::uno::Reference, but this was the only case of such an ambiguity across the whole code base, such just resolve it with an explicit .get(). Change-Id: I4689d5ffd4f8993cc1f9401d3c21b24f53f21ccd Reviewed-on: https://gerrit.libreoffice.org/81282 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-22Make comparison operator member functions constStephan Bergmann
...which avoids overload resolution ambiguities in C++20, when a synthesized candidate of operator == for a reversed-argument rewrite conflicts with the actual operator ==, due to the asymmetric const-ness of the implicit object parameter and the RHS parameter. (As observed with recent Clang 10 trunk with -std=c++2a: > sd/source/ui/view/Outliner.cxx:543:44: error: use of overloaded operator '!=' is ambiguous (with operand types '::sd::outliner::Iterator' and 'sd::outliner::Iterator') > mbMatchMayExist = (maObjectIterator!=sd::outliner::OutlinerContainer(this).begin()); > ~~~~~~~~~~~~~~~~^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > sd/inc/OutlinerIterator.hxx:133:10: note: candidate function > bool operator!= (const Iterator& rIterator); > ^ > sd/inc/OutlinerIterator.hxx:125:10: note: candidate function > bool operator== (const Iterator& rIterator); > ^ > sd/inc/OutlinerIterator.hxx:125:10: note: candidate function (with reversed parameter order) ) Change-Id: Ia477f3f9cf19a5ae0e15a4536d70924962098ce4 Reviewed-on: https://gerrit.libreoffice.org/81280 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-22There doesn't need to be a TemplateSpecializationType hereStephan Bergmann
On both macOS (libc++) and Windows (MSVC standard library), compilerplugins/clang/test/getstr.cxx failed four tests without this fix: > error: 'error' diagnostics expected but not seen: > File compilerplugins/clang/test/getstr.cxx Line 29: suspicious use of 'getStr' on an object of type 'rtl::OUStringBuffer'; the result is implicitly cast to a void pointer in a call of 'operator <<' [loplugin:getstr] > File compilerplugins/clang/test/getstr.cxx Line 30: directly use object of type 'S' (aka 'rtl::OString') in a call of 'operator <<', instead of calling 'getStr' first [loplugin:getstr] > File compilerplugins/clang/test/getstr.cxx Line 34: suspicious use of 'getStr' on an object of type 'rtl::OUStringBuffer'; the result is implicitly cast to a void pointer in a call of 'operator <<' [loplugin:getstr] > File compilerplugins/clang/test/getstr.cxx Line 35: directly use object of type 'rtl::OString' in a call of 'operator <<', instead of calling 'getStr' first [loplugin:getstr] Change-Id: I65406d3d84bb5a89df44c8fd665b6e38d19f38c7 Reviewed-on: https://gerrit.libreoffice.org/81266 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-22These should be sal_Int16Mike Kaganski
Change-Id: I18112d114c4632961b86da5539959c0d4abd79c7 Reviewed-on: https://gerrit.libreoffice.org/81276 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-10-22These should be sal_Int32Mike Kaganski
Change-Id: If00ef09bec9b66cd4b7725398b2cdb3f49a3fe90 Reviewed-on: https://gerrit.libreoffice.org/81274 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-10-22Resolves: tdf#127982 SMALL()/LARGE() rank array can be larger than data arrayEike Rathke
Only set error for the positions where the requested rank is out of bounds. This also includes zero or negative rank values, instead of setting a global error. Regression from commit e22ab5e6f6b0ea49231ca454a567133996306116 CommitDate: Thu Nov 15 22:12:01 2018 +0100 Resolves: i#32345 Make LARGE()/SMALL() return an array Where previously due to the iteration in the array case single values were returned and assembled. Change-Id: Ic992c56cb79e80269cc7200fac5b15cb8aca3566 Reviewed-on: https://gerrit.libreoffice.org/81279 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2019-10-21tdf#97038: Add unittestXisco Fauli
Fixed by e042a83843ed2573dbce9338058b3dc545dd6898 d630f69d90f15bc652a62648b05ea515de78d16a fixes the .doc part Change-Id: Id8bb1fd1a8eb10dcdacc66601b1b5f9f9252bdee Reviewed-on: https://gerrit.libreoffice.org/81248 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-10-21Silence new Clang 10 trunk -std=c++2a -Wambiguous-reversed-operator for nowStephan Bergmann
It is unclear whether this will really be errors in a final C++20 standard, see <https://github.com/llvm/llvm-project/commit/ 974c8b7e2fde550fd87850d50695341101c38c2d> "[c++20] Add rewriting from comparison operators to <=> / ==" for details. Change-Id: I3a7c2574a65952c8d255107823a1d1e18b2cbe4c Reviewed-on: https://gerrit.libreoffice.org/81268 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-21tdf#114746 Restore asian and complex tags in Progress templateLaurent BP
Manually add tags to fix size, bold and italic: style:font-size-asian style:font-size-complex style:font-style-asian style:font-style-complex style:font-weight-asian style:font-weight-complex Change-Id: Ib3d4f2034d7a316c983cb136266aa213d9f01aee Reviewed-on: https://gerrit.libreoffice.org/80287 Tested-by: Jenkins Reviewed-by: Laurent BP <laurent.balland-poirier@laposte.net>
2019-10-21Related: tdf#127982 In JumpMatrix do not propagate individual errors as globalEike Rathke
Which for https://bugs.documentfoundation.org/attachment.cgi?id=154776 was the case in sheet1 МультиВПР.E6:E20 even in the to-be-fixed SMALL() implementation. The error is propagated as usual individual matrix element coded double error. Change-Id: I5fc6fa3454b354a4017a51a640b96ec80f74f4a4 Reviewed-on: https://gerrit.libreoffice.org/81252 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2019-10-21iexternal/libstaroffice: Fix equality operator argumentsStephan Bergmann
see commit message of external/libstaroffice/0001-Fix-equality-operator-arguments.patch.1 for details Change-Id: Iff882eb1e8b7a71e659a4513772e9049645812fb Reviewed-on: https://gerrit.libreoffice.org/81256 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-21external/firebird: Make comparison operator member functions constStephan Bergmann
see commit message of external/firebird/0001-Make-comparison-operator-member-functions-const.patch.1 for details Change-Id: I559e4b6ef2dbf3800ff5013dcde078d69296d2fb Reviewed-on: https://gerrit.libreoffice.org/81261 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-21Related: tdf#124770 sw doc model xml dump: handle page descriptionsMiklos Vajna
SwPageDesc is more or less just a named wrapper around one or more frame formats, and we know how to dump them already. This helps understanding cases where previously you could only (easily) see the value of a page size at import time at UNO API level (in mm100) and later the computed layout frame sizes (in twips), but not the doc model sizes (in twips). Change-Id: Iad7e8059b2c8d7785d33504c878f2d7ada6004b0 Reviewed-on: https://gerrit.libreoffice.org/81255 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-10-21Actually choose the OUStringBuffer::append overload for UTF-16 string literalsStephan Bergmann
...instead of prefering the `const sal_Unicode *` overload Change-Id: Idc8fd0a2188e2b3399965f303faa2aae8dcd6fd0 Reviewed-on: https://gerrit.libreoffice.org/81251 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-21Make loplugin:stringcostant find some misuses of OUStringBuffer::appendStephan Bergmann
...like the one manually found at 06845c14a17146b0ec50dd3704b6af9ee13927bc "This should have become a UTF-16 string literal". (No further misuses were found across the code base.) Change-Id: I0b604bdaaa38bd9248440ff7bd7bf0545fc6426a Reviewed-on: https://gerrit.libreoffice.org/81250 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-21external/libwps: Make comparison operator member functions constStephan Bergmann
see commit message of external/libwps/0001-Make-comparison-operator-member-functions-const.patch for details Change-Id: Ib8702f57f47aacc08628ceaccce23b487660b95c Reviewed-on: https://gerrit.libreoffice.org/81249 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-21Simplify Sequence iterations in i18npoolArkadiy Illarionov
Use range-based loops, STL and comphelper functions. Change-Id: Ibbc1c14e921585819872f26e8def2a60594e6a63 Reviewed-on: https://gerrit.libreoffice.org/78754 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
2019-10-21sc: rowcol: tdf#50916 convert tabviewNoel Grandin
Change-Id: I3ea46f14e506911118f091b09750d5d21bb902ef Reviewed-on: https://gerrit.libreoffice.org/81245 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21loplugin:virtualdead unused param in IControlActionListenerNoel Grandin
Change-Id: I2ce8df6a9a1ac2e6d6c5de08b32fb671bf10cd17 Reviewed-on: https://gerrit.libreoffice.org/81244 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21loplugin:virtualdead unused param in OTableRowViewNoel Grandin
Change-Id: Ice8d68284800e12af3e334722cc6109a1614e335 Reviewed-on: https://gerrit.libreoffice.org/81243 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21-fsanitize=nullptr-with-nonzero-offsetStephan Bergmann
...(new with Clang 10 trunk), as seen during CppunitTest_emfio_wmf: > tools/source/stream/stream.cxx:808:32: runtime error: applying non-zero offset 10 to null pointer > #0 in SvStream::SeekRel(long) at tools/source/stream/stream.cxx:808:32 > #1 in (anonymous namespace)::ImplReadDIBFileHeader(SvStream&, unsigned long&) at vcl/source/gdi/dibtools.cxx:1085:19 > #2 in (anonymous namespace)::ImplReadDIB(Bitmap&, AlphaMask*, SvStream&, bool, bool, bool) at vcl/source/gdi/dibtools.cxx:1656:12 > #3 in ReadDIB(Bitmap&, SvStream&, bool, bool) at vcl/source/gdi/dibtools.cxx:1738:12 > #4 in emfio::EmfReader::ReadEnhWMF() at emfio/source/reader/emfreader.cxx:1507:33 > #5 in emfio::emfreader::XEmfParser::getDecomposition(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at emfio/source/emfuno/xemfparser.cxx:148:72 > #6 in non-virtual thunk to emfio::emfreader::XEmfParser::getDecomposition(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at emfio/source/emfuno/xemfparser.cxx > #7 in VectorGraphicData::ensureSequenceAndRange() at vcl/source/gdi/vectorgraphicdata.cxx:172:137 > #8 in VectorGraphicData::getPrimitive2DSequence() const at vcl/source/gdi/vectorgraphicdata.cxx:279:45 > #9 in ImpGraphic::ImplGetGDIMetaFile() const at vcl/source/gdi/impgraph.cxx:844:110 > #10 in Graphic::GetGDIMetaFile() const at vcl/source/gdi/graph.cxx:365:26 > #11 in ReadWindowMetafile(SvStream&, GDIMetaFile&) at vcl/source/filter/wmf/wmf.cxx:62:25 > #12 in WmfTest::testEmfProblem() at emfio/qa/cppunit/wmf/wmfimporttest.cxx:116:5 An invariant of SvStream appears to be that m_pRWBuf can be null and that m_pBufPos is null iff m_pRWBuf is null. So don't update m_pBufPos here when m_pRWBuf is null. (And assert the assumed invariant.) Change-Id: Iad2eb2723394f5564d43dfa8a3a1a8b8de79158d Reviewed-on: https://gerrit.libreoffice.org/81237 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-21-fsanitize=nullptr-with-nonzero-offsetStephan Bergmann
...(new with Clang 10 trunk), as seen during CppunitTest_sw_ww8export: > sw/source/filter/ww8/ww8scan.cxx:5640:38: runtime error: applying non-zero offset 22 to null pointer > #0 in WW8PLCFxDesc::Restore(WW8PLCFxSave1 const&) at sw/source/filter/ww8/ww8scan.cxx:5640:38 > #1 in WW8PLCFMan::RestoreAllPLCFx(WW8PLCFxSaveAll const&) at sw/source/filter/ww8/ww8scan.cxx:5159:21 > #2 in WW8ReaderSave::Restore(SwWW8ImplReader*) at sw/source/filter/ww8/ww8par.cxx:2081:27 > #3 in SwWW8ImplReader::Read_HdFtFootnoteText(SwNodeIndex const*, int, int, ManTypes) at sw/source/filter/ww8/ww8par.cxx:2100:11 > #4 in SwWW8ImplReader::End_Footnote() at sw/source/filter/ww8/ww8par2.cxx:233:9 > #5 in SwWW8ImplReader::EndExtSprm(unsigned short) at sw/source/filter/ww8/ww8par6.cxx:5272:9 > #6 in SwWW8ImplReader::ReadTextAttr(int&, long, bool&, int) at sw/source/filter/ww8/ww8par.cxx:3867:17 > #7 in SwWW8ImplReader::ReadAttrs(int&, int&, long, bool&) at sw/source/filter/ww8/ww8par.cxx:3959:21 > #8 in SwWW8ImplReader::ReadText(int, int, ManTypes) at sw/source/filter/ww8/ww8par.cxx:4041:9 > #9 in SwWW8ImplReader::CoreLoad(WW8Glossary const*) at sw/source/filter/ww8/ww8par.cxx:5236:9 > #10 in SwWW8ImplReader::LoadThroughDecryption(WW8Glossary*) at sw/source/filter/ww8/ww8par.cxx:5900:19 > #11 in SwWW8ImplReader::LoadDoc(WW8Glossary*) at sw/source/filter/ww8/ww8par.cxx:6204:19 > #12 in WW8Reader::Read(SwDoc&, rtl::OUString const&, SwPaM&, rtl::OUString const&) at sw/source/filter/ww8/ww8par.cxx:6355:26 > #13 in SwReader::Read(Reader const&) at sw/source/filter/basflt/shellio.cxx:188:22 > #14 in SwDocShell::ConvertFrom(SfxMedium&) at sw/source/uibase/app/docsh.cxx:261:26 > #15 in SfxObjectShell::DoLoad(SfxMedium*) at sfx2/source/doc/objstor.cxx:768:23 > #16 in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/sfxbasemodel.cxx:1851:36 > #17 in (anonymous namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) at sfx2/source/view/frmload.cxx:691:28 > #18 in framework::LoadEnv::impl_loadContent() at framework/source/loadenv/loadenv.cxx:1157:37 > #19 in framework::LoadEnv::startLoading() at framework/source/loadenv/loadenv.cxx:390:20 > #20 in framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/loadenv/loadenv.cxx:171:14 > #21 in framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/services/desktop.cxx:621:12 > #23 in unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at unotest/source/cpp/macros_test.cxx:48:62 > #24 in SwModelTestBase::reload(char const*, char const*, char const*) at sw/qa/extras/inc/swmodeltestbase.hxx:827:23 > #25 in SwModelTestBase::executeImportExportImportTest(char const*, char const*) at sw/qa/extras/inc/swmodeltestbase.hxx:292:9 > #26 in testFdo46020::Import_Export_Import() at sw/qa/extras/ww8export/ww8export.cxx:764:1 I have no idea whether aD.pMemPos can legitimately be null here, whether this is due to some previous processing error, or... Change-Id: I956423b6a9683d862b48479033b047c40df0acc0 Reviewed-on: https://gerrit.libreoffice.org/81241 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-21loplugin:virtualdead unused params in formsNoel Grandin
Change-Id: Iac26ba57443060474f4f33c4f449a69eca8c1063 Reviewed-on: https://gerrit.libreoffice.org/81236 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21sc: rowcol: tdf#50916 convert viewfuncNoel Grandin
Change-Id: I7058a426514bc3761f22476841267925bb175837 Reviewed-on: https://gerrit.libreoffice.org/81240 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21loplugin:virtualdead unused param in SvtFileDialog_BaseNoel Grandin
Change-Id: Id10c6df2a9d00f19dc1dc314515fedbe90918f66 Reviewed-on: https://gerrit.libreoffice.org/81235 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21-fsanitize=nullptr-with-nonzero-offsetStephan Bergmann
...(new with Clang 10 trunk), as seen during CppunitTest_svx_unit: > sw/source/filter/ww8/ww8scan.cxx:2758:69: runtime error: applying non-zero offset 2 to null pointer > #0 in WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(WW8Fib const&, SvStream*, SvStream*, long, long, ePLCFT, int) at sw/source/filter/ww8/ww8scan.cxx:2758:69 > #1 in WW8PLCFx_Fc_FKP::NewFkp() at sw/source/filter/ww8/ww8scan.cxx:3088:24 > #2 in WW8PLCFx_Fc_FKP::GetSprmsAndPos(int&, int&, int&) at sw/source/filter/ww8/ww8scan.cxx:3202:14 > #3 in WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc*) at sw/source/filter/ww8/ww8scan.cxx:3385:39 > #4 in WW8PLCFMan::GetNewSprms(WW8PLCFxDesc&) at sw/source/filter/ww8/ww8scan.cxx:4852:19 > #5 in WW8PLCFMan::WW8PLCFMan(WW8ScannerBase const*, ManTypes, long, bool) at sw/source/filter/ww8/ww8scan.cxx:5059:21 > #6 in SwWW8ImplReader::ReadText(int, int, ManTypes) at sw/source/filter/ww8/ww8par.cxx:4018:26 > #7 in SwWW8ImplReader::CoreLoad(WW8Glossary const*) at sw/source/filter/ww8/ww8par.cxx:5236:9 > #8 in SwWW8ImplReader::LoadThroughDecryption(WW8Glossary*) at sw/source/filter/ww8/ww8par.cxx:5900:19 > #9 in SwWW8ImplReader::LoadDoc(WW8Glossary*) at sw/source/filter/ww8/ww8par.cxx:6204:19 > #10 in WW8Reader::Read(SwDoc&, rtl::OUString const&, SwPaM&, rtl::OUString const&) at sw/source/filter/ww8/ww8par.cxx:6355:26 > #11 in SwReader::Read(Reader const&) at sw/source/filter/basflt/shellio.cxx:188:22 > #12 in SwDocShell::ConvertFrom(SfxMedium&) at sw/source/uibase/app/docsh.cxx:261:26 > #13 in SfxObjectShell::DoLoad(SfxMedium*) at sfx2/source/doc/objstor.cxx:768:23 > #14 in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/sfxbasemodel.cxx:1851:36 > #15 in (anonymous namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) at sfx2/source/view/frmload.cxx:691:28 > #16 in framework::LoadEnv::impl_loadContent() at framework/source/loadenv/loadenv.cxx:1157:37 > #17 in framework::LoadEnv::startLoading() at framework/source/loadenv/loadenv.cxx:390:20 > #18 in framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/loadenv/loadenv.cxx:171:14 > #19 in framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/services/desktop.cxx:621:12 > #21 in unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at unotest/source/cpp/macros_test.cxx:48:62 > #22 in (anonymous namespace)::testHalfEllipseVML::TestBody() at svx/qa/unit/customshapes.cxx:212:19 I have no idea whether aEntry.mpData can legitimately be null here, whether this is due to some previous processing error, or... Change-Id: I7dd2f568c57d8ce66774066534ef9ec86fe254e3 Reviewed-on: https://gerrit.libreoffice.org/81239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-21tdf#127773 AutoCorrect Dialog Exceptions tab updateandreas kainz
Change-Id: I7ba9fde84a32d01f110f08f7d277079b2594e96d Reviewed-on: https://gerrit.libreoffice.org/81007 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2019-10-21tdf#128188 sw_redlinehide: fix off-by-1 footnote numbers...Michael Stahl
... in sections with "Collect at end of text" set when "Track Changes->Show" is off; the pre-increment erroneously became a post-increment. (regression from fe1d3328997741b55202aca7b3dc566ca833a5f4) Change-Id: Ie438418883bdf91a519d553c10e8d9952a94a52d Reviewed-on: https://gerrit.libreoffice.org/81234 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-10-21loplugin:virtualdead unused param in EditEngine::FieldClickedNoel Grandin
Change-Id: Iffe075960308d5058cb7535e9216caa37aabe0c5 Reviewed-on: https://gerrit.libreoffice.org/81232 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21loplugin:virtualdead unused param in UnknownAttrTokenNoel Grandin
Change-Id: Iccf88b919cfc40419271e6f18d101027ef2bb9df Reviewed-on: https://gerrit.libreoffice.org/81218 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21loplugin:virtualdead unused param in ProcessClientAnchor2Noel Grandin
Change-Id: Ic766fcc1bfd33d891edc1da87e1b35a8efba169a Reviewed-on: https://gerrit.libreoffice.org/81217 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21tdf#42949 Fix IWYU warnings in xmlscript/Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I7f15170473100c50bd4d287ec8cb4a8d6186c703 Reviewed-on: https://gerrit.libreoffice.org/81164 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-10-21jsdialogs: handle spinfieldsSzymon Kłos
Change-Id: I9b845917ff1a7cb2242d7ef2b6b370007d0091b4 Reviewed-on: https://gerrit.libreoffice.org/81230 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2019-10-21sc: rowcol: tdf#50916 convert ui/undoAron Budea
Change-Id: I93ad2bbcf95ab136b9ce4df58e2849980e97d5fd Reviewed-on: https://gerrit.libreoffice.org/81146 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>