diff options
author | Noel Grandin <noel@peralex.com> | 2012-05-16 11:24:07 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-05-25 00:17:04 +0200 |
commit | 9dc652ec6a48c2950588815ae79eb0aa809ec336 (patch) | |
tree | 1bb8e21b8569487dd8ec52b1ac6cf570698fd3f1 /sw/source | |
parent | cf0e08c6b8d739b8b17dc533efc3e12505b2d5a9 (diff) |
Convert SV_DECL_PTRARR_DEL(SwGetINetAttrs) to boost::ptr_vector
Change-Id: Iad3903162219e1b015c1266592e5ea742fa967d2
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/edit/editsh.cxx | 9 | ||||
-rw-r--r-- | sw/source/core/text/EnhancedPDFExportHelper.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/utlui/content.cxx | 4 |
3 files changed, 6 insertions, 9 deletions
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index 1ecffe62579a..b5a4691bdb1f 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -71,8 +71,6 @@ using namespace com::sun::star; -SV_IMPL_PTRARR(SwGetINetAttrs, SwGetINetAttr*) - /****************************************************************************** * void SwEditShell::Insert(char c) ******************************************************************************/ @@ -772,8 +770,7 @@ sal_Bool SwEditShell::InsertURL( const SwFmtINetFmt& rFmt, const String& rStr, s sal_uInt16 SwEditShell::GetINetAttrs( SwGetINetAttrs& rArr ) { - if( rArr.Count() ) - rArr.DeleteAndDestroy( 0, rArr.Count() ); + rArr.clear(); const SwTxtNode* pTxtNd; const SwCharFmts* pFmts = GetDoc()->GetCharFmts(); @@ -795,12 +792,12 @@ sal_uInt16 SwEditShell::GetINetAttrs( SwGetINetAttrs& rArr ) if( sTxt.Len() ) { SwGetINetAttr* pNew = new SwGetINetAttr( sTxt, rAttr ); - rArr.C40_INSERT( SwGetINetAttr, pNew, rArr.Count() ); + rArr.push_back( pNew ); } } } } - return rArr.Count(); + return rArr.size(); } diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index 4be6e05cad4c..ff70ebcea5e7 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -1665,7 +1665,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() const sal_uInt16 nHyperLinkCount = mrSh.GetINetAttrs( aArr ); for( sal_uInt16 n = 0; n < nHyperLinkCount; ++n ) { - SwGetINetAttr* p = aArr[ n ]; + SwGetINetAttr* p = &aArr[ n ]; OSL_ENSURE( 0 != p, "Enhanced pdf export - SwGetINetAttr is missing" ); const SwTxtNode* pTNd = p->rINetAttr.GetpTxtNode(); diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx index 71dcc1f41651..b90d3f78755d 100644 --- a/sw/source/ui/utlui/content.cxx +++ b/sw/source/ui/utlui/content.cxx @@ -366,7 +366,7 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow) nMemberCount = pWrtShell->GetINetAttrs( aArr ); for( sal_uInt16 n = 0; n < nMemberCount; ++n ) { - SwGetINetAttr* p = aArr[ n ]; + SwGetINetAttr* p = &aArr[ n ]; SwURLFieldContent* pCnt = new SwURLFieldContent( this, p->sText, @@ -675,7 +675,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibilityChanged) nMemberCount = pWrtShell->GetINetAttrs( aArr ); for( sal_uInt16 n = 0; n < nMemberCount; ++n ) { - SwGetINetAttr* p = aArr[ n ]; + SwGetINetAttr* p = &aArr[ n ]; SwURLFieldContent* pCnt = new SwURLFieldContent( this, p->sText, |