summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjp <jp@openoffice.org>2001-01-16 18:16:43 +0000
committerjp <jp@openoffice.org>2001-01-16 18:16:43 +0000
commitdec9f2a338250ff162997158e5b53a66f2cb40df (patch)
tree550dd058a193614355513782efa24d00fcf33278
parent75455da97de8c10d0e330a1b056de0b496700d07 (diff)
Bug #80628#: SwSetFmtHint: ask the original attribute for any values
-rw-r--r--sw/source/core/undo/rolbck.cxx20
1 files changed, 9 insertions, 11 deletions
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index ffa8c9bdc3d3..1ae4c65d1392 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: rolbck.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: os $ $Date: 2000-10-16 10:31:56 $
+ * last change: $Author: jp $ $Date: 2001-01-16 19:16:43 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -204,16 +204,14 @@ SwSetFmtHint::SwSetFmtHint( const SfxPoolItem* pFmtHt, ULONG nNd )
break;
case RES_PARATR_NUMRULE:
{
- if( ((SwNumRuleItem*)pAttr)->GetDefinedIn() &&
- ((SwNumRuleItem*)pAttr)->GetDefinedIn()->ISA( SwTxtNode ))
+ const SwModify* pMod = ((SwNumRuleItem*)pFmtHt)->GetDefinedIn();
+ const SwNodeNum* pNdNum;
+ if( pMod && pMod->ISA( SwTxtNode ) &&
+ 0 != (pNdNum = ((SwTxtNode*)pMod)->GetNum() ) )
{
- SwTxtNode* pTNd = (SwTxtNode*)((SwNumRuleItem*)pAttr)->GetDefinedIn();
- if( pTNd->GetNum() )
- {
- nNumLvl = pTNd->GetNum()->GetLevel();
- bNumStt = pTNd->GetNum()->IsStart();
- nSetStt = pTNd->GetNum()->GetSetValue();
- }
+ nNumLvl = pNdNum->GetLevel();
+ bNumStt = pNdNum->IsStart();
+ nSetStt = pNdNum->GetSetValue();
}
((SwNumRuleItem*)pAttr)->ChgDefinedIn( 0 );
}