summaryrefslogtreecommitdiff
path: root/sw/source/filter/html
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-04-25 10:57:49 +0200
committerMichael Stahl <mstahl@redhat.com>2012-05-09 08:52:56 +0200
commit6cc15957de9688f92b66457adc22534a883d26dc (patch)
tree3eb8e65a7d30628f581106815f5c7cd9a182ff1e /sw/source/filter/html
parente79a62e1be9a1c10ac84b10a23b5b10362732d0a (diff)
Convert SV_DECL_PTRARR(SwHTMLTxtFtns) to std::vector
Diffstat (limited to 'sw/source/filter/html')
-rw-r--r--sw/source/filter/html/htmlftn.cxx15
-rw-r--r--sw/source/filter/html/wrthtml.hxx4
2 files changed, 8 insertions, 11 deletions
diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx
index 4ca1581d3233..9b85c922c146 100644
--- a/sw/source/filter/html/htmlftn.cxx
+++ b/sw/source/filter/html/htmlftn.cxx
@@ -40,9 +40,6 @@
#include "swhtml.hxx"
#include "wrthtml.hxx"
-typedef SwTxtFtn *SwTxtFtnPtr;
-SV_DECL_PTRARR( SwHTMLTxtFtns, SwTxtFtnPtr, 1 )
-
struct SwHTMLFootEndNote_Impl
{
SwHTMLTxtFtns aTxtFtns;
@@ -226,9 +223,7 @@ void SwHTMLParser::FinishFootEndNote()
// In Kopf- und Fusszeilen duerfen keine Fussnoten eingefuegt werden.
if( pTxtFtn )
{
- pFootEndNoteImpl->aTxtFtns.Insert( pTxtFtn,
- pFootEndNoteImpl->aTxtFtns.Count() );
-
+ pFootEndNoteImpl->aTxtFtns.push_back( pTxtFtn );
pFootEndNoteImpl->aNames.push_back(pFootEndNoteImpl->sName);
}
pFootEndNoteImpl->sName = aEmptyStr;
@@ -264,7 +259,7 @@ SwNodeIndex *SwHTMLParser::GetFootEndNoteSection( const String& rName )
{
pStartNodeIdx = pFootEndNoteImpl->aTxtFtns[i]->GetStartNode();
pFootEndNoteImpl->aNames.erase(pFootEndNoteImpl->aNames.begin() + i);
- pFootEndNoteImpl->aTxtFtns.Remove( i, 1 );
+ pFootEndNoteImpl->aTxtFtns.erase( pFootEndNoteImpl->aTxtFtns.begin() + i );
if(pFootEndNoteImpl->aNames.empty())
{
delete pFootEndNoteImpl;
@@ -292,7 +287,7 @@ Writer& OutHTML_SwFmtFtn( Writer& rWrt, const SfxPoolItem& rHt )
sal_uInt16 nPos;
if( rFmtFtn.IsEndNote() )
{
- nPos = rHTMLWrt.pFootEndNotes ? rHTMLWrt.pFootEndNotes->Count() : 0;
+ nPos = rHTMLWrt.pFootEndNotes ? rHTMLWrt.pFootEndNotes->size() : 0;
OSL_ENSURE( nPos == rHTMLWrt.nFootNote + rHTMLWrt.nEndNote,
"OutHTML_SwFmtFtn: Position falsch" );
sClass.AssignAscii( OOO_STRING_SVTOOLS_HTML_sdendnote_anc );
@@ -309,7 +304,7 @@ Writer& OutHTML_SwFmtFtn( Writer& rWrt, const SfxPoolItem& rHt )
if( !rHTMLWrt.pFootEndNotes )
rHTMLWrt.pFootEndNotes = new SwHTMLTxtFtns;
- rHTMLWrt.pFootEndNotes->Insert( pTxtFtn, nPos );
+ rHTMLWrt.pFootEndNotes->insert( rHTMLWrt.pFootEndNotes->begin() + nPos, pTxtFtn );
rtl::OStringBuffer sOut;
sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_anchor).append(' ')
@@ -350,7 +345,7 @@ void SwHTMLWriter::OutFootEndNotes()
#endif
nFootNote = 0, nEndNote = 0;
- for( sal_uInt16 i=0; i<pFootEndNotes->Count(); i++ )
+ for( sal_uInt16 i=0; i<pFootEndNotes->size(); i++ )
{
SwTxtFtn *pTxtFtn = (*pFootEndNotes)[i];
pFmtFtn = &pTxtFtn->GetFtn();
diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx
index e659b8f6cecf..2b328e4d48ed 100644
--- a/sw/source/filter/html/wrthtml.hxx
+++ b/sw/source/filter/html/wrthtml.hxx
@@ -61,7 +61,9 @@ class SvxBrushItem;
class SvxFontItem;
class SwHTMLNumRuleInfo;
class SwHTMLPosFlyFrms;
-class SwHTMLTxtFtns;
+class SwTxtFtn;
+
+typedef std::vector<SwTxtFtn *> SwHTMLTxtFtns;
extern SwAttrFnTab aHTMLAttrFnTab;