fix problem with \0 in string literal

Change-Id: If605c111a1d921e404c4aca12d28c558a6659987
This commit is contained in:
Markus Mohrhard
2013-02-22 04:28:42 +01:00
parent 0e72992d74
commit a51f2248a6

View File

@@ -56,7 +56,8 @@ namespace {
OUString lclGetShapeId( sal_Int32 nShapeId ) OUString lclGetShapeId( sal_Int32 nShapeId )
{ {
// identifier consists of a literal NUL character, a lowercase 's', and the id // identifier consists of a literal NUL character, a lowercase 's', and the id
return OUString( "\0s" ) + OUString::valueOf( nShapeId ); sal_Unicode aStr[2] = { '\0', 's' };
return OUString( aStr, 2 ) + OUString::valueOf( nShapeId );
} }
/** Returns the numeric VML shape identifier from its textual representation. */ /** Returns the numeric VML shape identifier from its textual representation. */