Commit Graph
4 Commits
Author SHA1 Message Date
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
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
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
Miklos Vajna 85467e7cb9 tdf#137356 framework: fix opening the same document twice for long loads
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 74ac65c49c
(#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-10-14 18:41:26 +02:00