diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-10-01 12:25:05 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-10-01 14:19:25 +0100 |
commit | 2655ef2d03b786b683723e92f3c76838fa012ab6 (patch) | |
tree | 5b002eab48a8d858806dc1a14afe2d0b7588485c /lotuswordpro/source | |
parent | 254f59f623f58c320175a06a2c93bcee7868b623 (diff) |
fix OUString conversion in lotuswordpro
second arg is number of input bytes, not number of resulting codepoints
Change-Id: I76ab899fa3875f37075214363188cf897e018f22
Diffstat (limited to 'lotuswordpro/source')
-rw-r--r-- | lotuswordpro/source/filter/lwpnumericfmt.hxx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lotuswordpro/source/filter/lwpnumericfmt.hxx b/lotuswordpro/source/filter/lwpnumericfmt.hxx index cef91e962b92..599af7452a64 100644 --- a/lotuswordpro/source/filter/lwpnumericfmt.hxx +++ b/lotuswordpro/source/filter/lwpnumericfmt.hxx @@ -180,6 +180,9 @@ enum FMT_EURO = 52 }; +#define RTL_CONSTUTF8_USTRINGPARAM( constAsciiStr ) (&(constAsciiStr)[0]), \ + ((sal_Int32)(SAL_N_ELEMENTS(constAsciiStr)-1)), RTL_TEXTENCODING_UTF8 + class LwpCurrencyPool { public: @@ -198,9 +201,9 @@ private: m_aCurrencyInfo[nC++]=LwpCurrencyInfo(OUString("oS"),sal_True, sal_True);//FMT_AUSTRIANSCHILLING = 3, m_aCurrencyInfo[nC++]=LwpCurrencyInfo(OUString("BF"),sal_True, sal_True);//FMT_BELGIANFRANC = 4, m_aCurrencyInfo[nC++]=LwpCurrencyInfo(OUString("R$"),sal_False, sal_True);//FMT_BRAZILIANCRUZEIRO = 5, - m_aCurrencyInfo[nC++]=LwpCurrencyInfo(OUString("\357\277\241", 1, RTL_TEXTENCODING_UTF8)); //FMT_BRITISHPOUND = 6, + m_aCurrencyInfo[nC++]=LwpCurrencyInfo(OUString(RTL_CONSTUTF8_USTRINGPARAM("\357\277\241"))); //FMT_BRITISHPOUND = 6, m_aCurrencyInfo[nC++]=LwpCurrencyInfo(OUString("C$")); //FMT_CANADIANDOLLAR = 7, - m_aCurrencyInfo[nC++]=LwpCurrencyInfo(OUString("PRC\357\277\245", 1, RTL_TEXTENCODING_UTF8),sal_False,sal_True); //FMT_CHINESEYUAN = 8, + m_aCurrencyInfo[nC++]=LwpCurrencyInfo(OUString(RTL_CONSTUTF8_USTRINGPARAM("PRC\357\277\245")),sal_False,sal_True); //FMT_CHINESEYUAN = 8, m_aCurrencyInfo[nC++]=LwpCurrencyInfo(OUString("Kc"),sal_True, sal_True);//FMT_CZECHKORUNA = 9, m_aCurrencyInfo[nC++]=LwpCurrencyInfo(OUString("Dkr"),sal_False, sal_True);//FMT_DANISHKRONE = 10, m_aCurrencyInfo[nC++]=LwpCurrencyInfo(OUString("ECU"),sal_True, sal_True);//FMT_ECU = 11, @@ -212,9 +215,9 @@ private: m_aCurrencyInfo[nC++]=LwpCurrencyInfo(OUString("Ft"),sal_True, sal_True);//FMT_HUNGARIANFORINT = 17, m_aCurrencyInfo[nC++]=LwpCurrencyInfo(OUString("Rs"),sal_False, sal_True);//FMT_INDIANRUPEE = 18, m_aCurrencyInfo[nC++]=LwpCurrencyInfo(OUString("Rp"),sal_False, sal_True);//FMT_INDONESIANRUPIAH = 19, - m_aCurrencyInfo[nC++]=LwpCurrencyInfo(OUString("IR\357\277\241",3, RTL_TEXTENCODING_UTF8)); //FMT_IRISHPUNT = 20, + m_aCurrencyInfo[nC++]=LwpCurrencyInfo(OUString(RTL_CONSTUTF8_USTRINGPARAM("IR\357\277\241"))); //FMT_IRISHPUNT = 20, m_aCurrencyInfo[nC++]=LwpCurrencyInfo(OUString("L."),sal_False, sal_True);//FMT_ITALIANLIRA = 21, - m_aCurrencyInfo[nC++]=LwpCurrencyInfo(OUString("\357\277\245", 1, RTL_TEXTENCODING_UTF8)); //FMT_JAPANESEYEN = 22, + m_aCurrencyInfo[nC++]=LwpCurrencyInfo(OUString(RTL_CONSTUTF8_USTRINGPARAM("\357\277\245"))); //FMT_JAPANESEYEN = 22, m_aCurrencyInfo[nC++]=LwpCurrencyInfo(OUString("LF"),sal_True, sal_True);//FMT_LUXEMBOURGFRANC = 23, m_aCurrencyInfo[nC++]=LwpCurrencyInfo(OUString("Rm"),sal_False, sal_True);//FMT_MALAYSIANRINGGIT = 24, m_aCurrencyInfo[nC++]=LwpCurrencyInfo(OUString("Mex$")); //FMT_MEXICANPESO = 25, @@ -238,7 +241,7 @@ private: m_aCurrencyInfo[nC++]=LwpCurrencyInfo(OUString("$")); //FMT_USDOLLAR = 43, m_aCurrencyInfo[nC++]=LwpCurrencyInfo(OUString("OTH"),sal_False, sal_True);//FMT_OTHERCURRENCY = 44, - m_aCurrencyInfo[FMT_EURO]=LwpCurrencyInfo(OUString("\342\202\254", 1, RTL_TEXTENCODING_UTF8)); //FMT_EURO = 52 + m_aCurrencyInfo[FMT_EURO]=LwpCurrencyInfo(OUString(RTL_CONSTUTF8_USTRINGPARAM("\342\202\254"))); //FMT_EURO = 52 } }; |