37using namespace ::
cppu;
51 assert(
dynamic_cast<const NameOrIndex*
>(&rCmp) &&
"comparing different pool item subclasses");
52 auto const & rOther =
static_cast<const NameOrIndex&
>(rCmp);
62 mpModelPool( pModel ? &pModel->GetItemPool() :
nullptr ),
63 mnWhich( nWhich ), mnMemberId( nMemberId )
80 return pItem && !pItem->
GetName().isEmpty();
90 if (rHint.GetId() != SfxHintId::ThisIsAnSdrHint)
106 std::unique_ptr<NameOrIndex> xNewItem(
createItem());
107 xNewItem->SetName(
aName);
120 throw container::ElementExistException();
143 [&](
const std::unique_ptr<SfxItemSet>& rpItem) {
144 const NameOrIndex *pItem = static_cast<const NameOrIndex *>(&(rpItem->Get( mnWhich ) ));
145 return sName == pItem->GetName();
154 throw container::NoSuchElementException();
165 [&](
const std::unique_ptr<SfxItemSet>& rpItem) {
166 const NameOrIndex *pItem = static_cast<const NameOrIndex *>(&(rpItem->Get( mnWhich ) ));
167 return aName == pItem->GetName();
171 std::unique_ptr<NameOrIndex> xNewItem(
createItem());
172 xNewItem->SetName(
aName);
174 throw lang::IllegalArgumentException();
175 (*aIter)->Put(std::move(xNewItem));
194 throw container::NoSuchElementException();
199 throw container::NoSuchElementException();
222 throw container::NoSuchElementException();
229 std::set< OUString > aNameSet;
241 aNameSet.insert(aApiName);
virtual bool operator==(const SfxPoolItem &rItem) const override
OUString const & GetName() const
sal_Int32 GetPalIndex() const
SdrHintKind GetKind() const
Item2Range GetItemSurrogates(sal_uInt16 nWhich) const
std::vector< const SfxPoolItem * > FindItemSurrogate(sal_uInt16 nWhich, SfxPoolItem const &rNeedle) const
void EndListening(SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
virtual bool isValid(const NameOrIndex *pItem) const
virtual NameOrIndex * createItem() const =0
virtual void SAL_CALL removeByName(const OUString &Name) override
ItemPoolVector maItemSetVector
vector contains all items that were created by this service and will keep them alive even if nothing ...
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void SAL_CALL cancel() override
virtual void SAL_CALL insertByName(const OUString &aName, const css::uno::Any &aElement) override
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
void ImplInsertByName(const OUString &aName, const css::uno::Any &aElement)
virtual ~SvxUnoNameItemTable() noexcept override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) noexcept override
virtual sal_Bool SAL_CALL hasElements() override
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
SvxUnoNameItemTable(SdrModel *pModel, sal_uInt16 nWhich, sal_uInt8 nMemberId) noexcept
virtual void SAL_CALL replaceByName(const OUString &aName, const css::uno::Any &aElement) override
SfxItemPool * mpModelPool
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
OUString SvxUnogetApiNameForItem(const sal_uInt16 nWhich, const OUString &rInternalName)
if the given name is a predefined name for the current language it is replaced by the corresponding a...
OUString SvxUnogetInternalNameForItem(const sal_uInt16 nWhich, const OUString &rApiName)
if the given name is a predefined api name it is replaced by the predefined name for the current lang...