Hi there,
I've just added a new method to SfxItemSet to provide an easy way to
check whether or not an item is already set, and if it's already set,
get that item. Here is what I've added:
bool SfxItemSet::HasItem(sal_uInt16 nWhich, const SfxPoolItem*& rpItem) const
{
return SFX_ITEM_SET == GetItemState(nWhich, true, &rpItem);
}
The old way is to call GetItemState() and check its return type to see
if it's SFX_ITEM_SET. But IMO the new method is slightly simpler &
helps eliminate dozens of custom macros that basically provide the same
semantics as the new method.
Just FYI.
Kohei
--
Kohei Yoshida, LibreOffice hacker, Calc
Context
- SfxItemSet::HasItem method · Kohei Yoshida
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.