df-libreoffice:feature/item_refactor2

Last commit made on 2019-06-03
Get this branch:
git clone -b feature/item_refactor2 https://git.launchpad.net/df-libreoffice
Members of The Document Foundation can upload to this branch. Log in for directions.

Branch merges

Branch information

Name:
feature/item_refactor2
Repository:
lp:df-libreoffice

Recent commits

6c2f575... by Armin Le Grand <email address hidden>

WIP: Use ItemControlBlock as TypeInfo

Removed last big change to have a global static
ItemControlBlock registry. Thought about things
and what is needed/wanted is RTTI for the Items.
Instead of using typeid(T).hash_code() it is
equally possible to use the ItemControlBlock of
each Item - it exists once as global static
instance. So use it's address. That way e.g. the
ItemSet holding it *will* hjave a direct reference
to the ItemControlBlock, so no need for a global
registration.
Checked, tested, adapted, works.

Change-Id: I4c9b6bfe4ba6858b234238d6125793378574af87

203d0f0... by Armin Le Grand <email address hidden>

WIP: Discussion methods at ItemBase

Isloated quite some funcs in code to deep-dive
functionality, commented quite some how to refactor
these.

Change-Id: Ie8808de6bc096449186af86d8a578269911890c1

d349e2f... by Armin Le Grand <email address hidden>

WIP: Added global registry for ItemControlBlock

Went back from the solution of Invaldate/DisableItem
from using a member to hold the Default again. Basic
problem is to get from having the hash_code of an
Item (typeid(T).hash_code()) to an incarnation, e.g.
the global Item's default value.
I thought about a globally registered aspect of
the new Items already quite a while, so the step is
not far. ItemControlBlock is anyways the 'static'
part of each Item derivation. Adding the hash_code
and automatically register/deregister this static
part of Item to a static global list is all that is
needed. It would also be possible to use the already
added/prepared name of each Item, btw.
Returned to a single existing static incarnation of
the exception-Items, isolated in the ItemSet cxx.
Also unified the ItemSet-Default requester due to
possible ItemSet-local defaults.

Change-Id: I14c2923958d92f945ff833e184beeaf6b0e85207

8471a84... by Armin Le Grand <email address hidden>

WIP: Deeper adaptions to SfxItemSet/Item::ItemSet

To get forward I added more functionality to the used
combination of SfxItemSet and Item::ItemSet.

Changed internal state holding of Invalidate and Disable
states. No longer using a single static instance of
specialized Item:: derivations (exclusively and ilsolated
in cxx impl parts of ::ItemSet), but incarnating these.
Advantage is to have the ItemDefault stored with these
and thus to have something to return when these Items
are in that state.
To do so, added small boolean virtual functions to iidentify,
added descriptions how/why they are there.
Added methods to ItemSet to get all Items or all in a special
state, see header. Due to change above this can now come
with ItemDefaults added as fallbacks.
Added dumpAsXml plunged to where it is called from SfxItemSet
currently to have that functional.
Checked current SfxItemIter and commented there due to hard
problems there, see comments.
Added support for SetParent, forwarding to Item::ItemSet now
to get that functional, too.
Extended test for new functions.

Change-Id: Ifb043a893bcef9e176a317801acbd848d5443122

61e538c... by Armin Le Grand <email address hidden>

WIP: Change Item class for rtl::OUString to shared

Checked in debugger if nowadays rtl::OUString is shared
at runtime office-wide, but that is not the case. Thus
adapted the basic Item:: class for all rtl::OUString
based Itens to use ItemBuffered and to share the instances
of strings. That will in the future be office-wide during
runtime and for all derived classes

Change-Id: Iaebadc9f15edc94c5f156721b0defce15fbc2713

144ae85... by Armin Le Grand <email address hidden>

WIP: Continued Item stuff changes

Checked what else is needed at the ItemBase stuff,
checked and added getPresentation, scaleMetrics,
query/putValue stuff and dunmAsXml, made quite some
notes about it. Added basiic functionality to basic
sal_Int16 and OUString-Items, also made these tooling
base classes as preparation for type-safe simple
derivations.

Deep check of defaults at currentItemPool, two (static
and default) are used, adapted ModelSpecificItemValues
and added quite some comments about findings. This is
highly copmplex calling stuff, esp. MapMode usages due
to the apps using different basic MapModes what is not
represented in the items - these have no unit.

Adapted tests accordingly - test implementations/derivations
of basic Item implementations used now

Change-Id: Ieac1ef2c62b0bfae97753b15bd8bd61803c8906c

974feb2... by Armin Le Grand <email address hidden>

WIP: Stabilizing/simplifying clone()

Added clone() functionality to ItemControlBlock,
makes it safer and less error-prone in terms of
forgetting to overload correctly.

Added make_unique to have more alternatives for
changing local data in case of BufferedItem.

Added clone() for ItemData to ItemAdministrator.

Added quite some comments, too. Adapted examples in
TestCases, adapted all current implementations

Change-Id: Ia5aaafed700a3a003d8049fbb5978291235c6263

792c0ba... by Armin Le Grand <email address hidden>

WIP: Small error in SfxStateCache fixed

Change-Id: I3f753e202294c886580b6b0c48bf6c7bb8ec6361

4b0409c... by Armin Le Grand <email address hidden>

WIP: Linux build changes

Change-Id: I3ea79f9a48f626681604e871143c0adec7c0cb7a

6f72ff9... by Armin Le Grand <email address hidden>

WIP: Re-simplified StateChanged interface

Added rebase correctiojns

Change-Id: Ib0aa5e964fe1bb9365cd1f9d4fffe448134663cb