summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMaciej Rumianowski <maciej.rumianowski@gmail.com>2011-10-02 19:22:10 +0200
committerJan Holesovsky <kendy@suse.cz>2011-10-07 00:21:07 +0200
commit6cdc31837c73accca69ed9b1702e269f50c96bff (patch)
tree5419edc94fde4c2469cffbbc32286598dae7fcc7 /sw
parentf1eda55a0670cd571d676b46d2ac19fe86d51a3f (diff)
1st part of Replace WW8Bytes with ww::bytes
Change WW8Export::pO to ww::bytes and other related
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx16
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx53
-rw-r--r--sw/source/filter/ww8/wrtw8num.cxx20
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx101
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx96
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx14
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx10
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx274
8 files changed, 283 insertions, 301 deletions
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 7695670cfcd3..68874efe4c54 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -1181,7 +1181,7 @@ void WW8Export::WriteOutliner(const OutlinerParaObject& rParaObj, sal_uInt8 nTyp
rtl_TextEncoding eChrSet = aAttrIter.GetNodeCharSet();
- OSL_ENSURE( !pO->Count(), " pO ist am Zeilenanfang nicht leer" );
+ OSL_ENSURE( pO->empty(), " pO ist am Zeilenanfang nicht leer" );
String aStr( rEditObj.GetText( n ));
xub_StrLen nAktPos = 0;
@@ -1206,8 +1206,8 @@ void WW8Export::WriteOutliner(const OutlinerParaObject& rParaObj, sal_uInt8 nTyp
// Ausgabe der Zeichenattribute
aAttrIter.OutAttr( nAktPos ); // nAktPos - 1 ??
pChpPlc->AppendFkpEntry( Strm().Tell(),
- pO->Count(), pO->GetData() );
- pO->Remove( 0, pO->Count() ); // leeren
+ pO->size(), pO->data() );
+ pO->clear();
// Ausnahme: Fussnoten am Zeilenende
if( nNextAttr == nEnd && bTxtAtr )
@@ -1218,17 +1218,17 @@ void WW8Export::WriteOutliner(const OutlinerParaObject& rParaObj, sal_uInt8 nTyp
}
while( nAktPos < nEnd );
- OSL_ENSURE( !pO->Count(), " pO ist am ZeilenEnde nicht leer" );
+ OSL_ENSURE( pO->empty(), " pO ist am ZeilenEnde nicht leer" );
- pO->Insert( bNul, pO->Count() ); // Style # as short
- pO->Insert( bNul, pO->Count() );
+ pO->push_back( bNul ); // Style # as short
+ pO->push_back( bNul );
aAttrIter.OutParaAttr(false);
sal_uLong nPos = Strm().Tell();
pPapPlc->AppendFkpEntry( Strm().Tell(),
- pO->Count(), pO->GetData() );
- pO->Remove( 0, pO->Count() ); // leeren
+ pO->size(), pO->data() );
+ pO->clear();
pChpPlc->AppendFkpEntry( nPos );
}
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 23af24933542..7d64e842892e 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -629,7 +629,7 @@ const SfxPoolItem* SwWW8AttrIter::HasTextItem( sal_uInt16 nWhich ) const
void WW8Export::GetCurrentItems(WW8Bytes& rItems) const
{
- sal_uInt16 nEnd = pO ? pO->Count() : 0;
+ sal_uInt16 nEnd = pO ? pO->size() : 0;
for (sal_uInt16 nI = 0; nI < nEnd; ++nI)
rItems.Insert((*pO)[nI], rItems.Count());
}
@@ -1512,15 +1512,15 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
SVBT16 nSty;
ShortToSVBT16( nStyle, nSty );
- m_rWW8Export.pO->Insert( (sal_uInt8*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->insert( m_rWW8Export.pO->end(), (sal_uInt8*)&nSty, (sal_uInt8*)&nSty+2 ); // Style #
if ( m_rWW8Export.bWrtWW8 )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_PPc ); // Alignment (sprmPPc)
- m_rWW8Export.pO->Insert( 0x20, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 0x20 );
m_rWW8Export.InsUInt16( NS_sprm::LN_PWr ); // Wrapping (sprmPWr)
- m_rWW8Export.pO->Insert( 0x02, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 0x02 );
m_rWW8Export.InsUInt16( NS_sprm::LN_PDcs ); // Dropcap (sprmPDcs)
int nDCS = ( nDropLines << 3 ) | 0x01;
@@ -1538,22 +1538,22 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
}
else
{
- m_rWW8Export.pO->Insert( 29, m_rWW8Export.pO->Count() ); // Alignment (sprmPPc)
- m_rWW8Export.pO->Insert( 0x20, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 29 ); // Alignment (sprmPPc)
+ m_rWW8Export.pO->push_back( 0x20 );
- m_rWW8Export.pO->Insert( 37, m_rWW8Export.pO->Count() ); // Wrapping (sprmPWr)
- m_rWW8Export.pO->Insert( 0x02, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 37 ); // Wrapping (sprmPWr)
+ m_rWW8Export.pO->push_back( 0x02 );
- m_rWW8Export.pO->Insert( 46, m_rWW8Export.pO->Count() ); // Dropcap (sprmPDcs)
+ m_rWW8Export.pO->push_back( 46 ); // Dropcap (sprmPDcs)
int nDCS = ( nDropLines << 3 ) | 0x01;
m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( nDCS ) );
- m_rWW8Export.pO->Insert( 49, m_rWW8Export.pO->Count() ); // Distance from text (sprmPDxaFromText)
+ m_rWW8Export.pO->push_back( 49 ); // Distance from text (sprmPDxaFromText)
m_rWW8Export.InsUInt16( nDistance );
if (rNode.GetDropSize(rFontHeight, rDropHeight, rDropDescent))
{
- m_rWW8Export.pO->Insert( 20, m_rWW8Export.pO->Count() ); // Line spacing
+ m_rWW8Export.pO->push_back( 20 ); // Line spacing
m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( -rDropHeight ) );
m_rWW8Export.InsUInt16( 0 );
}
@@ -1570,8 +1570,8 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
TableInfoCell( pTextNodeInfoInner );
}
- m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(), m_rWW8Export.pO->GetData() );
- m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->size(), m_rWW8Export.pO->data() );
+ m_rWW8Export.pO->clear();
if ( rNode.GetDropSize( rFontHeight, rDropHeight, rDropDescent ) )
{
@@ -1599,16 +1599,16 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
m_rWW8Export.InsUInt16( m_rWW8Export.GetId( *pSwCharFmt ) );
}
- m_rWW8Export.pO->Insert( 101, m_rWW8Export.pO->Count() ); // Lower the chars
+ m_rWW8Export.pO->push_back( 101 ); // Lower the chars
m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( -((nDropLines - 1)*rDropDescent) / 10 ) );
- m_rWW8Export.pO->Insert( 99, m_rWW8Export.pO->Count() ); // Font Size
+ m_rWW8Export.pO->push_back( 99 ); // Font Size
m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( rFontHeight / 10 ) );
}
}
- m_rWW8Export.pChpPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(), m_rWW8Export.pO->GetData() );
- m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pChpPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->size(), m_rWW8Export.pO->data() );
+ m_rWW8Export.pO->clear();
}
xub_StrLen MSWordExportBase::GetNextPos( SwWW8AttrIter* aAttrIter, const SwTxtNode& rNode, xub_StrLen nAktPos )
@@ -2370,11 +2370,10 @@ void WW8AttributeOutput::TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t pNodeIn
{
TableRowEnd( pInner->getDepth() );
- m_rWW8Export.pO->Insert( (sal_uInt8*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->insert( m_rWW8Export.pO->end(), (sal_uInt8*)&nSty, (sal_uInt8*)&nSty+2); // Style #
TableInfoRow( pInner );
- m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
- m_rWW8Export.pO->GetData() );
- m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); // leeren
+ m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->size(), m_rWW8Export.pO->data());
+ m_rWW8Export.pO->clear();
}
if ( pInner->isEndOfLine() )
@@ -2704,8 +2703,8 @@ void WW8AttributeOutput::Redline( const SwRedlineData* pRedline )
if( m_rWW8Export.bWrtWW8 )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_CPropRMark );
- m_rWW8Export.pO->Insert( 7, m_rWW8Export.pO->Count() ); // len
- m_rWW8Export.pO->Insert( 1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 7 ); // len
+ m_rWW8Export.pO->push_back( 1 );
m_rWW8Export.InsUInt16( m_rWW8Export.AddRedlineAuthor( pRedline->GetAuthor() ) );
m_rWW8Export.InsUInt32( sw::ms::DateTime2DTTM( pRedline->GetTimeStamp() ));
}
@@ -2723,19 +2722,19 @@ void WW8AttributeOutput::Redline( const SwRedlineData* pRedline )
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( pSprmIds[0] );
else
- m_rWW8Export.pO->Insert( msword_cast<sal_uInt8>(pSprmIds[0]), m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( 1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( msword_cast<sal_uInt8>(pSprmIds[0]) );
+ m_rWW8Export.pO->push_back( 1 );
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( pSprmIds[1] );
else
- m_rWW8Export.pO->Insert( msword_cast<sal_uInt8>(pSprmIds[1]), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( msword_cast<sal_uInt8>(pSprmIds[1]) );
m_rWW8Export.InsUInt16( m_rWW8Export.AddRedlineAuthor( pRedline->GetAuthor() ) );
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( pSprmIds[2] );
else
- m_rWW8Export.pO->Insert( msword_cast<sal_uInt8>(pSprmIds[2]), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( msword_cast<sal_uInt8>(pSprmIds[2]) );
m_rWW8Export.InsUInt32( sw::ms::DateTime2DTTM( pRedline->GetTimeStamp() ));
}
}
diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx
index 5be03695a395..0fad84404c4b 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -244,10 +244,10 @@ void WW8AttributeOutput::NumberingLevel( sal_uInt8 /*nLevel*/,
SwWW8Writer::WriteLong( *m_rWW8Export.pTableStrm, 0 );
// cbGrpprlChpx
- WW8Bytes aCharAtrs;
+ ww::bytes aCharAtrs;
if ( pOutSet )
{
- WW8Bytes* pOldpO = m_rWW8Export.pO;
+ ww::bytes* pOldpO = m_rWW8Export.pO;
m_rWW8Export.pO = &aCharAtrs;
if ( pFont )
{
@@ -260,7 +260,7 @@ void WW8AttributeOutput::NumberingLevel( sal_uInt8 /*nLevel*/,
m_rWW8Export.InsUInt16( NS_sprm::LN_CRgFtc2 );
}
else
- m_rWW8Export.pO->Insert( 93, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 93 );
m_rWW8Export.InsUInt16( nFontID );
}
@@ -268,7 +268,7 @@ void WW8AttributeOutput::NumberingLevel( sal_uInt8 /*nLevel*/,
m_rWW8Export.pO = pOldpO;
}
- *m_rWW8Export.pTableStrm << sal_uInt8( aCharAtrs.Count() );
+ *m_rWW8Export.pTableStrm << sal_uInt8( aCharAtrs.size() );
// cbGrpprlPapx
sal_uInt8 aPapSprms [] = {
@@ -292,8 +292,8 @@ void WW8AttributeOutput::NumberingLevel( sal_uInt8 /*nLevel*/,
m_rWW8Export.pTableStrm->Write( aPapSprms, sizeof( aPapSprms ));
// write Chpx
- if( aCharAtrs.Count() )
- m_rWW8Export.pTableStrm->Write( aCharAtrs.GetData(), aCharAtrs.Count() );
+ if( !aCharAtrs.empty() )
+ m_rWW8Export.pTableStrm->Write( aCharAtrs.data(), aCharAtrs.size() );
// write the num string
SwWW8Writer::WriteShort( *m_rWW8Export.pTableStrm, rNumberingString.Len() );
@@ -567,7 +567,7 @@ void WW8Export::OutputOlst( const SwNumRule& rRule )
static sal_uInt8 aSprmOlstHdr[] = { 133, 212 };
- pO->Insert( aSprmOlstHdr, sizeof( aSprmOlstHdr ), pO->Count() );
+ pO->insert( pO->end(), aSprmOlstHdr, aSprmOlstHdr+sizeof( aSprmOlstHdr ) );
WW8_OLST aOlst;
memset( &aOlst, 0, sizeof(aOlst) );
sal_uInt8* pC = aOlst.rgch;
@@ -584,14 +584,14 @@ void WW8Export::OutputOlst( const SwNumRule& rRule )
*pFmt, (sal_uInt8)j );
}
- pO->Insert( (sal_uInt8*)&aOlst, sizeof( aOlst ), pO->Count() );
+ pO->insert( pO->end(), (sal_uInt8*)&aOlst, (sal_uInt8*)&aOlst+sizeof( aOlst ) );
}
void WW8Export::Out_WwNumLvl( sal_uInt8 nWwLevel )
{
- pO->Insert( 13, pO->Count() );
- pO->Insert( nWwLevel, pO->Count() );
+ pO->push_back( 13 );
+ pO->push_back( nWwLevel );
}
void WW8Export::Out_SwNumLvl( sal_uInt8 nSwLevel )
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 56251aec3659..1fbd1d3cb5fc 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -294,24 +294,24 @@ void MSWordStyles::BuildStylesTable()
}
/// For WW8 only - extend pO so that the size of pTableStrm is even.
-static void impl_SkipOdd( WW8Bytes* pO, sal_Size nTableStrmTell )
+static void impl_SkipOdd( ww::bytes* pO, sal_Size nTableStrmTell )
{
- if ( ( nTableStrmTell + pO->Count() ) & 1 ) // Start auf gerader
- pO->Insert( (sal_uInt8)0, pO->Count() ); // Adresse
+ if ( ( nTableStrmTell + pO->size() ) & 1 ) // Start auf gerader
+ pO->push_back( (sal_uInt8)0 ); // Adresse
}
void WW8AttributeOutput::EndStyle()
{
impl_SkipOdd( m_rWW8Export.pO, m_rWW8Export.pTableStrm->Tell() );
- short nLen = m_rWW8Export.pO->Count() - 2; // Laenge des Styles
- sal_uInt8* p = (sal_uInt8*)m_rWW8Export.pO->GetData() + nPOPosStdLen1;
+ short nLen = m_rWW8Export.pO->size() - 2; // Laenge des Styles
+ sal_uInt8* p = &m_rWW8Export.pO->front() + nPOPosStdLen1;
ShortToSVBT16( nLen, p ); // nachtragen
- p = (sal_uInt8*)m_rWW8Export.pO->GetData() + nPOPosStdLen2;
+ p = &m_rWW8Export.pO->front() + nPOPosStdLen2;
ShortToSVBT16( nLen, p ); // dito
- m_rWW8Export.pTableStrm->Write( m_rWW8Export.pO->GetData(), m_rWW8Export.pO->Count() ); // ins File damit
- m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); // leeren fuer naechsten
+ m_rWW8Export.pTableStrm->Write( m_rWW8Export.pO->data(), m_rWW8Export.pO->size() ); // ins File damit
+ m_rWW8Export.pO->clear();
}
void WW8AttributeOutput::StartStyle( const String& rName, bool bPapFmt, sal_uInt16 nWwBase,
@@ -349,26 +349,25 @@ void WW8AttributeOutput::StartStyle( const String& rName, bool bPapFmt, sal_uInt
sal_uInt16 nLen = static_cast< sal_uInt16 >( ( pData - aWW8_STD ) + 1 +
((m_rWW8Export.bWrtWW8 ? 2 : 1 ) * (rName.Len() + 1)) ); // vorlaeufig
- WW8Bytes* pO = m_rWW8Export.pO;
- nPOPosStdLen1 = pO->Count(); // Adr1 zum nachtragen der Laenge
+ nPOPosStdLen1 = m_rWW8Export.pO->size(); // Adr1 zum nachtragen der Laenge
- SwWW8Writer::InsUInt16( *pO, nLen );
- pO->Insert( aWW8_STD, static_cast< sal_uInt16 >( pData - aWW8_STD ), pO->Count() );
+ SwWW8Writer::InsUInt16( *m_rWW8Export.pO, nLen );
+ m_rWW8Export.pO->insert( m_rWW8Export.pO->end(), aWW8_STD, pData );
nPOPosStdLen2 = nPOPosStdLen1 + 8; // Adr2 zum nachtragen von "end of upx"
// Namen schreiben
if( m_rWW8Export.bWrtWW8 )
{
- SwWW8Writer::InsUInt16( *pO, rName.Len() ); // Laenge
- SwWW8Writer::InsAsString16( *pO, rName );
+ SwWW8Writer::InsUInt16( *m_rWW8Export.pO, rName.Len() ); // Laenge
+ SwWW8Writer::InsAsString16( *m_rWW8Export.pO, rName );
}
else
{
- pO->Insert( (sal_uInt8)rName.Len(), pO->Count() ); // Laenge
- SwWW8Writer::InsAsString8( *pO, rName, RTL_TEXTENCODING_MS_1252 );
+ m_rWW8Export.pO->push_back( (sal_uInt8)rName.Len() ); // Laenge
+ SwWW8Writer::InsAsString8( *m_rWW8Export.pO, rName, RTL_TEXTENCODING_MS_1252 );
}
- pO->Insert( (sal_uInt8)0, pO->Count() ); // Trotz P-String 0 am Ende!
+ m_rWW8Export.pO->push_back( (sal_uInt8)0 ); // Trotz P-String 0 am Ende!
}
void MSWordStyles::SetStyleDefaults( const SwFmt& rFmt, bool bPap )
@@ -425,21 +424,19 @@ void MSWordStyles::SetStyleDefaults( const SwFmt& rFmt, bool bPap )
void WW8AttributeOutput::StartStyleProperties( bool bParProp, sal_uInt16 nStyle )
{
- WW8Bytes* pO = m_rWW8Export.pO;
-
- impl_SkipOdd( pO, m_rWW8Export.pTableStrm->Tell() );
+ impl_SkipOdd( m_rWW8Export.pO, m_rWW8Export.pTableStrm->Tell() );
sal_uInt16 nLen = ( bParProp ) ? 2 : 0; // Default-Laenge
- m_nStyleLenPos = pO->Count(); // Laenge zum Nachtragen
+ m_nStyleLenPos = m_rWW8Export.pO->size(); // Laenge zum Nachtragen
// Keinen Pointer merken, da sich bei
// _grow der Pointer aendert !
- SwWW8Writer::InsUInt16( *pO, nLen ); // Style-Len
+ SwWW8Writer::InsUInt16( *m_rWW8Export.pO, nLen ); // Style-Len
- m_nStyleStartSize = pO->Count();
+ m_nStyleStartSize = m_rWW8Export.pO->size();
if ( bParProp )
- SwWW8Writer::InsUInt16( *pO, nStyle ); // Style-Nummer
+ SwWW8Writer::InsUInt16( *m_rWW8Export.pO, nStyle ); // Style-Nummer
}
void MSWordStyles::WriteProperties( const SwFmt* pFmt, bool bParProp, sal_uInt16 nPos,
@@ -464,10 +461,8 @@ void MSWordStyles::WriteProperties( const SwFmt* pFmt, bool bParProp, sal_uInt16
void WW8AttributeOutput::EndStyleProperties( bool /*bParProp*/ )
{
- WW8Bytes* pO = m_rWW8Export.pO;
-
- sal_uInt16 nLen = pO->Count() - m_nStyleStartSize;
- sal_uInt8* pUpxLen = (sal_uInt8*)pO->GetData() + m_nStyleLenPos; // Laenge zum Nachtragen
+ sal_uInt16 nLen = m_rWW8Export.pO->size() - m_nStyleStartSize;
+ sal_uInt8* pUpxLen = &m_rWW8Export.pO->front() + m_nStyleLenPos; // Laenge zum Nachtragen
ShortToSVBT16( nLen, pUpxLen ); // Default-Laenge eintragen
}
@@ -1289,7 +1284,7 @@ int MSWordSections::HasBorderItem( const SwFmt& rFmt )
void WW8AttributeOutput::StartSection()
{
- m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); // leeren
+ m_rWW8Export.pO->clear();
}
void WW8AttributeOutput::SectionFormProtection( bool bProtected )
@@ -1301,8 +1296,8 @@ void WW8AttributeOutput::SectionFormProtection( bool bProtected )
if ( m_rWW8Export.bWrtWW8 )
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_SFProtected );
else
- m_rWW8Export.pO->Insert( 139, m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( 1 , m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 139 );
+ m_rWW8Export.pO->push_back( 1 );
}
}
@@ -1312,14 +1307,14 @@ void WW8AttributeOutput::SectionLineNumbering( sal_uLong nRestartNo, const SwLin
if ( m_rWW8Export.bWrtWW8 )
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_SNLnnMod );
else
- m_rWW8Export.pO->Insert( 154, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 154 );
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, (sal_uInt16)rLnNumInfo.GetCountBy() );
// sprmSDxaLnn - xPosition of Line Number
if ( m_rWW8Export.bWrtWW8 )
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_SDxaLnn );
else
- m_rWW8Export.pO->Insert( 155, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 155 );
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, (sal_uInt16)rLnNumInfo.GetPosFromLeft() );
// sprmSLnc - restart number: 0 per page, 1 per section, 2 never restart
@@ -1328,8 +1323,8 @@ void WW8AttributeOutput::SectionLineNumbering( sal_uLong nRestartNo, const SwLin
if ( m_rWW8Export.bWrtWW8 )
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_SLnc );
else
- m_rWW8Export.pO->Insert( 152, m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( nRestartNo ? 1 : 2, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 152 );
+ m_rWW8Export.pO->push_back( nRestartNo ? 1 : 2 );
}
// sprmSLnnMin - Restart the Line Number with given value
@@ -1338,7 +1333,7 @@ void WW8AttributeOutput::SectionLineNumbering( sal_uLong nRestartNo, const SwLin
if ( m_rWW8Export.bWrtWW8 )
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_SLnnMin );
else
- m_rWW8Export.pO->Insert( 160, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 160 );
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, (sal_uInt16)nRestartNo - 1 );
}
}
@@ -1349,8 +1344,8 @@ void WW8AttributeOutput::SectionTitlePage()
if ( m_rWW8Export.bWrtWW8 )
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_SFTitlePage );
else
- m_rWW8Export.pO->Insert( 143, m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( 1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 143 );
+ m_rWW8Export.pO->push_back( 1 );
}
void WW8AttributeOutput::SectionPageBorders( const SwFrmFmt* pPdFmt, const SwFrmFmt* pPdFirstPgFmt )
@@ -1389,7 +1384,7 @@ void WW8AttributeOutput::SectionBiDi( bool bBiDi )
if ( m_rWW8Export.bWrtWW8 )
{
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_SFBiDi );
- m_rWW8Export.pO->Insert( bBiDi? 1: 0, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( bBiDi? 1: 0 );
}
}
@@ -1400,8 +1395,8 @@ void WW8AttributeOutput::SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 n
if ( m_rWW8Export.bWrtWW8 )
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_SNfcPgn );
else
- m_rWW8Export.pO->Insert( 147, m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( nb, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 147 );
+ m_rWW8Export.pO->push_back( nb );
if ( nPageRestartNumber )
{
@@ -1409,14 +1404,14 @@ void WW8AttributeOutput::SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 n
if ( m_rWW8Export.bWrtWW8 )
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_SFPgnRestart );
else
- m_rWW8Export.pO->Insert( 150, m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( 1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 150 );
+ m_rWW8Export.pO->push_back( 1 );
// sprmSPgnStart
if ( m_rWW8Export.bWrtWW8 )
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_SPgnStart );
else
- m_rWW8Export.pO->Insert( 161, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 161 );
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, nPageRestartNumber );
}
}
@@ -1428,8 +1423,8 @@ void WW8AttributeOutput::SectionType( sal_uInt8 nBreakCode )
if ( m_rWW8Export.bWrtWW8 )
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_SBkc );
else
- m_rWW8Export.pO->Insert( 142, m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( nBreakCode, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 142 );
+ m_rWW8Export.pO->push_back( nBreakCode );
}
}
@@ -1448,8 +1443,8 @@ void WW8AttributeOutput::SectionWW6HeaderFooterFlags( sal_uInt8 nHeadFootFlags )
}
// sprmSGprfIhdt, wird nur noch im WW95 benoetigt
- m_rWW8Export.pO->Insert( 153, m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( nTmpFlags, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 153 );
+ m_rWW8Export.pO->push_back( nTmpFlags );
}
}
@@ -1458,12 +1453,12 @@ void WW8Export::SetupSectionPositions( WW8_PdAttrDesc* pA )
if ( !pA )
return;
- if ( pO->Count() )
+ if ( !pO->empty() )
{ // waren Attrs vorhanden ?
- pA->nLen = pO->Count();
- pA->pData = new sal_uInt8 [pO->Count()];
- memcpy( pA->pData, pO->GetData(), pO->Count() ); // -> merken
- pO->Remove( 0, pO->Count() ); // leeren fuer HdFt-Text
+ pA->nLen = pO->size();
+ pA->pData = new sal_uInt8 [pO->size()];
+ memcpy( pA->pData, pO->data(), pO->size() ); // -> merken
+ pO->clear(); // leeren fuer HdFt-Text
}
else
{ // keine Attrs da
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 676ac87aa3c7..f1386b5b124d 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -1821,10 +1821,10 @@ void WW8Export::SaveData( sal_uLong nStt, sal_uLong nEnd )
MSWordSaveData &rData = maSaveData.top();
- if ( pO->Count() )
+ if ( !pO->empty() )
{
rData.pOOld = pO;
- pO = new WW8Bytes( 128, 128 );
+ pO = new ww::bytes();
}
else
rData.pOOld = 0; // reuse pO
@@ -1844,7 +1844,7 @@ void WW8Export::RestoreData()
GetWriter().bWriteAll = rData.bOldWriteAll;
- OSL_ENSURE( !pO->Count(), "pO is not empty in WW8Export::RestoreData()" );
+ OSL_ENSURE( pO->empty(), "pO is not empty in WW8Export::RestoreData()" );
if ( rData.pOOld )
{
delete pO;
@@ -1868,14 +1868,14 @@ void WW8AttributeOutput::TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pT
{
/* Cell */
m_rWW8Export.InsUInt16( NS_sprm::LN_PFInTable );
- m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( (sal_uInt8)0x1 );
m_rWW8Export.InsUInt16( NS_sprm::LN_PTableDepth );
m_rWW8Export.InsUInt32( nDepth );
if ( nDepth > 1 && pTableTextNodeInfoInner->isEndOfCell() )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_PCell );
- m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( (sal_uInt8)0x1 );
}
}
}
@@ -1890,12 +1890,12 @@ void WW8AttributeOutput::TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTa
if ( pTableTextNodeInfoInner->isEndOfLine() )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_PFInTable );
- m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( (sal_uInt8)0x1 );
if ( nDepth == 1 )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_PFTtp );
- m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( (sal_uInt8)0x1 );
}
m_rWW8Export.InsUInt16( NS_sprm::LN_PTableDepth );
@@ -1904,9 +1904,9 @@ void WW8AttributeOutput::TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTa
if ( nDepth > 1 )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_PCell );
- m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( (sal_uInt8)0x1 );
m_rWW8Export.InsUInt16( NS_sprm::LN_PRow );
- m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( (sal_uInt8)0x1 );
}
TableDefinition( pTableTextNodeInfoInner );
@@ -1965,8 +1965,8 @@ void WW8AttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_
if ( FRMDIR_VERT_TOP_RIGHT == m_rWW8Export.TrueFrameDirection( *pFrmFmt ) )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_TTextFlow );
- m_rWW8Export.pO->Insert( sal_uInt8(n), m_rWW8Export.pO->Count() ); //start range
- m_rWW8Export.pO->Insert( sal_uInt8(n + 1), m_rWW8Export.pO->Count() ); //end range
+ m_rWW8Export.pO->push_back( sal_uInt8(n) ); //start range
+ m_rWW8Export.pO->push_back( sal_uInt8(n + 1) ); //end range
m_rWW8Export.InsUInt16( 5 ); //Equals vertical writing
}
}
@@ -1989,14 +1989,14 @@ void WW8AttributeOutput::TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pT
if ( m_rWW8Export.bWrtWW8 )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_TFCantSplit );
- m_rWW8Export.pO->Insert( nCantSplit, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( nCantSplit );
m_rWW8Export.InsUInt16( NS_sprm::LN_TFCantSplit90 ); // also write fCantSplit90
}
else
{
- m_rWW8Export.pO->Insert( 185, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 185 );
}
- m_rWW8Export.pO->Insert( nCantSplit, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( nCantSplit );
}
void WW8AttributeOutput::TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )
@@ -2036,7 +2036,7 @@ void WW8AttributeOutput::TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTab
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_TDyaRowHeight );
else
- m_rWW8Export.pO->Insert( 189, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 189 );
m_rWW8Export.InsUInt16( (sal_uInt16)nHeight );
}
@@ -2070,7 +2070,7 @@ void WW8AttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_TJc );
else
- m_rWW8Export.pO->Insert( 182, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 182 );
m_rWW8Export.InsUInt16( text::HoriOrientation::RIGHT == eHOri ? 2 : 1 );
break;
default:
@@ -2097,7 +2097,7 @@ void WW8AttributeOutput::TableSpacing(ww8::WW8TableNodeInfoInner::Pointer_t pTab
sal_uInt8 nTPc = (nPadding << 4) | (nPcVert << 2) | nPcHorz;
m_rWW8Export.InsUInt16(NS_sprm::LN_TPc);
- m_rWW8Export.pO->Insert( nTPc, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( nTPc );
m_rWW8Export.InsUInt16(NS_sprm::LN_TDyaAbs);
m_rWW8Export.InsUInt16(rUL.GetUpper());
@@ -2123,8 +2123,8 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
if( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_TTableHeader );
else
- m_rWW8Export.pO->Insert( 186, m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( 1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 186 );
+ m_rWW8Export.pO->push_back( 1 );
}
ww8::TableBoxVectorPtr pTableBoxes =
@@ -2140,7 +2140,7 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
m_rWW8Export.InsUInt16( nSprmSize ); // length
// number of boxes
- m_rWW8Export.pO->Insert( static_cast<sal_uInt8>(nBoxes), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( static_cast<sal_uInt8>(nBoxes) );
/* cellxs */
/*
@@ -2208,7 +2208,7 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
for( aIt = pTableBoxes->begin(); aIt != aItEnd; ++aIt, ++aItRowSpans)
{
#if OSL_DEBUG_LEVEL > 1
- sal_uInt16 npOCount = m_rWW8Export.pO->Count();
+ sal_uInt16 npOCount = m_rWW8Export.pO->size();
#endif
const SwTableBox * pTabBox1 = *aIt;
@@ -2225,7 +2225,7 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
static sal_uInt8 aNullBytes[] = { 0x0, 0x0 };
- m_rWW8Export.pO->Insert( aNullBytes, 2, m_rWW8Export.pO->Count() ); // dummy
+ m_rWW8Export.pO->insert( m_rWW8Export.pO->end(), aNullBytes, aNullBytes+2 ); // dummy
if (pBoxFmt != NULL)
{
const SvxBoxItem & rBoxItem = pBoxFmt->GetBox();
@@ -2236,7 +2236,7 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
m_rWW8Export.Out_SwFmtTableBox( *m_rWW8Export.pO, NULL); // 8/16 Byte
#if OSL_DEBUG_LEVEL > 1
- ::std::clog << "<tclength>" << m_rWW8Export.pO->Count() - npOCount << "</tclength>"
+ ::std::clog << "<tclength>" << m_rWW8Export.pO->size() - npOCount << "</tclength>"
<< ::std::endl;
#endif
}
@@ -2331,11 +2331,11 @@ void WW8AttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointe
for ( int i = 0; i < 4; ++i )
{
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, 0xD634 );
- m_rWW8Export.pO->Insert( sal_uInt8(6), m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( sal_uInt8(0), m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( sal_uInt8(1), m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( sal_uInt8(1 << i), m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( sal_uInt8(3), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( sal_uInt8(6) );
+ m_rWW8Export.pO->push_back( sal_uInt8(0) );
+ m_rWW8Export.pO->push_back( sal_uInt8(1) );
+ m_rWW8Export.pO->push_back( sal_uInt8(1 << i) );
+ m_rWW8Export.pO->push_back( sal_uInt8(3) );
SwWW8Writer::InsUInt16( *m_rWW8Export.pO,
pFrmFmt->GetBox().GetDistance( aBorders[i] ) );
@@ -2352,8 +2352,8 @@ void WW8AttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_TDefTableShd );
else
- m_rWW8Export.pO->Insert( (sal_uInt8)191, m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( (sal_uInt8)(nBoxes * 2), m_rWW8Export.pO->Count() ); // Len
+ m_rWW8Export.pO->push_back( (sal_uInt8)191 );
+ m_rWW8Export.pO->push_back( (sal_uInt8)(nBoxes * 2) ); // Len
for ( sal_uInt8 n = 0; n < nBoxes; n++ )
{
@@ -2384,8 +2384,7 @@ void WW8AttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t
for (sal_uInt32 m = 0; m < 2; m++)
{
m_rWW8Export.InsUInt16( aSprmIds[m] );
- m_rWW8Export.pO->Insert( static_cast<sal_uInt8>(nBoxes0 * 10),
- m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( static_cast<sal_uInt8>(nBoxes0 * 10) );
for ( sal_uInt8 n = 0; n < nBoxes0; n++ )
{
@@ -3070,7 +3069,7 @@ void WW8Export::ExportDocument_Impl()
pPapPlc = new WW8_WrPlcPn( *this, PAP, pFib->fcMin );
pChpPlc = new WW8_WrPlcPn( *this, CHP, pFib->fcMin );
- pO = new WW8Bytes( 128, 128 );
+ pO = new ww::bytes();
pStyles = new MSWordStyles( *this );
pFldMain = new WW8_WrPlcFld( 2, TXT_MAINTEXT );
pFldHdFt = new WW8_WrPlcFld( 2, TXT_HDFT );
@@ -3698,7 +3697,7 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
::std::clog << "<OutWW8_TableNodeInfoInner>" << pNodeInfoInner->toString();
#endif
- m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); // leeren
+ m_rWW8Export.pO->clear();
sal_uInt32 nShadowsBefore = pNodeInfoInner->getShadowsBefore();
if (nShadowsBefore > 0)
@@ -3713,14 +3712,12 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
{
m_rWW8Export.WriteCR(pTmpNodeInfoInner);
- m_rWW8Export.pO->Insert( (sal_uInt8*)&nStyle, 2,
- m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->insert( m_rWW8Export.pO->end(), (sal_uInt8*)&nStyle, (sal_uInt8*)&nStyle+2 ); // Style #
TableInfoCell(pTmpNodeInfoInner);
m_rWW8Export.pPapPlc->AppendFkpEntry
- ( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
- m_rWW8Export.pO->GetData() );
+ ( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->size(), m_rWW8Export.pO->data() );
- m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); // leeren
+ m_rWW8Export.pO->clear();
}
}
@@ -3731,12 +3728,11 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
#endif
m_rWW8Export.WriteCR(pNodeInfoInner);
- m_rWW8Export.pO->Insert( (sal_uInt8*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->insert( m_rWW8Export.pO->end(), (sal_uInt8*)&nStyle, (sal_uInt8*)&nStyle+2 ); // Style #
TableInfoCell(pNodeInfoInner);
- m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
- m_rWW8Export.pO->GetData() );
+ m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->size(), m_rWW8Export.pO->data() );
- m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); // leeren
+ m_rWW8Export.pO->clear();
}
sal_uInt32 nShadowsAfter = pNodeInfoInner->getShadowsAfter();
@@ -3752,12 +3748,11 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
{
m_rWW8Export.WriteCR(pTmpNodeInfoInner);
- m_rWW8Export.pO->Insert( (sal_uInt8*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->insert( m_rWW8Export.pO->end(), (sal_uInt8*)&nStyle, (sal_uInt8*)&nStyle+2 ); // Style #
TableInfoCell(pTmpNodeInfoInner);
- m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
- m_rWW8Export.pO->GetData() );
+ m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->size(), m_rWW8Export.pO->data() );
- m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); // leeren
+ m_rWW8Export.pO->clear();
}
}
@@ -3769,12 +3764,11 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
TableRowEnd(pNodeInfoInner->getDepth());
ShortToSVBT16(0, nStyle);
- m_rWW8Export.pO->Insert( (sal_uInt8*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->insert( m_rWW8Export.pO->end(), (sal_uInt8*)&nStyle, (sal_uInt8*)&nStyle+2 ); // Style #
TableInfoRow(pNodeInfoInner);
- m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
- m_rWW8Export.pO->GetData() );
+ m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->size(), m_rWW8Export.pO->data() );
- m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); // leeren
+ m_rWW8Export.pO->clear();
}
#if OSL_DEBUG_LEVEL > 1
::std::clog << "</OutWW8_TableNodeInfoInner>" << ::std::endl;
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index e2d7aeac22e7..47ddc568d5af 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -428,7 +428,7 @@ struct MSWordSaveData
{
Point* pOldFlyOffset;
RndStdIds eOldAnchorType;
- WW8Bytes* pOOld; ///< WW8Export only
+ ww::bytes* pOOld; ///< WW8Export only
WW8Bytes* mpTableAtOld; ///< WW8Export only: Additional buffer for the output of the tables
sal_uInt16 mnTableStdAtLenOld; ///< WW8Export only: Standard length of mpTableAt
SwPaM* pOldPam, *pOldEnd;
@@ -912,7 +912,7 @@ private:
class WW8Export : public MSWordExportBase
{
public:
- WW8Bytes* pO; ///< Buffer
+ ww::bytes* pO; ///< Buffer
WW8Bytes* mpTableAt; ///< Additional buffer for the output of the tables
sal_uInt16 mnTableStdAtLen; ///< Standard length of mpTableAt
@@ -954,7 +954,7 @@ private:
static void BuildAnlvBase( WW8_ANLV& rAnlv, sal_uInt8*& rpCh, sal_uInt16& rCharLen,
const SwNumRule& rRul, const SwNumFmt& rFmt, sal_uInt8 nSwLevel );
- void Out_BorderLine(WW8Bytes& rO, const ::editeng::SvxBorderLine* pLine,
+ void Out_BorderLine(ww::bytes& rO, const ::editeng::SvxBorderLine* pLine,
sal_uInt16 nDist, sal_uInt16 nSprmNo, bool bShadow);
/// Output the numbering table.
@@ -989,8 +989,8 @@ public:
sal_uInt16 AddRedlineAuthor( sal_uInt16 nId );
- void WriteFtnBegin( const SwFmtFtn& rFtn, WW8Bytes* pO = 0 );
- void WritePostItBegin( WW8Bytes* pO = 0 );
+ void WriteFtnBegin( const SwFmtFtn& rFtn, ww::bytes* pO = 0 );
+ void WritePostItBegin( ww::bytes* pO = 0 );
const SvxBrushItem* GetCurrentPageBgBrush() const;
SvxBrushItem TrueFrameBgBrush(const SwFrmFmt &rFlyFmt) const;
@@ -1037,7 +1037,7 @@ public:
// einige z.T. static halb-interne Funktions-Deklarationen
void OutSprmBytes( sal_uInt8* pBytes, sal_uInt16 nSiz )
- { pO->Insert( pBytes, nSiz, pO->Count() ); }
+ { pO->insert( pO->end(), pBytes, pBytes+nSiz ); }
inline bool IsUnicode() const { return pPiece->IsUnicode(); }
@@ -1051,7 +1051,7 @@ public:
const SwPageDesc* pNewPgDesc = 0 );
void Out_SwFmtBox(const SvxBoxItem& rBox, bool bShadow);
- void Out_SwFmtTableBox( WW8Bytes& rO, const SvxBoxItem * rBox );
+ void Out_SwFmtTableBox( ww::bytes& rO, const SvxBoxItem * rBox );
sal_uInt8 TransCol( const Color& rCol );
bool TransBrush(const Color& rCol, WW8_SHD& rShd);
WW8_BRC TranslateBorderLine(const ::editeng::SvxBorderLine& pLine,
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index 60383c650ded..ff2c8d2cd0fb 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -403,8 +403,8 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
// GrfNode fuer spaeteres rausschreiben der Grafik merken
pGrf->Insert(rFrame);
- pChpPlc->AppendFkpEntry( Strm().Tell(), pO->Count(), pO->GetData() );
- pO->Remove( 0, pO->Count() ); // leeren
+ pChpPlc->AppendFkpEntry( Strm().Tell(), pO->size(), pO->data() );
+ pO->clear();
// #i29408#
// linked, as-character anchored graphics have to be exported as fields.
@@ -502,15 +502,15 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
WriteChar( (char)0x0d ); // umgebenden Rahmen mit CR abschliessen
static sal_uInt8 nSty[2] = { 0, 0 };
- pO->Insert( nSty, 2, pO->Count() ); // Style #0
+ pO->insert( pO->end(), nSty, nSty+2 ); // Style #0
bool bOldGrf = bOutGrf;
bOutGrf = true;
OutputFormat( rFrame.GetFrmFmt(), false, false, true ); // Fly-Attrs
bOutGrf = bOldGrf;
- pPapPlc->AppendFkpEntry( Strm().Tell(), pO->Count(), pO->GetData() );
- pO->Remove( 0, pO->Count() ); // leeren
+ pPapPlc->AppendFkpEntry( Strm().Tell(), pO->size(), pO->data() );
+ pO->clear();
}
// #i29408#
// linked, as-character anchored graphics have to be exported as fields.
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 873f64200a49..1d236cb87418 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -683,9 +683,9 @@ void WW8AttributeOutput::OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt &rNFmt
{
// write sprmPOutLvl sprmPIlvl and sprmPIlfo
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_POutLvl );
- m_rWW8Export.pO->Insert( nLvl, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( nLvl );
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_PIlvl );
- m_rWW8Export.pO->Insert( nLvl, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( nLvl );
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_PIlfo );
SwWW8Writer::InsUInt16( *m_rWW8Export.pO,
1 + m_rWW8Export.GetId( *m_rWW8Export.pDoc->GetOutlineNumRule() ) );
@@ -732,7 +732,7 @@ bool WW8Export::DisallowInheritingOutlineNumbering(const SwFmt &rFmt)
if (bWrtWW8)
{
SwWW8Writer::InsUInt16(*pO, NS_sprm::LN_POutLvl);
- pO->Insert(sal_uInt8(9), pO->Count());
+ pO->push_back(sal_uInt8(9));
SwWW8Writer::InsUInt16(*pO, NS_sprm::LN_PIlfo);
SwWW8Writer::InsUInt16(*pO, 0);
@@ -934,22 +934,22 @@ void WW8AttributeOutput::RTLAndCJKState( bool bIsRTL, sal_uInt16 nScript )
if ( m_rWW8Export.bWrtWW8 && bIsRTL )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_CFBiDi );
- m_rWW8Export.pO->Insert( (sal_uInt8)1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( (sal_uInt8)1 );
}
// #i46087# patch from james_clark; complex texts needs the undocumented SPRM CComplexScript with param 0x81.
if ( m_rWW8Export.bWrtWW8 && nScript == i18n::ScriptType::COMPLEX && !bIsRTL )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_CComplexScript );
- m_rWW8Export.pO->Insert( (sal_uInt8)0x81, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( (sal_uInt8)0x81 );
m_rWW8Export.pDop->bUseThaiLineBreakingRules = true;
}
}
void WW8AttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner )
{
- m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(), m_rWW8Export.pO->GetData() );
- m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); // delete
+ m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->size(), m_rWW8Export.pO->data() );
+ m_rWW8Export.pO->clear();
if ( pTextNodeInfoInner.get() != NULL )
{
@@ -959,11 +959,10 @@ void WW8AttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTe
SVBT16 nSty;
ShortToSVBT16( 0, nSty );
- m_rWW8Export.pO->Insert( (sal_uInt8*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->insert( m_rWW8Export.pO->end(), (sal_uInt8*)&nSty, (sal_uInt8*)&nSty+2 ); // Style #
TableInfoRow( pTextNodeInfoInner );
- m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
- m_rWW8Export.pO->GetData() );
- m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); // delete
+ m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->size(), m_rWW8Export.pO->data());
+ m_rWW8Export.pO->clear();
}
}
}
@@ -1008,9 +1007,9 @@ void WW8AttributeOutput::EndRunProperties( const SwRedlineData* pRedlineData )
if ( !bExportedFieldResult )
{
m_rWW8Export.pChpPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(),
- m_rWW8Export.pO->Count(), m_rWW8Export.pO->GetData() );
+ m_rWW8Export.pO->size(), m_rWW8Export.pO->data() );
}
- m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); // delete
+ m_rWW8Export.pO->clear();
}
void WW8AttributeOutput::RunText( const String& rText, rtl_TextEncoding eCharSet )
@@ -1025,21 +1024,21 @@ void WW8AttributeOutput::RawText( const String& rText, bool bForceUnicode, rtl_T
void WW8AttributeOutput::OutputFKP()
{
- if ( m_rWW8Export.pO->Count() )
+ if ( !m_rWW8Export.pO->empty() )
{
m_rWW8Export.pChpPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(),
- m_rWW8Export.pO->Count(), m_rWW8Export.pO->GetData() );
- m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); // delete
+ m_rWW8Export.pO->size(), m_rWW8Export.pO->data() );
+ m_rWW8Export.pO->clear();
}
}
void WW8AttributeOutput::ParagraphStyle( sal_uInt16 nStyle )
{
- OSL_ENSURE( !m_rWW8Export.pO->Count(), " pO ist am ZeilenEnde nicht leer" );
+ OSL_ENSURE( m_rWW8Export.pO->empty(), " pO ist am ZeilenEnde nicht leer" );
SVBT16 nSty;
ShortToSVBT16( nStyle, nSty );
- m_rWW8Export.pO->Insert( (sal_uInt8*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->insert( m_rWW8Export.pO->end(), (sal_uInt8*)&nSty, (sal_uInt8*)&nSty+2 ); // Style #
}
void WW8AttributeOutput::OutputWW8Attribute( sal_uInt8 nId, bool bVal )
@@ -1049,9 +1048,9 @@ void WW8AttributeOutput::OutputWW8Attribute( sal_uInt8 nId, bool bVal )
else if (8 == nId )
return; // no such attribute in WW6
else
- m_rWW8Export.pO->Insert( 85 + nId, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 85 + nId );
- m_rWW8Export.pO->Insert( bVal ? 1 : 0, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( bVal ? 1 : 0 );
}
void WW8AttributeOutput::OutputWW8AttributeCTL( sal_uInt8 nId, bool bVal )
@@ -1061,7 +1060,7 @@ void WW8AttributeOutput::OutputWW8AttributeCTL( sal_uInt8 nId, bool bVal )
return;
m_rWW8Export.InsUInt16( NS_sprm::LN_CFBoldBi + nId );
- m_rWW8Export.pO->Insert( bVal ? 1 : 0, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( bVal ? 1 : 0 );
}
void WW8AttributeOutput::CharFont( const SvxFontItem& rFont )
@@ -1075,7 +1074,7 @@ void WW8AttributeOutput::CharFont( const SvxFontItem& rFont )
m_rWW8Export.InsUInt16( NS_sprm::LN_CRgFtc2 );
}
else
- m_rWW8Export.pO->Insert( 93, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 93 );
m_rWW8Export.InsUInt16( nFontID );
}
@@ -1088,7 +1087,7 @@ void WW8AttributeOutput::CharFontCTL( const SvxFontItem& rFont )
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_CFtcBi );
else
- m_rWW8Export.pO->Insert( 93, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 93 );
m_rWW8Export.InsUInt16( nFontID );
}
@@ -1100,7 +1099,7 @@ void WW8AttributeOutput::CharFontCJK( const SvxFontItem& rFont )
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_CRgFtc1 );
else
- m_rWW8Export.pO->Insert( 93, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 93 );
m_rWW8Export.InsUInt16( nFontID );
}
@@ -1158,7 +1157,7 @@ void WW8AttributeOutput::CharKerning( const SvxKerningItem& rKerning )
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_CDxaSpace );
else
- m_rWW8Export.pO->Insert( 96, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 96 );
m_rWW8Export.InsUInt16( rKerning.GetValue() );
}
@@ -1168,7 +1167,7 @@ void WW8AttributeOutput::CharAutoKern( const SvxAutoKernItem& rAutoKern )
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_CHpsKern );
else
- m_rWW8Export.pO->Insert( 107, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 107 );
m_rWW8Export.InsUInt16( rAutoKern.GetValue() ? 1 : 0 );
}
@@ -1234,7 +1233,7 @@ void WW8AttributeOutput::CharUnderline( const SvxUnderlineItem& rUnderline )
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_CKul );
else
- m_rWW8Export.pO->Insert( 94, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 94 );
const SfxPoolItem* pItem = m_rWW8Export.HasItem( RES_CHRATR_WORDLINEMODE );
bool bWord = false;
@@ -1306,7 +1305,7 @@ void WW8AttributeOutput::CharUnderline( const SvxUnderlineItem& rUnderline )
break;
}
- m_rWW8Export.pO->Insert( b, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( b );
}
void WW8AttributeOutput::CharLanguage( const SvxLanguageItem& rLanguage )
@@ -1335,7 +1334,7 @@ void WW8AttributeOutput::CharLanguage( const SvxLanguageItem& rLanguage )
if ( m_rWW8Export.bWrtWW8 ) // use sprmCRgLid0_80 rather than sprmCLid
m_rWW8Export.InsUInt16( nId );
else
- m_rWW8Export.pO->Insert( (sal_uInt8)nId, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( static_cast<sal_uInt8>(nId) );
m_rWW8Export.InsUInt16( rLanguage.GetLanguage() );
// Word 2000 and above apparently require both old and new versions of
@@ -1376,9 +1375,9 @@ void WW8AttributeOutput::CharEscapement( const SvxEscapementItem& rEscapement )
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_CIss );
else
- m_rWW8Export.pO->Insert( 104, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 104 );
- m_rWW8Export.pO->Insert( b, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( b );
}
if ( 0 == b || 0xFF == b )
@@ -1388,7 +1387,7 @@ void WW8AttributeOutput::CharEscapement( const SvxEscapementItem& rEscapement )
if( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_CHpsPos );
else
- m_rWW8Export.pO->Insert( 101, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 101 );
m_rWW8Export.InsUInt16( (short)(( nHeight * nEsc + 500 ) / 1000 ));
@@ -1397,7 +1396,7 @@ void WW8AttributeOutput::CharEscapement( const SvxEscapementItem& rEscapement )
if( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_CHps );
else
- m_rWW8Export.pO->Insert( 99, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 99 );
m_rWW8Export.InsUInt16(
msword_cast<sal_uInt16>((nHeight * nProp + 500 ) / 1000));
@@ -1429,7 +1428,7 @@ void WW8AttributeOutput::CharFontSize( const SvxFontHeightItem& rHeight )
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( nId );
else
- m_rWW8Export.pO->Insert( (sal_uInt8)nId, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( static_cast<sal_uInt8>(nId) );
m_rWW8Export.InsUInt16( (sal_uInt16)(( rHeight.GetHeight() + 5 ) / 10 ) );
}
@@ -1459,15 +1458,15 @@ void WW8AttributeOutput::CharRelief( const SvxCharReliefItem& rRelief )
if( nId )
{
m_rWW8Export.InsUInt16( nId );
- m_rWW8Export.pO->Insert( (sal_uInt8)0x81, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( (sal_uInt8)0x81 );
}
else
{
// switch both flags off
m_rWW8Export.InsUInt16( NS_sprm::LN_CFEmboss );
- m_rWW8Export.pO->Insert( (sal_uInt8)0x0, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( (sal_uInt8)0x0 );
m_rWW8Export.InsUInt16( NS_sprm::LN_CFImprint );
- m_rWW8Export.pO->Insert( (sal_uInt8)0x0, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( (sal_uInt8)0x0 );
}
}
}
@@ -1485,12 +1484,12 @@ void WW8AttributeOutput::CharRotate( const SvxCharRotateItem& rRotate )
// here corrupts the table, hence !m_rWW8Export.bIsInTable
m_rWW8Export.InsUInt16( NS_sprm::LN_CEastAsianLayout );
- m_rWW8Export.pO->Insert( (sal_uInt8)0x06, m_rWW8Export.pO->Count() ); //len 6
- m_rWW8Export.pO->Insert( (sal_uInt8)0x01, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( (sal_uInt8)0x06 ); //len 6
+ m_rWW8Export.pO->push_back( (sal_uInt8)0x01 );
m_rWW8Export.InsUInt16( rRotate.IsFitToLine() ? 1 : 0 );
static const sal_uInt8 aZeroArr[ 3 ] = { 0, 0, 0 };
- m_rWW8Export.pO->Insert( aZeroArr, 3, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->insert( m_rWW8Export.pO->end(), aZeroArr, aZeroArr+3);
}
}
@@ -1510,7 +1509,7 @@ void WW8AttributeOutput::CharEmphasisMark( const SvxEmphasisMarkItem& rEmphasisM
}
m_rWW8Export.InsUInt16( NS_sprm::LN_CKcd );
- m_rWW8Export.pO->Insert( nVal, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( nVal );
}
}
@@ -1593,10 +1592,10 @@ void WW8AttributeOutput::CharColor( const SvxColorItem& rColor )
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_CIco );
else
- m_rWW8Export.pO->Insert( 98, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 98 );
sal_uInt8 nColor = m_rWW8Export.TransCol( rColor.GetValue() );
- m_rWW8Export.pO->Insert( nColor, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( nColor );
if ( m_rWW8Export.bWrtWW8 && nColor )
{
@@ -1619,7 +1618,7 @@ void WW8AttributeOutput::CharBackground( const SvxBrushItem& rBrush )
//Quite a few unknowns, some might be transparency or something
//of that nature...
m_rWW8Export.InsUInt16( 0xCA71 );
- m_rWW8Export.pO->Insert( 10, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 10 );
m_rWW8Export.InsUInt32( 0xFF000000 );
m_rWW8Export.InsUInt32( SuitableBGColor( rBrush.GetColor().GetColor() ) );
m_rWW8Export.InsUInt16( 0x0000);
@@ -1644,7 +1643,7 @@ void WW8AttributeOutput::TextINetFormat( const SwFmtINetFmt& rINet )
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_CIstd );
else
- m_rWW8Export.pO->Insert( 80, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 80 );
m_rWW8Export.InsUInt16( m_rWW8Export.GetId( *pFmt ) );
}
@@ -2392,7 +2391,7 @@ void AttributeOutputBase::GetNumberPara( String& rStr, const SwField& rFld )
}
}
-void WW8Export::WritePostItBegin( WW8Bytes* pOut )
+void WW8Export::WritePostItBegin( ww::bytes* pOut )
{
sal_uInt8 aArr[ 3 ];
sal_uInt8* pArr = aArr;
@@ -2408,7 +2407,7 @@ void WW8Export::WritePostItBegin( WW8Bytes* pOut )
WriteChar( 0x05 ); // Annotation reference
if( pOut )
- pOut->Insert( aArr, static_cast< sal_uInt16 >(pArr - aArr), pOut->Count() );
+ pOut->insert( pOut->end(), aArr, pArr );
else
pChpPlc->AppendFkpEntry( Strm().Tell(), static_cast< short >(pArr - aArr), aArr );
}
@@ -3003,9 +3002,9 @@ void WW8AttributeOutput::ParaHyphenZone( const SvxHyphenZoneItem& rHyphenZone )
if( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_PFNoAutoHyph );
else
- m_rWW8Export.pO->Insert( 44, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 44 );
- m_rWW8Export.pO->Insert( rHyphenZone.IsHyphen() ? 0 : 1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( rHyphenZone.IsHyphen() ? 0 : 1 );
}
void WW8AttributeOutput::ParaScriptSpace( const SfxBoolItem& rScriptSpace )
@@ -3024,10 +3023,9 @@ void WW8AttributeOutput::ParaScriptSpace( const SfxBoolItem& rScriptSpace )
if( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( nId );
else
- m_rWW8Export.pO->Insert( (sal_uInt8)nId, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( (sal_uInt8)nId );
- m_rWW8Export.pO->Insert( rScriptSpace.GetValue() ? 1 : 0,
- m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( rScriptSpace.GetValue() ? 1 : 0 );
}
}
@@ -3039,7 +3037,7 @@ void WW8AttributeOutput::ParaSnapToGrid( const SvxParaGridItem& rGrid )
return;
m_rWW8Export.InsUInt16( NS_sprm::LN_PFUsePgsuSettings );
- m_rWW8Export.pO->Insert( rGrid.GetValue(), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( rGrid.GetValue() );
}
void WW8AttributeOutput::ParaVerticalAlign( const SvxParaVertAlignItem& rAlign )
@@ -3083,9 +3081,9 @@ void WW8AttributeOutput::ParaVerticalAlign( const SvxParaVertAlignItem& rAlign )
// RefMark, NoLineBreakHere fehlen noch
-void WW8Export::WriteFtnBegin( const SwFmtFtn& rFtn, WW8Bytes* pOutArr )
+void WW8Export::WriteFtnBegin( const SwFmtFtn& rFtn, ww::bytes* pOutArr )
{
- WW8Bytes aAttrArr;
+ ww::bytes aAttrArr;
bool bAutoNum = !rFtn.GetNumStr().Len(); // Auto-Nummer
if( bAutoNum )
{
@@ -3097,7 +3095,7 @@ void WW8Export::WriteFtnBegin( const SwFmtFtn& rFtn, WW8Bytes* pOutArr )
0x55, 0x08, 1 // sprmCFSpec
};
- aAttrArr.Insert(aSpec, sizeof(aSpec), aAttrArr.Count());
+ aAttrArr.insert(aAttrArr.end(), aSpec, aSpec+sizeof(aSpec));
}
else
{
@@ -3107,7 +3105,7 @@ void WW8Export::WriteFtnBegin( const SwFmtFtn& rFtn, WW8Bytes* pOutArr )
68, 4, 0, 0, 0, 0 // sprmCObjLocation
};
- aAttrArr.Insert(aSpec, sizeof(aSpec), aAttrArr.Count());
+ aAttrArr.insert(aAttrArr.end(), aSpec, aSpec+sizeof(aSpec));
}
}
@@ -3123,7 +3121,7 @@ void WW8Export::WriteFtnBegin( const SwFmtFtn& rFtn, WW8Bytes* pOutArr )
if( bWrtWW8 )
SwWW8Writer::InsUInt16( aAttrArr, NS_sprm::LN_CIstd );
else
- aAttrArr.Insert( 80, aAttrArr.Count() );
+ aAttrArr.push_back( 80 );
SwWW8Writer::InsUInt16( aAttrArr, GetId( *pCFmt ) );
// fSpec-Attribut true
@@ -3141,21 +3139,21 @@ void WW8Export::WriteFtnBegin( const SwFmtFtn& rFtn, WW8Bytes* pOutArr )
{
// insert at start of array, so the "hard" attribute overrule the
// attributes of the character template
- pOutArr->Insert( &aAttrArr, 0 );
+ pOutArr->insert( pOutArr->begin(), aAttrArr.begin(), aAttrArr.end() );
}
else
{
- WW8Bytes aOutArr;
+ ww::bytes aOutArr;
// insert at start of array, so the "hard" attribute overrule the
// attributes of the character template
- aOutArr.Insert( &aAttrArr, 0 );
+ aOutArr.insert( aOutArr.begin(), aAttrArr.begin(), aAttrArr.end() );
// write for the ftn number in the content, the font of the anchor
const SwTxtFtn* pTxtFtn = rFtn.GetTxtFtn();
if( pTxtFtn )
{
- WW8Bytes* pOld = pO;
+ ww::bytes* pOld = pO;
pO = &aOutArr;
SfxItemSet aSet( pDoc->GetAttrPool(), RES_CHRATR_FONT,
RES_CHRATR_FONT );
@@ -3168,8 +3166,8 @@ void WW8Export::WriteFtnBegin( const SwFmtFtn& rFtn, WW8Bytes* pOutArr )
m_pAttrOutput->OutputItem( aSet.Get( RES_CHRATR_FONT ) );
pO = pOld;
}
- pChpPlc->AppendFkpEntry( Strm().Tell(), aOutArr.Count(),
- aOutArr.GetData() );
+ pChpPlc->AppendFkpEntry( Strm().Tell(), aOutArr.size(),
+ aOutArr.data() );
}
}
@@ -3245,7 +3243,7 @@ void WW8AttributeOutput::TextCharFormat( const SwFmtCharFmt& rCharFmt )
if( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_CIstd );
else
- m_rWW8Export.pO->Insert( 80, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 80 );
m_rWW8Export.InsUInt16( m_rWW8Export.GetId( *rCharFmt.GetCharFmt() ) );
}
@@ -3264,8 +3262,8 @@ void WW8AttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines )
return;
m_rWW8Export.InsUInt16( NS_sprm::LN_CEastAsianLayout );
- m_rWW8Export.pO->Insert( (sal_uInt8)0x06, m_rWW8Export.pO->Count() ); //len 6
- m_rWW8Export.pO->Insert( (sal_uInt8)0x02, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( (sal_uInt8)0x06 ); //len 6
+ m_rWW8Export.pO->push_back( (sal_uInt8)0x02 );
sal_Unicode cStart = rTwoLines.GetStartBracket();
sal_Unicode cEnd = rTwoLines.GetEndBracket();
@@ -3297,7 +3295,7 @@ void WW8AttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines )
nType = 1;
m_rWW8Export.InsUInt16( nType );
static const sal_uInt8 aZeroArr[ 3 ] = { 0, 0, 0 };
- m_rWW8Export.pO->Insert( aZeroArr, 3, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->insert( m_rWW8Export.pO->end(), aZeroArr, aZeroArr+3);
}
}
@@ -3369,7 +3367,7 @@ void WW8AttributeOutput::ParaNumRule_Impl( const SwTxtNode* pTxtNd, sal_Int32 nL
{
// write sprmPIlvl and sprmPIlfo
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_PIlvl );
- m_rWW8Export.pO->Insert( ::sal::static_int_cast<sal_uInt8>(nLvl), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( ::sal::static_int_cast<sal_uInt8>(nLvl) );
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_PIlfo );
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, ::sal::static_int_cast<sal_uInt16>(nNumId) );
}
@@ -3393,7 +3391,7 @@ void WW8AttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
if( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_PDxaWidth );
else
- m_rWW8Export.pO->Insert( 28, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 28 );
m_rWW8Export.InsUInt16( (sal_uInt16)rSize.GetWidth() );
}
@@ -3403,7 +3401,7 @@ void WW8AttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
if( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_PWHeightAbs );
else
- m_rWW8Export.pO->Insert( 45, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 45 );
sal_uInt16 nH = 0;
switch ( rSize.GetHeightSizeType() )
@@ -3423,15 +3421,15 @@ void WW8AttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
if( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_SBOrientation );
else
- m_rWW8Export.pO->Insert( 162, m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( 2, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 162 );
+ m_rWW8Export.pO->push_back( 2 );
}
/*sprmSXaPage*/
if( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_SXaPage );
else
- m_rWW8Export.pO->Insert( 164, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 164 );
m_rWW8Export.InsUInt16(
msword_cast<sal_uInt16>(SvxPaperInfo::GetSloppyPaperDimension(rSize.GetWidth())));
@@ -3439,7 +3437,7 @@ void WW8AttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
if( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_SYaPage );
else
- m_rWW8Export.pO->Insert( 165, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 165 );
m_rWW8Export.InsUInt16(
msword_cast<sal_uInt16>(SvxPaperInfo::GetSloppyPaperDimension(rSize.GetHeight())));
}
@@ -3554,9 +3552,9 @@ void WW8AttributeOutput::PageBreakBefore( bool bBreak )
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_PFPageBreakBefore );
else
- m_rWW8Export.pO->Insert( 9, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 9 );
- m_rWW8Export.pO->Insert( bBreak ? 1 : 0, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( bBreak ? 1 : 0 );
}
// Breaks schreiben nichts in das Ausgabe-Feld rWrt.pO,
@@ -3732,7 +3730,7 @@ void WW8AttributeOutput::FormatPaperBin( const SvxPaperBinItem& rPaperBin )
if( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( m_rWW8Export.bOutFirstPage? NS_sprm::LN_SDmBinFirst: NS_sprm::LN_SDmBinOther );
else
- m_rWW8Export.pO->Insert( m_rWW8Export.bOutFirstPage? 140: 141, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( m_rWW8Export.bOutFirstPage? 140: 141 );
m_rWW8Export.InsUInt16( nVal );
}
@@ -3749,7 +3747,7 @@ void WW8AttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLR )
if( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_PDxaFromText10 );
else
- m_rWW8Export.pO->Insert( 49, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 49 );
// Mittelwert nehmen, da WW nur 1 Wert kennt
m_rWW8Export.InsUInt16( (sal_uInt16) ( ( rLR.GetLeft() + rLR.GetRight() ) / 2 ) );
}
@@ -3771,14 +3769,14 @@ void WW8AttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLR )
if( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_SDxaLeft );
else
- m_rWW8Export.pO->Insert( 166, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 166 );
m_rWW8Export.InsUInt16( nLDist );
// sprmSDxaRight
if( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_SDxaRight );
else
- m_rWW8Export.pO->Insert( 167, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 167 );
m_rWW8Export.InsUInt16( nRDist );
}
else
@@ -3791,7 +3789,7 @@ void WW8AttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLR )
}
else
{
- m_rWW8Export.pO->Insert( 17, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 17 );
m_rWW8Export.InsUInt16( (sal_uInt16)rLR.GetTxtLeft() );
}
@@ -3803,7 +3801,7 @@ void WW8AttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLR )
}
else
{
- m_rWW8Export.pO->Insert( 16, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 16 );
m_rWW8Export.InsUInt16( (sal_uInt16)rLR.GetRight() );
}
@@ -3815,7 +3813,7 @@ void WW8AttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLR )
}
else
{
- m_rWW8Export.pO->Insert( 19, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 19 );
m_rWW8Export.InsUInt16( rLR.GetTxtFirstLineOfst() );
}
}
@@ -3831,7 +3829,7 @@ void WW8AttributeOutput::FormatULSpace( const SvxULSpaceItem& rUL )
if( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_PDyaFromText );
else
- m_rWW8Export.pO->Insert( 48, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 48 );
// Mittelwert nehmen, da WW nur 1 Wert kennt
m_rWW8Export.InsUInt16( (sal_uInt16) ( ( rUL.GetUpper() + rUL.GetLower() ) / 2 ) );
}
@@ -3849,7 +3847,7 @@ void WW8AttributeOutput::FormatULSpace( const SvxULSpaceItem& rUL )
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_SDyaHdrTop );
else
- m_rWW8Export.pO->Insert( 156, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 156 );
m_rWW8Export.InsUInt16( aDistances.dyaHdrTop );
}
@@ -3857,7 +3855,7 @@ void WW8AttributeOutput::FormatULSpace( const SvxULSpaceItem& rUL )
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_SDyaTop );
else
- m_rWW8Export.pO->Insert( 168, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 168 );
m_rWW8Export.InsUInt16( aDistances.dyaTop );
if ( aDistances.HasFooter() )
@@ -3866,7 +3864,7 @@ void WW8AttributeOutput::FormatULSpace( const SvxULSpaceItem& rUL )
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_SDyaHdrBottom );
else
- m_rWW8Export.pO->Insert( 157, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 157 );
m_rWW8Export.InsUInt16( aDistances.dyaHdrBottom );
}
@@ -3874,7 +3872,7 @@ void WW8AttributeOutput::FormatULSpace( const SvxULSpaceItem& rUL )
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_SDyaBottom );
else
- m_rWW8Export.pO->Insert( 169, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 169 );
m_rWW8Export.InsUInt16( aDistances.dyaBottom );
}
else
@@ -3883,13 +3881,13 @@ void WW8AttributeOutput::FormatULSpace( const SvxULSpaceItem& rUL )
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_PDyaBefore );
else
- m_rWW8Export.pO->Insert( 21, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 21 );
m_rWW8Export.InsUInt16( rUL.GetUpper() );
// sprmPDyaAfter
if( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_PDyaAfter );
else
- m_rWW8Export.pO->Insert( 22, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 22 );
m_rWW8Export.InsUInt16( rUL.GetLower() );
}
}
@@ -3903,11 +3901,10 @@ void WW8AttributeOutput::FormatSurround( const SwFmtSurround& rSurround )
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_PWr );
else
- m_rWW8Export.pO->Insert( 37, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 37 );
- m_rWW8Export.pO->Insert(
- ( SURROUND_NONE != rSurround.GetSurround() ) ? 2 : 1,
- m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back(
+ ( SURROUND_NONE != rSurround.GetSurround() ) ? 2 : 1 );
}
}
@@ -3942,7 +3939,7 @@ void WW8AttributeOutput::FormatVertOrientation( const SwFmtVertOrient& rFlyVert
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_PDyaAbs );
else
- m_rWW8Export.pO->Insert( 27, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 27 );
m_rWW8Export.InsUInt16( nPos );
}
}
@@ -3984,7 +3981,7 @@ void WW8AttributeOutput::FormatHorizOrientation( const SwFmtHoriOrient& rFlyHori
if( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_PDxaAbs );
else
- m_rWW8Export.pO->Insert( 26, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 26 );
m_rWW8Export.InsUInt16( nPos );
}
}
@@ -4018,8 +4015,8 @@ void WW8AttributeOutput::FormatAnchor( const SwFmtAnchor& rAnchor )
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_PPc );
else
- m_rWW8Export.pO->Insert( 29, m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( nP, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 29 );
+ m_rWW8Export.pO->push_back( nP );
}
}
@@ -4035,7 +4032,7 @@ void WW8AttributeOutput::FormatBackground( const SvxBrushItem& rBrush )
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_PShd );
else
- m_rWW8Export.pO->Insert(47, m_rWW8Export.pO->Count());
+ m_rWW8Export.pO->push_back(47);
m_rWW8Export.InsUInt16( aSHD.GetValue() );
// Quite a few unknowns, some might be transparency or something
@@ -4043,7 +4040,7 @@ void WW8AttributeOutput::FormatBackground( const SvxBrushItem& rBrush )
if ( m_rWW8Export.bWrtWW8 )
{
m_rWW8Export.InsUInt16( 0xC64D );
- m_rWW8Export.pO->Insert( 10, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 10 );
m_rWW8Export.InsUInt32( 0xFF000000 );
m_rWW8Export.InsUInt32( SuitableBGColor( rBrush.GetColor().GetColor() ) );
m_rWW8Export.InsUInt16( 0x0000 );
@@ -4194,7 +4191,7 @@ WW8_BRC WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
// auch fuer die Tabellen-Umrandungen zu benutzen.
// Wenn nSprmNo == 0, dann wird der Opcode nicht ausgegeben.
// bShadow darf bei Tabellenzellen *nicht* gesetzt sein !
-void WW8Export::Out_BorderLine(WW8Bytes& rO, const SvxBorderLine* pLine,
+void WW8Export::Out_BorderLine(ww::bytes& rO, const SvxBorderLine* pLine,
sal_uInt16 nDist, sal_uInt16 nSprmNo, bool bShadow)
{
OSL_ENSURE( ( nSprmNo == 0 ) ||
@@ -4214,15 +4211,15 @@ void WW8Export::Out_BorderLine(WW8Bytes& rO, const SvxBorderLine* pLine,
if ( nSprmNo != 0 )
SwWW8Writer::InsUInt16( rO, nSprmNo );
- rO.Insert( aBrc.aBits1, 2, rO.Count() );
- rO.Insert( aBrc.aBits2, 2, rO.Count() );
+ rO.insert( rO.end(), aBrc.aBits1, aBrc.aBits1+2 );
+ rO.insert( rO.end(), aBrc.aBits2, aBrc.aBits2+2 );
}
else
{
// WW95-SprmIds
if ( nSprmNo != 0 )
- rO.Insert( (sal_uInt8)( nSprmNo ), rO.Count() );
- rO.Insert( aBrc.aBits1, 2, rO.Count() );
+ rO.push_back( static_cast<sal_uInt8>( nSprmNo ) );
+ rO.insert( rO.end(), aBrc.aBits1, aBrc.aBits1+2 );
}
}
@@ -4273,7 +4270,7 @@ void WW8Export::Out_SwFmtBox(const SvxBoxItem& rBox, bool bShadow)
// ( Tabellenumrandungen fransen sonst aus )
// Ein WW8Bytes-Ptr wird als Ausgabe-Parameter uebergeben
-void WW8Export::Out_SwFmtTableBox( WW8Bytes& rO, const SvxBoxItem * pBox )
+void WW8Export::Out_SwFmtTableBox( ww::bytes& rO, const SvxBoxItem * pBox )
{
// moeglich und vielleicht besser waere 0xffff
static const sal_uInt16 aBorders[] =
@@ -4332,23 +4329,22 @@ void WW8AttributeOutput::FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol &
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_SCcolumns );
else
- m_rWW8Export.pO->Insert( 144, m_rWW8Export.pO->Count( ) );
+ m_rWW8Export.pO->push_back( 144 );
m_rWW8Export.InsUInt16( nCols - 1 );
// DxaColumns
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_SDxaColumns );
else
- m_rWW8Export.pO->Insert( 145, m_rWW8Export.pO->Count( ) );
+ m_rWW8Export.pO->push_back( 145 );
m_rWW8Export.InsUInt16( rCol.GetGutterWidth( true ) );
// LBetween
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_SLBetween );
else
- m_rWW8Export.pO->Insert( 158, m_rWW8Export.pO->Count( ) );
- m_rWW8Export.pO->Insert( COLADJ_NONE == rCol.GetLineAdj( )? 0 : 1,
- m_rWW8Export.pO->Count( ) );
+ m_rWW8Export.pO->push_back( 158 );
+ m_rWW8Export.pO->push_back( COLADJ_NONE == rCol.GetLineAdj( )? 0 : 1 );
const SwColumns & rColumns = rCol.GetColumns( );
@@ -4356,8 +4352,8 @@ void WW8AttributeOutput::FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol &
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_SFEvenlySpaced );
else
- m_rWW8Export.pO->Insert( 138, m_rWW8Export.pO->Count( ) );
- m_rWW8Export.pO->Insert( bEven ? 1 : 0, m_rWW8Export.pO->Count( ) );
+ m_rWW8Export.pO->push_back( 138 );
+ m_rWW8Export.pO->push_back( bEven ? 1 : 0 );
if ( !bEven )
{
@@ -4367,8 +4363,8 @@ void WW8AttributeOutput::FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol &
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_SDxaColWidth );
else
- m_rWW8Export.pO->Insert( 136, m_rWW8Export.pO->Count( ) );
- m_rWW8Export.pO->Insert( ( sal_uInt8 ) n, m_rWW8Export.pO->Count( ) );
+ m_rWW8Export.pO->push_back( 136 );
+ m_rWW8Export.pO->push_back( static_cast<sal_uInt8>(n) );
m_rWW8Export.InsUInt16( rCol.
CalcPrtColWidth( n,
( sal_uInt16 ) nPageSize ) );
@@ -4379,10 +4375,8 @@ void WW8AttributeOutput::FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol &
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_SDxaColSpacing );
else
- m_rWW8Export.pO->Insert( 137,
- m_rWW8Export.pO->Count( ) );
- m_rWW8Export.pO->Insert( ( sal_uInt8 ) n,
- m_rWW8Export.pO->Count( ) );
+ m_rWW8Export.pO->push_back( 137 );
+ m_rWW8Export.pO->push_back( static_cast<sal_uInt8>(n) );
m_rWW8Export.InsUInt16( rColumns[n]->GetRight( ) +
rColumns[n + 1]->GetLeft( ) );
}
@@ -4461,9 +4455,9 @@ void WW8AttributeOutput::FormatKeep( const SvxFmtKeepItem& rKeep )
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_PFKeepFollow );
else
- m_rWW8Export.pO->Insert( 8, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 8 );
- m_rWW8Export.pO->Insert( rKeep.GetValue() ? 1 : 0, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( rKeep.GetValue() ? 1 : 0 );
}
// exclude a paragraph from Line Numbering
@@ -4473,9 +4467,9 @@ void WW8AttributeOutput::FormatLineNumbering( const SwFmtLineNumber& rNumbering
if( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_PFNoLineNumb );
else
- m_rWW8Export.pO->Insert( 14, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 14 );
- m_rWW8Export.pO->Insert( rNumbering.IsCount() ? 0 : 1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( rNumbering.IsCount() ? 0 : 1 );
}
@@ -4487,7 +4481,7 @@ void WW8AttributeOutput::ParaLineSpacing_Impl( short nSpace, short nMulti )
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_PDyaLine );
else
- m_rWW8Export.pO->Insert( 20, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 20 );
m_rWW8Export.InsUInt16( nSpace );
m_rWW8Export.InsUInt16( nMulti );
@@ -4589,7 +4583,7 @@ void WW8AttributeOutput::ParaAdjust( const SvxAdjustItem& rAdjust )
if ( m_rWW8Export.bWrtWW8 )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_PJc );
- m_rWW8Export.pO->Insert( nAdj, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( nAdj );
/*
Sadly for left to right paragraphs both these values are the same,
@@ -4622,14 +4616,14 @@ void WW8AttributeOutput::ParaAdjust( const SvxAdjustItem& rAdjust )
}
if ( bBiDiSwap )
- m_rWW8Export.pO->Insert( nAdjBiDi, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( nAdjBiDi );
else
- m_rWW8Export.pO->Insert( nAdj, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( nAdj );
}
else
{
- m_rWW8Export.pO->Insert( 5, m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( nAdj, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 5 );
+ m_rWW8Export.pO->push_back( nAdj );
}
}
}
@@ -4692,12 +4686,12 @@ void WW8AttributeOutput::FormatFrameDirection( const SvxFrameDirectionItem& rDir
m_rWW8Export.InsUInt16( NS_sprm::LN_STextFlow );
m_rWW8Export.InsUInt16( nTextFlow );
m_rWW8Export.InsUInt16( NS_sprm::LN_SFBiDi );
- m_rWW8Export.pO->Insert( bBiDi, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( bBiDi );
}
else if ( !m_rWW8Export.bOutFlyFrmAttrs ) //paragraph/style
{
m_rWW8Export.InsUInt16( NS_sprm::LN_PFBiDi );
- m_rWW8Export.pO->Insert( bBiDi, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( bBiDi );
}
}
@@ -4708,8 +4702,8 @@ void WW8AttributeOutput::ParaSplit( const SvxFmtSplitItem& rSplit )
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_PFKeep );
else
- m_rWW8Export.pO->Insert( 7, m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( rSplit.GetValue() ? 0 : 1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 7 );
+ m_rWW8Export.pO->push_back( rSplit.GetValue() ? 0 : 1 );
}
// Es wird nur das Item "SvxWidowItem" und nicht die Orphans uebersetzt,
@@ -4721,8 +4715,8 @@ void WW8AttributeOutput::ParaWidows( const SvxWidowsItem& rWidows )
if( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_PFWidowControl );
else
- m_rWW8Export.pO->Insert( 51, m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( rWidows.GetValue() ? 1 : 0, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->push_back( 51 );
+ m_rWW8Export.pO->push_back( rWidows.GetValue() ? 1 : 0 );
}
@@ -4836,14 +4830,14 @@ void SwWW8WrTabu::PutAll(WW8Export& rWrt)
if (rWrt.bWrtWW8)
rWrt.InsUInt16(NS_sprm::LN_PChgTabsPapx);
else
- rWrt.pO->Insert(15, rWrt.pO->Count());
+ rWrt.pO->push_back(15);
// cch eintragen
- rWrt.pO->Insert(msword_cast<sal_uInt8>(nSiz), rWrt.pO->Count());
+ rWrt.pO->push_back(msword_cast<sal_uInt8>(nSiz));
// DelArr schreiben
- rWrt.pO->Insert(msword_cast<sal_uInt8>(nDel), rWrt.pO->Count());
+ rWrt.pO->push_back(msword_cast<sal_uInt8>(nDel));
rWrt.OutSprmBytes(pDel, nDel * 2);
// InsArr schreiben
- rWrt.pO->Insert(msword_cast<sal_uInt8>(nAdd), rWrt.pO->Count());
+ rWrt.pO->push_back(msword_cast<sal_uInt8>(nAdd));
rWrt.OutSprmBytes(pAddPos, 2 * nAdd); // AddPosArray
rWrt.OutSprmBytes(pAddTyp, nAdd); // AddTypArray
}