diff options
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editundo.cxx | 4 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.hxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/impedit2.cxx | 7 |
3 files changed, 8 insertions, 5 deletions
diff --git a/editeng/source/editeng/editundo.cxx b/editeng/source/editeng/editundo.cxx index 6beb8617be28..13f066dafc02 100644 --- a/editeng/source/editeng/editundo.cxx +++ b/editeng/source/editeng/editundo.cxx @@ -253,7 +253,6 @@ void EditUndoConnectParas::Undo() GetEditEngine()->SetCallParaInsertedOrDeleted(false); EditPaM aPaM = GetEditEngine()->SplitContent(nNode, nSepPos); - GetEditEngine()->SetParaAttribs( nNode, aLeftParaAttribs ); GetEditEngine()->SetCallParaInsertedOrDeleted( bCall ); if (GetEditEngine()->IsCallParaInsertedOrDeleted()) @@ -262,6 +261,9 @@ void EditUndoConnectParas::Undo() GetEditEngine()->SetParaAttribs( nNode+1, aRightParaAttribs ); } + // Calling SetParaAttribs is effective only after ParagraphInserted + GetEditEngine()->SetParaAttribs( nNode, aLeftParaAttribs ); + if (GetEditEngine()->GetStyleSheetPool()) { if ( !aLeftStyleName.isEmpty() ) diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 698f16b60f3e..30694a1e5c1d 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -543,7 +543,7 @@ private: void CursorMoved( const ContentNode* pPrevNode ); - void ParaAttribsChanged( ContentNode const * pNode ); + void ParaAttribsChanged( ContentNode const * pNode, bool bIgnoreUndoCheck = false ); void TextModified(); void CalcHeight( ParaPortion* pPortion ); diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 8f2336c21b3b..f837b2a57cac 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -731,7 +731,7 @@ void ImpEditEngine::TextModified() } -void ImpEditEngine::ParaAttribsChanged( ContentNode const * pNode ) +void ImpEditEngine::ParaAttribsChanged( ContentNode const * pNode, bool bIgnoreUndoCheck ) { assert(pNode && "ParaAttribsChanged: Which one?"); @@ -743,7 +743,8 @@ void ImpEditEngine::ParaAttribsChanged( ContentNode const * pNode ) pPortion->MarkSelectionInvalid( 0 ); sal_Int32 nPara = aEditDoc.GetPos( pNode ); - pEditEngine->ParaAttribsChanged( nPara ); + if ( bIgnoreUndoCheck || pEditEngine->IsInUndo() ) + pEditEngine->ParaAttribsChanged( nPara ); ParaPortion* pNextPortion = GetParaPortions().SafeGetObject( nPara+1 ); // => is formatted again anyway, if Invalid. @@ -2261,7 +2262,7 @@ EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pR pLeft->GetCharAttribs().GetDefFont() = pRight->GetCharAttribs().GetDefFont(); } - ParaAttribsChanged( pLeft ); + ParaAttribsChanged( pLeft, true ); // First search for Portions since pRight is gone after ConnectParagraphs. ParaPortion* pLeftPortion = FindParaPortion( pLeft ); |