Kaydet (Commit) 9dc652ec authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Michael Stahl

Convert SV_DECL_PTRARR_DEL(SwGetINetAttrs) to boost::ptr_vector

Change-Id: Iad3903162219e1b015c1266592e5ea742fa967d2
üst cf0e08c6
......@@ -48,6 +48,7 @@
#include <set>
#include <swundo.hxx>
#include <svtools/embedhlp.hxx>
#include <boost/ptr_container/ptr_vector.hpp>
class PolyPolygon;
class SwDoc;
......@@ -139,7 +140,7 @@ struct SwGetINetAttr
: sText( rTxt ), rINetAttr( rAttr )
{}
};
SV_DECL_PTRARR_DEL( SwGetINetAttrs, SwGetINetAttr*, 0 )
typedef boost::ptr_vector<SwGetINetAttr> SwGetINetAttrs;
// Types of forms of content.
#define CNT_TXT 0x0001
......
......@@ -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();
}
......
......@@ -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();
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment