Age | Commit message (Collapse) | Author |
|
... along with proper state changed callbacks for .uno:SlideMasterPage,
.uno:NormalMultiPaneGUI, .uno:NotesMode, and others.
The ".uno:DocumentStatus" payload is a notification for the callback
that it may need to collect the document status.
This allows to avoid the bond between the mentioned true UNO command
names, and the status collection: since we now send the status updates
for all of them, the document status collection would be performed for
each of them in the absence of a dedicated signal.
This re-implements commit bbd32b39eae24e99d135ed5c48586db8c9b0fb23,
without introducing a new callback enum value.
Change-Id: I942e17298196ff39ef8817a4cd59ad0fb8fa0da1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169468
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
This reverts commit bbd32b39eae24e99d135ed5c48586db8c9b0fb23.
A following commit will implement an alternative method without a
new enum member.
Change-Id: Id00a4a0abe68fc69b1a3a81c731c8085e3dbca2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169467
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
|
|
This allows to send status messages separately from statechanged;
this is needed in Impress to notify about any mode update, not only
masterview-related.
Also send SlideMasterPage updates automatically from core.
Change-Id: I0a50dbe61a5f2f28cd418eb4416819a6a76810b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169314
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
|
|
The SfxPoolItem has a new member SfxItemType m_eItemType to
compare types based on enums instead of typeinfo() which
consumes a lot of time e.g. while AutoFormat is running
Change-Id: I033ce67bc9a28ee4790f162380314de85fb4154e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166452
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
|
|
Besides expected performance improvement, this helped to find several
elements that were duplicated in the long list. Frozen map does not
allow duplication of the keys, helping avoid these mistakes.
Change-Id: I2192d0ed50b6b8611fd08715f713742a993b28dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168961
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: If9a36dcd447eef355f137b5afe16f917e9c0cfa3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168960
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
|
|
This allow Convert to Curve in COOL
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: Id1aa0bc68238ac29221edb1c1ec7dda6e16ce103
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168170
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
(cherry picked from commit c5a7ff366fd9094c3ee1aba4c016b59c5635ea9b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168194
Tested-by: Jenkins
|
|
Change-Id: Ie65284c3ded0c5789f0be5bbd770d190a92fecec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167922
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
|
|
Change-Id: Iaba1a77ae0ac7537f1dbf05fa097b3235b36f64d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167921
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
and
cid#1597304 Unchecked return value
cid#1597303 Unchecked return value
cid#1597306 Unchecked return value
cid#1597305 Unchecked return value
Change-Id: I2fa1c467751405d3b69f1d9b552232e4d52b610e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167554
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
and send uno command enable/disable status
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Id643a27308809b6960be72fb368b9f078ff9cf6c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167296
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167521
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I6306260d03c1208ec250c2f9a3860fa569f6d9c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167448
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
This is a follow up on cool#8066
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I7d6ce4c9dfe7c2e9a2dda110e587c8c825c4df2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167370
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
(cherry picked from commit 9bbe40cc2d39f89ffcae57875d4c7ef7688d83d7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167317
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
because it takes a surprising amount of time to initialise it
at runtime during startup
(*) have to convert the std::function in SfxType to a
function pointer, because the std::function constructor
is not constinit compatible.
(*) the SfxType0..SfxTypeN types need some reinterpret_cast
to work around the lack of zero-sized trailing arrays in c++
(*) Sadly MSVC does not support taking the address of symbols
in constinit structures, so we cannot make the SfxSlot
array constinit.
Change-Id: I300ee770cc115d30bc25c819f2ad34b29633876c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166963
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I900d9f1d35bc1e620822eedd5722a502704d6de0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166959
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ic2231df89b900c17beac4627e3573b45aef0bc26
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166954
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: Ibe5bca4d0622c4015030a21d4ecccd41d5e9f483
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166529
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: Ie10ed0193fbaeae2fb711caa9059906513c42e1f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166730
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: Iea3777cfb86c64c01cf1029ff3ba6a834d8c3619
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166706
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
|
|
The whole function is pointless without a viewshell, move the check &
short-circuit to the top of the function, and drop all the duplicate
checks.
Also drop two calls to SfxViewShell::Current(): getting it from the view
frame is better than getting some global state.
Change-Id: I4aa7aeb7c89841bbced760ce2e43d2312bc97f20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166139
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I43db7fabcc32971f951cc72dc9b1d22eba8df357
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166094
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Notice how e.g. the TransformPosX case already performed the same null
pointer check.
Crashreport backtrace:
> program/libmergedlo.so
> InterceptLOKStateChangeEvent
> sfx2/source/control/unoctitm.cxx:1143
> program/libmergedlo.so
> SfxStateCache::SetState_Impl(SfxItemState, SfxPoolItem const*, bool)
> sfx2/source/control/statcach.cxx:432
> program/libmergedlo.so
> SfxBindings::Update_Impl(SfxStateCache&)
> /opt/rh/devtoolset-10/root/usr/include/c++/10/bits/stl_vector.h:919 (discriminator 2)
> program/libmergedlo.so
> SfxBindings::NextJob_Impl(Timer const*)
> /opt/rh/devtoolset-10/root/usr/include/c++/10/bits/unique_ptr.h:173
Change-Id: I141d4f9ec50d0ce7a0eeaba69752c31390a1f9ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166027
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166046
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: Ic2724c6e03acaa8cfc74dc2aadfac6b13d8561c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165883
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
|
|
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I536448da395568cd43af6f4d1d36ef09f3c6a6b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165349
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Gökay ŞATIR <gokaysatir@collabora.com>
(cherry picked from commit 226e2263468da403d1f9db504115830f5a030229)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165834
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Ie70851756d1a4272876b07fefb876d7e6f8d4d81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165287
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
(cherry picked from commit 68422af88576a799b22e472c303ed924c360784b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165734
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
So user can use keyboard for selection.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Ic7812c88110da9fbefe86d145f921e48360b4f34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165157
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165733
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I3748612644c9c4eb88d7fb6e2d512954de9c1002
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165538
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
|
|
(cherry picked from commit 5c8c5db55e082eed3422e3fb9455943b2f285253)
Change-Id: I88e9a45fd9e5c7b6bf1984a424e36b010aaaff4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165389
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
- Before this patch in online text in paragraph was changing according to uno command but client was not getting and info about is RTL true or TRL true
- this will send message [:unoParaRightToLeft=true || :unoParaLeftToRight=true] at client side
- added more properties like disabled and state information to handle both case at same time in online
- which will be helpful to our existing locgic where to add or from where to remove selected class on element according to response
Change-Id: Ia443215342d6a81f4e60fa9237149f6b18420e16
Change-Id: I08fb7e474e099822b26c732fe1e5dac8e773c58f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164767
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164817
(cherry picked from commit fa93750070793cd548d028feb39e4d0e0e61ae5a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165324
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I88d535a5b23fb6d5de8e72eec61bdf3550bc757d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165334
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
I checked if this is used, but it can be replaced
using Clear() -> all. This prevents that the whole
array of Items in an ItemSet gets set to
INVALID_POOL_ITEM.
I also checked if INVALID_POOL_ITEM/IsInvalidItem
is needed at all representing SfxItemState::DONTCARE
but it is and still will need to be set for individual
Items.
At last checked if SfxItemState::UNKNOWN and
::DISABLED really need to be separate states, but
indeed there are some rare cases that need that.
To make things more consistent I also renamed
SfxItemState::DONTCARE to SfxItemState::INVALID
to better match Set/IsInvalid calls at ItemSet.
The build showed a missing UT and led to a problem
due to the hand-made ItemSet-like SearchAttrItemList.
The state 'invalid' seems to be used as 'unused'
marker. It should be changed to use SfxPoolItemHolder
and not need that. For now, set by using an own loop
to set to that state.
Change-Id: Ifc51aad60570569a1e37d3084a5e307eed47d06c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165035
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
|
|
This is a follow-up to commit f45402ae3f5241b460d9f1dcb04183893e1f91f7
(Fix a spurious JunitTest_sw_unoapi_3 failure, 2024-03-15). As noted
by Stephan, the failure persisted; it was because the update of slots
also accessed the changing document model, and it wasn't prevented by
IdlesLockGuard, because aAutoTimer had a default priority.
Change-Id: Iad8dfadcd35d9611e61e4c011511d6155a343f58
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165090
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Summary for what's done with this commit:
init.cxx
* Add guards for modify commands.
viewsh:
* Add "IsCurrentLokViewReadOnly" for ease of use.
unocitm:
* Add guard for modify comamnds
dispatch.cxx
* Implement readonlyview.
objmisc:
* Modify IsReadOnlyUI check for LokReadOnly view.
svx.sdi:
* Disable TableChangeCurrentBorderPosition command for readOnly views.
sw-editwin:
* Treat mouse moves as readonly when the view is LokReadOnly.
gridwin:
* For autofilter.
impedit2, inputhdl:
* For text input.
svdedtc:
* For sdr object dragging.
Change-Id: I71fc353976256bce22042bbb6042ee464b65cc13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165093
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
this is testing the wrong thing anyway. I briefly converted it
to a real assert, but surprise surprise, real code appears to
now rely on being able to set this more than once, so just remove
it.
Change-Id: Ib272b002e3038eb8537df4768d980b3c3cf938fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164726
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I194c0c3260fe90273f5b5f50c18a63e48ae85449
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164699
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Aron Budea <aron.budea@collabora.com>
(cherry picked from commit 9358d70f57ffd2ea40a3ae71db14b26307fce92e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164685
Tested-by: Jenkins
|
|
SfxHintPoster::mLink always pointed to SfxDispatcher::PostMsgHandler and
except in ~SfxDispatcher, it was reinitialized to empty i.e. cleared.
This extra indirection is now removed.
SfxHintPoster was using SvRefBase to persist even after SfxDispatcher
was deleted and then deleted itself after SfxHintPoster::Post call was
completed. This extra indirection was adding 4-5 frames while debugging.
Change-Id: Ibfd6d3aea10ddf45732adc1a9d63a25717a771fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162700
Tested-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
|
|
using the bin/find-can-be-private-symbols.py script
to find classes with large numbers of exported symbols
that can hidden.
before
exported = 58104
imported = 30810
unused_exports = 35433
after
exported = 55094
imported = 31073
unused_exports = 32423
Change-Id: Idd0a70ee3740afd5ca1a86771e0e2ff8090d102d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163456
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I51585f1c15984a066262023184f668662853d20f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163556
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
|
|
in that it is not used.
SfxDispatcher: :SetMenu_Impl is 3.1% of long-profiling use
Change-Id: I07bf0f130791795a49835e91ac8b8c5bec749f33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163102
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: Ife51f47d95e286e0fec165882377c31b1a664241
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163058
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Iced31da6891a5d218d63e9b59d48fb2645f39203
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163071
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Sorted out some methods at ItemPool which process
Defaults to make more clear what is going on and
what which method is doing.
Change-Id: I2568d3e03d0a56a14b6fe4e04521e1a8e22c000b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162643
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
|
|
An instance of SfxVoidItem(0) was used to signal
the SfxItemState::DISABLED. This was done not only
using WhichID == 0, but using isVoidItem() at the
SfxPoolItem. Unfortunately this mixes up with usages
of SfxVoidItems, mostly for UI stuff/Slots.
This also means that all the time an SfxVoidItem
had to be cloned/delete when when added/removed
from ItemSet or ItemHolder. Much more action than
e.g. for INVALID_POOL_ITEM which we already use
by havong just a simple ptr to a single static
instance of an Item. Disabled should do the same
thing.
Unfortunately also the functionality was mixed
with non-SfxItemState::DISABLED purposes and these
were very hard to be separated.
But the current solution works now after some
quirks doing that. It even oes no more need the
isVoidItem() flag at the SfxPoolItem.
Change-Id: I99f03db144f541ae4ea35f3775b3b3d58a375a81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162414
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
|
|
Change-Id: I990482890a3b6a8c799e49ba104d997ed74fdbe2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162250
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
|
|
The ::Put methods at SfxItemSet had an extra WhichID
parameter that was not really documented, but I would
guess often asked why it exists: An extra WhichID, just
called 'nWhich' (which makes things NOT clearer). That
is 'strange' since the Item given to be put already
internally has a WhichID, so why a 2nd one?
If you were really interested and read all that code
(no, no comments on that anywhere) you might know
that this a kind of 'Target-WhichID' under which
the Item shall be put to the ItemSet. Since this
is unclear for most people it is even dangerous and
explains why so many code places just hand over the
WhichID requsted from the Item that already gets
handed over.
To make it short: I removed that. For the 19 places
where this was really needed I added a new method
besides ::Put called ::PutAsTargetWhich that takes that
extra WhichID (now called TargetWhich) and takes the
needed actions. These are quite some because that may
be combined with the bPassingOwnership flag, see new
SfxItemSet::PutImplAsTargetWhich method.
This makes usage of ItemSets/Items less dangerous. It
also simplifies and thus makes safer the central helpers
implCreateItemEntry/implCleanupItemEntry which have some
less cases to handle.
Debugged the failing UnitTests showed that there is
an incarnate Item != SfxVoidItem that causes problems.
I checked for errors in the change, but no luck.
Afterr some time I found out that a ::Clone
implementation caused the problem: These need to
also copy the WichID of the original, but the
SfxFrameItem failed to do so. This did not cause
problems in the former version because
implCreateItemEntry was designed to set a missing/
different WhichID.
I corrected that in SfxFrameItem, also removed not
needed costructor that caused that. Also added a
SAL_WARN and a correction in implCreateItemEntry.
I could have added an assert (did so for running
local UnitTests), but should be enough.
NOTE: When hunting for Items except SfxVoidItem
that get crerated using a WhichID '0' i learned
that this indeed happens: There are some (5) calls
to SfxRequest::SetReturnValue that incarnate an
SfxBoolItem with WhichID '0' (ZERO). This is not
good and I think about how to change that...
Change-Id: I9854a14cdc42d1cc19c7b9df65ce74147d680825
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162124
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
|
|
Create two Calc views, set the first view language to English, second
view language to German. Type in the English view, double-click on a
chart in the German view. The sidebar in the German view will have
English strings in it. This doesn't happen if there is no typing right
after the chart activation in the English view.
What happens is that the sidebar update is async, and
sfx2::sidebar::SidebarController::notifyContextChangeEvent() gets
called, which registers an aync event when it calls
AsynchronousCall::RequestCall(). Then later this job gets scheduled, but
possibly by that time the active view is the English one, leading to
English strings when chart::ColumnChartDialogController::getName() calls
SchResId(), which works from the language of the current view.
Fix the problem similar to what commit
fb7b0b944741e4efae8d92a6e305036aff906c7a (cool#7492 sfx2 lok: just set
language/locale on async binding update, 2024-01-09), did: set the
language/locale from the current view before executing the async job and
restore the old value once we're done.
Extract the now duplicated code to a new SfxLokLanguageGuard, so in case
more places have a problem with incorrect l10n, then it's meant to be a
one-liner to fix further places.
Change-Id: I52724a24d93fb753175a3b9b99bc33178519d981
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161920
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
Trying to run online.git tests against commit
51d8a2ef54751403fa707816e27ddb4e7faa8231 (cool#7492 sfx2 lok: fix bad
view id / statusbar string on async binding update, 2024-01-08),
unit-tiletest failed.
Manually trying to replace what the
testSimultaneousTilesRenderedJustOnce test in that suite tries to do, it
turned out that it can happen that the bindings are updated when a
Writer view gets its focus, which is a problem, because the above commit
started to switch views on binding updates, leading to a loop (bindings
are updated about every second).
Fix the problem by doing less work in SfxBindings::NextJob(): it's
enough if the timer just switches languages and not views. That still
keeps the Calc statusbar problem fixed from the above commit, but avoids
the problematic view switching that broke unit-tiletest.
Change-Id: I22cd9b3276c3f9987a2d90ad93f6026fdf6b8448
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161792
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
With two Calc views (first is an English one, second is a German one),
type in the English view and in parallel to that, create a cell
selection in the German view. Sometimes the status bar update about the
selected cells arrives in English, in the German view.
The root of the problem is that SfxBindings has a timer that does the
expensive update of all the UNO commands only after a delay, but by the
time this timer runs, possibly the current view is no longer the German
one, which leads to English strings in the German view.
Fix the problem somewhat similar to what commit
ee7ca8e4ea8ed93655f99e77a9e77032ac830c46 (cool#7865 sfx2 lok: fix bad
view id on async command dispatch, 2023-12-20) did in
SfxHintPoster::DoEvent_Impl() by restoring the original view for the
duration of the timer job execution.
The test works even in case '--with-lang=en-US de' is not used, because
it asserts the locale, which is not downgraded to English when
translations are not available. This required turning the payload of the
.uno:RowColSelCount status update into JSON, which is meant to be mostly
backwards-compatible, given that we already have a mix of plain text and
JSON for the various UNO commands. Another trouble is that the
SfxBindings lazy update is a timer, so processing idles won't help and
sleeping in test code is not ideal, either. Solve that by exposing the
timer of SfxBindings, so test code can explicitly invoke the timer
without waiting.
Change-Id: Iacf17f81c28b95ce41a0ee29ad25eb576db0d62a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161691
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
and try something a bit more generic
Change-Id: I1d8256576cd02f0a589df350ba7b53059dd586a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161250
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
...and adapted code to make use of it. This makes checking if
the SfxPoolItemHolder instance contains an Item or not simpler
and thus more readable, no need to access the Item* every time
using getItem() - is okay, but not intuitive.
Change-Id: I8042267cce670aca2641a91cd36285058f17ffbb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161380
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
|