Commit Graph
507 Commits
Author SHA1 Message Date
Xisco Fauli 6577d2a942 UnoApiTest: merge loadFromURL and loadWithParams into one
Change-Id: Ib58c211542018f07303cadacda86e3419062401e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199297
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-02-12 20:58:05 +01:00
Neil Roberts 713732b0a2 Add a unit test for the accelerator configurations
This is meant to test the problems described in the following commits:

96491f3f84
7da5034706

Change-Id: I2f79e8812de6f70d270eefb01aa7e2940c87166a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191173
Tested-by: Jenkins
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-09-24 20:28:13 +02:00
Neil Roberts a215aea6e8 AcceleratorsConfigurationTest: Use new-style service specification
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>
2025-09-21 13:09:18 +02:00
Akshay Kumar Dubey 52ad257d44 tdf#45904 Remove old SwXTableCellText Java test
Change-Id: I32a4c07d733ca5455763eae5c49925a8435ec218
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180480
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2025-05-01 11:41:20 +02:00
Shardul Vikram Singh e0c2d334f1 tdf#146150 Replace SID with dispatch cmd in ContextMenuInterceptor.java
- Replace `slot:5410` with `.uno:HelpMenu`
- Replace `slot:5400` with `.uno:HelpOnHelp`

Change-Id: Ifcb67906882d4cb416c65bd65c41956e5dda7f76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179501
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-12-30 15:19:35 +01:00
Xisco Fauli a38a22c7e5 UnoApiTest: rename load to loadFromURL and use it everywhere
Change-Id: Ie67eebec74f783fa0c29acfb23bb83bc582812b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175724
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2024-10-29 09:11:37 +01:00
Xisco Fauli 83a8d5a275 BootstrapFixture: get rid of mxComponentContext
Change-Id: I0318485c3c0159277e47096e0c7e0df8ed109ea4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169865
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-07-02 15:35:00 +02:00
Noel Grandin 0572ef356b loplugin:ostr in various
Change-Id: I7aa8ed716998a185996482dc561219b398a1c919
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169080
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-06-18 13:16:23 +02:00
Xisco Fauli 571c082c2e Revert "framework/qa/complex/dispatches/checkdispatchapi.java to CppUnit"
This reverts commit 227f5c7727.

Reason for revert: I clicked the push button to fast. it needs more checking

