Don't litter pCustomShapeTypeTranslationHashMap with dangling keys
...that are char* into temporary OString at the GetOOXMLPresetGeometry call site in oox/source/export/shapes.cxx. Change-Id: Ifd6533f9bd869b740a6b483f4a1f6e4860007b9c
This commit is contained in:
parent
55c832d86e
commit
ab9813eaea
@ -1302,8 +1302,6 @@ static CustomShapeTypeTranslationHashMap* pCustomShapeTypeTranslationHashMap = N
|
||||
|
||||
const char* GetOOXMLPresetGeometry( const char* sShapeType )
|
||||
{
|
||||
const char* sPresetGeo;
|
||||
|
||||
if( pCustomShapeTypeTranslationHashMap == NULL )
|
||||
{
|
||||
pCustomShapeTypeTranslationHashMap = new CustomShapeTypeTranslationHashMap ();
|
||||
@ -1312,13 +1310,9 @@ const char* GetOOXMLPresetGeometry( const char* sShapeType )
|
||||
(*pCustomShapeTypeTranslationHashMap)[ pCustomShapeTypeTranslationTable[ i ].sOOo ] = pCustomShapeTypeTranslationTable[ i ].sMSO;
|
||||
}
|
||||
}
|
||||
|
||||
sPresetGeo = (*pCustomShapeTypeTranslationHashMap)[ sShapeType ];
|
||||
|
||||
if( sPresetGeo == NULL )
|
||||
sPresetGeo = "rect";
|
||||
|
||||
return sPresetGeo;
|
||||
CustomShapeTypeTranslationHashMap::iterator i(
|
||||
pCustomShapeTypeTranslationHashMap->find(sShapeType));
|
||||
return i == pCustomShapeTypeTranslationHashMap->end() ? "rect" : i->second;
|
||||
}
|
||||
|
||||
typedef boost::unordered_map< const char*, MSO_SPT, rtl::CStringHash, rtl::CStringEqual> DMLToVMLTranslationHashMap;
|
||||
|
Loading…
x
Reference in New Issue
Block a user