Bugzilla – Attachment 173213 Details for
Bug 113213
When "Continue previous numbering" is applied, it should also toggle off "restart numbering" for any item(s) that were selected for "Continue previous numbering"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
113213 _removeNumberingWhileAddingToList.patch: abandoned
113213 _removeNumberingWhileAddingToList.patch (text/plain), 2.21 KB, created by
Justin L
on 2021-06-26 04:05:52 UTC
(
hide
)
Description:
113213 _removeNumberingWhileAddingToList.patch: abandoned
Filename:
MIME Type:
Creator:
Justin L
Created:
2021-06-26 04:05:52 UTC
Size:
2.21 KB
patch
obsolete
>From 507979255fb86497918712a47e8c114f9d3aa5cf Mon Sep 17 00:00:00 2001 >From: Justin Luth <justin_luth@sil.org> >Date: Tue, 22 Jun 2021 14:42:23 +0200 >Subject: [PATCH] tdf#113213 sw UI: clear restart numbering when add-to-list > >When you join a different list to the prior list in the document, >it is extremely likely that you do not want the numbering >to restart. That restart belonged to the old list, >and isn't expected to remain when changing to join >a different list. > >Change-Id: I3bc78dceea6b95869d7c0742eed0eda126392588 >--- > >diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx >index 0c11a93..d595895 100644 >--- a/sw/source/uibase/shells/textsh1.cxx >+++ b/sw/source/uibase/shells/textsh1.cxx >@@ -64,6 +64,7 @@ > #include <chrdlgmodes.hxx> > #include <fmtcol.hxx> > #include <cellatr.hxx> >+#include <edimp.hxx> > #include <edtwin.hxx> > #include <fldmgr.hxx> > #include <strings.hrc> >@@ -1124,6 +1125,27 @@ > } > if ( pRule ) > { >+ // When merging with a different list, also remove any restart-numbering. >+ const SwPaM& rCursor = *rWrtSh.GetCursor(); >+ // if IsMultiSelection - check each selected paragraph separately. >+ SwPamRanges aRangeArr(rCursor); >+ SwPaM aRingPaM(*rCursor.GetPoint()); >+ for (size_t n = 0; n < aRangeArr.Count(); ++n) >+ { >+ aRangeArr.SetPam(n, aRingPaM); >+ aRingPaM.Normalize(); >+ const SwNodeIndex nEnd = aRingPaM.GetMark()->nNode; >+ for (SwNodeIndex nPara = aRingPaM.GetPoint()->nNode; nPara <= nEnd; ++nPara) >+ { >+ SwPaM aPaM(nPara); >+ if (!rWrtSh.IsNumRuleStart(&aPaM)) >+ continue; >+ // Only remove restart-numbering if the rule is actually going to change. >+ if (SwDoc::GetNumRuleAtPos(*aPaM.GetPoint(), rWrtSh.GetLayout()) != pRule) >+ rWrtSh.SetNumRuleStart(false, &aPaM); >+ } >+ } >+ > rWrtSh.SetCurNumRule( *pRule, false, sContinuedListId ); > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 113213
:
155088
|
171653
| 173213 |
179921