diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2015-05-03 23:25:52 +0200 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2015-05-03 23:31:53 +0200 |
commit | 98436c4b53639d86f261ac630c46d32e3c7b8e28 (patch) | |
tree | be3be3fb1cdd44ad92c8a171ef72e00a96815be2 /sw/source/core/tox | |
parent | bc9d02b0ca6244b46c9e2c59b7cc3618eb0f0148 (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.cxx | 2 |
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(); |