summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/edit/autofmt.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index f8bcfebe9875..2c9eb69ac16a 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -1433,7 +1433,6 @@ void SwAutoFormat::BuildText()
bBreak = !IsFastFullLine(*m_pCurTextFrame)
|| IsBlanksInString(*m_pCurTextFrame)
|| IsSentenceAtEnd(*m_pCurTextFrame);
- SetColl( RES_POOLCOLL_TEXT, true );
if( !bBreak )
{
SetRedlineText( STR_AUTOFMTREDL_DEL_MORELINES );
@@ -2420,6 +2419,12 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFormatFlags aFlags,
break;
}
+ // replace custom styles with text body
+ if ( IsPoolUserFormat( nPoolId ) && m_aFlags.bChgUserColl )
+ {
+ SetColl( RES_POOLCOLL_TEXT, true );
+ }
+
// check for left margin set by the style
if( IsPoolUserFormat( nPoolId ) ||
RES_POOLCOLL_STANDARD == nPoolId )