sw/source/core/doc/docfmt.cxx | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-)
New commits: commit ea95d600ded32afdde8b59d88d062731a77a6b82 Author: Caolán McNamara <caol...@redhat.com> Date: Fri Oct 28 12:10:31 2011 +0100 check for invalidated item with IsInvalidItem diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index b0edf69..16a0780 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -536,26 +536,29 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet, { SfxItemIter aIter( rChgSet ); const SfxPoolItem* pItem = aIter.FirstItem(); - const sal_uInt16 nWhich = pItem->Which(); - - if ( isCHRATR(nWhich) || - (RES_TXTATR_CHARFMT == nWhich) || - (RES_TXTATR_INETFMT == nWhich) || - (RES_TXTATR_AUTOFMT == nWhich) || - (RES_TXTATR_UNKNOWN_CONTAINER == nWhich) ) + if (!IsInvalidItem(pItem)) { - pCharSet = &rChgSet; - bCharAttr = true; - } + const sal_uInt16 nWhich = pItem->Which(); - if ( isPARATR(nWhich) - || isPARATR_LIST(nWhich) - || isFRMATR(nWhich) - || isGRFATR(nWhich) - || isUNKNOWNATR(nWhich) ) - { - pOtherSet = &rChgSet; - bOtherAttr = true; + if ( isCHRATR(nWhich) || + (RES_TXTATR_CHARFMT == nWhich) || + (RES_TXTATR_INETFMT == nWhich) || + (RES_TXTATR_AUTOFMT == nWhich) || + (RES_TXTATR_UNKNOWN_CONTAINER == nWhich) ) + { + pCharSet = &rChgSet; + bCharAttr = true; + } + + if ( isPARATR(nWhich) + || isPARATR_LIST(nWhich) + || isFRMATR(nWhich) + || isGRFATR(nWhich) + || isUNKNOWNATR(nWhich) ) + { + pOtherSet = &rChgSet; + bOtherAttr = true; + } } }
_______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits