From c1cf8dac6d54f3d0876803ca9dffce23df7241da Mon Sep 17 00:00:00 2001 From: Ivan Timofeev Date: Fri, 2 Mar 2012 18:44:42 +0400 Subject: [PATCH] there was the object comparison, not the pointer comparison --- editeng/source/editeng/impedit4.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index d28d664edeed..fd4fa31d08dd 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -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 ); }