[Libreoffice-commits] .: sc/source

Julien Nabet serval2412 at kemper.freedesktop.org
Tue Aug 2 15:12:00 PDT 2011


 sc/source/core/data/cell2.cxx       |   29 +++++++++++++++--------------
 sc/source/filter/starcalc/scflt.cxx |    2 +-
 2 files changed, 16 insertions(+), 15 deletions(-)

New commits:
commit 713873eee687e6354f5632f5d992ab2d848dafa1
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Wed Aug 3 00:09:53 2011 +0200

    2 fixes in OSL_DEBUG part with ByteString

diff --git a/sc/source/core/data/cell2.cxx b/sc/source/core/data/cell2.cxx
index d28ace5..158930e 100644
--- a/sc/source/core/data/cell2.cxx
+++ b/sc/source/core/data/cell2.cxx
@@ -54,6 +54,7 @@
 #include "externalrefmgr.hxx"
 #include "scitems.hxx"
 #include "patattr.hxx"
+#include <rtl/strbuf.hxx>
 
 using namespace formula;
 
@@ -684,22 +685,22 @@ sal_uInt16 ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos )
 #if OSL_DEBUG_LEVEL > 0
             else
             {
-                String aTmp;
-                ByteString aMsg( "broken Matrix, Pos: " );
+                rtl::OUString aTmp;
+                rtl::OStringBuffer aMsg( "broken Matrix, Pos: " );
                 aPos.Format( aTmp, SCA_VALID_COL | SCA_VALID_ROW, pDocument );
-                aMsg += ByteString( aTmp, RTL_TEXTENCODING_ASCII_US );
-                aMsg += ", MatOrg: ";
+                aMsg.append(rtl::OUStringToOString(aTmp, RTL_TEXTENCODING_UTF8 ));
+                aMsg.append(RTL_CONSTASCII_STRINGPARAM(", MatOrg: "));
                 aOrg.Format( aTmp, SCA_VALID_COL | SCA_VALID_ROW, pDocument );
-                aMsg += ByteString( aTmp, RTL_TEXTENCODING_ASCII_US );
-                aMsg += ", MatCols: ";
-                aMsg += ByteString::CreateFromInt32( nC );
-                aMsg += ", MatRows: ";
-                aMsg += ByteString::CreateFromInt32( nR );
-                aMsg += ", DiffCols: ";
-                aMsg += ByteString::CreateFromInt32( dC );
-                aMsg += ", DiffRows: ";
-                aMsg += ByteString::CreateFromInt32( dR );
-                OSL_FAIL( aMsg.GetBuffer() );
+                aMsg.append(rtl::OUStringToOString(aTmp, RTL_TEXTENCODING_UTF8 ));
+                aMsg.append(RTL_CONSTASCII_STRINGPARAM(", MatCols: "));
+                aMsg.append(static_cast<sal_Int32>( nC ));
+                aMsg.append(RTL_CONSTASCII_STRINGPARAM(", MatRows: "));
+                aMsg.append(static_cast<sal_Int32>( nR ));
+                aMsg.append(RTL_CONSTASCII_STRINGPARAM(", DiffCols: "));
+                aMsg.append(static_cast<sal_Int32>( dC ));
+                aMsg.append(RTL_CONSTASCII_STRINGPARAM(", DiffRows: "));
+                aMsg.append(static_cast<sal_Int32>( dR ));
+                OSL_FAIL( aMsg.makeStringAndClear().getStr());
             }
 #endif
             return nEdges;
diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx
index daf8025..15f1628 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -1003,7 +1003,7 @@ sal_uLong Sc10Import::Import()
 #if OSL_DEBUG_LEVEL > 0
     if (nError)
     {
-        OSL_FAIL( ByteString::CreateFromInt32( nError ).GetBuffer() );
+        OSL_FAIL( rtl::OString::valueOf(static_cast<sal_Int32>(nError)).getStr());
     }
 #endif
 


More information about the Libreoffice-commits mailing list