summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedricbosdo@openoffice.org>2010-09-17 12:57:18 +0200
committerCédric Bosdonnat <cedricbosdo@openoffice.org>2010-09-17 13:16:37 +0200
commitb0539229b1a31925d28a13f9bbda6fd672729bd6 (patch)
tree3cc821ef7367115a7f9d33983af27bd0de7a8e08
parentbe7e116c45073eeeccdb951963acb1f301ec2d6a (diff)
sw-ww8-ruby-export-fix.diff: Fixed wrong ruby export in WW8
i#79246
Notes
Notes: split repo tag: writer_OOO_BUILD_3_2_99_0_PRE
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx9
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx15
-rw-r--r--sw/source/filter/ww8/ww8scan.hxx4
3 files changed, 27 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 37ac58eb571c..66222b7772aa 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 d318522100cf..335a09aea705 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 33d40bcf4c0d..e6d8a1449683 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