Hi Bjoern,<br><br><div class="gmail_quote">I have hit a problem that i don't fully understand. Disabled items are SfxVoidItem with Which 0, but inserted with different one. State of Item is check with TYPE Macro as below<br>

<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">if ( (*ppFnd)->Type() == TYPE(SfxVoidItem) )<br>                        return SFX_ITEM_DISABLED;<br>

</blockquote><div> </div></div>So it just type that decides about disabled state of item. I've changed places where conditions like<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">

if( !(*ppFnd)->Which() )<br></blockquote><div>to<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">if ( (*ppFnd)->ISA(SfxVoidItem) ) <br></blockquote>

<div>because I saw in an assert that this is used. At this moment problem started, code compiles but fails at runtime with segfault at itemset.cxx:313 (line like above)<br>I've checked with gdb that there is no method ISA, but IsA. With the changed method to IsA code does not compile.<br>

<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">(gdb) call (*ppFnd)->IsA(SfxVoidItem)<br>$1 = {sal_Bool (const SfxPoolItem * const, TypeId)} 0x44980824 <SfxPoolItem::IsA(void* (*)()) const><br>

(gdb) call (*ppFnd)->ISA(SfxVoidItem)<br>There is no member or method named ISA.<br></blockquote><div>Moreover I tried the way with Type and TYPE with no success, gdb output below:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
Program received signal SIGSEGV, Segmentation fault.<br>0x4496cb31 in SfxItemSet::~SfxItemSet (this=0xbfff51e8, __in_chrg=<optimized out>) at /home/maciej/programowanie/libreoffice/libo/svl/source/items/itemset.cxx:314<br>
314                    if( (*ppFnd)->Type() == TYPE(SfxVoidItem) )<br>(gdb) call (*ppFnd)->Type()<br>Cannot access memory at address 0xfca0f97<br>(gdb) call (*ppFnd)->Which()<br>$1 = 4040<br>(gdb) call (SfxPoolItem *)(*ppFnd)->Type()<br>
Cannot access memory at address 0xfca0f97<br>(gdb) ptype (*ppFnd)<br>type = const class SfxPoolItem {<br>  private:<br>    sal_uLong nRefCount;<br>    sal_uInt16 nWhich;<br>    sal_uInt16 nKind;<br><br>    void SetRefCount(sal_uLong);<br>
    void SetKind(sal_uInt16);<br>  public:<br>    sal_uLong AddRef(sal_uLong) const;<br>  private:<br>    sal_uLong ReleaseRef(sal_uLong) const;<br>    long Delete_Impl(void *);<br>  protected:<br>    SfxPoolItem(sal_uInt16);<br>
    SfxPoolItem(const SfxPoolItem &);<br>  public:<br>    static void * CreateType(void);<br>    static TypeId StaticType(void);<br>    static sal_Bool IsOf(TypeId);<br>    virtual TypeId Type(void) const;<br>    virtual sal_Bool IsA(TypeId) const;<br>
    ~SfxPoolItem(int);<br>    void SetWhich(sal_uInt16);<br>    sal_uInt16 Which(void) const;<br>    virtual int operator==(const SfxPoolItem &) const;<br>    int operator!=(const SfxPoolItem &) const;<br>    virtual int Compare(const SfxPoolItem &) const;<br>
    virtual int Compare(const SfxPoolItem &, const IntlWrapper &) const;<br>    virtual SfxItemPresentation GetPresentation(SfxItemPresentation, SfxMapUnit, SfxMapUnit, String &, const IntlWrapper *) const;<br>
    virtual sal_uInt16 GetVersion(sal_uInt16) const;<br>    virtual bool ScaleMetrics(long, long);<br>    virtual bool HasMetrics(void) const;<br>    virtual bool QueryValue(com::sun::star::uno::Any &, sal_uInt8) const;<br>
    virtual bool PutValue(const com::sun::star::uno::Any &, sal_uInt8);<br>    virtual SfxPoolItem * Create(SvStream &, sal_uInt16) const;<br>    virtual SvStream & Store(SvStream &, sal_uInt16) const;<br>
    virtual SfxPoolItem * Clone(SfxItemPool *) const;<br>    virtual SfxPoolItem * CloneAtWhich(sal_uInt16, SfxItemPool *) const;<br>    sal_uLong GetRefCount(void) const;<br>    sal_uInt16 GetKind(void) const;<br>    static rtl::OUString readByteString(SvStream &);<br>
    static void writeByteString(SvStream &, const rtl::OUString &);<br>    static rtl::OUString readUnicodeString(SvStream &, bool);<br>    static void writeUnicodeString(SvStream &, const rtl::OUString &);<br>
  private:<br>    SfxPoolItem & operator=(const SfxPoolItem &);<br>} *<br>(gdb) call (*ppFnd)->StaticType()<br>$2 = (void *(*)(void)) 0x4498077e <SfxPoolItem::CreateType()></blockquote><div><br>Thanks in advance for help :)<br>
<br>Maciek <br></div></div><div><br> </div></div></div>