37 using namespace ::
cppu;
47 SampleItem(sal_uInt16 nWhich,
const OUString& rName) :
NameOrIndex(nWhich, rName) {}
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 )
78 return pItem && !pItem->
GetName().isEmpty();
88 if (rHint.GetId() != SfxHintId::ThisIsAnSdrHint)
104 std::unique_ptr<NameOrIndex> xNewItem(
createItem());
105 xNewItem->SetName(aName);
118 throw container::ElementExistException();
133 if ( aApiName ==
"~clear~" )
142 [&](
const std::unique_ptr<SfxItemSet>& rpItem) {
144 return sName == pItem->
GetName();
153 throw container::NoSuchElementException();
164 [&](
const std::unique_ptr<SfxItemSet>& rpItem) {
166 return aName == pItem->
GetName();
170 std::unique_ptr<NameOrIndex> xNewItem(
createItem());
171 xNewItem->SetName(aName);
173 throw lang::IllegalArgumentException();
174 (*aIter)->Put(*xNewItem);
185 if (
isValid(static_cast<const NameOrIndex*>(pNameOrIndex)))
193 throw container::NoSuchElementException();
198 throw container::NoSuchElementException();
211 SampleItem aSample(
mnWhich, aName);
213 if (
isValid(static_cast<const NameOrIndex*>(pFindItem)))
221 throw container::NoSuchElementException();
228 std::set< OUString > aNameSet;
240 aNameSet.insert(aApiName);
258 SampleItem aSample(
mnWhich, aName);
260 if (
isValid(static_cast<const NameOrIndex*>(pFindItem)))
SfxItemPool * mpModelPool
SdrHintKind GetKind() const
std::vector< const SfxPoolItem * > FindItemSurrogate(sal_uInt16 nWhich, SfxPoolItem const &rNeedle) const
virtual NameOrIndex * createItem() const =0
virtual void SAL_CALL insertByName(const OUString &aName, const css::uno::Any &aElement) override
ItemPoolVector maItemSetVector
virtual bool isValid(const NameOrIndex *pItem) const
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...
virtual void SAL_CALL removeByName(const OUString &Name) override
void ImplInsertByName(const OUString &aName, const css::uno::Any &aElement)
sal_Int32 GetPalIndex() const
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
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...
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
virtual void SAL_CALL replaceByName(const OUString &aName, const css::uno::Any &aElement) override
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
SvxUnoNameItemTable(SdrModel *pModel, sal_uInt16 nWhich, sal_uInt8 nMemberId)
virtual ~SvxUnoNameItemTable() override
virtual sal_Bool SAL_CALL hasElements() override
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
virtual bool operator==(const SfxPoolItem &rItem) const override
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
Item2Range GetItemSurrogates(sal_uInt16 nWhich) const
void EndListening(SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
OUString const & GetName() const
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override