summaryrefslogtreecommitdiff
path: root/lotuswordpro
AgeCommit message (Collapse)Author
2018-10-03loplugin:unusedmethodsNoel Grandin
Change-Id: I7db0c27ff2213210ed4b46ebbadc1a2f74a18257 Reviewed-on: https://gerrit.libreoffice.org/61249 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-28loplugin:unusedmethodsNoel Grandin
Change-Id: I5f9ef043d76c55f2c761fd08a2bc1dae66b675c8 Reviewed-on: https://gerrit.libreoffice.org/61073 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-27loplugin:methodcycles more graph theory for the winNoel Grandin
implemeent a reduction approach, which is good at finding virtual methods that only themselves or their virtual partners. The accessibility GetVisArea stuff is dead since commit 891e41fac81fbd8d5cdb277b26639abfd25a7143 Date: Wed Apr 4 11:23:22 2018 +0200 dead code in AccessibleTextHelper_Impl::UpdateVisibleChildren Change-Id: I78d9d8bca585ecec8394f2c3fe2baa93db0e58f5 Reviewed-on: https://gerrit.libreoffice.org/60912 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-26Fix typoAndrea Gelmini
Not so sure, but anyway, let's see what the gods say. Change-Id: I5abffb27f8d124c34b50a3591de1ffc8c64fa13a Reviewed-on: https://gerrit.libreoffice.org/60994 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-09-26loplugin:useuniqueptr in LwpFormulaInfoNoel Grandin
Change-Id: Iac1f025f1311ef05fd48581d5bee9875163f4f2b Reviewed-on: https://gerrit.libreoffice.org/60972 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-26loplugin:useuniqueptr in LwpFormulaInfoNoel Grandin
Change-Id: I73fbad626ab1d37448ea12052a2fbafab5656fc7 Reviewed-on: https://gerrit.libreoffice.org/60971 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-26loplugin:useuniqueptr in XFIndexNoel Grandin
but actually this object should be held by rtl::Reference Change-Id: Iabf068bd909201af5df6f987c6dcdb64679fefbd Reviewed-on: https://gerrit.libreoffice.org/60970 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-17New loplugin:externalStephan Bergmann
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-12loplugin:useuniqueptr in lotuswordproNoel Grandin
Change-Id: Ib34984180cea7143b6595decba785f1b55d15e2c Reviewed-on: https://gerrit.libreoffice.org/60336 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-09loplugin:simplifyconstruct in l10ntools..packageNoel Grandin
Change-Id: I8dba8ef1e7455af1e55bbd6086b49c0606bf4927 Reviewed-on: https://gerrit.libreoffice.org/60212 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-17ofz: infinite loopCaolán McNamara
Change-Id: Ie42e73ebe02cd4c2bb10c9d0e55a5256b1fffd15 Reviewed-on: https://gerrit.libreoffice.org/59248 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-16-Werror,-Wformat (clang-cl)Stephan Bergmann
Change-Id: I2605d5d9bc201bac8160c96b47c6e03181fcbfc3 Reviewed-on: https://gerrit.libreoffice.org/59156 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-15ofz#9910 Direct-leakCaolán McNamara
Change-Id: I14e5fbf8e572e9ea1fd8779434fd46ed43caac2c Reviewed-on: https://gerrit.libreoffice.org/59069 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-14abandon import on bad entryCaolán McNamara
Change-Id: I86a48eec43505966bca03aca947ab4d67de41e60 Reviewed-on: https://gerrit.libreoffice.org/58967 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2018-08-14LwpObjectID::GetLow returns sal_uInt32Stephan Bergmann
...and b7af008a35f48b821dd95f3d2d945f254bf4ed26 "remove first chunk of lotuswordpro warnings" probably changed that in error: void LwpGraphicObject::GetBentoNamebyID(LwpObjectID* pMyID, std::string& rName) { sal_uInt16 nHigh = pMyID->GetHigh(); - sal_uInt32 nLow = pMyID->GetLow(); + sal_uInt16 nLow = pMyID->GetLow(); char pTempStr[32]; rName = std::string("Gr"); - sprintf(pTempStr, "%X,%lX", nHigh, nLow); + sprintf(pTempStr, "%X,%X", nHigh, nLow); rName.append(pTempStr); } Found with new Clang -fsanitize=implicit-conversion during CppunitTest_lotuswordpro_test_lotuswordpro: > Testing file:///home/sbergman/lo/core/lotuswordpro/qa/cppunit/data/pass/IntPres11-2004.lwp: > lotuswordpro/source/filter/lwpgrfobj.cxx:321:23: runtime error: implicit conversion from type 'sal_uInt32' (aka 'unsigned int') of value 1085767199 (32-bit, unsigned) to type 'sal_uInt16' (aka 'unsigned short') changed the value to 32287 (16-bit, unsigned) > #0 in LwpGraphicObject::GetBentoNamebyID(LwpObjectID const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) at lotuswordpro/source/filter/lwpgrfobj.cxx:321:23 (instdir/program/liblwpftlo.so +0x948b85) > #1 in LwpGraphicObject::GetRawGrafData() at lotuswordpro/source/filter/lwpgrfobj.cxx:352:5 (instdir/program/liblwpftlo.so +0x940cae) > #2 in LwpGraphicObject::XFConvert(XFContentContainer*) at lotuswordpro/source/filter/lwpgrfobj.cxx:228:48 (instdir/program/liblwpftlo.so +0x93e1af) > #3 in LwpObject::DoXFConvert(XFContentContainer*) at lotuswordpro/inc/lwpobj.hxx:129:9 (instdir/program/liblwpftlo.so +0x84a472) > #4 in LwpFrameLayout::XFConvertFrame(XFContentContainer*, int, int, bool) at lotuswordpro/source/filter/lwpframelayout.cxx:836:26 (instdir/program/liblwpftlo.so +0x87ba7b) > #5 in LwpFrameLayout::XFConvert(XFContentContainer*) at lotuswordpro/source/filter/lwpframelayout.cxx:800:13 (instdir/program/liblwpftlo.so +0x87b1b0) > #6 in LwpObject::DoXFConvert(XFContentContainer*) at lotuswordpro/inc/lwpobj.hxx:129:9 (instdir/program/liblwpftlo.so +0x84a472) > #7 in LwpFribFrame::XFConvert(XFContentContainer*) at lotuswordpro/source/filter/lwpfribframe.cxx:183:14 (instdir/program/liblwpftlo.so +0x8a6382) > #8 in LwpFribPtr::XFConvert() at lotuswordpro/source/filter/lwpfribptr.cxx:280:24 (instdir/program/liblwpftlo.so +0x8f187d) > #9 in LwpPara::XFConvert(XFContentContainer*) at lotuswordpro/source/filter/lwppara.cxx:258:13 (instdir/program/liblwpftlo.so +0xa608a1) > #10 in LwpStory::XFConvert(XFContentContainer*) at lotuswordpro/source/filter/lwpstory.cxx:110:16 (instdir/program/liblwpftlo.so +0xae1e1a) > #11 in LwpStory::Parse(IXFStream*) at lotuswordpro/source/filter/lwpstory.cxx:156:5 (instdir/program/liblwpftlo.so +0xae6aa7) > #12 in LwpObject::DoParse(IXFStream*) at lotuswordpro/inc/lwpobj.hxx:119:9 (instdir/program/liblwpftlo.so +0x7a4802) > #13 in LwpPageLayout::Parse(IXFStream*) at lotuswordpro/source/filter/lwppagelayout.cxx:120:17 (instdir/program/liblwpftlo.so +0xa1885d) > #14 in LwpObject::DoParse(IXFStream*) at lotuswordpro/inc/lwpobj.hxx:119:9 (instdir/program/liblwpftlo.so +0x7a4802) > #15 in LwpDocument::ParseDocContent(IXFStream*) at lotuswordpro/source/filter/lwpdoc.cxx:428:17 (instdir/program/liblwpftlo.so +0x794de5) > #16 in LwpDocument::Parse(IXFStream*) at lotuswordpro/source/filter/lwpdoc.cxx:158:9 (instdir/program/liblwpftlo.so +0x792f6a) > #17 in LwpObject::DoParse(IXFStream*) at lotuswordpro/inc/lwpobj.hxx:119:9 (instdir/program/liblwpftlo.so +0x7a4802) > #18 in LwpDocSock::Parse(IXFStream*) at lotuswordpro/source/filter/lwpdoc.cxx:816:15 (instdir/program/liblwpftlo.so +0x7a3a4f) > #19 in LwpObject::DoParse(IXFStream*) at lotuswordpro/inc/lwpobj.hxx:119:9 (instdir/program/liblwpftlo.so +0x7a4802) > #20 in LwpDocument::Parse(IXFStream*) at lotuswordpro/source/filter/lwpdoc.cxx:164:19 (instdir/program/liblwpftlo.so +0x793148) > #21 in Lwp9Reader::ParseDocument() at lotuswordpro/source/filter/lwp9reader.cxx:167:10 (instdir/program/liblwpftlo.so +0x6f52a1) > #22 in Lwp9Reader::Read() at lotuswordpro/source/filter/lwp9reader.cxx:90:20 (instdir/program/liblwpftlo.so +0x6f3fbc) > #23 in ReadWordproFile(SvStream&, com::sun::star::uno::Reference<com::sun::star::xml::sax::XDocumentHandler> const&) at lotuswordpro/source/filter/lwpfilter.cxx:215:33 (instdir/program/liblwpftlo.so +0x82442d) > #24 in LotusWordProImportFilter::importImpl(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at lotuswordpro/source/filter/LotusWordProImportFilter.cxx:75:14 (instdir/program/liblwpftlo.so +0x6e4aca) > #25 in LotusWordProImportFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at lotuswordpro/source/filter/LotusWordProImportFilter.cxx:87:12 (instdir/program/liblwpftlo.so +0x6e4d8a) > #26 in (anonymous namespace)::LotusWordProTest::load(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) at lotuswordpro/qa/cppunit/test_lotuswordpro.cxx:59:27 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x14a52) > #27 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) > #28 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) > #29 in (anonymous namespace)::LotusWordProTest::test() at lotuswordpro/qa/cppunit/test_lotuswordpro.cxx:64:9 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x153d4) > #30 in void std::__invoke_impl<void, void ((anonymous namespace)::LotusWordProTest::*&)(), (anonymous namespace)::LotusWordProTest*&>(std::__invoke_memfun_deref, void ((anonymous namespace)::LotusWordProTest::*&)(), (anonymous namespace)::LotusWordProTest*&) at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/invoke.h:73:14 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x17fcd) > #31 in std::__invoke_result<void ((anonymous namespace)::LotusWordProTest::*&)(), (anonymous namespace)::LotusWordProTest*&>::type std::__invoke<void ((anonymous namespace)::LotusWordProTest::*&)(), (anonymous namespace)::LotusWordProTest*&>(void ((anonymous namespace)::LotusWordProTest::*&)(), (anonymous namespace)::LotusWordProTest*&) at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/invoke.h:95:14 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x17c6b) > #32 in void std::_Bind<void ((anonymous namespace)::LotusWordProTest::* ((anonymous namespace)::LotusWordProTest*))()>::__call<void, 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/functional:400:11 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x17b28) > #33 in void std::_Bind<void ((anonymous namespace)::LotusWordProTest::* ((anonymous namespace)::LotusWordProTest*))()>::operator()<void>() at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/functional:482:17 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x178e5) > #34 in std::_Function_handler<void (), std::_Bind<void ((anonymous namespace)::LotusWordProTest::* ((anonymous namespace)::LotusWordProTest*))()> >::_M_invoke(std::_Any_data const&) at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/std_function.h:297:2 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x16bc6) > #35 in std::function<void ()>::operator()() const at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/std_function.h:687:14 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x23276) > #36 in CppUnit::TestCaller<(anonymous namespace)::LotusWordProTest>::runTest() at workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:175:7 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x160c6) > #37 in CppUnit::TestCaseMethodFunctor::operator()() const at workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:32:5 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22c1f1) > #38 in (anonymous namespace)::Protector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) at test/source/vclbootstrapprotector.cxx:49:14 (workdir/LinkTarget/Library/libvclbootstrapprotector.so +0x159a) > #39 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const at workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x20e64d) > #40 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) at unotest/source/cpp/unobootstrapprotector/unobootstrapprotector.cxx:88:12 (workdir/LinkTarget/Library/unobootstrapprotector.so +0x987a) > #41 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const at workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x20e64d) > #42 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) at unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx:63:16 (workdir/LinkTarget/Library/unoexceptionprotector.so +0x5000) > #43 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const at workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x20e64d) > #44 in CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) at workdir/UnpackedTarball/cppunit/src/cppunit/DefaultProtector.cpp:15:12 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x1c6c51) > #45 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const at workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x20e64d) > #46 in CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) at workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:86:18 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x2096b8) > #47 in CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) at workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:182:28 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x26c3e4) > #48 in CppUnit::TestCase::run(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:91:13 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22b1fb) > #49 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22db43) > #50 in CppUnit::TestComposite::run(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22d119) > #51 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22db43) > #52 in CppUnit::TestComposite::run(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22d119) > #53 in CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:47:27 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x28b6c2) > #54 in CppUnit::TestResult::runTest(CppUnit::Test*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:149:9 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x26b715) > #55 in CppUnit::TestRunner::run(CppUnit::TestResult&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) at workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:96:14 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x28c103) > #56 in (anonymous namespace)::ProtectedFixtureFunctor::run() const at sal/cppunittester/cppunittester.cxx:316:20 (workdir/LinkTarget/Executable/cppunittester +0x440697) > #57 in sal_main() at sal/cppunittester/cppunittester.cxx:466:20 (workdir/LinkTarget/Executable/cppunittester +0x43e2fc) > #58 in main at sal/cppunittester/cppunittester.cxx:373:1 (workdir/LinkTarget/Executable/cppunittester +0x43d90e) > #59 in __libc_start_main at /usr/src/debug/glibc-2.27-74-g68c1bf8097/csu/../csu/libc-start.c:308:16 (/lib64/libc.so.6 +0x2324a) > #60 in _start at <null> (workdir/LinkTarget/Executable/cppunittester +0x4172a9) Change-Id: I90f3ed9efa56359005e84732139452acacbaa0ad Reviewed-on: https://gerrit.libreoffice.org/58937 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Jenkins
2018-08-14Don't call LwpTools::QuickReadUnicode with negative, wrapped-around strlenStephan Bergmann
...as happens during CppunitTest_lotuswordpro_test_lotuswordpro (as found with new Clang -fsanitize=implicit-conversion, see below). (The code was like that ever since its introduction with cc316b39d9110c536e1758a4f814738ca209bb02 "Port of Lotus Word Pro filter, by Fong Lin and Noel Power".) > lotuswordpro/source/filter/lwpatomholder.cxx:83:49: runtime error: implicit conversion from type 'unsigned long' of value 18446744073709551615 (64-bit, unsigned) to type 'sal_uInt16' (aka 'unsigned short') changed the value to 65535 (16-bit, unsigned) > #0 in LwpAtomHolder::Read(LwpObjectStream*) at lotuswordpro/source/filter/lwpatomholder.cxx:83:49 (instdir/program/liblwpftlo.so +0x705fd2) > #1 in LwpFontTableEntry::Read(LwpObjectStream*) at lotuswordpro/source/filter/lwpfont.cxx:218:23 (instdir/program/liblwpftlo.so +0x834958) > #2 in LwpFontTable::Read(LwpObjectStream*) at lotuswordpro/source/filter/lwpfont.cxx:260:31 (instdir/program/liblwpftlo.so +0x8351ce) > #3 in LwpFontNameManager::Read(LwpObjectStream*) at lotuswordpro/source/filter/lwpfont.cxx:379:15 (instdir/program/liblwpftlo.so +0x836587) > #4 in LwpFontManager::Read(LwpObjectStream*) at lotuswordpro/source/filter/lwpfont.cxx:433:13 (instdir/program/liblwpftlo.so +0x83767a) > #5 in LwpFoundry::Read(LwpObjectStream*) at lotuswordpro/source/filter/lwpfoundry.cxx:123:15 (instdir/program/liblwpftlo.so +0x850f23) > #6 in LwpFoundry::LwpFoundry(LwpObjectStream*, LwpDocument*) at lotuswordpro/source/filter/lwpfoundry.cxx:81:5 (instdir/program/liblwpftlo.so +0x850519) > #7 in LwpDocument::Read() at lotuswordpro/source/filter/lwpdoc.cxx:116:31 (instdir/program/liblwpftlo.so +0x791ae6) > #8 in LwpObject::QuickRead() at lotuswordpro/source/filter/lwpobj.cxx:81:5 (instdir/program/liblwpftlo.so +0x9d4989) > #9 in LwpObjectFactory::CreateObject(unsigned int, LwpObjectHeader&) at lotuswordpro/source/filter/lwpobjfactory.cxx:661:17 (instdir/program/liblwpftlo.so +0x9df914) > #10 in LwpObjectFactory::QueryObject(LwpObjectID const&) at lotuswordpro/source/filter/lwpobjfactory.cxx:704:15 (instdir/program/liblwpftlo.so +0x9e058f) > #11 in LwpObjectID::obj(VO_TYPE) const at lotuswordpro/source/filter/lwpobjid.cxx:190:47 (instdir/program/liblwpftlo.so +0xa00b99) > #12 in LwpDocument::GetFirstDivision() at lotuswordpro/source/filter/lwpdoc.cxx:621:68 (instdir/program/liblwpftlo.so +0x7a0e21) > #13 in LwpDocument::ImplGetFirstDivisionWithContentsThatIsNotOLE() at lotuswordpro/source/filter/lwpdoc.cxx:653:30 (instdir/program/liblwpftlo.so +0x7a1532) > #14 in LwpDocument::GetFirstDivisionWithContentsThatIsNotOLE() at lotuswordpro/source/filter/lwpdoc.hxx:159:29 (instdir/program/liblwpftlo.so +0x7a8bcc) > #15 in LwpDocument::RegisterDefaultParaStyles() at lotuswordpro/source/filter/lwpdoc.cxx:398:34 (instdir/program/liblwpftlo.so +0x795aae) > #16 in LwpDocument::RegisterStyle() at lotuswordpro/source/filter/lwpdoc.cxx:207:5 (instdir/program/liblwpftlo.so +0x795376) > #17 in LwpObject::DoRegisterStyle() at lotuswordpro/inc/lwpobj.hxx:109:9 (instdir/program/liblwpftlo.so +0x70070a) > #18 in Lwp9Reader::ParseDocument() at lotuswordpro/source/filter/lwp9reader.cxx:154:10 (instdir/program/liblwpftlo.so +0x6f5197) > #19 in Lwp9Reader::Read() at lotuswordpro/source/filter/lwp9reader.cxx:90:20 (instdir/program/liblwpftlo.so +0x6f444c) > #20 in ReadWordproFile(SvStream&, com::sun::star::uno::Reference<com::sun::star::xml::sax::XDocumentHandler> const&) at lotuswordpro/source/filter/lwpfilter.cxx:215:33 (instdir/program/liblwpftlo.so +0x82488d) > #21 in LotusWordProImportFilter::importImpl(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at lotuswordpro/source/filter/LotusWordProImportFilter.cxx:75:14 (instdir/program/liblwpftlo.so +0x6e4f5a) > #22 in LotusWordProImportFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at lotuswordpro/source/filter/LotusWordProImportFilter.cxx:87:12 (instdir/program/liblwpftlo.so +0x6e521a) > #23 in (anonymous namespace)::LotusWordProTest::load(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) at lotuswordpro/qa/cppunit/test_lotuswordpro.cxx:59:27 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x14a52) > #24 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) > #25 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:158:5 (workdir/LinkTarget/CppunitTest/../Library/libunotest.so +0x580e7) > #26 in (anonymous namespace)::LotusWordProTest::test() at lotuswordpro/qa/cppunit/test_lotuswordpro.cxx:64:9 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x153d4) > #27 in void std::__invoke_impl<void, void ((anonymous namespace)::LotusWordProTest::*&)(), (anonymous namespace)::LotusWordProTest*&>(std::__invoke_memfun_deref, void ((anonymous namespace)::LotusWordProTest::*&)(), (anonymous namespace)::LotusWordProTest*&) at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/invoke.h:73:14 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x17fcd) > #28 in std::__invoke_result<void ((anonymous namespace)::LotusWordProTest::*&)(), (anonymous namespace)::LotusWordProTest*&>::type std::__invoke<void ((anonymous namespace)::LotusWordProTest::*&)(), (anonymous namespace)::LotusWordProTest*&>(void ((anonymous namespace)::LotusWordProTest::*&)(), (anonymous namespace)::LotusWordProTest*&) at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/invoke.h:95:14 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x17c6b) > #29 in void std::_Bind<void ((anonymous namespace)::LotusWordProTest::* ((anonymous namespace)::LotusWordProTest*))()>::__call<void, 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/functional:400:11 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x17b28) > #30 in void std::_Bind<void ((anonymous namespace)::LotusWordProTest::* ((anonymous namespace)::LotusWordProTest*))()>::operator()<void>() at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/functional:482:17 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x178e5) > #31 in std::_Function_handler<void (), std::_Bind<void ((anonymous namespace)::LotusWordProTest::* ((anonymous namespace)::LotusWordProTest*))()> >::_M_invoke(std::_Any_data const&) at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/std_function.h:297:2 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x16bc6) > #32 in std::function<void ()>::operator()() const at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/std_function.h:687:14 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x23276) > #33 in CppUnit::TestCaller<(anonymous namespace)::LotusWordProTest>::runTest() at workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:175:7 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x160c6) > #34 in CppUnit::TestCaseMethodFunctor::operator()() const at workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:32:5 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22c1f1) > #35 in (anonymous namespace)::Protector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) at test/source/vclbootstrapprotector.cxx:49:14 (workdir/LinkTarget/Library/libvclbootstrapprotector.so +0x159a) > #36 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const at workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x20e64d) > #37 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) at unotest/source/cpp/unobootstrapprotector/unobootstrapprotector.cxx:88:12 (workdir/LinkTarget/Library/unobootstrapprotector.so +0x987a) > #38 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const at workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x20e64d) > #39 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) at unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx:63:16 (workdir/LinkTarget/Library/unoexceptionprotector.so +0x5000) > #40 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const at workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x20e64d) > #41 in CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) at workdir/UnpackedTarball/cppunit/src/cppunit/DefaultProtector.cpp:15:12 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x1c6c51) > #42 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const at workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x20e64d) > #43 in CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) at workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:86:18 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x2096b8) > #44 in CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) at workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:182:28 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x26c3e4) > #45 in CppUnit::TestCase::run(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:91:13 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22b1fb) > #46 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22db43) > #47 in CppUnit::TestComposite::run(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22d119) > #48 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22db43) > #49 in CppUnit::TestComposite::run(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22d119) > #50 in CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:47:27 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x28b6c2) > #51 in CppUnit::TestResult::runTest(CppUnit::Test*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:149:9 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x26b715) > #52 in CppUnit::TestRunner::run(CppUnit::TestResult&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) at workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:96:14 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x28c103) > #53 in (anonymous namespace)::ProtectedFixtureFunctor::run() const at sal/cppunittester/cppunittester.cxx:316:20 (workdir/LinkTarget/Executable/cppunittester +0x440697) > #54 in sal_main() at sal/cppunittester/cppunittester.cxx:466:20 (workdir/LinkTarget/Executable/cppunittester +0x43e2fc) > #55 in main at sal/cppunittester/cppunittester.cxx:373:1 (workdir/LinkTarget/Executable/cppunittester +0x43d90e) > #56 in __libc_start_main at /usr/src/debug/glibc-2.27-74-g68c1bf8097/csu/../csu/libc-start.c:308:16 (/lib64/libc.so.6 +0x2324a) > #57 in _start at <null> (workdir/LinkTarget/Executable/cppunittester +0x4172a9) Change-Id: If8fe6fac5fcd0853334f465bee0b6eedc8529e11 Reviewed-on: https://gerrit.libreoffice.org/58934 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-14Don't call LwpTools::QuickReadUnicode with negative, wrapped-around strlenStephan Bergmann
...as happens during CppunitTest_lotuswordpro_test_lotuswordpro (as found with new Clang -fsanitize=implicit-conversion, see below). (The code was like that ever since its introduction with cc316b39d9110c536e1758a4f814738ca209bb02 "Port of Lotus Word Pro filter, by Fong Lin and Noel Power".) Not sure how to report errors there, so just issue a SAL_WARN and return an empty string for now. > lotuswordpro/source/filter/lwpobjstrm.cxx:374:43: runtime error: implicit conversion from type 'unsigned long' of value 18446744073709551614 (64-bit, unsigned) to type 'sal_uInt16' (aka 'unsigned short') changed the value to 65534 (16-bit, unsigned) > #0 in LwpObjectStream::QuickReadStringPtr() at lotuswordpro/source/filter/lwpobjstrm.cxx:374:43 (instdir/program/liblwpftlo.so +0xa035d8) > #1 in LwpOleObject::Read() at lotuswordpro/source/filter/lwpoleobject.cxx:214:21 (instdir/program/liblwpftlo.so +0xa06630) > #2 in LwpObject::QuickRead() at lotuswordpro/source/filter/lwpobj.cxx:81:5 (instdir/program/liblwpftlo.so +0x9d4469) > #3 in LwpObjectFactory::CreateObject(unsigned int, LwpObjectHeader&) at lotuswordpro/source/filter/lwpobjfactory.cxx:661:17 (instdir/program/liblwpftlo.so +0x9df3f4) > #4 in LwpObjectFactory::QueryObject(LwpObjectID const&) at lotuswordpro/source/filter/lwpobjfactory.cxx:704:15 (instdir/program/liblwpftlo.so +0x9e006f) > #5 in LwpObjectID::obj(VO_TYPE) const at lotuswordpro/source/filter/lwpobjid.cxx:190:47 (instdir/program/liblwpftlo.so +0xa00679) > #6 in LwpParaStyle::Apply(XFParaStyle*) at lotuswordpro/source/filter/lwpparastyle.cxx:151:62 (instdir/program/liblwpftlo.so +0xa92be0) > #7 in LwpParaStyle::RegisterStyle() at lotuswordpro/source/filter/lwpparastyle.cxx:673:5 (instdir/program/liblwpftlo.so +0xa9e649) > #8 in LwpDocument::RegisterTextStyles() at lotuswordpro/source/filter/lwpdoc.cxx:242:25 (instdir/program/liblwpftlo.so +0x797af6) > #9 in LwpDocument::RegisterStyle() at lotuswordpro/source/filter/lwpdoc.cxx:211:5 (instdir/program/liblwpftlo.so +0x794fd6) > #10 in LwpObject::DoRegisterStyle() at lotuswordpro/inc/lwpobj.hxx:109:9 (instdir/program/liblwpftlo.so +0x7001ea) > #11 in LwpDocSock::RegisterStyle() at lotuswordpro/source/filter/lwpdoc.cxx:807:15 (instdir/program/liblwpftlo.so +0x7a36cf) > #12 in LwpObject::DoRegisterStyle() at lotuswordpro/inc/lwpobj.hxx:109:9 (instdir/program/liblwpftlo.so +0x7001ea) > #13 in LwpDocument::RegisterStyle() at lotuswordpro/source/filter/lwpdoc.cxx:222:19 (instdir/program/liblwpftlo.so +0x7953d4) > #14 in LwpObject::DoRegisterStyle() at lotuswordpro/inc/lwpobj.hxx:109:9 (instdir/program/liblwpftlo.so +0x7001ea) > #15 in Lwp9Reader::ParseDocument() at lotuswordpro/source/filter/lwp9reader.cxx:154:10 (instdir/program/liblwpftlo.so +0x6f4c77) > #16 in Lwp9Reader::Read() at lotuswordpro/source/filter/lwp9reader.cxx:90:20 (instdir/program/liblwpftlo.so +0x6f3f2c) > #17 in ReadWordproFile(SvStream&, com::sun::star::uno::Reference<com::sun::star::xml::sax::XDocumentHandler> const&) at lotuswordpro/source/filter/lwpfilter.cxx:215:33 (instdir/program/liblwpftlo.so +0x82436d) > #18 in LotusWordProImportFilter::importImpl(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at lotuswordpro/source/filter/LotusWordProImportFilter.cxx:75:14 (instdir/program/liblwpftlo.so +0x6e4a3a) > #19 in LotusWordProImportFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at lotuswordpro/source/filter/LotusWordProImportFilter.cxx:87:12 (instdir/program/liblwpftlo.so +0x6e4cfa) > #20 in (anonymous namespace)::LotusWordProTest::load(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) at lotuswordpro/qa/cppunit/test_lotuswordpro.cxx:59:27 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x14a52) > #21 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) > #22 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:158:5 (workdir/LinkTarget/CppunitTest/../Library/libunotest.so +0x580e7) > #23 in (anonymous namespace)::LotusWordProTest::test() at lotuswordpro/qa/cppunit/test_lotuswordpro.cxx:64:9 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x153d4) > #24 in void std::__invoke_impl<void, void ((anonymous namespace)::LotusWordProTest::*&)(), (anonymous namespace)::LotusWordProTest*&>(std::__invoke_memfun_deref, void ((anonymous namespace)::LotusWordProTest::*&)(), (anonymous namespace)::LotusWordProTest*&) at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/invoke.h:73:14 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x17fcd) > #25 in std::__invoke_result<void ((anonymous namespace)::LotusWordProTest::*&)(), (anonymous namespace)::LotusWordProTest*&>::type std::__invoke<void ((anonymous namespace)::LotusWordProTest::*&)(), (anonymous namespace)::LotusWordProTest*&>(void ((anonymous namespace)::LotusWordProTest::*&)(), (anonymous namespace)::LotusWordProTest*&) at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/invoke.h:95:14 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x17c6b) > #26 in void std::_Bind<void ((anonymous namespace)::LotusWordProTest::* ((anonymous namespace)::LotusWordProTest*))()>::__call<void, 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/functional:400:11 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x17b28) > #27 in void std::_Bind<void ((anonymous namespace)::LotusWordProTest::* ((anonymous namespace)::LotusWordProTest*))()>::operator()<void>() at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/functional:482:17 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x178e5) > #28 in std::_Function_handler<void (), std::_Bind<void ((anonymous namespace)::LotusWordProTest::* ((anonymous namespace)::LotusWordProTest*))()> >::_M_invoke(std::_Any_data const&) at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/std_function.h:297:2 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x16bc6) > #29 in std::function<void ()>::operator()() const at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/std_function.h:687:14 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x23276) > #30 in CppUnit::TestCaller<(anonymous namespace)::LotusWordProTest>::runTest() at workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:175:7 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x160c6) > #31 in CppUnit::TestCaseMethodFunctor::operator()() const at workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:32:5 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22c1f1) > #32 in (anonymous namespace)::Protector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) at test/source/vclbootstrapprotector.cxx:49:14 (workdir/LinkTarget/Library/libvclbootstrapprotector.so +0x159a) > #33 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const at workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x20e64d) > #34 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) at unotest/source/cpp/unobootstrapprotector/unobootstrapprotector.cxx:88:12 (workdir/LinkTarget/Library/unobootstrapprotector.so +0x987a) > #35 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const at workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x20e64d) > #36 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) at unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx:63:16 (workdir/LinkTarget/Library/unoexceptionprotector.so +0x5000) > #37 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const at workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x20e64d) > #38 in CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) at workdir/UnpackedTarball/cppunit/src/cppunit/DefaultProtector.cpp:15:12 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x1c6c51) > #39 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const at workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x20e64d) > #40 in CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) at workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:86:18 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x2096b8) > #41 in CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) at workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:182:28 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x26c3e4) > #42 in CppUnit::TestCase::run(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:91:13 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22b1fb) > #43 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22db43) > #44 in CppUnit::TestComposite::run(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22d119) > #45 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22db43) > #46 in CppUnit::TestComposite::run(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22d119) > #47 in CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:47:27 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x28b6c2) > #48 in CppUnit::TestResult::runTest(CppUnit::Test*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:149:9 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x26b715) > #49 in CppUnit::TestRunner::run(CppUnit::TestResult&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) at workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:96:14 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x28c103) > #50 in (anonymous namespace)::ProtectedFixtureFunctor::run() const at sal/cppunittester/cppunittester.cxx:316:20 (workdir/LinkTarget/Executable/cppunittester +0x440697) > #51 in sal_main() at sal/cppunittester/cppunittester.cxx:466:20 (workdir/LinkTarget/Executable/cppunittester +0x43e2fc) > #52 in main at sal/cppunittester/cppunittester.cxx:373:1 (workdir/LinkTarget/Executable/cppunittester +0x43d90e) > #53 in __libc_start_main at /usr/src/debug/glibc-2.27-74-g68c1bf8097/csu/../csu/libc-start.c:308:16 (/lib64/libc.so.6 +0x2324a) > #54 in _start at <null> (workdir/LinkTarget/Executable/cppunittester +0x4172a9) Change-Id: Idabb149df922432b48330d3914d1467b6ab01580 Reviewed-on: https://gerrit.libreoffice.org/58932 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-14LwpPageLayout::GetPageNumber returns sal_Int32Stephan Bergmann
...so assume this code (esp. the following nPageNumber>0 check) wants to actually use sal_Int32 rather than wrap-around (cf. the subtraction of 1) sal_uInt16. (The code was like that ever since its introduction with cc316b39d9110c536e1758a4f814738ca209bb02 "Port of Lotus Word Pro filter, by Fong Lin and Noel Power".) Found with new Clang -fsanitize=implicit-conversion during CppunitTest_lotuswordpro_test_lotuswordpro: > lotuswordpro/source/filter/lwppagelayout.cxx:447:23: runtime error: implicit conversion from type 'int' of value -2 (32-bit, signed) to type 'sal_uInt16' (aka 'unsigned short') changed the value to 65534 (16-bit, unsigned) > #0 in LwpPageLayout::HasFillerPageText(LwpFoundry const*) at lotuswordpro/source/filter/lwppagelayout.cxx:447:23 (instdir/program/liblwpftlo.so +0xa23859) > #1 in LwpMasterPage::RegisterFillerPageStyle() at lotuswordpro/source/filter/lwpfribsection.cxx:434:23 (instdir/program/liblwpftlo.so +0x9051e4) > #2 in LwpMasterPage::RegisterMasterPage(LwpFrib*) at lotuswordpro/source/filter/lwpfribsection.cxx:288:17 (instdir/program/liblwpftlo.so +0x8fd614) > #3 in LwpFribPageBreak::RegisterBreakStyle(LwpPara*) at lotuswordpro/source/filter/lwpfribbreaks.cxx:125:24 (instdir/program/liblwpftlo.so +0x890392) > #4 in LwpFribPtr::RegisterStyle() at lotuswordpro/source/filter/lwpfribptr.cxx:440:24 (instdir/program/liblwpftlo.so +0x8f4ef9) > #5 in LwpPara::RegisterStyle() at lotuswordpro/source/filter/lwppara.cxx:684:13 (instdir/program/liblwpftlo.so +0xa7267f) > #6 in LwpObject::DoRegisterStyle() at lotuswordpro/inc/lwpobj.hxx:109:9 (instdir/program/liblwpftlo.so +0x7001ea) > #7 in LwpStory::RegisterStyle() at lotuswordpro/source/filter/lwpstory.cxx:146:16 (instdir/program/liblwpftlo.so +0xae61cf) > #8 in LwpObject::DoRegisterStyle() at lotuswordpro/inc/lwpobj.hxx:109:9 (instdir/program/liblwpftlo.so +0x7001ea) > #9 in LwpFooterLayout::RegisterStyle(XFMasterPage*) at lotuswordpro/source/filter/lwppagelayout.cxx:1042:17 (instdir/program/liblwpftlo.so +0xa1f491) > #10 in LwpPageLayout::RegisterStyle() at lotuswordpro/source/filter/lwppagelayout.cxx:354:24 (instdir/program/liblwpftlo.so +0xa1d717) > #11 in LwpObject::DoRegisterStyle() at lotuswordpro/inc/lwpobj.hxx:109:9 (instdir/program/liblwpftlo.so +0x7001ea) > #12 in LwpHeadLayout::RegisterStyle() at lotuswordpro/source/filter/lwplayout.cxx:520:22 (instdir/program/liblwpftlo.so +0x96e987) > #13 in LwpObject::DoRegisterStyle() at lotuswordpro/inc/lwpobj.hxx:109:9 (instdir/program/liblwpftlo.so +0x7001ea) > #14 in LwpHeadLayout::RegisterStyle() at lotuswordpro/source/filter/lwplayout.cxx:520:22 (instdir/program/liblwpftlo.so +0x96e987) > #15 in LwpObject::DoRegisterStyle() at lotuswordpro/inc/lwpobj.hxx:109:9 (instdir/program/liblwpftlo.so +0x7001ea) > #16 in LwpFoundry::RegisterAllLayouts() at lotuswordpro/source/filter/lwpfoundry.cxx:182:17 (instdir/program/liblwpftlo.so +0x852894) > #17 in LwpDocument::RegisterLayoutStyles() at lotuswordpro/source/filter/lwpdoc.cxx:257:26 (instdir/program/liblwpftlo.so +0x7980b9) > #18 in LwpDocument::RegisterStyle() at lotuswordpro/source/filter/lwpdoc.cxx:212:5 (instdir/program/liblwpftlo.so +0x795056) > #19 in LwpObject::DoRegisterStyle() at lotuswordpro/inc/lwpobj.hxx:109:9 (instdir/program/liblwpftlo.so +0x7001ea) > #20 in LwpDocSock::RegisterStyle() at lotuswordpro/source/filter/lwpdoc.cxx:807:15 (instdir/program/liblwpftlo.so +0x7a36cf) > #21 in LwpObject::DoRegisterStyle() at lotuswordpro/inc/lwpobj.hxx:109:9 (instdir/program/liblwpftlo.so +0x7001ea) > #22 in LwpDocument::RegisterStyle() at lotuswordpro/source/filter/lwpdoc.cxx:222:19 (instdir/program/liblwpftlo.so +0x7953d4) > #23 in LwpObject::DoRegisterStyle() at lotuswordpro/inc/lwpobj.hxx:109:9 (instdir/program/liblwpftlo.so +0x7001ea) > #24 in Lwp9Reader::ParseDocument() at lotuswordpro/source/filter/lwp9reader.cxx:154:10 (instdir/program/liblwpftlo.so +0x6f4c77) > #25 in Lwp9Reader::Read() at lotuswordpro/source/filter/lwp9reader.cxx:90:20 (instdir/program/liblwpftlo.so +0x6f3f2c) > #26 in ReadWordproFile(SvStream&, com::sun::star::uno::Reference<com::sun::star::xml::sax::XDocumentHandler> const&) at lotuswordpro/source/filter/lwpfilter.cxx:215:33 (instdir/program/liblwpftlo.so +0x82436d) > #27 in LotusWordProImportFilter::importImpl(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at lotuswordpro/source/filter/LotusWordProImportFilter.cxx:75:14 (instdir/program/liblwpftlo.so +0x6e4a3a) > #28 in LotusWordProImportFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at lotuswordpro/source/filter/LotusWordProImportFilter.cxx:87:12 (instdir/program/liblwpftlo.so +0x6e4cfa) > #29 in (anonymous namespace)::LotusWordProTest::load(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) at lotuswordpro/qa/cppunit/test_lotuswordpro.cxx:59:27 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x14a52) > #30 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) > #31 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:158:5 (workdir/LinkTarget/CppunitTest/../Library/libunotest.so +0x580e7) > #32 in (anonymous namespace)::LotusWordProTest::test() at lotuswordpro/qa/cppunit/test_lotuswordpro.cxx:64:9 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x153d4) > #33 in void std::__invoke_impl<void, void ((anonymous namespace)::LotusWordProTest::*&)(), (anonymous namespace)::LotusWordProTest*&>(std::__invoke_memfun_deref, void ((anonymous namespace)::LotusWordProTest::*&)(), (anonymous namespace)::LotusWordProTest*&) at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/invoke.h:73:14 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x17fcd) > #34 in std::__invoke_result<void ((anonymous namespace)::LotusWordProTest::*&)(), (anonymous namespace)::LotusWordProTest*&>::type std::__invoke<void ((anonymous namespace)::LotusWordProTest::*&)(), (anonymous namespace)::LotusWordProTest*&>(void ((anonymous namespace)::LotusWordProTest::*&)(), (anonymous namespace)::LotusWordProTest*&) at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/invoke.h:95:14 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x17c6b) > #35 in void std::_Bind<void ((anonymous namespace)::LotusWordProTest::* ((anonymous namespace)::LotusWordProTest*))()>::__call<void, 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/functional:400:11 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x17b28) > #36 in void std::_Bind<void ((anonymous namespace)::LotusWordProTest::* ((anonymous namespace)::LotusWordProTest*))()>::operator()<void>() at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/functional:482:17 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x178e5) > #37 in std::_Function_handler<void (), std::_Bind<void ((anonymous namespace)::LotusWordProTest::* ((anonymous namespace)::LotusWordProTest*))()> >::_M_invoke(std::_Any_data const&) at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/std_function.h:297:2 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x16bc6) > #38 in std::function<void ()>::operator()() const at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/std_function.h:687:14 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x23276) > #39 in CppUnit::TestCaller<(anonymous namespace)::LotusWordProTest>::runTest() at workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:175:7 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x160c6) > #40 in CppUnit::TestCaseMethodFunctor::operator()() const at workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:32:5 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22c1f1) > #41 in (anonymous namespace)::Protector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) at test/source/vclbootstrapprotector.cxx:49:14 (workdir/LinkTarget/Library/libvclbootstrapprotector.so +0x159a) > #42 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const at workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x20e64d) > #43 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) at unotest/source/cpp/unobootstrapprotector/unobootstrapprotector.cxx:88:12 (workdir/LinkTarget/Library/unobootstrapprotector.so +0x987a) > #44 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const at workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x20e64d) > #45 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) at unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx:63:16 (workdir/LinkTarget/Library/unoexceptionprotector.so +0x5000) > #46 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const at workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x20e64d) > #47 in CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) at workdir/UnpackedTarball/cppunit/src/cppunit/DefaultProtector.cpp:15:12 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x1c6c51) > #48 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const at workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x20e64d) > #49 in CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) at workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:86:18 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x2096b8) > #50 in CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) at workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:182:28 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x26c3e4) > #51 in CppUnit::TestCase::run(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:91:13 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22b1fb) > #52 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22db43) > #53 in CppUnit::TestComposite::run(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22d119) > #54 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22db43) > #55 in CppUnit::TestComposite::run(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22d119) > #56 in CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:47:27 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x28b6c2) > #57 in CppUnit::TestResult::runTest(CppUnit::Test*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:149:9 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x26b715) > #58 in CppUnit::TestRunner::run(CppUnit::TestResult&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) at workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:96:14 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x28c103) > #59 in (anonymous namespace)::ProtectedFixtureFunctor::run() const at sal/cppunittester/cppunittester.cxx:316:20 (workdir/LinkTarget/Executable/cppunittester +0x440697) > #60 in sal_main() at sal/cppunittester/cppunittester.cxx:466:20 (workdir/LinkTarget/Executable/cppunittester +0x43e2fc) > #61 in main at sal/cppunittester/cppunittester.cxx:373:1 (workdir/LinkTarget/Executable/cppunittester +0x43d90e) > #62 in __libc_start_main at /usr/src/debug/glibc-2.27-74-g68c1bf8097/csu/../csu/libc-start.c:308:16 (/lib64/libc.so.6 +0x2324a) > #63 in _start at <null> (workdir/LinkTarget/Executable/cppunittester +0x4172a9) Change-Id: I1e7458f831619ddf78d654656cdd9edcaf341aaa Reviewed-on: https://gerrit.libreoffice.org/58928 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-13loplugin:returnconstant in linguistic,lotuswordproNoel Grandin
Change-Id: If5c7d936020e5470b09c2fe54d41fb006c296a34 Reviewed-on: https://gerrit.libreoffice.org/58877 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-30Add missing sal/log.hxx headersGabor Kelemen
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories from l10ntools to reportdesign Change-Id: Ia2dc93dd848c2dc0b6a8cb6e19849c614ec55198 Reviewed-on: https://gerrit.libreoffice.org/58205 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-29Fix typosAndrea Gelmini
Change-Id: I483680622a75affb9822bbf5fc4d14512961493f Reviewed-on: https://gerrit.libreoffice.org/58130 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-07-28loplugin:stringloop in lotuswordproNoel Grandin
Change-Id: I4fb61b92c76550def03b960cb4d1c16a1d63de67 Reviewed-on: https://gerrit.libreoffice.org/58214 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-27ofz#9603 infinite recursionCaolán McNamara
Change-Id: Ia4d0e3c1bb12330bd2f754e663055e1218da926f Reviewed-on: https://gerrit.libreoffice.org/58177 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-27lotuswordpro: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)Stephan Bergmann
...by explicitly defaulting the copy/move functions (and, where needed in turn, also a default ctor) for classes that have a user-declared dtor that does nothing other than an implicitly-defined one would do, but needs to be user- declared because it is virtual and potentially serves as a key function to emit the vtable, or is non-public, etc.; and by removing explicitly user- provided functions that do the same as their implicitly-defined counterparts, but may prevent implicitly declared copy functions from being defined as non- deleted in the future. (Even if such a user-provided function was declared non-inline in an include file, the apparently-used implicitly-defined copy functions are already include, so why bother with non-inline functions.) Change-Id: I725d60235b72e4eec59809e2d09bfab9a2f7c416 Reviewed-on: https://gerrit.libreoffice.org/58097 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-23Fix typosAndrea Gelmini
Change-Id: If6e6df9ac592c77f19e381e50b7eb26fbf429f61 Reviewed-on: https://gerrit.libreoffice.org/57831 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-07-22Fix typosAndrea Gelmini
Change-Id: I326827c394347cbe9fad242e9da5702cba7a4d95 Reviewed-on: https://gerrit.libreoffice.org/57761 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-07-20Fix typosAndrea Gelmini
Change-Id: I1048bea42c66b81244021aa2188e5dfe2ce6e83d Reviewed-on: https://gerrit.libreoffice.org/57768 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-06-25loplugin:useuniqueptr in XFStyleManagerNoel Grandin
Change-Id: I6fccaef0778ce02fc6d6daaa2fdb31af9ea1c19f Reviewed-on: https://gerrit.libreoffice.org/56334 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-25loplugin:useuniqueptr in LwpChangeMgrNoel Grandin
these should be held by rtl::Reference Change-Id: I135352dafc6ba0e274d344aec432fe4eabbafe97 Reviewed-on: https://gerrit.libreoffice.org/56333 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-25Fix typosAndrea Gelmini
Change-Id: I8787f619d68073e4bbd293d5863736c0cfff1632 Reviewed-on: https://gerrit.libreoffice.org/56315 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-06-13Fix typosAndrea Gelmini
Change-Id: I9ae4a9d821946591060ceadb45af05c27560668b Reviewed-on: https://gerrit.libreoffice.org/55410 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-05-29loplugin:unusedfields-in-constructor in variousNoel Grandin
Change-Id: Ie0fb647938e3cf730976fb2e435b92bfd67ef645 Reviewed-on: https://gerrit.libreoffice.org/54998 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-08ofz#8161 avoid recurse to deathCaolán McNamara
Change-Id: If3fc212ed0fe2b3cb3c1381198d46387861ac3dd Reviewed-on: https://gerrit.libreoffice.org/53973 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-30ofz#8095 avoid recurse to deathCaolán McNamara
Change-Id: I0acb0f68f64bb95a4510a330d463badd2cf8a84a Reviewed-on: https://gerrit.libreoffice.org/53663 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-17ofz#7729 Null-dereference READCaolán McNamara
Change-Id: I223f4f7fd622822b42d8e7cb342d451c54d6dcbd Reviewed-on: https://gerrit.libreoffice.org/53017 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-16-Werror,-Wunused-variableStephan Bergmann
Change-Id: I7b3a350d12c10d61a75ab6b2061da3b6926696cb
2018-04-14Fix typosAndrea Gelmini
Change-Id: I28d9591517c324e995691139582c77b5cfdc9d77 Reviewed-on: https://gerrit.libreoffice.org/52211 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-04-13ofz#7648 Bad-castCaolán McNamara
Change-Id: I21aaf36f3d6b6c3054649208de809b99aa384c01 Reviewed-on: https://gerrit.libreoffice.org/52834 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-03loplugin:useuniqueptr in XFStyleContainerNoel Grandin
Change-Id: I0a9765ab4107a534f211e3531f7948516f1a0c02 Reviewed-on: https://gerrit.libreoffice.org/52297 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-30Use for-range loops in lotuswordproJulien Nabet
Change-Id: Ib14bc1f00914253f000a2bb9c3f780b04fdd126c Reviewed-on: https://gerrit.libreoffice.org/52125 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-29lwp infinite loopCaolán McNamara
Change-Id: Ic384dfd66f834ee360c60e497b8b7b688c913f02 Reviewed-on: https://gerrit.libreoffice.org/52057 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-29lwp infinite loopCaolán McNamara
Change-Id: I18506b74ac999893eab1d652b46ee2226f5a3dea Reviewed-on: https://gerrit.libreoffice.org/52058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-26ofz#7146 Infinite recurseCaolán McNamara
Change-Id: I0afc3a73933e3370c5b1aeca1beabec94c56a6e6 Reviewed-on: https://gerrit.libreoffice.org/51911 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-25ofz#7109 infinite regressCaolán McNamara
Change-Id: Iac0bd81c9b0e3ac6b005bb0065895ca1b4ca4233 Reviewed-on: https://gerrit.libreoffice.org/51826 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-22ofz#7063 ensure lifecycleCaolán McNamara
Change-Id: I18d62bc3bd409ca65c85ea47e8d5b3930481edf9 Reviewed-on: https://gerrit.libreoffice.org/51731 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-21ofz#7043 already registeredCaolán McNamara
Change-Id: Ic94891c82944d04fe3391c0bd0731a6e3e4373e0 Reviewed-on: https://gerrit.libreoffice.org/51691 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-18ofz#5313 endless loopCaolán McNamara
Change-Id: I994944ce8b71b225334bd0aed8356a81d73a643a Reviewed-on: https://gerrit.libreoffice.org/51510 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-14cppcheck: useInitializationListJochen Nitschke
Change-Id: I7b3cce8d84176c13801a906af79e353a541135ce Reviewed-on: https://gerrit.libreoffice.org/51240 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-09ofz#6800 Null dereferenceCaolán McNamara
Change-Id: I12a0b386917af64f489706ab960f11559ac6122a Reviewed-on: https://gerrit.libreoffice.org/50988 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-09loplugin:constantparam in vclNoel Grandin
Change-Id: I1618280494ff10d884a3285501303c6a74ef3542 Reviewed-on: https://gerrit.libreoffice.org/50951 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>