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.
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.
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.
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
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