diff options
Diffstat (limited to 'sw/source/core/edit/edfcol.cxx')
-rw-r--r-- | sw/source/core/edit/edfcol.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx index 72b90b38e790..0f1dd3366d47 100644 --- a/sw/source/core/edit/edfcol.cxx +++ b/sw/source/core/edit/edfcol.cxx @@ -63,7 +63,17 @@ void SwEditShell::SetTxtFmtColl(SwTxtFmtColl *pFmt, if ( !rPaM.HasReadonlySel( GetViewOptions()->IsFormView() ) ) { + // Change the paragraph style to pLocal and remove all direct paragraph formatting. GetDoc()->SetTxtFmtColl( rPaM, pLocal, true, bResetListAttrs ); + + // If there are hints on the nodes which cover the whole node, then remove those, too. + SwPaM aPaM(*rPaM.Start(), *rPaM.End()); + if (SwTxtNode* pEndTxtNode = aPaM.End()->nNode.GetNode().GetTxtNode()) + { + aPaM.Start()->nContent = 0; + aPaM.End()->nContent = pEndTxtNode->GetTxt().getLength(); + } + GetDoc()->RstTxtAttrs(aPaM, /*bInclRefToxMark=*/false, /*bExactRange=*/true); } } |