diff options
author | Cédric Bosdonnat <cedricbosdo@openoffice.org> | 2010-09-17 12:57:18 +0200 |
---|---|---|
committer | Cédric Bosdonnat <cedricbosdo@openoffice.org> | 2010-09-17 13:16:37 +0200 |
commit | 5af90594c6ac8e98c81bbd3f90ff92e794c7deee (patch) | |
tree | 3e34f20be325c1923a3877ece8b8762c51f72a68 | |
parent | 32e1302830f938ae4897a5a43d1b91c025fa3f45 (diff) |
sw-ww8-ruby-export-fix.diff: Fixed wrong ruby export in WW8OOO_BUILD_3_2_99_0_PRE
i#79246
-rw-r--r-- | sw/source/filter/ww8/wrtw8nds.cxx | 9 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8scan.cxx | 15 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8scan.hxx | 4 |
3 files changed, 27 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 37ac58eb57..66222b7772 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -741,7 +741,14 @@ void WW8AttributeOutput::StartRuby( const SwTxtNode& rNode, xub_StrLen /*nPos*/, aStr += String::CreateFromInt32(nHeight); aStr += '('; aStr += rRuby.GetText(); - aStr.APPEND_CONST_ASC( ");" ); + aStr.APPEND_CONST_ASC( ")" ); + + // The parameter separator depends on the FIB.lid + if ( m_rWW8Export.pFib->getNumDecimalSep() == '.' ) + aStr.APPEND_CONST_ASC( "," ); + else + aStr.APPEND_CONST_ASC( ";" ); + m_rWW8Export.OutputField( 0, ww::eEQ, aStr, WRITEFIELD_START | WRITEFIELD_CMD_START ); } diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 8ca3f12911..66db95e6df 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -47,8 +47,11 @@ #include <swtypes.hxx> // DELETEZ #endif // dump +#include <comphelper/processfactory.hxx> +#include <unotools/localedatawrapper.hxx> #include <tools/debug.hxx> #include <i18npool/lang.h> +#include <editeng/unolingu.hxx> #include <vcl/svapp.hxx> // Application #i90932# #include <stdio.h> @@ -58,6 +61,8 @@ if (!(aCon)) \ return aRet; +using namespace ::com::sun::star::lang; + //-begin namespace SL { @@ -5649,6 +5654,16 @@ WW8Fib::WW8Fib(BYTE nVer) break; }; // <-- #i90932# + + Locale aTempLocale; + SvxLanguageToLocale( aTempLocale, lid ); + LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), aTempLocale ); + nNumDecimalSep = aLocaleWrapper.getNumDecimalSep().GetChar( 0 ); +} + +sal_Unicode WW8Fib::getNumDecimalSep() const +{ + return nNumDecimalSep; } bool WW8Fib::WriteHeader(SvStream& rStrm) diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx index f5595439e7..78448605f9 100644 --- a/sw/source/filter/ww8/ww8scan.hxx +++ b/sw/source/filter/ww8/ww8scan.hxx @@ -988,6 +988,9 @@ public: */ class WW8Fib { +private: + sal_Unicode nNumDecimalSep; + public: /** Program-Version asked for by us: @@ -1445,6 +1448,7 @@ public: static rtl_TextEncoding GetFIBCharset(UINT16 chs); ww::WordVersion GetFIBVersion() const; WW8_CP GetBaseCp(ManTypes nType) const; + sal_Unicode getNumDecimalSep() const; }; class WW8Style |