Age | Commit message (Collapse) | Author |
|
Change-Id: Iea7feb1dc196932b888b7b57c0ae297b5c1dd52f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163888
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
|
|
Change-Id: I4d15f9f31c782ffd2b6f4c5decc3ba3e4891f41b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163873
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
|
|
* adding an option button to slideshow settings dlg
* switch from env var to officecfg
Change-Id: I9713fde374b04264947daaab73759eb585c4a3f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163851
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
|
|
Change-Id: I7f6aad0ec12de3c3b2677f1ca07e8efd5a881982
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163797
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
|
|
Change-Id: Ica5e5e95f99f30a59b91cd1243ac3ec401e6e94d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163728
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
|
|
Change-Id: Ibc6e8a3f126c443453c5ecab52ba988a4f4f56e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159288
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
|
|
after I missed a bunch of stuff when testing UBSan with
commit 3ba92b5f1eaf7d4447a0943ea260db515ca799dc
hide more symbols
Change-Id: Id3cb0b70b9fa24c7e3fba7fd565eb658dafa00f8
Change-Id: I369587ed3e14e50ca272037b9d950b62841695d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163703
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Iffccf2c7fe37845f9da44fd911cf974db026af89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163697
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
|
|
so we are already in the desired theme from the start
Change-Id: Ibaaf647612a0a61ce74fa4e4272d7084868a6ea3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163650
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163686
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
There are many ways the SlideShow may be stopped,
but with IASS mode less are needed. Identified
quite some and added needed code.
Also added that for setting transitions or adding
an effect to an Object when the SlideShow is up
(the FullScreen one, makes no sense in-place)
the Preview for that is show in the running
SlideShow by switching to it, showing, and back.
So this is used in this mode as a permanent
preview for those changes.
Change-Id: I5cc34e230358aecad30fec8aee05acfa937f9270
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163669
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
|
|
ever since
5cc45f148dac2080d5cdc2d69db539d55b1ff816
no need to dynamically ImportCGM symbol
Change-Id: I0d55a57b46fffbeb650ca0b88170372160e1ecf3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163631
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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>
|
|
The idea is a long wanted feature, to allow the
EditView to stay active during a running Presentation
so that you can do changes which then directly show
up in the running presentation. This will need quite
some steps. To be on the safe side all of the changes
are isolated by a variable to cause no harm. For
now this uses ENVVAR ENABLE_INTERACTIVE_SLIDESHOW,
but that may change e.g. as config entry or option.
Change-Id: Id0ab9a473603225456206fbd933e932248681509
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163514
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
|
|
when no arguments are supplied
Change-Id: I245aa0f6b212e049dce6bdf9e079495119aeadbb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163208
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
|
|
This reverts commit 2cf7c26293462406d91ee050c6677930065e660b.
Reason for revert:
<_rene_> noelgrandin: sdui->sd... and what about people not needing that ui?
<_rene_> (e.g. --disable-gui and libreoffice-draw-nogui and impress-nogui)
<_rene_> i.e. the use case of --convert-to for ppt(x) etc
Change-Id: I6755c209e63f34b3fc9f9fdc4af7001b18579e8b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163348
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
which eliminates another dynamic-symbol lookup and another complication
which was making it harder to do better with --enable-mergedlibs
sd is relatively small, so even the combined library is not as big as
one of the sw and sc libraries
Change-Id: Ibef8077d70a5abc7361c95f5dbb8c43447610188
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163302
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Id5e35e1514695bffeced718d48dcfeffc4a4d4d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163250
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
Icons taken from https://thenounproject.com/icon/lock-89649/ and
https://thenounproject.com/icon/unlock-89647/ (licensed PD)
Change-Id: I7efd25e83726ced7dee4f876cf4bb4c8f54408df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160460
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
|
|
Driving forward the Item reworks I now take the
ItemPool in focus: It now does not hold any items
anymore and should be renamed to something like
ItemInfoProvider/ItemHelper, since it's main purpose
is to provide the Defaults for the Item functionality.
There is that SfxItemInfo, only a struct and bundling
SlotID and ItemFlags. There are also the DefaultItems,
just handled as ptrs in an array. It is/was always
error-prone to keep these in sync. Remember that it's
also necessary for the order to not only being sorted
but being increments of one with no gaps allowed in
the WhichIDs to which the Items are bound.
I now bundled that to a new class ItemInfo that joins
WhichID, SlotID, ItemFlags and the default Item. This
is a pure virtual base class, it comes in three
derivations:
(1) ItemInfoStatic:
This is supposed to be global static and hosts the
Item in a std::unique_ptr to ensure cleanup. It is
designed to be constructed once during runtime and
being shared globally. It allows the ItemPtr to be
nullptr to mark as non-static (if initial static is
not possible for some reason) but still offers the
needed data. Most cases (95%+) are of that case.
The contained Item is owned by that instance. The
flag isStaticDefault() is set at the Item.
(2) ItemInfoDynamic:
This is supposed to be used for cases where the Item
cannot be static: Mainly for SfxSetItem (that needs
a Pool itself in the contained SfxItemSet, so lifetime
is bound to that Pool), but other cases showed up in
the transition. These instances live while the Pool
lives and get destructed when the Pool goes down.
Also uses std::unique_ptr for the Item instance for
as much automated cleanup as possible, the contained
Item is owned by that instance, the instance by the
Pool. The flag isDynamicDefault() is set at the Item.
(3) ItemInfoUser:
This is used for UserDefaults that can be set for
every ItemInfo entry to 'overshadow' the default
from the 'outside'. It uses a regular Item and
the central access methods implCreateItemEntry/
implCleanupItemEntry to manage the Item instance,
thus works like a SfxPoolItemHolder. The Item
instance can be globally shared and re-used even
when the Pool goes down. Instances belong to the
Pool and are cleaned up when the Pool goes down.
This Item does not need any further flag to be
set.
The ItemInfos are organized using a class
called ItemInfoPackage:
This bundles groups of ItemInfoStatic to
functional instances. There are derivations/
implementations of this e.g. for Writer ItemPool
bundling all the needed defaults for Writer,
similar for draw/impress, Calc and other usages.
These ItemInfoPackage can be 'registered' at an
ItemPool using it's method registerItemInfoPackage.
This does all the needed stuff to setup that
group of ItemInfos at the Pool (It even sets
internal vars First/LastWhich, that info can just
be derived from the buildup ItemInfo Ptrs).
The ItemInfoPackage has methods 'size()' and
'getItemInfo(index) to allow looping over it
and deliver the infos the Pool needs. The
(forced, pure virtual) overloads of getItemInfo
in the specific implementations check for the
ItemPtr being nullptr and create a exclusive
incarnation of ItemInfoDynamic for the Pool if
needed, returning that. The Pool owns the
ItemInfoDynamic incarnations and uses the
ItemInfoStatic directly. On shutdown it cleans
up the ItemInfoDynamic as needed.
The ItemInfoUser is used by the Pool when a
UserDefault is set/used: for SetUserDefaultItem,
GetUserDefaultItem, ResetUserDefaultItem. It
is not held in a 2nd list, but directly in the
list of ItemInfo'ptrs: To keep track of this
an unordered_map is used that helds the original
ItemInfo associated with the WhichID. That way
no two lookups (as before) are needed to get the
current Pool's default for any WhichID.
The derivations of ItemInfoPackage are
encapsulated and just allow access to an
ItemInfoPackage& with a single method as
return value. All use a static local instance
of a std::array<ItemInfoStatic, FIXED_SIZE>
which constructs all ItemInfoStatic and the
static Item instances - if already possible.
Sometimes it is necessary to overload the
constructor to set some static instances
for Items later than the lib init. These are
also just marked with nullptr as Item instance.
Some need to overload getItemInfo to complete
instances of ItemInfoStatic, if needed, or
create and deliver instances of ItemInfoDynamic.
The registerItemInfoPackage also offers a
optional lambda callback: there were two cases
where local data from the Pool was needed to
incarnate the item - just add that to the
call to registerItemInfoPackage if needed,
see examples in the adapted code.
For the re-use of Items this means that now
in SfxItemSet/SfxPoolItemHolder *true* static
Items can and will be used without RefCount
directly and globally. This is also the case
for dynamic Items, with the exception of
differing Pools for SfxSetItems which cannot
be done.
Future:
That design is already prepared to allow
solving that Pool-chaining problem: currently
there are master/sub-pools and all accesses
have to traverse that structure before even
doing anything.
For the future the idea is more to 'compose'
a Pool by registering ItemInfoPackages, e.g.
for Writer pool you may start with SfxItemPool,
register the writer-specific ItemInfoPackage,
then the one for DrawingLayer (if needed) and
the one for EditEngine.
It should also be possible to get to smaller
granularities of that packages. Ideas for
new ones will emerge. We might also think
about composing Pools which can e.g. run Writer
and Chart, so allowing to use Chart *without*
OLE stuff in Writer - just ideas...
More changes:
- Adapted all stuff, cleaned up old stuff/
definitions
- Removed FreezeIdRanges, that can be done
once per Pool on-demand (and cannot be
forgotten to be called)
- Merged XOutdevItemPool with SdrItemPool
and offered a ItemInfoPackage which joins
both needed sets of Items
- All the cleanup hassle with Pools and
defaults cleaned up
- Adapted all access methods of the pool
to use that new stuff. Pool chaining
currently stays, but I use a central
method 'getTargetPool' instead of
recursive calling to get the correct
Pool for the action
Change-Id: I2b8d3d4c3cc80b1d0d0b3c0f4bd90d7656b4bab7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163157
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
|
|
Adds a goto page/slide dialog for Impress and Draw similar to Writer.
To avoid duplicating code and ui, the dialog is created in svx/ and used in other modules.
The old goto dialog in Writer has now been replaced with this dialog.
Change-Id: I28f819f0d0734fb2bb08a7b99a628217ef66dba9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162913
Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
|
|
Copies list type and list level from source to target paragraph(s).
Also switches off lists, if source is not in a list.
Change-Id: I260f1d7d9936476f16c355a3a09204b3fb4592d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163054
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
|
|
Makes the new last page in the document be the page switched to after a
page delete of the last page in the document. Before the patch, when
the draw view has focus (not the slide sorter), deleting the last page
in the document results in a switch to the first page.
Change-Id: I8d3904e85254228e01d423f15312981d11fc9755
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159963
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
|
|
Also relayout the text
Change-Id: Id774c5a5089e1c031ae705e6b23281e882b6739f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162995
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
|
|
remove CUI_DLLPUBLIC from stuff which is not exported
then drop the cui/include dir which is then empty and
the places we link to cui where we now don't need to
and restore cui back to a lib containing stuff that
doesn't need to be explictly linked to in keeping
with original #i106421# idea
Change-Id: I21894e6f8529dd3306df345fb52dbf5009015f3c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162798
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
the point of cui was to have no headers, so move this
SvxNumberingPreview out of cui and into svx
Change-Id: I83edbcdc8d8b95dbea734bdef4a93f6ec8ee50e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162748
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Add .uno:NumberFormatCurrency item to .ui
Use weld:: way of widgets creation so we can inject
jsdialog code and popup will be correctly registered.
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ib57e1cad617ca5c7198d67e107441ba062580f06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162623
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162710
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
and
cid#1588087 COPY_INSTEAD_OF_MOVE
cid#1588085 COPY_INSTEAD_OF_MOVE
cid#1588084 COPY_INSTEAD_OF_MOVE
cid#1588083 COPY_INSTEAD_OF_MOVE
cid#1588082 COPY_INSTEAD_OF_MOVE
cid#1588081 COPY_INSTEAD_OF_MOVE
cid#1588080 COPY_INSTEAD_OF_MOVE
cid#1588079 COPY_INSTEAD_OF_MOVE
cid#1588078 COPY_INSTEAD_OF_MOVE
cid#1588077 COPY_INSTEAD_OF_MOVE
cid#1588076 COPY_INSTEAD_OF_MOVE
cid#1588073 COPY_INSTEAD_OF_MOVE
Change-Id: Ibd0fc37ed1f93e0c092e0ce2ef04b28b4df4bccf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162665
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: Ifc8721f50f359669af501c91bc86d6a983785f9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162663
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
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>
|
|
Obsoleted by commit 2484de6728bd11bb7949003d112f1ece2223c7a1 (Remove
non-const Sequence::begin()/end() in internal code, 2021-10-15) and
commit fb3c04bd1930eedacd406874e1a285d62bbf27d9 (Drop non-const
Sequence::operator[] in internal code, 2021-11-05).
Change-Id: Idbafef5d34c0d4771cbbf75b9db9712e504164cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162640
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Icb6c2fafe2b47989ff2692956890c87780b117e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162552
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ic24b2b935f1d539cf257194d136d901b52e00a84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162433
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I09ce07f7b520688aa54dd30107b5ab2218b12894
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156277
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 62804da3c0ab9443cf36f2e02387a2e9c272d5dc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162463
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I05ef274dd0ad5dc35b5455cfc01feabc6c0820a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161276
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
|
|
Change-Id: I49a1ff800c6b5fcee69e160158a089659d288bdc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162422
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I067d682ade01671d7aa347a492929ae4f92064b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162421
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I239d8d344ed3152586567c6e1d9b529ba75925dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162418
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I26ec71ab5b00545a2e173dd4cc3dcd49d79c2fa7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162417
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Icf81810297dc5767cedd051cf8ccdfbb101f35ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162395
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ia5869788ccefcd17ef561bafb41da6f0d48fd54d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162394
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I222240dc1715604ad1e82e1062b34d116b2840f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162367
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
to look like getters elsewhere, which compose better
Change-Id: I23277910d3fb3c08fa6e839f0fbec010915e951a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162362
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
when the PPTX file only has table style id, but no table style content.
Change-Id: Ia3416478716a50beb6837988e98697fd88e916d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162368
Tested-by: Jenkins
Reviewed-by: Nagy Tibor <tibor.nagy.extern@allotropia.de>
|
|
{Imp}EditView always needs to have EditEngine set (or it would
crash otherwise), so we can change the getter to return a referece
instead of a pointer. This simplifies things a bit because we get
rid of all the nullptr checks and makes the interface more clear.
Also change direct access to mpEditEngine in {Imp}EditView to use
getEditEngine() and getImpEditEngine() (returning a reference)
instead.
Change-Id: Ib8f9c565b8364144bb9c35c3093c4975af1970c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162333
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
ItemSurrogates are a possibility to iterate over
all SfxPoolItems associated with a WhichID at a
ItemPool to collect or change data.
It is in general not a good idea: the correct action
would be to iterate over the model data and change/
adapt/collect data on the Items of the type
in question. This is because the *assumtion* that you
iteate over all the Items associated with a document
model is *not* correct:
The ItemPool of the model is used for various ItemSets,
e.g. Dialogs/Sidebar and others, so you might get Items
not only from the DocumentModel but from elsewhere.
You might even get Items from *other* models, so
changing these might have unpredictable effects (!)
It is clear to me that this mechanism is more convenient
that iterating over the document models, and it might
have been invented due to this and then used in more
and maore cases. There should be a lambda/callback-based
mechanism in every document model to do this. Until then
we have to live with this 'compromize'. There are over
100 usages currrently, so no way to easily replace this.
For those reasons I changed this to be more safe: There
are two methods to do this now:
1: iterateItemSurrogates to allow read/write access. I
identified six places where that mechanism was used
to change SfxPoolItems, with the use of const_cast.
This now offers a lambda/callback mechanism and the
needed data in a helper (SurrogateData). Internally
it iterates over ItemSets and ItmHolders registered
and thus associated with the Pool. Changing an Item
means to set a changed Item at the Pool/replace the
holder.
2: GetItemSurrogates/FindItemSurrogate to allow
read-only iteration (2nd one with filter). This
collects the Items in a vector that you provide over
which you can then iterate. Do *not* use const_cast
and change the Item when using this (!)
Note that mechanism (2) pe-filters the Items so that
you get each only once: Of couse one Item can be set
in more than one ItemSet/Holder (but also in more than
one model). This filtering is not possible for (1), you
have to evtl. do the same replace action for the same
item, but this is the only way to not change Items that
are associated wth another model.
Note that (2) could also be changed to a lambda/callback
mechanism similar to (1), but there are too many places
that would beed to be adapted. That would have the
advantage to not need to pre-collect the candidates in a
first run.
Also removed/replaced FindItemSurrogate with using
GetItemSurrogates and locally filtering with that needle.
That also made me remove/cleanup CollectSurrogates, it's
only used in one place now.
Change-Id: I0fe2f51f4fca45e1e5aea032cb96bb77b4567f4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162254
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
|
|
It is used in readonly mode.
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I428d4923ab89dbcf6df237c68ae792753c1edf13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162201
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
(cherry picked from commit 876543305c78cb596720da087454a5c54e5feb06)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162222
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Importing the text marks the object as not empty. Then, the object would
behave as an outliner object. This includes showing in slide show; allowing
text esiting; stretching the placeholder image, which required a workaround
implemented in commit 7b3be7f6f3d800e2ad86f5a043e6e9b21ed4409f (tdf#140912
Better handling of the picture placeholders, 2021-12-01).
Instead, drop the custom prompt. More correct solution would be making sure
to mark the object as empty after setting the text; but this doesn't round-
trip to ODF; and it crashes export to PPTX. Proper support for the sustom
placeholder prompt feature should be done separately.
The new workaround (dropping the text) makes previous workaround (special
handling of the placeholder graphic) unnecessary. The unit test is updated.
Change-Id: Ic7f42493af8d1d725ffa39ffab58f1ff033351cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162202
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I3d23186045c17006e50d9ef48bc26df3c79d28b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162052
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
|
|
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>
|