incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1195986 - /incubator/ooo/trunk/main/sw/source/core/doc/docfmt.cxx
Date Tue, 01 Nov 2011 13:23:32 GMT
Author: jsc
Date: Tue Nov  1 13:23:31 2011
New Revision: 1195986

URL: http://svn.apache.org/viewvc?rev=1195986&view=rev
Log:
118559: insert check for invalid item (IsInvalidItem)

Modified:
    incubator/ooo/trunk/main/sw/source/core/doc/docfmt.cxx

Modified: incubator/ooo/trunk/main/sw/source/core/doc/docfmt.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/core/doc/docfmt.cxx?rev=1195986&r1=1195985&r2=1195986&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sw/source/core/doc/docfmt.cxx (original)
+++ incubator/ooo/trunk/main/sw/source/core/doc/docfmt.cxx Tue Nov  1 13:23:31 2011
@@ -569,28 +569,30 @@ lcl_InsAttr(SwDoc *const pDoc, const SwP
     {
         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) )
-        {
-            pCharSet  = &rChgSet;
-            bCharAttr = true;
-        }
-
-        if (    isPARATR(nWhich)
-             // --> OD 2008-02-25 #refactorlists#
-             || isPARATR_LIST(nWhich)
-             // <--
-             || isFRMATR(nWhich)
-             || isGRFATR(nWhich)
-             || isUNKNOWNATR(nWhich) )
+        if (!IsInvalidItem(pItem))
         {
-            pOtherSet = &rChgSet;
-            bOtherAttr = true;
+            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) )
+            {
+                pCharSet  = &rChgSet;
+                bCharAttr = true;
+            }
+
+            if (    isPARATR(nWhich)
+                    || isPARATR_LIST(nWhich)
+                    || isFRMATR(nWhich)
+                    || isGRFATR(nWhich)
+                    || isUNKNOWNATR(nWhich) )
+            {
+                pOtherSet = &rChgSet;
+                bOtherAttr = true;
+            }
         }
     }
 



Mime
View raw message