[Libreoffice-commits] core.git: Branch 'feature/item_refactor2' - basctl/source include/item item/source item/test svx/source
Armin Le Grand (via logerrit)
logerrit at kemper.freedesktop.org
Tue May 21 15:42:19 UTC 2019
basctl/source/basicide/sbxitem.cxx | 1
include/item/base/ItemBase.hxx | 9 --
include/item/base/ItemControlBlock.hxx | 19 ++++
include/item/base/ItemSet.hxx | 24 ++---
item/source/base/ItemBase.cxx | 10 --
item/source/base/ItemControlBlock.cxx | 61 ++++++++++++--
item/source/base/ItemSet.cxx | 142 ++++++++++++++++-----------------
item/test/ItemTest.cxx | 10 ++
svx/source/items/TransformAnchor.cxx | 1
9 files changed, 167 insertions(+), 110 deletions(-)
New commits:
commit d349e2f8acab44c26f803215369a6b64de5b121f
Author: Armin Le Grand <Armin.Le.Grand at me.com>
AuthorDate: Tue May 21 17:34:23 2019 +0200
Commit: Armin Le Grand <Armin.Le.Grand at me.com>
CommitDate: Tue May 21 17:34:23 2019 +0200
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
diff --git a/basctl/source/basicide/sbxitem.cxx b/basctl/source/basicide/sbxitem.cxx
index 3618bcb5d8b8..b8488d3e04d8 100644
--- a/basctl/source/basicide/sbxitem.cxx
+++ b/basctl/source/basicide/sbxitem.cxx
@@ -32,6 +32,7 @@ namespace Item
static ::Item::ItemControlBlock aItemControlBlock(
[](){ return new Sbx(ScriptDocument::getApplicationScriptDocument()); },
[](const ItemBase& rRef){ return new Sbx(static_cast<const Sbx&>(rRef)); },
+ typeid(Sbx).hash_code(),
"Sbx");
return aItemControlBlock;
diff --git a/include/item/base/ItemBase.hxx b/include/item/base/ItemBase.hxx
index 34901af80d72..d099bb4a93ea 100644
--- a/include/item/base/ItemBase.hxx
+++ b/include/item/base/ItemBase.hxx
@@ -95,15 +95,6 @@ namespace Item
// mechanism (UNO API and sfx2 stuff)
bool putAnyValues(const AnyIDArgs& rArgs);
- // fast identifyer for invalidate/disable state extra-Items,
- // only to be used internally for ItemSet stuff. This could be
- // done using dynamic_cast, but is faster this way. This could
- // be private or protected, but would require ItemSet to be
- // declared as friend then. May be changed, but for now, use as
- // simple public virtual bool methods
- virtual bool isInvalidateItem() const;
- virtual bool isDisableItem() const;
-
private:
// local reference to instance of ItemControlBlock for this
// incarnation - same as type::GetStaticItemControlBlock(), but
diff --git a/include/item/base/ItemControlBlock.hxx b/include/item/base/ItemControlBlock.hxx
index cb55bd7f6581..0b9e5a03069b 100755
--- a/include/item/base/ItemControlBlock.hxx
+++ b/include/item/base/ItemControlBlock.hxx
@@ -38,14 +38,19 @@ namespace Item
std::unique_ptr<const ItemBase> m_aDefaultItem;
std::function<ItemBase*()> m_aConstructDefaultItem;
std::function<ItemBase*(const ItemBase&)> m_aCloneItem;
+ size_t m_aHashCode;
OUString m_aName;
+ // EmptyItemControlBlock: default constructor *only* for internal use
+ ItemControlBlock();
+
public:
ItemControlBlock(
std::function<ItemBase*()>aConstructDefaultItem,
std::function<ItemBase*(const ItemBase&)>aCloneItem,
+ size_t aHashCode,
const OUString& rName);
- ItemControlBlock();
+ ~ItemControlBlock();
const ItemBase& getDefault() const;
bool isDefault(const ItemBase& rItem) const;
@@ -55,11 +60,23 @@ namespace Item
return m_aName;
}
+ size_t getHashCode() const
+ {
+ return m_aHashCode;
+ }
+
// clone-op, secured by returning a std::unique_ptr to make
// explicit the ownership you get when calling this
std::unique_ptr<ItemBase> clone(const ItemBase&) const;
std::unique_ptr<const ItemBase> createFromAny(const ItemBase::AnyIDArgs& rArgs);
+
+ // static access to registered ItemControlBlocks
+ static ItemControlBlock* getItemControlBlock(size_t HashCode);
+ template< typename TItem > ItemControlBlock* getItemControlBlock()
+ {
+ return getItemControlBlock(typeid(TItem).HashCode());
+ }
};
} // end of namespace Item
diff --git a/include/item/base/ItemSet.hxx b/include/item/base/ItemSet.hxx
index 785b78099779..e78d8a55565f 100644
--- a/include/item/base/ItemSet.hxx
+++ b/include/item/base/ItemSet.hxx
@@ -221,9 +221,11 @@ namespace Item
// helpers for reduction of template member implementations,
// all based on typeid(<type>).hash_code()
const ItemBase* implGetStateAndItem(size_t hash_code, IState& rIState, bool bSearchParent) const;
- void implInvalidateItem(size_t hash_code, const ItemBase& rItemDefault);
- void implDisableItem(size_t hash_code, const ItemBase& rItemDefault);
+ void implInvalidateItem(size_t hash_code);
+ void implDisableItem(size_t hash_code);
bool implClearItem(size_t hash_code);
+ // ...or a given default
+ const ItemBase& implGetDefault(const ItemBase& rCurrent) const;
protected:
// constructor - protected BY DEFAULT - do NOT CHANGE (!)
@@ -262,27 +264,19 @@ namespace Item
// on the fetched TypeID
template< typename TItem > void invalidateItem()
{
- implInvalidateItem(typeid(TItem).hash_code(), Item::getDefault<TItem>());
+ implInvalidateItem(typeid(TItem).hash_code());
}
template< typename TItem > void disableItem()
{
- implDisableItem(typeid(TItem).hash_code(), Item::getDefault<TItem>());
+ implDisableItem(typeid(TItem).hash_code());
}
template< typename TItem > const TItem& getDefault() const
{
- // get static available default as instance
- const TItem& rStaticDefault(Item::getDefault<TItem>());
-
- if(m_aModelSpecificIValues)
- {
- // may use model-specific default, get from helper
- // helper *will* fallback to ItemBase default
- return static_cast<const TItem&>(m_aModelSpecificIValues->getDefault(rStaticDefault));
- }
-
- return rStaticDefault;
+ return static_cast<const TItem&>(
+ implGetDefault(
+ Item::getDefault<TItem>()));
}
template< typename TItem > StateAndItem<TItem> getStateAndItem(bool bSearchParent = true) const
diff --git a/item/source/base/ItemBase.cxx b/item/source/base/ItemBase.cxx
index 7ef54fc11c50..1b6175c7f44e 100644
--- a/item/source/base/ItemBase.cxx
+++ b/item/source/base/ItemBase.cxx
@@ -103,16 +103,6 @@ namespace Item
return true;
}
- bool ItemBase::isInvalidateItem() const
- {
- return false;
- }
-
- bool ItemBase::isDisableItem() const
- {
- return false;
- }
-
bool ItemBase::putAnyValue(const css::uno::Any& /*rVal*/, sal_uInt8 /*nMemberId*/)
{
// default has nothing to to
diff --git a/item/source/base/ItemControlBlock.cxx b/item/source/base/ItemControlBlock.cxx
index d4df2a72cc9c..9d92e7ea8d67 100755
--- a/item/source/base/ItemControlBlock.cxx
+++ b/item/source/base/ItemControlBlock.cxx
@@ -15,25 +15,57 @@
namespace Item
{
+ std::unordered_map<size_t, ItemControlBlock*>& getRegisteredItemControlBlocks()
+ {
+ // all globally registered ItemControlBlocks
+ static std::unordered_map<size_t, ItemControlBlock*> aItemControlBlocks;
+ return aItemControlBlocks;
+ }
+
+ ItemControlBlock::ItemControlBlock()
+ : m_aDefaultItem(),
+ m_aConstructDefaultItem(),
+ m_aCloneItem(),
+ m_aHashCode(0),
+ m_aName()
+ {
+ // EmptyItemControlBlock: *only* for internal use, fallback for
+ // extra-Items like ImplInvalidateItem/ImplDisableItem
+ // Do *not* register this instance at aItemControlBlocks (!)
+ }
+
ItemControlBlock::ItemControlBlock(
std::function<ItemBase*()>aConstructDefaultItem,
std::function<ItemBase*(const ItemBase&)>aCloneItem,
+ size_t aHashCode,
const OUString& rName)
: m_aDefaultItem(),
m_aConstructDefaultItem(aConstructDefaultItem),
m_aCloneItem(aCloneItem),
+ m_aHashCode(aHashCode),
m_aName(rName)
{
assert(nullptr != m_aConstructDefaultItem && "nullptr not allowed, a Item-Constructor *is* required (!)");
- assert(nullptr != aCloneItem && "nullptr not allowed, a Item-Cclone lambda *is* required (!)");
+ assert(nullptr != aCloneItem && "nullptr not allowed, a Item-Clone lambda *is* required (!)");
+ assert(size_t(0) != m_aHashCode && "NULL hash_code not allowed, a Item-identifier (usually typeid(T).hash_code()) *is* required (!)");
+ assert(getRegisteredItemControlBlocks().find(m_aHashCode) == getRegisteredItemControlBlocks().end()
+ && "Constructed ItemControlBlock already globally registered - this hints to an error (!)");
+ // globally register new ItemControlBlock
+ getRegisteredItemControlBlocks()[m_aHashCode] = this;
}
- ItemControlBlock::ItemControlBlock()
- : m_aDefaultItem(),
- m_aConstructDefaultItem(),
- m_aCloneItem(),
- m_aName()
+ ItemControlBlock::~ItemControlBlock()
{
+ assert((0 == m_aHashCode || // is the EmptyItemControlBlock
+ getRegisteredItemControlBlocks().find(m_aHashCode) != getRegisteredItemControlBlocks().end()) // or has to exist
+ && "Destructed ItemControlBlock was not globally registered - this hints to an error (!)");
+ // since ItemControlBlocks themselves are static this can only happen when
+ // handling libs, e.g. lib shutdown and of course app shutdown. Nonetheless
+ // do this to avoid errors
+ if(0 != m_aHashCode) // do not forget default constructor -> EmptyItemControlBlock
+ {
+ getRegisteredItemControlBlocks().erase(getRegisteredItemControlBlocks().find(m_aHashCode));
+ }
}
const ItemBase& ItemControlBlock::getDefault() const
@@ -65,6 +97,23 @@ namespace Item
pNewInstance->putAnyValues(rArgs);
return std::unique_ptr<const ItemBase>(pNewInstance);
}
+
+ ItemControlBlock* ItemControlBlock::getItemControlBlock(size_t hash_code)
+ {
+ if(size_t(0) != hash_code)
+ {
+ std::unordered_map<size_t, ItemControlBlock*>& rBlocks(getRegisteredItemControlBlocks());
+ const auto aCandidate(rBlocks.find(hash_code));
+
+ if(aCandidate != rBlocks.end())
+ {
+ return aCandidate->second;
+ }
+ }
+
+ static ItemControlBlock aEmptyItemControlBlock;
+ return &aEmptyItemControlBlock;
+ }
} // end of namespace Item
///////////////////////////////////////////////////////////////////////////////
diff --git a/item/source/base/ItemSet.cxx b/item/source/base/ItemSet.cxx
index 554a46cfec07..8f972aaf96a2 100644
--- a/item/source/base/ItemSet.cxx
+++ b/item/source/base/ItemSet.cxx
@@ -15,59 +15,39 @@
namespace Item
{
- ItemControlBlock& getEmptyStaticItemControlBlock()
+ // single global static instance for helper class ImplInvalidateItem
+ static const ItemBase& getInvalidateItem()
{
- static ItemControlBlock aItemControlBlock;
- return aItemControlBlock;
- }
-
- // helper class for an ImplInvalidateItem - placeholder for InvaidateState
- // SfxItemState::DONTCARE -> IsInvalidItem -> pItem == INVALID_POOL_ITEM -> reinterpret_cast<SfxPoolItem*>(-1)
- // instances of this class are *never* returned in any way or helper data struture,
- // but are *strictly* local. Thus also need no 'static ItemControlBlock& GetStaticItemControlBlock()' (for now)
- class ImplInvalidateItem : public ItemBase
- {
- private:
- const ItemBase& m_rItemDefault;
-
- public:
- ImplInvalidateItem(const ItemBase& rItemDefault)
- : ItemBase(getEmptyStaticItemControlBlock()),
- m_rItemDefault(rItemDefault)
+ // helper class for an ImplInvalidateItem - placeholder for InvaidateState
+ // SfxItemState::DONTCARE -> IsInvalidItem -> pItem == INVALID_POOL_ITEM -> reinterpret_cast<SfxPoolItem*>(-1)
+ // the instance of this class is *never* returned in any way or helper data struture,
+ // but is *strictly* local. Thus also needs no 'static ItemControlBlock& GetStaticItemControlBlock()'
+ class ImplInvalidateItem : public ItemBase
{
- }
+ public:
+ ImplInvalidateItem() : ItemBase(*ItemControlBlock::getItemControlBlock(0)) {}
+ };
- virtual bool isInvalidateItem() const override
- {
- return true;
- }
-
- const ItemBase& getItemDefault() const { return m_rItemDefault; }
- };
+ static const ImplInvalidateItem aImplInvalidateItem;
+ return aImplInvalidateItem;
+ }
- // helper class for a ImplDisableItem - placeholder for InvaidateState
- // SfxItemState::DISABLED -> IsVoidItem() -> instance of SfxVoidItem, virtual bool IsVoidItem()
- // instances of this class are *never* returned in any way or helper data struture,
- // but are *strictly* local. Thus also need no 'static ItemControlBlock& GetStaticItemControlBlock()' (for now)
- class ImplDisableItem : public ItemBase
+ // single global static instance for helper class ImplDisableItem
+ static const ItemBase& getDisableItem()
{
- private:
- const ItemBase& m_rItemDefault;
-
- public:
- ImplDisableItem(const ItemBase& rItemDefault)
- : ItemBase(getEmptyStaticItemControlBlock()),
- m_rItemDefault(rItemDefault)
- {
- }
-
- virtual bool isDisableItem() const override
+ // helper class for a ImplDisableItem - placeholder for InvaidateState
+ // SfxItemState::DISABLED -> IsVoidItem() -> instance of SfxVoidItem, virtual bool IsVoidItem()
+ // the instance of this class is *never* returned in any way or helper data struture,
+ // but is *strictly* local. Thus also needs no 'static ItemControlBlock& GetStaticItemControlBlock()'
+ class ImplDisableItem : public ItemBase
{
- return true;
- }
+ public:
+ ImplDisableItem() : ItemBase(*ItemControlBlock::getItemControlBlock(0)) {}
+ };
- const ItemBase& getItemDefault() const { return m_rItemDefault; }
- };
+ static const ImplDisableItem aImplDisableItem;
+ return aImplDisableItem;
+ }
const ItemBase* ItemSet::implGetStateAndItem(size_t hash_code, IState& rIState, bool bSearchParent) const
{
@@ -77,18 +57,22 @@ namespace Item
{
assert(nullptr != aRetval->second && "empty const ItemBase* in ItemSet (!)");
- if(aRetval->second->isInvalidateItem())
+ if(aRetval->second == &getInvalidateItem())
{
// SfxItemState::DONTCARE
rIState = IState::DONTCARE;
- return &static_cast<const ImplInvalidateItem*>(aRetval->second)->getItemDefault();
+ ItemControlBlock* pBlock(ItemControlBlock::getItemControlBlock(hash_code));
+ assert(nullptr != pBlock && "Could not find globally registered ItemControlBlock for given ItemType (!)");
+ return &implGetDefault(pBlock->getDefault());
}
- if(aRetval->second->isDisableItem())
+ if(aRetval->second == &getDisableItem())
{
// SfxItemState::DISABLED
rIState = IState::DISABLED;
- return &static_cast<const ImplDisableItem*>(aRetval->second)->getItemDefault();
+ ItemControlBlock* pBlock(ItemControlBlock::getItemControlBlock(hash_code));
+ assert(nullptr != pBlock && "Could not find globally registered ItemControlBlock for given ItemType (!)");
+ return &implGetDefault(pBlock->getDefault());
}
// SfxItemState::SET
@@ -108,33 +92,33 @@ namespace Item
return nullptr;
}
- void ItemSet::implInvalidateItem(size_t hash_code, const ItemBase& rItemDefault)
+ void ItemSet::implInvalidateItem(size_t hash_code)
{
const auto aRetval(m_aItems.find(hash_code));
if(aRetval == m_aItems.end())
{
- m_aItems[hash_code] = new ImplInvalidateItem(rItemDefault);
+ m_aItems[hash_code] = &getInvalidateItem();
}
else
{
delete aRetval->second;
- aRetval->second = new ImplInvalidateItem(rItemDefault);
+ aRetval->second = &getInvalidateItem();
}
}
- void ItemSet::implDisableItem(size_t hash_code, const ItemBase& rItemDefault)
+ void ItemSet::implDisableItem(size_t hash_code)
{
const auto aRetval(m_aItems.find(hash_code));
if(aRetval == m_aItems.end())
{
- m_aItems[hash_code] = new ImplDisableItem(rItemDefault);
+ m_aItems[hash_code] = &getDisableItem();
}
else
{
delete aRetval->second;
- aRetval->second = new ImplDisableItem(rItemDefault);
+ aRetval->second = &getDisableItem();
}
}
@@ -152,6 +136,18 @@ namespace Item
return false;
}
+ const ItemBase& ItemSet::implGetDefault(const ItemBase& rCurrent) const
+ {
+ if(m_aModelSpecificIValues)
+ {
+ // may use model-specific default, get from helper
+ // helper *will* fallback to ItemBase default
+ return m_aModelSpecificIValues->getDefault(rCurrent);
+ }
+
+ return rCurrent;
+ }
+
ItemSet::ItemSet(const ModelSpecificItemValues::SharedPtr& rModelSpecificIValues)
: std::enable_shared_from_this<ItemSet>(),
m_aParent(),
@@ -223,7 +219,7 @@ namespace Item
assert(nullptr != candidate.second && "empty const ItemBase* not allowed (!)");
const ItemBase* pNew(nullptr);
- if(candidate.second->isInvalidateItem())
+ if(candidate.second == &getInvalidateItem())
{
if(bDontCareToDefault)
{
@@ -233,13 +229,13 @@ namespace Item
else
{
// prepare SfxItemState::DONTCARE
- pNew = new ImplInvalidateItem(static_cast<const ImplInvalidateItem*>(candidate.second)->getItemDefault());
+ pNew = &getInvalidateItem();
}
}
- else if(candidate.second->isDisableItem())
+ else if(candidate.second == &getDisableItem())
{
// prepare SfxItemState::DISABLED
- pNew = new ImplDisableItem(static_cast<const ImplDisableItem*>(candidate.second)->getItemDefault());
+ pNew = &getDisableItem();
}
else
{
@@ -278,16 +274,20 @@ namespace Item
for(const auto& candidate : m_aItems)
{
- if(candidate.second->isInvalidateItem())
+ if(candidate.second == &getInvalidateItem())
{
+ ItemControlBlock* pBlock(ItemControlBlock::getItemControlBlock(candidate.first));
+ assert(nullptr != pBlock && "Could not find globally registered ItemControlBlock for given ItemType (!)");
aRetval.push_back(std::pair<const ItemBase*, ItemSet::IState>(
- &static_cast<const ImplInvalidateItem*>(candidate.second)->getItemDefault(),
+ &implGetDefault(pBlock->getDefault()),
IState::DONTCARE));
}
- else if(candidate.second->isDisableItem())
+ else if(candidate.second == &getDisableItem())
{
+ ItemControlBlock* pBlock(ItemControlBlock::getItemControlBlock(candidate.first));
+ assert(nullptr != pBlock && "Could not find globally registered ItemControlBlock for given ItemType (!)");
aRetval.push_back(std::pair<const ItemBase*, ItemSet::IState>(
- &static_cast<const ImplDisableItem*>(candidate.second)->getItemDefault(),
+ &implGetDefault(pBlock->getDefault()),
IState::DISABLED));
}
else
@@ -305,7 +305,7 @@ namespace Item
std::vector<const ItemBase*> ItemSet::getItemsOfState(IState eIState) const
{
assert((IState::SET == eIState || IState::DISABLED == eIState || IState::DONTCARE == eIState)
- && "only IStates SET/DISBALE/DONTCALE allowed (!)");
+ && "only IStates SET/DISBALE/DONTCARE allowed (!)");
std::vector<const ItemBase*> aRetval;
if(!m_aItems.empty())
@@ -314,13 +314,17 @@ namespace Item
for(const auto& candidate : m_aItems)
{
- if(IState::DONTCARE == eIState && candidate.second->isInvalidateItem())
+ if(IState::DONTCARE == eIState && candidate.second == &getInvalidateItem())
{
- aRetval.push_back(&static_cast<const ImplInvalidateItem*>(candidate.second)->getItemDefault());
+ ItemControlBlock* pBlock(ItemControlBlock::getItemControlBlock(candidate.first));
+ assert(nullptr != pBlock && "Could not find globally registered ItemControlBlock for given ItemType (!)");
+ aRetval.push_back(&implGetDefault(pBlock->getDefault()));
}
- else if(IState::DISABLED == eIState && candidate.second->isDisableItem())
+ else if(IState::DISABLED == eIState && candidate.second == &getDisableItem())
{
- aRetval.push_back(&static_cast<const ImplDisableItem*>(candidate.second)->getItemDefault());
+ ItemControlBlock* pBlock(ItemControlBlock::getItemControlBlock(candidate.first));
+ assert(nullptr != pBlock && "Could not find globally registered ItemControlBlock for given ItemType (!)");
+ aRetval.push_back(&implGetDefault(pBlock->getDefault()));
}
else if(IState::SET == eIState)
{
diff --git a/item/test/ItemTest.cxx b/item/test/ItemTest.cxx
index 44de5be83cbc..844fe29c36eb 100644
--- a/item/test/ItemTest.cxx
+++ b/item/test/ItemTest.cxx
@@ -31,6 +31,7 @@ namespace Item
static ItemControlBlock aItemControlBlock(
[](){ return new MultiValueSimple(); },
[](const ItemBase& rRef){ return new MultiValueSimple(static_cast<const MultiValueSimple&>(rRef)); },
+ typeid(MultiValueSimple).hash_code(),
"MultiValueSimple");
return aItemControlBlock;
@@ -89,6 +90,7 @@ namespace Item
static ItemControlBlock aItemControlBlock(
[](){ return new MultiValueSimple_derivedClass(); },
[](const ItemBase& rRef){ return new MultiValueSimple_derivedClass(static_cast<const MultiValueSimple_derivedClass&>(rRef)); },
+ typeid(MultiValueSimple_derivedClass).hash_code(),
"MultiValueSimple_derivedClass");
return aItemControlBlock;
@@ -115,6 +117,7 @@ namespace Item
static ItemControlBlock aItemControlBlock(
[](){ return new MultiValueSimple_plus(); },
[](const ItemBase& rRef){ return new MultiValueSimple_plus(static_cast<const MultiValueSimple_plus&>(rRef)); },
+ typeid(MultiValueSimple_plus).hash_code(),
"MultiValueSimple_plus");
return aItemControlBlock;
@@ -164,6 +167,7 @@ namespace Item
static ItemControlBlock aItemControlBlock(
[](){ return new MultiValueSimple_plus_derivedClass(); },
[](const ItemBase& rRef){ return new MultiValueSimple_plus_derivedClass(static_cast<const MultiValueSimple_plus_derivedClass&>(rRef)); },
+ typeid(MultiValueSimple_plus_derivedClass).hash_code(),
"MultiValueSimple_plus_derivedClass");
return aItemControlBlock;
@@ -190,6 +194,7 @@ namespace Item
static ItemControlBlock aItemControlBlock(
[](){ return new MultiValueBuffered(); },
[](const ItemBase& rRef){ return new MultiValueBuffered(static_cast<const MultiValueBuffered&>(rRef)); },
+ typeid(MultiValueBuffered).hash_code(),
"MultiValueBuffered");
return aItemControlBlock;
@@ -341,6 +346,7 @@ namespace Item
static ItemControlBlock aItemControlBlock(
[](){ return new MultiValueBuffered_derivedClass(); },
[](const ItemBase& rRef){ return new MultiValueBuffered_derivedClass(static_cast<const MultiValueBuffered_derivedClass&>(rRef)); },
+ typeid(MultiValueBuffered_derivedClass).hash_code(),
"MultiValueBuffered_derivedClass");
return aItemControlBlock;
@@ -367,6 +373,7 @@ namespace Item
static ItemControlBlock aItemControlBlock(
[](){ return new MultiValueBuffered_plus(); },
[](const ItemBase& rRef){ return new MultiValueBuffered_plus(static_cast<const MultiValueBuffered_plus&>(rRef)); },
+ typeid(MultiValueBuffered_plus).hash_code(),
"MultiValueBuffered_plus");
return aItemControlBlock;
@@ -482,6 +489,7 @@ namespace Item
static ItemControlBlock aItemControlBlock(
[](){ return new MultiValueBuffered_plus_derivedClass(); },
[](const ItemBase& rRef){ return new MultiValueBuffered_plus_derivedClass(static_cast<const MultiValueBuffered_plus_derivedClass&>(rRef)); },
+ typeid(MultiValueBuffered_plus_derivedClass).hash_code(),
"MultiValueBuffered_plus_derivedClass");
return aItemControlBlock;
@@ -508,6 +516,7 @@ namespace Item
static ItemControlBlock aItemControlBlock(
[](){ return new CntInt16_derived(); },
[](const ItemBase& rRef){ return new CntInt16_derived(static_cast<const CntInt16_derived&>(rRef)); },
+ typeid(CntInt16_derived).hash_code(),
"CntInt16_derived");
return aItemControlBlock;
@@ -534,6 +543,7 @@ namespace Item
static ItemControlBlock aItemControlBlock(
[](){ return new CntOUString_derived(); },
[](const ItemBase& rRef){ return new CntOUString_derived(static_cast<const CntOUString_derived&>(rRef)); },
+ typeid(CntOUString_derived).hash_code(),
"CntOUString_derived");
return aItemControlBlock;
diff --git a/svx/source/items/TransformAnchor.cxx b/svx/source/items/TransformAnchor.cxx
index dc6ed0f05a11..0f6bb8ae005a 100755
--- a/svx/source/items/TransformAnchor.cxx
+++ b/svx/source/items/TransformAnchor.cxx
@@ -21,6 +21,7 @@ namespace Item
static ItemControlBlock aItemControlBlock(
[](){ return new TransformAnchor(); },
[](const ItemBase& rRef){ return new TransformAnchor(static_cast<const TransformAnchor&>(rRef)); },
+ typeid(TransformAnchor).hash_code(),
"TransformAnchor");
return aItemControlBlock;
More information about the Libreoffice-commits
mailing list