summaryrefslogtreecommitdiff
path: root/framework/qa
AgeCommit message (Collapse)Author
2024-07-02BootstrapFixture: get rid of mxComponentContextXisco Fauli
Change-Id: I0318485c3c0159277e47096e0c7e0df8ed109ea4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169865 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-06-18loplugin:ostr in variousNoel Grandin
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-07Revert "framework/qa/complex/dispatches/checkdispatchapi.java to CppUnit"Xisco Fauli
This reverts commit 227f5c77278c96f7f1b126aade457422949a095c. 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-07CppunitTest_framework_CheckXTitle: simplify code a bitXisco Fauli
Change-Id: I1e3fe2d081daf6c7b4097c266695f69c2f377b0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168521 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-06-07framework/qa/complex/dispatches/checkdispatchapi.java to CppUnitAdam Seskunas
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-04Port framework/qa/complex/XTitle/CheckXTile.java to CppunitAdam Seskunas
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-05-08loplugin:ostr in frameworkNoel Grandin
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-03-08tdf#45904 Remove old SwXFootnoteText Java testLuv Sharma
Change-Id: I04ade7be60083d4bc57b400b7aa82850424e1e9b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164407 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2024-02-25tdf#45904 Remove old SwXFootnote Java testLuv Sharma
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-18tdf#45904 Remove old SwXFootnoteProperties Java testLuv Sharma
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-04tdf#45904 Remove old SwXBodyText Java testLuv Sharma
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-01-03UnoApiTest::loadFromURL -> UnoApiTest::loadFromFileMike Kaganski
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>
2023-10-11make CppunitTest_framework_dispatch reliableCaolán McNamara
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-09-25tdf#146150 Use dispatch cmd for the corresponding SIDapurvapriyadarshi
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-08-27tdf#45904: Remove old SwXReferenceMarks Java testanfanite396
Change-Id: I8830e54fdba98d3cfd1e2844e7faf02e55e7d0ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156044 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-25tdf#45904: Remove old SwXParagraphEnumeration Java testanfanite396
Change-Id: Ia8b639e016971e389d24d4468492af902d1dc35b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156042 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-25tdf#45904: Remove old SwXFootnotes Java testanfanite396
Change-Id: I7444b8521b560c91d2908d14330a3c6d6ff420cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156041 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-25tdf#45904: Remove old SwXFieldEnumeration Java testanfanite396
Change-Id: I5bbefc7c1c5ac9ebd88669ac328bba28183b76ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156033 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-25tdf#45904: Remove old SwXDocumentIndexes Java testanfanite396
Change-Id: I93556b3c56887b424dd8720d752986563a0fa807 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156032 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-25tdf#45904: Remove old SwXStyleFamilies Java testanfanite396
Change-Id: I3057e4a2fcf1b057d35050bfeb7c22fbad19325b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156045 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-25tdf#45904: Move SwXTextEmbeddedObjects Java tests to C++anfanite396
Change-Id: I05ad9e264162e3fb97ebea814f59ed44bf23056a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156050 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-25tdf#45904: Remove old SwXReferenceMark Java testanfanite396
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-25tdf#45904: Move SwXTextFieldMasters Java tests to C++anfanite396
Change-Id: Ifa185b24fe49f2c88e4d3687a09ebce5987503a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156051 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-23tdf#45904: Remove old SwXBookmark Java testanfanite396
Change-Id: If17818329b805a03b975e105ea97f7c6cc16d1a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155767 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-23tdf#45904: Move SwXTextTables Java tests to C++anfanite396
Change-Id: I3946e68ce5c8a9611c243e427bc94c277c0a5456 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155810 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-23tdf#45904: Move SwXTextSections Java tests to C++anfanite396
Change-Id: I24f7098f71a126790a177715a85fcea2724cb4aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155808 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-21Move SwXTextFieldTypes Java tests to C++anfanite396
Change-Id: I77ca9bc6cd0db626df826e2084514d34becf39bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154208 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-21tdf#45904: Remove old SwXBookmarks Java testanfanite396
Change-Id: Ie8d66b74192d1741922a7728934317859821fa00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155745 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-04-17Remove some unused includesMiklos Vajna
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-13try to fix CppunitTest_framework_dispatch on windowsNoel Grandin
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-01-18Fix typoAndrea Gelmini
Change-Id: Ifc9748fc33c72ad6e0cb334ca22ebb8b488164c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145710 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-11-22CppunitTest_framework_services: inherit from UnoApiTestXisco Fauli
Change-Id: I8963f0dbf5e70347ee98e639dc6eeecc0f43b821 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143099 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-22CppunitTest_framework_loadenv: inherit from UnoApiTestXisco Fauli
Change-Id: I9c997691d6b7f0c46089eec86b614bcd1a0d71a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143102 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-22CppunitTest_framework_dispatch: inherit from UnoApiTestXisco Fauli
Change-Id: I9a839ffe01e1d5da49268bd8ad78dbedd8dadc25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143100 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-06-14Remove some unused includesMiklos Vajna
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-03-04tdf#45904: Remove ScHeaderFieldObj Java testJens Carl
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-01tdf#45904 Move XComponent Java test to C++Jens Carl
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-02-28tdf#45904 Move XElementAccess Java test to C++Jens Carl
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-23CppunitTest_framework_dispatch: remove duplicated dispatchCommandXisco Fauli
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-01-15tdf#146754: consider xyz:123 as host:port when parsing URLs smartMike Kaganski
... 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>
2021-10-30Prepare for removal of non-const operator[] from Sequence in frameworkMike Kaganski
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-14Avoid COW overhead using css::uno::SequenceMike Kaganski
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-06-30sfx2: try to fix lifecycle of SfxOfficeDispatchMichael Stahl
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-01fix leak in CppunitTest_framework_servicesNoel Grandin
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-02-25tdf#139734 Remove redundant asserts after MacrosTest::loadFromDesktopMoaz
MacrosTest::loadFromDesktop itself asserts on its return value. Thus, the additional checks in unit tests are redundant, and only create noise unrelated to the tested functionality. Change-Id: If616001b296afdde38f5a23ececee3d44b4a395d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111290 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-02-16loplugin:referencecasting in editeng..frameworkNoel
Change-Id: Ia3375011ecd0a65afed0f131f477fc1542603fde Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110948 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-10fix coverity parse errorsCaolán McNamara
Change-Id: I4884bfb67a061b865e8cf38b2fea6de0cb1bc3d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109057 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-26New loplugin:stringliteralvarStephan Bergmann
See the comment at the top of compilerplugins/clang/stringliteralvar.cxx for details. (Turned some affected variables in included files into inline variables, to avoid GCC warnings about unused variables.) Change-Id: Ie77219e6adfdaaceaa8b4e590b08971f2f04c83a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-14tdf#137356 framework: fix opening the same document twice for long loadsMiklos Vajna
If the document loading is long enough that the statusbar is updated, then we can have this situation that we start loading the document, then spin the main loop during load and do a second load of the same document as part of the main loop spinning: #0 SwDoc::SwDoc() (this=0x1c6a180) at sw/source/core/doc/docnew.cxx:194 ... #6 0x00007ffff359a6dd in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (this=0x1c5c260, seqArguments=uno::Sequence of length 15 = {...}) ... #33 0x00007fffeeb81ecd in Application::Reschedule(bool) (i_bAllEvents=true) at vcl/source/app/svapp.cxx:460 ... #36 0x00007ffff4265251 in framework::StatusIndicator::start(rtl::OUString const&, int) (this=0x1aace80, sText="Loading document...", nRange=1000000) at framework/source/helper/statusindicator.cxx:51 #37 0x00007fffd026dfd3 in XMLReader::Read(SwDoc&, rtl::OUString const&, SwPaM&, rtl::OUString const&) (this=0x1bb7d20, rDoc=..., rBaseURL="file:///.../test.odt", rPaM=SwPaM = {...}, rName="") at sw/source/filter/xml/swxml.cxx:630 ... #42 0x00007ffff359a6dd in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (this=0x1bce4d0, seqArguments=uno::Sequence of length 15 = {...}) at sfx2/source/doc/sfxbasemodel.cxx:1883 The reason for this is is that by the time LoadEnv::impl_searchAlreadyLoaded() searches for frames which already have this doc open, the first load is still in progress, and we assiciate the frame with its controller (which has the URL) only once the load finishes. Fix the problem by setting the URL on the frame directly for the duration of the load: this way an in-progress load also counts as a duplicate and we'll have just one document open at the end. Regression from commit 74ac65c49cc1d53b1aa93c2b7c720255867aace2 (#i114963# Enable IPC before OpenClients to allow client connections when printing., 2016-09-06), we just didn't process incoming requests on the socket before, so the problem was less visible. Change-Id: Ib138c4c264e2508c20104ab268501bcca31e2790 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104310 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-09-24framework: lock the solar mutex in loadComponentFromURL() with OnMainThreadMiklos Vajna
Regression from commit 2dc3a6c273cb82506842864481d78df7294debbf (framework: allow loading a component on the main thread, 2018-12-19), which was a forward-port from a 5.4-based vendor branch, where this was (it turns out) just working by accident, but never on master. It can happen that loadComponentFromURL() is invoked on a thread, which does not own the solar mutex. Then once vcl::SolarThreadExecutor::execute() is called, it'll try to release the solar mutex. But SolarMutexReleaser is unsafe: it'll release the mutex even if it is owned by an other thread. To make this a bit more safer, it'll abort in comphelper::SolarMutex::doRelease(), in case the current thread doesn't have the mutex already. Fix the problem by taking the solar mutex in loadComponentFromURL(): this is meant to cause no performance problems, since the actual importers typically start with taking the solar mutex anyway. Taking it earlier would be problematic, since this can be invoked by UNO clients directly. Taking it later in vcl/ would be also unusual: typically vcl just asserts that the solar mutex is locked, doesn't take it itself. Change-Id: I752006a91f16a02254d1b5ac6301100ab282630b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103264 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins