writerfilter/source/rtftok/rtfdocumentimpl.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 11e227371aa5f9bc6434ed9e14866c63555401f2
Author: Miklos Vajna <vmik...@frugalware.org>
Date:   Wed Nov 2 02:29:35 2011 +0100

    Related: i#95668 Fix encoding of non-continuous font indexes
    
    The non-continuous font index first has to be converted before the
    encoding can be looked up.

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index e17b4b5..bdbd3f4 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2006,9 +2006,10 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, 
int nParam)
             }
             else
             {
-                RTFValue::Pointer_t pValue(new 
RTFValue(std::find(m_aFontIndexes.begin(), m_aFontIndexes.end(), nParam) - 
m_aFontIndexes.begin()));
+                int nFontIndex = std::find(m_aFontIndexes.begin(), 
m_aFontIndexes.end(), nParam) - m_aFontIndexes.begin();
+                RTFValue::Pointer_t pValue(new RTFValue(nFontIndex));
                 
m_aStates.top().aCharacterSprms->push_back(make_pair(NS_sprm::LN_CRgFtc0, 
pValue));
-                m_aStates.top().nCurrentEncoding = getEncodingTable(nParam);
+                m_aStates.top().nCurrentEncoding = 
getEncodingTable(nFontIndex);
             }
             break;
         case RTF_RED:
_______________________________________________
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to