From dec9f2a338250ff162997158e5b53a66f2cb40df Mon Sep 17 00:00:00 2001 From: jp Date: Tue, 16 Jan 2001 18:16:43 +0000 Subject: Bug #80628#: SwSetFmtHint: ask the original attribute for any values --- sw/source/core/undo/rolbck.cxx | 20 +++++++++----------- 1 file 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 ); } -- cgit v1.2.3