Change-Id: I092691c6ebcf7921d26df58ba4c0a38cfdd418b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168532
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-06-07 15:02:21 +02:00
Xisco Fauli 7023e0e8e5 CppunitTest_framework_CheckXTitle: simplify code a bit
Change-Id: I1e3fe2d081daf6c7b4097c266695f69c2f377b0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168521
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-06-07 15:00:50 +02:00
Adam Seskunas 227f5c7727 framework/qa/complex/dispatches/checkdispatchapi.java to CppUnit
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>
2024-06-07 10:45:17 +02:00
Adam Seskunas 4078428a40 Port framework/qa/complex/XTitle/CheckXTile.java to Cppunit
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>
2024-06-04 09:11:39 +02:00
Noel Grandin 4f5f24a4a3 loplugin:ostr in framework
Change-Id: I2fdc32aa5de6a1315fe69997f9b531259aa78605
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167339
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-08 17:18:51 +02:00
Luv Sharma 26d0ce6fd0 tdf#45904 Remove old SwXFootnoteText Java test
Change-Id: I04ade7be60083d4bc57b400b7aa82850424e1e9b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164407
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-03-08 22:05:15 +01:00
Luv Sharma 907c5d684d tdf#45904 Remove old SwXFootnote Java test
Change-Id: Ie7083f8fbefd731f3d7f2f1c246e39c37cd684fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163881
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2024-02-25 01:47:00 +01:00
Luv Sharma 35d859d1ae tdf#45904 Remove old SwXFootnoteProperties Java test
Change-Id: I20f160d557364ffc5240403d6e2c53b5b135ba46
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163524
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2024-02-18 01:42:32 +01:00
Luv Sharma 0a83e6dfaf tdf#45904 Remove old SwXBodyText Java test
Change-Id: I3dcef5782e81340e8a3ee2433246ddd23560dd5d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162943
Tested-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2024-02-04 05:13:14 +01:00
Mike Kaganski a01a642ebb UnoApiTest::loadFromURL -> UnoApiTest::loadFromFile
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>
2024-01-03 07:51:28 +01:00
Caolán McNamara 30c582a720 make CppunitTest_framework_dispatch reliable
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>
2023-10-11 15:20:30 +02:00
apurvapriyadarshi 31ca96ff30 tdf#146150 Use dispatch cmd for the corresponding SID
Change-Id: I0d987a8b10f2c69192d080b534a1d6aa71a6cf4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157105
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2023-09-25 13:04:27 +02:00
anfanite396 9a4f776e5a tdf#45904: Remove old SwXReferenceMarks Java test
Change-Id: I8830e54fdba98d3cfd1e2844e7faf02e55e7d0ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156044
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-27 08:21:26 +02:00
anfanite396 b0652124dc tdf#45904: Remove old SwXParagraphEnumeration Java test
Change-Id: Ia8b639e016971e389d24d4468492af902d1dc35b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156042
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-25 08:30:11 +02:00
anfanite396 30b7721f59 tdf#45904: Remove old SwXFootnotes Java test
Change-Id: I7444b8521b560c91d2908d14330a3c6d6ff420cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156041
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-25 08:29:57 +02:00
anfanite396 3b2d95ab67 tdf#45904: Remove old SwXFieldEnumeration Java test
Change-Id: I5bbefc7c1c5ac9ebd88669ac328bba28183b76ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156033
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-25 08:29:41 +02:00
anfanite396 e346c663e8 tdf#45904: Remove old SwXDocumentIndexes Java test
Change-Id: I93556b3c56887b424dd8720d752986563a0fa807
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156032
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-25 08:29:26 +02:00
anfanite396 1dca3e5839 tdf#45904: Remove old SwXStyleFamilies Java test
Change-Id: I3057e4a2fcf1b057d35050bfeb7c22fbad19325b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156045
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-25 08:29:06 +02:00
anfanite396 534326bf57 tdf#45904: Move SwXTextEmbeddedObjects Java tests to C++
Change-Id: I05ad9e264162e3fb97ebea814f59ed44bf23056a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156050
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-25 08:27:53 +02:00
anfanite396 52f785d151 tdf#45904: Remove old SwXReferenceMark Java test
Change-Id: I81acf617726b7e7e5b5510b0d6d7677c7d08aba5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156043
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-25 08:25:02 +02:00
anfanite396 0440f57a09 tdf#45904: Move SwXTextFieldMasters Java tests to C++
Change-Id: Ifa185b24fe49f2c88e4d3687a09ebce5987503a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156051
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-25 08:24:06 +02:00
anfanite396 6d9f68e47a tdf#45904: Remove old SwXBookmark Java test
Change-Id: If17818329b805a03b975e105ea97f7c6cc16d1a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155767
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-23 15:30:47 +02:00
anfanite396 2c5dfcf4b0 tdf#45904: Move SwXTextTables Java tests to C++
Change-Id: I3946e68ce5c8a9611c243e427bc94c277c0a5456
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155810
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-23 15:27:08 +02:00
anfanite396 49c4f0581c tdf#45904: Move SwXTextSections Java tests to C++
Change-Id: I24f7098f71a126790a177715a85fcea2724cb4aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155808
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-23 15:26:51 +02:00
anfanite396 63464fdf55 Move SwXTextFieldTypes Java tests to C++
Change-Id: I77ca9bc6cd0db626df826e2084514d34becf39bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154208
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-21 10:35:18 +02:00
anfanite396 d71d61326f tdf#45904: Remove old SwXBookmarks Java test
Change-Id: Ie8d66b74192d1741922a7728934317859821fa00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155745
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-21 10:34:46 +02:00
Miklos Vajna 3a759a0b0c Remove some unused includes
Mostly com/sun/star/frame/Desktop.hpp is unused after inheriting from
UnoApiTest.

