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


On Wed, Feb 20, 2013 at 9:48 PM, Markus Mohrhard
<markus.mohrhard@googlemail.com> wrote:
Hey,

I'm currently running the calc files throough the automatic import
test and the first XLSX file that crashed was novell#349591.

THe problem there is the assert statement in ustring.hxx:232 together
with the vmldrawing.cxx:59.

Is it correct that we can't handle \0 in a string literal or is the
assert statement wrong?


maybe
diff --git a/oox/source/vml/vmldrawing.cxx b/oox/source/vml/vmldrawing.cxx
index 5293e1e..371d1320 100644
--- a/oox/source/vml/vmldrawing.cxx
+++ b/oox/source/vml/vmldrawing.cxx
@@ -55,8 +55,9 @@ namespace {
 /** Returns the textual representation of a numeric VML shape identifier. */
 OUString lclGetShapeId( sal_Int32 nShapeId )
 {
+    sal_Unicode prefix[2] = {0,115}; /* "\0s" */
     // identifier consists of a literal NUL character, a lowercase
's', and the id
-    return OUString( "\0s" ) + OUString::valueOf( nShapeId );
+    return OUString( prefix, 2 ) + OUString::valueOf( nShapeId );
 }

 /** Returns the numeric VML shape identifier from its textual
representation. */

Norbert

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.