summaryrefslogtreecommitdiff
path: root/vcl/qa
AgeCommit message (Collapse)Author
2017-09-26WIN run main thread redirects ignoring SolarMutexJan-Marek Glogowski
This way we can drop all the special nReleased handling. Instead we use the same mechanism as on Mac, where we keep the lock, but disable it for the main thread. As a security measure we assert on duplicate redirects, which should not happen. As a result we can't use SendMessage on the main thread itself, which would normally just call the WinProc directly. This could be accomplished by converting the redirect bool into a counter, which should be safe, as no other thread could acquire the SolarMutex, as we don't release it. Change-Id: Icd87b3da37a2489f3cad2bc80215bf93fc41d388 Reviewed-on: https://gerrit.libreoffice.org/42583 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-09-21ofz#3454 Floating-point-exceptionCaolán McNamara
Change-Id: I2432bff8e1c102b83f0b7aff1303a03539ce0350 Reviewed-on: https://gerrit.libreoffice.org/42580 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-12tdf#108963 PDF export of editeng text highlight: handle rotated textMiklos Vajna
The highlight rectangle was not rotated, handle it similar to PDFWriterImpl::drawStrikeoutChar(). Change-Id: I97a5b1fc05706729c58c92b90d6808629af8ca4c Reviewed-on: https://gerrit.libreoffice.org/42180 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-09-05Resolves: tdf#107249 round ascent/descent/extleading on conversion to intCaolán McNamara
Change-Id: Ia3ab5960d5288f5831aaa4ade800ca7513dad766 Reviewed-on: https://gerrit.libreoffice.org/41944 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-02add CVE-2016-10504 testcaseCaolán McNamara
Change-Id: I303259d7d1a92ef1fe5e0816ec154fe51fd831b2 Reviewed-on: https://gerrit.libreoffice.org/41830 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-31ofz#3240: avoid oom in gif loaderCaolán McNamara
Change-Id: Ifd00962ed607166b5521a3977a3021fb7b24957e Reviewed-on: https://gerrit.libreoffice.org/41747 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-29Avoid "ThreadSanitizer: data race on vptr (ctor/dtor vs virtual call)"Stephan Bergmann
...during CppunitTest_vcl_timer: > WARNING: ThreadSanitizer: data race on vptr (ctor/dtor vs virtual call) (pid=3753) > Write of size 8 at 0x7ffa5fa31348 by main thread: > #0 ~Thread include/osl/thread.hxx:66 (libtest_vcl_timer.so+0xcbae) > #1 ~WatchDog vcl/qa/cppunit/timer.cxx:32 (libtest_vcl_timer.so+0xaa08) > #2 at_exit_wrapper(void*) compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:361 (cppunittester+0x44c823) > > Previous read of size 8 at 0x7ffa5fa31348 by thread T2: > #0 threadFunc include/osl/thread.hxx:185 (libtest_vcl_timer.so+0xcc54) > #1 osl_thread_start_Impl(void*) sal/osl/unx/thread.cxx:237 (libuno_sal.so.3+0xeb5c5) > > As if synchronized via sleep: > #0 nanosleep compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:343 (cppunittester+0x474d47) > #1 osl_waitThread sal/osl/unx/thread.cxx:520 (libuno_sal.so.3+0xea531) > #2 osl::Thread::wait(TimeValue const&) include/osl/thread.hxx:143 (libtest_vcl_timer.so+0xcd68) > #3 SlowCallbackTimer::Invoke() vcl/qa/cppunit/timer.cxx:372 (libtest_vcl_timer.so+0xdb0a) > #4 Scheduler::ProcessTaskScheduling() vcl/source/app/scheduler.cxx:381 (libvcllo.so+0x1074fff) > #5 Scheduler::CallbackTaskScheduling() vcl/source/app/scheduler.cxx:204 (libvcllo.so+0x1073ba5) > #6 SalTimer::CallCallback() vcl/inc/saltimer.hxx:54 (libvcllo.so+0x138548f) > #7 SvpSalInstance::CheckTimeout(bool) vcl/headless/svpinst.cxx:242 (libvcllo.so+0x1382742) > #8 SvpSalInstance::DoYield(bool, bool, unsigned long) vcl/headless/svpinst.cxx:349 (libvcllo.so+0x1383403) > #9 ImplYield(bool, bool, unsigned long) vcl/source/app/svapp.cxx:470 (libvcllo.so+0x10c344e) > #10 Application::Yield() vcl/source/app/svapp.cxx:540 (libvcllo.so+0x10bad80) > #11 TimerTest::testSlowTimerCallback() vcl/qa/cppunit/timer.cxx:385 (libtest_vcl_timer.so+0x8506) > #12 void std::__invoke_impl<void, void (TimerTest::* const&)(), TimerTest*&>(std::__invoke_memfun_deref, void (TimerTest::* const&)(), TimerTest*&) /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/functional:227 (libtest_vcl_timer.so+0x15e2e) > #13 std::result_of<void (TimerTest::* const&(TimerTest*&))()>::type std::__invoke<void (TimerTest::* const&)(), TimerTest*&>(void (TimerTest::* const&)(), TimerTest*&) /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/functional:250 (libtest_vcl_timer.so+0x15d1d) > #14 _ZNKSt12_Mem_fn_baseIM9TimerTestFvvELb1EEclIJRPS0_EEEDTclsr3stdE8__invokedtdefpT6_M_pmfspclsr3stdE7forwardIT_Efp_EEEDpOS7_ /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/functional:604 (libtest_vcl_timer.so+0x15bfb) > #15 void std::_Bind<std::_Mem_fn<void (TimerTest::*)()> (TimerTest*)>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/functional:933 (libtest_vcl_timer.so+0x15b5b) > #16 void std::_Bind<std::_Mem_fn<void (TimerTest::*)()> (TimerTest*)>::operator()<, void>() /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/functional:991 (libtest_vcl_timer.so+0x15a26) > #17 std::_Function_handler<void (), std::_Bind<std::_Mem_fn<void (TimerTest::*)()> (TimerTest*)> >::_M_invoke(std::_Any_data const&) /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/functional:1731 (libtest_vcl_timer.so+0x1530a) > #18 std::function<void ()>::operator()() const /usr/lib/gcc/x86_64-redhat-linux/6.4.1/../../../../include/c++/6.4.1/functional:2127 (libtest_vcl_timer.so+0x1616e) > #19 CppUnit::TestCaller<TimerTest>::runTest() workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:175 (libtest_vcl_timer.so+0x14a5c) > #20 CppUnit::TestCaseMethodFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:32 (libcppunit-1.14.so.0+0xd61d2) > #21 (anonymous namespace)::Protector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) test/source/vclbootstrapprotector.cxx:39 (libvclbootstrapprotector.so+0x1114) > #22 CppUnit::ProtectorChain::ProtectFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20 (libcppunit-1.14.so.0+0xc7614) > #23 (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) unotest/source/cpp/unobootstrapprotector/unobootstrapprotector.cxx:89 (unobootstrapprotector.so+0x2204) > #24 CppUnit::ProtectorChain::ProtectFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20 (libcppunit-1.14.so.0+0xc7614) > #25 (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx:63 (unoexceptionprotector.so+0x23e9) > #26 CppUnit::ProtectorChain::ProtectFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20 (libcppunit-1.14.so.0+0xc7614) > #27 CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) workdir/UnpackedTarball/cppunit/src/cppunit/DefaultProtector.cpp:15 (libcppunit-1.14.so.0+0xa57ad) > #28 CppUnit::ProtectorChain::ProtectFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20 (libcppunit-1.14.so.0+0xc7614) > #29 CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:86 (libcppunit-1.14.so.0+0xc4a96) > #30 CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:182 (libcppunit-1.14.so.0+0xf4714) > #31 CppUnit::TestCase::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:91 (libcppunit-1.14.so.0+0xd5750) > #32 CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64 (libcppunit-1.14.so.0+0xd6d5a) > #33 CppUnit::TestComposite::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23 (libcppunit-1.14.so.0+0xd6a2e) > #34 CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64 (libcppunit-1.14.so.0+0xd6d5a) > #35 CppUnit::TestComposite::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23 (libcppunit-1.14.so.0+0xd6a2e) > #36 CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:47 (libcppunit-1.14.so.0+0x10282c) > #37 CppUnit::TestResult::runTest(CppUnit::Test*) workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:149 (libcppunit-1.14.so.0+0xf4223) > #38 CppUnit::TestRunner::run(CppUnit::TestResult&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:96 (libcppunit-1.14.so.0+0x102c76) > #39 (anonymous namespace)::ProtectedFixtureFunctor::run() const sal/cppunittester/cppunittester.cxx:316 (cppunittester+0x4bd1e8) > #40 sal_main() sal/cppunittester/cppunittester.cxx:466 (cppunittester+0x4bbe1e) > #41 main sal/cppunittester/cppunittester.cxx:373 (cppunittester+0x4bb695) > > Location is global '<null>' at 0x000000000000 (libtest_vcl_timer.so+0x00000021d348) > > Thread T2 (tid=3925, running) created by main thread at: > #0 pthread_create compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:887 (cppunittester+0x451186) > #1 osl_thread_create_Impl(void (*)(void*), void*, short) sal/osl/unx/thread.cxx:286 (libuno_sal.so.3+0xe93ee) > #2 osl_createSuspendedThread sal/osl/unx/thread.cxx:337 (libuno_sal.so.3+0xe974d) > #3 osl::Thread::create() include/osl/thread.hxx:73 (libtest_vcl_timer.so+0xc349) > #4 WatchDog vcl/qa/cppunit/timer.cxx:40 (libtest_vcl_timer.so+0xa99f) > #5 __cxx_global_var_init.1 vcl/qa/cppunit/timer.cxx:51 (libtest_vcl_timer.so+0x6fd1) > #6 _GLOBAL__sub_I_timer.cxx vcl/qa/cppunit/timer.cxx:? (libtest_vcl_timer.so+0x70af) > #7 call_init /usr/src/debug/glibc-2.24-61-g605e6f9/elf/dl-init.c:72 (ld-linux-x86-64.so.2+0x10d99) > #8 CppUnit::DynamicLibraryManager::doLoadLibrary(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) workdir/UnpackedTarball/cppunit/src/cppunit/UnixDynamicLibraryManager.cpp:16 (libcppunit-1.14.so.0+0x10ee31) > #9 CppUnit::DynamicLibraryManager::loadLibrary(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) workdir/UnpackedTarball/cppunit/src/cppunit/DynamicLibraryManager.cpp:49 (libcppunit-1.14.so.0+0xa5f6d) > #10 DynamicLibraryManager workdir/UnpackedTarball/cppunit/src/cppunit/DynamicLibraryManager.cpp:13 (libcppunit-1.14.so.0+0xa5eb9) > #11 CppUnit::PlugInManager::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, CppUnit::PlugInParameters const&) workdir/UnpackedTarball/cppunit/src/cppunit/PlugInManager.cpp:34 (libcppunit-1.14.so.0+0xba57c) > #12 (anonymous namespace)::ProtectedFixtureFunctor::run() const sal/cppunittester/cppunittester.cxx:259 (cppunittester+0x4bc55b) > #13 sal_main() sal/cppunittester/cppunittester.cxx:466 (cppunittester+0x4bbe1e) > #14 main sal/cppunittester/cppunittester.cxx:373 (cppunittester+0x4bb695) Change-Id: I80f83d2e54f3bae61c1a896a5f9be9f0b5bce582
2017-08-28Resolves: tdf#111925 we need to take the buffered data len into accountCaolán McNamara
Change-Id: I8aee1f17e6ec1042e7b67942e5bcad0bb3bbf840 Reviewed-on: https://gerrit.libreoffice.org/41644 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-24Consistently use OUString in test::DirectoriesStephan Bergmann
Change-Id: Ia5fd8af34ee9d2f37e4450ab241f6bb9a06445b2 Reviewed-on: https://gerrit.libreoffice.org/41466 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-08-21trivial WaE when pdfium is disabledCaolán McNamara
Change-Id: I43a5061c9549a0aff217407ebd3cc5baf68ac60d Reviewed-on: https://gerrit.libreoffice.org/41334 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-08-17Clean up uses of OUString::fromUtf8 around string literalsStephan Bergmann
Change-Id: I9a2990e49c95a01ce505f13408be8c19db1cf5d1
2017-08-17remove UL/L suffixes from integer constants in initialiser/call expressionsNoel Grandin
Change-Id: Iae081567c4fa5b88edbd12cf2fbafd2b8f31b300 Reviewed-on: https://gerrit.libreoffice.org/41214 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-09send this MapMode scale thing back to where it came fromCaolán McNamara
Change-Id: Ic33f4b4bf7a0df35f04778e474f5a136f06be4a6 Reviewed-on: https://gerrit.libreoffice.org/40926 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-31add CVE-2017-9614 testcaseCaolán McNamara
Change-Id: Ib29114642c898d1c73ee72ac368a19c56950dabd Reviewed-on: https://gerrit.libreoffice.org/40586 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-31loplugin:oncevarNoel Grandin
extend oncevar to any POD type Change-Id: Ia98ee0a67f183e40fb0c38477760124b2c411dc0 Reviewed-on: https://gerrit.libreoffice.org/40564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-25tell msvc our source code is written using utf-8Caolán McNamara
Change-Id: I4fb364ceb34e0851f2d04c403333bf428e8cfa98 Reviewed-on: https://gerrit.libreoffice.org/40305 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-22add test for CJK (~X) mnemonicsCaolán McNamara
Change-Id: I1f69c23dcde6d963ad9c3bc1f2d9178fe15eb27c
2017-07-22tweak test a littleCaolán McNamara
Change-Id: I6b9aeaf03716496dc2c6dfcc88688891f57fb0c7
2017-07-22vcl: fix Unicode cast in mnemonic testChris Sherlock
Fix the following: /home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/vcl/qa/cppunit/mnemonic.cxx:35:50:error: in LIBO_INTERNAL_ONLY code, replace literal cast to 'sal_Unicode' (aka 'char16_t') with a u'...' char16_t character literal [loplugin:salunicodeliteral] CPPUNIT_ASSERT_EQUAL(sResult[1], sal_Unicode('~')); ~~~~~~~~~~~~^~~~ /home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/workdir/UnpackedTarball/cppunit/include/cppunit/TestAssert.h:300:32: note: expanded from macro 'CPPUNIT_ASSERT_EQUAL' (actual), \ ^~~~~~ 1 error generated. Change-Id: I323270d4ddf9e8ae22f9bf7cd7333a8d7e58d17c Reviewed-on: https://gerrit.libreoffice.org/40301 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-07-21mnemonics in words with Eszett misplacedCaolán McNamara
because the text is normalized with toUpper and uppercase ß is SS and using the insertion index of the normalized string in the original string is out by one if we normalize with toLower then according to icu/source/data/unidata/SpecialCasing.txt then as long as the language is not Lithuanian its always one to one so just normalize to lower case with blank locale Change-Id: I0ad1c7e2ad0216b7c27ec62105f9a25672ade8a8
2017-07-21migrate to boost::gettextCaolán McNamara
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-20Don't run testIdleMainloop on WindowsJan-Marek Glogowski
Was just wondering, why the test finished so fast on Windows, and realized it's actually empty due to "#ifndef WIN32". Change-Id: I050b7cb7bd66bdd2a215ef6e7eaf26355e8d962f
2017-07-15coverity#1415095 annotate Infinite loop as false positiveCaolán McNamara
Change-Id: I030a6bee3864e758177ce73b678ba22cd10ec217
2017-07-15emfplus: corrections for UnitTest in vclArmin Le Grand
The CppunitTest_vcl_filters_test was not working due to a wmf file now being loadable. This leaded to better check errors on stream and react on it in test code. Hrad to find since that test - for whatever reason - is not executed on win. Also need to check result of EmfReader. Added emfio to test's module list Change-Id: Iea2b835408e919a8456e8f178cbfc782885ffebb
2017-07-15emfplus: UnitTests and gerrit build correctionsArmin Le Grand
Needed to migrate UnitTest for Emf/Wmf import from vcl to emfio. Corrected stuff based on gerrit build feedback Change-Id: I7fd2456f814ea19583072ba09730a07e9b9d4061
2017-07-15emfplus: completed isolation/migration of Emf/WmfArmin Le Grand
Decided to keep the migrated/isolated Emf/Wmf reader which are now hidden behind a Uno Api. Had to re-implement WMF_EXTERNALHEADER (now WmfExternal, own file/header) to not break anything. It *seems* to just scale something and could be done after import, but I could not be sure. Also needed a callback hook to allow getting the Metafile out of a MetafilePrimitive in a lower module (vcl relative to drawinglayer) which is needed as long as primitives are not completely on Uno Api. Deleted all Emf/Wmf reader stuff from vcl. Change-Id: Ic5540defa8ec770728280df4df3f12e1f48cfc3a
2017-07-14Fix instant 0ms scheduler wakeup for headlessJan-Marek Glogowski
This is a regression from commit 503eba23c9a199583eddee9e169a4fddbecf416f Due to rounding errors, as the Scheduler uses milliseconds, but the headless backend uses nanoseconds the StartTimer assumed it would wake up this ms, but the headless check function would still wait. This is more of a workaround, so instant wakeup for the headless backend works again. Change-Id: I2ba9b4ad2b67ec99eeb4dd098ded6457d3753127
2017-07-13Run Idle tasks immediatlyJan-Marek Glogowski
There is really no reason to wait a millisecond for an idle. Change-Id: I7665d5f2e7d6ba3e01290a692bbc8e42c36b9986
2017-07-13Round-robin invoked tasksJan-Marek Glogowski
Add some round-robin to the task processing, so equal priority (auto) tasks won't always be scheduled, if there are multiple tasks with the same priority. Change-Id: Ice111aa5f85e9181b3ee9799ca4df0d58f210fe9
2017-07-13Drop special idle handlingJan-Marek Glogowski
Idles are just instant timers, which should most time have a low priority, By dropping most special idle handling we'll just schedule by priority. This also reverts SalYieldResult back to a bool, which just indicates if any event was processed. Change-Id: Ia0b91b06dffb77af066f01838d8f9483523bf67d
2017-07-13Move scheduler task into its own headerJan-Marek Glogowski
Change-Id: I54534787b8cfa4c47dc09dde9c38a7893df9d367
2017-07-13Add some Scheduler unit tests and loggingJan-Marek Glogowski
1. calling Start() for invoked tasks 2. correctly schedule by priority 3. self-stopping AutoTimer This also adds SAL_INFO output to Scheduler and Task to log the scheduling processing tasks. Change-Id: I3c8a708d1fd51c550320f8af3f9486c43c32e358
2017-07-03loplugin:oncevar (clang-cl): vclStephan Bergmann
Change-Id: I0459978c2cfb61cd7251f0e8d9a30f1f19c02c11
2017-06-28loplugin:oncevar in vclNoel Grandin
Change-Id: I37a6dacda12e1c2910737d74aa344c7e2e195aeb Reviewed-on: https://gerrit.libreoffice.org/39328 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-21convert ErrCode to strong typedefNoel Grandin
would have preferred to re-use o3tl::strong_int, of which this is a modified copy, but there are lots of convenience accessors which are nice to define on the class. Change-Id: I301b807aaf02fbced3bf75de1e1692cde6c0340a Reviewed-on: https://gerrit.libreoffice.org/38497 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-18Fix typosAndrea Gelmini
Change-Id: If28e198b8e1a26660e07dce49db66a651de43d3f Reviewed-on: https://gerrit.libreoffice.org/38850 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-17loplugin:unusedfields in vcl part2Noel Grandin
Change-Id: Icd02f63e9738c0bb91348e2084649f9edc281e67 Reviewed-on: https://gerrit.libreoffice.org/38833 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-15tdf#99680 save graphic state even for empty clipping regionVasily Melenchuk
Previous fix was causing Adobe Reader errors due to mistmatch of save and restore operators. Corresponding unittest is extended to verify save/restore operators count. Change-Id: I102722140e216cb9ad29107aae3bdaa70472d471 Reviewed-on: https://gerrit.libreoffice.org/38694 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-06-14use ERRCODE_NONE instead of 0Noel Grandin
peeling off a small chunk of my ErrCode strong_int conversion Change-Id: Idc89e8496083beed7608cba705cd981139eb7111 Reviewed-on: https://gerrit.libreoffice.org/38777 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-11Fix typo in codesAndrea Gelmini
Change-Id: If52ff2c0bb4c8a703e883f25d0ba567236cbe479 Reviewed-on: https://gerrit.libreoffice.org/38609 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-09use comphelper::InitPropertySequence in more placesNoel Grandin
Change-Id: I72d7b13a23ce306b752b39187a0e9fbb7028643a Reviewed-on: https://gerrit.libreoffice.org/38606 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-06tdf#99680 unittest to ensure there are no empty clipping regionsVasily Melenchuk
Change-Id: Id4565858b0135b3177044558db87a68ef828955b Reviewed-on: https://gerrit.libreoffice.org/38403 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-05-25Bypass PdfExportTest::testTdf107868() in 64-bit WindowsMark Hung
It also failed with VS2015. Just bypass it now. Change-Id: Ic657d1d341e8c9598e163f5f32b6e0bbee3959e4 Reviewed-on: https://gerrit.libreoffice.org/37987 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com>
2017-05-24For some reason PdfExportTest::testTdf107868() fails in a 64-bit VS2017 buildTor Lillqvist
Just bypass it for now then. Change-Id: I78b088dd35b37378f1d29833b08cfd7afd6b5133
2017-05-23tdf#105461 PDF export of editeng fill color: restrict to logic map modesMiklos Vajna
The original use case was Writer/Impress shape text, but when the map mode is pixels, the reference device gives bogus values for the PixelToLogic() calls, affecting e.g. form controls. Just go back to the old way of not painting the background for those. Change-Id: I52f1901af15732274915fa3c77c06909b5164afb Reviewed-on: https://gerrit.libreoffice.org/37919 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-05-23test for DejaVuSansRene Engelhard
Change-Id: I963c9a9ac0239af5550de50f39f080b9f19d494f
2017-05-04CppunitTest_vcl_pdfexport: replace std::search() with pdfium callsMiklos Vajna
The old code would also pass if the page has e.g. a literal "re f*" string (since the tokenizer doesn't parse streams), the new one uses a proper parser. Change-Id: Iabb242b420c14f619f716f5ba47a1165a942f88a Reviewed-on: https://gerrit.libreoffice.org/37223 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-04-30coverity#1405740 Resource leakCaolán McNamara
Change-Id: I6537e818a783ef908e2ae4d068752669529fb75e
2017-04-28loplugin:cppunitassertequals: vclStephan Bergmann
Change-Id: I0b1b279b9bbb82b5e7aff0b0fb6a5be0ee0b3f62
2017-04-26CppunitTest_vcl_errorhandler: fix loplugin:simplifybool warningsMiklos Vajna
Change-Id: If2af785961b06efa56c2a55bef6b3b364bf91d57