Change-Id: I71b75fa5c880337ff294583b96af09c90b5059c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150514
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2023-04-17 19:01:11 +02:00
Noel Grandin 00f73472c1 try to fix CppunitTest_framework_dispatch on windows
I see occasional failures here, possibly they are a threading
issue since we are touching these fields from multiple threads.
Add a mutex to see if it helps.

Change-Id: I7277e96d07d292a6bc1d333dabec7a82fc607465
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150281
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-13 07:57:16 +02:00
Andrea Gelmini 031f7527f4 Fix typo
Change-Id: Ifc9748fc33c72ad6e0cb334ca22ebb8b488164c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145710
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2023-01-18 11:28:31 +00:00
Xisco Fauli 70a84bc0ee CppunitTest_framework_services: inherit from UnoApiTest
Change-Id: I8963f0dbf5e70347ee98e639dc6eeecc0f43b821
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143099
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-22 14:52:43 +01:00
Xisco Fauli 8654586816 CppunitTest_framework_loadenv: inherit from UnoApiTest
Change-Id: I9c997691d6b7f0c46089eec86b614bcd1a0d71a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143102
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-22 14:32:40 +01:00
Xisco Fauli 49cd099df4 CppunitTest_framework_dispatch: inherit from UnoApiTest
Change-Id: I9a839ffe01e1d5da49268bd8ad78dbedd8dadc25
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143100
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-22 13:24:58 +01:00
Miklos Vajna b6758293e6 Remove some unused includes
See tdf#42949 for motivation.

Change-Id: I157b331195cc8262e6bd1dcc536cb653587fc45f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135775
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-06-14 08:11:28 +02:00
Jens Carl 89aec86200 tdf#45904: Remove ScHeaderFieldObj Java test
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>
2022-03-04 17:16:06 +01:00
Jens Carl 26cbb045a0 tdf#45904 Move XComponent Java test to C++
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>
2022-03-01 17:40:52 +01:00
Jens Carl a1877ab81b tdf#45904 Move XElementAccess Java test to C++
Move XElementAccess Java test to C++ for ScHeaderFieldsObj.

Change-Id: I1bc29be9f17d117edecfd889b4f9784ffbd74d71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130660
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
2022-02-28 06:27:21 +01:00
Xisco Fauli 280c505373 CppunitTest_framework_dispatch: remove duplicated dispatchCommand
it's already defined in unotest::MacrosTest

Change-Id: I2abc4bea61f55242b9cf3c7f030f5c74f8a51efe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130402
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-02-23 09:06:59 +01:00
Mike Kaganski 6b973753d4 tdf#146754: consider xyz:123 as host:port when parsing URLs smart
... rather than scheme: and path.

Change-Id: I9a48310b585b8fa3e31635f877a91f1560b065f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128457
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-01-15 10:52:56 +01:00
Mike Kaganski f662ba9536 Prepare for removal of non-const operator[] from Sequence in framework
Change-Id: Ied2683a0b8a1bab1a7594da1e9bdbd3cb753552c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124370
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-30 10:31:26 +02:00
Mike Kaganski 8a017d25a6 Avoid COW overhead using css::uno::Sequence
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>
2021-10-14 06:00:49 +02:00
Michael Stahl 7cbd6d768d sfx2: try to fix lifecycle of SfxOfficeDispatch
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>
2021-06-30 18:40:27 +02:00
Noel Grandin 25a648541a fix leak in CppunitTest_framework_services
Change-Id: I522e3e9b57668d7a8d1df10f4520045a3a3553dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116524
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-01 12:57:37 +02:00