Kaydet (Commit) 925dabe8 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Noel Grandin

Revert "SwTOXTypes can just be a std::vector typedef"

This reverts commit f894da4e687302702d14218138f96ed1c4983124.

the default behaviour of SwVectorModifyBase is to free the
elements in it's destructor

Change-Id: I7a34fe5cc3cb8ffbcbb92068f4bb816dfd9acd43
Reviewed-on: https://gerrit.libreoffice.org/37168Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 4c687658
......@@ -117,6 +117,7 @@ class SwSectionData;
class SwSelBoxes;
class SwTableAutoFormatTable;
class SwTOXBaseSection;
class SwTOXTypes;
class SwTabCols;
class SwTable;
class SwTableAutoFormat;
......
......@@ -300,7 +300,7 @@ public:
void dumpAsXml(struct _xmlTextWriter* pWriter) const;
};
typedef std::vector<SwTOXType*> SwTOXTypes;
class SwTOXTypes : public SwVectorModifyBase<SwTOXType*> {};
class SW_DLLPUBLIC SwNumRuleTable : public SwVectorModifyBase<SwNumRule*> {
public:
......
......@@ -457,7 +457,7 @@ void SwTOXBase::CopyTOXBase( SwDoc* pDoc, const SwTOXBase& rSource )
{
maMSTOCExpression = rSource.maMSTOCExpression;
SwTOXType* pType = const_cast<SwTOXType*>(rSource.GetTOXType());
if( pDoc && std::find(pDoc->GetTOXTypes().begin(), pDoc->GetTOXTypes().end(), pType) == pDoc->GetTOXTypes().end())
if( pDoc && !pDoc->GetTOXTypes().Contains( pType ))
{
// type not in pDoc, so create it now
const SwTOXTypes& rTypes = pDoc->GetTOXTypes();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment