summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-06-16Use FontList::GetFirstFontMetric instead of custom iteration codecp-6.4-40Mike Kaganski
Besides code deduplication, this takes care of case-insensitive search. Also fall back to a default font in case of no match in doc_renderFont*. Change-Id: Ica45ca10c374cf6581ba2f6b60563d6a1447232a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117121 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117184 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Tested-by: Aron Budea <aron.budea@collabora.com> Reviewed-by: Aron Budea <aron.budea@collabora.com>
2021-06-16vcl: check mpWindowImpl for nullptrGabriel Masei
Change-Id: I492c7d5c1846df7507b1f043b80de4e61ff8ca86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117282 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit bf6dabe0ebad3cc5bc0edc04ae74fba0190b6203)
2021-06-16sd: ubsan - fix heap-use-after-free in SdOutlinerTomaž Vajngerl
OutlinerView can change (old one deleted and new one create) so we can't store it in a local vairable and need to always fetch it. UBSAN Error log: ==21484==ERROR: AddressSanitizer: heap-use-after-free on address 0x606000af7d28 at pc 0x2ab7c5979405 bp 0x7ffcd1a3d1a0 sp 0x7ffcd1a3d198 READ of size 8 at 0x606000af7d28 thread T0 -0 0x2ab7c5979404 in std::__uniq_ptr_impl<EditView, std::default_delete<EditView> >::_M_ptr() const /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:147:42 -1 0x2ab7c59792ea in std::unique_ptr<EditView, std::default_delete<EditView> >::get() const /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:337:21 -2 0x2ab7c59791d9 in std::unique_ptr<EditView, std::default_delete<EditView> >::operator*() const /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:322:2 -3 0x2ab7c59725da in OutlinerView::GetEditView() const /include/editeng/outliner.hxx:209:46 -4 0x2ab7c70e36bb in SdOutliner::SearchAndReplaceOnce(std::__debug::vector<sd::SearchSelection, std::allocator<sd::SearchSelection> >*) /sd/source/ui/view/Outliner.cxx:903:21 -5 0x2ab7c70dcb32 in SdOutliner::SearchAndReplaceAll() /sd/source/ui/view/Outliner.cxx:622:29 -6 0x2ab7c70da81b in SdOutliner::StartSearchAndReplace(SvxSearchItem const*) /sd/source/ui/view/Outliner.cxx:478:28 -7 0x2ab7c61e4fc5 in sd::FuSearch::SearchAndReplace(SvxSearchItem const*) /sd/source/ui/func/fusearch.cxx:128:44 -8 0x2ab7c5c61fc5 in sd::DrawDocShell::Execute(SfxRequest&) /sd/source/ui/docshell/docshel3.cxx:228:36 -9 0x2ab7c5cac074 in SfxStubDrawDocShellExecute(SfxShell*, SfxRequest&) /workdir/SdiTarget/sd/sdi/sdslots.hxx:18384:1 -10 0x2ab7cd885d8f in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) /sfx2/source/control/dispatch.cxx:253:9 -11 0x2ab7cd89bd8f in SfxDispatcher::Execute_(SfxShell&, SfxSlot const&, SfxRequest&, SfxCallMode) /sfx2/source/control/dispatch.cxx:753:9 -12 0x2ab7cd89ccd6 in SfxDispatcher::Execute(unsigned short, SfxCallMode, SfxItemSet const*, SfxItemSet const*, unsigned short) /sfx2/source/control/dispatch.cxx:811:9 -13 0x2ab7cdd11d76 in SfxDispatchController_Impl::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) /sfx2/source/control/unoctitm.cxx:738:46 -14 0x2ab7cdd15135 in SfxOfficeDispatch::dispatchWithNotification(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) /sfx2/source/control/unoctitm.cxx:243:16 -15 0x2ab7f54b25d7 in framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XDispatch> const&, com::sun::star::util::URL const&, bool, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/dispatchhelper.cxx:159:30 -16 0x2ab7f54b1531 in framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/dispatchhelper.cxx:117:16 -17 0x2ab7f54b2d17 in non-virtual thunk to framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/dispatchhelper.cxx -18 0x2ab7e63c546f in unotest::MacrosTest::dispatchCommand(com::sun::star::uno::Reference<com::sun::star::lang::XComponent> const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /unotest/source/cpp/macros_test.cxx:85:22 -19 0x2ab7b1a9ac2d in testSearchAllInDocumentAndNotes::TestBody() /sd/qa/unit/uiimpress.cxx:715:5 -20 0x2ab7b1b43f84 in void std::__invoke_impl<void, void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&>(std::__invoke_memfun_deref, void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:73:14 -21 0x2ab7b1b43b5e in std::__invoke_result<void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&>::type std::__invoke<void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&>(void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:95:14 -22 0x2ab7b1b439b2 in void std::_Bind<void (testSearchAllInDocumentAndNotes::* (testSearchAllInDocumentAndNotes*))()>::__call<void, 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/functional:467:11 -23 0x2ab7b1b43612 in void std::_Bind<void (testSearchAllInDocumentAndNotes::* (testSearchAllInDocumentAndNotes*))()>::operator()<void>() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/functional:549:17 -24 0x2ab7b1b426a1 in std::_Function_handler<void (), std::_Bind<void (testSearchAllInDocumentAndNotes::* (testSearchAllInDocumentAndNotes*))()> >::_M_invoke(std::_Any_data const&) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:316:2 -25 0x2ab7b1aec1f1 in std::function<void ()>::operator()() const /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:706:14 -26 0x2ab7b1b41984 in CppUnit::TestCaller<testSearchAllInDocumentAndNotes>::runTest() /workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:175:7 -27 0x2ab765f655ba in CppUnit::TestCaseMethodFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:32:5 -28 0x2ab780dd0937 in (anonymous namespace)::Protector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /test/source/vclbootstrapprotector.cxx:46:14 -29 0x2ab765f36c47 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 -30 0x2ab775453fd7 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /unotest/source/cpp/unobootstrapprotector/unobootstrapprotector.cxx:78:12 -31 0x2ab765f36c47 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 -32 0x2ab771f47962 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx:62:16 -33 0x2ab765f36c47 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 -34 0x2ab765ecdf84 in CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /workdir/UnpackedTarball/cppunit/src/cppunit/DefaultProtector.cpp:15:12 -35 0x2ab765f36c47 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 -36 0x2ab765f30697 in CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:86:18 -37 0x2ab765fcfa79 in 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:28 -38 0x2ab765f63c21 in CppUnit::TestCase::run(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:91:13 -39 0x2ab765f67a52 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30 -40 0x2ab765f66c4a in CppUnit::TestComposite::run(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3 -41 0x2ab765f67a52 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30 -42 0x2ab765f66c4a in CppUnit::TestComposite::run(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3 -43 0x2ab765ffd60e in CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:47:27 -44 0x2ab765fce4de in CppUnit::TestResult::runTest(CppUnit::Test*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:149:9 -45 0x2ab765ffe56b in 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:14 -46 0x4ff42e in (anonymous namespace)::ProtectedFixtureFunctor::run() const /sal/cppunittester/cppunittester.cxx:324:20 -47 0x4fb90c in sal_main() /sal/cppunittester/cppunittester.cxx:474:20 -48 0x4fa40e in main /sal/cppunittester/cppunittester.cxx:381:1 -49 0x2ab767c44554 in __libc_start_main (/lib64/libc.so.6+0x22554) -50 0x425e04 in _start (/workdir/LinkTarget/Executable/cppunittester+0x425e04) 0x606000af7d28 is located 8 bytes inside of 56-byte region [0x606000af7d20,0x606000af7d58) freed by thread T0 here: -0 0x4f75f0 in operator delete(void*) /home/tdf/lode/packages/llvm-llvmorg-9.0.1.src/compiler-rt/lib/asan/asan_new_delete.cc:160 -1 0x2ab7c70c42b1 in SdOutliner::Implementation::ProvideOutlinerView(Outliner&, std::shared_ptr<sd::ViewShell> const&, vcl::Window*) /sd/source/ui/view/Outliner.cxx:1988:17 -2 0x2ab7c70c1302 in SdOutliner::SetViewShell(std::shared_ptr<sd::ViewShell> const&) /sd/source/ui/view/Outliner.cxx:1743:17 -3 0x2ab7c70ed9f4 in SdOutliner::SetViewMode(PageKind) /sd/source/ui/view/Outliner.cxx:1571:5 -4 0x2ab7c70f309e in SdOutliner::SetObject(sd::outliner::IteratorPosition const&) /sd/source/ui/view/Outliner.cxx:1720:5 -5 0x2ab7c70f3db6 in SdOutliner::PrepareSearchAndReplace() /sd/source/ui/view/Outliner.cxx:1507:13 -6 0x2ab7c70d4b3f in SdOutliner::ProvideNextTextObject() /sd/source/ui/view/Outliner.cxx:1302:33 -7 0x2ab7c70e30f0 in SdOutliner::SearchAndReplaceOnce(std::__debug::vector<sd::SearchSelection, std::allocator<sd::SearchSelection> >*) /sd/source/ui/view/Outliner.cxx:892:17 -8 0x2ab7c70dcb32 in SdOutliner::SearchAndReplaceAll() /sd/source/ui/view/Outliner.cxx:622:29 -9 0x2ab7c70da81b in SdOutliner::StartSearchAndReplace(SvxSearchItem const*) /sd/source/ui/view/Outliner.cxx:478:28 -10 0x2ab7c61e4fc5 in sd::FuSearch::SearchAndReplace(SvxSearchItem const*) /sd/source/ui/func/fusearch.cxx:128:44 -11 0x2ab7c5c61fc5 in sd::DrawDocShell::Execute(SfxRequest&) /sd/source/ui/docshell/docshel3.cxx:228:36 -12 0x2ab7c5cac074 in SfxStubDrawDocShellExecute(SfxShell*, SfxRequest&) /workdir/SdiTarget/sd/sdi/sdslots.hxx:18384:1 -13 0x2ab7cd885d8f in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) /sfx2/source/control/dispatch.cxx:253:9 -14 0x2ab7cd89bd8f in SfxDispatcher::Execute_(SfxShell&, SfxSlot const&, SfxRequest&, SfxCallMode) /sfx2/source/control/dispatch.cxx:753:9 -15 0x2ab7cd89ccd6 in SfxDispatcher::Execute(unsigned short, SfxCallMode, SfxItemSet const*, SfxItemSet const*, unsigned short) /sfx2/source/control/dispatch.cxx:811:9 -16 0x2ab7cdd11d76 in SfxDispatchController_Impl::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) /sfx2/source/control/unoctitm.cxx:738:46 -17 0x2ab7cdd15135 in SfxOfficeDispatch::dispatchWithNotification(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) /sfx2/source/control/unoctitm.cxx:243:16 -18 0x2ab7f54b25d7 in framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XDispatch> const&, com::sun::star::util::URL const&, bool, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/dispatchhelper.cxx:159:30 -19 0x2ab7f54b1531 in framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/dispatchhelper.cxx:117:16 -20 0x2ab7f54b2d17 in non-virtual thunk to framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/dispatchhelper.cxx -21 0x2ab7e63c546f in unotest::MacrosTest::dispatchCommand(com::sun::star::uno::Reference<com::sun::star::lang::XComponent> const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /unotest/source/cpp/macros_test.cxx:85:22 -22 0x2ab7b1a9ac2d in testSearchAllInDocumentAndNotes::TestBody() /sd/qa/unit/uiimpress.cxx:715:5 -23 0x2ab7b1b43f84 in void std::__invoke_impl<void, void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&>(std::__invoke_memfun_deref, void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:73:14 -24 0x2ab7b1b43b5e in std::__invoke_result<void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&>::type std::__invoke<void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&>(void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:95:14 -25 0x2ab7b1b439b2 in void std::_Bind<void (testSearchAllInDocumentAndNotes::* (testSearchAllInDocumentAndNotes*))()>::__call<void, 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/functional:467:11 -26 0x2ab7b1b43612 in void std::_Bind<void (testSearchAllInDocumentAndNotes::* (testSearchAllInDocumentAndNotes*))()>::operator()<void>() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/functional:549:17 -27 0x2ab7b1b426a1 in std::_Function_handler<void (), std::_Bind<void (testSearchAllInDocumentAndNotes::* (testSearchAllInDocumentAndNotes*))()> >::_M_invoke(std::_Any_data const&) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:316:2 -28 0x2ab7b1aec1f1 in std::function<void ()>::operator()() const /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:706:14 -29 0x2ab7b1b41984 in CppUnit::TestCaller<testSearchAllInDocumentAndNotes>::runTest() /workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:175:7 Change-Id: I0b4616cd3813565bc58b7a84320cbf52dd654a3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116879 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 36db408b9027da01464927e5853950435596ae05) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117147 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-06-16tdf#142478 add test that triggers find all and crashesTomaž Vajngerl
String "Crash" in document and notes, then trigger "find all", which produced a crash without the fix in-place. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116769 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 7f059ce157da0de40a98f63f61d923cc67d93884) Change-Id: I8e6e4a9da1afc85643648aee36a03c1fb39ca16d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117146 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-06-16tdf#142478 fix crash when searching and a viewshell change occursTomaž Vajngerl
When searching a impress document for a word, and the word is in notes as welll as in the document, a crash happens (only when searching with "find all"). The regressing commit changed that the search is now bound to a view (and to a viewshell). When searching for words in notes and document, at the transition from "standard" to "notes" page kind mode, the view and viewshells are destroyed and the new one created again. The problem lies here as when we destroy the viewshell, we also destroy the search context and FuSearch objects, but we are still executing the search -> crash. The solution for this is that when we change the page kind, we take the FuSearch object from the old viewshell and put it into the newly created viewshell, so that we keep the FuSearch object alive and don't throw away the search context too. Change-Id: I50931cca2a20c5704f7450e3cc8b3466af4c5a3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116758 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 3b75f9add7ed80e803b0771d86892d6ca0f47e71) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117145 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-06-16vcl: check mpWindowImpl before referencing it.Gabriel Masei
Fixed some cases generating crashes because mpWindowImpl was not checked for nullptr. Change-Id: I5540f9f21a870b02655b5bf2afdbf3a8153c1519 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116466 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2021-06-16scale VCL's scale cache according to the number of Online viewsLuboš Luňák
If a document is opened in several Online views, each of them using a different zoom, then the scale cache is used for the scaling, and each view is sent updated tiles, so if there are too many views, the cache is not large enough. (Collabora T28503) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116928 Tested-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit 53dd6aa5f3817d42bf676980f980051c3b7cdb03) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116898 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit c8522043b239aa0e463e6793b7c9b019d79b2d9d) Change-Id: I3fa719b0515064773fe4584fedbc8aff98e6e213 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116901 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2021-06-16allow altering the max size of o3tl::lru_cacheLuboš Luňák
Change-Id: Id119b70275e1c88a8c57f89d915241427be9dbf5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116927 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit 62b58e88d897f51a7c4e12b41d14121ab8d3396f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116897 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit cb10c29a3255620bf69480aa7b653962fb04786e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116900
2021-06-16Fix click on the drawing area of CSV dialogmerttumer
Change-Id: I8c13698b5e9e2e9c8869aa9094ce93c38bf2276f Signed-off-by: merttumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116796 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-06-16sc: lok: apply the previous fix for selections tooDennis Francis
Change-Id: Ic1f6c1642da71e0ef8c23831786ae405dda21133 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116427 Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Dennis Francis <dennis.francis@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-06-16sc: lokit: fix wrong edit cursor coordinates for numeric cellsDennis Francis
The cursor coordinates returned by editengine implementation is computed with respect to document-visible-area in "display" hmm and not "print" hmm. For numeric cells, the visible top-left is always non-zero, hence triggering this incorrect "refpoint" subtraction to compute "relrect". The fix is to calculate the correct "relrect" by subtracting the display hmm version of "refpoint" from the edit cursor rectange and then convert to twips. Change-Id: I4b663edcb1f74e1bdcc300788769d580fcfe7e17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116426 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2021-06-16tdf#138302 partial revert tdf#108496: DOCX: redesign of override in listsJustin Luth
LO 6.4.5 commit cf13fe3e6f6a40f6db064d65d4514d13a23a31f0 was only concerned about DOCX, but just elinated shared code. So restore the shared code and just don't execute it for DOCX. It doesn't look like RTF was working before this, but this does fix DOC format. I looked for existing unit tests in rtf and doc, but none were found that hit this code. Change-Id: Id624f73181384f38e1ef9f27575e0fb82eea19c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116349 Tested-by: Jenkins Reviewed-by: Vasily Melenchuk <vasily.melenchuk@cib.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116452 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2021-06-16tdf#139915 DOCX import: fix anchored obj position with to-char and TEXT_LINEMiklos Vajna
There were multiple problems here: - commit 8f1a1092d47947847e1d888b0284e8364c663d1f (tdf#97371 DOCX import: fix text covered by shape, 2016-01-28) disabled to-char anchoring for TEXT_LINE (e.g. "alignment top, relative to line") because changing the anchor type of a TextBox could not be changed, but this has been implemented in sw/ in the meantime, so it can be dropped - Now that the anchor type is to-char, we can set the vertical relation to TEXT_LINE, but Word's positive value is "below line", and ours mean "towards the top of the page, from the bottom of the line", so we need to drop the workaround of commit 3303a4c5f21874453e634d84408c50e7a0055a4d (tdf#135153 DOCX import: avoid line-of-text relation with to-para anchoring, 2021-01-18) Once these are in place, we can fix the remaining problem by inverting the vertical position of the shape, which instantly fixes the overlapping textboxes in the bugdoc. (cherry picked from commit 2f21e4f357ec60450df84ddd858c3cf0a4711b02) Conflicts: writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx writerfilter/source/dmapper/GraphicImport.cxx Change-Id: I895abb76d3bd3bbe3a84e5c27a77df722b96226a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116231 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-06-16tdf#135153 DOCX import: avoid line-of-text relation with to-para anchoringMiklos Vajna
Regression from commit 8f1a1092d47947847e1d888b0284e8364c663d1f (tdf#97371 DOCX import: fix text covered by shape, 2016-01-28), the problem was that once the import decides that a shape should have no to-char anchoring, it should not leave behind vertical relation types which make no sense for to-para anchoring. text::RelOrientation::TEXT_LINE is specific to to-char anchoring, so reset the relation back to the default text::RelOrientation::FRAME. This means we'll no longer show "from top" on the UI while the doc model contains "from bottom": and those have to be in sync, otherwise pressing "down" while the shape is selected will actually move it up. (cherry picked from commit 3303a4c5f21874453e634d84408c50e7a0055a4d) Conflicts: writerfilter/source/dmapper/GraphicImport.cxx Change-Id: I660a7bb30133ea866cc4ba1620ae15fea243ef8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116230 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-06-16tdf#96061 Unset the highlight propertyGülşah Köse
When we have highlight property on specific part of the text the following texts were highligthing. To prevent this we unset the highlight property when we have not highlight property anymore. Change-Id: I802cde1c784afe47201a9ba4f41827dd0c705035 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115800 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116176 Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116333 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-06-16Seperate SvxBackgroundColorItem from SvxColorItemGülşah Köse
SvxBackgroundColorItem derivated from SfxPoolItem instead of SvxColorItem. Casting is common usage to control if object is this or not. When we can cast SvxBackgroundColorItem to SvxColorItem we can not seperate them anymore. eg: Char color is a SvxColorItem and char background color is a SvxBackgroundColorItem. They can be hold together and we should understand they are different types. Change-Id: I7b1879a1b00de26c0b8a2d9f8d658aa3aef75ecb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116135 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116185 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2021-06-16Bump version to 6.4-40Andras Timar
Change-Id: Ia17dba4b083787fe1b0e0f28d39b3e8e43c0668f
2021-05-27lok: Hide file name from Text Import Dialog (csv)cp-6.4-39merttumer
Change-Id: Id496ce68030a471ac73556f52bcd808d79d34589 Signed-off-by: merttumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116173 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-05-27lok: Re-Enable AnchorToPara context menu itemmerttumer
Change-Id: I0f1f4121c06b8f628f4fe49284737cea3d28e4b8 Signed-off-by: merttumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116141 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-05-27upgrade to Expat 2.4.1Caolán McNamara
drop ubsan patch in favour of fix applied as https://github.com/libexpat/libexpat/pull/398 Change-Id: I59eb9e24206b9a4cf323b7f7d48d8df0792a1c46
2021-05-27libxml2: upgrade to release 2.9.12Michael Stahl
Fixes: CVE-2021-3516 CVE-2021-3517 CVE-2021-3518 CVE-2021-3537 CVE-2021-3541 * external/libxml2/ubsan.patch.0: remove, fixed upstream Change-Id: I347dc854b862e78bde87d3e57cf5fdb584ca5673 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115913 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit bf0c6a98ae38cd2188d7f7e94f1563e5ce6a8ce4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115927 Tested-by: Michael Stahl <michael.stahl@allotropia.de>
2021-05-27tdf#134582 sfx2: when storing, set Version on embedded object storageMichael Stahl
This previously wasn't needed because there was only one version for which it was checked (1.2) but since commit a541cd91951eca15e40764244b34c72b347f9f26 there's a second version so when loading an existing embedded object in one version and storing it in another, the Version must be updated so the attribute in META-INF/manifest.xml matches the one in content.xml. Change-Id: Ic2fc303c6f6bc254050d531d578029377976ecb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98521 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit 519d96fd8b83ef4c61576d87b58f97b7e6e6e3c6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98459 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit a24a4cc1838e3a2d55261a8edf6cb63186f4c38f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108950 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-05-27Implemented Delete key deletes the table when all the cells are selectedmerttumer
Change-Id: I8a17c73781a3399b214d5655b83036652933a90a Signed-off-by: merttumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115689 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-05-27properly draw only parts of FillGradientPrimitive2D (tdf#139000)Luboš Luňák
The size of the whole gradient is getDefinitionRange(), while getOutputRange() gives the area of it to draw. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115923 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit 9bf9fea0afadef0912d38f0d08b2bf2959569100) Change-Id: I85dd7fe51bcc9c332a6fb0e6748d5ac89266b910 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115954 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2021-05-27sw: fix not needed invalidation of custom field on each keypressMiklos Vajna
And do the same for modification fields (e.g. modification date) and subject fields as well. In all cases the layout already reacts to the doc model change via normal notifications, no need to force anything. (Confirmed with manual testing.) This builds on top of commit 0a32630d11ebdb8b8218faa066c72582ef2f300d (sw: fix not needed invalidation of title field on each keypress, 2021-05-18). Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115784 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins (cherry picked from commit 1dcd3f1b9fc0d888e047e854a20e9ab2e0afd544) Change-Id: I8015b33a6680d75cd5b6446eb9275bb018ea7613 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115875 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-05-27Avoid Clang -Werror,-Wunused-command-line-argumentStephan Bergmann
> [CXX] bridges/source/cpp_uno/gcc3_linux_aarch64/callvirtualfunction.cxx > clang-12: error: argument unused during compilation: '-fno-stack-clash-protection' [-Werror,-Wunused-command-line-argument] as seen e.g. on macOS 11.1 ARM64 when building against Clang 12 trunk. Clang supports -fstack-clash-protection on > $ clang --target=x86_64-unknown-linux-gnu -fstack-clash-protection -fsyntax-only -x c - </dev/null but not on e.g. > $ clang --target=aarch64-unknown-linux-gnu -fstack-clash-protection -fsyntax-only -x c - </dev/null > clang-12: warning: argument unused during compilation: '-fstack-clash-protection' [-Wunused-command-line-argument] or > $ clang --target=arm64-apple-macosx11.0.0 -fstack-clash-protection -fsyntax-only -x c - </dev/null > clang-12: warning: argument unused during compilation: '-fstack-clash-protection' [-Wunused-command-line-argument] Change-Id: I98625bb7ed37bf00e97634c1c8d1f87fe3263af9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109719 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115831 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-05-27sw: fix not needed invalidation of title field on each keypressMiklos Vajna
Type a character, SwDocShell::DoFlushDocInfo() is called because the number of characters changed, and that rapaints all title fields. This happens as SwFormatField::UpdateTextNode() calls SwTextField::ExpandTextField() with bForceNotify=true, because that was needed for conditional text in commit cd94a84b89c476760ad74bf088a5d6f8ba4ce209 (125044: - use field's content cache on <SwTxtFld> construction only, 2014-06-13). Fix the problem by not forcing notifications for title fields in SwFormatField::UpdateTextNode(): SwTextField::ExpandTextField() will send a notification if the expend result differs without forcing as well. (cherry picked from commit 0a32630d11ebdb8b8218faa066c72582ef2f300d) Conflicts: sw/qa/core/txtnode/txtnode.cxx sw/source/core/txtnode/atrfld.cxx Change-Id: I5e46ab6aef33ff5e348d40b8644bcc9cf353c326 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115783 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-05-27vcl PDF export: fix re-exporting PDF images with arbitrary page-level rotationMiklos Vajna
Building on top of commit bd520b177637d4b7d9d93733103cff17a3c91b0a (vcl PDF export: fix re-exporting PDF images with page-level rotation, 2019-11-06), this was already working for 90 degrees, now generalize this to work with 180 degrees as well. (cherry picked from commit d7d43cf460d66354a40ffa3b34c0f9efcd42d0be) Conflicts: vcl/qa/cppunit/pdfexport/pdfexport.cxx vcl/source/gdi/pdfwriter_impl.cxx Change-Id: I5a5d51662399814d5554d7c2cb86a6c9a2974012 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115712 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Ashod Nakashian <ash@collabora.com>
2021-05-27vcl PDF tokenizer: fix EOF position when \r is not followed by \nMiklos Vajna
Otherwise this would break partial tokenize when we only read a trailer in the middle of the file: m_aEOFs.back() is one byte larger than rStream.Tell(), so we reader past the end of the trailer, resulting in a tokenize failure. What's special about the bugdoc: - it has 2 xrefs, the first is incomplete, and refers to a second which is later in the file - the object length is as indirect object, triggering an xref lookup - the first EOF is followed by a \r, but then not with a \n This results in reading past the end of the first trailer and then triggering a lookup failure. FWIW, pdfium does the same in <https://pdfium.googlesource.com/pdfium/+/59d107323f6727bbd5f8a4d0843081790638a1dd/core/fpdfapi/parser/cpdf_syntax_parser.cpp#446>, we're on in sync with it. (cherry picked from commit 6b1d5bafdc722d07d3dc4980764275a6caa707ba) Conflicts: vcl/qa/cppunit/filter/ipdf/ipdf.cxx Change-Id: Ia556a25e333b5e4f1418d92a98d74358862120e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115537 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-05-27Bump version to 6.4-39Andras Timar
Change-Id: I281483b9d1e68d97d2cd1d2fc27a81554c4a64df
2021-05-12Bump version to 6.4-38cp-6.4-38Andras Timar
Change-Id: I9c95d0c13516b5ece7532545cd148de2f4b3c9f9
2021-05-12Enable PdfIum for android buildmerttumer
Change-Id: I58d09db362f0de991eab3920683530e1ec43e2bc Signed-off-by: merttumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115373 Tested-by: Andras Timar <andras.timar@collabora.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2021-05-12pdfium build fix with Android NDK 19Andras Timar
Change-Id: I618095efab0a7ed7babdabc36db6a473b1af78da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115161 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit 01765acee6b4931b6c69252b8357f81fd26e33bd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115090 Tested-by: Jenkins (cherry picked from commit 645cb7eda4fbe83ed748aafa41d210db274e22fc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115279 Tested-by: Andras Timar <andras.timar@collabora.com>
2021-05-12android: Fix DrawingArea inside CsvTableBox is shrinkedmerttumer
Change-Id: Ia722297051eb3413b9db17024173c9eb596d8e7a Signed-off-by: merttumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115235 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-05-12vcl: Don't just return OK when executing a dialog in AndroidTomaž Vajngerl
This was probably "ifdef-ed" out for Android because of some old assumptions and isn't true anymore today. This has prevented that the dialog for macro execution shows up on Android when the document is loading. Change-Id: I662d2deb1520f9a3b421dac05f858488aef825fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115303 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-05-12svx: fix crash with active text edit vs slide deleteMiklos Vajna
The problem is that SdrObjEditView::HideSdrPage() may delete SdrPaintView::mpPageView when it calls SdrGlueEditView::HideSdrPage(). But SdrObjEditView::pTextEditPV is a non-owning reference to that. GetTextEditBackgroundColor() in svx/ calls SdrObjEditView::GetTextEditPageView(), so in case SdrObjEditView::pTextEditPV is not cleared, we would access a deleted SdrPageView. (cherry picked from commit 014f33066a99488c52d10d8f5ff470ca6e2242f6) Change-Id: I948bae8e0e8d557e38aa8f243e9eea522b21a043 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115341 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-05-12lok: move handleMacroConfirmationRequest to its own methodTomaž Vajngerl
Just refactor to make it similar to other requests. Change-Id: I1a76d3d4ecc02b0a223ab8e44b11047455280142 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115302 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-05-12lok: enable macros by default for AndroidTomaž Vajngerl
This enables macros execution for Android, so the user will be asked to execute macros (assuming the security level is set to 1, which is the default) if the document contains any macros to execute. Change-Id: I34dbd123c5b4ea7386096fd3a21766da3479be6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115301 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-05-12update native-code.py to support VBA scripts in calc on AndroidTomaž Vajngerl
Change-Id: I71de988fa67ceddae5ecca7d72f852dc76552706 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114910 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-05-12lok: add rendering and input for form controls in CalcTomaž Vajngerl
Until now the form controls were nto rendered to a tile when drawing tiles for LOKit usage (online). This change adds LokControlHandler that is responsible for rendering of the form controls on the tiles (currently implemented only for Calc) and handles mouse input events that come through LOKit. Change-Id: Ifcecc9a320a7836b76b0a10771b06c15339baed2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114909 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-05-12vcl pdfium render: handle widget annotations for form fieldsMiklos Vajna
Note that we render the bitmaps without FPDF_ANNOT, so comments are not rendered into the bitmaps, rather we create them on top of the bitmaps in Draw, explicitly. FPDF_FFLDraw() draws content which is already an annotation, but not yet interactive content; so this just fixes "missing text", as far as the user is concerned. Verified that e.g. vcl/qa/cppunit/data/PangramAcrobatAnnotations.pdf indeed still doesn't render comments into bitmaps after this. (cherry picked from commit 92cba30d5ce45e4f4a9516a80c9fe9915add6905) Conflicts: include/vcl/filter/PDFiumLibrary.hxx vcl/qa/cppunit/PDFiumLibraryTest.cxx vcl/source/filter/ipdf/pdfread.cxx vcl/source/pdf/PDFiumLibrary.cxx Change-Id: I2b74d585729305cc1d3a9fefa258d4d76d1bd038 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115167 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-05-12unit-tests for new behaviour of auto-completeDennis Francis
Change-Id: I1255c50c33f4001a7d9932e0178b6539653eb61d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115133 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-05-12show autocompletion only if there is exactly one matchDennis Francis
Picking one from many matches by any logic requires the user to pay attention to the auto completed match and see if it the one they wanted. Instead show autocomplete only when there is exactly one match with what the user has already typed. Change-Id: If8f7e59fe905d3d472a5a5795f96374ec2d1a6e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115132 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-05-12autocomplete from superblock of str/edittextDennis Francis
Change-Id: Ibf73284971652c5cbd9874d81ded4a1f0cbb4e94 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115131 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-05-12lok: Enable the "AutoInput" again.Dennis Francis
This partly reverts commit 65990058f041c3f1d280a69d411eb4ceacf5a721. Change-Id: I494e3ffa3c9824fd6668b1c7322b9cf08accac21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115130 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-05-12Fix style previews widget with multiple languagesSzymon Kłos
Broadcast also universal name (English identifier) for styles on change. This allows to select correct style without knowledge about all languages that other users use in other views. Fixes style previews widget in online with multiple sessions in different languages Change-Id: I9b9bcc92d96b5a5482a97a5947f148a638f257d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115093 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2021-05-12Fix broken TOX in Online.Gülşah Köse
1. Open a German file in the Online 2. Insert a new paragraph, and change its style to "Ueberschrift 1" 3. Go to the Table of Content, and choose "Update Index" 4. See the index got destroyed, and when you look at the list of styles, the "Ueberschrift 1" has disappeared, and "Heading 1" appeared instead. This reverts part of: commit ca435be45f316120b9df6c9d547b781ed975817d writer: handle styles in multiple languages for online Change-Id: I82e46b3cf7824df6efdbb4b2a16716153ddae0df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114683 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2021-05-12Invalidate inputbar after size changed messageSzymon Kłos
when canvas is resized the content is cleared Change-Id: Iee51583cd74d15add70e8c5cdf0a4fb00d8b6efb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115119 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2021-05-12LOK: calc: allow image selection on insertionPranam Lashkari
in calc online, image was not selected by default when inserted problems: it was inconsistent with writer and impress/draw it caused problem in cypress testing Change-Id: Ic18b7a918c485a1cd384694d72fbb0a598d26ba2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115013 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Pranam Lashkari <lpranam@collabora.com>
2021-05-12Wait for dialog response on Androidmerttumer
Do not return RET_OK immediately. Change-Id: I1ff22edce54e4717e418457bde1dca830346f197 Signed-off-by: merttumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114831 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>