summaryrefslogtreecommitdiff
path: root/sw/source/core/tox
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2015-05-03 23:25:52 +0200
committerKatarina Behrens <Katarina.Behrens@cib.de>2015-05-03 23:31:53 +0200
commit98436c4b53639d86f261ac630c46d32e3c7b8e28 (patch)
treebe3be3fb1cdd44ad92c8a171ef72e00a96815be2 /sw/source/core/tox
parentbc9d02b0ca6244b46c9e2c59b7cc3618eb0f0148 (diff)
tdf#89783: Adjust to new GetPos retval (size_t vs. sal_uInt16)
Some of the usages of GetPos were just misusing it to find out whether a vector contains given element -- use Contains() in those cases This patch is partially based on work of Christoph Lutz Conflicts: sw/source/filter/ww8/wrtw8esh.cxx sw/source/filter/ww8/wrtw8num.cxx Change-Id: I40bedba905e7577ba23f69acee178e0ea7cc1521
Diffstat (limited to 'sw/source/core/tox')
-rw-r--r--sw/source/core/tox/tox.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index dd9bc1177e76..14417ca08b4c 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -461,7 +461,7 @@ SwTOXBase& SwTOXBase::CopyTOXBase( SwDoc* pDoc, const SwTOXBase& rSource )
{
maMSTOCExpression = rSource.maMSTOCExpression;
SwTOXType* pType = const_cast<SwTOXType*>(rSource.GetTOXType());
- if( pDoc && USHRT_MAX == pDoc->GetTOXTypes().GetPos( pType ))
+ if( pDoc && !pDoc->GetTOXTypes().Contains( pType ))
{
// type not in pDoc, so create it now
const SwTOXTypes& rTypes = pDoc->GetTOXTypes();