diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2016-08-31 19:58:14 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-09-01 06:46:46 +0000 |
commit | 705574be7ab3425ce7e43b38771b4f7e1b246f27 (patch) | |
tree | 3b16e9cd7f078882d77ae881dee141ac77a55e63 /sw | |
parent | c48f940cf888816b3282b1c82136f57c010f1236 (diff) |
use SfxItemPool::IsWhich instead of custom implementation
Change-Id: I56cbdc1ede491486643f73a98117c5cd4ce77c1d
Reviewed-on: https://gerrit.libreoffice.org/28564
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/unocore/unosect.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlexpit.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlimpit.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlitemi.cxx | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index 64ffaebf29ee..39b2ddaf5954 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -1563,7 +1563,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception) break; default: { - if (pEntry->nWID <= SFX_WHICH_MAX) + if (SfxItemPool::IsWhich(pEntry->nWID)) { if (pFormat) { @@ -1634,7 +1634,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, ::sw::GetDefaultTextContentValue(aRet, OUString(), pEntry->nWID); break; default: - if(pFormat && pEntry->nWID <= SFX_WHICH_MAX) + if(pFormat && SfxItemPool::IsWhich(pEntry->nWID)) { SwDoc *const pDoc = pFormat->GetDoc(); const SfxPoolItem& rDefItem = diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx index a721d6c7863d..6c96f8ba2ee9 100644 --- a/sw/source/filter/xml/xmlexpit.cxx +++ b/sw/source/filter/xml/xmlexpit.cxx @@ -267,7 +267,7 @@ const SfxPoolItem* SvXMLExportItemMapper::GetItem( const SfxItemSet& rSet, return pItem; } else if( (nFlags & SvXmlExportFlags::DEFAULTS) && - SFX_WHICH_MAX > nWhichId ) + SfxItemPool::IsWhich(nWhichId)) { // if its not set, try the pool if we export defaults return &rSet.GetPool()->GetDefaultItem(nWhichId); diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx index 340e1a01713a..e7a356ba8b03 100644 --- a/sw/source/filter/xml/xmlimpit.cxx +++ b/sw/source/filter/xml/xmlimpit.cxx @@ -110,7 +110,7 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet, &pItem ); // if its not set, try the pool - if(SfxItemState::SET != eState && SFX_WHICH_MAX > pEntry->nWhichId ) + if (SfxItemState::SET != eState && SfxItemPool::IsWhich(pEntry->nWhichId)) pItem = &rSet.GetPool()->GetDefaultItem(pEntry->nWhichId); // do we have an item? diff --git a/sw/source/filter/xml/xmlitemi.cxx b/sw/source/filter/xml/xmlitemi.cxx index 9160dd24ad1a..e5b1d5825e6a 100644 --- a/sw/source/filter/xml/xmlitemi.cxx +++ b/sw/source/filter/xml/xmlitemi.cxx @@ -217,7 +217,7 @@ void SwXMLImportTableItemMapper_Impl::finished( rSet.GetItemState(Ids[i][0], true, &pItem); // if not set, try the pool - if ((SfxItemState::SET != eState) && (SFX_WHICH_MAX > Ids[i][0])) + if ((SfxItemState::SET != eState) && SfxItemPool::IsWhich(Ids[i][0])) { pItem = &rSet.GetPool()->GetDefaultItem(Ids[i][0]); } |