diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-08-18 23:03:35 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-08-20 16:40:15 +0200 |
commit | c5390b3ee9d04a22817335208d8db673c4463a95 (patch) | |
tree | caebdad1f43d512dc275436cf4ab796694cc8008 /sw | |
parent | 57b29dc9d475b8b674b32bf5d073175bac61ac14 (diff) |
SwXDocumentIndexMark::CreateXDocumentIndexMark does not need SwTOXType
... passed in as parameter since it's always the one from pMark.
Change-Id: Ia5981b0f281c8cac70cbb305c82bb6785918168a
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/inc/unoidx.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unocoll.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unocrsrhelper.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/unocore/unoidx.cxx | 10 | ||||
-rw-r--r-- | sw/source/core/unocore/unoportenum.cxx | 3 |
5 files changed, 8 insertions, 12 deletions
diff --git a/sw/source/core/inc/unoidx.hxx b/sw/source/core/inc/unoidx.hxx index 246bd9c45866..4dfcc2412f0f 100644 --- a/sw/source/core/inc/unoidx.hxx +++ b/sw/source/core/inc/unoidx.hxx @@ -222,7 +222,7 @@ public: static ::com::sun::star::uno::Reference< ::com::sun::star::text::XDocumentIndexMark> CreateXDocumentIndexMark(SwDoc & rDoc, - SwTOXType * pType, SwTOXMark * pMark, TOXTypes eType = TOX_INDEX); + SwTOXMark * pMark, TOXTypes eType = TOX_INDEX); static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index 1ac957a98371..584293d1618a 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -627,7 +627,7 @@ uno::Reference< uno::XInterface > SwXServiceProvider::MakeInstance(sal_uInt16 eType = TOX_CONTENT; else if(SW_SERVICE_USER_INDEX_MARK == nObjectType) eType = TOX_USER; - xRet = SwXDocumentIndexMark::CreateXDocumentIndexMark(*pDoc, 0, 0, eType); + xRet = SwXDocumentIndexMark::CreateXDocumentIndexMark(*pDoc, 0, eType); } break; case SW_SERVICE_CONTENT_INDEX : diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index ef7e417fad7a..71610597968c 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -481,8 +481,7 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry static_cast<SwTOXMark &>((*marks.begin())->GetAttr()); const uno::Reference< text::XDocumentIndexMark > xRef = SwXDocumentIndexMark::CreateXDocumentIndexMark( - *rPam.GetDoc(), - const_cast<SwTOXType*>(rMark.GetTOXType()), &rMark); + *rPam.GetDoc(), &rMark); (*pAny) <<= xRef; } } diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 550f9f8a30e8..bde57ed92de7 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -1197,8 +1197,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, { SwTOXMark* pMark = aMarks[i]; pxMarks[i] = SwXDocumentIndexMark::CreateXDocumentIndexMark( - *m_pImpl->m_pDoc, - const_cast<SwTOXType*>(pType), pMark); + *m_pImpl->m_pDoc, pMark); } aRet <<= aXMarks; } @@ -1674,10 +1673,8 @@ SwXDocumentIndexMark::~SwXDocumentIndexMark() uno::Reference<text::XDocumentIndexMark> SwXDocumentIndexMark::CreateXDocumentIndexMark( - SwDoc & rDoc, SwTOXType *const pType, SwTOXMark *const pMark, - TOXTypes const eType) + SwDoc & rDoc, SwTOXMark *const pMark, TOXTypes const eType) { - assert((pType != 0) == (pMark != 0)); // re-use existing SwXDocumentIndexMark // NB: xmloff depends on this caching to generate ID from the address! // #i105557#: do not iterate over the registered clients: race condition @@ -1689,7 +1686,8 @@ SwXDocumentIndexMark::CreateXDocumentIndexMark( if (!xTOXMark.is()) { SwXDocumentIndexMark *const pNew((pMark) - ? new SwXDocumentIndexMark(rDoc, *pType, *pMark) + ? new SwXDocumentIndexMark(rDoc, + *const_cast<SwTOXType*>(pMark->GetTOXType()), *pMark) : new SwXDocumentIndexMark(eType)); xTOXMark.set(pNew); if (pMark) diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index 9eabdcf50699..e021622d2c96 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -537,8 +537,7 @@ lcl_CreateTOXMarkPortion( SwTOXMark & rTOXMark = static_cast<SwTOXMark&>(rAttr.GetAttr()); const Reference<XTextContent> xContent( - SwXDocumentIndexMark::CreateXDocumentIndexMark(*pDoc, - const_cast<SwTOXType*>(rTOXMark.GetTOXType()), & rTOXMark), + SwXDocumentIndexMark::CreateXDocumentIndexMark(*pDoc, & rTOXMark), uno::UNO_QUERY); SwXTextPortion* pPortion = 0; |