summaryrefslogtreecommitdiffstats
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-05-16 11:24:07 +0200
committerMichael Stahl <mstahl@redhat.com>2012-05-25 00:17:04 +0200
commit9dc652ec6a48c2950588815ae79eb0aa809ec336 (patch)
tree1bb8e21b8569487dd8ec52b1ac6cf570698fd3f1 /sw
parentConvert SV_DECL_PTRARR_SORT_VISIBILITY(SwPosFlyFrms) to std::set (diff)
downloadcore-9dc652ec6a48c2950588815ae79eb0aa809ec336.tar.gz
core-9dc652ec6a48c2950588815ae79eb0aa809ec336.zip
Convert SV_DECL_PTRARR_DEL(SwGetINetAttrs) to boost::ptr_vector
Change-Id: Iad3903162219e1b015c1266592e5ea742fa967d2
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/editsh.hxx3
-rw-r--r--sw/source/core/edit/editsh.cxx9
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx2
-rw-r--r--sw/source/ui/utlui/content.cxx4
4 files changed, 8 insertions, 10 deletions
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index ecb77d578418..8455ad020304 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -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
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,