office-gobmx/desktop/qa/data/sheet_with_image.ods
Ashod Nakashian 42f60e67e5 desktop: unit-test to check SpellDialog works in multiple views
Unfortunately, this isn't fully functional, but
didn't want to lose the effort. The problem is
that there is no proper config for languages
in the unit-tests. So even when we set the
language explicitly, it still doesn't apply
to the SpellCheckerDispatcher, which is
where it matters. This seems to be because
the config is not properly propagated and
broadcast. Below is the stacktrace as
works on desktop. During the unittest
the Broadcaster has no change listener
for LngSvcMgr, so SpellCheckerDispatcher::SetServiceList
doesn't get called.

 #0  0x00007f47f3fed7e6 in SpellCheckerDispatcher::SetServiceList(com::sun::lang::Locale const&, com::sun::uno::Sequence<rtl::OUString> const&)
     (this=0x5589de40e7a0, rLocale=..., rSvcImplNames=uno::Sequence of length 1 = {...}) at /home/ash/prj/master/linguistic/source/spelldsp.cxx:795
 #1  0x00007f47f3fcc0ad in LngSvcMgr::Notify(com::sun::uno::Sequence<rtl::OUString> const&) (this=0x5589de43b4e0, rPropertyNames=uno::Sequence of length 4 = {...})
     at /home/ash/prj/master/linguistic/source/lngsvcmgr.cxx:826
 #2  0x00007f47fa2d3c8d in utl::ConfigItem::CallNotify(com::sun::uno::Sequence<rtl::OUString> const&) (this=0x5589de43b530, rPropertyNames=uno::Sequence of length 4 = {...})
     at /home/ash/prj/master/unotools/source/config/configitem.cxx:181
 #3  0x00007f47fa2d3946 in utl::ConfigChangeListener_Impl::changesOccurred(com::sun::util::ChangesEvent const&) (this=0x5589de464b90, rEvent=...)
     at /home/ash/prj/master/unotools/source/config/configitem.cxx:143
 #4  0x00007f47e273bb61 in configmgr::Broadcaster::send() (this=0x7ffcc604c5b0) at /home/ash/prj/master/configmgr/source/broadcaster.cxx:182
 #5  0x00007f47e277f002 in configmgr::RootAccess::commitChanges() (this=0x5589dd557400) at /home/ash/prj/master/configmgr/source/rootaccess.cxx:171
 #6  0x00007f47fa2d80e3 in utl::ConfigItem::ReplaceSetProperties(rtl::OUString const&, com::sun::uno::Sequence<com::sun:🫘:PropertyValue> const&)
     (this=0x5589dd5571b0, rNode="ServiceManager/SpellCheckerList", rValues=uno::Sequence of length 4 = {...}) at /home/ash/prj/master/unotools/source/config/configitem.cxx:1025
 #7  0x00007f47fa339983 in SvtLinguConfig::ReplaceSetProperties(rtl::OUString const&, com::sun::uno::Sequence<com::sun:🫘:PropertyValue> const&)
     (this=0x7ffcc604cb40, rNode="ServiceManager/SpellCheckerList", rValues=uno::Sequence of length 4 = {...}) at /home/ash/prj/master/unotools/source/config/lingucfg.cxx:847
 #8  0x00007f47f3fcb88f in LngSvcMgr::UpdateAll() (this=0x5589de43b4e0) at /home/ash/prj/master/linguistic/source/lngsvcmgr.cxx:765
 #9  0x00007f47f3fc9caa in LngSvcMgr::LngSvcMgr() (this=0x5589de43b4e0) at /home/ash/prj/master/linguistic/source/lngsvcmgr.cxx:438
 #10 0x00007f47f3fd3baf in LngSvcMgr_CreateInstance(com::sun::uno::Reference<com::sun::lang::XMultiServiceFactory> const&) ()
     at /home/ash/prj/master/linguistic/source/lngsvcmgr.cxx:1967
 #11 0x00007f4800e9656b in cppu::OSingleFactoryHelper::createInstanceEveryTime(com::sun::uno::Reference<com::sun::uno::XComponentContext> const&) (this=0x5589de3ccfc8, xContext=
     uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630) at /home/ash/prj/master/cppuhelper/source/factory.cxx:149
 #12 0x00007f4800e96790 in cppu::OSingleFactoryHelper::createInstanceWithContext(com::sun::uno::Reference<com::sun::uno::XComponentContext> const&)
     (this=0x5589de3ccfc8, xContext=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630) at /home/ash/prj/master/cppuhelper/source/factory.cxx:175
 #13 0x00007f4800e97107 in cppu::OFactoryComponentHelper::createInstanceWithContext(com::sun::uno::Reference<com::sun::uno::XComponentContext> const&)
     (this=0x5589de3ccf60, xContext=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630) at /home/ash/prj/master/cppuhelper/source/factory.cxx:374
 #14 0x00007f4800eebc8f in cppuhelper::ServiceManager::Data::Implementation::createInstance(com::sun::uno::Reference<com::sun::uno::XComponentContext> const&, bool)
     (this=0x5589dbd2f030, context=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630, singletonRequest=false) at /home/ash/prj/master/cppuhelper/source/servicemanager.cxx:667
 #15 0x00007f4800eee587 in cppuhelper::ServiceManager::createInstanceWithContext(rtl::OUString const&, com::sun::uno::Reference<com::sun::uno::XComponentContext> const&)
     (this=0x5589dbcbaaf0, aServiceSpecifier="com.sun.star.linguistic2.LinguServiceManager", Context=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630)
     at /home/ash/prj/master/cppuhelper/source/servicemanager.cxx:991
 #16 0x00007f4800776778 in com::sun::linguistic2::LinguServiceManager::create(com::sun::uno::Reference<com::sun::uno::XComponentContext> const&)
     (the_context=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630)
     at /home/ash/prj/master/workdir/UnoApiHeadersTarget/offapi/normal/com/sun/star/linguistic2/LinguServiceManager.hpp:38
 #17 0x00007f4800772d51 in GetLngSvcMgr_Impl() () at /home/ash/prj/master/editeng/source/misc/unolingu.cxx:66
 #18 0x00007f4800773449 in SpellDummy_Impl::GetSpell_Impl() (this=0x5589dd82f420) at /home/ash/prj/master/editeng/source/misc/unolingu.cxx:217
 #19 0x00007f4800773614 in SpellDummy_Impl::isValid(rtl::OUString const&, short, com::sun::uno::Sequence<com::sun:🫘:PropertyValue> const&)
     (this=0x5589dd82f420, rWord="a", nLanguage=1033, rProperties=empty uno::Sequence) at /home/ash/prj/master/editeng/source/misc/unolingu.cxx:249
 #20 0x00007f48006ae4c2 in ImpEditEngine::DoOnlineSpelling(ContentNode*, bool, bool) (this=0x5589de195060, pThisNodeOnly=0x0, bSpellAtCursorPos=false, bInterruptible=true)
     at /home/ash/prj/master/editeng/source/editeng/impedit4.cxx:2306
 #21 0x00007f480067d0d2 in ImpEditEngine::OnlineSpellHdl(Timer*) (this=0x5589de195060) at /home/ash/prj/master/editeng/source/editeng/impedit3.cxx:322

Change-Id: Iffef03502c78311427aa8883739678120cc84931
(cherry picked from commit 4f77bd94028a140133814d735c0425bbd0de4839)
Reviewed-on: https://gerrit.libreoffice.org/85007
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
(cherry picked from commit 66c1f6bee6)
Reviewed-on: https://gerrit.libreoffice.org/85683
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2019-12-23 01:58:11 +01:00

10 KiB