summaryrefslogtreecommitdiff
path: root/sw/source/core/undo/rolbck.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/undo/rolbck.cxx')
-rw-r--r--sw/source/core/undo/rolbck.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index ced76e507c80..59cfec65def5 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -195,6 +195,8 @@ SwHistorySetTxt::SwHistorySetTxt( SwTxtAttr* pTxtHt, sal_uLong nNodePos )
, m_nNodeIndex( nNodePos )
, m_nStart( *pTxtHt->GetStart() )
, m_nEnd( *pTxtHt->GetAnyEnd() )
+ , m_bFormatIgnoreStart(pTxtHt->IsFormatIgnoreStart())
+ , m_bFormatIgnoreEnd (pTxtHt->IsFormatIgnoreEnd ())
{
// Caution: the following attributes generate no format attributes:
// - NoLineBreak, NoHypen, Inserted, Deleted
@@ -234,9 +236,19 @@ void SwHistorySetTxt::SetInDoc( SwDoc* pDoc, bool )
if ( pTxtNd )
{
- pTxtNd->InsertItem( *m_pAttr, m_nStart, m_nEnd,
+ SwTxtAttr *const pAttr = pTxtNd->InsertItem(*m_pAttr, m_nStart, m_nEnd,
nsSetAttrMode::SETATTR_NOTXTATRCHR |
nsSetAttrMode::SETATTR_NOHINTADJUST );
+ // shouldn't be possible to hit any error/merging path from here
+ assert(pAttr);
+ if (m_bFormatIgnoreStart)
+ {
+ pAttr->SetFormatIgnoreStart(true);
+ }
+ if (m_bFormatIgnoreEnd)
+ {
+ pAttr->SetFormatIgnoreEnd(true);
+ }
}
}