Author: alg
Date: Fri Jul 4 12:15:15 2014
New Revision: 1607839
URL: http://svn.apache.org/r1607839
Log:
i124825 secure usage of object ID in preparation of names for line start/end
geometry
Modified:
openoffice/trunk/main/filter/source/svg/svgwriter.cxx
Modified: openoffice/trunk/main/filter/source/svg/svgwriter.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/filter/source/svg/svgwriter.cxx?rev=1607839&r1=1607838&r2=1607839&view=diff
==============================================================================
--- openoffice/trunk/main/filter/source/svg/svgwriter.cxx (original)
+++ openoffice/trunk/main/filter/source/svg/svgwriter.cxx Fri Jul 4 12:15:15
2014
@@ -1647,7 +1647,11 @@ void SVGActionWriter::ImplWriteActions(
if(aStartArrow.Count())
{
mapCurShape->maShapePolyPoly = aStartArrow;
- mapCurShape->maId = *pElementId + B2UCONST("_") +
::rtl::OUString::valueOf(nEntryCount++);
+
+ if( pElementId ) // #i124825# pElementId is
optinal, may be zero
+ {
+ mapCurShape->maId = *pElementId +
B2UCONST("_") + ::rtl::OUString::valueOf(nEntryCount++);
+ }
ImplWriteShape( *mapCurShape );
}
@@ -1655,7 +1659,11 @@ void SVGActionWriter::ImplWriteActions(
if(aEndArrow.Count())
{
mapCurShape->maShapePolyPoly = aEndArrow;
- mapCurShape->maId = *pElementId + B2UCONST("_") +
::rtl::OUString::valueOf(nEntryCount++);
+
+ if( pElementId ) // #i124825# pElementId is
optinal, may be zero
+ {
+ mapCurShape->maId = *pElementId +
B2UCONST("_") + ::rtl::OUString::valueOf(nEntryCount++);
+ }
ImplWriteShape( *mapCurShape );
}