summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
authorOliver Specht <os@openoffice.org>2001-02-27 08:25:29 +0000
committerOliver Specht <os@openoffice.org>2001-02-27 08:25:29 +0000
commit958187ee5e80d59cee38927b9fffbdd3f6b8587c (patch)
tree9f764b46cded32a80b56190c5e0586929c6d0c9c /sw/source/core
parent123fdb89fd1893bb77966804ff9b801b4ba8df44 (diff)
#83586# Pool access only if Id <= SFX_WHICH_MAX
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/unocore/unosect.cxx34
1 files changed, 18 insertions, 16 deletions
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index 1a5ec00b1953..765eb4edf0c1 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unosect.cxx,v $
*
- * $Revision: 1.19 $
+ * $Revision: 1.20 $
*
- * last change: $Author: dvo $ $Date: 2001-02-20 13:46:04 $
+ * last change: $Author: os $ $Date: 2001-02-27 09:25:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1161,21 +1161,23 @@ void SwXTextSection::setPropertyToDefault( const OUString& rPropertyName )
case FN_UNO_ANCHOR_TYPE:
break;
default:
- if(pFmt)
+ if(pMap->nWID <= SFX_WHICH_MAX)
{
- const SfxItemSet& rOldAttrSet = pFmt->GetAttrSet();
- pNewAttrSet = new SfxItemSet(*rOldAttrSet.GetPool(),
- pMap->nWID, pMap->nWID, 0);
- pNewAttrSet->ClearItem(pMap->nWID);
- }
- else
- {
- if(RES_COL == pMap->nWID)
- DELETEZ(pProps->pColItem);
- else //if(RES_BACKGROUND == pMap->nWID)
- DELETEZ(pProps->pBrushItem);
+ if(pFmt)
+ {
+ const SfxItemSet& rOldAttrSet = pFmt->GetAttrSet();
+ pNewAttrSet = new SfxItemSet(*rOldAttrSet.GetPool(),
+ pMap->nWID, pMap->nWID, 0);
+ pNewAttrSet->ClearItem(pMap->nWID);
+ }
+ else
+ {
+ if(RES_COL == pMap->nWID)
+ DELETEZ(pProps->pColItem);
+ else if(RES_BACKGROUND == pMap->nWID)
+ DELETEZ(pProps->pBrushItem);
+ }
}
-
}
if(pFmt)
{
@@ -1239,7 +1241,7 @@ Any SwXTextSection::getPropertyDefault( const OUString& rPropertyName )
SwXParagraph::getDefaultTextContentValue(aRet, OUString(), pMap->nWID);
break;
default:
- if(pFmt)
+ if(pFmt && pMap->nWID <= SFX_WHICH_MAX)
{
SwDoc* pDoc = pFmt->GetDoc();
const SfxPoolItem& rDefItem =