GSoC Writer Table Styles; Table styles panel; Delete table style
+ Enabled delete from context menu of Table style tab in Styles and Formatting panel Change-Id: I23523169e0427eb14571102e30fa693b5777af76 Reviewed-on: https://gerrit.libreoffice.org/27797 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
This commit is contained in:
committed by
Miklos Vajna
parent
e5359520dd
commit
8c80a56ea9
@@ -2468,6 +2468,25 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SfxStyleFamily::Table:
|
||||||
|
{
|
||||||
|
const SwTableAutoFormat* pFormat = lcl_FindTableStyle(rDoc, sName);
|
||||||
|
if (pFormat)
|
||||||
|
{
|
||||||
|
size_t nTableCount = rDoc.GetTableFrameFormatCount(true);
|
||||||
|
for (size_t i=0; i < nTableCount; ++i)
|
||||||
|
{
|
||||||
|
SwFrameFormat* pFrameFormat = &rDoc.GetTableFrameFormat(i, true);
|
||||||
|
SwTable* pTable = SwTable::FindTable(pFrameFormat);
|
||||||
|
if (pTable->GetTableStyleName() == pFormat->GetName())
|
||||||
|
pTable->SetTableStyleName("");
|
||||||
|
}
|
||||||
|
|
||||||
|
rDoc.GetTableStyles().EraseAutoFormat(pFormat->GetName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
OSL_ENSURE(false, "unknown style family");
|
OSL_ENSURE(false, "unknown style family");
|
||||||
bBroadcast = false;
|
bBroadcast = false;
|
||||||
|
Reference in New Issue
Block a user