The Global and Module AcceleratorConfigurations are supposed to use the
new-style service specification where their argument is specified during
construction instead of using XInitialization. This was causing the test
to seg fault if it’s enabled. I think the service might have been
upgraded to the new style in 8f3cec9d7a.
Change-Id: I1fe7fa67561f6e0a0e594e5112796d14f4ce4c77
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191218
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Ports the checkDispatchOfXXX tests including the three database
dependent tests. The other tests in the file will be ported in
another commit, to be merged with this one.
Change-Id: I6bcbcbf91ad4d9cc52c817f4efef9779a17f2198
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168482
Tested-by: Jenkins
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
framework
- Remove CheckXTitle.java from makefiles
- Create new makefile for CheckXTitle
framework qa complex XTitle
- Remove JUnit test
framework qa cppunit
- Add new CppUnit test suit CheckXTitle.cxx
- checkDefaultTitle: tests if default title is the same after cycling through the default window and print preview
- checkTitleDefaultFileName: tests if a window title set with SuggestedSaveAs is in fact set with said name
- setTitleAndCheck: tests if after setting window title and cycling through default window and print preview, there is infinite recursion
Change-Id: If7794f0f853ef427bb735a22752cff3635f5ff63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168168
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
The old name was misleading (it doesn't take an URL, but a filename);
also, now it's easier to grep for it - doesn't get mixed with
vcl::graphic::loadFromURL.
Change-Id: Ib88d2194200a6a54d2326971e0306ba39f0c7025
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161578
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
the appearance of 2 interceptions is reproducible for me on linux with
make CppunitTest_framework_dispatch VALGRIND=memcheck
1st time
#1 (anonymous namespace)::MyInterceptor::queryDispatch(com::sun::star::util::URL const&, rtl::OUString const&, int) at core/framework/qa/cppunit/dispatchtest.cxx:139
#2 non-virtual thunk to (anonymous namespace)::MyInterceptor::queryDispatch(com::sun::star::util::URL const&, rtl::OUString const&, int) at core/framework/qa/cppunit/dispatchtest.cxx:0
#3 framework::InterceptionHelper::queryDispatch(com::sun::star::util::URL const&, rtl::OUString const&, int) at core/framework/source/dispatch/interceptionhelper.cxx:87
#4 non-virtual thunk to framework::InterceptionHelper::queryDispatch(com::sun::star::util::URL const&, rtl::OUString const&, int) at core/framework/source/dispatch/interceptionhelper.cxx:0
#5 (anonymous namespace)::XFrameImpl::queryDispatch(com::sun::star::util::URL const&, rtl::OUString const&, int) at core/framework/source/services/frame.cxx:2329
#6 non-virtual thunk to (anonymous namespace)::XFrameImpl::queryDispatch(com::sun::star::util::URL const&, rtl::OUString const&, int) at core/framework/source/services/frame.cxx:0
#7 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&) at core/framework/source/services/dispatchhelper.cxx:110
#8 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&) at core/framework/source/services/dispatchhelper.cxx:0
#9 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&) at core/unotest/source/cpp/macros_test.cxx:94
#10 (anonymous namespace)::testInterception::TestBody() at core/framework/qa/cppunit/dispatchtest.cxx:172
2nd time
#1 (anonymous namespace)::MyInterceptor::queryDispatch(com::sun::star::util::URL const&, rtl::OUString const&, int) at core/framework/qa/cppunit/dispatchtest.cxx:139
#2 non-virtual thunk to (anonymous namespace)::MyInterceptor::queryDispatch(com::sun::star::util::URL const&, rtl::OUString const&, int) at core/framework/qa/cppunit/dispatchtest.cxx:0
#3 framework::InterceptionHelper::queryDispatch(com::sun::star::util::URL const&, rtl::OUString const&, int) at core/framework/source/dispatch/interceptionhelper.cxx:87
#4 non-virtual thunk to framework::InterceptionHelper::queryDispatch(com::sun::star::util::URL const&, rtl::OUString const&, int) at core/framework/source/dispatch/interceptionhelper.cxx:0
#5 (anonymous namespace)::XFrameImpl::queryDispatch(com::sun::star::util::URL const&, rtl::OUString const&, int) at core/framework/source/services/frame.cxx:2329
#6 non-virtual thunk to (anonymous namespace)::XFrameImpl::queryDispatch(com::sun::star::util::URL const&, rtl::OUString const&, int) at core/framework/source/services/frame.cxx:0
#7 SfxStateCache::GetSlotServer(SfxDispatcher&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&) at core/sfx2/source/control/statcach.cxx:263
#8 SfxBindings::UpdateSlotServer_Impl() at core/sfx2/source/control/bindings.cxx:1083
#9 SfxBindings::NextJob_Impl(Timer const*) at core/sfx2/source/control/bindings.cxx:1254
#10 SfxBindings::NextJob(Timer*) at core/sfx2/source/control/bindings.cxx:1222
#11 SfxBindings::LinkStubNextJob(void*, Timer*) at core/sfx2/source/control/bindings.cxx:1219
#12 Link<Timer*, void>::Call(Timer*) const at core/include/tools/link.hxx:111
#13 Timer::Invoke() at core/vcl/source/app/timer.cxx:76
#14 Scheduler::CallbackTaskScheduling() at core/vcl/source/app/scheduler.cxx:480
#15 SalTimer::CallCallback() at core/vcl/inc/saltimer.hxx:55
#16 SvpSalInstance::CheckTimeout(bool) at core/vcl/headless/svpinst.cxx:161
#17 SvpSalInstance::ImplYield(bool, bool) at core/vcl/headless/svpinst.cxx:399
#18 SvpSalInstance::DoYield(bool, bool) at core/vcl/headless/svpinst.cxx:471
#19 ImplYield(bool, bool) at core/vcl/source/app/svapp.cxx:377
#20 Scheduler::ProcessEventsToIdle() at core/vcl/source/app/svapp.cxx:407
#21 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&) at core/unotest/source/cpp/macros_test.cxx:95
#22 (anonymous namespace)::testInterception::TestBody() at core/framework/qa/cppunit/dispatchtest.cxx:172
setting bold/italic will invalidate the slot for the property and timer
starts to update the normal listeners to those properties which might
kick in on a slower run.
Change-Id: Ib37e61c0fbed463f8974d476158e54a0160a2c92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157798
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
The ScHeaderFieldObj Java tests are implemented in
ScEditFieldObj_Header.
Change-Id: I45d3b17bd244090c491c85475f20bc06eb92908f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130953
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
Move XComponent Jave tests to C++ for ScCellFieldObj_Cell and
ScCellFieldObj_Header (formerly ScCellFieldObj).
Change-Id: Ibf293a72801720fee49acdda5a3a463e9202bb58
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130742
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
The scenarios are:
1. Calling sequence's begin() and end() in pairs to pass to algorithms
(both calls use getArray(), which does the COW checks)
2. In addition to #1, calling end() again when checking result of find
algorithms, and/or begin() to calculate result's distance
3. Using non-const sequences in range-based for loops, which internally
do #1
4. Assigning sequence to another sequence variable, and then modifying
one of them
In many cases, the sequences could be made const, or treated as const
for the purposes of the algorithms (using std::as_const, std::cbegin,
and std::cend). Where algorithm modifies the sequence, it was changed
to only call getArray() once. For that, css::uno::toNonConstRange was
introduced, which returns a struct (sublclass of std::pair) with two
iterators [begin, end], that are calculated using one call to begin()
and one call to getLength().
To handle #4, css::uno::Sequence::swap was introduced, that swaps the
internal pointer to uno_Sequence. So when a local Sequence variable
should be assigned to another variable, and the latter will be modified
further, it's now possible to use swap instead, so the two sequences
are kept independent.
The modified places were found by temporarily removing non-const end().
Change-Id: I8fe2787f200eecb70744e8b77fbdf7a49653f628
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123542
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This can be created either from the global SfxApplication, or from a
SfxViewFrame.
Particularly in the latter case, the SfxDispatcher and SfxBindings
members are owned by SfxViewFrame, so in case that is destroyed, the
SfxOfficeDispatch must clear its pointers.
It looks like the member pointers are checked before access already
everywhere, so just listen at the SfxViewFrame.
Change-Id: If08825734e94dd54e32cb77546684fd583c336ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118162
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>