To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=67206


User tl changed the following:

                What    |Old value                 |New value
================================================================================
             Assigned to|tl                        |pb
--------------------------------------------------------------------------------




------- Additional comments from [EMAIL PROTECTED] Tue Aug  8 01:51:32 -0700 
2006 -------
The problem in svx\source\dialog\chardlg.cxx is in the FillItemSet function
which has code like this:

=======================================
        if ( pOld )
        {
        //! if there are different underline styles in the selection the
        //! item-state in the 'rOldSet' will be invalid. In this case
        //! changing the underline style will be allowed if a style is
        //! selected in the listbox.
        BOOL bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos  &&
                         SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, TRUE 
);

                const SvxUnderlineItem& rItem = *( (const 
SvxUnderlineItem*)pOld );
                if ( (FontUnderline)rItem.GetValue() == eUnder &&
             ( UNDERLINE_NONE == eUnder || rItem.GetColor() ==
m_aColorLB.GetSelectEntryColor() ) &&
             ! bAllowChg )
                        bChanged = FALSE;
        }

        SfxItemState eS = rOldSet.GetItemState( nWhich, FALSE );
        if ( bChanged )
        {
                SvxUnderlineItem aNewItem( eUnder, nWhich );
                aNewItem.SetColor( m_aColorLB.GetSelectEntryColor() );
                rSet.Put( aNewItem );
                bModified |= TRUE;
        }
        else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) )
                CLEARTITEM;

=======================================

The above code works fine with the Writer but with the EditEngine in the second
last line the item will not be a default item and thus the CLEARTITEM call is
missed.

modifying the code like this will fix the problem for this item:

=======================================
...
        else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) )
                CLEARTITEM;
        else
        {
                const SfxPoolItem* pTemp = NULL;
                if ( rOldSet.GetItemState( nWhich, FALSE, &pTemp ) == 
SFX_ITEM_SET )
                {
                        FontUnderline eOld1 = (FontUnderline)( (const 
SvxUnderlineItem*)pOld
)->GetValue();
                        FontUnderline eOld2 = (FontUnderline)( (const 
SvxUnderlineItem*)pTemp
)->GetValue();

                        if ( eOld2 == eUnder )
                                CLEARTITEM;
                }
        }

=======================================


The greater problem is that there probably most of the other items in this
tab-page and in the other tab-pages will have the same problem.
And also there are various other settings where this dialog gets used (e.g.
Writer, Stylist, ...) and none of them must be broken by the new code.

TL->PB: Thanks for taking over!


---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to