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

Convert aChrTxtAtrArr from Svptrarr to std::vector

Change-Id: Ia0cf3659d3f96574c5725f60e0caec153c93f8b6
üst 95515561
......@@ -871,7 +871,7 @@ void MSWord_SdrAttrIter::NextPara( sal_uInt16 nPar )
// Attributwechsel an Pos 0 wird ignoriert, da davon ausgegangen
// wird, dass am Absatzanfang sowieso die Attribute neu ausgegeben
// werden.
aChrTxtAtrArr.Remove( 0, aChrTxtAtrArr.Count() );
aChrTxtAtrArr.clear();
aChrSetArr.clear();
nAktSwPos = nTmpSwPos = 0;
......@@ -920,30 +920,26 @@ xub_StrLen MSWord_SdrAttrIter::SearchNext( xub_StrLen nStartPos )
void MSWord_SdrAttrIter::SetCharSet(const EECharAttrib& rAttr, bool bStart)
{
void* p = 0;
rtl_TextEncoding eChrSet;
const SfxPoolItem& rItem = *rAttr.pAttr;
switch( rItem.Which() )
if( rItem.Which() != EE_CHAR_FONTINFO )
{
case EE_CHAR_FONTINFO:
p = (void*)&rAttr;
eChrSet = ((SvxFontItem&)rItem).GetCharSet();
break;
return;
}
if( p )
if( bStart )
{
sal_uInt16 nPos;
if( bStart )
{
nPos = aChrSetArr.size();
aChrSetArr.push_back( eChrSet );
aChrTxtAtrArr.Insert( p, nPos );
}
else if( USHRT_MAX != ( nPos = aChrTxtAtrArr.GetPos( p )) )
rtl_TextEncoding eChrSet = ((SvxFontItem&)rItem).GetCharSet();
aChrSetArr.push_back( eChrSet );
aChrTxtAtrArr.push_back( &rAttr );
}
else
{
std::vector<const EECharAttrib*>::iterator it =
std::find( aChrTxtAtrArr.begin(), aChrTxtAtrArr.end(), &rAttr );
if ( it != aChrTxtAtrArr.end() )
{
aChrTxtAtrArr.Remove( nPos );
aChrSetArr.erase( aChrSetArr.begin() + nPos );
aChrTxtAtrArr.erase( it );
aChrSetArr.erase( aChrSetArr.begin() + (it - aChrTxtAtrArr.begin()) );
}
}
}
......
......@@ -1374,7 +1374,7 @@ private:
const EditTextObject* pEditObj;
const SfxItemPool* pEditPool;
std::vector<EECharAttrib> aTxtAtrArr;
SvPtrarr aChrTxtAtrArr;
std::vector<const EECharAttrib*> aChrTxtAtrArr;
std::vector<rtl_TextEncoding> aChrSetArr;
sal_uInt16 nPara;
xub_StrLen nAktSwPos;
......
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