there was the object comparison, not the pointer comparison

This commit is contained in:
Ivan Timofeev 2012-03-02 18:44:42 +04:00
parent 0ecb2bd92a
commit c1cf8dac6d

View file

@ -814,7 +814,16 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput,
case EE_CHAR_FONTINFO_CJK:
case EE_CHAR_FONTINFO_CTL:
{
sal_uInt32 n = std::find(rFontTable.begin(), rFontTable.end(), (SvxFontItem*)&rItem ) - rFontTable.begin();
sal_uInt32 n = 0;
for (size_t i = 0; i < rFontTable.size(); ++i)
{
if (*rFontTable[i] == rItem)
{
n = i;
break;
}
}
rOutput << OOO_STRING_SVTOOLS_RTF_F;
rOutput.WriteNumber( n );
}