Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


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

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.