[PATCH] Bug 38838 - Removal/Replacement of the String/UniString with OUString once and for all.

Jean-Noël Rouvignac jn.rouvignac at gmail.com
Tue Jan 8 02:05:50 PST 2013


I forgot to mention that there are a few strange cases that are doign the
same that the old code was doing:

The following code converts a sal_uIntPtr to sal_Int32:
+    OUString info = OUString::valueOf( static_cast<sal_Int32>(
pProgrInfo->GetCurObj() ) )
+            + OUString::valueOf( static_cast<sal_Int32>(
pProgrInfo->GetObjCount() ) );
+        info = OUString::valueOf( static_cast<sal_Int32>(
pProgrInfo->GetCurAction() ) )
+            + OUString::valueOf( static_cast<sal_Int32>(
pProgrInfo->GetActionCount() ) );
+        info = OUString::valueOf( static_cast<sal_Int32>(
pProgrInfo->GetCurInsert() ) )
+            + OUString::valueOf( static_cast<sal_Int32>(
pProgrInfo->GetInsertCount() ) );

The following code converts a sal_uInt32 to sal_Int32:
+    rText.Append( OUString::valueOf( static_cast<sal_Int32>( nCount ) ) );
+        rText.Append( OUString::valueOf( static_cast<sal_Int32>( GetValue(
i ).nValue ) ) );

I just converted the code to do what the old code was doing, but I find
these dodgy. Should OUString be enhanced to support these types?

Thanks,
Jean-Noel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20130108/69207a1a/attachment.html>


More information about the LibreOffice mailing list