tdf#173510 sw: allow AutoFormat styles to remove table style
You can remove a table style by Ctrl-clicking on the selected one. (Probably nobody will find this - it probably needs a help tip.) This was kind-of working before 26.8 (when chosing 'None') but not as 'nice'. Then at least it STOPPED applying the style when new changes are made. I assume that a lot of the work that when into table styles in 26.8 made it so that with this patch's change, the existing format is cleared to nothing as the style is removed. Clearing the existing seems like a good thing to me. Change-Id: I174b3e8a408995500598937bbb548250c80bc40f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211925 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
This commit is contained in:
@@ -891,6 +891,11 @@ void SwTableShell::Execute(SfxRequest &rReq)
|
||||
size_t nIndex = aDlg.GetIndex();
|
||||
if (nIndex < rFormats.size())
|
||||
rSh.SetTableStyle(*rFormats.GetData(nIndex));
|
||||
else
|
||||
{
|
||||
TableStyleName aNone;
|
||||
rSh.UpdateTableStyleFormatting(nullptr, false, &aNone);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user