summaryrefslogtreecommitdiff
path: root/sw/source/core/edit/autofmt.cxx
diff options
context:
space:
mode:
authorNickson Thanda <nicksonthanda10@msn.com>2018-06-22 04:59:16 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-07-02 09:32:29 +0200
commit391134e4cc0cf444ac50c6df02073de57ad9c466 (patch)
tree4a4c32f9054606ff96789e278bdc6bdd79711832 /sw/source/core/edit/autofmt.cxx
parentf54143088a867c59be144f1d4d7cd6d9fe1c18f5 (diff)
tdf#51223 can now undo auto-capitalise with enter
Change-Id: I1ff1bd0137415349d1eb89bef0947453f72a8ef5 Reviewed-on: https://gerrit.libreoffice.org/56267 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/source/core/edit/autofmt.cxx')
-rw-r--r--sw/source/core/edit/autofmt.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 19dff285050c..33a41866af1a 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -2611,6 +2611,14 @@ void SwEditShell::AutoFormatBySplitNode()
SwAutoFormat aFormat( this, aAFFlags, &pCursor->GetMark()->nNode,
&pCursor->GetPoint()->nNode );
+ SvxAutoCorrect* pACorr = SvxAutoCorrCfg::Get().GetAutoCorrect();
+ if( pACorr && !pACorr->IsAutoCorrFlag( ACFlags::CapitalStartSentence | ACFlags::CapitalStartWord |
+ ACFlags::AddNonBrkSpace | ACFlags::ChgOrdinalNumber |
+ ACFlags::ChgToEnEmDash | ACFlags::SetINetAttr | ACFlags::Autocorrect ))
+ pACorr = nullptr;
+
+ if( pACorr )
+ AutoCorrect( *pACorr,false, u'\0' );
//JP 30.09.96: DoTable() builds on PopCursor and MoveCursor!
Pop(PopMode::DeleteCurrent);