diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2011-03-02 16:52:31 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2011-03-02 17:58:40 +0100 |
commit | 889431fad7b7e4b5d247e93e963d4fe084d90f3e (patch) | |
tree | 01e97632a3e49240ed6ae686c30441b4db02058a | |
parent | d172c2b350d76554d1973043e7bbdaf68b3071b9 (diff) |
read w:charset , not used later though it seems (part of fdo#34814)
-rw-r--r-- | writerfilter/source/dmapper/FontTable.cxx | 11 | ||||
-rw-r--r-- | writerfilter/source/dmapper/FontTable.hxx | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/FontTable.cxx b/writerfilter/source/dmapper/FontTable.cxx index 36da24553..8410780c9 100644 --- a/writerfilter/source/dmapper/FontTable.cxx +++ b/writerfilter/source/dmapper/FontTable.cxx @@ -33,6 +33,7 @@ #endif #include <vector> #include <stdio.h> +#include <rtl/tencinfo.h> namespace writerfilter { namespace dmapper @@ -116,12 +117,20 @@ void FontTable::sprm(Sprm& rSprm) if(!m_pImpl->pCurrentEntry) return ; sal_uInt32 nSprmId = rSprm.getId(); - (void)nSprmId; Value::Pointer_t pValue = rSprm.getValue(); sal_Int32 nIntValue = pValue->getInt(); (void)nIntValue; rtl::OUString sStringValue = pValue->getString(); + switch(nSprmId) + { + case NS_ooxml::LN_CT_Font_charset: + m_pImpl->pCurrentEntry->nTextEncoding = rtl_getTextEncodingFromWindowsCharset( nIntValue ); + break; + default: + break; + } + } void FontTable::entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t ref) diff --git a/writerfilter/source/dmapper/FontTable.hxx b/writerfilter/source/dmapper/FontTable.hxx index 4a729da9e..84f0b02ff 100644 --- a/writerfilter/source/dmapper/FontTable.hxx +++ b/writerfilter/source/dmapper/FontTable.hxx @@ -57,7 +57,7 @@ struct FontEntry FontEntry() : bTrueType(false), nPitchRequest( 0 ), - nTextEncoding( 0 ), + nTextEncoding( RTL_TEXTENCODING_DONTKNOW ), nFontFamilyId( 0 ), nBaseWeight( 0 ), nAltFontIndex( 0 ) |