summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2017-05-01 11:24:26 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-01 18:42:17 +0200
commit680e72353350f6aeaeef0114830b4f941749ece3 (patch)
tree3b52e7b4942e7bfbcf7e1071f3d71e0f3c734753 /sw
parent64cce59975d540f384880034ed3297a120d3d408 (diff)
SwTOXTypes can just be a std::vector typedef
Change-Id: I0b20f4dfdbc692e9122f64a11b65bd4234e00ee7 Reviewed-on: https://gerrit.libreoffice.org/37120 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/doc.hxx1
-rw-r--r--sw/inc/docary.hxx2
-rw-r--r--sw/source/core/tox/tox.cxx2
3 files changed, 2 insertions, 3 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index f75ed2775890..61d57940d2f9 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -117,7 +117,6 @@ class SwSectionData;
class SwSelBoxes;
class SwTableAutoFormatTable;
class SwTOXBaseSection;
-class SwTOXTypes;
class SwTabCols;
class SwTable;
class SwTableAutoFormat;
diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx
index 6d25e85dcc74..255bc8127ff7 100644
--- a/sw/inc/docary.hxx
+++ b/sw/inc/docary.hxx
@@ -300,7 +300,7 @@ public:
void dumpAsXml(struct _xmlTextWriter* pWriter) const;
};
-class SwTOXTypes : public SwVectorModifyBase<SwTOXType*> {};
+typedef std::vector<SwTOXType*> SwTOXTypes;
class SW_DLLPUBLIC SwNumRuleTable : public SwVectorModifyBase<SwNumRule*> {
public:
diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index cb26ad4a6d1b..5b00f54c474a 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -457,7 +457,7 @@ void SwTOXBase::CopyTOXBase( SwDoc* pDoc, const SwTOXBase& rSource )
{
maMSTOCExpression = rSource.maMSTOCExpression;
SwTOXType* pType = const_cast<SwTOXType*>(rSource.GetTOXType());
- if( pDoc && !pDoc->GetTOXTypes().Contains( pType ))
+ if( pDoc && std::find(pDoc->GetTOXTypes().begin(), pDoc->GetTOXTypes().end(), pType) == pDoc->GetTOXTypes().end())
{
// type not in pDoc, so create it now
const SwTOXTypes& rTypes = pDoc->GetTOXTypes();