[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - sax/source

2016-02-05 Thread Caolán McNamara
 sax/source/tools/converter.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3d1638e9deded1b10a38720ef61077ebb8881d47
Author: Caolán McNamara 
Date:   Wed Feb 3 10:30:43 2016 +

fix gcc build error

error: invalid operands of types '__gnu_cxx::__enable_if::__type
{aka double}' and 'int' to binary 'operator%'

apparently there's a template returning double for abs for the
non-int/long/float/double argument case. So promote earlier to int so the
abs is called

Change-Id: I882a27c5ec349f894c1c9f4857687360a46b55ae
(cherry picked from commit b9fa2963cf12e6987b3a0acc219c4fa591e41be8)
Reviewed-on: https://gerrit.libreoffice.org/22071
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index b4eb276..3e2cbc9 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -1250,7 +1250,7 @@ bool Converter::convertDuration(util::Duration& rDuration,
 
 
 static void
-lcl_AppendTimezone(OUStringBuffer & i_rBuffer, sal_Int16 const nOffset)
+lcl_AppendTimezone(OUStringBuffer & i_rBuffer, int const nOffset)
 {
 if (0 == nOffset)
 {
@@ -1435,7 +1435,7 @@ lcl_MaxDaysPerMonth(const sal_Int32 nMonth, const 
sal_Int32 nYear)
 static void lcl_ConvertToUTC(
 sal_Int16 & o_rYear, sal_uInt16 & o_rMonth, sal_uInt16 & o_rDay,
 sal_uInt16 & o_rHours, sal_uInt16 & o_rMinutes,
-sal_Int16 const nSourceOffset)
+int const nSourceOffset)
 {
 sal_Int16 nOffsetHours(abs(nSourceOffset) / 60);
 sal_Int16 const nOffsetMinutes(abs(nSourceOffset) % 60);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - sax/source

2016-01-21 Thread Caolán McNamara
 sax/source/tools/fastserializer.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6c0535b2b0e3f6d4bd5a9515a2c1a43e32e22a25
Author: Caolán McNamara 
Date:   Sun Jan 17 20:32:07 2016 +

crashtesting: plain-text import allows liberal with the UTF-8 input

see ImplConvertUtf8ToUnicode which allows surrogates, so we need a 
non-liberal
utf-input there if we want to enfore non-liberal utf-output here.

Change-Id: I713818d7b6d79922d9b08f2b137a803384eccb65
(cherry picked from commit 734cadff24b3e8555b40c58b4abd1f1c366c25cb)
Signed-off-by: Michael Stahl 

diff --git a/sax/source/tools/fastserializer.cxx 
b/sax/source/tools/fastserializer.cxx
index 8437ff0..b81886e 100644
--- a/sax/source/tools/fastserializer.cxx
+++ b/sax/source/tools/fastserializer.cxx
@@ -94,7 +94,7 @@ namespace sax_fastparser {
 
 void FastSaxSerializer::write( const OUString& sOutput, bool bEscape )
 {
-write( sOutput.toUtf8(), bEscape );
+write( OUStringToOString(sOutput, RTL_TEXTENCODING_UTF8), bEscape );
 
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits